OSDN Git Service

nfp: validate rx offset from the BAR and size down it's field
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 10 Mar 2017 18:38:36 +0000 (10:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Mar 2017 06:43:19 +0000 (23:43 -0700)
commit97717aca618a85d9e52327b4509a3b95c2f8f121
tree739bb23f5e9701331d9a401741ddca667b5969c9
parentc487e6b199eab3af14e54406d97cc3c149e591e1
nfp: validate rx offset from the BAR and size down it's field

NFP_NET_CFG_RX_OFFSET is 32bit wide, make sure what we read from
there is reasonable for packet headroom.  This allows us to store
the rx_offset in a 8bit variable.

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