linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC net-next 0/2] DSA slave with customise netdev features
@ 2021-08-25  8:38 DENG Qingfang
  2021-08-25  8:38 ` [RFC net-next 1/2] net: dsa: allow taggers to " DENG Qingfang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: DENG Qingfang @ 2021-08-25  8:38 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel

Some taggers, such as tag_dsa.c, combine VLAN tags with DSA tags, which
currently has a few problems:

1. Unnecessary reallocation on TX:

A central TX reallocation has been used since commit a3b0b6479700
("net: dsa: implement a central TX reallocation procedure"), but for
VLAN-tagged frames, the actual headroom required for DSA taggers which
combine with VLAN tags is smaller.

2. Repeated memmoves:

If a both Marvell EDSA and VLAN tagged frame is received, the current
code will move the (DA,SA) twice: the first in dsa_rcv_ll to convert the
frame to a normal 802.1Q frame, and the second to strip off the 802.1Q
tag. The similar thing happens on TX.

For these tags, it is better to handle DSA and VLAN tags at the same time
in DSA taggers.

This patch set allows taggers to add custom netdev features to DSA
slaves so they can advertise VLAN offload, and converts tag_mtk to use
the TX VLAN offload.

DENG Qingfang (2):
  net: dsa: allow taggers to customise netdev features
  net: dsa: tag_mtk: handle VLAN tag insertion on TX

 include/net/dsa.h |  2 ++
 net/dsa/slave.c   |  3 ++-
 net/dsa/tag_mtk.c | 46 ++++++++++++++++++++++------------------------
 3 files changed, 26 insertions(+), 25 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-08-26 15:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  8:38 [RFC net-next 0/2] DSA slave with customise netdev features DENG Qingfang
2021-08-25  8:38 ` [RFC net-next 1/2] net: dsa: allow taggers to " DENG Qingfang
2021-08-26  0:01   ` Vladimir Oltean
2021-08-26 11:28   ` Florian Fainelli
2021-08-25  8:38 ` [RFC net-next 2/2] net: dsa: tag_mtk: handle VLAN tag insertion on TX DENG Qingfang
2021-08-26  0:03   ` Vladimir Oltean
2021-08-26  5:29     ` DENG Qingfang
2021-08-26 11:37       ` Florian Fainelli
2021-08-26 14:13       ` Vladimir Oltean
2021-08-26 15:27         ` DENG Qingfang
2021-08-26  0:00 ` [RFC net-next 0/2] DSA slave with customise netdev features Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).