RDMA/bnxt_re: Check if the vlan is valid before reporting
authorSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 15 Sep 2021 12:32:42 +0000 (05:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 09:39:08 +0000 (10:39 +0100)
commitdcd6eefceeb0e464237d27340053c6f2f15217b5
treec62af0d45b57555451353d41f4638fee388712a0
parent4e5bc9fb23a7f12ca9fcee73d4ffb23267fa98ee
RDMA/bnxt_re: Check if the vlan is valid before reporting

[ Upstream commit 6bda39149d4b8920fdb8744090653aca3daa792d ]

When VF is configured with default vlan, HW strips the vlan from the
packet and driver receives it in Rx completion. VLAN needs to be reported
for UD work completion only if the vlan is configured on the host. Add a
check for valid vlan in the UD receive path.

Link: https://lore.kernel.org/r/1631709163-2287-12-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/ib_verbs.c