net: thunderx: Support for HW VLAN stripping
authorSunil Goutham <sgoutham@cavium.com>
Sun, 30 Aug 2015 09:29:13 +0000 (12:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2015 04:54:12 +0000 (21:54 -0700)
commitaa2e259b474a4f52ecc9f6e0d444547de0aac4b2
treea95954f87a2568772d80891f42f08d4f36ebb43f
parent38bb5d4f4f988c98035fca003138dd84471432f2
net: thunderx: Support for HW VLAN stripping

This patch configures HW to strip 802.1Q header if found in a
receiving packet. The stripped VLAN ID and TCI information is
passed on to software via CQE_RX. Also sets netdev's 'vlan_features'
so that other HW offload features can be used for tagged packets.

This offload feature can be enabled or disabled via ethtool.

Network stack normally ignores RPS for 802.1Q packets and hence low
throughput. With this offload enabled throughput for tagged packets
will be almost same as normal packets.

Note: This patch doesn't enable HW VLAN insertion for transmit packets.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic_main.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.h