netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: dsa: realtek: add rtl8_4t tag
@ 2022-02-18  6:09 Luiz Angelo Daros de Luca
  2022-02-18  6:09 ` [PATCH net-next v2 1/2] net: dsa: tag_rtl8_4: add rtl8_4t trailing variant Luiz Angelo Daros de Luca
  2022-02-18  6:09 ` [PATCH net-next v2 2/2] net: dsa: realtek: rtl8365mb: add support for rtl8_4t Luiz Angelo Daros de Luca
  0 siblings, 2 replies; 9+ messages in thread
From: Luiz Angelo Daros de Luca @ 2022-02-18  6:09 UTC (permalink / raw)
  To: netdev
  Cc: linus.walleij, andrew, vivien.didelot, f.fainelli, olteanv, davem,
	kuba, alsi, arinc.unal

This series add support for rtl8_4t tag. It is a variant of rtl8_4 tag,
with identical values but placed at the end of the packet. 

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 in order 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

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



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

end of thread, other threads:[~2022-02-22 19:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-18  6:09 [PATCH net-next v2 0/2] net: dsa: realtek: add rtl8_4t tag Luiz Angelo Daros de Luca
2022-02-18  6:09 ` [PATCH net-next v2 1/2] net: dsa: tag_rtl8_4: add rtl8_4t trailing variant Luiz Angelo Daros de Luca
2022-02-18 11:46   ` Alvin Šipraga
2022-02-22  0:37     ` Luiz Angelo Daros de Luca
2022-02-18  6:09 ` [PATCH net-next v2 2/2] net: dsa: realtek: rtl8365mb: add support for rtl8_4t Luiz Angelo Daros de Luca
2022-02-18 12:26   ` Alvin Šipraga
2022-02-22  2:42     ` Luiz Angelo Daros de Luca
2022-02-22 12:20       ` Alvin Šipraga
2022-02-22 19:54         ` Luiz Angelo Daros de Luca

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).