nfp: avoid oversized TSO headers with metadata prepend
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 28 Nov 2018 06:24:52 +0000 (22:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Nov 2018 21:30:44 +0000 (13:30 -0800)
commitd7cc8252252f9e5b72975a3d498ba2ee08245740
tree968d6a3c8be538cc37c1d59d1b685a8eb1227b59
parentb54ad0eaad8e5defcc48b224a7c7deb3f162cb99
nfp: avoid oversized TSO headers with metadata prepend

In preparation for TSO over representors make sure the port id
prepend will always fit in the frame.  The current max header
length is 255, which is ample, so assume worst case scenario
of 8 byte prepend and save ourselves the conditionals.

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