nfp: centralize the buffer size calculation
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 31 Oct 2016 20:43:13 +0000 (20:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:04:59 +0000 (11:04 -0400)
commitbf187ea01b07739167420088adb385f9385a7c7f
tree34e3cc4399e6d86aa5360ceee08b3f4f8f1d2c26
parentfa95f1d2bf1816eee736192fa1f75ed96c0ab9cf
nfp: centralize the buffer size calculation

Add a helper function to calculate the buffer size at run time.
Buffer lengths will now depend on the FW prepend configuration
instead of assuming the most space consuming configuration and
defaulting to 2k buffers at initialization time.

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.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c