All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: __sk_buff.data_end
Date: Thu, 20 Apr 2017 16:48:11 +0200	[thread overview]
Message-ID: <1492699691.3109.11.camel@sipsolutions.net> (raw)
In-Reply-To: <58F8C9BA.3090707@iogearbox.net>

On Thu, 2017-04-20 at 16:46 +0200, Daniel Borkmann wrote:
> > Hmm. I don't see what "somewhere else" I could possibly have
> > though, given that I want the (kernel-side) context to be "struct
> > sk_buff *" to allow the skb helpers?
> 
> I have not enough context on the wireless side, perhaps could be
> somewhere under skb->dev->ieee80211_ptr or so, iff suitable. 

I don't think I even have skb->dev assigned at this point :)

> But
> it also really doesn't matter much since this is all transparently
> handled in the kernel, meaning these kind of rewrites can still be
> changed at a later point in time, f.e. if it's only 'u64 boottime_ns'
> right now, that could live directly in the cb[] w/o extra pointer,
> and should that grow to more members, then it could be moved behind
> a pointer later on and it still works as-is from the program point
> of view.

Well, there are 48 bytes in the cb already, so doing this would mean
moving two pointer-sized things out, but yeah - as long as we don't add
everything right now we can keep those things that are available to BPF
in the cb and move something else out.

As long as what I described there with the indirect load works, I'm
fine with this, and I can even do data_end pretty easily then.

johannes

  reply	other threads:[~2017-04-20 14:48 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       ` __sk_buff.data_end Johannes Berg
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                 ` Johannes Berg [this message]
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=1492699691.3109.11.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.