netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: Update sysctl documentation to list all supported architectures
@ 2017-08-16  5:15 Michael Ellerman
  2017-08-16  8:18 ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2017-08-16  5:15 UTC (permalink / raw)
  To: ast, daniel; +Cc: davem, netdev, linux-kernel

The sysctl documentation states that the JIT is only available on
x86_64, which is no longer correct.

Update the list to include all architectures that enable HAVE_CBPF_JIT
or HAVE_EBPF_JIT under some configuration.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 Documentation/sysctl/net.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 14db18c970b1..f68356024d09 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -36,8 +36,9 @@ bpf_jit_enable
 --------------
 
 This enables Berkeley Packet Filter Just in Time compiler.
-Currently supported on x86_64 architecture, bpf_jit provides a framework
-to speed packet filtering, the one used by tcpdump/libpcap for example.
+Currently supported on arm, arm64, mips, powerpc, s390, sparc and x86_64
+architectures, bpf_jit provides a framework to speed packet filtering, the one
+used by tcpdump/libpcap for example.
 Values :
 	0 - disable the JIT (default value)
 	1 - enable the JIT
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures
  2017-08-16  5:15 [PATCH] bpf: Update sysctl documentation to list all supported architectures Michael Ellerman
@ 2017-08-16  8:18 ` Daniel Borkmann
  2017-08-16 11:10   ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2017-08-16  8:18 UTC (permalink / raw)
  To: Michael Ellerman, ast; +Cc: davem, netdev, linux-kernel

Hi Michael,

On 08/16/2017 07:15 AM, Michael Ellerman wrote:
> The sysctl documentation states that the JIT is only available on
> x86_64, which is no longer correct.
>
> Update the list to include all architectures that enable HAVE_CBPF_JIT
> or HAVE_EBPF_JIT under some configuration.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Thanks for the patch!

>   Documentation/sysctl/net.txt | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
> index 14db18c970b1..f68356024d09 100644
> --- a/Documentation/sysctl/net.txt
> +++ b/Documentation/sysctl/net.txt
> @@ -36,8 +36,9 @@ bpf_jit_enable
>   --------------
>
>   This enables Berkeley Packet Filter Just in Time compiler.
> -Currently supported on x86_64 architecture, bpf_jit provides a framework
> -to speed packet filtering, the one used by tcpdump/libpcap for example.
> +Currently supported on arm, arm64, mips, powerpc, s390, sparc and x86_64
> +architectures, bpf_jit provides a framework to speed packet filtering, the one
> +used by tcpdump/libpcap for example.

Good point, could we actually make that as a bullet list and
differentiate between cBPF and eBPF JITs, so that a user doesn't
need to run git grep HAVE_{E,C}BPF_JIT to figure it out what the
switch enables on the arch used? That would be great.

So for eBPF JITs, we have covered:

  * x86_64
  * arm64
  * ppc64
  * sparc64
  * mips64

For old cBPF, there is:

  * arm
  * mips
  * ppc
  * sparc

Thanks,
Daniel

>   Values :
>   	0 - disable the JIT (default value)
>   	1 - enable the JIT
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures
  2017-08-16  8:18 ` Daniel Borkmann
@ 2017-08-16 11:10   ` Michael Ellerman
  2017-08-16 13:29     ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2017-08-16 11:10 UTC (permalink / raw)
  To: Daniel Borkmann, ast; +Cc: davem, netdev, linux-kernel

Daniel Borkmann <daniel@iogearbox.net> writes:

> Hi Michael,
>
> On 08/16/2017 07:15 AM, Michael Ellerman wrote:
>> The sysctl documentation states that the JIT is only available on
>> x86_64, which is no longer correct.
>>
>> Update the list to include all architectures that enable HAVE_CBPF_JIT
>> or HAVE_EBPF_JIT under some configuration.
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Thanks for the patch!
>
>>   Documentation/sysctl/net.txt | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
>> index 14db18c970b1..f68356024d09 100644
>> --- a/Documentation/sysctl/net.txt
>> +++ b/Documentation/sysctl/net.txt
>> @@ -36,8 +36,9 @@ bpf_jit_enable
>>   --------------
>>
>>   This enables Berkeley Packet Filter Just in Time compiler.
>> -Currently supported on x86_64 architecture, bpf_jit provides a framework
>> -to speed packet filtering, the one used by tcpdump/libpcap for example.
>> +Currently supported on arm, arm64, mips, powerpc, s390, sparc and x86_64
>> +architectures, bpf_jit provides a framework to speed packet filtering, the one
>> +used by tcpdump/libpcap for example.
>
> Good point, could we actually make that as a bullet list and
> differentiate between cBPF and eBPF JITs, so that a user doesn't
> need to run git grep HAVE_{E,C}BPF_JIT to figure it out what the
> switch enables on the arch used? That would be great.

We could.

Does a user of the sysctl want/need to know the difference though? Or do
they just want to turn on "the JIT"?

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures
  2017-08-16 11:10   ` Michael Ellerman
