]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Don't install VLAN offload rule if netdev is down
authorSunil Goutham <sgoutham@marvell.com>
Sun, 22 Aug 2021 12:02:25 +0000 (17:32 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:38:15 +0000 (21:38 +0100)
commitcb6754137336fb9a58ec7ffbafc38569e408d8dc
tree9b7ab599cc1736659545f97c3f0dd43b429429ff
parent88525a4786bff7021f99bf10a539e03a8bf80373
octeontx2-pf: Don't install VLAN offload rule if netdev is down

Whenever user changes interface MAC address both default DMAC based
MCAM rule and VLAN offload (for strip) rules are updated with new
MAC address. To update or install VLAN offload rule PF driver needs
interface's receive channel info, which is retrieved from admin
function at the time of NIXLF initialization.

If user changes MAC address before interface is UP, VLAN offload rule
installation will fail and throw error as receive channel is not valid.
To avoid this, skip VLAN offload rule installation if netdev is not UP.
This rule will anyway be reinslatted as part of open() call.

Fixes: b5e51ef3b701 ("octeontx2-pf: Implement ingress/egress VLAN offload")
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c