* [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice)
@ 2026-11-13 23:12 Tony Nguyen
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
` (6 more replies)
0 siblings, 7 replies; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Tony Nguyen, michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel
Michal Swiatkowski fixes TC to-queue offload for non-PF0 by switching to
use of global queue indexes.
Petr Oros resolves a couple of promiscuous uplink default VSI Rx rule
issues; avoiding redundant per-VLAN rules and preserving the uplink's
default Rx rule. He also fixes an off-by-one read issue for devlink NVM
read.
Dave Ertman corrects LLDP filter handling by preferring the newer command
when supported and falling back to the legacy command otherwise.
Pengpeng Hou fixes ETH56G deskew checks by propagating register read
failures and poll timeouts which were previously treated as success.
The following are changes since commit ead6fa9a0ab194f02a2f36d634b193e9c5f9a1c6:
Merge branch 'bnxt_en-fix-pm-resume-on-vfs'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE
Dave Ertman (1):
ice: Fix incorrect LLDP filter assumptions
Michal Swiatkowski (1):
ice: use global queue index in TC to-queue offload
Pengpeng Hou (1):
ice: propagate ETH56G deskew poll failures
Petr Oros (3):
ice: skip per-VLAN promisc rules when default VSI Rx rule is set
ice: preserve uplink DFLT Rx rule on switchdev release
ice: allow reading the last byte of the NVM and Shadow RAM regions
.../net/ethernet/intel/ice/devlink/devlink.c | 2 +-
drivers/net/ethernet/intel/ice/ice.h | 1 -
drivers/net/ethernet/intel/ice/ice_eswitch.c | 18 ++-
drivers/net/ethernet/intel/ice/ice_lib.c | 18 +--
drivers/net/ethernet/intel/ice/ice_main.c | 109 ++++++++++++++----
drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 42 ++++---
drivers/net/ethernet/intel/ice/ice_tc_lib.c | 3 +-
7 files changed, 138 insertions(+), 55 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net 1/6] ice: use global queue index in TC to-queue offload
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set Tony Nguyen
` (5 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Michal Swiatkowski, anthony.l.nguyen, poros, david.m.ertman,
pengpeng, przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
Aleksandr Loktionov, Simon Horman, Alexander Nowlin
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Previously index within PF was used, which caused rules to fail on any PF
other than PF0. Switch to global queue index by adding first RX queue id
from caps.
Triggered during code development. Validated on HW by adding different
set of to queue rules on various PFs
Fixes: 143b86f346c7 ("ice: Enable RX queue selection using skbedit action")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_tc_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
index d20357c04127..6f49ecb4165b 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
@@ -1202,7 +1202,8 @@ ice_add_tc_flower_adv_fltr(struct ice_vsi *vsi,
break;
case ICE_FWD_TO_Q:
/* HW queue number in global space */
- rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue;
+ rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue +
+ hw->func_caps.common_cap.rxq_first_id;
rule_info.sw_act.vsi_handle = dest_vsi->idx;
rule_info.priority = ICE_SWITCH_FLTR_PRIO_QUEUE;
rule_info.sw_act.src = hw->pf_id;
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release Tony Nguyen
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Petr Oros, anthony.l.nguyen, michal.swiatkowski, david.m.ertman,
pengpeng, przemyslaw.kitszel, horms, ivecera, jacob.e.keller,
Marcin Szycik, Rinitha S
From: Petr Oros <poros@redhat.com>
When an ice port in a vlan-filtering bridge goes promiscuous (typical for
bond slaves), the driver installs a per-VLAN ICE_SW_LKUP_PROMISC_VLAN rule
for every VID on top of the broad ICE_SW_LKUP_DFLT VSI Rx rule. Each rule
consumes one of the ~32K Flow Lookup Unit (FLU) entries the device shares
across PFs, so a wide trunk (vid 2-4094) over several PFs overruns the
pool: firmware rejects further Add Switch Rules with ENOSPC (AQ 0x10) and
the DFLT Rx rule itself fails to install:
ice 0000:5c:00.1: Failed to set VSI 14 as the default forwarding
VSI, error -5
ice 0000:5c:00.1 ens1f1: Error -5 setting default VSI 14 Rx rule
Once a switch context is overrun the retries can also come back as ENOENT
(AQ 0x2), which has misled triage toward a perceived recipe binding defect
rather than a capacity issue.
The DFLT rule already catches every packet on the port regardless of VLAN
tag, so the per-VLAN promisc expansion is redundant while it is installed.
Skip it at the two sites that drive it, ice_set_promisc() and
ice_vlan_rx_add_vid(), keyed on ice_is_vsi_dflt_vsi() rather than the
netdev IFF_PROMISC flag so a failed or LAG-suppressed DFLT install still
falls back to the per-VLAN rules.
IFF_ALLMULTI and IFF_PROMISC can reach ice_vsi_sync_fltr() in separate
passes (a bridge join sets them through separate calls), so the allmulti
pass may expand the per-VID rules before the DFLT rule exists. Drop those
now-redundant rules right after ice_set_dflt_vsi() installs the DFLT rule;
ice_vsi_exit_dflt_promisc() reinstates them when promisc is cleared.
ice_vsi_sync_fltr() subscribed multicast promiscuity only inside the
"default VSI not yet in use" branch, so a promiscuous VSI that finds the
default VSI rule already present (owned by another VSI, or preserved
across a switchdev session) ended up in unicast promisc with no multicast
subscription. Issue ice_set_promisc(ICE_MCAST_PROMISC_BITS) whenever the
netdev is promiscuous; it is idempotent and returns 0 if the rule is
already present.
Fixes: 1273f89578f2 ("ice: Fix broken IFF_ALLMULTI handling")
Signed-off-by: Petr Oros <poros@redhat.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 109 +++++++++++++++++-----
1 file changed, 88 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 47c6798c97e8..ecd05f5050ff 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -274,7 +274,8 @@ static int ice_set_promisc(struct ice_vsi *vsi, u8 promisc_m)
if (vsi->type != ICE_VSI_PF)
return 0;
- if (ice_vsi_has_non_zero_vlans(vsi)) {
+ /* skip per-VID expansion; the DFLT Rx rule already covers every VID */
+ if (ice_vsi_has_non_zero_vlans(vsi) && !ice_is_vsi_dflt_vsi(vsi)) {
promisc_m |= (ICE_PROMISC_VLAN_RX | ICE_PROMISC_VLAN_TX);
status = ice_fltr_set_vlan_vsi_promisc(&vsi->back->hw, vsi,
promisc_m);
@@ -304,9 +305,20 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
return 0;
if (ice_vsi_has_non_zero_vlans(vsi)) {
- promisc_m |= (ICE_PROMISC_VLAN_RX | ICE_PROMISC_VLAN_TX);
+ u8 vlan_promisc_m = promisc_m | ICE_PROMISC_VLAN_RX |
+ ICE_PROMISC_VLAN_TX;
+ int vid0_status;
+
+ /* the vid=0 rule may be in either recipe (the recipe used to
+ * set it is not recorded), so clear both; clearing an absent
+ * rule returns 0
+ */
status = ice_fltr_clear_vlan_vsi_promisc(&vsi->back->hw, vsi,
- promisc_m);
+ vlan_promisc_m);
+ vid0_status = ice_fltr_clear_vsi_promisc(&vsi->back->hw,
+ vsi->idx, promisc_m, 0);
+ if (!status)
+ status = vid0_status;
} else {
status = ice_fltr_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
promisc_m, 0);
@@ -317,6 +329,61 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
return status;
}
+/**
+ * ice_vsi_exit_dflt_promisc - drop the default VSI Rx rule on promisc off
+ * @vsi: the VSI leaving promiscuous mode
+ *
+ * For an IFF_ALLMULTI VSI with VLANs the per-VID multicast rules are
+ * reinstated before the default rule is cleared so coverage never lapses;
+ * the then redundant vid=0 rule is dropped best-effort. The callees log
+ * their own failures, so error returns are not re-logged here.
+ *
+ * Return: 0 on success, negative on error with the default rule left in place.
+ */
+static int ice_vsi_exit_dflt_promisc(struct ice_vsi *vsi)
+{
+ struct ice_vsi_vlan_ops *vlan_ops = ice_get_compat_vsi_vlan_ops(vsi);
+ struct net_device *netdev = vsi->netdev;
+ struct ice_hw *hw = &vsi->back->hw;
+ bool restore_mc;
+ int err;
+
+ restore_mc = (vsi->current_netdev_flags & IFF_ALLMULTI) &&
+ ice_vsi_has_non_zero_vlans(vsi);
+
+ if (restore_mc) {
+ err = ice_fltr_set_vlan_vsi_promisc(hw, vsi,
+ ICE_MCAST_VLAN_PROMISC_BITS);
+ if (err && err != -EEXIST)
+ return err;
+ }
+
+ err = ice_clear_dflt_vsi(vsi);
+ if (err)
+ return err;
+
+ if (netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
+ vlan_ops->ena_rx_filtering(vsi);
+
+ if (restore_mc)
+ ice_fltr_clear_vsi_promisc(hw, vsi->idx, ICE_MCAST_PROMISC_BITS,
+ 0);
+
+ return 0;
+}
+
+/* Drop the per-VID multicast promisc rules made redundant by the default
+ * VSI Rx rule; best-effort, a leftover is harmless while that rule stands.
+ */
+static void ice_vsi_clear_vlan_mc_promisc(struct ice_vsi *vsi)
+{
+ if (!ice_vsi_has_non_zero_vlans(vsi))
+ return;
+
+ ice_fltr_clear_vlan_vsi_promisc(&vsi->back->hw, vsi,
+ ICE_MCAST_VLAN_PROMISC_BITS);
+}
+
/**
* ice_vsi_sync_fltr - Update the VSI filter list to the HW
* @vsi: ptr to the VSI
@@ -429,30 +496,31 @@ 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
+ /* a prior allmulti pass may have added per-VID
+ * rules now covered by the DFLT rule
*/
- err = ice_set_promisc(vsi,
- ICE_MCAST_PROMISC_BITS);
- if (err)
- goto out_promisc;
+ ice_vsi_clear_vlan_mc_promisc(vsi);
}
+
+ /* Promiscuous mode implies allmulticast. Subscribe
+ * the VSI to all multicast even when the default VSI
+ * rule is already in use and the block above is
+ * skipped (it may be owned by another VSI, or
+ * preserved across a switchdev session); the unicast
+ * catch-all does not cover the multicast subscription.
+ */
+ err = ice_set_promisc(vsi, ICE_MCAST_PROMISC_BITS);
+ if (err)
+ goto out_promisc;
} else {
/* Clear Rx filter to remove traffic from wire */
if (ice_is_vsi_dflt_vsi(vsi)) {
- err = ice_clear_dflt_vsi(vsi);
+ err = ice_vsi_exit_dflt_promisc(vsi);
if (err) {
- netdev_err(netdev, "Error %d clearing default VSI %i Rx rule\n",
- err, vsi->vsi_num);
vsi->current_netdev_flags |=
IFF_PROMISC;
goto out_promisc;
}
- if (vsi->netdev->features &
- NETIF_F_HW_VLAN_CTAG_FILTER)
- vlan_ops->ena_rx_filtering(vsi);
}
/* disable allmulti here, but only if allmulti is not
@@ -3675,10 +3743,9 @@ int ice_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
while (test_and_set_bit(ICE_CFG_BUSY, vsi->state))
usleep_range(1000, 2000);
- /* Add multicast promisc rule for the VLAN ID to be added if
- * all-multicast is currently enabled.
- */
- if (vsi->current_netdev_flags & IFF_ALLMULTI) {
+ /* skip the per-VID rule when the DFLT Rx rule already covers this VID */
+ if ((vsi->current_netdev_flags & IFF_ALLMULTI) &&
+ !ice_is_vsi_dflt_vsi(vsi)) {
ret = ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx,
ICE_MCAST_VLAN_PROMISC_BITS,
vid);
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
2026-11-13 23:12 ` [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions Tony Nguyen
` (3 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Petr Oros, anthony.l.nguyen, michal.swiatkowski, david.m.ertman,
pengpeng, przemyslaw.kitszel, horms, ivecera, jacob.e.keller,
Marcin Szycik, Aleksandr Loktionov, Patryk Holda
From: Petr Oros <poros@redhat.com>
When the uplink PF is promiscuous, ice_vsi_sync_fltr() installs an
ICE_SW_LKUP_DFLT catch-all Rx rule on the uplink VSI. Entering switchdev
re-affirms it through the idempotent ice_set_dflt_vsi(), but
ice_eswitch_release_env() removed both the Rx and Tx DFLT rules
unconditionally on teardown. That clobbered a promisc-owned Rx rule: it
disappeared while IFF_PROMISC was still set and the sync path was not
retriggered, leaving the uplink without the catch-all the netdev
requested.
Skip the Rx DFLT removal when the uplink is promiscuous, both in
ice_eswitch_release_env() and the err_def_tx unwind of
ice_eswitch_setup_env(); the Tx leg, owned by switchdev, is still removed.
Test the live netdev->flags, the same value ena_rx_filtering() ->
ice_cfg_vlan_pruning() above already keys on, so the preserved rule and
the pruning state stay consistent, including for a promisc change made
while switchdev ran (which never reached the gated filter sync).
Fixes: 5c07be96d8b3 ("ice: Avoid setting default Rx VSI twice in switchdev setup")
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Petr Oros <poros@redhat.com>
Tested-by: Patryk Holda <patryk.holda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_eswitch.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index 6e7bba473898..c32d6b201369 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -66,8 +66,10 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
ICE_FLTR_TX);
err_def_tx:
- ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
- ICE_FLTR_RX);
+ /* keep the Rx DFLT rule if the uplink is promiscuous (see release_env) */
+ if (!(uplink_vsi->netdev->flags & IFF_PROMISC))
+ ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx,
+ false, ICE_FLTR_RX);
err_def_rx:
ice_vsi_del_vlan_zero(uplink_vsi);
err_vlan_zero:
@@ -276,8 +278,16 @@ static void ice_eswitch_release_env(struct ice_pf *pf)
vlan_ops->ena_rx_filtering(uplink_vsi);
ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
ICE_FLTR_TX);
- ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
- ICE_FLTR_RX);
+
+ /* Keep the Rx DFLT rule if the uplink is promiscuous; it must outlive
+ * the session. Test the live netdev->flags, the same value
+ * ena_rx_filtering() -> ice_cfg_vlan_pruning() above keys its decision
+ * on, so the preserved DFLT rule and the pruning state stay consistent.
+ */
+ if (!(uplink_vsi->netdev->flags & IFF_PROMISC))
+ ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx,
+ false, ICE_FLTR_RX);
+
ice_fltr_add_mac_and_broadcast(uplink_vsi,
uplink_vsi->port_info->mac.perm_addr,
ICE_FWD_TO_VSI);
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
` (2 preceding siblings ...)
2026-11-13 23:12 ` [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 5/6] ice: propagate ETH56G deskew poll failures Tony Nguyen
` (2 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Dave Ertman, anthony.l.nguyen, michal.swiatkowski, poros,
pengpeng, przemyslaw.kitszel, larysa.zaremba, horms,
Aleksandr Loktionov, Arpana Arland
From: Dave Ertman <david.m.ertman@intel.com>
In commit 4d5a1c4e6d49 ("ice: do not add LLDP-specific filter if not
necessary"), it was assumed that llpd_fltr_ctrl was a unique application
of a filter instance and the other command in the flow was generic.
This is an incorrect assumption, they are both meant to add a filter to
handle LLDP packets and only varied in the actual AQ call made. The
newer AQ call was created to handle a special case in some NVM images
where a LLDP filter was already existent and the old AQ command would
generate an error if a new filter was attempted to be added. The newer
AQ command would detect this case and instead would add the current
target to the existing filter rule.
Fix the flow so that the newer command is always used if available and
only fall back to the older command when that is the only solution.
Also remove the obsolete state flag from the PF struct.
Fixes: 4d5a1c4e6d49 ("ice: do not add LLDP-specific filter if not necessary")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice.h | 1 -
drivers/net/ethernet/intel/ice/ice_lib.c | 18 +++++-------------
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 432da05c48c0..dded9f7c173e 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -525,7 +525,6 @@ enum ice_pf_flags {
ICE_FLAG_MTU_CHANGED,
ICE_FLAG_GNSS, /* GNSS successfully initialized */
ICE_FLAG_DPLL, /* SyncE/PTP dplls initialized */
- ICE_FLAG_LLDP_AQ_FLTR,
ICE_PF_FLAGS_NBITS /* must be last */
};
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 977cd8dd6e31..2836f7d8a475 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2179,24 +2179,16 @@ void ice_vsi_cfg_sw_lldp(struct ice_vsi *vsi, bool tx, bool create)
status = eth_fltr(vsi, ETH_P_LLDP, ICE_FLTR_TX,
ICE_DROP_PACKET);
} else {
- if (!test_bit(ICE_FLAG_LLDP_AQ_FLTR, pf->flags)) {
+ status = ice_lldp_fltr_add_remove(&pf->hw, vsi, create);
+ if (status == -EOPNOTSUPP) {
+ /* If fltr_ctrl not supported, use legacy
+ * add/remove command
+ */
status = eth_fltr(vsi, ETH_P_LLDP, ICE_FLTR_RX,
ICE_FWD_TO_VSI);
- if (!status || !create)
- goto report;
-
- dev_info(dev,
- "Failed to add generic LLDP Rx filter on VSI %i error: %d, falling back to specialized AQ control\n",
- vsi->vsi_num, status);
}
-
- status = ice_lldp_fltr_add_remove(&pf->hw, vsi, create);
- if (!status)
- set_bit(ICE_FLAG_LLDP_AQ_FLTR, pf->flags);
-
}
-report:
if (status)
dev_warn(dev, "Failed to %s %s LLDP rule on VSI %i error: %d\n",
create ? "add" : "remove", tx ? "Tx" : "Rx",
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net 5/6] ice: propagate ETH56G deskew poll failures
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
` (3 preceding siblings ...)
2026-11-13 23:12 ` [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 6/6] ice: allow reading the last byte of the NVM and Shadow RAM regions Tony Nguyen
2026-11-13 23:18 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) netdev-bot+sinfo
6 siblings, 1 reply; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Pengpeng Hou, anthony.l.nguyen, michal.swiatkowski, poros,
david.m.ertman, przemyslaw.kitszel, jedrzej.jagielski,
arkadiusz.kubalewski, horms, jacob.e.keller, richardcochran,
Alexander Nowlin
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
ice_ptp_calc_deskew_eth56g() ignores the return value of
read_poll_timeout(). If register reads succeed but the DESKEW valid bit
never appears, the timeout is treated as success. If a register read fails,
the poll condition can also inspect deskew_i before a successful read and
continue polling instead of stopping on the hard error. The function then
returns an int error through its u32 deskew return type.
Return the deskew value through an output parameter. Stop polling when
either the read fails or the valid bit appears, then propagate the register
error or the poll timeout separately before calculating and applying the
deskew value.
Fixes: 7cab44f1c35f ("ice: Introduce ETH56G PHY model for E825C products")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 42 ++++++++++++++-------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
index 3a41c711e751..da48d3adf94f 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
@@ -1736,24 +1736,30 @@ static u32 ice_ptp_calc_bitslip_eth56g(struct ice_hw *hw, u8 port, u32 bs,
* @ds: deskew multiplier
* @rs: RS-FEC enabled
* @spd: link speed
+ * @deskew: output parameter for the calculated deskew value
*
- * Return: calculated deskew value
+ * Return: 0 on success, negative error code otherwise
*/
-static u32 ice_ptp_calc_deskew_eth56g(struct ice_hw *hw, u8 port, u32 ds,
- bool rs, enum ice_eth56g_link_spd spd)
+static int ice_ptp_calc_deskew_eth56g(struct ice_hw *hw, u8 port, u32 ds,
+ bool rs, enum ice_eth56g_link_spd spd,
+ u32 *deskew)
{
- u32 deskew_i, deskew_f;
- int err;
+ u32 deskew_i = 0, deskew_f;
+ int err, ret;
- if (!ds)
+ if (!ds) {
+ *deskew = 0;
return 0;
+ }
- read_poll_timeout(ice_read_ptp_reg_eth56g, err,
- FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i), 500,
- 50 * USEC_PER_MSEC, false, hw, port, PHY_REG_DESKEW_0,
- &deskew_i);
+ ret = read_poll_timeout(ice_read_ptp_reg_eth56g, err,
+ err || FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i),
+ 500, 50 * USEC_PER_MSEC, false, hw, port,
+ PHY_REG_DESKEW_0, &deskew_i);
if (err)
return err;
+ if (ret)
+ return ret;
deskew_f = FIELD_GET(PHY_REG_DESKEW_0_RLEVEL_FRAC, deskew_i);
deskew_i = FIELD_GET(PHY_REG_DESKEW_0_RLEVEL, deskew_i);
@@ -1766,7 +1772,9 @@ static u32 ice_ptp_calc_deskew_eth56g(struct ice_hw *hw, u8 port, u32 ds,
deskew_i = FIELD_PREP(ICE_ETH56G_MAC_CFG_RX_OFFSET_INT, deskew_i);
/* Shift 3 fractional bits to the end of the integer part */
deskew_f <<= ICE_ETH56G_MAC_CFG_FRAC_W - PHY_REG_DESKEW_0_RLEVEL_FRAC_W;
- return mul_u32_u32_fx_q9(deskew_i | deskew_f, ds);
+ *deskew = mul_u32_u32_fx_q9(deskew_i | deskew_f, ds);
+
+ return 0;
}
/**
@@ -1789,6 +1797,7 @@ static int ice_phy_set_offsets_eth56g(struct ice_hw *hw, u8 port,
{
u32 rx_offset, tx_offset, bs_ds;
bool onestep, sfd;
+ int err;
onestep = hw->ptp.phy.eth56g.onestep_ena;
sfd = hw->ptp.phy.eth56g.sfd_ena;
@@ -1805,11 +1814,16 @@ static int ice_phy_set_offsets_eth56g(struct ice_hw *hw, u8 port,
if (sfd)
rx_offset = add_u32_u32_fx(rx_offset, cfg->rx_offset.sfd);
- if (spd < ICE_ETH56G_LNK_SPD_40G)
+ if (spd < ICE_ETH56G_LNK_SPD_40G) {
bs_ds = ice_ptp_calc_bitslip_eth56g(hw, port, bs_ds, fc, rs,
spd);
- else
- bs_ds = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd);
+ } else {
+ err = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd,
+ &bs_ds);
+ if (err)
+ return err;
+ }
+
rx_offset = add_u32_u32_fx(rx_offset, bs_ds);
rx_offset &= ICE_ETH56G_MAC_CFG_RX_OFFSET_INT |
ICE_ETH56G_MAC_CFG_RX_OFFSET_FRAC;
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net 6/6] ice: allow reading the last byte of the NVM and Shadow RAM regions
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
` (4 preceding siblings ...)
2026-11-13 23:12 ` [PATCH net 5/6] ice: propagate ETH56G deskew poll failures Tony Nguyen
@ 2026-11-13 23:12 ` Tony Nguyen
2026-11-13 23:18 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) netdev-bot+sinfo
6 siblings, 0 replies; 13+ messages in thread
From: Tony Nguyen @ 2026-11-13 23:12 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
Cc: Petr Oros, anthony.l.nguyen, michal.swiatkowski, david.m.ertman,
pengpeng, przemyslaw.kitszel, jacob.e.keller, robert.malz,
rkannoth, Alexander Nowlin
From: Petr Oros <poros@redhat.com>
ice_devlink_nvm_read() rejects a read whose end lands exactly on the
region size, so feeding back the size devlink itself reports fails:
devlink region show pci/0000:04:00.0/nvm-flash
pci/0000:04:00.0/nvm-flash: size 10485760 snapshot [] max 1
devlink region read pci/0000:04:00.0/nvm-flash address 0 length 10485760
Error: ice: Cannot read beyond the region size.
shadow-ram behaves the same. The regions are created with those sizes, so
a read ending on the size is the whole region and has to be allowed.
ice_read_flat_nvm() uses > for its own Shadow RAM check, and so does
ixgbe, which grew its region support from this code.
Fixes: 3af4b40b0f2f ("ice: implement direct read for NVM and Shadow RAM regions")
Signed-off-by: Petr Oros <poros@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c b/drivers/net/ethernet/intel/ice/devlink/devlink.c
index a87a3e0a900c..9eafe7d57732 100644
--- a/drivers/net/ethernet/intel/ice/devlink/devlink.c
+++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c
@@ -1953,7 +1953,7 @@ static int ice_devlink_nvm_read(struct devlink *devlink,
return -EOPNOTSUPP;
}
- if (offset + size >= nvm_size) {
+ if (offset + size > nvm_size) {
NL_SET_ERR_MSG_MOD(extack, "Cannot read beyond the region size");
return -ERANGE;
}
--
2.47.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice)
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
` (5 preceding siblings ...)
2026-11-13 23:12 ` [PATCH net 6/6] ice: allow reading the last byte of the NVM and Shadow RAM regions Tony Nguyen
@ 2026-11-13 23:18 ` netdev-bot+sinfo
6 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sinfo @ 2026-11-13 23:18 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 1/6] ice: use global queue index in TC to-queue offload
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
@ 2026-11-17 23:54 ` netdev-bot+sashiko
0 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 23:54 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
aleksandr.loktionov, horms, alexander.nowlin
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In commit "ice: use global queue index in TC to-queue offload",
the PF-to-global queue conversion is done only where the value is…
--
ice: use global queue index in TC to-queue offload
The patch changes the queue ID programmed for TC flower to-queue rules
from the PF-relative index to the global index. It does this by adding
hw->func_caps.common_cap.rxq_first_id in ice_add_tc_flower_adv_fltr().
Before this, rules failed on every PF except PF0.
> diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> index d20357c041273..6f49ecb4165b2 100644
> --- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> @@ -1202,7 +1202,8 @@ ice_add_tc_flower_adv_fltr(struct ice_vsi *vsi,
> break;
> case ICE_FWD_TO_Q:
> /* HW queue number in global space */
> - rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue;
> + rule_info.sw_act.fwd_id.q_id = tc_fltr->action.fwd.q.hw_queue +
> + hw->func_caps.common_cap.rxq_first_id;
[Severity: Low]
After this change, tc_fltr->action.fwd.q.hw_queue still holds a
PF-relative value. Is the comment on that field in struct
ice_tc_flower_action still accurate?
drivers/net/ethernet/intel/ice/ice_tc_lib.h:
u16 queue; /* forward to queue */
/* To add filter in HW, absolute queue number in global
* space of queues (between 0...N) is needed
*/
u16 hw_queue;
ice_tc_forward_to_queue() still sets it from the PF-relative rxq_map,
which indexes pf->avail_rxqs:
fltr->action.fwd.q.hw_queue = vsi->rxq_map[queue];
Both dev_dbg() calls in ice_add_tc_flower_adv_fltr() that print
"(HW queue %u)" still print tc_fltr->action.fwd.q.hw_queue:
dev_dbg(dev, "add switch rule action to forward to queue:%u (HW queue %u), lkups_cnt:%u\n",
tc_fltr->action.fwd.q.queue,
tc_fltr->action.fwd.q.hw_queue, lkups_cnt);
dev_dbg(dev, "added switch rule (lkups_cnt %u, flags 0x%x), action is forward to queue: %u (HW queue %u) , rid %u, rule_id %u\n",
lkups_cnt, flags, tc_fltr->action.fwd.q.queue,
tc_fltr->action.fwd.q.hw_queue, rule_added.rid,
rule_added.rule_id);
On any PF where rxq_first_id is non-zero, these messages now show a
different queue from the one written into fwd_id.q_id.
Would it make sense to add rxq_first_id where hw_queue is assigned in
ice_tc_forward_to_queue()? That would keep the stored value, the
comment and the debug output matching what is programmed. The other
option is to update the comment and the log labels to say the value is
PF-relative.
> rule_info.sw_act.vsi_handle = dest_vsi->idx;
> rule_info.priority = ICE_SWITCH_FLTR_PRIO_QUEUE;
> rule_info.sw_act.src = hw->pf_id;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set
2026-11-13 23:12 ` [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set Tony Nguyen
@ 2026-11-17 23:54 ` netdev-bot+sashiko
0 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 23:54 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
aleksandr.loktionov, horms, alexander.nowlin
Thank you for your contribution! Sashiko AI review found 7 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 5 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] While the VSI holds the default (DFLT) Rx rule,
ice_vlan_rx_add_vid() still converts the vid=0 multicast rule from the…
- [Medium] ice_vsi_sync_fltr() calls ice_vsi_clear_vlan_mc_promisc()
whenever ice_set_dflt_vsi() returns 0 or -EEXIST, even if no DFLT rule…
- [Medium] After this patch, whether per-VID multicast promisc rules
exist depends on port-level DFLT state (ice_is_vsi_dflt_vsi()).
- [Medium] ice_vsi_exit_dflt_promisc() makes leaving promiscuous mode
depend on allocating one switch rule per VLAN, which can fail in the…
- [Medium] Clearing IFF_ALLMULTI while IFF_PROMISC stays set removes the
promiscuous VSI's multicast subscription, which the patch says it…
- [Low] The commit message does not mention the change to
ice_clear_promisc().
- [Low] When a VSI with VLANs and ALLMULTI enters promisc,
ice_vsi_sync_fltr() leaves a window with no multicast promisc rule at…
--
ice: skip per-VLAN promisc rules when default VSI Rx rule is set
While the VSI holds the default VSI Rx rule, this patch skips the per-VLAN
ICE_SW_LKUP_PROMISC_VLAN expansion in ice_set_promisc() and
ice_vlan_rx_add_vid(), so the shared FLU pool is not exhausted. Once the
DFLT rule is installed, it drops the per-VID multicast rules that are now
redundant, and the new ice_vsi_exit_dflt_promisc() puts them back on
promisc exit. A promiscuous VSI is also subscribed to multicast when the
default VSI rule is already in use.
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 47c6798c97e8f..ecd05f5050ff1 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
[ ... ]
> @@ -304,9 +305,20 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
> return 0;
>
> if (ice_vsi_has_non_zero_vlans(vsi)) {
> - promisc_m |= (ICE_PROMISC_VLAN_RX | ICE_PROMISC_VLAN_TX);
> + u8 vlan_promisc_m = promisc_m | ICE_PROMISC_VLAN_RX |
> + ICE_PROMISC_VLAN_TX;
> + int vid0_status;
> +
> + /* the vid=0 rule may be in either recipe (the recipe used to
> + * set it is not recorded), so clear both; clearing an absent
> + * rule returns 0
> + */
> status = ice_fltr_clear_vlan_vsi_promisc(&vsi->back->hw, vsi,
> - promisc_m);
> + vlan_promisc_m);
> + vid0_status = ice_fltr_clear_vsi_promisc(&vsi->back->hw,
> + vsi->idx, promisc_m, 0);
[Severity: Medium]
If only IFF_ALLMULTI is cleared, can a promiscuous VSI end up with no
multicast subscription?
The ALLMULTI-off branch of ice_vsi_sync_fltr() calls this function without
checking IFF_PROMISC:
} else {
/* !(vsi->current_netdev_flags & IFF_ALLMULTI) */
err = ice_clear_promisc(vsi, ICE_MCAST_PROMISC_BITS);
After this change it also removes the vid=0 ICE_SW_LKUP_PROMISC rule. For
a DFLT VSI, that is the subscription ice_set_promisc() installs for promisc
mode. IFF_PROMISC did not change and ICE_VSI_PROMISC_CHANGED is not set, so
the PROMISC branch is skipped and nothing reinstalls the rule. For example:
ip link set dev X promisc on allmulticast on
ip link set dev X allmulticast off
The commit message says ice_set_promisc(ICE_MCAST_PROMISC_BITS) is issued
"whenever the netdev is promiscuous", so that a promiscuous VSI no longer
ends up "in unicast promisc with no multicast subscription".
The PROMISC-off branch guards its clear with
!(vsi->current_netdev_flags & IFF_ALLMULTI). Should the ALLMULTI-off branch
have a matching IFF_PROMISC guard?
> + if (!status)
> + status = vid0_status;
[Severity: Low]
This isn't a bug, but the commit message does not mention this change to
ice_clear_promisc(). With non-zero VLANs present, it now also clears the
vid=0 rule in the non-VLAN ICE_SW_LKUP_PROMISC recipe and merges the two
status values.
The message also leaves out that, for a DFLT VSI, ice_set_promisc() now
installs the multicast subscription in the VLAN-agnostic recipe. That
recipe switch, not the DFLT rule, is what keeps multicast coverage on
every VID.
The commit message says:
The DFLT rule already catches every packet on the port regardless of VLAN
tag, so the per-VLAN promisc expansion is redundant while it is installed.
But the new comment in ice_vsi_sync_fltr() says:
the unicast catch-all does not cover the multicast subscription.
Could the commit message describe the multicast rule layout change and the
new clear path, and reconcile these two statements?
> } else {
> status = ice_fltr_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
> promisc_m, 0);
> @@ -317,6 +329,61 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m)
> return status;
> }
>
> +/**
> + * ice_vsi_exit_dflt_promisc - drop the default VSI Rx rule on promisc off
> + * @vsi: the VSI leaving promiscuous mode
[ ... ]
> +static int ice_vsi_exit_dflt_promisc(struct ice_vsi *vsi)
> +{
> + struct ice_vsi_vlan_ops *vlan_ops = ice_get_compat_vsi_vlan_ops(vsi);
> + struct net_device *netdev = vsi->netdev;
> + struct ice_hw *hw = &vsi->back->hw;
> + bool restore_mc;
> + int err;
> +
> + restore_mc = (vsi->current_netdev_flags & IFF_ALLMULTI) &&
> + ice_vsi_has_non_zero_vlans(vsi);
> +
> + if (restore_mc) {
> + err = ice_fltr_set_vlan_vsi_promisc(hw, vsi,
> + ICE_MCAST_VLAN_PROMISC_BITS);
> + if (err && err != -EEXIST)
> + return err;
> + }
> +
> + err = ice_clear_dflt_vsi(vsi);
[Severity: Medium]
Can leaving promiscuous mode now fail because of the FLU exhaustion this
patch is meant to address?
On promisc entry, ice_vsi_clear_vlan_mc_promisc() frees every per-VID
multicast rule, and other PFs sharing the pool can take those entries. On
promisc exit with IFF_ALLMULTI and VLANs, every per-VID rule has to be
reinstalled here before ice_clear_dflt_vsi() runs.
ice_set_vlan_vsi_promisc() stops at the first error other than -EEXIST and
keeps the rules it has already added:
if (status && status != -EEXIST)
break;
On ENOSPC this function returns before ice_clear_dflt_vsi(), and
ice_vsi_sync_fltr() sets IFF_PROMISC in current_netdev_flags again. The
port stays in DFLT mode with VLAN pruning disabled even though the user
cleared promisc. The partially reinstalled rules are not rolled back. The
retry happens on the next rx_mode event and can fail the same way.
If promisc is then turned back on, ice_is_dflt_vsi_in_use() is true. The
ice_vsi_clear_vlan_mc_promisc() block is skipped, so those per-VID rules
stay alongside DFLT and the vid=0 rule.
Before this patch the per-VID rules stayed allocated while promisc was on,
so leaving promisc only removed DFLT. Is it intended that promisc exit can
now fail on rule allocation?
[ ... ]
> @@ -429,30 +496,31 @@ 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
> + /* a prior allmulti pass may have added per-VID
> + * rules now covered by the DFLT rule
> */
> - err = ice_set_promisc(vsi,
> - ICE_MCAST_PROMISC_BITS);
> - if (err)
> - goto out_promisc;
> + ice_vsi_clear_vlan_mc_promisc(vsi);
[Severity: Medium]
Is this reached even when no DFLT rule was actually installed?
When the PF is in a LAG with switchdev running, ice_set_dflt_vsi() returns
0 without calling ice_cfg_dflt_vsi():
drivers/net/ethernet/intel/ice/ice_lib.c:ice_set_dflt_vsi() {
...
if (ice_lag_is_switchdev_running(vsi->back)) {
dev_dbg(dev, "VSI %d passed is a part of LAG containing interfaces in switchdev mode, nothing to do\n",
vsi->vsi_num);
return 0;
}
...
}
In that case ice_vsi_clear_vlan_mc_promisc() deletes every per-VID
multicast rule left by an earlier ALLMULTI pass. The following
ice_set_promisc(ICE_MCAST_PROMISC_BITS) sees ice_is_vsi_dflt_vsi() as
false and adds them all back.
Multicast on those VLANs is not delivered in between. If the re-add fails
partway, for example with ENOSPC after another PF takes the freed entries,
the VSI ends up with fewer multicast rules than it had before.
The commit message says the logic is keyed on ice_is_vsi_dflt_vsi() so
that a "LAG-suppressed DFLT install still falls back to the per-VLAN
rules", but this call is keyed on the return code instead. Would guarding
it with ice_is_vsi_dflt_vsi(vsi) match the stated design?
> }
> +
> + /* Promiscuous mode implies allmulticast. Subscribe
> + * the VSI to all multicast even when the default VSI
> + * rule is already in use and the block above is
> + * skipped (it may be owned by another VSI, or
> + * preserved across a switchdev session); the unicast
> + * catch-all does not cover the multicast subscription.
> + */
> + err = ice_set_promisc(vsi, ICE_MCAST_PROMISC_BITS);
> + if (err)
> + goto out_promisc;
[Severity: Low]
Separately, ice_vsi_clear_vlan_mc_promisc() above removes the per-VID
ICE_SW_LKUP_PROMISC_VLAN multicast rules, vid=0 included, before this
ice_set_promisc() call installs the VLAN-agnostic vid=0 replacement. Does
that leave a window with no multicast promisc rule while the bulk removal
runs?
ice_vsi_exit_dflt_promisc() is ordered so that "coverage never lapses",
but the entry path uses the opposite order. The two recipes are separate
and can coexist. Could the VLAN-agnostic rule be installed before the
per-VID rules are removed?
[ ... ]
> @@ -3675,10 +3743,9 @@ int ice_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
> while (test_and_set_bit(ICE_CFG_BUSY, vsi->state))
> usleep_range(1000, 2000);
>
> - /* Add multicast promisc rule for the VLAN ID to be added if
> - * all-multicast is currently enabled.
> - */
> - if (vsi->current_netdev_flags & IFF_ALLMULTI) {
> + /* skip the per-VID rule when the DFLT Rx rule already covers this VID */
> + if ((vsi->current_netdev_flags & IFF_ALLMULTI) &&
> + !ice_is_vsi_dflt_vsi(vsi)) {
> ret = ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx,
> ICE_MCAST_VLAN_PROMISC_BITS,
> vid);
[Severity: Medium]
The per-VID rule is skipped here for a DFLT VSI, but the conversion further
down in ice_vlan_rx_add_vid() is not gated the same way:
if ((vsi->current_netdev_flags & IFF_ALLMULTI) &&
ice_vsi_num_non_zero_vlans(vsi) == 1) {
ice_fltr_clear_vsi_promisc(&vsi->back->hw, vsi->idx,
ICE_MCAST_PROMISC_BITS, 0);
ice_fltr_set_vsi_promisc(&vsi->back->hw, vsi->idx,
ICE_MCAST_VLAN_PROMISC_BITS, 0);
}
Can this drop multicast on every tagged VLAN while the VSI holds the DFLT
rule?
In DFLT mode, ice_set_promisc() now installs only the VLAN-agnostic
ICE_SW_LKUP_PROMISC vid=0 rule. When the first non-zero VID is added, this
block removes that rule and installs an ICE_SW_LKUP_PROMISC_VLAN rule that
matches VID 0 only.
For example, start with the VSI in PROMISC+ALLMULTI and no non-zero VLANs,
then add VID 10 and VIDs 11..4094. The switch is left with DFLT plus a
vid=0 PROMISC_VLAN multicast rule, and no multicast promisc rule for any
tagged VID.
Commit 1273f89578f2 notes that a PROMISC_VLAN rule only receives multicast
for its own VID. The new comment in ice_vsi_sync_fltr() also says the
unicast catch-all does not cover the multicast subscription.
The result depends on ordering too. VLANs that exist before DFLT is set
get the VLAN-agnostic rule. VLANs added afterwards do not, until promisc
is cleared through ice_vsi_exit_dflt_promisc().
Should this conversion also be skipped when ice_is_vsi_dflt_vsi(vsi) is
true?
[Severity: Medium]
Is the per-VID rule also skipped here when the eswitch owns the DFLT rule,
rather than netdev promisc?
ice_eswitch_setup_env() makes the uplink the default VSI through
ice_set_dflt_vsi(). With switchdev running and IFF_ALLMULTI set, every
VLAN added during the session skips its per-VID multicast rule here.
On teardown, the DFLT Rx rule is removed directly through this path:
ice_eswitch_detach_vf()/ice_eswitch_detach_sf()
ice_eswitch_disable_switchdev()
ice_eswitch_release_env()
ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
ICE_FLTR_RX);
That path does not go through ice_vsi_exit_dflt_promisc(), does not take
ICE_CFG_BUSY, and does not set any resync bit. The skipped per-VID rules
are never reinstalled, and IFF_ALLMULTI stays broken for those VLANs
until allmulticast is toggled.
At this commit ice_eswitch_release_env() removes DFLT unconditionally. The
later patch in this series, "ice: preserve uplink DFLT Rx rule on
switchdev release", keeps DFLT only when the uplink is IFF_PROMISC, so a
non-promisc ALLMULTI uplink still hits this. For example:
ip link set eth0 allmulticast on
(create VFs in switchdev mode)
ip link add link eth0 name eth0.10 type vlan id 10
(remove the VFs)
ice_vlan_rx_add_vid() and ice_eswitch_release_env() also do not share a
lock. Can add_vid see DFLT present just before release_env removes it,
leaving the same gap?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release
2026-11-13 23:12 ` [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release Tony Nguyen
@ 2026-11-17 23:54 ` netdev-bot+sashiko
0 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 23:54 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
aleksandr.loktionov, horms, alexander.nowlin
Thank you for your contribution! Sashiko AI review found 4 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 3 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] ice_eswitch_release_env() (and the err_def_tx unwind in
ice_eswitch_setup_env()) now keeps or removes the Rx DFLT rule based…
- [Medium] The fix leaves the uplink's promiscuous configuration only
half restored after a switchdev session.
- [Medium] ice_eswitch_release_env() makes its keep/remove decision for
the Rx DFLT rule from one unlocked snapshot of…
- [Medium] The new comment in ice_eswitch_release_env() says that testing
the live netdev->flags keeps 'the preserved DFLT rule and the pruning…
--
ice: preserve uplink DFLT Rx rule on switchdev release
This commit stops ice_eswitch_release_env() and the err_def_tx unwind in
ice_eswitch_setup_env() from removing the uplink's ICE_SW_LKUP_DFLT Rx
rule when the uplink netdev has IFF_PROMISC set. The Tx DFLT rule is
still removed. The decision is based on the live netdev->flags.
> diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
> index 6e7bba4738989..c32d6b201369b 100644
> --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
[ ... ]
> @@ -276,8 +278,16 @@ static void ice_eswitch_release_env(struct ice_pf *pf)
> vlan_ops->ena_rx_filtering(uplink_vsi);
> ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
> ICE_FLTR_TX);
> - ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
> - ICE_FLTR_RX);
> +
> + /* Keep the Rx DFLT rule if the uplink is promiscuous; it must outlive
> + * the session. Test the live netdev->flags, the same value
> + * ena_rx_filtering() -> ice_cfg_vlan_pruning() above keys its decision
> + * on, so the preserved DFLT rule and the pruning state stay consistent.
> + */
[Severity: Medium]
Does the "same value" claim in this comment still hold if promisc changes
concurrently?
ice_cfg_vlan_pruning() does its own plain load of the flags:
drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c:ice_cfg_vlan_pruning() {
...
if (vsi->netdev && vsi->netdev->flags & IFF_PROMISC && ena)
return 0;
...
}
The new check below is a second, separate load. It runs after the
ice_cfg_dflt_vsi(..., ICE_FLTR_TX) admin queue command, and neither read
is done under RTNL.
If IFF_PROMISC flips between the two reads, ice_set_rx_mode() returns
early because pf->eswitch.is_running is still true. Nothing corrects the
state later.
Could that leave VLAN pruning disabled with the DFLT rule removed and
promisc off? Or pruning enabled with the catch-all kept and promisc on?
If the flag were read once into a local (or under RTNL) and used for both
decisions, the comment would be accurate.
> + if (!(uplink_vsi->netdev->flags & IFF_PROMISC))
> + ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx,
> + false, ICE_FLTR_RX);
[Severity: High]
Does this leave vsi->current_netdev_flags out of sync with the hardware
filter state?
The keep/remove decision uses the live netdev->flags. Nothing here updates
vsi->current_netdev_flags or sets ICE_VSI_PROMISC_CHANGED or
ICE_FLAG_FLTR_SYNC.
While switchdev is running, ice_set_rx_mode() drops every rx_mode event:
drivers/net/ethernet/intel/ice/ice_main.c:ice_set_rx_mode() {
...
if (!vsi || ice_is_switchdev_running(vsi->back))
return;
...
}
So a promisc change made during the session is never recorded. After
teardown, ice_vsi_sync_fltr() computes changed_flags against that stale
value:
changed_flags = vsi->current_netdev_flags ^ vsi->netdev->flags;
vsi->current_netdev_flags = vsi->netdev->flags;
...
if (((changed_flags & IFF_PROMISC) || promisc_forced_on) ||
test_bit(ICE_VSI_PROMISC_CHANGED, vsi->state)) {
Take the case where promisc is off before switchdev and is turned on
during the session (for example by tcpdump on the PF):
- This code keeps the DFLT Rx rule that switchdev installed.
- ice_cfg_vlan_pruning() also leaves pruning off.
- When promisc is turned off after teardown, changed_flags has no
IFF_PROMISC, so ice_vsi_exit_dflt_promisc() is never called.
Would the uplink then stay the port's default VSI, with VLAN pruning
disabled while IFF_PROMISC is clear? Other VSIs would then see
ice_is_dflt_vsi_in_use() return true.
The reverse case also looks reachable:
- Promisc is on before switchdev and is turned off during the session.
- This code removes the DFLT rule.
- When promisc is turned back on after teardown, changed_flags again has
no IFF_PROMISC, so ice_set_dflt_vsi() and dis_rx_filtering() are
skipped.
Isn't that IFF_PROMISC set with no catch-all, the same symptom the commit
message describes? The commit message says:
including for a promisc change made while switchdev ran (which never
reached the gated filter sync).
Would retriggering the sync handle these cases instead of special-casing
the Rx rule? That could mean setting ICE_VSI_PROMISC_CHANGED and
ICE_FLAG_FLTR_SYNC, or reconciling vsi->current_netdev_flags.
The err_def_tx unwind in ice_eswitch_setup_env() has the same check and
looks like it has the same problem.
[Severity: Medium]
Can a concurrent promisc change be lost between this check and the point
where is_running is cleared?
ice_eswitch_release_env() is reached from ice_eswitch_detach() without
RTNL. It cannot hold RTNL there, because repr->ops.rem() calls
unregister_netdev():
drivers/net/ethernet/intel/ice/ice_eswitch.c:ice_eswitch_detach() {
...
repr->ops.rem(repr);
xa_erase(&pf->eswitch.reprs, repr->id);
if (xa_empty(&pf->eswitch.reprs))
ice_eswitch_disable_switchdev(pf);
...
}
is_running is cleared only after release_env returns:
drivers/net/ethernet/intel/ice/ice_eswitch.c:ice_eswitch_disable_switchdev() {
ice_eswitch_br_offloads_deinit(pf);
ice_eswitch_release_env(pf);
pf->eswitch.is_running = false;
}
release_env also issues more admin queue commands after this check:
ice_fltr_add_mac_and_broadcast() and ice_vsi_cfg_sw_lldp().
Suppose "ip link set promisc on|off" runs __dev_change_flags() under RTNL
in that window. ice_set_rx_mode() returns early because is_running is
still true, and no ICE_FLAG_FLTR_SYNC is left pending.
Could that leave IFF_PROMISC set without the Rx DFLT rule, or a leftover
catch-all with promisc off, until some unrelated rx_mode event?
The err_def_tx unwind in ice_eswitch_setup_env() uses the same unlocked
read.
> +
> ice_fltr_add_mac_and_broadcast(uplink_vsi,
> uplink_vsi->port_info->mac.perm_addr,
> ICE_FWD_TO_VSI);
[Severity: Medium]
Does the uplink still lose its multicast promisc subscription after the
session?
On entry, ice_eswitch_setup_env() calls ice_remove_vsi_fltr():
drivers/net/ethernet/intel/ice/ice_switch.c:ice_remove_vsi_fltr() {
...
ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_PROMISC);
...
ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_DFLT);
...
ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_PROMISC_VLAN);
}
The PROMISC and PROMISC_VLAN rules are removed through
ice_remove_promisc(). ICE_SW_LKUP_DFLT falls into the unsupported lookup
type default, which is why only the DFLT rule survives.
That means the ICE_MCAST_PROMISC_BITS rule that ice_vsi_sync_fltr()
installed with ice_set_promisc() is gone after entry.
On teardown, release_env keeps the DFLT Rx rule and re-adds only the perm
MAC and broadcast filters. It does not set ICE_VSI_PROMISC_CHANGED, the
UMAC/MMAC_FLTR_CHANGED bits or ICE_FLAG_FLTR_SYNC.
If promisc did not change during the session, vsi->current_netdev_flags
equals netdev->flags. ice_vsi_sync_fltr() then never enters this block
again:
/* Promiscuous mode implies allmulticast. Subscribe
* the VSI to all multicast even when the default VSI
* rule is already in use and the block above is
* skipped (it may be owned by another VSI, or
* preserved across a switchdev session); the unicast
* catch-all does not cover the multicast subscription.
*/
err = ice_set_promisc(vsi, ICE_MCAST_PROMISC_BITS);
Wouldn't the uplink then stay in unicast promisc with no multicast
subscription until promisc is toggled?
The commit message gives the cause as "the sync path was not
retriggered". Would retriggering the sync here restore both the DFLT
rule and the multicast rule?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions
2026-11-13 23:12 ` [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions Tony Nguyen
@ 2026-11-17 23:54 ` netdev-bot+sashiko
0 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 23:54 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
aleksandr.loktionov, horms, alexander.nowlin
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] ice_vsi_cfg_sw_lldp()
(drivers/net/ethernet/intel/ice/ice_lib.c:2182) now sends the Rx LLDP…
- [Low] The commit message for ice_vsi_cfg_sw_lldp() (ice_lib.c) never
names a user-visible symptom or failing configuration for a…
- [Low] The patch removes ICE_FLAG_LLDP_AQ_FLTR (ice.h), the only record
of which mechanism installed the Rx LLDP rule.
--
ice: Fix incorrect LLDP filter assumptions
This patch changes ice_vsi_cfg_sw_lldp() to always try the
LLDP_FILTER_CONTROL AQ command first for the Rx LLDP rule. It falls back
to the ethertype rule only when the AQ command returns -EOPNOTSUPP. The
ICE_FLAG_LLDP_AQ_FLTR PF flag is removed.
> This is an incorrect assumption, they are both meant to add a filter to
> handle LLDP packets and only varied in the actual AQ call made.
[Severity: Low]
Is this description accurate? ice_fltr_add_eth() adds an ethertype rule
that is tracked in hw->switch_info. That rule is replayed after a reset
and removed by ice_fltr_remove_all(). The filter added by
ice_lldp_fltr_add_remove() is not tracked by the driver (see the VF reset
question below).
The commit message also does not give a user-visible symptom for a
Fixes: tagged fix. The old flow already fell back to the AQ command when
adding the ethertype rule failed. That seems to cover the case of an NVM
with an existing LLDP filter, which is the case described here.
The defect that is visible in the baseline is not mentioned.
ICE_FLAG_LLDP_AQ_FLTR was a sticky PF-wide flag. A fallback on one VSI
could switch the remove path of every other VSI to AQ and leak their
ethertype rules. Should the commit message describe this?
Two behaviour changes are also left out:
- AQ failures other than -EOPNOTSUPP (for example -EIO from
ice_sq_send_cmd()) no longer retry with the ethertype rule.
- The dev_info() fallback message is removed. Commit eef33aa44935 ("ice:
fix adding AQ LLDP filter for VF") kept that message on purpose because
it "proved to be useful".
Using the AQ path for VF VSIs is only correct because eef33aa44935
removed the vsi->type != ICE_VSI_PF check from
ice_lldp_fltr_add_remove(). Would it help to mention that dependency?
> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> index 432da05c48c08..dded9f7c173e9 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -525,7 +525,6 @@ enum ice_pf_flags {
> ICE_FLAG_MTU_CHANGED,
> ICE_FLAG_GNSS, /* GNSS successfully initialized */
> ICE_FLAG_DPLL, /* SyncE/PTP dplls initialized */
> - ICE_FLAG_LLDP_AQ_FLTR,
[Severity: Low]
Without this flag, the add and remove paths in ice_vsi_cfg_sw_lldp() each
choose AQ or ethertype from the current ice_fw_supports_lldp_fltr_ctrl()
result. They no longer depend on how the rule was actually installed. Can
the two paths disagree after a FW update?
ice_rebuild() calls ice_init_all_ctrlq() again, which re-reads the FW API
version. ice_vsi_rebuild_by_type() then replays tracked filters through
ice_replay_vsi().
Consider FW moving from below API 1.7.1 to 1.7.1 or later (devlink flash
plus EMPR). The ethertype ETH_P_LLDP FWD_TO_VSI rule added before the
update is replayed into HW. A later remove sends an AQ DELETE instead.
That remove can come from ice_cfg_sw_rx_lldp(pf, false) when
fw-lldp-agent is re-enabled through ethtool, or from ice_vsi_release():
ice_vsi_cfg_sw_lldp(vsi, false, false)
ice_lldp_fltr_add_remove(&pf->hw, vsi, false) /* AQ DELETE */
Would that leave the replayed ethertype rule in HW, so LLDP keeps being
forwarded to the PF VSI? The opposite direction (a downgrade) probably
only gives a failed ethertype remove and a dev_warn(), because EMPR
clears FW state.
> ICE_PF_FLAGS_NBITS /* must be last */
> };
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 977cd8dd6e31b..2836f7d8a4753 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2179,24 +2179,16 @@ void ice_vsi_cfg_sw_lldp(struct ice_vsi *vsi, bool tx, bool create)
> status = eth_fltr(vsi, ETH_P_LLDP, ICE_FLTR_TX,
> ICE_DROP_PACKET);
> } else {
> - if (!test_bit(ICE_FLAG_LLDP_AQ_FLTR, pf->flags)) {
> + status = ice_lldp_fltr_add_remove(&pf->hw, vsi, create);
> + if (status == -EOPNOTSUPP) {
[Severity: Medium]
With this change, PF and VF VSIs get the Rx LLDP rule from the AQ filter
whenever FW supports LLDP_FILTER_CONTROL, not from the tracked ethertype
rule. Since the driver does not track the AQ filter, is it still removed
when a VF is reset?
Consider a trusted VF with the FW LLDP agent disabled. The VF adds the
LLDP multicast MAC:
ice_vc_add_mac_addr()
ice_vf_update_mac_lldp_num()
ice_vsi_cfg_sw_lldp(vsi, false, true)
ice_lldp_fltr_add_remove(..., true) /* AQ ADD for vsi_num */
Then the VF is reset through VIRTCHNL_OP_RESET_VF, VFLR or a host config
change:
ice_reset_vf()
ice_vf_pre_vsi_rebuild()
ice_vf_clear_counters()
vf->num_mac_lldp = 0;
ice_vf_reconfig_vsi()
vsi->flags = ICE_VSI_FLAG_NO_INIT;
ice_vsi_decfg(vsi);
ice_fltr_remove_all(vsi);
ICE_VSI_FLAG_NO_INIT keeps the HW VSI and its vsi_num.
ice_fltr_remove_all() only removes tracked MAC, VLAN, promisc, default and
ethertype rules. Nothing on this path sends
ICE_AQC_LLDP_FILTER_ACTION_DELETE.
The driver code shows that no DELETE is sent. That FW keeps forwarding
LLDP to the VSI is an inference: switch rules survive a VF reset, which
is why ice_vf_reconfig_vsi() calls ice_fltr_remove_all() at all.
After the reset, ice_set_vf_trust() removes the rule only if the counter
is non-zero:
if (!trusted &&
(vf->num_mac_lldp > 0 ||
test_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states) ||
test_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states))) {
Could a VF whose trust was revoked keep receiving port LLDP frames this
way? ice_vc_can_add_mac() is meant to block exactly that for untrusted
VFs.
ice_vsi_release() also skips the Rx LLDP delete for a VF VSI when
ice_vf_is_lldp_ena() returns false. Can the FW filter then outlive the
VSI and still refer to a released VSI number?
If the VF adds the LLDP MAC again after the reset, a second AQ ADD would
go out for a VSI that is already in the filter.
In the baseline the ethertype rule was the default path. It is tracked,
so ice_fltr_remove_all() removed it during the reset and HW matched the
zeroed counter.
> + /* If fltr_ctrl not supported, use legacy
> + * add/remove command
> + */
> status = eth_fltr(vsi, ETH_P_LLDP, ICE_FLTR_RX,
> ICE_FWD_TO_VSI);
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net 5/6] ice: propagate ETH56G deskew poll failures
2026-11-13 23:12 ` [PATCH net 5/6] ice: propagate ETH56G deskew poll failures Tony Nguyen
@ 2026-11-17 23:54 ` netdev-bot+sashiko
0 siblings, 0 replies; 13+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 23:54 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, netdev,
michal.swiatkowski, poros, david.m.ertman, pengpeng,
przemyslaw.kitszel, vinicius.gomes, sridhar.samudrala,
aleksandr.loktionov, horms, alexander.nowlin
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] This patch makes a DESKEW_0.VALID poll timeout in
ice_ptp_calc_deskew_eth56g() a hard failure (-ETIMEDOUT).
- [Low] The patch adds new error returns to ice_phy_set_offsets_eth56g():
a PHY_REG_DESKEW_0 sideband read error, and -ETIMEDOUT when…
--
ice: propagate ETH56G deskew poll failures
This changes ice_ptp_calc_deskew_eth56g() to return an error code and
pass the deskew value back through an output parameter. The poll now
stops on a register read error. Both read errors and poll timeouts are
propagated, and ice_phy_set_offsets_eth56g() returns early when the
deskew calculation fails.
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> index 3a41c711e751b..da48d3adf94f5 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
> @@ -1736,24 +1736,30 @@ static u32 ice_ptp_calc_bitslip_eth56g(struct ice_hw *hw, u8 port, u32 bs,
[ ... ]
> - read_poll_timeout(ice_read_ptp_reg_eth56g, err,
> - FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i), 500,
> - 50 * USEC_PER_MSEC, false, hw, port, PHY_REG_DESKEW_0,
> - &deskew_i);
> + ret = read_poll_timeout(ice_read_ptp_reg_eth56g, err,
> + err || FIELD_GET(PHY_REG_DESKEW_0_VALID, deskew_i),
> + 500, 50 * USEC_PER_MSEC, false, hw, port,
> + PHY_REG_DESKEW_0, &deskew_i);
> if (err)
> return err;
> + if (ret)
> + return ret;
[ ... ]
> @@ -1805,11 +1814,16 @@ static int ice_phy_set_offsets_eth56g(struct ice_hw *hw, u8 port,
> if (sfd)
> rx_offset = add_u32_u32_fx(rx_offset, cfg->rx_offset.sfd);
>
> - if (spd < ICE_ETH56G_LNK_SPD_40G)
> + if (spd < ICE_ETH56G_LNK_SPD_40G) {
> bs_ds = ice_ptp_calc_bitslip_eth56g(hw, port, bs_ds, fc, rs,
> spd);
> - else
> - bs_ds = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd);
> + } else {
> + err = ice_ptp_calc_deskew_eth56g(hw, port, bs_ds, rs, spd,
> + &bs_ds);
> + if (err)
> + return err;
[Severity: Medium]
Is it intended that a DESKEW_0.VALID timeout now aborts the whole PHY
timer start?
Before this patch, a timeout could only leave the Rx deskew wrong. The Tx
offset was still written and the PHY timer was still synced.
With this early return, a -ETIMEDOUT from ice_ptp_calc_deskew_eth56g() on
a 40G/50G2/100G port skips the PHY_MAC_RX_OFFSET write. It also skips the
PHY_MAC_TX_OFFSET write, which doesn't depend on deskew. The error then
unwinds through:
ice_ptp_port_phy_restart()
ice_start_phy_timer_eth56g()
ice_phy_cfg_mac_eth56g()
ice_phy_set_offsets_eth56g()
ice_ptp_calc_deskew_eth56g()
ice_phy_cfg_mac_eth56g() returns without writing PHY_MAC_MARKERTIME.
RX/TX_MODULO, TSU_CONFIG and BLOCKTIME have already been programmed for
the new speed at that point.
ice_start_phy_timer_eth56g() has already called
ice_stop_phy_timer_eth56g(), which cleared TX/RX_OFFSET_READY. It now
returns without loading INCVAL into PHY_REG_TIMETUS, issuing
ICE_PTP_INIT_INCVAL, calling ice_sync_phy_timer_eth56g() or setting
OFFSET_READY back to 1.
Can anything recover the port after this? In ice_ptp_port_phy_restart()
the E825 branch only logs the error:
case ICE_MAC_GENERIC_3K_E825:
err = ice_start_phy_timer_eth56g(hw, port);
break;
...
if (err)
dev_err(ice_pf_to_dev(pf), "PTP failed to set PHY port %d up, err %d\n",
port, err);
The ICE_MAC_GENERIC branch sets ptp_port->tx.disabled, but this branch
does not, so Tx timestamp requests are still accepted. Nothing retries
either, so Rx and Tx timestamping on the port appear to stay down until
the next link event.
This patch carries a Fixes: tag. Should the commit message mention that
a deskew poll timeout now turns degraded Rx accuracy into a total loss
of timestamping on the port?
> + }
[Severity: Low]
This isn't a bug, but the kernel-doc for ice_phy_set_offsets_eth56g()
still says:
* Return:
* * %0 - success
* * %other - failed to write to PHY
With this change it can also return a PHY_REG_DESKEW_0 read error, or
-ETIMEDOUT from the poll.
ice_phy_cfg_mac_eth56g() ("%other - failed to write to PHY") and
ice_start_phy_timer_eth56g() ("%other - PHY read/write failed") pass
these errors up unchanged, and their comments don't mention them either.
Should these comments be updated along with the one for
ice_ptp_calc_deskew_eth56g()?
> +
> rx_offset = add_u32_u32_fx(rx_offset, bs_ds);
> rx_offset &= ICE_ETH56G_MAC_CFG_RX_OFFSET_INT |
> ICE_ETH56G_MAC_CFG_RX_OFFSET_FRAC;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113231225.1864810-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-11-17 23:54 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 23:12 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) Tony Nguyen
2026-11-13 23:12 ` [PATCH net 1/6] ice: use global queue index in TC to-queue offload Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 2/6] ice: skip per-VLAN promisc rules when default VSI Rx rule is set Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 3/6] ice: preserve uplink DFLT Rx rule on switchdev release Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 4/6] ice: Fix incorrect LLDP filter assumptions Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 5/6] ice: propagate ETH56G deskew poll failures Tony Nguyen
2026-11-17 23:54 ` netdev-bot+sashiko
2026-11-13 23:12 ` [PATCH net 6/6] ice: allow reading the last byte of the NVM and Shadow RAM regions Tony Nguyen
2026-11-13 23:18 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2026-11-13 (ice) netdev-bot+sinfo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox