]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: don't advertise hw-tc-offload on non-port netdevs
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 8 Feb 2018 04:55:23 +0000 (20:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Feb 2018 15:01:27 +0000 (10:01 -0500)
commit94279903f4b701cb5bc9639b5759d3907128889e
tree7dcb816914adbda9c84c67f170a4029a6f74eceb
parent9aa68a9dfcb905772e2bf67e94d00e3bcbf22a9f
nfp: don't advertise hw-tc-offload on non-port netdevs

nfp_port is a structure which represents an ASIC port, both
PCIe vNIC (on a PF or a VF) or the external MAC port.  vNIC
netdev (struct nfp_net) and pure representor netdev (struct
nfp_repr) both have a pointer to this structure.  nfp_reprs
always have a port associated.  nfp_nets, however, only represent
a device port in legacy mode, where they are considered the
MAC port. In switchdev mode they are just the CPU's side of
the PCIe link.

By definition TC offloads only apply to device ports.  Don't
set the flag on vNICs without a port (i.e. in switchdev mode).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Tested-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c