Skip to content

Commit d639dcd

Browse files
orospgregkh
authored andcommitted
iavf: add VIRTCHNL_OP_ADD_VLAN to success completion handler
[ Upstream commit 34d3331 ] The V1 ADD_VLAN opcode had no success handler; filters sent via V1 stayed in ADDING state permanently. Add a fallthrough case so V1 filters also transition ADDING -> ACTIVE on PF confirmation. Critically, add an `if (v_retval) break` guard: the error switch in iavf_virtchnl_completion() does NOT return after handling errors, it falls through to the success switch. Without this guard, a PF-rejected ADD would incorrectly mark ADDING filters as ACTIVE, creating a driver/HW mismatch where the driver believes the filter is installed but the PF never accepted it. For V2, this is harmless: iavf_vlan_add_reject() in the error block already kfree'd all ADDING filters, so the success handler finds nothing to transition. Fixes: 968996c ("iavf: Fix VLAN_V2 addition/rejection") Signed-off-by: Petr Oros <poros@redhat.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260427-jk-iwl-net-petr-oros-fixes-v1-4-cdcb48303fd8@intel.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 01d7e58 commit d639dcd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,9 +2515,13 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
25152515
spin_unlock_bh(&adapter->adv_rss_lock);
25162516
}
25172517
break;
2518+
case VIRTCHNL_OP_ADD_VLAN:
25182519
case VIRTCHNL_OP_ADD_VLAN_V2: {
25192520
struct iavf_vlan_filter *f;
25202521

2522+
if (v_retval)
2523+
break;
2524+
25212525
spin_lock_bh(&adapter->mac_vlan_list_lock);
25222526
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
25232527
if (f->state == IAVF_VLAN_ADDING)

0 commit comments

Comments
 (0)