From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Toppins <jtoppins@redhat.com>,
Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@gmail.com>,
Liang Li <liali@redhat.com>
Subject: Re: [PATCH net] bonding: fix ICMPv6 header handling when receiving IPv6 messages
Date: Thu, 03 Nov 2022 17:03:59 +0100 [thread overview]
Message-ID: <171898.1667491439@vermin> (raw)
In-Reply-To: <Y2EqgyAChS1/6VqP@Laptop-X1>
Hangbin Liu <liuhangbin@gmail.com> wrote:
>On Tue, Nov 01, 2022 at 09:39:22PM +0800, Hangbin Liu wrote:
>> > I don't understand this explanation, as ipv6_gro_receive() isn't
>> > called directly by the device drivers, but from within the GRO
>> > processing, e.g., by dev_gro_receive().
>> >
>> > Could you explain how the call paths actually differ?
>>
>> Er..Yes, it's a little weird.
>>
>> I checked if the transport header is set before __netif_receive_skb_core().
>> The bnx2x driver set it while be2net does not. So the transport header is reset
>> in __netif_receive_skb_core() with be2net.
>>
>> I also found ipv6_gro_receive() is called before bond_handle_frame() when
>> receive NA message. Not sure which path it go through. I'm not very familiar
>> with driver part. But I can do more investigating.
I suspect that what you're seeing is caused by bnx2x calling
skb_set_transport_header() in bnx2x_gro_ipv6_csum() to explicitly set
the transport header for IPv6, and benet having no equivalent call. If
benet were to set the transport header, I think it would happen in
be_rx_compl_process_gro().
__netif_receive_skb_core() calls skb_reset_transport_header() if
the transport header isn't set, but I presume that doesn't do the right
thing for ICMPv6.
I don't believe there's any expectation that drivers must set
the transport header at this point, so I tentatively think that what
your patch is trying to do is reasonable.
Briefly looking at the patch, the commit message needs updating,
and I'm curious to know why pskb_may_pull can't be used.
-J
>With dump_stack(), it shows bnx2x do calls ipv6_gro_receive().
>PS: I only dump the stack when receive NA.
>
>[ 65.537605] dump_stack_lvl+0x34/0x48
>[ 65.541695] ipv6_gro_receive.cold+0x1b/0x3d
>[ 65.546453] dev_gro_receive+0x16c/0x380
>[ 65.550831] napi_gro_receive+0x64/0x210
>[ 65.555206] bnx2x_rx_int+0x44c/0x820 [bnx2x]
>[ 65.560100] bnx2x_poll+0xe5/0x1d0 [bnx2x]
>[ 65.564687] __napi_poll+0x2c/0x160
>[ 65.568579] net_rx_action+0x296/0x350
>
>Thanks
>Hangbin
---
-Jay Vosburgh, jay.vosburgh@canonical.com
next prev parent reply other threads:[~2022-11-03 16:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 9:13 [PATCH net] bonding: fix ICMPv6 header handling when receiving IPv6 messages Hangbin Liu
2022-11-01 10:12 ` Jay Vosburgh
2022-11-01 13:39 ` Hangbin Liu
2022-11-01 14:17 ` Hangbin Liu
2022-11-03 16:03 ` Jay Vosburgh [this message]
2022-11-04 8:08 ` Hangbin Liu
2022-11-04 8:18 ` Jay Vosburgh
2022-11-04 11:50 ` Hangbin Liu
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=171898.1667491439@vermin \
--to=jay.vosburgh@canonical.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=liali@redhat.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).