]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: slice the netdev spawning function
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 6 Jun 2017 00:01:54 +0000 (17:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Jun 2017 16:51:41 +0000 (12:51 -0400)
commit45fe26572cba06297635e99f6713e68f932c1d02
treefd52e98456a45a2c098bc8ecb7a64435809ab143
parent9320297ec2d3bca7056358627391edc8294870a4
nfp: slice the netdev spawning function

We want to be able to create a special vNIC for control messages.
This vNIC should be created before any netdev is registered to allow
nfp_app logic to exchange messages with the FW app before any netdev
is visible to user space.  Unfortunately we can't enable IRQs until
we know how many vNICs we will need to spawn.

Divide the function which spawns netdevs for vNICs into three parts:
 - vNIC/memory allocation;
 - IRQ allocation;
 - netdev init and register.

This will help us insert the initialization of the control channel
after IRQ allocation but before netdev init and register.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_main.c