octeontx2-af: Cleanup loopback device checks
authorGeetha sowjanya <gakula@marvell.com>
Wed, 31 Jan 2024 07:54:41 +0000 (13:24 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Feb 2024 12:12:35 +0000 (12:12 +0000)
commitae703539f49d20cafc888f5d2e8fe5851d5da6cd
treea22eae56c5119da429d36b5d7282652e2d0e2f0a
parentd6212d2e41a0cb1ff6b059db79c70752cdafc95e
octeontx2-af: Cleanup loopback device checks

PCI device IDs of RVU device IDs are configurable and
RVU PF0's (ie AF's) are currently assumed as VFs that
identify loopback functionality ie LBKVFs. But in some
cases these VFs can be setup for different functionality.
Hence remove assumptions that AF's VFs are always LBK VFs
by renaming 'is_afvf' as 'is_lbkvf' explicitly and also
identify LBK VF using PCI dev ID. Similar change is done
for other VF types.

Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_sdp.c