[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397572894.4222.98.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 15 Apr 2014 07:41:34 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Daniel Borkmann <dborkman@...hat.com>
Cc: Chema Gonzalez <chema@...gle.com>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
ast@...mgrid.com
Subject: Re: [PATCH] filter: added BPF random opcode
On Tue, 2014-04-15 at 09:24 +0200, Daniel Borkmann wrote:
> > @@ -773,6 +779,7 @@ static bool convert_bpf_extensions(struct sock_filter *fp,
> > case SKF_AD_OFF + SKF_AD_NLATTR:
> > case SKF_AD_OFF + SKF_AD_NLATTR_NEST:
> > case SKF_AD_OFF + SKF_AD_CPU:
> > + case SKF_AD_OFF + SKF_AD_RANDOM:
>
> I think instead of a function call, this sould rather be modelled
> directly into the internal insn set and thus converted differently,
> so we can spare us the call.
Hmmm... this would need percpu storage, thus preempt disable/enable
calls, and prandom_u32_state() is about 40 instructions.
This is really not worth the pain.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists