> diff --git a/drivers/net/ethernet/intel/ice/ice_base.c
> b/drivers/net/ethernet/intel/ice/ice_base.c
> index eadb1e3d12b3..511d803cf0a4 100644
> --- a/drivers/net/ethernet/intel/ice/ice_base.c
> +++ b/drivers/net/ethernet/intel/ice/ice_base.c
> @@ -663,23 +663,12 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)
> int err;
>
> if (ring->vsi->type == ICE_VSI_PF || ring->vsi->type == ICE_VSI_SF) {
[ ... ]
> @@ -702,14 +691,13 @@ static int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)
> if (err)
> return err;
>
> - if (!xdp_rxq_info_is_reg(&ring->xdp_rxq)) {
> - err = __xdp_rxq_info_reg(&ring->xdp_rxq,
> ring->netdev,
> - ring->q_index,
> -
> ring->q_vector->napi.napi_id,
> - ring->rx_buf_len);
> - if (err)
> - goto err_destroy_fq;
> - }
> + err = __xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,
> + ring->q_index,
> + ring->q_vector->napi.napi_id,
> + ring->rx_buf_len);
> + if (err)
> + goto err_destroy_fq;
The registration condition check was removed, so __xdp_rxq_info_reg() is
now called unconditionally. This works correctly when cleanup properly
unregisters the xdp_rxq, but there appears to be a gap for ICE_VSI_SF
in non-XSK mode.
Looking at ice_clean_rx_ring() in ice_txrx.c:
if (rx_ring->vsi->type == ICE_VSI_PF &&
xdp_rxq_info_is_reg(&rx_ring->xdp_rxq)) {
xdp_rxq_info_detach_mem_model(&rx_ring->xdp_rxq);
xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
}
This only unregisters for ICE_VSI_PF, not ICE_VSI_SF. With the old code,
the conditional registration skipped re-registration for ICE_VSI_SF. With
this change, for ICE_VSI_SF in non-XSK mode during reconfiguration:
1. ice_clean_rx_ring() - doesn't unregister (only checks ICE_VSI_PF)
2. ice_vsi_cfg_rxq() - unconditionally calls __xdp_rxq_info_reg()
3. __xdp_rxq_info_reg() sees REG_STATE_REGISTERED and triggers:
WARN(1, "Missing unregister, handled but fix driver");
While this is handled gracefully by the XDP core (it unregisters internally
before re-registering), will this cause spurious WARN splats for subfunction
devices on every reconfiguration?
Should the ICE_VSI_PF check in ice_clean_rx_ring() be updated to also
include ICE_VSI_SF to match the registration path?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/21960574055
AI-authorship-score: low
AI-authorship-explanation: The commit shows domain-specific knowledge of ice
driver internals and XDP subsystem, with targeted changes that suggest human
authorship by an Intel driver developer.
issues-found: 1
issue-severity-score: low
issue-severity-explanation: The issue causes WARN splats for ICE_VSI_SF devices
during reconfiguration, but is handled gracefully by XDP core without
functional impact.