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 1FCFD42601 for ; Thu, 21 Sep 2023 04:28:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12A3F402CE; Thu, 21 Sep 2023 04:28:25 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 019F44014F; Thu, 21 Sep 2023 04:28:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695263302; x=1726799302; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=z5g2jjV9ELs+2OJhVwSu84Z+n1kf3W9zxjWzRNOz4Hs=; b=LBQtrQvQBu9/yCAYZkh+4WWgqRCI3/lEZSnqKA9hGOiyTfhTgnCOEy/I ap4pxrqspuEQxqUj9GQu/LxXs9odw6sr/q+7CsK7d+uGTkC6k0He2sWJb 4T6aqMwjX95QjI9to8JwLro9kS1nubYefcz+eNuH+r0PI0Ke82v+S3c2b 8g4+XQ8IfSnTQeGVgDqpA6/Yb+owX0gMuWz1+D6xePYPYmYkbeH32wxVz YV0ppAgPakEML6o3HSEuMHWhg9eGbZobNUJvklggCi3LdhDdbjWK49rWf gkwG0TC017mdVpGUbMpgwJPOtRrofRrTYIDiO0unZY6riUAQknYC38Jt9 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="384239918" X-IronPort-AV: E=Sophos;i="6.03,164,1694761200"; d="scan'208";a="384239918" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 19:28:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="1077721644" X-IronPort-AV: E=Sophos;i="6.03,164,1694761200"; d="scan'208";a="1077721644" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Sep 2023 19:28:20 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 20 Sep 2023 19:28:19 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.32 via Frontend Transport; Wed, 20 Sep 2023 19:28:19 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) 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.32; Wed, 20 Sep 2023 19:28:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jod44SsbroMAnOlMF52+uBt976lGDns1EKx+HOU7aKT3eUmkFJdtinGMWRFtHLCQfOVfNrBYEpxxUWqMxsIO+bD/fCGqF49FmuHkAiEq3TddTe+sOGaFIepPmXM028mgYCozG1r4tr1527HMoy/C8Herkn/Yx0h3xQGKOBYKdjNWFWRByQg9co4T0KL+SXYEz9GOxn2RsQpRios6ZfDRea0GO2p96qM6lHPLYiKoDhjG1Sp26h+/4sD7OtM9eWv1I7YxofsqUbPI75vYnm8qSurjDBdhQmeSTTmnC/z17PEoD2zLG9pUZBxkatsZvOyaTYI152Hvw3jwZxUQqAX+Ng== 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=cI8G/1rci8GNYD6QUY+Y7Ju681rFWx/eSaoii6eC77I=; b=DmQ2lm530aksQQtssParAvmaXB7kismCMKU3BGT4zV+VL66M6DetWR3BZg4Wt2D90PNkoRl4SIHHghxS5ZLmJ+ix5/+otN5ALlC/22Bhk4gTggE7ZBt7V8i4fyXE5WyTNj9WthUMs9XynrkzRfmSR3TvlsgudjtUCh+4OBcZJNZLrrsmOOxSmiSf0io8b5u61W8nhv2hEK0Wq4DRa5lERizWc9uOJPaDuyaifAcgDcY3T5kRyGIqtXHOLosKBl8cp6Rl7BYGwuR6P0czrXV1wGwCQzaobsTQIQvMgjPjVwLRYTJ4rZeCRcB07PuQb2hSWqWhwvE4Wl7VKtXjnNnknw== 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 SN7PR11MB7019.namprd11.prod.outlook.com (2603:10b6:806:2ae::22) by DM4PR11MB7352.namprd11.prod.outlook.com (2603:10b6:8:103::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Thu, 21 Sep 2023 02:28:17 +0000 Received: from SN7PR11MB7019.namprd11.prod.outlook.com ([fe80::7f2e:e0a:ddb2:753d]) by SN7PR11MB7019.namprd11.prod.outlook.com ([fe80::7f2e:e0a:ddb2:753d%7]) with mapi id 15.20.6792.026; Thu, 21 Sep 2023 02:28:17 +0000 From: "Jiang, Cheng1" To: Vipin Varghese , "thomas@monjalon.net" , "dev@dpdk.org" , "anoobj@marvell.com" CC: "Ferruh.Yigit@amd.com" , "stable@dpdk.org" Subject: RE: [PATCH v2] app/dma-perf: fix physical address seg-fault Thread-Topic: [PATCH v2] app/dma-perf: fix physical address seg-fault Thread-Index: AQHZ0CYC0Bow/HT52kutgu/pvDjzn7Akvi2Q Date: Thu, 21 Sep 2023 02:28:16 +0000 Message-ID: References: <20230816071810.1796-1-vipin.varghese@amd.com> <20230816094216.1847-1-vipin.varghese@amd.com> In-Reply-To: <20230816094216.1847-1-vipin.varghese@amd.com> Accept-Language: zh-CN, 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: SN7PR11MB7019:EE_|DM4PR11MB7352:EE_ x-ms-office365-filtering-correlation-id: d5dd43c3-41e0-4da4-2e1c-08dbba4a69e0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z9o3W6VvE7Qa5X0KutoTVZaiksOC9Xxk35whDFrS0YAJvaNUgQhZpDWPm5bQIA8J4JrXmkgrti6AjzXC0rsVByv52HVBdP5ABuN2rPOGbJUig+EG+b7Hr+CD+IJ3Vcbgf9na4IObOrFWnYyGy0W3KUQy2nJHvW9jeTlZoiX5k3zKGh/VcWpDZwY1SgJ0DdKo5f758azpB2DxXFkOUywbgDH2WK3ZG/THmOARvRZ/68oQeckgd64maB+9B7ffkT8Uf5QvLlunWFIVVZ4qFVnuSDBT7IWBx47VpR2XkcjfAIF3av1sMgVm+j/BqDAUrosVR5OHR3UHQLTyKaD1dEi91Kw9ttlh6CMJHAefJHJxqjcTC6iU7FlFHrbkR9Y+lfY6+psY1ZY2mNSzTVpYhXmT6GzDuDEnKoYQaCI0CYTLsjZDSsCDpd/weUm1WWGf6yInmCIS2r/COuq3Df80XbGIpiKeuoza9vfim5JEXZJuVAYw26uo7pWHu8hU4Dd0X8oChY8BqS3YmxQZ1flydIE0srqICapVg5BvZ+wauvnbHMHAth0gzuXFNH5Y2gAH72URdFJQTEsVK2rcnpCO08gd5OFbLKENFFYdHiFY5BGtNMCo/DL5aybjNf00HHJcLWUz x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7019.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(136003)(396003)(376002)(366004)(1800799009)(451199024)(186009)(8936002)(26005)(4326008)(8676002)(71200400001)(7696005)(53546011)(38070700005)(38100700002)(122000001)(6506007)(83380400001)(5660300002)(110136005)(76116006)(9686003)(41300700001)(54906003)(64756008)(66946007)(66556008)(66476007)(66446008)(52536014)(316002)(478600001)(2906002)(86362001)(33656002)(55016003)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2pk8rYcLbXqNPbBvsLoktVwtyW1MRjemaEfE7/uN0/V2tg00D1sHwv41HN8O?= =?us-ascii?Q?WgFuFFiN9UdeJYykQAqiU5afum9h87LsS2UHRugyP+DCB1hgT6mRHQDaQxT6?= =?us-ascii?Q?ewLj6U0o6ltSIub3B9KREj7957uQSDlSW2jIpJc1FDo75QDnhrIHM2GmH+nZ?= =?us-ascii?Q?hqrEl8htvxJqZpgSkP6M5kyams8qNrOIYlGLTLxHUf2Cf5hOhwMouD7c1R3W?= =?us-ascii?Q?5Dfsf6FlrsrTt1SQqHwSElsjVXAlLct1yLZPhxabY4/9VG/f56RToIV2b+2p?= =?us-ascii?Q?+QfdrpWlw4HbXUIPTiO16qFZndt5aYuICRn54rBr6/JHZf6MP8/DQZfCMpz+?= =?us-ascii?Q?6NZEu94z4ZNXYKiq+0WfbOAdvoFoFeW+oZTZtwLiQjNOWXgoEpSzk8MDC+l5?= =?us-ascii?Q?zh6rfjwnnTVidTClFjMfhx6uAqROouy+L1jKkNevHQZLJ17XWUAmDkB0Ri7G?= =?us-ascii?Q?DCDqQUpt/88bRAlTpfVQ5YP/1pRMR8akpItBsqmfsaFW2N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o6jEsNuhDLLug7FuZEQq4QwaR60eXzBIr0AGDVG5OKC72VmuEzrWf4e?= =?us-ascii?Q?FcpRNA8qm8Dt+8bDMVFVPYhFxfyFgkseLi9r9+wjd6Dd/IaZtEhfdyyTgzVl?= =?us-ascii?Q?IKYo5dptX8NXiOsght5CD6aFNuzONFOlJbmK6zt8hBuoAfgJr+XqREdewg4A?= =?us-ascii?Q?PfbceR6njqOuF6xSYiDq225wkA0yHbwpZkOJdVdE?= 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: SN7PR11MB7019.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5dd43c3-41e0-4da4-2e1c-08dbba4a69e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2023 02:28:16.9317 (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: EF3KL2zAjnNAUsmQuNQNHHGtkn68f/87dEDtv+Aqanj97Azliqpl8AhO6gSoIXR/elNpX63u1vEgkt0/fL7Q4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7352 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, > -----Original Message----- > From: Vipin Varghese > Sent: Wednesday, August 16, 2023 5:42 PM > To: thomas@monjalon.net; dev@dpdk.org; anoobj@marvell.com > Cc: Ferruh.Yigit@amd.com; Jiang, Cheng1 ; > stable@dpdk.org > Subject: [PATCH v2] app/dma-perf: fix physical address seg-fault >=20 > do_cpu_mem_copy uses DPDK API rte_mbuf_data_iova to return the start > of the virtual address for both src and dst. > But in case of iova mode set as PA, this results in seg-fault. > This is because rte_memcpy uses VA address and not PA. >=20 > This fix invokes `rte_pktmbuf_mtod` for both src and dst. >=20 > Bugzilla ID: 1269 > Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test") > Cc: cheng1.jiang@intel.com >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Vipin Varghese > Suggested-by: Anoob Joseph > --- >=20 > v2: > - suggest use of pktmbuf_mtod for both va and pa. >=20 > tested for both va and pa >=20 > CMD: > PA: dpdk-test-dma-perf --iova-mode=3Dpa -- --config test.ini > VA: dpdk-test-dma-perf --iova-mode=3Dva -- --config test.ini > DC: dpdk-test-dma-perf --iova-mode=3Ddc -- --config test.ini >=20 > Log: fails for dc mode `EAL: invalid parameters for --iova-mode` >=20 > test.ini: > ``` > [case1] > type=3DCPU_MEM_COPY > mem_size=3D10 > buf_size=3D64,8192,2,MUL > src_numa_node=3D0 > dst_numa_node=3D0 > cache_flush=3D0 > test_seconds=3D2 > lcore =3D 7 > eal_args=3D--in-memory --no-pci > ``` > --- > app/test-dma-perf/benchmark.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma- > perf/benchmark.c index 0601e0d171..1d1c9bde99 100644 > --- a/app/test-dma-perf/benchmark.c > +++ b/app/test-dma-perf/benchmark.c > @@ -288,10 +288,11 @@ do_cpu_mem_copy(void *p) >=20 > while (1) { > for (i =3D 0; i < nr_buf; i++) { > + void *src =3D rte_pktmbuf_mtod(dsts[i], void *); > + void *dst =3D rte_pktmbuf_mtod(srcs[i], void *); > + Thank you for fixing it. Sorry that I missed the discussion earlier. Reviewed-by: Cheng Jiang Thanks, Cheng