]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: disallow mixing vNICs with and without NSP port entry
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 22 May 2017 17:59:27 +0000 (10:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 18:59:04 +0000 (14:59 -0400)
commit26249db84c27b60f5d90538bc93118673f2a47a5
tree9f9a1c528d2bcd295b381983a0106dd4381dbefe
parent96f82bc82a5a5664b14150f5a8b2b7c7107ece70
nfp: disallow mixing vNICs with and without NSP port entry

We only support core NIC apps which have vNICs for each physical port/
split and no representors right now.  Enforce that either each vNIC has
a NSP eth_table entry or if NSP port table is not available none do.

One scenario this will prevent from happening is user force-loading
wrong firmware file if FW app requires different firmwares per media
config.

While at it move some code to nfp_net_pf_alloc_vnic() to make it
counter-match nfp_net_pf_free_vnic() better.

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_net_main.c