netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Julian Labus <julian@freifunk-rtk.de>
Cc: netdev@vger.kernel.org, mschiffer@universe-factory.net
Subject: Re: stmmac: zero udp checksum
Date: Mon, 5 Apr 2021 18:42:53 +0200	[thread overview]
Message-ID: <YGs+DeFzhVh7UlEh@lunn.ch> (raw)
In-Reply-To: <98fcc1a7-8ce2-ac15-92a1-8c53b0e12658@freifunk-rtk.de>

> But was is still a bit strange to me is that it seems like the stmmac driver
> behaves different than other ethernet drivers which do not drop UDP packets
> with zero checksums when rx checksumming is enabled.

To answer that, you need somebody with more knowledge of the stmmac
hardware. It is actually quite hard to do. It means you need to parse
more of the frame to determine if the frame contains a VXLAN
encapsulated frame. Probably the stmmac cannot do that. It sees the
checksum is wrong and drops the packet.

Have you looked at where it actually drops the packet?
Is it one of

https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/stmicro/stmmac/norm_desc.c#L95

or

https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/stmicro/stmmac/enh_desc.c#L87

It could be, you need to see if the checksum has fail, then check if
the checksum is actually zero, and then go deeper into the frame and
check if it is a vxlan frame. It could be the linux software checksum
code knows about this vxlan exception, so you can just run that before
deciding to drop the frame.

	Andrew

  reply	other threads:[~2021-04-05 16:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 12:53 stmmac: zero udp checksum Julian Labus
2021-04-05 13:27 ` Andrew Lunn
2021-04-05 16:11   ` Julian Labus
2021-04-05 16:42     ` Andrew Lunn [this message]
2021-04-05 19:30       ` Julian Labus
2021-04-05 23:03       ` Jakub Kicinski
2021-05-20 12:18         ` Julian Labus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGs+DeFzhVh7UlEh@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=julian@freifunk-rtk.de \
    --cc=mschiffer@universe-factory.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).