Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Fri, 16 Jun 2023 05:18:58 +0000 (22:18 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Jun 2023 05:19:41 +0000 (22:19 -0700)
Cross-merge networking fixes after downstream PR.

Conflicts:

include/linux/mlx5/driver.h
  617f5db1a626 ("RDMA/mlx5: Fix affinity assignment")
  dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports")
https://lore.kernel.org/all/20230613125939.595e50b8@canb.auug.org.au/

tools/testing/selftests/net/mptcp/mptcp_join.sh
  47867f0a7e83 ("selftests: mptcp: join: skip check if MIB counter not supported")
  425ba803124b ("selftests: mptcp: join: support RM_ADDR for used endpoints or not")
  45b1a1227a7a ("mptcp: introduces more address related mibs")
  0639fa230a21 ("selftests: mptcp: add explicit check for new mibs")
https://lore.kernel.org/netdev/20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net/

No adjacent changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
28 files changed:
1  2 
MAINTAINERS
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/ethernet/freescale/enetc/enetc_qos.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/phy/phylink.c
drivers/s390/net/ism_drv.c
fs/smb/client/smb2ops.c
include/linux/mlx5/driver.h
include/net/netfilter/nf_flow_table.h
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/mac80211/tx.c
net/mac80211/util.c
net/netfilter/nf_flow_table_core.c
net/netfilter/nf_flow_table_ip.c
net/netfilter/nf_tables_api.c
net/netfilter/nft_set_pipapo.c
net/sched/act_pedit.c
net/sched/sch_taprio.c
net/tipc/bearer.c
tools/testing/selftests/net/mptcp/mptcp_join.sh

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1246,11 -1238,18 +1246,23 @@@ static inline u16 mlx5_core_max_vfs(con
        return dev->priv.sriov.max_vfs;
  }
  
+ static inline int mlx5_lag_is_lacp_owner(struct mlx5_core_dev *dev)
+ {
+       /* LACP owner conditions:
+        * 1) Function is physical.
+        * 2) LAG is supported by FW.
+        * 3) LAG is managed by driver (currently the only option).
+        */
+       return  MLX5_CAP_GEN(dev, vport_group_manager) &&
+                  (MLX5_CAP_GEN(dev, num_lag_ports) > 1) &&
+                   MLX5_CAP_GEN(dev, lag_master);
+ }
 +static inline u16 mlx5_core_max_ec_vfs(const struct mlx5_core_dev *dev)
 +{
 +      return dev->priv.sriov.max_ec_vfs;
 +}
 +
  static inline int mlx5_get_gid_table_len(u16 param)
  {
        if (param > 4) {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -382,16 -378,16 +382,16 @@@ static int nf_flow_offload_forward(stru
  
        if (!nf_flow_dst_check(&tuplehash->tuple)) {
                flow_offload_teardown(flow);
 -              return NF_ACCEPT;
 +              return 0;
        }
  
 -      if (skb_try_make_writable(skb, thoff + hdrsize))
 -              return NF_DROP;
 +      if (skb_try_make_writable(skb, thoff + ctx->hdrsize))
 +              return -1;
  
-       flow_offload_refresh(flow_table, flow);
+       flow_offload_refresh(flow_table, flow, false);
  
        nf_flow_encap_pop(skb, tuplehash);
 -      thoff -= offset;
 +      thoff -= ctx->offset;
  
        iph = ip_hdr(skb);
        nf_flow_nat_ip(flow, skb, thoff, dir, iph);
@@@ -661,13 -644,13 +661,13 @@@ static int nf_flow_offload_ipv6_forward
  
        if (!nf_flow_dst_check(&tuplehash->tuple)) {
                flow_offload_teardown(flow);
 -              return NF_ACCEPT;
 +              return 0;
        }
  
 -      if (skb_try_make_writable(skb, thoff + hdrsize))
 -              return NF_DROP;
 +      if (skb_try_make_writable(skb, thoff + ctx->hdrsize))
 +              return -1;
  
-       flow_offload_refresh(flow_table, flow);
+       flow_offload_refresh(flow_table, flow, false);
  
        nf_flow_encap_pop(skb, tuplehash);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1265,23 -1360,27 +1355,25 @@@ chk_fclose_nr(
        fi
  
        printf "%-${nr_blank}s %s" " " "ctx"
-       count=$(ip netns exec $ns_tx nstat -as | grep MPTcpExtMPFastcloseTx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       [ "$count" != "$fclose_tx" ] && extra_msg="$extra_msg,tx=$count"
-       if [ "$count" != "$fclose_tx" ]; then
+       count=$(get_counter ${ns_tx} "MPTcpExtMPFastcloseTx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$fclose_tx" ]; then
+               extra_msg="$extra_msg,tx=$count"
                echo "[fail] got $count MP_FASTCLOSE[s] TX expected $fclose_tx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        echo -n " - fclzrx"
-       count=$(ip netns exec $ns_rx nstat -as | grep MPTcpExtMPFastcloseRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       [ "$count" != "$fclose_rx" ] && extra_msg="$extra_msg,rx=$count"
-       if [ "$count" != "$fclose_rx" ]; then
+       count=$(get_counter ${ns_rx} "MPTcpExtMPFastcloseRx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$fclose_rx" ]; then
+               extra_msg="$extra_msg,rx=$count"
                echo "[fail] got $count MP_FASTCLOSE[s] RX expected $fclose_rx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
@@@ -1306,21 -1408,25 +1398,23 @@@ chk_rst_nr(
        fi
  
        printf "%-${nr_blank}s %s" " " "rtx"
-       count=$(ip netns exec $ns_tx nstat -as | grep MPTcpExtMPRstTx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ $count -lt $rst_tx ]; then
+       count=$(get_counter ${ns_tx} "MPTcpExtMPRstTx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ $count -lt $rst_tx ]; then
                echo "[fail] got $count MP_RST[s] TX expected $rst_tx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        echo -n " - rstrx "
-       count=$(ip netns exec $ns_rx nstat -as | grep MPTcpExtMPRstRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" -lt "$rst_rx" ]; then
+       count=$(get_counter ${ns_rx} "MPTcpExtMPRstRx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" -lt "$rst_rx" ]; then
                echo "[fail] got $count MP_RST[s] RX expected $rst_rx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
@@@ -1333,23 -1441,28 +1427,25 @@@ chk_infi_nr(
        local infi_tx=$1
        local infi_rx=$2
        local count
 -      local dump_stats
  
        printf "%-${nr_blank}s %s" " " "itx"
-       count=$(ip netns exec $ns2 nstat -as | grep InfiniteMapTx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$infi_tx" ]; then
+       count=$(get_counter ${ns2} "MPTcpExtInfiniteMapTx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$infi_tx" ]; then
                echo "[fail] got $count infinite map[s] TX expected $infi_tx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        echo -n " - infirx"
-       count=$(ip netns exec $ns1 nstat -as | grep InfiniteMapRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$infi_rx" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtInfiniteMapRx")
+       if [ -z "$count" ]; then
+               echo "[skip]"
+       elif [ "$count" != "$infi_rx" ]; then
                echo "[fail] got $count infinite map[s] RX expected $infi_rx"
                fail_test
 -              dump_stats=1
        else
                echo "[ ok ]"
        fi
@@@ -1375,11 -1491,13 +1471,12 @@@ chk_join_nr(
        fi
  
        printf "%03u %-36s %s" "${TEST_COUNT}" "${title}" "syn"
-       count=$(ip netns exec $ns1 nstat -as | grep MPTcpExtMPJoinSynRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$syn_nr" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtMPJoinSynRx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$syn_nr" ]; then
                echo "[fail] got $count JOIN[s] syn expected $syn_nr"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
        fi
  
        echo -n " - ack"
-       count=$(ip netns exec $ns1 nstat -as | grep MPTcpExtMPJoinAckRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$ack_nr" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtMPJoinAckRx")
+       if [ -z "$count" ]; then
+               echo "[skip]"
+       elif [ "$count" != "$ack_nr" ]; then
                echo "[fail] got $count JOIN[s] ack expected $ack_nr"
                fail_test
 -              dump_stats=1
        else
                echo "[ ok ]"
        fi
@@@ -1475,35 -1599,40 +1574,37 @@@ chk_add_nr(
        timeout=$(ip netns exec $ns1 sysctl -n net.mptcp.add_addr_timeout)
  
        printf "%-${nr_blank}s %s" " " "add"
-       count=$(ip netns exec $ns2 nstat -as MPTcpExtAddAddr | grep MPTcpExtAddAddr | awk '{print $2}')
-       [ -z "$count" ] && count=0
+       count=$(get_counter ${ns2} "MPTcpExtAddAddr")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
        # if the test configured a short timeout tolerate greater then expected
        # add addrs options, due to retransmissions
-       if [ "$count" != "$add_nr" ] && { [ "$timeout" -gt 1 ] || [ "$count" -lt "$add_nr" ]; }; then
+       elif [ "$count" != "$add_nr" ] && { [ "$timeout" -gt 1 ] || [ "$count" -lt "$add_nr" ]; }; then
                echo "[fail] got $count ADD_ADDR[s] expected $add_nr"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        echo -n " - echo  "
-       count=$(ip netns exec $ns1 nstat -as MPTcpExtEchoAdd | grep MPTcpExtEchoAdd | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$echo_nr" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtEchoAdd")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$echo_nr" ]; then
                echo "[fail] got $count ADD_ADDR echo[s] expected $echo_nr"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        if [ $port_nr -gt 0 ]; then
                echo -n " - pt "
-               count=$(ip netns exec $ns2 nstat -as | grep MPTcpExtPortAdd | awk '{print $2}')
-               [ -z "$count" ] && count=0
-               if [ "$count" != "$port_nr" ]; then
+               count=$(get_counter ${ns2} "MPTcpExtPortAdd")
+               if [ -z "$count" ]; then
+                       echo "[skip]"
+               elif [ "$count" != "$port_nr" ]; then
                        echo "[fail] got $count ADD_ADDR[s] with a port-number expected $port_nr"
                        fail_test
 -                      dump_stats=1
                else
                        echo "[ ok ]"
                fi
@@@ -1661,12 -1767,12 +1762,10 @@@ chk_rm_nr(
                else
                        echo "[fail] got $count RM_SUBFLOW[s] expected in range [$rm_subflow_nr:$((rm_subflow_nr*2))]"
                        fail_test
 -                      dump_stats=1
                fi
-               return
-       fi
-       if [ "$count" != "$rm_subflow_nr" ]; then
+       elif [ "$count" != "$rm_subflow_nr" ]; then
                echo "[fail] got $count RM_SUBFLOW[s] expected $rm_subflow_nr"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
@@@ -1696,23 -1787,28 +1795,25 @@@ chk_prio_nr(
        local mp_prio_nr_tx=$1
        local mp_prio_nr_rx=$2
        local count
 -      local dump_stats
  
        printf "%-${nr_blank}s %s" " " "ptx"
-       count=$(ip netns exec $ns1 nstat -as | grep MPTcpExtMPPrioTx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$mp_prio_nr_tx" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtMPPrioTx")
+       if [ -z "$count" ]; then
+               echo -n "[skip]"
+       elif [ "$count" != "$mp_prio_nr_tx" ]; then
                echo "[fail] got $count MP_PRIO[s] TX expected $mp_prio_nr_tx"
                fail_test
 -              dump_stats=1
        else
                echo -n "[ ok ]"
        fi
  
        echo -n " - prx   "
-       count=$(ip netns exec $ns1 nstat -as | grep MPTcpExtMPPrioRx | awk '{print $2}')
-       [ -z "$count" ] && count=0
-       if [ "$count" != "$mp_prio_nr_rx" ]; then
+       count=$(get_counter ${ns1} "MPTcpExtMPPrioRx")
+       if [ -z "$count" ]; then
+               echo "[skip]"
+       elif [ "$count" != "$mp_prio_nr_rx" ]; then
                echo "[fail] got $count MP_PRIO[s] RX expected $mp_prio_nr_rx"
                fail_test
 -              dump_stats=1
        else
                echo "[ ok ]"
        fi
@@@ -2290,8 -2394,12 +2398,13 @@@ remove_tests(
                pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
                run_tests $ns1 $ns2 10.0.1.1 0 -8 -8 slow
                chk_join_nr 3 3 3
-               chk_rm_tx_nr 0
-               chk_rm_nr 0 3 simult
+               if mptcp_lib_kversion_ge 5.18; then
++                      chk_rm_tx_nr 0
+                       chk_rm_nr 0 3 simult
+               else
+                       chk_rm_nr 3 3
+               fi
        fi
  
        # addresses flush