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 0051543C51; Tue, 5 Mar 2024 10:13:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D115B40FDE; Tue, 5 Mar 2024 10:13:57 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 2245440F16 for ; Tue, 5 Mar 2024 10:13:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709630037; x=1741166037; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=g2ySYlbaAQGHfSNsJUvBlMBHwr/iVx4X694ispwUCSg=; b=YAiBoyExj88/XR2lJuB40Qhmn0XnqJnCMvQvkTbbT+S+kwWv+gApVZVi XSGe7yfTAazDAmYCAwbabgC3CN9HCrDMOSfEVs3M8w8cO6NoXAoaxLR6I NeFz8HIKDU9jRdogKWL4UIoG/mjoLEon6c9SHA/EqKUNWJihvsg1AG5z3 EEw7oy122PTfqMzmvjyYqIhlKK+jzfvMuBu62uDtcO3zIszOCbfWFUOyn GRD5ke8vhE0x4lfGspZ8yPbXB2xU1eAaieYxqO7SU45tOTSw9Zy8oLpel OrkBWbnItLqrQ+4NwaVlC5j4l9nEtjU3m/mElcVI/rPIeG/U2cYS+WdBs g==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4031638" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4031638" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 01:13:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="13960365" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Mar 2024 01:13:54 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.35; Tue, 5 Mar 2024 01:13:54 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 5 Mar 2024 01:13:53 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 5 Mar 2024 01:13:53 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) 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.35; Tue, 5 Mar 2024 01:13:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grDb3YVUdLMk9QhrooD0x+/7f7juKcqyWQf4pOlft3x+oZc8eK6ocWmryfLiNYc5HfeCOpmUlp1pNpSWhWXjeufVVySo6HaoslYhzKYQoBOhMSuS66IS0Gfg4fQhIBGeULvGn8mll8ZGSAyJAE6ca0EzlX7IAvdVOrxCFH+CwwC1LT08awsTfRNCaKcANWEmzKaa1wSR3MBbhnO14jKZFGRRJ52qjjyc6EMJiTawBE+q3sI73FPe3YM5pQrTQKYjynalq8LYIEeVpZ6BwoQMMTGTuaFiDb67VMFcjbcYu9lKIkeLIiX7/y2/w7Pa1dLYW6Q8MEtpyQZzT9Th58a/RQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O2Pvi2MeZMO3ftJ3RqrVorS2d/XYdIUmGS8+yTeiYj4=; b=Jfj153SnzCvrFLjv6rmWaAd+VuvlGZAGy3Kmr6sGH3MFtEwA3Oq4QdGTPfhmcuYPmHI4ID6+XUXVL0M2bFPjZU6rM+XIg1epdNKILWReoSt/rFDs8jntTnBdzcfoKWi1fQJI7YiINpc7+siYAIvbSEi7BdH+aSb74y45rF4hIS7skPgw7RQfNsJvQACiWtaNtr+QrsfhK7kEyke+Ezmgh1ld/n6vV0RSL4I+jPUGCJepHznDg4aKDIluXHo+nYsme6AgPKWCagC14YakE5CJpmZYXb4NKYkq/EfoWq/Qd5k0CdoAqcoW74o9ZlcvoUZxeC7mtQCk+RNAA9ibYeBHpA== 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 DM4PR11MB7757.namprd11.prod.outlook.com (2603:10b6:8:103::22) by SA2PR11MB4794.namprd11.prod.outlook.com (2603:10b6:806:f9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.23; Tue, 5 Mar 2024 09:13:51 +0000 Received: from DM4PR11MB7757.namprd11.prod.outlook.com ([fe80::6fc1:232e:5d99:43a3]) by DM4PR11MB7757.namprd11.prod.outlook.com ([fe80::6fc1:232e:5d99:43a3%4]) with mapi id 15.20.7362.019; Tue, 5 Mar 2024 09:13:50 +0000 From: "Xu, Rosen" To: Stephen Hemminger , "dev@dpdk.org" Subject: RE: [PATCH v2 22/71] raw/ifpga: replace use of fixed size rte_memcpy Thread-Topic: [PATCH v2 22/71] raw/ifpga: replace use of fixed size rte_memcpy Thread-Index: AQHaa/xn15Aj1zDPqEuLG+2peNd7iLEo4tiA Date: Tue, 5 Mar 2024 09:13:50 +0000 Message-ID: References: <20240229225936.483472-1-stephen@networkplumber.org> <20240301171707.95242-1-stephen@networkplumber.org> <20240301171707.95242-23-stephen@networkplumber.org> In-Reply-To: <20240301171707.95242-23-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: DM4PR11MB7757:EE_|SA2PR11MB4794:EE_ x-ms-office365-filtering-correlation-id: bfa07d99-8053-4f18-0074-08dc3cf49269 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DkFeJSGdKcLdEJBLe+6cPKCgLwzjkJpd1EpWlReF3y1TU+suBMGO5Iqop9QiB5sZPT6YucT5Jys/+Nup9cuMXs/O9hB/Dbg6aklVZA7W/DiYc8TRV0FLpT+Bf92vT87JD78m3TsWFSnS9g/uJgAnR5smmsHKACBEQi4EtCDgRdWUqkZGgqgMj7b2ULpT1Br5tOr8ZuMKyhYvuthf3QVc0csrED7UiZAOs6tGTxRtJrSzTy79Z47LgEyLkwZ2vai79hN5CX3fbJCcGTiroHDlckpPS8F8ZNQrYJeYbNVFM7L2RWPExum4Sz62tggaDFLcau3hm9djPQ91cVKysyB7FM1IesP0R69vabSJbA9PK2YmcflZmxGYLB1/YVHPu0dvbWc2ImC/AaRgpb8H/fMbuIhSBj5BgTmgds2Dykeii/OM5lmsToaRl4b6QDYJa7zcjM+rHGeSlTNzcb4AMhXM18pj/zO7Ig9UDJr6xdNLO/KVUmj6DLPXmDsgHlH99IvYba5XqweRFSnF2x8KwTNV4wiZGFRRGyFQOD1ZMw4ksUz8ffSC/C8pnWbJoz/SvGNrmxOuLlJvpSEYD5Q1qzamiQR/YeBM9GUOgCjhYsoZ7zALBWPs/hl1JymQVmYcz4S++3RMgOSX/KJfMuOC/3AahSGM/KcPcU7dppHnWkF3W/85WmTO43zbA2AeM6sdIzSW+t/l3PgSUWu6hRUQstuaq+b1gHY+Psda4eTo8aQZr1s= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB7757.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?etGulcT9vi94b9lAlQTb2zn831n4leAhyut2l7lyv0F359CYEZ/AQ3p2w3HA?= =?us-ascii?Q?UDiklhMBrLcPnTqZK4QEVPIQ2Bwckj49GMiTIA5zFnzaOqTaj8cJhhIh8tjS?= =?us-ascii?Q?S2lAHZgknq+SK6AfJz8/Rp617zChFAMk6BvffKVgHKXjMjj5QjxpiAAGW1Ni?= =?us-ascii?Q?FdymzTifvTRo5F4ERJdi3y0E7iZp+5UwgeSrZq9far0Lh/qnC0XCY02J4RRX?= =?us-ascii?Q?BBF87d4CzmdrekQX1Ha77HgDYi9TLZkLBtbzlx6zH66DrEGycHf4Qu+hytbX?= =?us-ascii?Q?zctAPr6RlO+9Zk7B//vGnU1Rp43iT70Un16xwgA7u+C2PRKPMn0yPp9C/GBa?= =?us-ascii?Q?kdE9Y0DcR+vJvfvIuE1x+rLDkLazNySqclYpjTAxrZ/xk5uid5oWutRybsNT?= =?us-ascii?Q?3IAHWhkhEHqjofn4Dc27vPeDl/2G8PThdKtTF791iBmu/6vD6749Z/SJjJnj?= =?us-ascii?Q?ke2r3lMV5wkqFULwP1EBWd8mNBcdE0fEAwUK5NEW4zudSxotY1m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qgSci0jL+FPIgFH1VU9sjylUiyquf9AqrasZ?= =?us-ascii?Q?s2xHR2cO292bv7f+EQ/aK8FPHE0qRDia+V1nAR98gCsCVVfhSsOsLe4BBvc2?= =?us-ascii?Q?1mLXX45I6lU+QCYt61OtFiYp0O+iIjHFcTeQIaMniRXvxSsory3pN7XiOmDd?= =?us-ascii?Q?2h4uHK/tT4YaZAoyUP0=3D?= 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: DM4PR11MB7757.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfa07d99-8053-4f18-0074-08dc3cf49269 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2024 09:13:50.5371 (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: EUOl8OicU8YQ98X1nIZV2qG1aoYCIoBHjm8Kvds7odDnCsSkHPu8JBGt3O0fghkNDLBQajVgRksZmiNK4fj/VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4794 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 Hi, > -----Original Message----- > From: Stephen Hemminger > Sent: Saturday, March 2, 2024 1:15 AM > To: dev@dpdk.org > Cc: Stephen Hemminger ; Xu, Rosen > > Subject: [PATCH v2 22/71] raw/ifpga: replace use of fixed size rte_memcpy >=20 > Automatically generated by devtools/cocci/rte_memcpy.cocci >=20 > Signed-off-by: Stephen Hemminger > --- > drivers/raw/ifpga/afu_pmd_he_hssi.c | 3 +-- > drivers/raw/ifpga/afu_pmd_he_lpbk.c | 3 +-- > drivers/raw/ifpga/afu_pmd_he_mem.c | 3 +-- > drivers/raw/ifpga/afu_pmd_n3000.c | 8 ++++---- > drivers/raw/ifpga/ifpga_rawdev.c | 11 +++++------ > 5 files changed, 12 insertions(+), 16 deletions(-) >=20 > diff --git a/drivers/raw/ifpga/afu_pmd_he_hssi.c > b/drivers/raw/ifpga/afu_pmd_he_hssi.c > index 859f28dcc1f0..c2aaed9203ae 100644 > --- a/drivers/raw/ifpga/afu_pmd_he_hssi.c > +++ b/drivers/raw/ifpga/afu_pmd_he_hssi.c > @@ -15,7 +15,6 @@ >=20 > #include > #include > -#include > #include > #include > #include > @@ -314,7 +313,7 @@ static int he_hssi_config(struct afu_rawdev *dev, > void *config, > if (cfg->port >=3D NUM_HE_HSSI_PORTS) > return -EINVAL; >=20 > - rte_memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); > + memcpy(&priv->he_hssi_cfg, cfg, sizeof(priv->he_hssi_cfg)); >=20 > return 0; > } > diff --git a/drivers/raw/ifpga/afu_pmd_he_lpbk.c > b/drivers/raw/ifpga/afu_pmd_he_lpbk.c > index c7c5cda48c35..ffb7075c84d2 100644 > --- a/drivers/raw/ifpga/afu_pmd_he_lpbk.c > +++ b/drivers/raw/ifpga/afu_pmd_he_lpbk.c > @@ -15,7 +15,6 @@ >=20 > #include > #include > -#include > #include > #include > #include > @@ -363,7 +362,7 @@ static int he_lpbk_config(struct afu_rawdev *dev, > void *config, > if ((cfg->end < cfg->begin) || (cfg->end > MAX_CACHE_LINES)) > return -EINVAL; >=20 > - rte_memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); > + memcpy(&priv->he_lpbk_cfg, cfg, sizeof(priv->he_lpbk_cfg)); >=20 > return 0; > } > diff --git a/drivers/raw/ifpga/afu_pmd_he_mem.c > b/drivers/raw/ifpga/afu_pmd_he_mem.c > index a1db533eeb93..b799e40d2db9 100644 > --- a/drivers/raw/ifpga/afu_pmd_he_mem.c > +++ b/drivers/raw/ifpga/afu_pmd_he_mem.c > @@ -14,7 +14,6 @@ >=20 > #include > #include > -#include > #include > #include > #include > @@ -126,7 +125,7 @@ static int he_mem_tg_config(struct afu_rawdev *dev, > void *config, > if (config_size !=3D sizeof(struct rte_pmd_afu_he_mem_tg_cfg)) > return -EINVAL; >=20 > - rte_memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv- > >he_mem_tg_cfg)); > + memcpy(&priv->he_mem_tg_cfg, config, sizeof(priv- > >he_mem_tg_cfg)); >=20 > return 0; > } > diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c > b/drivers/raw/ifpga/afu_pmd_n3000.c > index 67b394126595..9236c0b15371 100644 > --- a/drivers/raw/ifpga/afu_pmd_n3000.c > +++ b/drivers/raw/ifpga/afu_pmd_n3000.c > @@ -1867,8 +1867,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, > void *config, > if ((cfg->nlb_cfg.end < cfg->nlb_cfg.begin) || > (cfg->nlb_cfg.end > MAX_CACHE_LINES)) > return -EINVAL; > - rte_memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, > - sizeof(struct rte_pmd_afu_nlb_cfg)); > + memcpy(&priv->nlb_cfg, &cfg->nlb_cfg, > + sizeof(struct rte_pmd_afu_nlb_cfg)); > } else if (cfg->type =3D=3D RTE_PMD_AFU_N3000_DMA) { > if (cfg->dma_cfg.index >=3D NUM_N3000_DMA) > return -EINVAL; > @@ -1887,8 +1887,8 @@ static int n3000_afu_config(struct afu_rawdev *dev, > void *config, > cfg->dma_cfg.length); > } > } > - rte_memcpy(&priv->dma_cfg, &cfg->dma_cfg, > - sizeof(struct rte_pmd_afu_dma_cfg)); > + memcpy(&priv->dma_cfg, &cfg->dma_cfg, > + sizeof(struct rte_pmd_afu_dma_cfg)); > } else { > IFPGA_RAWDEV_PMD_ERR("Invalid type of N3000 AFU"); > return -EINVAL; > diff --git a/drivers/raw/ifpga/ifpga_rawdev.c > b/drivers/raw/ifpga/ifpga_rawdev.c > index f89bd3f9e2c3..d5d47e14dd0e 100644 > --- a/drivers/raw/ifpga/ifpga_rawdev.c > +++ b/drivers/raw/ifpga/ifpga_rawdev.c > @@ -14,7 +14,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -258,7 +257,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev > *ifpga_dev) > if (point < 12) > return -1; > point -=3D 12; > - rte_memcpy(ifpga_dev->parent_bdf, &link[point], 12); > + memcpy(ifpga_dev->parent_bdf, &link[point], 12); >=20 > point =3D strlen(link1); > if (point < 26) > @@ -948,10 +947,10 @@ ifpga_rawdev_pr(struct rte_rawdev *dev, > if (ret) > return ret; >=20 > - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, > - sizeof(u64)); > - rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b > + 8, > - sizeof(u64)); > + memcpy(&afu_pr_conf->afu_id.uuid.uuid_low, uuid.b, > + sizeof(u64)); > + memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8, > + sizeof(u64)); >=20 > IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=3D0x%lx, > uuid_h=3D0x%lx\n", > __func__, > -- > 2.43.0 Reviewed-by: Rosen Xu