]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: don't tell FW about the reserved buffer space
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 2 Mar 2017 23:26:20 +0000 (15:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Mar 2017 17:46:53 +0000 (09:46 -0800)
commit9c4de15d140083919a0eec0630e07029d105a165
treebf0c3dbd4972ec43c3f19fd6556bc39ba99b0e60
parentf02f2e3d3544125771d51cfd69a9db27534bee87
nfp: don't tell FW about the reserved buffer space

Since commit ff92b7dacb77 ("nfp_net: use alloc_frag() and build_skb()")
we are allocating buffers which have to hold both the data and skb to
be created in place by build_skb().

FW should only be told about the buffer space it can DMA to, that
is without the build_skb() headroom and tailroom.  Note: firmware
applications should validate the buffers against both MTU and
free list buffer size so oversized packets would not pass through
the NIC anyway.

Fixes: ff92b7dacb77 ("nfp: use alloc_frag() and build_skb()")
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