Skip to content

RFC DSA slave with customise netdev features

DENG Qingfang linux-arm-kernel linux-mediatek lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: dsa: allow taggers to customise netdev featuresinclude/net/dsa.h net/dsa/slave.c+4 -12 replies
2/2net: dsa: tag_mtk: handle VLAN tag insertion on TXnet/dsa/tag_mtk.c+22 -245 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchVladimir OlteanFlorian Fainelli
1/2R-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC net-next 0/2] DSA slave with customise netdev features

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(-)
Signature · 1 line
2.25.1