From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Chengen Du <chengen.du@canonical.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
alexandre.ferrieux@orange.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] af_packet: Handle outgoing VLAN packets without hardware offloading
Date: Thu, 23 May 2024 10:52:25 -0400 [thread overview]
Message-ID: <664f5829d6485_1b5d2429420@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <CAPza5qfam1DBffBJWjOrMsSW8J+6ans7apeX=64YVCixBWX-tQ@mail.gmail.com>
Chengen Du wrote:
> Hi Willem, all,
>
> Thank you for highlighting the QinQ and L2.5 issues.
> These are areas I am not very familiar with, and I appreciate your guidance.
>
> To address the QinQ and L2.5 issues, the third approach seems like a
> promising solution.
> If I understand correctly, in the QinQ scenario, we need to preserve
> the link layer header because it includes two VLAN tags.
> For the L2.5 issue, we can adjust by pulling mac_len instead of
> skb_network_offset.
> In summary, we may need to retain the link layer header to enable
> receivers to parse different protocol scenarios.
>
> Although this approach can resolve all issues, it requires the
> receiver's cooperation to implement the parsing logic of the link
> layer header.
I was about to bring up the same.
Existing BPF filters may expect L3 headers. A change like this will
have to be opt-in through a socket option.
Since I see no better option to support all L2.5 protocols, if this
is something that tcpdump/pcap would use, we should do it.
> I am concerned that this implementation may take time and adding it
> directly into the kernel could place time pressure on existing users.
>
> I would like to propose some ideas and welcome your thoughts on them.
> Firstly, I suggest we address the VLAN issue using the second
> approach, as it appears to be a bug and can be resolved without
> affecting current users.
Agreed. Let me respond in more detail to your original patch.
> Secondly, we could introduce the link layer header preservation via a
> new packet socket flag.
> Receivers could implement and test this by enabling the socket flag.
> This way, we avoid disrupting existing receiver behavior while
> providing the capability to parse more complex protocols.
next prev parent reply other threads:[~2024-05-23 14:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 7:03 [PATCH] af_packet: Handle outgoing VLAN packets without hardware offloading Chengen Du
2024-05-20 18:35 ` Willem de Bruijn
2024-05-21 3:31 ` Chengen Du
2024-05-21 8:35 ` Paolo Abeni
2024-05-21 13:28 ` Willem de Bruijn
2024-05-22 14:27 ` Chengen Du
2024-05-22 18:39 ` Willem de Bruijn
2024-05-22 19:54 ` alexandre.ferrieux
2024-05-23 14:17 ` Chengen Du
2024-05-23 14:52 ` Willem de Bruijn [this message]
2024-05-23 14:56 ` Willem de Bruijn
2024-05-24 14:04 ` Chengen Du
2024-05-25 15:51 ` Willem de Bruijn
2024-05-25 20:55 ` alexandre.ferrieux
2024-05-26 15:25 ` Willem de Bruijn
2024-05-27 0:18 ` alexandre.ferrieux
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=664f5829d6485_1b5d2429420@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=alexandre.ferrieux@orange.com \
--cc=chengen.du@canonical.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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