From: Michael Walle <michael@walle.cc>
To: "Jan Grashöfer" <jan.grashoefer@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Steinar H. Gunderson" <sesse@google.com>,
heiko.thiery@gmail.com
Subject: Re: vlan missing with AF_PACKET and auxdata
Date: Mon, 24 Sep 2018 16:25:03 +0200 [thread overview]
Message-ID: <f8a4855240c23dd03e936ba270126ad5@walle.cc> (raw)
In-Reply-To: <29cdf22a-eceb-eab9-979d-049e261a6064@gmail.com>
Am 2018-09-24 14:22, schrieb Jan Grashöfer:
> Hi Michael,
>
> On 24/09/2018 14:01, Michael Walle wrote:
>> I'm using the AF_PACKET socket with setsockopt(PACKET_AUXDATA) to get
>> the incoming VLAN tag. Correct me if I'm wrong, but as far as I see
>> the first VLAN tag is always stripped - either in hardware or in
>> net/core/dev.c in __netif_receive_skb_core() - and stored in
>> skb->vlan_tci. Therefore, it won't be in the packet data anymore.
>
> although the documentation says "SOCK_RAW packets are passed to and
> from the device driver without any changes in the packet data." [1]
> that's correct and was discussed here:
> https://www.spinics.net/lists/netdev/msg440313.html
>
> Result of the discussion: Won't fix, too complicated.
Hi Jan,
thanks for the pointer. I'm fine with this decision, because the VLAN
tag should be available through metadata. And this was my original
question, because the metadata is only available in case of proto ==
ETH_P_ALL, but not for proto != ETH_P_ALL because of the commit in
question.
-michael
next prev parent reply other threads:[~2018-09-24 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 12:01 vlan missing with AF_PACKET and auxdata Michael Walle
2018-09-24 12:22 ` Jan Grashöfer
2018-09-24 14:25 ` Michael Walle [this message]
2018-10-02 8:13 ` Michael Walle
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=f8a4855240c23dd03e936ba270126ad5@walle.cc \
--to=michael@walle.cc \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=heiko.thiery@gmail.com \
--cc=jan.grashoefer@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sesse@google.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).