]> 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)
commit29d9f87c06c7b20689a644c83ad2440970e5ac98
treee505a279b5c18810f98ab66954a60489a1566324
parent9e36ed6910f6016b9a16937c4a40625cfdfa9ec3
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