Wireshark-dev: Re: [Wireshark-dev] Enabling linux kernel jit compiler from dumpcap?
From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Fri, 23 Aug 2013 10:26:59 +0000
> For people not reading the documentation capturing will be a bit slower or we could put a note on the welcome screen if JIT is not enabled.
For persistently enabling JIT we could also mention Sysfsutils [1].
> I would prefer not adding features which can be implemented easily with two lines of scripts or with a change in the system configuration.

Could you provide patches for this alternative solution?
Regards
Anders

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Bálint Réczey
Sent: den 23 augusti 2013 10:50
To: Anders Broman
Cc: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Enabling linux kernel jit compiler from dumpcap?

Hi,

2013/8/23 Anders Broman <a.broman@xxxxxxxxxxxx>:
> Bálint Réczey skrev 2013-08-22 23:02:
...
>> Regarding Wireshark I would prefer suggesting "echo 1 > 
>> /proc/sys/net/core/bpf_jit_enable" in the documentation instead of 
>> adding code to enable JIT.
>> There may be good reasons for not enabling it by default in the Linux 
>> kernel.
>
> The problematic thing is that people seldom reads the documentation, 
> the setting gets reset at a reboot and it's easy to forget to 
> re-enable it. The ideal thing would be if dumpcap
For people not reading the documentation capturing will be a bit slower or we could put a note on the welcome screen if JIT is not enabled.
For persistently enabling JIT we could also mention Sysfsutils [1].

> - Had a preference/command line flag whether to use JIT or not.
> - If told to use it check if it was enabled or not used JIT and put it 
> back to zero if not set when starting.
I would prefer not adding features which can be implemented easily with two lines of scripts or with a change in the system configuration.

> Wireshark could then default to use JIT and some warnings could be 
> displayed in the welcome screen and in dumpcaps help output.
>
> netsniff-ng activates it by default it seems.
I think it is not very kind of them.

Cheers,
Balint

> Regards
> Anders
>
>>
>> Cheers,
>> Balint
>>
>> 2013/8/22 Anders Broman <a.broman@xxxxxxxxxxxx>:
>>>
>>> Guy Harris skrev 2013-08-22 18:16:
>>>
>>>> On Aug 22, 2013, at 4:46 AM, Anders Broman 
>>>> <anders.broman@xxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Should we add code to enable the JIT compiler from dumpcap?
>>>>
>>>> Should I add code to enable the JIT compiler to libpcap while I'm at it?
>>>>
>>>> Should the Linux kernel folks enable it by default?
>>>>
>>>> I'm inclined to answer "yes" to all three questions.  I think the 
>>>> FreeBSD JIT compiler is enabled by default.  I'm surprised that the 
>>>> Linux one isn't.
>>>
>>> I checked in the dumpcap code. I agree that it might be useful in 
>>> libpcap too, root privileges are required to change it I think. and 
>>> Yes
>>>
>>>> I'm surprised that the Linux one isn't
>>>
>>> Regards
>>> Anders
>>>
>>>>

[1] http://linux-diag.sourceforge.net/Sysfsutils.html
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe