OSDN Git Service

nfp: reorganize the app table
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 2 Nov 2017 08:31:32 +0000 (01:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Nov 2017 11:27:11 +0000 (20:27 +0900)
commit2c4197a041dfbb5101aaa8be7b378ba69b91e765
tree4a1bc5a3967d722d09cd6c4f5131277809f380cc
parentf449657f83532807f388b9b99cf0c3f7be65eda9
nfp: reorganize the app table

The app table is an unordered array right now.  We have to search
apps by ID.  It also makes it harder to fall back to core NIC if
advanced functions are not compiled into the kernel (e.g. eBPF).
Make the table keyed by app id.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_app.c