@ 2017-08-16 13:29     ` Daniel Borkmann
  2017-08-17 10:31       ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2017-08-16 13:29 UTC (permalink / raw)
  To: Michael Ellerman, ast; +Cc: davem, netdev, linux-kernel

On 08/16/2017 01:10 PM, Michael Ellerman wrote:
> Daniel Borkmann <daniel@iogearbox.net> writes:
>> On 08/16/2017 07:15 AM, Michael Ellerman wrote:
>>> The sysctl documentation states that the JIT is only available on
>>> x86_64, which is no longer correct.
>>>
>>> Update the list to include all architectures that enable HAVE_CBPF_JIT
>>> or HAVE_EBPF_JIT under some configuration.
>>>
>>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>>
>> Thanks for the patch!
>>
>>>    Documentation/sysctl/net.txt | 5 +++--
>>>    1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
>>> index 14db18c970b1..f68356024d09 100644
>>> --- a/Documentation/sysctl/net.txt
>>> +++ b/Documentation/sysctl/net.txt
>>> @@ -36,8 +36,9 @@ bpf_jit_enable
>>>    --------------
>>>
>>>    This enables Berkeley Packet Filter Just in Time compiler.
>>> -Currently supported on x86_64 architecture, bpf_jit provides a framework
>>> -to speed packet filtering, the one used by tcpdump/libpcap for example.
>>> +Currently supported on arm, arm64, mips, powerpc, s390, sparc and x86_64
>>> +architectures, bpf_jit provides a framework to speed packet filtering, the one
>>> +used by tcpdump/libpcap for example.
>>
>> Good point, could we actually make that as a bullet list and
>> differentiate between cBPF and eBPF JITs, so that a user doesn't
>> need to run git grep HAVE_{E,C}BPF_JIT to figure it out what the
>> switch enables on the arch used? That would be great.
>
> We could.
>
> Does a user of the sysctl want/need to know the difference though? Or do
> they just want to turn on "the JIT"?

They would just turn it on, but I think it would be nice to inform
them which archs support eBPF (which is a superset of cBPF in term
of what can be jited), so in case they have some native eBPF programs
they would see whether these can also be jited.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] bpf: Update sysctl documentation to list all supported architectures
  2017-08-16 13:29     ` Daniel Borkmann
@ 2017-08-17 10:31       ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-08-17 10:31 UTC (permalink / raw)
  To: Daniel Borkmann, ast; +Cc: davem, netdev, linux-kernel

Daniel Borkmann <daniel@iogearbox.net> writes:
> On 08/16/2017 01:10 PM, Michael Ellerman wrote:
>> Daniel Borkmann <daniel@iogearbox.net> writes:
>>> On 08/16/2017 07:15 AM, Michael Ellerman wrote:
>>>> diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
>>>> index 14db18c970b1..f68356024d09 100644
>>>> --- a/Documentation/sysctl/net.txt
>>>> +++ b/Documentation/sysctl/net.txt
>>>> @@ -36,8 +36,9 @@ bpf_jit_enable
>>>>    --------------
>>>>
>>>>    This enables Berkeley Packet Filter Just in Time compiler.
>>>> -Currently supported on x86_64 architecture, bpf_jit provides a framework
>>>> -to speed packet filtering, the one used by tcpdump/libpcap for example.
>>>> +Currently supported on arm, arm64, mips, powerpc, s390, sparc and x86_64
>>>> +architectures, bpf_jit provides a framework to speed packet filtering, the one
>>>> +used by tcpdump/libpcap for example.
>>>
>>> Good point, could we actually make that as a bullet list and
>>> differentiate between cBPF and eBPF JITs, so that a user doesn't
>>> need to run git grep HAVE_{E,C}BPF_JIT to figure it out what the
>>> switch enables on the arch used? That would be great.
>>
>> We could.
>>
>> Does a user of the sysctl want/need to know the difference though? Or do
>> they just want to turn on "the JIT"?
>
> They would just turn it on, but I think it would be nice to inform
> them which archs support eBPF (which is a superset of cBPF in term
> of what can be jited), so in case they have some native eBPF programs
> they would see whether these can also be jited.

OK. v2 just sent.

The text could probably use some more tweaking to mention the other
things BPF is used for these days, but I didn't really feel qualified to
do that.

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-17 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16  5:15 [PATCH] bpf: Update sysctl documentation to list all supported architectures Michael Ellerman
2017-08-16  8:18 ` Daniel Borkmann
2017-08-16 11:10   ` Michael Ellerman
2017-08-16 13:29     ` Daniel Borkmann
2017-08-17 10:31       ` Michael Ellerman

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).