Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Fri, 8 Dec 2023 01:47:58 +0000 (17:47 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Dec 2023 01:53:17 +0000 (17:53 -0800)
Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/stmicro/stmmac/dwmac5.c
drivers/net/ethernet/stmicro/stmmac/dwmac5.h
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
  37e4b8df27bc ("net: stmmac: fix FPE events losing")
  c3f3b97238f6 ("net: stmmac: Refactor EST implementation")
https://lore.kernel.org/all/20231206110306.01e91114@canb.auug.org.au/

Adjacent changes:

net/ipv4/tcp_ao.c
  9396c4ee93f9 ("net/tcp: Don't store TCP-AO maclen on reqsk")
  7b0f570f879a ("tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
35 files changed:
1  2 
MAINTAINERS
drivers/net/dsa/microchip/ksz_common.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/ice/ice_sriov.c
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/ethernet/stmicro/stmmac/dwmac5.c
drivers/net/ethernet/stmicro/stmmac/dwmac5.h
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
include/linux/bpf.h
include/linux/tcp.h
include/net/tcp.h
include/net/tcp_ao.h
net/core/filter.c
net/ipv4/tcp.c
net/ipv4/tcp_ao.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
net/packet/af_packet.c
net/smc/af_smc.c
net/smc/smc_clc.c
net/smc/smc_clc.h
net/xdp/xsk.c

diff --cc MAINTAINERS
Simple merge
index ea92650f5c9714a8e7992d9a04d9d8d98103380d,8fd167501fa0ea10a5f4489bc1d06fef6591b4d9..e02cebc3f1b7366d1067b53a0406dcfebe2d8e33
@@@ -573,7 -573,145 +573,8 @@@ int dwmac5_flex_pps_config(void __iome
        return 0;
  }
  
- void dwmac5_fpe_configure(void __iomem *ioaddr, u32 num_txq, u32 num_rxq,
 -static int dwmac5_est_write(void __iomem *ioaddr, u32 reg, u32 val, bool gcl)
 -{
 -      u32 ctrl;
 -
 -      writel(val, ioaddr + MTL_EST_GCL_DATA);
 -
 -      ctrl = (reg << ADDR_SHIFT);
 -      ctrl |= gcl ? 0 : GCRR;
 -
 -      writel(ctrl, ioaddr + MTL_EST_GCL_CONTROL);
 -
 -      ctrl |= SRWO;
 -      writel(ctrl, ioaddr + MTL_EST_GCL_CONTROL);
 -
 -      return readl_poll_timeout(ioaddr + MTL_EST_GCL_CONTROL,
 -                                ctrl, !(ctrl & SRWO), 100, 5000);
 -}
 -
 -int dwmac5_est_configure(void __iomem *ioaddr, struct stmmac_est *cfg,
 -                       unsigned int ptp_rate)
 -{
 -      int i, ret = 0x0;
 -      u32 ctrl;
 -
 -      ret |= dwmac5_est_write(ioaddr, BTR_LOW, cfg->btr[0], false);
 -      ret |= dwmac5_est_write(ioaddr, BTR_HIGH, cfg->btr[1], false);
 -      ret |= dwmac5_est_write(ioaddr, TER, cfg->ter, false);
 -      ret |= dwmac5_est_write(ioaddr, LLR, cfg->gcl_size, false);
 -      ret |= dwmac5_est_write(ioaddr, CTR_LOW, cfg->ctr[0], false);
 -      ret |= dwmac5_est_write(ioaddr, CTR_HIGH, cfg->ctr[1], false);
 -      if (ret)
 -              return ret;
 -
 -      for (i = 0; i < cfg->gcl_size; i++) {
 -              ret = dwmac5_est_write(ioaddr, i, cfg->gcl[i], true);
 -              if (ret)
 -                      return ret;
 -      }
 -
 -      ctrl = readl(ioaddr + MTL_EST_CONTROL);
 -      ctrl &= ~PTOV;
 -      ctrl |= ((1000000000 / ptp_rate) * 6) << PTOV_SHIFT;
 -      if (cfg->enable)
 -              ctrl |= EEST | SSWL;
 -      else
 -              ctrl &= ~EEST;
 -
 -      writel(ctrl, ioaddr + MTL_EST_CONTROL);
 -
 -      /* Configure EST interrupt */
 -      if (cfg->enable)
 -              ctrl = (IECGCE | IEHS | IEHF | IEBE | IECC);
 -      else
 -              ctrl = 0;
 -
 -      writel(ctrl, ioaddr + MTL_EST_INT_EN);
 -
 -      return 0;
 -}
 -
 -void dwmac5_est_irq_status(void __iomem *ioaddr, struct net_device *dev,
 -                        struct stmmac_extra_stats *x, u32 txqcnt)
 -{
 -      u32 status, value, feqn, hbfq, hbfs, btrl;
 -      u32 txqcnt_mask = (1 << txqcnt) - 1;
 -
 -      status = readl(ioaddr + MTL_EST_STATUS);
 -
 -      value = (CGCE | HLBS | HLBF | BTRE | SWLC);
 -
 -      /* Return if there is no error */
 -      if (!(status & value))
 -              return;
 -
 -      if (status & CGCE) {
 -              /* Clear Interrupt */
 -              writel(CGCE, ioaddr + MTL_EST_STATUS);
 -
 -              x->mtl_est_cgce++;
 -      }
 -
 -      if (status & HLBS) {
 -              value = readl(ioaddr + MTL_EST_SCH_ERR);
 -              value &= txqcnt_mask;
 -
 -              x->mtl_est_hlbs++;
 -
 -              /* Clear Interrupt */
 -              writel(value, ioaddr + MTL_EST_SCH_ERR);
 -
 -              /* Collecting info to shows all the queues that has HLBS
 -               * issue. The only way to clear this is to clear the
 -               * statistic
 -               */
 -              if (net_ratelimit())
 -                      netdev_err(dev, "EST: HLB(sched) Queue 0x%x\n", value);
 -      }
 -
 -      if (status & HLBF) {
 -              value = readl(ioaddr + MTL_EST_FRM_SZ_ERR);
 -              feqn = value & txqcnt_mask;
 -
 -              value = readl(ioaddr + MTL_EST_FRM_SZ_CAP);
 -              hbfq = (value & SZ_CAP_HBFQ_MASK(txqcnt)) >> SZ_CAP_HBFQ_SHIFT;
 -              hbfs = value & SZ_CAP_HBFS_MASK;
 -
 -              x->mtl_est_hlbf++;
 -
 -              /* Clear Interrupt */
 -              writel(feqn, ioaddr + MTL_EST_FRM_SZ_ERR);
 -
 -              if (net_ratelimit())
 -                      netdev_err(dev, "EST: HLB(size) Queue %u Size %u\n",
 -                                 hbfq, hbfs);
 -      }
 -
 -      if (status & BTRE) {
 -              if ((status & BTRL) == BTRL_MAX)
 -                      x->mtl_est_btrlm++;
 -              else
 -                      x->mtl_est_btre++;
 -
 -              btrl = (status & BTRL) >> BTRL_SHIFT;
 -
 -              if (net_ratelimit())
 -                      netdev_info(dev, "EST: BTR Error Loop Count %u\n",
 -                                  btrl);
 -
 -              writel(BTRE, ioaddr + MTL_EST_STATUS);
 -      }
 -
 -      if (status & SWLC) {
 -              writel(SWLC, ioaddr + MTL_EST_STATUS);
 -              netdev_info(dev, "EST: SWOL has been switched\n");
 -      }
 -}
 -
+ void dwmac5_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg,
+                         u32 num_txq, u32 num_rxq,
                          bool enable)
  {
        u32 value;
index 8b0f2c90faefb05d00496998f9617d7989e952fb,34e620790eb37160383e431a431c493545412395..bf33a51d229e9d0b7546562c11a9110b598f4405
@@@ -102,9 -149,15 +102,11 @@@ int dwmac5_rxp_config(void __iomem *ioa
  int dwmac5_flex_pps_config(void __iomem *ioaddr, int index,
                           struct stmmac_pps_cfg *cfg, bool enable,
                           u32 sub_second_inc, u32 systime_flags);
- void dwmac5_fpe_configure(void __iomem *ioaddr, u32 num_txq, u32 num_rxq,
 -int dwmac5_est_configure(void __iomem *ioaddr, struct stmmac_est *cfg,
 -                       unsigned int ptp_rate);
 -void dwmac5_est_irq_status(void __iomem *ioaddr, struct net_device *dev,
 -                         struct stmmac_extra_stats *x, u32 txqcnt);
+ void dwmac5_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg,
+                         u32 num_txq, u32 num_rxq,
                          bool enable);
  void dwmac5_fpe_send_mpacket(void __iomem *ioaddr,
+                            struct stmmac_fpe_cfg *cfg,
                             enum stmmac_mpacket_type type);
  int dwmac5_fpe_irq_status(void __iomem *ioaddr, struct net_device *dev);
  
index f33f73de5cfea2ca33f79e106314eef2fd5e233a,a74e71db79f949227525ceedb2d915eb88430aa9..eb48211d9b0eb7013b436b0336c75f512fbf638a
@@@ -1433,7 -1433,59 +1433,8 @@@ static void dwxgmac2_set_arp_offload(st
        writel(value, ioaddr + XGMAC_RX_CONFIG);
  }
  
- static void dwxgmac3_fpe_configure(void __iomem *ioaddr, u32 num_txq,
 -static int dwxgmac3_est_write(void __iomem *ioaddr, u32 reg, u32 val, bool gcl)
 -{
 -      u32 ctrl;
 -
 -      writel(val, ioaddr + XGMAC_MTL_EST_GCL_DATA);
 -
 -      ctrl = (reg << XGMAC_ADDR_SHIFT);
 -      ctrl |= gcl ? 0 : XGMAC_GCRR;
 -
 -      writel(ctrl, ioaddr + XGMAC_MTL_EST_GCL_CONTROL);
 -
 -      ctrl |= XGMAC_SRWO;
 -      writel(ctrl, ioaddr + XGMAC_MTL_EST_GCL_CONTROL);
 -
 -      return readl_poll_timeout_atomic(ioaddr + XGMAC_MTL_EST_GCL_CONTROL,
 -                                       ctrl, !(ctrl & XGMAC_SRWO), 100, 5000);
 -}
 -
 -static int dwxgmac3_est_configure(void __iomem *ioaddr, struct stmmac_est *cfg,
 -                                unsigned int ptp_rate)
 -{
 -      int i, ret = 0x0;
 -      u32 ctrl;
 -
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_BTR_LOW, cfg->btr[0], false);
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_BTR_HIGH, cfg->btr[1], false);
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_TER, cfg->ter, false);
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_LLR, cfg->gcl_size, false);
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_CTR_LOW, cfg->ctr[0], false);
 -      ret |= dwxgmac3_est_write(ioaddr, XGMAC_CTR_HIGH, cfg->ctr[1], false);
 -      if (ret)
 -              return ret;
 -
 -      for (i = 0; i < cfg->gcl_size; i++) {
 -              ret = dwxgmac3_est_write(ioaddr, i, cfg->gcl[i], true);
 -              if (ret)
 -                      return ret;
 -      }
 -
 -      ctrl = readl(ioaddr + XGMAC_MTL_EST_CONTROL);
 -      ctrl &= ~XGMAC_PTOV;
 -      ctrl |= ((1000000000 / ptp_rate) * 9) << XGMAC_PTOV_SHIFT;
 -      if (cfg->enable)
 -              ctrl |= XGMAC_EEST | XGMAC_SSWL;
 -      else
 -              ctrl &= ~XGMAC_EEST;
 -
 -      writel(ctrl, ioaddr + XGMAC_MTL_EST_CONTROL);
 -      return 0;
 -}
 -
