Skip to content

Commit 35674e7

Browse files
committed
Merge tag 'net-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from can and ipsec subtrees. Current release - regressions: - sched: fix off by one in htb_activate_prios() - eth: mana: fix accessing freed irq affinity_hint - eth: ice: fix out-of-bounds KASAN warning in virtchnl Current release - new code bugs: - eth: mtk_eth_soc: enable special tag when any MAC uses DSA Previous releases - always broken: - core: fix sk->sk_txrehash default - neigh: make sure used and confirmed times are valid - mptcp: be careful on subflow status propagation on errors - xfrm: prevent potential spectre v1 gadget in xfrm_xlate32_attr() - phylink: move phy_device_free() to correctly release phy device - eth: mlx5: - fix crash unsetting rx-vlan-filter in switchdev mode - fix hang on firmware reset - serialize module cleanup with reload and remove" * tag 'net-6.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (57 commits) selftests: forwarding: lib: quote the sysctl values net: mscc: ocelot: fix all IPv6 getting trapped to CPU when PTP timestamping is used rds: rds_rm_zerocopy_callback() use list_first_entry() net: txgbe: Update support email address selftests: Fix failing VXLAN VNI filtering test selftests: mptcp: stop tests earlier selftests: mptcp: allow more slack for slow test-case mptcp: be careful on subflow status propagation on errors mptcp: fix locking for in-kernel listener creation mptcp: fix locking for setsockopt corner-case mptcp: do not wait for bare sockets' timeout net: ethernet: mtk_eth_soc: fix DSA TX tag hwaccel for switch port 0 nfp: ethtool: fix the bug of setting unsupported port speed txhash: fix sk->sk_txrehash default net: ethernet: mtk_eth_soc: fix wrong parameters order in __xdp_rxq_info_reg() net: ethernet: mtk_eth_soc: enable special tag when any MAC uses DSA net: sched: sch: Fix off by one in htb_activate_prios() igc: Add ndo_tx_timeout support net: mana: Fix accessing freed irq affinity_hint hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC ...
2 parents 0b02818 + 3a08208 commit 35674e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+798
-353
lines changed

Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Contents
1616

1717
Support
1818
=======
19-
If you got any problem, contact Wangxun support team via support@trustnetic.com
19+
If you got any problem, contact Wangxun support team via nic-support@net-swift.com
2020
and Cc: netdev.

drivers/net/bonding/bond_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void bond_debug_reregister(struct bonding *bond)
7676

7777
d = debugfs_rename(bonding_debug_root, bond->debug_dir,
7878
bonding_debug_root, bond->dev->name);
79-
if (d) {
79+
if (!IS_ERR(d)) {
8080
bond->debug_dir = d;
8181
} else {
8282
netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n");

drivers/net/dsa/mt7530.c

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,14 +1309,26 @@ mt7530_port_set_vlan_aware(struct dsa_switch *ds, int port)
13091309
if (!priv->ports[port].pvid)
13101310
mt7530_rmw(priv, MT7530_PVC_P(port), ACC_FRM_MASK,
13111311
MT7530_VLAN_ACC_TAGGED);
1312-
}
13131312

1314-
/* Set the port as a user port which is to be able to recognize VID
1315-
* from incoming packets before fetching entry within the VLAN table.
1316-
*/
1317-
mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK | PVC_EG_TAG_MASK,
1318-
VLAN_ATTR(MT7530_VLAN_USER) |
1319-
PVC_EG_TAG(MT7530_VLAN_EG_DISABLED));
1313+
/* Set the port as a user port which is to be able to recognize
1314+
* VID from incoming packets before fetching entry within the
1315+
* VLAN table.
1316+
*/
1317+
mt7530_rmw(priv, MT7530_PVC_P(port),
1318+
VLAN_ATTR_MASK | PVC_EG_TAG_MASK,
1319+
VLAN_ATTR(MT7530_VLAN_USER) |
1320+
PVC_EG_TAG(MT7530_VLAN_EG_DISABLED));
1321+
} else {
1322+
/* Also set CPU ports to the "user" VLAN port attribute, to
1323+
* allow VLAN classification, but keep the EG_TAG attribute as
1324+
* "consistent" (i.o.w. don't change its value) for packets
1325+
* received by the switch from the CPU, so that tagged packets
1326+
* are forwarded to user ports as tagged, and untagged as
1327+
* untagged.
1328+
*/
1329+
mt7530_rmw(priv, MT7530_PVC_P(port), VLAN_ATTR_MASK,
1330+
VLAN_ATTR(MT7530_VLAN_USER));
1331+
}
13201332
}
13211333

