Skip to content

Commit d3a3734

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-02-13 (ice) This series contains updates to ice driver only. Michal fixes check of scheduling node weight and priority to be done against desired value, not current value. Jesse adds setting of all multicast when adding promiscuous mode to resolve traffic being lost due to filter settings. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: fix lost multicast packets in promisc mode ice: Fix check for weight and priority of a scheduling node ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 2558b80 + 43fbca0 commit d3a3734

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ static int ice_set_object_tx_priority(struct ice_port_info *pi, struct ice_sched
899899
{
900900
int status;
901901

902-
if (node->tx_priority >= 8) {
902+
if (priority >= 8) {
903903
NL_SET_ERR_MSG_MOD(extack, "Priority should be less than 8");
904904
return -EINVAL;
905905
}
@@ -929,7 +929,7 @@ static int ice_set_object_tx_weight(struct ice_port_info *pi, struct ice_sched_n
929929
{
930930
int status;
931931

932-
if (node->tx_weight > 200 || node->tx_weight < 1) {
932+
if (weight > 200 || weight < 1) {
933933
NL_SET_ERR_MSG_MOD(extack, "Weight must be between 1 and 200");
934934
return -EINVAL;
935935
}

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ static int ice_set_promisc(struct ice_vsi *vsi, u8 promisc_m)
275275
if (status && status != -EEXIST)
276276
return status;
277277

278+
netdev_dbg(vsi->netdev, "set promisc filter bits for VSI %i: 0x%x\n",
279+
vsi->vsi_num, promisc_m);
278280
return 0;
279281
}
280282

@@ -300,6 +302,8 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
300302
promisc_m, 0);
301303
}
302304

305+
netdev_dbg(vsi->netdev, "clear promisc filter bits for VSI %i: 0x%x\n",
306+
vsi->vsi_num, promisc_m);
303307
return status;
304308
}
305309

@@ -414,6 +418,16 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
414418
}
415419
err = 0;
416420
vlan_ops->dis_rx_filtering(vsi);
421+
422+
/* promiscuous mode implies allmulticast so
423+
* that VSIs that are in promiscuous mode are
424+
* subscribed to multicast packets coming to
425+
* the port
426+
*/
427+
err = ice_set_promisc(vsi,
428+
ICE_MCAST_PROMISC_BITS);
429+
if (err)
430+
goto out_promisc;
417431
}
418432
} else {
419433
/* Clear Rx filter to remove traffic from wire */
@@ -430,6 +444,18 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
430444
NETIF_F_HW_VLAN_CTAG_FILTER)
431445
vlan_ops->ena_rx_filtering(vsi);
432446
}
447+
448+
/* disable allmulti here, but only if allmulti is not
449+
* still enabled for the netdev
450+
*/
451+
if (!(vsi->current_netdev_flags & IFF_ALLMULTI)) {
452+
err = ice_clear_promisc(vsi,
453+
ICE_MCAST_PROMISC_BITS);
454+
if (err) {
455+
netdev_err(netdev, "Error %d clearing multicast promiscuous on VSI %i\n",
456+
err, vsi->vsi_num);
457+
}
458+
}
433459
}
434460
}
435461
goto exit;

0 commit comments

Comments
 (0)