[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210618151941.04a2494d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 18 Jun 2021 15:19:41 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Arijit De <arijitde@...vell.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: Ping frame drop
On Fri, 18 Jun 2021 15:03:59 +0000 Arijit De wrote:
> Hi,
>
> In the latest linux kernel (i.e. 5.12.x) I am observing that for my
> Ethernet driver ping test has stopped working, it was working in
> 5.4.x and all the older kernels. I have debugged the issue and root
> caused that it's because of the recent commit
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8f9a69a92fc63917c9bd921b28e3b2912980becf
>
> In my Network card HW it supports checksum offload for IPv4 frame,
> but it can't verify checksum for the ICMP frames, so I use
> CHECKSUM_PARTIAL in the skb->ip_summed for this kind of scenario.
Do you mean that your drivers sets up CHECKSUM_PARTIAL on Rx? If HW
hasn't validated the checksum just leave the skb with CHECKSUM_NONE,
the stack will validate.
> But now because of this new logic what you have added ping frames are
> getting dropped.
>
> My Ping packets skb dump:
> [112241.545219] skb len=88 headroom=78 headlen=0 tailroom=0
> [112241.545219] mac=(64,-64) net=(0,-1) trans=-1
> [112241.545219] shinfo(txflags=0 nr_frags=1 gso(size=0 type=0 segs=0))
> [112241.545219] csum(0x0 ip_summed=3 complete_sw=0 valid=0 level=0)
> [112241.545219] hash(0x0 sw=0 l4=0) proto=0x0800 pkttype=0 iif=0
> [112241.572837] dev name=enp137s0 feat=0x0x0000010000004813
> [112241.578141] skb headroom: 00000000: 4c 00 70 35 09 de b4 e4 00 11
> 22 33 44 01 08 06 [112241.585876] skb headroom: 00000010: 00 01 08 00
> 06 04 00 02 00 11 22 33 44 01 0a 1c [112241.593611] skb headroom:
> 00000020: 28 13 70 35 09 de b4 e4 0a 1c 28 01 00 00 00 00
> [112241.601345] skb headroom: 00000030: 50 04 00 00 55 50 00 00 14 00
> 03 00 00 00 00 00 [112241.609080] skb headroom: 00000040: 00 11 22 33
> 44 01 ac 1f 6b d2 c0 e5 08 00 [112241.616293] skb frag: 00000000:
> 45 00 00 54 87 a2 40 00 40 01 4d e3 0a 1c 28 d9 [112241.624027] skb
> frag: 00000010: 0a 1c 28 13 08 00 fd 50 0c a8 00 03 6a 94 cc 60
> [112241.631762] skb frag: 00000020: 00 00 00 00 f5 3b 03 00 00 00
> 00 00 10 11 12 13 [112241.639496] skb frag: 00000030: 14 15 16 17
> 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 [112241.647230] skb frag:
> 00000040: 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33
> [112241.654965] skb frag: 00000050: 34 35 36 37 9c b0 19 b9
>
> Its hitting the check for CHECKSUM_PARTIAL in pskb_trim_rcsum_slow()
> and getting dropped there. Can you please let me know how can I
> satisfy the requirement such that I can keep supporting the
> CHECKSUM_PARTIAL cases for my network card ? I have checked
> include/linux/skbuff.h For the documentation of CHECKSUM_PARTIAL, but
> could not understand what change I have to do to make it working
> again. My network driver is not up streamed yet in the linux kernel.
> For any more information please do let me know.
Powered by blists - more mailing lists