From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E840145C96; Mon, 18 Nov 2024 05:49:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBAB740279; Mon, 18 Nov 2024 05:49:46 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 4E8264014F for ; Mon, 18 Nov 2024 05:49:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731905385; x=1763441385; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=400utr8l61sc2aYrn2sZ8LaUY+0vhUBk3XJ6D/ODAlw=; b=k1glprUfCnJoOV+Avu32BLHegbFG4glrGwGlBZpTUH4eT/O8gPT3COvw Fkzi7jqazB3J9Ss98xTcdrOiCN0tdWzCsTAaP6swWAK65BlCuRCtowrci /wmojig5a9xFbzt2OMOs8R7oU7rz2Da+tIei81SyLDYuKTkgj3HH4ObWZ X6zA+b2vr/zFQK8HiDcMV/XYwjUUVmWsqqAXD9NK/LNdYxozJF1Xzmf1G FnhWEf7z8QATxpywqWlJ8+uhpZrEW55ewlRV+cr2rHIfAQkSzwnzT2H0Z Shfg37wgvg0lyarkouqRTwUKhE+GDeWmHYtRN9IxUT/E2OgmZCrpzcLTu Q==; X-CSE-ConnectionGUID: ZrvnDYgDQDS61zgRWNUe3w== X-CSE-MsgGUID: YI7w0nUZRyiSlfTSdD2MVw== X-IronPort-AV: E=McAfee;i="6700,10204,11259"; a="57247225" X-IronPort-AV: E=Sophos;i="6.12,163,1728975600"; d="scan'208";a="57247225" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2024 20:49:44 -0800 X-CSE-ConnectionGUID: wTdzHkMcSeqRoDGfd/tuOg== X-CSE-MsgGUID: zFuaYCKrTb2JbWS3z53n+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,163,1728975600"; d="scan'208";a="88879992" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Nov 2024 20:49:43 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 17 Nov 2024 20:49:43 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Sun, 17 Nov 2024 20:49:43 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.172) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sun, 17 Nov 2024 20:49:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FBfzDsmGlUrlBRQxQ2sPx0xK0JJldMK6Zia63mHC4vhSsPMQrHzFckT7MIXQWyt/BkihS0S9PbN8k5jQKZ+onLnJdjVnahsgKYSH5QUYXJkqRurFw1ClzleFHY6CoVAOyeBpcdrXfUI54MOasdgG0ztkuBofZsruSdnY0oqJGXnJ67EyIdJGemPFAys/nb1zI1iJffEpCihky7XI6o7h4BPpkm17qvhjyLuNA+i5m9tFlgvJbAIxIfzrd7RoHULjKgO2BSCqGbdfHy/iIdkPc4hc+9poOB1LSKY7yRUGyfPNL5m3YiMznxHImMBoAUMTLLZgeZ3LteVz0ZTAXQ2pXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QjxsT7Ig0oAkz/C5eueR9/Aeesvg1pojaIhx+iF16uE=; b=m1nF4xbsLqtZu4/vGNqVixcKrJGDgNw8nW2nlDjNW09VYGJrl1Yp5LLh5LshmQXIbXH6VNJ0HDP+71aZ/NtxJHw/DrTKPJSJMUevbOwq3Y7li5//KIFa6XKb139bu6JHI9GSjEhwrKUYUPz0IndvJ0M4hZsLJObqnQzUaUDHWXIZrax4L7q2vlhcQp8qJHnUA/qBLyvGVrGUEe6uVZOzDxaEw+JNhZS0QWi/H+u27aPPNrHP9BEPEbWG4wNtHh8LAwxcxlSfJ/TbLj1z1e1zeli7tGsA2dRGtlXpKJd4KQofCgdGuqJ3pReBry5xYKUVwZhAiZDI8jfnUoWPQu1Kag== 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 Received: from PH0PR11MB5832.namprd11.prod.outlook.com (2603:10b6:510:141::7) by PH7PR11MB7122.namprd11.prod.outlook.com (2603:10b6:510:20d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Mon, 18 Nov 2024 04:49:36 +0000 Received: from PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::a467:823d:3fac:250a]) by PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::a467:823d:3fac:250a%4]) with mapi id 15.20.8158.017; Mon, 18 Nov 2024 04:49:36 +0000 From: "Gujjar, Abhinandan S" To: Stephen Hemminger , "dev@dpdk.org" CC: "jerin.jacob@caviumnetworks.com" , "Richardson, Bruce" Subject: RE: [PATCH v3 04/10] app/test: avoid duplicate initialization Thread-Topic: [PATCH v3 04/10] app/test: avoid duplicate initialization Thread-Index: AQHbN5oc60HhNdgrs0ubMVhThuw9NrK8ezgQ Date: Mon, 18 Nov 2024 04:49:34 +0000 Message-ID: References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> <20241115200751.17141-5-stephen@networkplumber.org> In-Reply-To: <20241115200751.17141-5-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5832:EE_|PH7PR11MB7122:EE_ x-ms-office365-filtering-correlation-id: f0b1f2e2-bfbe-4089-e3eb-08dd078c6631 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?KMYopO5SSHq3F/3xcKVCCdrVqMA0y92aXrfe0bgs2DTXe+v2cRrctXy8NKO5?= =?us-ascii?Q?7TLKSP8HA1ftVKcIYjSgYw/3e+8LCsXmRkM8zB5tpn+dabh9j7vRVh1ooxpr?= =?us-ascii?Q?PdxJDF16kF7VK5KMoBHNbfWkE/hNGAOK+1smcPgosorT+2FU2b9eiGrXjYcm?= =?us-ascii?Q?itZ28r9g0VbUb7Ov/XM7ZDdDIs7vtkeaosVI7Ns9aR0u72jnB39XCO8fVSyN?= =?us-ascii?Q?FSHbfq17vpOEFTwnnpnD2eyWr40eOfboEtxmVTKHVRmt34Wxal+R6R3wf9Mo?= =?us-ascii?Q?dpLOgZm6SKUq6eVn26X3QHIp3rtVvtQarsB+8eh+S3EEYS2OG7yyMtQ21OJt?= =?us-ascii?Q?FVMd6z0fNV548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= =?us-ascii?Q?RVRIU+ovp9YVn9oR1sZtAbBkfeEQLvp916wBxd6ZdwxFFDF3fwtDxIavI1AG?= =?us-ascii?Q?GBIQ7p+wCe/7cxyefNWOJ0Kd?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5832.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2ryhVfjDYSuoSn8LDOTRbXSbsSdXvZEmr3Ay+0Dq5MmxZGEeXpszJsYIBpWr?= =?us-ascii?Q?nEkerAUO654ZycseQwuNj0BELMCAapYxkUrhRSNQlZzisJGhR6j8kXmyZrd2?= =?us-ascii?Q?UvDWr41SNG+sQlqC/OxmfTpesrvOC6Fmqc0MG6kQxO3C2+M1MW6iObWGhmpy?= =?us-ascii?Q?Te692MnmuMaUb24wOdQ6GQIl6tMcsg1a7bkuxLtv6x8ExCuKZj8cTTK4UH0C?= =?us-ascii?Q?x3V0Ljhl6RmAK7FLW08F0nVIwuFvMZWpqZNXIARtDgpynHQ3ccLsHMXXLUz6?= =?us-ascii?Q?J7vidG8MW1iBMcC/WVfCG2p84qeogyQ99FzNUov3gPgHXDDj6jURIb4WR7oV?= =?us-ascii?Q?1bMYiNsE8bder3RCoc8QRFqeB959nznv2eG84PY0v4kzuZAC30YEGAbOzHIZ?= =?us-ascii?Q?FhTCV3+ST1Ox4vzTnsPGr+cSJINmRmIM1v7vGaP8+VcSF3npQ0zZNwvNl64k?= =?us-ascii?Q?IUd2aoNkuboqvcN0FP/+mGLb7exeCY7YRCJvxsI0xxbiFJmnFPFHVO4K5M6v?= =?us-ascii?Q?vN6aqjecn2jBIm5ygZJ02PxN6H4aTnC9ci9IbRZsLhZeqZi9glkAD/rZVz08?= =?us-ascii?Q?u1lzh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0e8D/xF3L3RdCiw53aKxQnNLEjYL6aF?= =?us-ascii?Q?MMKwELE/JkKupRzaS37H1GikzWrfhJ6YRvwbD0cJJbMV6q5hPYO8tHcTN/lK?= =?us-ascii?Q?v+ovZauwPxkdxsXV6UW7JDBJUm3amoMFvutIjh7D?= 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: PH0PR11MB5832.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0b1f2e2-bfbe-4089-e3eb-08dd078c6631 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2024 04:49:34.7621 (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: TMVEa1HXoks6qthaqWUoZ8OUxYLapdpEvWHF/2jtIRF1N5rtgAQo0z0Rc2egJ7TsxNqszpuY5CXnYw1OXmp91wMaJC3h+XHS2qt5WLMjZb8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7122 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Stephen Hemminger > Sent: Saturday, November 16, 2024 1:37 AM > To: dev@dpdk.org > Cc: Stephen Hemminger ; > jerin.jacob@caviumnetworks.com; Richardson, Bruce > ; Gujjar, Abhinandan S > > Subject: [PATCH v3 04/10] app/test: avoid duplicate initialization >=20 > The event_dev_config initialization had duplicate assignments to the same > element. Change to use structure initialization so that compiler will cat= ch this > type of bug. >=20 > Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ >=20 > Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") > Cc: jerin.jacob@caviumnetworks.com >=20 > Signed-off-by: Stephen Hemminger Acked-by: Abhinandan Gujjar > Acked-by: Bruce Richardson > --- > app/test/test_event_crypto_adapter.c | 24 ++++++++++-------------- > 1 file changed, 10 insertions(+), 14 deletions(-) >=20 > diff --git a/app/test/test_event_crypto_adapter.c > b/app/test/test_event_crypto_adapter.c > index 9d38a66bfa..ab24e30a97 100644 > --- a/app/test/test_event_crypto_adapter.c > +++ b/app/test/test_event_crypto_adapter.c > @@ -1154,21 +1154,17 @@ configure_cryptodev(void) >=20 > static inline void > evdev_set_conf_values(struct rte_event_dev_config *dev_conf, > - struct rte_event_dev_info *info) > + const struct rte_event_dev_info *info) > { > - memset(dev_conf, 0, sizeof(struct rte_event_dev_config)); > - dev_conf->dequeue_timeout_ns =3D info->min_dequeue_timeout_ns; > - dev_conf->nb_event_ports =3D NB_TEST_PORTS; > - dev_conf->nb_event_queues =3D NB_TEST_QUEUES; > - dev_conf->nb_event_queue_flows =3D info->max_event_queue_flows; > - dev_conf->nb_event_port_dequeue_depth =3D > - info->max_event_port_dequeue_depth; > - dev_conf->nb_event_port_enqueue_depth =3D > - info->max_event_port_enqueue_depth; > - dev_conf->nb_event_port_enqueue_depth =3D > - info->max_event_port_enqueue_depth; > - dev_conf->nb_events_limit =3D > - info->max_num_events; > + *dev_conf =3D (struct rte_event_dev_config) { > + .dequeue_timeout_ns =3D info->min_dequeue_timeout_ns, > + .nb_event_ports =3D NB_TEST_PORTS, > + .nb_event_queues =3D NB_TEST_QUEUES, > + .nb_event_queue_flows =3D info->max_event_queue_flows, > + .nb_event_port_dequeue_depth =3D info- > >max_event_port_dequeue_depth, > + .nb_event_port_enqueue_depth =3D info- > >max_event_port_enqueue_depth, > + .nb_events_limit =3D info->max_num_events, > + }; > } >=20 > static int > -- > 2.45.2