Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Sep 2016 15:41:40 +0000
From:      KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
To:        Navdeep Parhar <np@FreeBSD.org>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, "freebsd-net@freebsd.org" <freebsd-net@FreeBSD.org>
Subject:   RE: unable to use BPF Just-In-Time compiler
Message-ID:  <BN4PR12MB0818BB892C9C88A0918FD4FE94F70@BN4PR12MB0818.namprd12.prod.outlook.com>
In-Reply-To: <20160920063402.GA15975@ox>
References:  <BN4PR12MB0818CC41AAD82420B3C3EB3A94F00@BN4PR12MB0818.namprd12.prod.outlook.com> <3F7A8F51-D404-4FEF-910C-8E51DD5061AD@lists.zabbadoz.net> <BN4PR12MB0818C8FD374C179C45953DF094F40@BN4PR12MB0818.namprd12.prod.outlook.com> <20160920063402.GA15975@ox>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Navdeep,  Now I understood that if any C file want to use a specific=
 'options' (defined in the config file), then its corresponding .h file(fou=
nd at sys/conf/options<arch>) needs to be included.

#include "opt_bpf.h"

My issue resolved after adding the above line in all C files which used BPF=
_FILTER macro.

Thanks,
Krishna.

-----Original Message-----
From: Navdeep Parhar [mailto:nparhar@gmail.com] On Behalf Of Navdeep Parhar
Sent: Tuesday, September 20, 2016 12:04 PM
To: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
Cc: Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net>; freebsd-net@freebsd.or=
g
Subject: Re: unable to use BPF Just-In-Time compiler

Use "options BPF_JITTER" in your kernconf.  If this is new code you must in=
clude opt_bpf.h in it.  If it's part of a module then the module's makefile=
 must have opt_bpf.h in its SRCS.  When in doubt take a look at all the obt=
_bpf.h in your obj tree after the buildkernel and see if they have "#define=
 BPF_JITTER 1" or not.  Remove all opt_bpf.h files in the obj tree and retr=
y buildkernel if all else fails.

Regards,
Navdeep

On Mon, Sep 19, 2016 at 10:41:38AM +0000, KrishnamRaju ErapaRaju wrote:
> Thanks for your response Bjeorn.
>=20
> I added "device         bpf_jitter"  line as you suggested, but not luck.
> Still no code under BPF_JITTER macro is executing.
>=20
> Please help me  enabling JIT compiler.
>=20
> Thanks,
> Krishna.
> -----Original Message-----
> From: Bjoern A. Zeeb [mailto:bzeeb-lists@lists.zabbadoz.net]
> Sent: Sunday, September 18, 2016 2:41 AM
> To: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>
> Cc: freebsd-net@freebsd.org
> Subject: Re: unable to use BPF Just-In-Time compiler
>=20
> On 15 Sep 2016, at 5:32, KrishnamRaju ErapaRaju wrote:
>=20
> > Hi,
> >
> > I want to use BPF JIT Kernel APIs in FreeBSD(like: bpf_jitter(),=20
> > etc..), for implementing TCP connection packet filtering.
> >
> > I have followed below instructions as specified in:=20
> > https://lists.freebsd.org/pipermail/freebsd-current/2005-December/05
> > 86
> > 03.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
>=20
> I think you want
>=20
> device         bpf_jitter
>=20
> The options line to my understanding only turns it on by default.
>=20
> >
> > make buildkernel KERNCONF=3DMYKERNEL
> > make installkernel KERNCONF=3DMYKERNEL reboot
> >
> > But after reboot the flag BPF_JITTER is not getting enabled(all the=20
> > code inside "#ifdef BPF_JITTER" is not getting executed).
> >
> > Am I missing something?
> >
> > Also it looks like there are not many updates to BPF JIT code since=20
> > 2005, is it stable? anyone using it?
> >
> > Thanks,
> > Krishna.
> > _______________________________________________
> > freebsd-net@freebsd.org mailing list=20
> > https://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BN4PR12MB0818BB892C9C88A0918FD4FE94F70>