]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: parse vNIC TLV capabilities at alloc time
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 9 Nov 2018 03:50:35 +0000 (19:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 04:48:00 +0000 (20:48 -0800)
commit9d35f6569883fc48a0f3494b0991460bd85b35cd
treee505a279b5c18810f98ab66954a60489a1566324
parent6a76cab9682238c341120e30b250426a9a6c37bc
nfp: parse vNIC TLV capabilities at alloc time

In certain cases initialization logic which follows allocation of
the vNIC structure may want to validate the capabilities of that vNIC.
This is easy before vNIC is initialized for normal capabilities which
are at fixed offsets in control memory, easy to locate and read, but
poses a challenge if the capabilities are in form of TLVs.  Parse
the TLVs early on so other code can just access parsed info, instead
of having to do the parsing by itself.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c