Skip to content

net: dsa: realtek: add rtl8_4t tag

Luiz Angelo Daros de Luca linux-devicetree netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 5 repliesApplied 3/3
  2. v43 patches 5 repliesSuperseded

Patches in v5 All 3 applied

#Subject and filesSizeRepliesApplied
1/3dt-bindings: net: dsa: add rtl8_4 and rtl8_4t tag formatsDocumentation/devicetree/bindings/net/dsa/dsa-port.yaml+2 -03 repliesApplied
2/3net: dsa: tag_rtl8_4: add rtl8_4t trailing variantinclude/net/dsa.h net/dsa/tag_rtl8_4.c+118 -361 replyApplied
3/3net: dsa: realtek: rtl8365mb: add support for rtl8_4tdrivers/net/dsa/realtek/rtl8365mb.c+62 -151 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAlvin ŠipragaVladimir OlteanFlorian Fainelli
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH net-next v5 0/3] net: dsa: realtek: add rtl8_4t tag

This patch series adds support for rtl8_4t tag. It is a variant of rtl8_4 tag, with identical values but placed at the end of the packet (before CRC).

It forces checksum in software before adding the tag as those extra bytes at the end of the packet would be summed together with the rest of the payload. When the switch removes the tag before sending the packet to the network, that checksum will not match.

It might be useful to diagnose or avoid checksum offload issues. With an ethertype tag like rtl8_4, the cpu port ethernet driver must work with cksum_start and chksum_offset to correctly calculate checksums. If not, the checksum field will be broken (it will contain the fake ip header sum). In those cases, using 'rtl8_4t' might be an alternative way to avoid checksum offload, either using runtime or device-tree property.

Regards,

Luiz

v4-v5)
- tags in alphabetical order in dsa_port.yaml
- remove ret var from rtl8365mb_change_tag_protocol
- Comment typos fixes

v3-v4)
- added rtl8_4 and rtl8_4t to dsa_port.yaml
- removed generic considerations about checksum problems with DSA tags. They belong to Documentation/networking/dsa/dsa.rst

v2-v3)
- updated tag documentation (file header)
- do not remove position and format from rtl8365mb_cpu
- reinstate cpu to rtl8365mb
- moved rtl8365mb_change_tag_protocol after rtl8365mb_cpu_config
- do not modify rtl8365mb_cpu_config() logic
- remove cpu arg from rtl8365mb_cpu_config(); get it from priv
- dropped tag_protocol from rtl8365mb. It is now derived from cpu->position.
- init cpu struct before dsa_register as default tag must be already defined before dsa_register()
- fix formatting issues

v1-v2)
- remove mention to tail tagger, use trailing tagger.
- use void* instead of char* for pointing to tag beginning
- use memcpy to avoid problems with unaligned tags
- calculate checksum if it still pending
- keep in-use tag protocol in memory instead of reading from switch register