OSDN Git Service

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)
commit6d4b0d8ed6d2f9e1741b9abd0ce64c641f890d6c
treefd52e98456a45a2c098bc8ecb7a64435809ab143
parent21537bc7019a4dfd5c6f615a235e0b171ef3dda8
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