Re: Packet drop while using BPF filter
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Have you tried enabling -- /proc/sys/net/core/bpf_jit_enable --
provides JIT compiled BPF on 64 bit linux.
* On Wed, Dec 21, 2011 at 12:08:04AM +0530, Mukesh Yadav <mukesh.fkd@xxxxxxxxx> wrote:
I am working on user level code which uses BPF filter.
Solution has two threads and BPF filter for incoming packets to raw socket
dedicated to each thread.
Intent is to divide ingress traffic between two thread based on whether
dest IP is even or odd.
BPF filters used are:
Even IP filter :-> tcpdump -i interface 'ether dst <dest mac> && ip &
0x01 = 0'
Odd IP filter :-> tcpdump -i interface 'ether dst <dest mac> && ip &
0x01 = 1'
There is a packet loss for odd IP thread even when CPU is available. Reason
being packet drop due recv buffer full.
Same amount of traffic is well handled by even IP thread(user code being
same in both), scaling CPU to full 100%.
In odd IP thread, If filter is changed to "tcpdump -i interface 'ether dst
<dest mac> && ip proto 17' ", all goes fine.
Also CPU usage at kernel drops from 50% to 4 % for a particular amount of
Would appreciate any I/ps for reducing load at kernel for packet
filtering(Odd/Even IP distribution)
Kernelnewbies mailing list
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[Newbies FAQ] [Linux Kernel Development] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI]