nfp: resync repr state when port table sync
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Sat, 4 Nov 2017 15:48:57 +0000 (16:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 14:23:26 +0000 (23:23 +0900)
commit5fa27d59af2a36c32156e56b6370387f60b67052
tree95872ea4d3b135d0375613138f2ccdbab0431875
parent51ccc37d9d3392884024b272089fd3e864d3cf3c
nfp: resync repr state when port table sync

If the NSP port table has been refreshed, resync the representor state
with the new port information. At the moment, this only entails looking
for invalid ports and killing off representors associated with them.

The repr instance becomes NULL which is safe since the app accessor
function for reprs returns NULL when it cannot access a repr.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-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
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
drivers/net/ethernet/netronome/nfp/nfp_net_repr.h