From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3226BA0561; Mon, 20 Apr 2020 17:44:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA22A1D67F; Mon, 20 Apr 2020 17:44:10 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9D6601D64A for ; Mon, 20 Apr 2020 17:44:06 +0200 (CEST) IronPort-SDR: G03ndvWTkjHOhAE9HCn+VkLipjlGgKv7Wrg4a3QOWx/ZdAO6GSEWOM/atVtnRL2dRSiX1H+B2Z a3DnMGBgUmtw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 08:44:05 -0700 IronPort-SDR: upGNJ+6Lazhb1b0/LK0NrI6nmdhH5JJI4M8ZR9VEY+8cssV7xo7IyMyopF6eC3rq9Al8fec2eI 2WgMGKviH9Pw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,407,1580803200"; d="scan'208";a="365042898" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2020 08:44:05 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 08:44:04 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 08:43:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UkIb5EPPwvdQrKodkcnTHpUuTUshKWzUGPFFGkGvUfvdVmjC/QUb+bTX7/VxLjb6puOPwr79XXqe5K3erIdcTb+vRvxYMcli5nTRNkJq6MC1CI+5tCT96d/ZCtza8PMsm5UcK50G+aZjKL/D0/eRPw4/E5WeigdLtme5K3CWEjmITfW/xzfpiV/B3zdG2xYQ7cHRPi0qX+Z85X/tQ0BN2aMuBnEnhKQVA/Yywli4MMDJCBWlyKdTx59bgXVQxBvBSS0nmy+tIQVGbTPMEGCYSKcPGTX2v+2KOa+9CFA+2lqHTrFGTQ5MOwj3doCkhP/RYUZGbwZUM0GqbxKd7jQ6zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H+WMIPH9VR75lUQKVyb7DaLhQrVfYjidDEoJlyaRdJQ=; b=AZylMCavFEEaEuudXowIjURDP1vUuM9y9Pn/otzSDdCSd6sKZ8WEzZ7IMvhcGzn/yi6aQIXvt7O1u1bQ97560noG5PruWzHUCTyNNuXNKFpYSivNhnhSpXYiDbDhayZO7EZPkHCr2PpJBEFVoZ8R1OlPrHddRmE/jIGGuJIXxWy9G02G4PbdcECyCR3qm80Txf+NqsTnHWCOQ5a8Zlwwo371nQjmgiZZ58MzK4GYkzCK2Dzqzm0yBEa94/WsGmd3PmmWTuf6s6/hpsYFSC7cLBCIbuIflcWJkckTZcBflG9dlxbIz0u9f56Z66qwHDULMW1wFiXJrV3E9hE5erL8wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H+WMIPH9VR75lUQKVyb7DaLhQrVfYjidDEoJlyaRdJQ=; b=bZMWG06YdGGizo21q9gNfF0GlgH026eqVWiLijViOlyYHFubPDlXr4pgP3YuwbTSOtLnrfopx4AN6SMMDPP9/9GSWPT2yHilIDuO3y6XkSHpV5JGGs3rcGYe97QuO975GtgnhKhH7cmLPIhyBwaqWy4Ij9obzDRUSTuQ2Sc0S10= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3687.namprd11.prod.outlook.com (2603:10b6:a03:ff::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Mon, 20 Apr 2020 15:43:23 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 15:43:23 +0000 From: "Ananyev, Konstantin" To: Aaron Conole CC: "dev@dpdk.org" , Pavan Nikhilesh , "Richardson, Bruce" , David Marchand , "Yigit, Ferruh" , "Burakov, Anatoly" , Lukasz Wojciechowski Thread-Topic: [PATCH v5 2/3] ip_frag: ensure minimum v6 fragmentation length Thread-Index: AQHWFLo1hhO1VYG4LUCGYEPOloEWUqiB+zqggAArrxKAAAQ4YA== Date: Mon, 20 Apr 2020 15:43:22 +0000 Message-ID: References: <20200415172547.1421587-1-aconole@redhat.com> <20200417131410.1343135-1-aconole@redhat.com> <20200417131410.1343135-3-aconole@redhat.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.170] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c2d7b01a-bf8f-4ffb-73a3-08d7e5418f03 x-ms-traffictypediagnostic: BYAPR11MB3687: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 03793408BA x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(396003)(39860400002)(366004)(136003)(346002)(376002)(316002)(54906003)(81156014)(9686003)(8676002)(4326008)(55016002)(26005)(7696005)(478600001)(52536014)(5660300002)(6506007)(2906002)(8936002)(76116006)(71200400001)(86362001)(66946007)(66476007)(186003)(33656002)(66556008)(6916009)(64756008)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5LOX+mQvV7m/CZA9UXIDR8xZYngMfYbgws/SYLZZmim+6I51r9Q+6XIAuUIeystTnDejSRUTDyr1kVE6TqW3nvJbEDe1qGC/mNwlSFr1tpANmpr/e12dlxvTEofNMcasyl+rFQPJe8HcLV2zyEhGrN3fcBLrhS7UCReGuJO0GvlJfya83qW5zV/0TdQo1Rjf36oq16iIkfijtzq8RyOsWeeBncEfl9VE2DZUg0OuRwNKRvz7BcGSvhzagHmzJq9YsX5WFSeq0Ny5UfZAviFwQtB7ZytY623GKFd5l5Xzy65k9IEOUlHCvMMwHYjFAE7Tpw8yLQLW7d5ySrykjpQMkcvm89G6/wph2WLqxYPYeHWxcrY5SJ8W35CqekN8ehpdHrv+l3/aBVqfN7m2+vJ9AnNjfVpSA5lUdZ4CJNJQUcdxePoCua/bo1VpowBkffw+ x-ms-exchange-antispam-messagedata: XGNONi2aUzjDji9FDRZiwBvnxWE1CIjnpFbJKmhP6u44jNx82qYQz6qpjHIipVqA+4ifUeFdvSrDaWJITF2MbcHmfP9HFBH7eiL0UfGs+sFkhJxvcdtpYSuXgsxahtOrAdSqBq5BkYoq0hXeXtXSGA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c2d7b01a-bf8f-4ffb-73a3-08d7e5418f03 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 15:43:22.9478 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lgBA2uYblv3y0x8nkRHm5iVofJ3RsrvMLYf7wA9kaGQAMGkI8BX4srgN6JYj/HDUg5fSvHOZXfPkJA7849dt5efCpl7DGxhvwEJbI9wIy88= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3687 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/3] ip_frag: ensure minimum v6 fragmentation length 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > >> In addition, do a formal parameter check. > >> > >> Acked-by: Lukasz Wojciechowski > >> Signed-off-by: Aaron Conole > >> --- > >> lib/librte_ip_frag/rte_ipv6_fragmentation.c | 9 +++++++++ > >> 1 file changed, 9 insertions(+) > >> > >> diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c b/lib/librte_= ip_frag/rte_ipv6_fragmentation.c > >> index 43449970e5..ee984aed82 100644 > >> --- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c > >> +++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c > >> @@ -79,6 +79,15 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in, > >> uint16_t fragment_offset, frag_size; > >> uint64_t frag_bytes_remaining; > >> > >> + /* > >> + * Formal parameter checking. > >> + */ > >> + if (unlikely(pkt_in =3D=3D NULL) || unlikely(pkts_out =3D=3D NULL) |= | > >> + unlikely(nb_pkts_out =3D=3D 0) || > >> + unlikely(pool_direct =3D=3D NULL) || unlikely(pool_indirect =3D= =3D NULL) || > >> + unlikely(mtu_size < 1280)) > > > > Same as for ipv4 - LGTM in general, but please avoid hard-coded constan= ts for MTU values. > > Here I couldn't find an existing macro ro min ipv6 mtu, so probably wor= th to add a new one > > in librte_net/. >=20 > I plan to add it in rte_ip.h as RTE_IPV6_MIN_MTU since it seems to fit > there. Sounds ok to me. Thanks Konstantin I don't think it looks right to add RTE_ETHER_IPV6_MIN_MTU in > the rte_ether.h file (but if you think it looks better I will change to > that). >=20 > > With that nit fixed: > > Acked-by: Konstantin Ananyev >=20 > Thanks! >=20 > >> + return -EINVAL; > >> + > >> /* > >> * Ensure the IP payload length of all fragments (except the > >> * the last fragment) are a multiple of 8 bytes per RFC2460. > >> -- > >> 2.25.1