nfp: add nfp_reprs_get_locked() helper
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 18 Jan 2018 02:50:58 +0000 (18:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 20:44:18 +0000 (15:44 -0500)
commite1740fb6c111986a7af96a44ff794b2ba75abb2e
treec887dfb9e4078cae9fc59c2499d37a181779a618
parentbcc93a23ca595fb1d7d7540bec68196a3715da13
nfp: add nfp_reprs_get_locked() helper

The write side of repr tables is always done under pf->lock.
Add a helper to dereference repr table pointers under protection
of that lock.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_app.c
drivers/net/ethernet/netronome/nfp/nfp_app.h
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c