[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5356DAD4.8090100@redhat.com>
Date: Tue, 22 Apr 2014 23:10:44 +0200
From: Daniel Borkmann <dborkman@...hat.com>
To: Chema Gonzalez <chema@...gle.com>
CC: David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Alexei Starovoitov <ast@...mgrid.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2] filter: added BPF random opcode
On 04/21/2014 06:21 PM, Chema Gonzalez wrote:
> Added a new ancillary load (bpf call in eBPF parlance) that produces
> a 32-bit random number. We are implementing it as an ancillary load
> (instead of an ISA opcode) because (a) it is simpler, (b) allows easy
> JITing, and (c) seems more in line with generic ISAs that do not have
> "get a random number" as a instruction, but as an OS call.
>
> The main use for this ancillary load is to perform random packet sampling.
>
> Signed-off-by: Chema Gonzalez <chema@...gle.com>
Generally, I'm fine with your patch. If some day other use cases pop up
in non-packet filtering areas, we might need to let it return a 64 bit
number, but lets see. Thanks again for updating bpf_asm as well!
Acked-by: Daniel Borkmann <dborkman@...hat.com>
--
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