nfp: use AND instead of modulo to get ring indexes
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 31 Oct 2016 20:43:17 +0000 (20:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:05:00 +0000 (11:05 -0400)
commit1a1d74d378b13ad3f93e8975a0ade0980a49d28b
tree2c4eb8ba6ab039cba1dd408bb6b1ea4970273d56
parentb64b7bb6d492ef1bbe9aa9ed7eeb18f7148ece3d
nfp: use AND instead of modulo to get ring indexes

We already force ring sizes to be power of 2 so replace
modulo operations with AND (size - 1) in index calculations.

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_common.c