+ static void dwxgmac3_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg,
+                                  u32 num_txq,
                                   u32 num_rxq, bool enable)
  {
        u32 value;
index 72412d7338567b0b33882405b53c01029d36dc8e,68aa2d5ca6e56774b03701098abf41c30eb4ac50..7be04b54738b8a622e2068aea93097f058702187
@@@ -419,9 -408,15 +419,11 @@@ struct stmmac_ops 
                                bool en, bool udp, bool sa, bool inv,
                                u32 match);
        void (*set_arp_offload)(struct mac_device_info *hw, bool en, u32 addr);
-       void (*fpe_configure)(void __iomem *ioaddr, u32 num_txq, u32 num_rxq,
 -      int (*est_configure)(void __iomem *ioaddr, struct stmmac_est *cfg,
 -                           unsigned int ptp_rate);
 -      void (*est_irq_status)(void __iomem *ioaddr, struct net_device *dev,
 -                             struct stmmac_extra_stats *x, u32 txqcnt);
+       void (*fpe_configure)(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg,
+                             u32 num_txq, u32 num_rxq,
                              bool enable);
        void (*fpe_send_mpacket)(void __iomem *ioaddr,
+                                struct stmmac_fpe_cfg *cfg,
                                 enum stmmac_mpacket_type type);
        int (*fpe_irq_status)(void __iomem *ioaddr, struct net_device *dev);
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge
index c4cd1e09eb6b20fb9b0852990ac7b65475b1e720,f8308d3f565e9d8e46d8fef608de000c2b552b5b..87db432c6bb4a8d07d0b0da6d1085dfbfa58838c
@@@ -850,19 -850,8 +850,19 @@@ void tcp_ao_syncookie(struct sock *sk, 
        const struct tcphdr *th = tcp_hdr(skb);
        const struct tcp_ao_hdr *aoh;
        struct tcp_ao_key *key;
 +      int l3index;
 +
 +      /* treq->af_specific is used to perform TCP_AO lookup
 +       * in tcp_create_openreq_child().
 +       */
 +#if IS_ENABLED(CONFIG_IPV6)
 +      if (family == AF_INET6)
 +              treq->af_specific = &tcp_request_sock_ipv6_ops;
 +      else
 +#endif
 +              treq->af_specific = &tcp_request_sock_ipv4_ops;
  
-       treq->maclen = 0;
+       treq->used_tcp_ao = false;
  
        if (tcp_parse_auth_options(th, NULL, &aoh) || !aoh)
                return;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/xdp/xsk.c
Simple merge