From owner-freebsd-net@freebsd.org Tue Sep 20 15:56:10 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D94CEBE1283 for ; Tue, 20 Sep 2016 15:56:10 +0000 (UTC) (envelope-from Krishna2@chelsio.com) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0114.outbound.protection.outlook.com [104.47.36.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88AC6622; Tue, 20 Sep 2016 15:56:09 +0000 (UTC) (envelope-from Krishna2@chelsio.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chelsious.onmicrosoft.com; s=selector1-chelsio-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cnUVDb4Whfb83XJTIIoTYF7KJn5RKID5gQqVKUDkhpM=; b=cobMdyIpIoMJ6I3QceZwOPs/BPs8YKY1ltYKYgT8p7FYUGrW5pv2oQn/v030ibbQuiDCQ0bAET1wBZGb+6f5EbyQ7NpZteAdW+xlA5o0wjxaDszKnlqkhV/BXD+mzw0U4tfW8pFoXFzoygBTP5zrddXIFpw8nAUmYLApI8M4qnU= Received: from BN4PR12MB0818.namprd12.prod.outlook.com (10.164.58.152) by BN4PR12MB0819.namprd12.prod.outlook.com (10.164.58.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Tue, 20 Sep 2016 15:41:40 +0000 Received: from BN4PR12MB0818.namprd12.prod.outlook.com ([10.164.58.152]) by BN4PR12MB0818.namprd12.prod.outlook.com ([10.164.58.152]) with mapi id 15.01.0629.006; Tue, 20 Sep 2016 15:41:40 +0000 From: KrishnamRaju ErapaRaju To: Navdeep Parhar CC: "Bjoern A. Zeeb" , "freebsd-net@freebsd.org" Subject: RE: unable to use BPF Just-In-Time compiler Thread-Topic: unable to use BPF Just-In-Time compiler Thread-Index: AdIPEooGITIPTSLzSaCF81wrjAmC1gCFX62AAE5/pPAAKbylAAASuzoQ Date: Tue, 20 Sep 2016 15:41:40 +0000 Message-ID: References: <3F7A8F51-D404-4FEF-910C-8E51DD5061AD@lists.zabbadoz.net> <20160920063402.GA15975@ox> In-Reply-To: <20160920063402.GA15975@ox> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Krishna2@chelsio.com; x-originating-ip: [111.93.130.157] x-ms-office365-filtering-correlation-id: bd75e4f1-3047-4311-9419-08d3e16c9dc5 x-microsoft-exchange-diagnostics: 1; BN4PR12MB0819; 6:vRVrX0Ft1ff9UKZSv3vT5Br3sF5quDVJQJbSvWHIBXOJD5yBIXkjzMcm8ltdTR4LA1TsY4+7f8ZPgoSuX/WddSSKUShFg+ZQ8sVGa7ATOxbnCMV389FicVbqpkRdbCmw5Wwho0UFoTzX5WjLkLZjiwT343QCwfPOmnBRZe4Rs6tJk236tn2pvlrBC6LW4YFGKLhSHN8f8f9oVa9LBMfXUAY1at8j8rv+HyzLW5iVvJvHVhtVxYIn1PW2mb25+m4tquwIgafmdHSM5Nf+S0mhlJfewvOPNvwla41fOIAw1Bsr7m9Ci1sE6cXm1f+GXmci; 5:SpeQG5iPF57cxSf3V8JDE5st6kkQo6OwKUhCIBlVgzcj0hQFjokZASWqbaquD8CxpEJ1UULvK2lKPtCsFZWiy9TdTN6+FS1EpzOBMwQiDsc3B189CVrCq7ZJcnqFQewtzcwcDXSkP52qkqoqjRuDSg==; 24:GGd6i44Mv3PdzOdEEqjaPTsSK3ps0HHS0bTfBUnZxHOLsYYwgpGFinZdNmiDbFRYDN0shntdsoYUo+eSak+ZZS7L6MKYkkLwDWugD77Uodg=; 7:92oygLrmfM2j5GkfLp2ixxRZVLRBvcsUU5YuuAJFaILxoIC7EtUB/73oenp0QfNqAO1V1UxlH+mM98uioopgKSCXKUlMuTIcOQYAxMUXwjatrxkvF2j4kKX5BrnwBNMSlHkc1qo5PbqB4bX/I96fEN+/ipIaHwd0eAzIsLEs2xfzbYmJ8RAUscn7BQYwK2hx4fVFuxr9ztnJfPrmJKih2GEHRtBnvaUr8guGV1uqWyeOrv8WlRk79hbI82AAoAUDmq+mVg+6qggUrnU0F16wucPoToaxvbkrJBSlRx0J+9rnja4l3282F5eJFHWmf2Rk x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN4PR12MB0819; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(75325880899374)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6042046)(6043046); SRVR:BN4PR12MB0819; BCL:0; PCL:0; RULEID:; SRVR:BN4PR12MB0819; x-forefront-prvs: 0071BFA85B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(13464003)(377454003)(24454002)(199003)(189002)(53474002)(76576001)(101416001)(2950100001)(66066001)(81156014)(81166006)(122556002)(2900100001)(8936002)(77096005)(2906002)(5660300001)(7736002)(97736004)(19580405001)(7696004)(305945005)(11100500001)(74316002)(4326007)(110136003)(54356999)(8676002)(76176999)(10400500002)(19580395003)(7846002)(15975445007)(50986999)(3846002)(99286002)(102836003)(6116002)(92566002)(105586002)(93886004)(3280700002)(87936001)(106356001)(586003)(3660700001)(5002640100001)(33656002)(86362001)(230783001)(9686002)(189998001)(68736007); DIR:OUT; SFP:1102; SCL:1; SRVR:BN4PR12MB0819; H:BN4PR12MB0818.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: chelsio.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: chelsio.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2016 15:41:40.7359 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 065db76d-a7ae-4c60-b78a-501e8fc17095 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0819 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 15:56:10 -0000 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) 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 Cc: Bjoern A. Zeeb ; 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 > 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"