linux_dsm_epyc7002/drivers/net/ethernet
Grygorii Strashko a3a41d2f94 net: ethernet: ti: cpsw: enable vlan rx vlan offload
In VLAN_AWARE mode CPSW can insert VLAN header encapsulation word on Host
port 0 egress (RX) before the packet data if RX_VLAN_ENCAP bit is set in
CPSW_CONTROL register. VLAN header encapsulation word has following format:

 HDR_PKT_Priority bits 29-31 - Header Packet VLAN prio (Highest prio: 7)
 HDR_PKT_CFI 	  bits 28 - Header Packet VLAN CFI bit.
 HDR_PKT_Vid 	  bits 27-16 - Header Packet VLAN ID
 PKT_Type         bits 8-9 - Packet Type. Indicates whether the packet is
                 	VLAN-tagged, priority-tagged, or non-tagged.
	00: VLAN-tagged packet
	01: Reserved
	10: Priority-tagged packet
	11: Non-tagged packet

This feature can be used to implement TX VLAN offload in case of
VLAN-tagged packets and to insert VLAN tag in case Non-tagged packet was
received on port with PVID set. As per documentation, CPSW never modifies
packet data on Host egress (RX) and as result, without this feature
enabled, Host port will not be able to receive properly packets which
entered switch non-tagged through external Port with PVID set (when
non-tagged packet forwarded from external Port with PVID set to another
external Port - packet will be VLAN tagged properly).

Implementation details:
- on RX driver will check CPDMA status bit RX_VLAN_ENCAP BIT(19) in CPPI
descriptor to identify when VLAN header encapsulation word is present.
- PKT_Type = 0x01 or 0x02 then ignore VLAN header encapsulation word and
pass packet as is;
- if HDR_PKT_Vid = 0 then ignore VLAN header encapsulation word and pass
packet as is;
- In dual mac mode traffic is separated between ports using default port
vlans, which are not be visible to Host and so should not be reported.
Hence, check for default port vlans in dual mac mode and ignore VLAN header
encapsulation word;
- otherwise fill SKB with VLAN info using __vlan_hwaccel_put_tag();
- PKT_Type = 0x00 (VLAN-tagged) then strip out VLAN header from SKB.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-17 19:51:01 -04:00
..
3com 3c59x: fix missing dma_mapping_error check and bad ring refill logic 2018-01-03 13:44:14 -05:00
8390 net/mac8390: Fix log messages 2018-02-21 14:14:05 -05:00
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
amd net: amd8111e: remove redundant assignment to 'tx_index' 2018-03-04 18:17:27 -05:00
apm
apple net/macmace: Drop redundant MACH_IS_MAC test 2018-02-28 12:00:27 -05:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-02-24 00:04:20 -05:00
arc
atheros
aurora
broadcom tg3: APE heartbeat changes 2018-02-19 14:16:52 -05:00
brocade
cadence net: macb: Add phy-handle DT support 2018-03-16 11:14:33 -04:00
calxeda
cavium liquidio: Simplified napi poll 2018-03-16 15:03:26 -04:00
chelsio cxgb4: Fix queue free path of ULD drivers 2018-03-17 17:20:03 -04:00
cirrus net/mac89x0: Replace custom debug logging with netif_* calls 2018-03-01 21:21:36 -05:00
cisco enic: drop IP proto check for vxlan tunnel delete 2018-03-16 09:50:40 -04:00
cortina net: gemini: Depend on HAS_IOMEM 2018-01-21 18:05:30 -05:00
davicom
dec
dlink
emulex emulex/benet: Constify *be_misconfig_evt_port_state[] 2018-02-28 11:39:40 -05:00
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
fujitsu
hisilicon net: hns3: add result checking for VF when modify unicast mac address 2018-03-11 22:53:32 -04:00
hp
huawei hinic: Replace PCI pool old API 2018-01-02 16:14:49 -06:00
i825xx
ibm ibmvnic: Fix reset return from closed state 2018-03-14 13:08:14 -04:00
intel i40e: restore TCPv4 input set when re-enabling ATR 2018-03-14 12:34:35 -07:00
marvell net: mvpp2: Add support for unicast filtering 2018-03-07 15:53:39 -05:00
mediatek net: mediatek: Explicitly include pinctrl headers 2018-02-05 09:41:54 -08:00
mellanox mlxsw: spectrum_kvdl: Make some functions static 2018-03-12 11:19:25 -04:00
micrel
microchip lan743x: make functions lan743x_csr_read and lan743x_csr_read static 2018-03-12 11:12:38 -04:00
moxa
myricom
natsemi net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00
neterion
netronome nfp: advertise firmware for mixed 10G/25G mode 2018-02-22 15:22:50 -05:00
nuvoton
nvidia forcedeth: remove duplicate structure member in rx 2018-01-23 11:11:41 -05:00
nxp
oki-semi pch_gbe: Deprecate pci_get_bus_and_slot() 2018-01-17 08:16:46 -06:00
packetengines
pasemi
qlogic qlogic/qed: Constify *pkt_type_str[] 2018-02-28 11:39:40 -05:00
qualcomm net: drivers/net: Remove unnecessary skb_copy_expand OOM messages 2018-03-15 14:28:03 -04:00
rdc
realtek r8169: switch to device-managed functions in probe (part 2) 2018-03-04 18:15:17 -05:00
renesas ravb: remove erroneous comment 2018-03-07 10:40:14 -05:00
rocker rocker: fix possible null pointer dereference in rocker_router_fib_event_work 2018-02-01 09:50:52 -05:00
samsung
seeq
sfc sfc: support FEC configuration through ethtool 2018-03-14 13:12:15 -04:00
sgi
silan
sis
smsc net/smc9194: Remove bogus CONFIG_MAC reference 2018-02-22 14:44:37 -05:00
socionext net: netsec: use dma_addr_t for storing dma address 2018-01-14 12:00:23 -05:00
stmicro net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields 2018-02-27 14:28:10 -05:00
sun sun: Add SPDX license tags to Sun network drivers 2018-02-07 21:51:02 -05:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: enable vlan rx vlan offload 2018-03-17 19:51:01 -04:00
tile
toshiba
tundra net: tsi108: Use DMA API properly 2018-01-17 18:04:43 -06:00
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: remove unused initialization of 'rxdesc' 2018-02-01 14:54:28 -05:00
jme.h
Kconfig net: ethernet: Add a driver for Gemini gigabit ethernet 2018-01-15 14:38:55 -05:00
korina.c
lantiq_etop.c
Makefile net: ethernet: Add a driver for Gemini gigabit ethernet 2018-01-15 14:38:55 -05:00
netx-eth.c