From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 37B51595B for ; Tue, 18 Nov 2014 15:04:57 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 18 Nov 2014 06:12:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,410,1413270000"; d="scan'208";a="638988605" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga002.jf.intel.com with ESMTP; 18 Nov 2014 06:12:12 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 18 Nov 2014 22:12:11 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.182]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.240]) with mapi id 14.03.0195.001; Tue, 18 Nov 2014 22:12:10 +0800 From: "Zhang, Helin" To: "Ananyev, Konstantin" , "Liu, Jijiang" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 0/4] Translate packet types for i40e Thread-Index: AQHQAwKd7WlnmZlXKE+2MWT/5bnNP5xlussAgACxIoA= Date: Tue, 18 Nov 2014 14:12:10 +0000 Message-ID: References: <1416296251-7534-1-git-send-email-jijiang.liu@intel.com> <2601191342CEEE43887BDE71AB977258213B581A@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213B581A@IRSMSX105.ger.corp.intel.com> Accept-Language: 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 Subject: Re: [dpdk-dev] [PATCH 0/4] Translate packet types for i40e 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: Tue, 18 Nov 2014 14:04:59 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Tuesday, November 18, 2014 7:33 PM > To: Liu, Jijiang; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 0/4] Translate packet types for i40e >=20 > Hi Frank, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jijiang Liu > > Sent: Tuesday, November 18, 2014 7:37 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 0/4] Translate packet types for i40e > > > > The i40e NIC can recognize many packet types, including ordinary L2 > > packet format and tunneling packet format such as IP in IP, IP in GRE, = MAC in > GRE and MAC in UDP. > > > > This patch set provides abstract definitions of packet types, which > > can help user to use these packet types directly in their applications = to speed > up receive packet analysis. > > > > Moreover, this patch set translates i40e packet types to abstract > > packet types in i40e driver, and make the corresponding changes in test > applications. > > > > Jijiang Liu (4): > > Add packet type and IP header check in rte_mbuf > > Remove the PKT_RX_TUNNEL_IPV4_HDR and the > PKT_RX_TUNNEL_IPV6_HDR > > Translate i40e packet types > > Make the corresponding changes in test-pmd > > > > app/test-pmd/csumonly.c | 12 +- > > app/test-pmd/rxonly.c | 15 +- > > lib/librte_mbuf/rte_mbuf.h | 225 ++++++++++++++- > > lib/librte_pmd_i40e/i40e_rxtx.c | 604 > > +++++++++++++++++++++------------------ > > 4 files changed, 569 insertions(+), 287 deletions(-) > > >=20 > The patch looks good to me in general. > Though I think it is not complete: we need to make sure that all PMDs RX > functions will set mbuf's packet_type to the defined value. We met quite a lot of similar situations, we designed a new way for i40e, t= hen have to rework igb/ixgbe. E.g. configuring reta, flow director, etc. If possible, send the patch set as smaller as possible might be better. I g= uess igb/ixgbe will be done soon later. > As right now, only i40e implementation can distinguish packet_type proper= ly, I > think all other PMDs for the freshly received packet should do: > mbuf->packet_type =3D RTE_PTYPE_UNDEF; If I am not wrong, RTE_PTYPE_UNDEF can be 0, is packet_type in mbuf initial= ized to 0? If yes, nothing needs to be done in igb/ixgbe for now. >=20 > Another thing: right now mbuf's packet_type is uint16_t. > While enum rte_eth_packet_type will be interpreted by the compiler as 'in= t' > (32bits). > We can either change enum to a lot of defines (which I don't really like = to do) or > probably just add a comment somewhere that enum rte_eth_packet_type > should never exceed UINT16_MAX value? >=20 > Konstantin >=20 > > -- > > 1.7.7.6 Regards, Helin