[root@taj ~]# sysctl net.bpf_jitter.enable
net.bpf_jitter.enable: 1

It shows '1', but don’t know why the code under "BPF_JITTER" macro not getting 
executed.
----------------my code snippet-------------
#ifdef BPF_JITTER
                printf("JITTER filter\n");
                if (policy->flt_tbl[i].jit_filter)
                        ret = (*(policy->flt_tbl[i].jit_filter->func))(pkt,
                                                                pktlen, pktlen);
                else
                        ret = 0;
#else
                printf("bpf_filter\n");
                ret = bpf_filter(policy->flt_tbl[i].filter_rule.bf_insns, pkt,
                                                                pktlen, pktlen);
#endif

Thanks,
Krishna.
-----Original Message-----
From: Bjoern A. Zeeb [mailto:bzeeb-li...@lists.zabbadoz.net] 
Sent: Tuesday, September 20, 2016 2:48 AM
To: KrishnamRaju ErapaRaju <krish...@chelsio.com>
Cc: freebsd-net@freebsd.org
Subject: Re: unable to use BPF Just-In-Time compiler

On 19 Sep 2016, at 16:04, Jung-uk Kim wrote:

> On 09/17/2016 17:11, Bjoern A. Zeeb wrote:
>> On 15 Sep 2016, at 5:32, KrishnamRaju ErapaRaju wrote:
>>
>>> Hi,
>>>
>>> I want to use BPF JIT Kernel APIs in FreeBSD(like: bpf_jitter(), 
>>> etc..), for implementing TCP connection packet filtering.
>>>
>>> I have followed below instructions as specified in:
>>> https://lists.freebsd.org/pipermail/freebsd-current/2005-December/05
>>> 8603.html
>>>
>>>
>>> STEPS followed:
>>> ---------------------
>>> cp /usr/src/sys/amd64/conf/GENERIC /usr/src/sys/amd64/conf/MYKERNEL
>>>
>>> And added below line in MYKERNEL config file.
>>>         options BPF_JITTER
>>
>> I think you want
>>
>> device         bpf_jitter
>>
>> The options line to my understanding only turns it on by default.
>
> "options BPF_JITTER" works.  I don't know why the OP thinks that it 
> doesn't work, though.

Ok, let’s see;  if you boot your own kernel, what does

sysctl net.bpf_jitter.enable

say?

/bz
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to