nfp: flower: base lifetime of representors on existence of lower vNIC
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 3 Sep 2017 01:26:01 +0000 (18:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Sep 2017 04:22:05 +0000 (21:22 -0700)
commit192e685105097c48ad9f3665af643e1d97bcd2d4
treed12ad3d9f95f8d57e95422aeac8fab242b82e56f
parentc496291c5a414bd55bae76880137947d2e8decbe
nfp: flower: base lifetime of representors on existence of lower vNIC

Create representors after lower vNIC is registered and destroy
them before it is destroyed.  Move the code out of start/stop
callbacks directly into vnic_init/clean callbacks.  Make sure
SR-IOV callbacks don't try to create representors when lower
device does not exist.

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/flower/main.c