• Jakub Kicinski's avatar
    nfp: slice the netdev spawning function · 6d4b0d8e
    Jakub Kicinski authored
    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: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6d4b0d8e
nfp_net_main.c 17.3 KB