* [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice)
@ 2023-02-13 18:52 Tony Nguyen
2023-02-13 18:52 ` [PATCH net 1/2] ice: Fix check for weight and priority of a scheduling node Tony Nguyen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tony Nguyen @ 2023-02-13 18:52 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev
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(-)
--
2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] ice: Fix check for weight and priority of a scheduling node
2023-02-13 18:52 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) Tony Nguyen
@ 2023-02-13 18:52 ` Tony Nguyen
2023-02-13 18:52 ` [PATCH net 2/2] ice: fix lost multicast packets in promisc mode Tony Nguyen
2023-02-15 4:50 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2023-02-13 18:52 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Michal Wilczynski, netdev, anthony.l.nguyen, Jesse Brandeburg,
Paul Menzel, Gurucharan G
From: Michal Wilczynski <michal.wilczynski@intel.com>
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.
Fixes: 42c2eb6b1f43 ("ice: Implement devlink-rate API")
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_devlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index 8286e47b4bae..0fae0186bd85 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -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;
}
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] ice: fix lost multicast packets in promisc mode
2023-02-13 18:52 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) Tony Nguyen
2023-02-13 18:52 ` [PATCH net 1/2] ice: Fix check for weight and priority of a scheduling node Tony Nguyen
@ 2023-02-13 18:52 ` Tony Nguyen
2023-02-15 4:50 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2023-02-13 18:52 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Jesse Brandeburg, netdev, anthony.l.nguyen, Rafal Romanowski
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
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")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index b288a01a321a..8ec24f6cf6be 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -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;
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice)
2023-02-13 18:52 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) Tony Nguyen
2023-02-13 18:52 ` [PATCH net 1/2] ice: Fix check for weight and priority of a scheduling node Tony Nguyen
2023-02-13 18:52 ` [PATCH net 2/2] ice: fix lost multicast packets in promisc mode Tony Nguyen
@ 2023-02-15 4:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-15 4:50 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev
Hello:
This series was applied to netdev/net.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-15 4:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 18:52 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) Tony Nguyen
2023-02-13 18:52 ` [PATCH net 1/2] ice: Fix check for weight and priority of a scheduling node Tony Nguyen
2023-02-13 18:52 ` [PATCH net 2/2] ice: fix lost multicast packets in promisc mode Tony Nguyen
2023-02-15 4:50 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2023-02-13 (ice) patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).