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 5A8C7A0350; Wed, 24 Jun 2020 16:25:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 36B6E1D983; Wed, 24 Jun 2020 16:25:26 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4619C1D97D for ; Wed, 24 Jun 2020 16:25:24 +0200 (CEST) IronPort-SDR: kydlhHa3ZbSqQh9VPJbhb6aQFi5HBWS8oiHEZS/puSCKub8iNInLCoGkUZkkS/jVxzJxfyV9X0 Lole6HDkgb6g== X-IronPort-AV: E=McAfee;i="6000,8403,9662"; a="124743738" X-IronPort-AV: E=Sophos;i="5.75,275,1589266800"; d="scan'208";a="124743738" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2020 07:25:23 -0700 IronPort-SDR: w2+J8ksRiIFWKfIyr3Ng9Rhjh6lVXdtuknHbBSbov84AzEV0YRR71M/5k4WcUYfF61PYARATCf 4kC89lk5tQtQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,275,1589266800"; d="scan'208";a="293555460" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga002.jf.intel.com with ESMTP; 24 Jun 2020 07:25:23 -0700 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 07:25:22 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX158.amr.corp.intel.com (10.22.240.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 07:25:22 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jun 2020 07:25:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ciAq8W49wRy66aBph+rFKqeqq+ctsp+uoDgu5gf/qw9XZ1xhUdJQFvcAKebaYlmmLF5hqaY6fUJWzqIBksR9S2BS4Q8rBG0K24hMfSLNgdsR2fvfmYglRX25iAcmIbvAODH4G33MyHpeXIRjvWRq+FvRgwZFcEhxUUN6i7p5ZMZelIH7m8SQsuQYLj+ZfRAM7T5JX6Efe26Fo4fkTfkCt8D7G/uN5fz8d0IAatZd6x4KiKBtd8NcHeOoOBFW4GngyGnXG304gZlXvPpfHrSx5COOLNoQrg0WllbcKKIJVZ5s0nKx6RIvlHXswkCXq4YygSTriuvzdu049E9Agt0KBg== 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=LcLSHa0gPkAOQbKuDuz3JP54VnWuQ8+DpF+WUK7ba8U=; b=GdPaEbFLVKNZXxQWYbH45+QHlG6lQti06dUBRggs7KMPXA6TQW+qrMs0kn0GG/58yvLh6Gvh7om0QAGjxcUTG/3bZbLioMHG6CVJRV4gX4OpFpWWvKWAlXkCQpuahTIe8yOwpH2wlHS9ZKS09hCdr6WbdOvCoEuermDRqCYKxKajW/GoTeDWvhkubaTWluOgdh+XlG5IZ6a8O/Fan3K0TYDQHB1479ypr07P4xiROlZ8BplGN+pBZ6/1V7iWZ5tH3FAE5Q/YOmndaVsxrAbw0aV8MwlbgvHmCpEf5alxvlAHmhrQ56go0V/dSDeD03XKqCwhcpAY3z9xTq7D+KZg2w== 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=LcLSHa0gPkAOQbKuDuz3JP54VnWuQ8+DpF+WUK7ba8U=; b=N5D6Z+E+RjbxC03eMiWs9RqcHBFrP8Swmbhbsv/2lFKucEK13QpmJsHVIlH7MeMmlMvofp0fUQLS8AdzkV/G406sFjVDUF1DLyK05NteVggn2DP4mKAdQYjnZP6q7QHvOE5yzCBVBlKD4hQgiC7eQXDgskb1Y0jmmQeupSpkBX8= Received: from MN2PR11MB3550.namprd11.prod.outlook.com (2603:10b6:208:ee::21) by MN2PR11MB3870.namprd11.prod.outlook.com (2603:10b6:208:152::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Wed, 24 Jun 2020 14:25:21 +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; Wed, 24 Jun 2020 14:25:21 +0000 From: "Coyle, David" To: Akhil Goyal , "Doherty, Declan" , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Zhang, Roy Fan" , "Ananyev, Konstantin" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Ryan, Brendan" , Hemant Agrawal , "anoobj@marvell.com" , "ruifeng.wang@arm.com" , "lironh@marvell.com" , "rnagadheeraj@marvell.com" , "jsrikanth@marvell.com" , Gagandeep Singh , "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 2/6] security: add support for DOCSIS protocol Thread-Index: AQHWSUpCC3qGGkZa30KmVBBObqH7pKjmf4sAgAFQtaA= Date: Wed, 24 Jun 2020 14:25:21 +0000 Message-ID: References: <20200604151324.50704-1-david.coyle@intel.com> <20200623101423.9215-1-david.coyle@intel.com> <20200623101423.9215-3-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: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.171] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 79e03f07-28ac-4990-fcd2-08d8184a6d52 x-ms-traffictypediagnostic: MN2PR11MB3870: 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:10000; x-forefront-prvs: 0444EB1997 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CB10n6wsTEoby60vnR39o3JZ8E732hrYgEIzzXDvub+MKceaM3istPrz8efE77Xe6OmYZ10FAj7VNFdTh95u0VCfFdM/9n66qAUM5owB4bYuzaCw3prjyKrHtlYIp6Ry/yAJIULlwmKEoF2JYyPTKaQu0uHz2GLmbmEfUjT720xZ1VnbQvoV+tsL+dx16J8aNOubC1Xqxfgdam0ITrzGm8OCJInbYaf/zuLy4Cae8mnDXcOTw9GQy0FDKxYtZkkSbCggtawcU8m0clmm8XU0WSA2r9smcanM/b0KwBoeTOodCjG1VfXCybCgHHy74ILqJFuucBJh4wTmTczMP+7m4mEtAGcTz6sr0SsJOZAuhp2nq33tgYnU4R3asSpx/hI/ 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)(39860400002)(136003)(376002)(366004)(346002)(5660300002)(478600001)(4326008)(186003)(66946007)(9686003)(55016002)(316002)(76116006)(110136005)(54906003)(7416002)(15650500001)(64756008)(2906002)(66446008)(33656002)(26005)(66556008)(66476007)(6636002)(6506007)(8936002)(7696005)(86362001)(83380400001)(71200400001)(107886003)(52536014)(8676002)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: H5d3tJBAqRtzYBWbcqccGR1AazbPbZD0MQ45OdQdk3utI36uscuZT3qIyiSu7T4Y5xErMJfNrL+IEI+rMMJdksnGWOkuhZCRiHj32P0M6lMBNn6KV/5yZQAbX56my+9dN/2L1mRAxOVK8XsjHgwY5k81oyMksby3ZjWjCbqaQtsLIQStSYTAG+wiF9UdjzrLuVUTgg1rtwxCV3thOXItS/qHlf0GG2/zTCbtqYSWRqxymycIY2WhS7QsIxp4zeRljAlPvAyvXBvXiTHktXjModZte0qVvggs+U9dLN0KMaKemwqiBwu3VUciWvNrArmOH0HxHqiDNp1IfNLCIEXRvGU1cfUcs0InZchM7KHNPvffLlMR2QaD7GVzUES91gq8CJkU9rKJoUS22SuNlPcCjC9run9KbIgaSC9XNEYfS9qHUQBX+yMvqxNuuVt1ODEbcvXJ3m/22AU6wLDShxu5L0gP5SDApy94WFu1DrAn8XEvjXisArci1vXaaEShB5lQ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 79e03f07-28ac-4990-fcd2-08d8184a6d52 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2020 14:25:21.2297 (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: xPmIktjbdrg0o0mWfJzkvuHHIHlYWGRKEMA2Uey+znKGH6q8jDtKCbxDA8IcYcCAQPuozly1vB1Lm3QHaqIlRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3870 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 2/6] security: add support for DOCSIS protocol 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 Akhil, > -----Original Message----- > From: Akhil Goyal > Sent: Tuesday, June 23, 2020 7:07 PM > > > > +/** > > + * DOCSIS operation parameters > > + */ > > +struct rte_security_docsis_op { > > + struct rte_crypto_sym_op crypto_sym; > > + /**< Symmetric crypto operation parameters */ > > + > > + struct { > > + uint16_t offset; > > + /**< > > + * Starting point for CRC processing, specified > > + * as the number of bytes from start of the packet in > > + * the source mbuf in crypto_sym > > + */ > > + uint16_t length; > > + /**< > > + * The length, in bytes, of the source mbuf on which the > > + * CRC will be computed > > + */ > > + } crc; > > + /**< CRC operation parameters */ >=20 > As per my understanding, CRC is a kind of authentication. Can we reuse th= e > fields of rte_crypto_sym_op Auth.data.offset and auth.data.length. This w= ay > you can save the unnecessary 4 bytes here. Probably add Comment in the > structure definition that it can be used as offset and length for CRC. >=20 > And if you feel that reserved field is needed in near future, then you ca= n add > a proper name to it or else You can do away with the rte_security_docsis_= op > itself as there will be no other fields in it. [DC] As per my reply on the v1 patchset, I am happy to use the auth offset = and length fields for CRC if there are no objections from others on this approa= ch. Strictly speaking, a CRC is not an authentication algorithm like the other = auth algos in cryptodev - if it were we would have just added CRC as a new auth = algo. However, using the auth offset and length fields of the crypto op does simp= lify things, removes unnecessary bytes and levels of indirection. It also means = the 'uint8_t security[0]' field can be removed from rte_crypto_op. The 'reserved' field was to accommodate other DOCSIS protocol features whic= h could be offloaded in the future - such as the DOCSIS header checksum. For = this feature, we would need to know the DOCSIS header length. The header length though is equal to the CRC offset, so we can get the header length that way= . The reserved field and the entire rte_security_docsis_op can therefore be removed