octeontx2-af: Handle non-contiguous CGX LMAC interfaces
authorLinu Cherian <lcherian@marvell.com>
Thu, 22 Nov 2018 11:48:35 +0000 (17:18 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Nov 2018 01:23:25 +0000 (17:23 -0800)
commit12e4c9ab2eb3244f9f90b595bb4b988e4d423c62
treea095a5d2f14ad97d21fa4404961f0f7244658239
parent44990aaa939439cfd151435e5dcd965494ace8b0
octeontx2-af: Handle non-contiguous CGX LMAC interfaces

For this, cgx_id(struct cgx) definition has been changed to
reflect cgx port id instead of device instance id.
Now cgx_id can be directly used as channel offset for NPC configuration.
Assumptions on contiguous cgx port ids has been removed from
nix_calibrate_x2p as well.

As a side effect, allocation of conversion tables that were based
on cgx count are changed to cgx port id max value.
Tables would return NULL for invalid cgx ports.

Signed-off-by: Linu Cherian <lcherian@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
drivers/net/ethernet/marvell/octeontx2/af/cgx.h
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c