From: Atzm Watanabe <atzm@stratosphere.co.jp>
To: "David Laight" <David.Laight@ACULAB.COM>
Cc: <netdev@vger.kernel.org>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Ben Hutchings" <bhutchings@solarflare.com>,
"David Miller" <davem@davemloft.net>,
"Daniel Borkmann" <dborkman@redhat.com>
Subject: Re: [PATCH v2] packet: Deliver VLAN TPID to userspace
Date: Thu, 12 Dec 2013 19:30:44 +0900 [thread overview]
Message-ID: <87sity744r.wl%atzm@stratosphere.co.jp> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B7480@saturn3.aculab.com>
At Wed, 11 Dec 2013 13:19:21 -0000,
David Laight wrote:
>
> > From: Atzm Watanabe
> ...
> > > You've defined a new header variant, but all the code seems to rely
> > > on the fact that the 'new' variant is identical to the old one
> > > with the addition of an extra field at the end.
> > >
> > > In which case it ought to be valid to just extend the old header variant.
> > > If the header really can change format there ought to be a discriminating
> > > member somewhere - which you don't seem to have changed.
> >
> > Yes. I think that struct tpacket3_hdr can grow safely until 48 bytes,
> > so I'd just like to extend tpacket_hdr_variant1 like you said.
> >
> > But in the past discussions, there were mentions that a new member
> > cannot be added into struct tpacket_hdr_variant1, and possibly the
> > variant which includes a new member should be separated from the old
> > one.
> >
> > http://patchwork.ozlabs.org/patch/284671/
> > http://patchwork.ozlabs.org/patch/285382/
>
> I don't remember it being mentioned earlier that there are pad bytes
> following the header.
>
> Might be worth explicitly defining the pad bytes and zeroing them.
> That could make additional changes easier.
Agreed.
But I think that struct tpacket{2,3}_hdr can be padded but struct
tpacket_hdr is not, because its size may differ depending on
architectures.
So I'll try to pad only to struct tpacket{2,3}_hdr.
Thank you.
prev parent reply other threads:[~2013-12-12 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 12:41 [PATCH v2] packet: Deliver VLAN TPID to userspace Atzm Watanabe
2013-12-10 12:59 ` David Laight
2013-12-11 12:53 ` Atzm Watanabe
2013-12-11 13:19 ` David Laight
2013-12-12 10:30 ` Atzm Watanabe [this message]
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=87sity744r.wl%atzm@stratosphere.co.jp \
--to=atzm@stratosphere.co.jp \
--cc=David.Laight@ACULAB.COM \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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