Skip to contentSkip to conversation

Intel Wired LAN Driver Updates 2023-02-13 (ice)

GIT PULL New Tony Nguyen 2 participants 4 messages Feb 13, 2023 – Feb 15, 2023

Subsystems (3)
lore
Share & tools
lore

Tony Nguyen

author maintainer
#0 lore raw

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.

The following are changes since commit 2038cc592811209de20c4e094ca08bfb1e6fbc6c:
bnxt_en: Fix mqprio and XDP ring checking logic
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE

Jesse Brandeburg (1):
ice: fix lost multicast packets in promisc mode

Michal Wilczynski (1):
ice: Fix check for weight and priority of a scheduling node

 drivers/net/ethernet/intel/ice/ice_devlink.c |  4 +--
 drivers/net/ethernet/intel/ice/ice_main.c    | 26 ++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.1
author maintainer
#1 lore raw

PATCH 1/2 ice: Fix check for weight and priority of a scheduling node

From: Michal Wilczynski <[email protected]>

Currently checks for weight and priority ranges don't check incoming value from the devlink. Instead it checks node current weight or priority. This makes those checks useless.

Change range checks in ice_set_object_tx_priority() and ice_set_object_tx_weight() to check against incoming priority an weight.

---
 drivers/net/ethernet/intel/ice/ice_devlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_devlink.c +2 -2
index 8286e47b4bae..0fae0186bd85 100644
@@ -899,7 +899,7 @@ static int ice_set_object_tx_priority(struct ice_port_info *pi, struct ice_sched
 {
 	int status;
 
-	if (node->tx_priority >= 8) {
+	if (priority >= 8) {
 		NL_SET_ERR_MSG_MOD(extack, "Priority should be less than 8");
 		return -EINVAL;
 	}
@@ -929,7 +929,7 @@ static int ice_set_object_tx_weight(struct ice_port_info *pi, struct ice_sched_n
 {
 	int status;
 
-	if (node->tx_weight > 200 || node->tx_weight < 1) {
+	if (weight > 200 || weight < 1) {
 		NL_SET_ERR_MSG_MOD(extack, "Weight must be between 1 and 200");
 		return -EINVAL;
 	}
Signature · 1 line
2.38.1
author maintainer
#2 lore raw

PATCH 2/2 ice: fix lost multicast packets in promisc mode

In reply to Tony Nguyen

From: Jesse Brandeburg <[email protected]>

There was a problem reported to us where the addition of a VF with an IPv6 address ending with a particular sequence would cause the parent device on the PF to no longer be able to respond to neighbor discovery packets.

In this case, we had an ovs-bridge device living on top of a VLAN, which was on top of a PF, and it would not be able to talk anymore (the neighbor entry would expire and couldn't be restored).

The root cause of the issue is that if the PF is asked to be in IFF_PROMISC mode (promiscuous mode) and it had an ipv6 address that needed the 33:33:ff:00:00:04 multicast address to work, then when the VF was added with the need for the same multicast address, the VF would steal all the traffic destined for that address.

The ice driver didn't auto-subscribe a request of IFF_PROMISC to the "multicast replication from other port's traffic" meaning that it won't get for instance, packets with an exact destination in the VF, as above.

The VF's IPv6 address, which adds a "perfect filter" for 33:33:ff:00:00:04, results in no packets for that multicast address making it to the PF (which is in promisc but NOT "multicast replication").

The fix is to enable "multicast promiscuous" whenever the driver is asked to enable IFF_PROMISC, and make sure to disable it when appropriate.

Fixes e94d44786693 ("ice: Implement filter sync, NDO operations and bump version")
---
 drivers/net/ethernet/intel/ice/ice_main.c | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
drivers/net/ethernet/intel/ice/ice_main.c +26 -0
index b288a01a321a..8ec24f6cf6be 100644
@@ -275,6 +275,8 @@ static int ice_set_promisc(struct ice_vsi *vsi, u8 promisc_m)
 	if (status && status != -EEXIST)
 		return status;
 
+	netdev_dbg(vsi->netdev, "set promisc filter bits for VSI %i: 0x%x\n",
+		   vsi->vsi_num, promisc_m);
 	return 0;
 }
 
@@ -300,6 +302,8 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
 						    promisc_m, 0);
 	}
 
+	netdev_dbg(vsi->netdev, "clear promisc filter bits for VSI %i: 0x%x\n",
+		   vsi->vsi_num, promisc_m);
 	return status;
 }
 
@@ -414,6 +418,16 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
 				}
 				err = 0;
 				vlan_ops->dis_rx_filtering(vsi);
+
+				/* promiscuous mode implies allmulticast so
+				 * that VSIs that are in promiscuous mode are
+				 * subscribed to multicast packets coming to
+				 * the port
+				 */
+				err = ice_set_promisc(vsi,
+						      ICE_MCAST_PROMISC_BITS);
+				if (err)
+					goto out_promisc;
 			}
 		} else {
 			/* Clear Rx filter to remove traffic from wire */
@@ -430,6 +444,18 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
 				    NETIF_F_HW_VLAN_CTAG_FILTER)
 					vlan_ops->ena_rx_filtering(vsi);
 			}
+
+			/* disable allmulti here, but only if allmulti is not
+			 * still enabled for the netdev
+			 */
+			if (!(vsi->current_netdev_flags & IFF_ALLMULTI)) {
+				err = ice_clear_promisc(vsi,
+							ICE_MCAST_PROMISC_BITS);
+				if (err) {
+					netdev_err(netdev, "Error %d clearing multicast promiscuous on VSI %i\n",
+						   err, vsi->vsi_num);
+				}
+			}
 		}
 	}
 	goto exit;
Signature · 1 line
2.38.1
#3 lore raw
In reply to Tony Nguyen
This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:

Hello:

This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:

Quoted 9 lines · On Mon, 13 Feb 2023 10:52:57 -0800 you wrote:

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.

[...]

Here is the summary with links:
- [net,1/2] ice: Fix check for weight and priority of a scheduling node

    https://git.kernel.org/netdev/net/c/3e6dc119a37b
  - [net,2/2] ice: fix lost multicast packets in promisc mode
    https://git.kernel.org/netdev/net/c/43fbca02c2dd

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html