From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 19CA47EB0 for ; Wed, 3 Dec 2014 14:00:43 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 03 Dec 2014 04:59:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,507,1413270000"; d="scan'208";a="641821126" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga002.fm.intel.com with ESMTP; 03 Dec 2014 04:59:49 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX108.ger.corp.intel.com ([169.254.11.150]) with mapi id 14.03.0195.001; Wed, 3 Dec 2014 12:59:48 +0000 From: "Ananyev, Konstantin" To: Olivier MATZ , "Liu, Jijiang" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM Thread-Index: AQHQDu5Csn4rdRtSMEuKWiThOnkfhJx9z+6Q Date: Wed, 3 Dec 2014 12:59:47 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213BC46D@IRSMSX105.ger.corp.intel.com> References: <1417532767-1309-1-git-send-email-jijiang.liu@intel.com> <1417532767-1309-3-git-send-email-jijiang.liu@intel.com> <547EF6E9.5040000@6wind.com> In-Reply-To: <547EF6E9.5040000@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM 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: Wed, 03 Dec 2014 13:00:45 -0000 Hi Oliver, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier MATZ > Sent: Wednesday, December 03, 2014 11:41 AM > To: Liu, Jijiang; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and rep= alce PKT_TX_VXLAN_CKSUM >=20 > Hi Jijiang, >=20 > On 12/02/2014 04:06 PM, Jijiang Liu wrote: > > Replace PKT_TX_VXLAN_CKSUM with PKT_TX_UDP_TUNNEL_PKT in order to indic= ate a packet is an UDP tunneling packet, and > introduce 3 TX offload flags for outer IP TX checksum, which are PKT_TX_O= UTER_IP_CKSUM, PKT_TX_OUTER_IPV4 and > PKT_TX_OUTER_IPV6 respectively;Rework csum forward engine and i40e PMD du= e to these changes. > > > > Signed-off-by: Jijiang Liu > > --- > > app/test-pmd/csumonly.c | 9 +++++++-- > > lib/librte_mbuf/rte_mbuf.c | 7 ++++++- > > lib/librte_mbuf/rte_mbuf.h | 11 ++++++++++- > > lib/librte_pmd_i40e/i40e_rxtx.c | 6 +++--- > > 4 files changed, 26 insertions(+), 7 deletions(-) > > > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c > > index d8c080a..9094967 100644 > > --- a/app/test-pmd/csumonly.c > > +++ b/app/test-pmd/csumonly.c > > @@ -257,7 +257,7 @@ process_outer_cksums(void *outer_l3_hdr, uint16_t o= uter_ethertype, > > uint64_t ol_flags =3D 0; > > > > if (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM) > > - ol_flags |=3D PKT_TX_VXLAN_CKSUM; > > + ol_flags |=3D PKT_TX_UDP_TUNNEL_PKT; > > > > if (outer_ethertype =3D=3D _htons(ETHER_TYPE_IPv4)) { > > ipv4_hdr->hdr_checksum =3D 0; > > @@ -470,7 +470,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) > > { PKT_TX_UDP_CKSUM, PKT_TX_L4_MASK }, > > { PKT_TX_TCP_CKSUM, PKT_TX_L4_MASK }, > > { PKT_TX_SCTP_CKSUM, PKT_TX_L4_MASK }, > > - { PKT_TX_VXLAN_CKSUM, PKT_TX_VXLAN_CKSUM }, > > + { PKT_TX_UDP_TUNNEL_PKT, PKT_TX_UDP_TUNNEL_PKT }, > > + { PKT_TX_IPV4, PKT_TX_IPV4 }, > > + { PKT_TX_IPV6, PKT_TX_IPV6 }, > > + { PKT_TX_OUTER_IP_CKSUM, PKT_TX_OUTER_IP_CKSUM }, > > + { PKT_TX_OUTER_IPV4, PKT_TX_OUTER_IPV4 }, > > + { PKT_TX_OUTER_IPV6, PKT_TX_OUTER_IPV6 }, > > { PKT_TX_TCP_SEG, PKT_TX_TCP_SEG }, >=20 > I still think having a flag IPV4 + another flag IP_CHECKSUM is not > appropriate. Sorry, didn't get you here. Are you talking about our discussion should PKT_TX_IP_CKSUM and PKT_TX_IPV4= be mutually exclusive or not? > I though Konstantin agreed on other flags, but I may > have misunderstood: >=20 > http://dpdk.org/ml/archives/dev/2014-November/009070.html In that mail, I was talking about my suggestion to make PKT_TX_IP_CKSUM, P= KT_TX_IPV4 and PKT_TX_IPV6 to occupy 2 bits. Something like: #define PKT_TX_IP_CKSUM (1 << X) #define PKT_TX_IPV6 (2 << X) #define PKT_TX_IPV4 (3 << X) "Even better, if we can squeeze these 3 flags into 2 bits. Would save us 2 bits, plus might be handy, as in the PMD you can do: switch (ol_flags & TX_L3_MASK) { case TX_IPV4: ... break; case TX_IPV6: ... break; case TX_IP_CKSUM: ... break; }" As you pointed out, it will break backward compatibility. I agreed with that and self-NACKed it. >=20 >=20 > Olivier