From: Daniel Borkmann <daniel@iogearbox•net>
To: Johannes Berg <johannes@sipsolutions•net>,
Alexei Starovoitov <ast@kernel•org>
Cc: netdev <netdev@vger•kernel.org>
Subject: Re: __sk_buff.data_end
Date: Thu, 20 Apr 2017 01:51:55 +0200 [thread overview]
Message-ID: <58F7F81B.8040901@iogearbox.net> (raw)
In-Reply-To: <1492637460.22185.6.camel@sipsolutions.net>
On 04/19/2017 11:31 PM, Johannes Berg wrote:
> Hi Alexei, Daniel,
>
> I'm looking at adding the __wifi_sk_buff I talked about, and I notice
> that it uses CB space to store data_end. Unfortunately, in a lot of
> cases, we don't have any CB space to spare in wifi.
>
> Is there any way to generate a series of instructions that instead does
> the necessary calculations? I don't actually *see* such a way, because
> I don't see how I could have a scratch register or scratch stack space,
> but perhaps there's a way to do it?
One option would be, similarly as in bpf_prog_run_save_cb(), to just
save / restore _only_ the data_end pointer portion for this. Calculating
this inline via bpf_convert_ctx_access() would indeed need one more
reg than just the dst reg available in order to perform the data_end
calculation only as BPF insns.
prev parent reply other threads:[~2017-04-19 23:52 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 ` __sk_buff.data_end Johannes Berg
2017-04-19 23:51 ` Daniel Borkmann [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=58F7F81B.8040901@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=ast@kernel$(echo .)org \
--cc=johannes@sipsolutions$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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