netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>, netdev <netdev@vger.kernel.org>
Subject: Re: __sk_buff.data_end
Date: Thu, 20 Apr 2017 08:06:52 +0200	[thread overview]
Message-ID: <1492668412.3109.3.camel@sipsolutions.net> (raw)
In-Reply-To: <20170420001218.GA38173@ast-mbp.thefacebook.com> (sfid-20170420_021226_941694_C014E347)

On Wed, 2017-04-19 at 17:12 -0700, Alexei Starovoitov wrote:
> 
> also didn't we discuss that wifi has crazy non-linear skb?

Not always, depends on the driver.

But also, you have to remember that this filter would be before the
conversion to Ethernet header. Right now, when packets enter the stack,
we always linearize the 802.11 header - or even the whole frame for the
(rare) management packets. We don't do this before monitor mode and
before this filter right now, but there's no super good reason we can't
(it was just so we still report there in case of allocation failures.)

> this data/data_end is used by cls_bpf with headlen only
this data/data_end is used by cls_bpf with headlen only
> for direct packet access where performance matters.

Well performance does matter, though perhaps not as much - the people
I'd think could be the first to use this were adding code way after
doing many function calls, so ... :)

> Since wifi skbs have only eth in headlen, there is not much
> pointing adding support for data/data_end to wifi.
> Just use ld_abs/ld_ind instructions and load_bytes() helper.

You guys just told me not to support the skb access instructions ;-)

But yeah I have the load_bytes helper working. Just thought it might be
nice to get more. But we can also leave that for later.

johannes

  parent reply	other threads:[~2017-04-20  6:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 21:31 __sk_buff.data_end Johannes Berg
2017-04-19 22:20 ` __sk_buff.data_end Johannes Berg
2017-04-20  0:01   ` __sk_buff.data_end Daniel Borkmann
2017-04-20  0:12     ` __sk_buff.data_end Alexei Starovoitov
2017-04-20  0:38       ` __sk_buff.data_end Daniel Borkmann
2017-04-20  6:07         ` __sk_buff.data_end Johannes Berg
2017-04-20  6:06       ` Johannes Berg [this message]
2017-04-20  6:01     ` __sk_buff.data_end Johannes Berg
2017-04-20 14:10       ` __sk_buff.data_end Daniel Borkmann
2017-04-20 14:17         ` __sk_buff.data_end Johannes Berg
2017-04-20 14:28           ` __sk_buff.data_end Daniel Borkmann
2017-04-20 14:32             ` __sk_buff.data_end Johannes Berg
2017-04-20 14:46               ` __sk_buff.data_end Daniel Borkmann
2017-04-20 14:48                 ` __sk_buff.data_end Johannes Berg
2017-04-19 23:51 ` __sk_buff.data_end Daniel Borkmann

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=1492668412.3109.3.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).