OSDN Git Service

nfp: parametrize QCP offset/size using dev_info
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 11 Mar 2022 10:43:04 +0000 (11:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Mar 2022 07:10:22 +0000 (23:10 -0800)
commite900db704c8512bce5641639e6b069ebaccf9c90
tree3ceedf91e168d9c8f2ee3fdf0de778af13348fdd
parent9ba1dc994ff56f273fa9697878c6d47ad945aa44
nfp: parametrize QCP offset/size using dev_info

The queue controller (QCP) is accessed based on a device specific
offset. The NFP3800 device also supports more queues.

Furthermore, the NFP3800 VFs also access the QCP differently to how the
NFP6000 VFs accesses it, though still indirectly. Fortunately, we can
remove the offset all together for both VF types. This is safe for
NFP6000 VFs since the offset was effectively a wrap around and only used
for convenience to have it set the same as the NFP6000 PF.

Use nfp_dev_info to store queue controller parameters.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_main.c
drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_dev.c
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_dev.h