Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 3 Aug 2023 21:29:50 +0000 (14:29 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Aug 2023 21:34:37 +0000 (14:34 -0700)
Cross-merge networking fixes after downstream PR.

Conflicts:

net/dsa/port.c
  9945c1fb03a3 ("net: dsa: fix older DSA drivers using phylink")
  a88dd7538461 ("net: dsa: remove legacy_pre_march2020 detection")
https://lore.kernel.org/all/20230731102254.2c9868ca@canb.auug.org.au/

net/xdp/xsk.c
  3c5b4d69c358 ("net: annotate data-races around sk->sk_mark")
  b7f72a30e9ac ("xsk: introduce wrappers and helpers for supporting multi-buffer in Tx path")
https://lore.kernel.org/all/20230731102631.39988412@canb.auug.org.au/

drivers/net/ethernet/broadcom/bnxt/bnxt.c
  37b61cda9c16 ("bnxt: don't handle XDP in netpoll")
  2b56b3d99241 ("eth: bnxt: handle invalid Tx completions more gracefully")
https://lore.kernel.org/all/20230801101708.1dc7faac@canb.auug.org.au/

Adjacent changes:

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
  62da08331f1a ("net/mlx5e: Set proper IPsec source port in L4 selector")
  fbd517549c32 ("net/mlx5e: Add function to get IPsec offload namespace")

drivers/net/ethernet/sfc/selftest.c
  55c1528f9b97 ("sfc: fix field-spanning memcpy in selftest")
  ae9d445cd41f ("sfc: Miscellaneous comment removals")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
39 files changed:
1  2 
Documentation/devicetree/bindings/net/mediatek,net.yaml
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
MAINTAINERS
drivers/net/dsa/microchip/ksz_common.c
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/korina.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/sfc/selftest.c
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
drivers/net/ethernet/xilinx/ll_temac_main.c
drivers/net/tap.c
drivers/net/tun.c
include/net/route.h
include/uapi/linux/pkt_cls.h
kernel/trace/bpf_trace.c
net/core/rtnetlink.c
net/core/sock.c
net/dccp/ipv6.c
net/dsa/port.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp.c
net/ipv6/ping.c
net/ipv6/raw.c
net/ipv6/route.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c
net/l2tp/l2tp_ip6.c
net/packet/af_packet.c
net/sched/cls_flower.c
net/xdp/xsk.c

diff --cc MAINTAINERS
Simple merge
index a3bbd13c070fc62c278cb9441d1329d80e0c6de5,1eb490c48c52e974a669e712706bb1fd5904a6c4..6a643aae78028887e2fb68572588aa4d06a31e6d
@@@ -744,9 -686,10 +745,10 @@@ static void bnxt_tx_int(struct bnxt *bp
  next_tx_int:
                cons = NEXT_TX(cons);
  
 -              dev_kfree_skb_any(skb);
 +              dev_consume_skb_any(skb);
        }
  
+       bnapi->tx_pkts = 0;
        WRITE_ONCE(txr->tx_cons, cons);
  
        __netif_txq_completed_wake(txq, nr_pkts, tx_bytes,
@@@ -2595,12 -2579,11 +2605,11 @@@ static int __bnxt_poll_work(struct bnx
        return rx_pkts;
  }
  
- static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi)
+ static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi,
+                                 int budget)
  {
-       if (bnapi->tx_pkts && !bnapi->tx_fault) {
-               bnapi->tx_int(bp, bnapi, bnapi->tx_pkts);
-               bnapi->tx_pkts = 0;
-       }
 -      if (bnapi->tx_pkts)
++      if (bnapi->tx_pkts && !bnapi->tx_fault)
+               bnapi->tx_int(bp, bnapi, budget);
  
        if ((bnapi->events & BNXT_RX_EVENT) && !(bnapi->in_reset)) {
                struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
index 9d16757e27fe4751f625eb94c67c85f7a0414efa,bb95c3dc5270f6641d07c3fc549299eaf61e0b06..362918876d3ca0273e86888f37afae708dd80fb9
@@@ -1005,10 -1005,9 +1005,10 @@@ struct bnxt_napi 
        struct bnxt_tx_ring_info        *tx_ring;
  
        void                    (*tx_int)(struct bnxt *, struct bnxt_napi *,
-                                         int);
+                                         int budget);
        int                     tx_pkts;
        u8                      events;
 +      u8                      tx_fault:1;
  
        u32                     flags;
  #define BNXT_NAPI_FLAG_XDP    0x1
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/sock.c
Simple merge
diff --cc net/dccp/ipv6.c
Simple merge
diff --cc net/dsa/port.c
index c63cbfbe6489a70f70df281bcb61aca1dea915e9,2f6195d7b7412741533773ac4af2358da2fbf32c..24015e11255f01624e9c9469a014974120a11097
@@@ -1686,8 -1720,22 +1686,15 @@@ int dsa_port_phylink_create(struct dsa_
        if (err)
                mode = PHY_INTERFACE_MODE_NA;
  
-       if (ds->ops->phylink_get_caps)
 -      /* Presence of phylink_mac_link_state or phylink_mac_an_restart is
 -       * an indicator of a legacy phylink driver.
 -       */
 -      if (ds->ops->phylink_mac_link_state ||
 -          ds->ops->phylink_mac_an_restart)
 -              dp->pl_config.legacy_pre_march2020 = true;
 -
+       if (ds->ops->phylink_get_caps) {
                ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
+       } else {
+               /* For legacy drivers */
+               __set_bit(PHY_INTERFACE_MODE_INTERNAL,
+                         dp->pl_config.supported_interfaces);
+               __set_bit(PHY_INTERFACE_MODE_GMII,
+                         dp->pl_config.supported_interfaces);
+       }
  
        pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
                            mode, &dsa_port_phylink_mac_ops);
Simple merge
diff --cc net/ipv4/udp.c
Simple merge
diff --cc net/ipv6/ping.c
Simple merge
diff --cc net/ipv6/raw.c
Simple merge
Simple merge
Simple merge
diff --cc net/ipv6/udp.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/xdp/xsk.c
index 4f1e0599146e2cde9dea5907feda8c9b136540d2,b89adb52a977e521b628f95ca9fd4fbf33adfa1f..d4ccffcab982a547711ce298dce1864f964ee4a7
@@@ -682,22 -505,11 +682,22 @@@ static struct sk_buff *xsk_build_skb(st
  
        skb->dev = dev;
        skb->priority = xs->sk.sk_priority;
-       skb->mark = xs->sk.sk_mark;
+       skb->mark = READ_ONCE(xs->sk.sk_mark);
 -      skb_shinfo(skb)->destructor_arg = (void *)(long)desc->addr;
        skb->destructor = xsk_destruct_skb;
 +      xsk_set_destructor_arg(skb);
  
        return skb;
 +
 +free_err:
 +      if (err == -EAGAIN) {
 +              xsk_cq_cancel_locked(xs, 1);
 +      } else {
 +              xsk_set_destructor_arg(skb);
 +              xsk_drop_skb(skb);
 +              xskq_cons_release(xs->tx);
 +      }
 +
 +      return ERR_PTR(err);
  }
  
  static int __xsk_generic_xmit(struct sock *sk)