From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 14F082A9 for ; Sat, 12 Jul 2014 02:41:44 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 11 Jul 2014 17:42:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,646,1400050800"; d="scan'208";a="568737605" Received: from fmsmsx104.amr.corp.intel.com ([10.19.9.35]) by fmsmga002.fm.intel.com with ESMTP; 11 Jul 2014 17:42:13 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX104.amr.corp.intel.com (10.19.9.35) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 11 Jul 2014 17:42:13 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 11 Jul 2014 17:42:13 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.122]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.210]) with mapi id 14.03.0123.003; Sat, 12 Jul 2014 08:42:05 +0800 From: "Zhou, Danny" To: "John W. Linville" Thread-Topic: [dpdk-dev] [PATCH] librte_pmd_packet: add PMD for AF_PACKET-based virtual devices Thread-Index: AQHPnH/oRaQYxTj0SU2+uC1eGA1pJJubHZdggAAAcLD//4FWgIAAikNw//+INACAAOcasA== Date: Sat, 12 Jul 2014 00:42:04 +0000 Message-ID: References: <1405024369-30058-1-git-send-email-linville@tuxdriver.com> <20140711174042.GE25478@tuxdriver.com> <20140711184648.GH25478@tuxdriver.com> In-Reply-To: <20140711184648.GH25478@tuxdriver.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] librte_pmd_packet: add PMD for AF_PACKET-based virtual devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 00:41:45 -0000 I just upgraded my kernel to 3.15.5 and hardcoded below captured from inclu= de/uapi/linux/if_packet.h to librte_pmd_packet.c to workaround it, now I ca= n receive/transmit packet now. Commenting out PACKET_FANOUT_FLAG_ROLLOVER w= ould cause no packet can be received.=20 #define PACKET_QDISC_BYPASS 20 #define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 > -----Original Message----- > From: John W. Linville [mailto:linville@tuxdriver.com] > Sent: Saturday, July 12, 2014 2:47 AM > To: Zhou, Danny > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] librte_pmd_packet: add PMD for > AF_PACKET-based virtual devices >=20 > Not sure what the issue might be, PACKET_FANOUT_FLAG_ROLLOVER is defined > in include/uapi/linux/if_packet.h in the v3.12 tree. >=20 > On Fri, Jul 11, 2014 at 06:01:27PM +0000, Zhou, Danny wrote: > > Tried on 3.12, both of them are undefined. Anyway, will comment them ou= t and see > what performance it could achieve. > > > > > -----Original Message----- > > > From: John W. Linville [mailto:linville@tuxdriver.com] > > > Sent: Saturday, July 12, 2014 1:41 AM > > > To: Zhou, Danny > > > Cc: dev@dpdk.org > > > Subject: Re: [dpdk-dev] [PATCH] librte_pmd_packet: add PMD for > > > AF_PACKET-based virtual devices > > > > > > On Fri, Jul 11, 2014 at 05:20:42PM +0000, Zhou, Danny wrote: > > > > Looks like you used a pretty new kernel version with new socket > > > > options that old > > > kernel like my 3.12 does not support. When I tried this patch, it > > > just cannot build, and compiler complains like below. Which Linux dis= tribution > does this patch work for? > > > How to ensure it works for old kernels? > > > > > > > > /home/danny/dpdk.org/dpdk/lib/librte_pmd_packet/rte_eth_packet.c: > > > > In function > > > rte_pmd_init_internals: > > > > /home/danny/dpdk.org/dpdk/lib/librte_pmd_packet/rte_eth_packet.c:5 > > > > 24:1 > > > > 7: error: PACKET_FANOUT_FLAG_ROLLOVER undeclared (first use in > > > > this > > > > function) > > > > /home/danny/dpdk.org/dpdk/lib/librte_pmd_packet/rte_eth_packet.c:5 > > > > 24:1 > > > > 7: note: each undeclared identifier is reported only once for each > > > > function it appears in > > > > /home/danny/dpdk.org/dpdk/lib/librte_pmd_packet/rte_eth_packet.c:5 > > > > 57:3 > > > > 3: error: PACKET_QDISC_BYPASS undeclared (first use in this > > > > function) > > > > > > Both of them are isolated, so for playing with it you could just comm= ent those > out. > > > It looks like PACKET_FANOUT_FLAG_ROLLOVER should have been in 3.10, > > > while PACKET_QDISC_BYPASS didn't show-up until 3.14... > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git annotate > > > include/uapi/linux/if_packet.h | grep PACKET_FANOUT_FLAG_ROLLOVER > > > 77f65ebdca506 (Willem de Bruijn 2013-03-19 10:18:11 +0000 64)#define > > > PACKET_FANOUT_FLAG_ROLLOVER 0x1000 > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git show -s --format=3Dshort > > > 77f65ebdca506 commit 77f65ebdca506870d99bfabe52bde222511022ec > > > Author: Willem de Bruijn > > > > > > packet: packet fanout rollover during socket overload > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git describe --contains > > > 77f65ebdca506 > > > v3.10-rc1~66^2~423 > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git annotate > > > include/uapi/linux/if_packet.h | grep PACKET_QDISC_BYPASS > > > d346a3fae3ff1 (Daniel Borkmann 2013-12-06 11:36:17 +0100 56)#define > > > PACKET_QDISC_BYPASS 20 > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git show -s --format=3Dshort > > > d346a3fae3ff1 commit > > > d346a3fae3ff1d99f5d0c819bf86edf9094a26a1 > > > Author: Daniel Borkmann > > > > > > packet: introduce PACKET_QDISC_BYPASS socket option > > > > > > /home/linville/git/linux > > > [linville-x1.hq.tuxdriver.com]:> git describe --contains > > > d346a3fae3ff1 > > > v3.14-rc1~94^2~564 > > > > > > Is there an example of code in DPDK that requires specific kernel > > > versions? What is the preferred method for coding such dependencies? > > > > > > John > > > -- > > > John W. Linville Someday the world will need a hero, and you > > > linville@tuxdriver.com might be all we have. Be ready. > > >=20 > -- > John W. Linville Someday the world will need a hero, and you > linville@tuxdriver.com might be all we have. Be ready.