[PATCH] realtek: fix RTL839x receive tag decoding

Sander Vanheule sander at svanheule.net
Fri Sep 9 00:45:50 PDT 2022

On Fri, 2022-09-09 at 08:28 +0200, Bjørn Mork wrote:
> The previous fixup was incomplete, and the offsets for the
> queue and crc_error cpu_tag bitfields were still wrong on
> RTL839x.
> Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding")
> Suggested-by: Jan Hoffmann <jan at 3e8.eu>
> Signed-off-by: Bjørn Mork <bjorn at mork.no>
> ---
> Jan pointed put that I missed two fields on the RTL839x. Sloppy. Fix
> those as well.
> This time even without complaints from checkpatch :-)
> But build tested only.  I don't have any 839x and I don't know how
> to verify these features anyway.

+CC Andreas, Hiroshi, Luiz, Markus as rtl839x users.

For dsa_tag::queue, it looks like the (received) value is only ever used in log statements.

dsa_tag::crc_error is used to set sk_buff::ip_summed to either CHECKSUM_NONE or
CHECKSUM_UNNECESSARY. AFAICT invalid crc_error values could lead to invalid packets being marked as
valid (unlikely on a good connection), or redundant checksum calculations.

I think crc_error is the only one that might be causing issues, but probably not as bad as the issue
that was fixed with commit 545c6113c93b ("realtek: fix RTL838x receive tag decoding").

This patch is backed by the documentation, so if nobody is set up to check if it fixes anything, it
should be merged anyway.


More information about the openwrt-devel mailing list