Wireshark-dev: [Wireshark-dev] Enabling linux kernel jit compiler from dumpcap?

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Thu, 22 Aug 2013 11:46:37 +0000

Hi

Should we add code to enable the JIT compiler from dumpcap?

 

From netsniff-ng bpf.c

 

int enable_kernel_bpf_jit_compiler(void)

{

                int fd;

                ssize_t ret;

                char *file = "/proc/sys/net/core/bpf_jit_enable";

 

                fd = open(file, O_WRONLY);

                if (unlikely(fd < 0))

                                return -1;

 

                ret = write(fd, "1", strlen("1"));

 

                close(fd);

                return ret;

}

 

Regards

Anders