13221334
static void

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4627,25 +4627,26 @@ static int init_reset_optional(struct platform_device *pdev)
46274627
if (ret)
46284628
return dev_err_probe(&pdev->dev, ret,
46294629
"failed to init SGMII PHY\n");
4630-
}
46314630

4632-
ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);
4633-
if (!ret) {
4634-
u32 pm_info[2];
4631+
ret = zynqmp_pm_is_function_supported(PM_IOCTL, IOCTL_SET_GEM_CONFIG);
4632+
if (!ret) {
4633+
u32 pm_info[2];
4634+
4635+
ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",
4636+
pm_info, ARRAY_SIZE(pm_info));
4637+
if (ret) {
4638+
dev_err(&pdev->dev, "Failed to read power management information\n");
4639+
goto err_out_phy_exit;
4640+
}
4641+
ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);
4642+
if (ret)
4643+
goto err_out_phy_exit;
46354644

4636-
ret = of_property_read_u32_array(pdev->dev.of_node, "power-domains",
4637-
pm_info, ARRAY_SIZE(pm_info));
4638-
if (ret) {
4639-
dev_err(&pdev->dev, "Failed to read power management information\n");
4640-
goto err_out_phy_exit;
4645+
ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);
4646+
if (ret)
4647+
goto err_out_phy_exit;
46414648
}
4642-
ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_FIXED, 0);
4643-
if (ret)
4644-
goto err_out_phy_exit;
46454649

4646-
ret = zynqmp_pm_set_gem_config(pm_info[1], GEM_CONFIG_SGMII_MODE, 1);
4647-
if (ret)
4648-
goto err_out_phy_exit;
46494650
}
46504651

