Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
authorDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 20:01:52 +0000 (13:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 20:01:52 +0000 (13:01 -0700)
Bug fixes overlapping feature additions and refactoring, mostly.

Signed-off-by: David S. Miller <davem@davemloft.net>
27 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_ptp.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/virtio_net.c
include/net/netfilter/nf_tables.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sock.c
net/core/devlink.c
net/core/rtnetlink.c
net/core/sock.c
net/ipv6/route.c
net/ipv6/sit.c
net/mptcp/protocol.c
net/mptcp/subflow.c
net/netfilter/nfnetlink_cthelper.c
net/sched/sch_htb.c

diff --cc MAINTAINERS
Simple merge
Simple merge
@@@ -2203,22 -2025,36 +2203,25 @@@ static int igc_xdp_xmit_back(struct igc
        return res;
  }
  
 -static struct sk_buff *igc_xdp_run_prog(struct igc_adapter *adapter,
 -                                      struct xdp_buff *xdp)
 +/* This function assumes rcu_read_lock() is held by the caller. */
 +static int __igc_xdp_run_prog(struct igc_adapter *adapter,
 +                            struct bpf_prog *prog,
 +                            struct xdp_buff *xdp)
  {
 -      struct bpf_prog *prog;
 -      int res;
 -      u32 act;
 +      u32 act = bpf_prog_run_xdp(prog, xdp);
  
 -      rcu_read_lock();
 -
 -      prog = READ_ONCE(adapter->xdp_prog);
 -      if (!prog) {
 -              res = IGC_XDP_PASS;
 -              goto unlock;
 -      }
 -
 -      act = bpf_prog_run_xdp(prog, xdp);
        switch (act) {
        case XDP_PASS:
 -              res = IGC_XDP_PASS;
 -              break;
 +              return IGC_XDP_PASS;
        case XDP_TX:
-               return igc_xdp_xmit_back(adapter, xdp) < 0 ?
-                       IGC_XDP_CONSUMED : IGC_XDP_TX;
+               if (igc_xdp_xmit_back(adapter, xdp) < 0)
+                       goto out_failure;
 -              res = IGC_XDP_TX;
 -              break;
++              return IGC_XDP_TX;
        case XDP_REDIRECT:
-               return xdp_do_redirect(adapter->netdev, xdp, prog) < 0 ?
-                       IGC_XDP_CONSUMED : IGC_XDP_REDIRECT;
+               if (xdp_do_redirect(adapter->netdev, xdp, prog) < 0)
+                       goto out_failure;
 -              res = IGC_XDP_REDIRECT;
++              return IGC_XDP_REDIRECT;
+               break;
        default:
                bpf_warn_invalid_xdp_action(act);
                fallthrough;
@@@ -1222,7 -1240,9 +1222,9 @@@ static int stmmac_phy_setup(struct stmm
        priv->phylink_config.dev = &priv->dev->dev;
        priv->phylink_config.type = PHYLINK_NETDEV;
        priv->phylink_config.pcs_poll = true;
-       priv->phylink_config.ovr_an_inband = mdio_bus_data->xpcs_an_inband;
+       if (priv->plat->mdio_bus_data)
+               priv->phylink_config.ovr_an_inband =
 -                      priv->plat->mdio_bus_data->xpcs_an_inband;
++                      mdio_bus_data->xpcs_an_inband;
  
        if (!fwnode)
                fwnode = dev_fwnode(priv->device);
@@@ -398,25 -398,16 +398,28 @@@ static struct sk_buff *page_to_skb(stru
        else
                hdr_padded_len = sizeof(struct padded_vnet_hdr);
  
 -      /* If headroom is not 0, there is an offset between the beginning of the
 +      /* If whole_page, there is an offset between the beginning of the
         * data and the allocated space, otherwise the data and the allocated
         * space are aligned.
+        *
+        * Buffers with headroom use PAGE_SIZE as alloc size, see
+        * add_recvbuf_mergeable() + get_mergeable_buf_len()
         */
 -      truesize = headroom ? PAGE_SIZE : truesize;
 -      tailroom = truesize - len - headroom - (hdr_padded_len - hdr_len);
 -      buf = p - headroom;
 +      if (whole_page) {
 +              /* Buffers with whole_page use PAGE_SIZE as alloc size,
 +               * see add_recvbuf_mergeable() + get_mergeable_buf_len()
 +               */
 +              truesize = PAGE_SIZE;
 +
 +              /* page maybe head page, so we should get the buf by p, not the
 +               * page
 +               */
 +              tailroom = truesize - len - offset_in_page(p);
 +              buf = (char *)((unsigned long)p & PAGE_MASK);
 +      } else {
 +              tailroom = truesize - len;
 +              buf = p;
 +      }
  
        len -= hdr_len;
        offset += hdr_padded_len;
Simple merge
Simple merge
Simple merge
@@@ -9289,11 -8630,12 +9288,18 @@@ static int __devlink_port_phys_port_nam
  
        switch (attrs->flavour) {
        case DEVLINK_PORT_FLAVOUR_PHYSICAL:
 +      case DEVLINK_PORT_FLAVOUR_VIRTUAL:
 +              n = snprintf(name, len, "p%u", attrs->phys.port_number);
 +              if (n < len && attrs->split)
 +                      n += snprintf(name + n, len - n, "s%u",
 +                                    attrs->phys.split_subport_number);
+               if (!attrs->split)
+                       n = snprintf(name, len, "p%u", attrs->phys.port_number);
+               else
+                       n = snprintf(name, len, "p%us%u",
+                                    attrs->phys.port_number,
+                                    attrs->phys.split_subport_number);
++
                break;
        case DEVLINK_PORT_FLAVOUR_CPU:
        case DEVLINK_PORT_FLAVOUR_DSA:
Simple merge
diff --cc net/core/sock.c
Simple merge
Simple merge
diff --cc net/ipv6/sit.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge