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 255D2A0561; Mon, 20 Apr 2020 14:54:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87A311D5FE; Mon, 20 Apr 2020 14:54:27 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 4E97B1D5F3 for ; Mon, 20 Apr 2020 14:54:26 +0200 (CEST) IronPort-SDR: 2S9mhF0WDt1nOsfOPKg/AbZSGvE8FsbFjFfnY8TMvbJkNk2usV8MjN6n25Hf9d0as9cwgElBGp pTXI6N3Qpbug== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2020 05:54:25 -0700 IronPort-SDR: rbfSNgUeX2WkRe6TLByk6q+BJyajciXJzW/e14ab01jK3l45kwAAoQsFz1PBKxZLwfqTNaJHja 0SdL1ud9cRhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,406,1580803200"; d="scan'208";a="245360768" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 20 Apr 2020 05:54:25 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 05:54:24 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.53) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Apr 2020 05:54:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FzaXQPFeYpelJBS4/GMSlWv3GaEisx6F/jYWQyt0gL5RyRnFB2I1JKNcH9oHpW97DLGAaATuswNddUlWTZALEV3VJQx7LKqgxG5CkhkB/+k91hEgQJyaoZrHFXlyCGJm18OmsokZco80iynonIE5KAVn4oRAP5hGZ8eKGcTr0FcnLrKJMfP6fofHku8TdpxVKWK1pvhDQECL+N7qBdogleaCtXfHiIWO449a4gRqMIUH+ETIEYRnzTxsPYFu3ELC64yIhMUJoBeFXgeKr+Zfc77WYC5V9Te5toU6y7braKOmcfbJubxDuSbGLFx/54A/2KQdvUg98cotho7U55a80w== 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=aI6uF3JeWTbcJWGHzyFl56ldLxihmdlPczPB+DJeORM=; b=RGnntR5lqUqwdFv7leOg7f1CSKoKmL6MxViYBdstip5i/io8dlL3QlrLOInMwsXjnGGCocv6CI84/VcdbTdBsruAwvqQDAUFGRYNm320I1joe2KoMsWKVjMcNcHStKftB04tpoznnVkJIcJN7w6kWQ8CbXmfehH6edmDslIc0drRGQUQY3jl0oaZ5bTcUGPS/6zVqIWyTZ+dqaWq+WNTiMr1SodbDEQrfB5YJNASRzjJLbSGN89JAIrAJFhrnt745uPA88XSfzPszL8k0+/xSpuGVZsla2OLBlqOq9LcvUM/C/OLsK1v9HFFVpPNeKlrVPWPEc8BlIOmyp+gmT4omw== 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=aI6uF3JeWTbcJWGHzyFl56ldLxihmdlPczPB+DJeORM=; b=yK1SrZg5zH1VdpDu2Klv+CmGPgkGvz+V+s5JuCJgOSuNcGuTpNGOLd6G6p+8GTpDkh0MFNTWC0BBWX/ajjS7Qx5S/8TP4Y6Uuci9LXdkkSRIOQUjNZjsrG3LOJurg+rNraNJz6F92MDbVHAstAm9PbzIm+TA8k70eiGPMa+XXmE= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2662.namprd11.prod.outlook.com (2603:10b6:a02:c8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 12:53:44 +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 12:53:44 +0000 From: "Ananyev, Konstantin" To: Aaron Conole , "dev@dpdk.org" CC: 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+zqg Date: Mon, 20 Apr 2020 12:53:43 +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: <20200417131410.1343135-3-aconole@redhat.com> 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: 8a9d35b9-42ed-468d-287d-08d7e529dbcb x-ms-traffictypediagnostic: BYAPR11MB2662: 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:8273; 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)(136003)(396003)(366004)(346002)(376002)(39860400002)(66476007)(66946007)(66556008)(9686003)(66446008)(76116006)(7696005)(64756008)(8936002)(4326008)(186003)(8676002)(81156014)(71200400001)(52536014)(54906003)(26005)(33656002)(478600001)(86362001)(5660300002)(2906002)(6506007)(316002)(55016002)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9g1mUcwZnaY4kPqWuuQ82IFm5fi/CucgDzVTGpx0888Xtccjff9zn9XrUQE9epCtF0fkQ5q5771KMxTwDFY9KlzXPHNUwTU/O0U8inkOYMiN5emCvg1GyrlHo9NmUWNCHC2csnjPXvBjvBBMFCgAAUDgXyVNt7c5mTefzIQZJoph3t91UMp7SEQmhMHy9nekisPgvuQ2ah1AHarHqwz1/RG65E3Z+QwFmHJ2cQFyl/JXe3AC17Qo4Z0Lk8L8p4tER57F3CM0kBiAx7ziLo8NJ2zg184J5aCOhCBGUDBx1KoavuClbibe6IX1JgZvy4kMtYTtF3Cc87IGbBXqTZhpwRkUFRui+xrsFzkwG40oXsaHYgWRNExFXCBsPxhU+p/nNRGHdJUgar2L1NgXRpwNClVvDHGUVrj+6POy01lEiFSICntQrtsMDH+J1hzGsbSZ x-ms-exchange-antispam-messagedata: hObaZIuux/9D+MWCSQDBeJbp+kKgUaJGGMAckPN5qAnnWSBK/hRPOwkuzkGOxg1zlMLnBmAUHIZVXXGMnEg7FVhwamyvtSfi7/JBCDp/fm4XSCPR431GgDO/ig2xvc3PgUZqNAPBCLvuU1sX0T6pOw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8a9d35b9-42ed-468d-287d-08d7e529dbcb X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 12:53:43.8020 (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: clHonEvkx526k9lT/GXqVt8L+NVIG4ciTBZyh7VKh7VoWkbBQcBdFTnUQ1ZnIH3Yero/xWrmwDqVmk3QCR715Jp5QPJ3kYNjekVNXT+QRlA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2662 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" >=20 > In addition, do a formal parameter check. >=20 > Acked-by: Lukasz Wojciechowski > Signed-off-by: Aaron Conole > --- > lib/librte_ip_frag/rte_ipv6_fragmentation.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > 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; >=20 > + /* > + * 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 constants f= or MTU values. Here I couldn't find an existing macro ro min ipv6 mtu, so probably worth t= o add a new one in librte_net/. With that nit fixed: Acked-by: Konstantin Ananyev > + 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