46514652
/* Fully reset controller at hardware level if mapped in device tree */

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,7 +5524,7 @@ bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw)
55245524
* returned by the firmware is a 16 bit * value, but is indexed
55255525
* by [fls(speed) - 1]
55265526
*/
5527-
static const u32 ice_aq_to_link_speed[15] = {
5527+
static const u32 ice_aq_to_link_speed[] = {
55285528
SPEED_10, /* BIT(0) */
55295529
SPEED_100,
55305530
SPEED_1000,
@@ -5536,10 +5536,6 @@ static const u32 ice_aq_to_link_speed[15] = {
55365536
SPEED_40000,
55375537
SPEED_50000,
55385538
SPEED_100000, /* BIT(10) */
5539-
0,
5540-
0,
5541-
0,
5542-
0 /* BIT(14) */
55435539
};
55445540

55455541
/**
@@ -5550,5 +5546,8 @@ static const u32 ice_aq_to_link_speed[15] = {
55505546
*/
55515547
u32 ice_get_link_speed(u16 index)
55525548
{
5549+
if (index >= ARRAY_SIZE(ice_aq_to_link_speed))
5550+
return 0;
5551+
55535552
return ice_aq_to_link_speed[index];
55545553
}

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5541,7 +5541,7 @@ static int __init ice_module_init(void)
55415541
pr_info("%s\n", ice_driver_string);
55425542
pr_info("%s\n", ice_copyright);
55435543

5544-
ice_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, KBUILD_MODNAME);
5544+
ice_wq = alloc_workqueue("%s", 0, 0, KBUILD_MODNAME);
55455545
if (!ice_wq) {
55465546
pr_err("Failed to create workqueue\n");
55475547
return -ENOMEM;

drivers/net/ethernet/intel/ice/ice_switch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5420,7 +5420,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
54205420
*/
54215421
status = ice_add_special_words(rinfo, lkup_exts, ice_is_dvm_ena(hw));
54225422
if (status)
5423-
goto err_free_lkup_exts;
5423+
goto err_unroll;
54245424

54255425
/* Group match words into recipes using preferred recipe grouping
54265426
* criteria.

drivers/net/ethernet/intel/ice/ice_tc_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ ice_tc_forward_to_queue(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr,
16811681
struct ice_vsi *ch_vsi = NULL;
16821682
u16 queue = act->rx_queue;
16831683

1684-
if (queue > vsi->num_rxq) {
1684+
if (queue >= vsi->num_rxq) {
16851685
NL_SET_ERR_MSG_MOD(fltr->extack,
16861686
"Unable to add filter because specified queue is invalid");
16871687
return -EINVAL;

drivers/net/ethernet/intel/ice/ice_vf_mbx.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
3939
return ice_sq_send_cmd(hw, &hw->mailboxq, &desc, msg, msglen, cd);
4040
}
4141

42-
static const u32 ice_legacy_aq_to_vc_speed[15] = {
42+
static const u32 ice_legacy_aq_to_vc_speed[] = {
4343
VIRTCHNL_LINK_SPEED_100MB, /* BIT(0) */
4444
VIRTCHNL_LINK_SPEED_100MB,
4545
VIRTCHNL_LINK_SPEED_1GB,
@@ -51,10 +51,6 @@ static const u32 ice_legacy_aq_to_vc_speed[15] = {
5151
VIRTCHNL_LINK_SPEED_40GB,
5252
VIRTCHNL_LINK_SPEED_40GB,
5353
VIRTCHNL_LINK_SPEED_40GB,
54-
VIRTCHNL_LINK_SPEED_UNKNOWN,
55-
VIRTCHNL_LINK_SPEED_UNKNOWN,
56-
VIRTCHNL_LINK_SPEED_UNKNOWN,
57-
VIRTCHNL_LINK_SPEED_UNKNOWN /* BIT(14) */
5854
};
5955

6056
/**
@@ -71,21 +67,20 @@ static const u32 ice_legacy_aq_to_vc_speed[15] = {
7167
*/
7268
u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed)
7369
{
74-
u32 speed;
70+
/* convert a BIT() value into an array index */
71+
u32 index = fls(link_speed) - 1;
7572

76-
if (adv_link_support) {
77-
/* convert a BIT() value into an array index */
78-
speed = ice_get_link_speed(fls(link_speed) - 1);
79-
} else {
73+
if (adv_link_support)
74+
return ice_get_link_speed(index);
75+
else if (index < ARRAY_SIZE(ice_legacy_aq_to_vc_speed))
8076
/* Virtchnl speeds are not defined for every speed supported in
8177
* the hardware. To maintain compatibility with older AVF
8278
* drivers, while reporting the speed the new speed values are
8379
* resolved to the closest known virtchnl speeds
8480
*/
85-
speed = ice_legacy_aq_to_vc_speed[fls(link_speed) - 1];
86-
}
81+
return ice_legacy_aq_to_vc_speed[index];
8782

88-
return speed;
83+
return VIRTCHNL_LINK_SPEED_UNKNOWN;
8984
}
9085

9186
/* The mailbox overflow detection algorithm helps to check if there

drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi)
4444

4545
/* outer VLAN ops regardless of port VLAN config */
4646
vlan_ops->add_vlan = ice_vsi_add_vlan;
47-
vlan_ops->dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering;
4847
vlan_ops->ena_tx_filtering = ice_vsi_ena_tx_vlan_filtering;
4948
vlan_ops->dis_tx_filtering = ice_vsi_dis_tx_vlan_filtering;
5049

5150
if (ice_vf_is_port_vlan_ena(vf)) {
5251
/* setup outer VLAN ops */
5352
vlan_ops->set_port_vlan = ice_vsi_set_outer_port_vlan;
53+
/* all Rx traffic should be in the domain of the
54+
* assigned port VLAN, so prevent disabling Rx VLAN
55+
* filtering
56+
*/
57+
vlan_ops->dis_rx_filtering = noop_vlan;
5458
vlan_ops->ena_rx_filtering =
5559
ice_vsi_ena_rx_vlan_filtering;
5660

@@ -63,6 +67,9 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi)
6367
vlan_ops->ena_insertion = ice_vsi_ena_inner_insertion;
6468
vlan_ops->dis_insertion = ice_vsi_dis_inner_insertion;
6569
} else {
70+
vlan_ops->dis_rx_filtering =
71+
ice_vsi_dis_rx_vlan_filtering;
72+
6673
if (!test_bit(ICE_FLAG_VF_VLAN_PRUNING, pf->flags))
6774
vlan_ops->ena_rx_filtering = noop_vlan;
6875
else
@@ -96,7 +103,14 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi)
96103
vlan_ops->set_port_vlan = ice_vsi_set_inner_port_vlan;
97104
vlan_ops->ena_rx_filtering =
98105
ice_vsi_ena_rx_vlan_filtering;
106+
/* all Rx traffic should be in the domain of the
107+
* assigned port VLAN, so prevent disabling Rx VLAN
108+
* filtering
109+
*/
110+
vlan_ops->dis_rx_filtering = noop_vlan;
99111
} else {
112+
vlan_ops->dis_rx_filtering =
113+
ice_vsi_dis_rx_vlan_filtering;
100114
if (!test_bit(ICE_FLAG_VF_VLAN_PRUNING, pf->flags))
101115
vlan_ops->ena_rx_filtering = noop_vlan;
102116
else

0 commit comments

Comments
 (0)