From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 435A12030 for ; Thu, 14 Dec 2017 05:37:13 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2017 20:37:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,399,1508828400"; d="scan'208";a="12413484" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 13 Dec 2017 20:37:12 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Dec 2017 20:37:12 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Dec 2017 20:37:11 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Thu, 14 Dec 2017 12:37:10 +0800 From: "Hu, Jiayu" To: Stephen Hemminger CC: "dev@dpdk.org" , "Ananyev, Konstantin" , "Tan, Jianfeng" , "Chen, Junjie J" , "Mcnamara, John" , "matvejchikov@gmail.com" Thread-Topic: [PATCH v2 2/2] gro: support VxLAN GRO Thread-Index: AQHTdIWnYCPdnydUQ0OhgxBCcYe9m6NBoNiAgACG9KA= Date: Thu, 14 Dec 2017 04:37:09 +0000 Message-ID: References: <1511579860-37020-1-git-send-email-jiayu.hu@intel.com> <1513219779-100115-1-git-send-email-jiayu.hu@intel.com> <1513219779-100115-3-git-send-email-jiayu.hu@intel.com> <20171213190239.5154c571@xeon-e3> In-Reply-To: <20171213190239.5154c571@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWUzOTE3YTItODVmMi00ZmRjLWFkYTAtOTliYThlMWY5M2RjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJVMnNZQW5lV2Fkd3FcL1d3b2xrNTd0eDRXY1c5eEVUczI0NTEwb3Q4MGM0PSJ9 x-ctpclassification: CTP_IC 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 v2 2/2] gro: support VxLAN GRO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 04:37:14 -0000 Hi Stephen, > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Thursday, December 14, 2017 11:03 AM > To: Hu, Jiayu > Cc: dev@dpdk.org; Ananyev, Konstantin ; > Tan, Jianfeng ; Chen, Junjie J > ; Mcnamara, John ; > matvejchikov@gmail.com > Subject: Re: [PATCH v2 2/2] gro: support VxLAN GRO >=20 > On Thu, 14 Dec 2017 10:49:39 +0800 > Jiayu Hu wrote: >=20 > > + /* Don't merge packets whose outer DF bits are different. */ > > + if (item->outer_is_atomic ^ outer_is_atomic) >=20 > unlikely() here? Agree. Add it in the next version. >=20 > > + return 0; > > + > > + l2_offset =3D pkt->outer_l2_len + pkt->outer_l3_len; > > + cmp =3D check_seq_option(&item->inner_item, tcp_hdr, sent_seq, > ip_id, > > + tcp_hl, tcp_dl, l2_offset, is_atomic); > > + if ((cmp =3D=3D 1) && (outer_is_atomic || (outer_ip_id =3D=3D > > + item->outer_ip_id + > > + item->inner_item.nb_merged))) >=20 > More readable if you break the line at the || Exactly, I will change it in the next version. >=20 > > + /* Append the packet. */ > > + return 1; > > + else if ((cmp =3D=3D -1) && (outer_is_atomic || (outer_ip_id + 1 =3D= =3D > > + item->outer_ip_id))) >=20 > else unecessary after return. Similar line break for readabilty. Correctly, I will change it. >=20 > > + /* Prepend the packet. */ > > + return -1; > > + else > > + return 0; > > +} > > + >=20 > maybe? > if (cmp =3D=3D 1) { > if (outer_is_atomic || > outer_ip_id =3D=3D item->outer_ip_id + item- > >inner_item.nb_merged) > return 1; > } else if (cmp =3D=3D -1) { > if (uter_is_atomic || outer_ip_id + 1 =3D=3D item->outer_ip_id) > return -1; > } > return 0; >=20 The reason to replace "if ((cmp =3D=3D 1) && (outer_is_atomic ...))" with t= wo if statements is for readability? But will two if statements make codes less efficient? Thanks, Jiayu