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 2569FA051C; Fri, 26 Jun 2020 17:14:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 055451C1C0; Fri, 26 Jun 2020 17:14:49 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BB7941C1BE for ; Fri, 26 Jun 2020 17:14:47 +0200 (CEST) IronPort-SDR: QbeJadtB3xjT0RtBDnKdJ7iAJObB5ColI/7wQrxPa2VHwD1sVczoW4acVR9AY/GoRL3behGqkz AorbWYsnhlag== X-IronPort-AV: E=McAfee;i="6000,8403,9663"; a="142866999" X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="142866999" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2020 08:14:46 -0700 IronPort-SDR: YilGBg6q3mUJ2fJR8k4jz72y7Yq12T23d5YNtA1gTNpKU1RdbtGaGFEiP69yR+zC+vqc0+SEHW p0dQucH7A79Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,284,1589266800"; d="scan'208";a="302364678" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 26 Jun 2020 08:14:46 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jun 2020 08:14:46 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jun 2020 08:14:46 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.51) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jun 2020 08:14:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BHy0SQ/sm23Px11ehaHRjOjJtlReO0O4Ia3SJzjnIpvAjqQMhPc0Acz6EEPHe+uPds/MxOCoh1iibodESZ3wf2XQ1l1YgXq9+kCHaoJkRTXxInwTNeIPPInro9jqidx3GsiKswocMZVMcDNmyraknbrhZvSl/iowwpdCNt0UN9A4q2kPAiGldozVjStww99vmbiTpd2b1rrd0syZn7YkEY9DM4HOYM5x9v90l5YAUYGkgfwCbThr+5neSyYVWu8lo9FshrsBULo5oJui5uT50zxqzUssNgGD1fpK9ELpiQm3zYde1QcuH9uIHxEF0DwUDKxUazJFuZ9IdfZNPWL93g== 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=0O6KVXD7JDFWsrk9MDmw1L8+DqvEFp+E4RgoTvul8Gs=; b=HSF4MENYM6J8vID/bvXkir0Fgdw0st+BzQS65vFzHmiWh/7bGk1sG/grdJxSXnuF3PmGckd1/m3m9fOy7hWq6NZ8YDtlgrONwDdc5iHwb17opO2vuDs8Xq3Cf6Gojp4I0bpi/p7y6I9Wqno3TIbTNoWJSbX8i2dL2pJlQbgEQ178GuFYBralRKSbFgbJP8Lee11kQAwlWIb9Z4U2uNHhilvWFJa9hIqHebdrHqRxCS2z/gzD2kNOQZ3RorP7xhPQSrRB1ih4yZGy9ptO+OJvsiY2cuYIhXmresV6Otz27yipkFZAcYTG+KKdyfHlJSblv07LRkOpw46oakQchOR1Qg== 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=0O6KVXD7JDFWsrk9MDmw1L8+DqvEFp+E4RgoTvul8Gs=; b=I9tkUav83cN4Ip6HNNqw/Z2U0pSo0hiMK0tak5acd3hWmwE7xIDAhC9Y05yq8cXTv+lvWQZKa3S2oTNOluH1jLyKhlmVxiK2IrWsJrlcRPCm70i++c7uemtelX4z/ZTyYp1cX+HK+dNr9PjSjlW2NJm7mPVTY08PFF+XX26O+nY= Received: from MN2PR11MB3550.namprd11.prod.outlook.com (2603:10b6:208:ee::21) by MN2PR11MB3999.namprd11.prod.outlook.com (2603:10b6:208:154::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Fri, 26 Jun 2020 15:14:44 +0000 Received: from MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::8181:d8ec:fef7:532f]) by MN2PR11MB3550.namprd11.prod.outlook.com ([fe80::8181:d8ec:fef7:532f%2]) with mapi id 15.20.3109.027; Fri, 26 Jun 2020 15:14:44 +0000 From: "Coyle, David" To: "De Lara Guarch, Pablo" , "akhil.goyal@nxp.com" , "Doherty, Declan" , "Trahe, Fiona" , "Zhang, Roy Fan" , "Ananyev, Konstantin" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Ryan, Brendan" , "hemant.agrawal@nxp.com" , "anoobj@marvell.com" , "ruifeng.wang@arm.com" , "lironh@marvell.com" , "rnagadheeraj@marvell.com" , "jsrikanth@marvell.com" , "G.Singh@nxp.com" , "jianjay.zhou@huawei.com" , "ravi1.kumar@amd.com" , "Richardson, Bruce" , "olivier.matz@6wind.com" , "honnappa.nagarahalli@arm.com" , "stephen@networkplumber.org" , "alexr@mellanox.com" , "jerinj@marvell.com" , "O'loingsigh, Mairtin" Thread-Topic: [PATCH v2 5/6] test/crypto: add DOCSIS security test cases Thread-Index: AQHWSUpJ9x+YCRR2J0G2KfrmlwSPS6jmfscAgARsoGA= Date: Fri, 26 Jun 2020 15:14:43 +0000 Message-ID: References: <20200604151324.50704-1-david.coyle@intel.com> <20200623101423.9215-1-david.coyle@intel.com> <20200623101423.9215-6-david.coyle@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.166] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 40eedfe4-e4b6-4fbe-7e63-08d819e3a818 x-ms-traffictypediagnostic: MN2PR11MB3999: 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: 0446F0FCE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fq9jyz7lATSxLJi+KNeZsFTDLYQfWAgy67G/EjmLzrPz1/XspT1BnluA5aMSkHSXAmhxM6f2PZ5DAFMUHFda118EohHLIpoh5cKzBNyte65vOn2VqvFpS6xr/EDYqYl3AP9v/oteWsNnmGIGYwIdZaywqrlJVHcjxJFCydM7ZOjFEN1p3AFab9MlbygruPwgMPMEgoxtrp23or9xrq9dGcTci4094D6rqXhHhOZmGfKBpJr34Cryo2PrZoc3+4UFxnG553bERq3Lzx+WknRkkQTSo7JV2GcWwtnVwuyAu37QFNqZR8SZB2WR3Zw55UY82Uupy3gunUw5YZ0TupLBlcG+3to6tHLfVPdtdpX2t/1zmx8UvU092dPBlZ/4daYG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3550.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(478600001)(26005)(7416002)(8936002)(107886003)(4326008)(8676002)(5660300002)(52536014)(55016002)(66556008)(66946007)(83380400001)(110136005)(66476007)(2906002)(66446008)(54906003)(76116006)(64756008)(316002)(86362001)(15650500001)(9686003)(186003)(71200400001)(6636002)(6506007)(33656002)(7696005)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: RcMpeE0Q7MemICUzkiHjJQln5K45faoM44mAnMry9/n78rqsdj68ktWgUvkkrPMgyyCPLlj7KqKTyqFdsFyzHhkph4abJPWuUqsPbbuwGRPyv+ZgmAtDOQ6vzGR7LafJ2/RT87F0udeVxZb4C42HZB3EvgDP5EGtYjEk6PEZWdfgnN/GMVUXVINSguoC2WwkhHF7Ax8Xxr65+/hJ9jWqkrZTVPkLhoDyZGnaGoVAz+8DwF1oJg0P1PVFgNf8vGgtH6+zKTpiO8pd/ufuADw2Ke20ZcrZC7S8matCcXcfZmjRLV0trK96/xz+Ys6W56EazgDqoB/93rQmYJBCnAmo9delx9B7Bno9jmeuJlFS+3EXhCpDWCuiQbT+gnVk88hF08iFEx30KDxtKJRKcyq1uh5SABXuq+7Pcs/oKLFfd8XJMGkExrRqwQZqN9oLeJhqP1d1OqCrkTEQksWLuOBol5Vyf93J1bYhfZ/8aacVaaQCqwYol9iEqv/j0ylWzHEq Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3550.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40eedfe4-e4b6-4fbe-7e63-08d819e3a818 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2020 15:14:43.9884 (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: DgwzCcmZbzMbeOZJtbru/LJbaYfY50Yeye5jYZGcXyGPs+iQpx797PhiMCea6bzQkgUeKnhVEGcgGwCqoikvlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3999 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 5/6] test/crypto: add DOCSIS security test cases 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" Hi Pablo > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Tuesday, June 23, 2020 7:04 PM >=20 > > +static int > > +test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) { > > + struct rte_security_op *sec_op; > > + struct rte_security_docsis_op *doc_op; > > + struct crypto_testsuite_params *ts_params =3D &testsuite_params; > > + struct crypto_unittest_params *ut_params =3D &unittest_params; > > + uint8_t *plaintext, *ciphertext; > > + uint8_t *iv_ptr; > > + int cipher_len =3D 0; > > + int crc_len =3D 0, crc_data_len; >=20 > Minor comment. These "int" should be "unsigned int", as they are not goin= g > to hold a negative value. [DC] Kind of correct, but not fully. There are some calculations further down which subtract cipher_offset, crc_= offset and RTE_ETHER_CRC_LEN from the overall buffer size, which could (if test ca= ses aren't setup correctly) make the results negative. These results get put into the = cipher_len and crc_len variables. If the result is negative, it just gets reset to 0. This= was just handier than having if/else checks below. I don't see any major issue with this. The crc_data_len variable can only have positive values though, so I have c= hanged that to a uint32_t Updates will be in v3 early next week >=20 > > + int ret =3D TEST_SUCCESS;