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 24247A00C4; Thu, 29 Sep 2022 08:19:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 165DF41143; Thu, 29 Sep 2022 08:19:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3226840E5A for ; Thu, 29 Sep 2022 08:19:40 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28T52F4E029051; Wed, 28 Sep 2022 23:19:35 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2176.outbound.protection.outlook.com [104.47.57.176]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jvrvjk5er-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 23:19:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DImjBLn5mEeC1Bmb5rIKCUMUVcGET/yrwZkOT92KC37OdpLC9iv/zL1g3tfuqXe+NQGg85vYS3mAfmJlkvhFrUn9zaOFWu8xO5GZ6ZLRpcSda3gyiKFIQB6PoP/6l948QQlHHYaqW8vDhDopvdJEl89uj7OEbm3AiNjhoQRxCwSNgU5z7Hv592dTeluyL/0tWyPNt2TGy2PCzESPx1zt8NfiIc4lK9rFoh6NjNnZutddewn5uETruOVT+xB+oWlDbZRs93HCVU0otNsxMngkGmwfCE2xSJUaS5Dc7KH9Op9apDOd9c6yOPsLYbYl2MfY9HVfw3G19ZbaHeqMoJIfdw== 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=PVL/2buL9fxngeZ2yL/+f+ZzC6kPLtRkSheR/MqL5mo=; b=MhkkTsZifk0pK+azM/HAQNAThVaWo+Um42zEGqEFqx0G6lhlQmnKeAtOmTfPQ1B5lfUsri5V90lQMEinDsLYjvN6ddtzTnD7VtwwsU+aL7TKWQvX/vaEtcllwbTKXF+h2yQUuhOuZw46M+faPwPQuXx/Kd/YKnrxYHEBLd6mpDoa/UVcYQuU+sVvy9kjpS4ioK6Q8V0wXqQNDpIXRpPwOUbScYIQzMEu5QzzAupvxQiUDJ4LIEkqpVWPp47OK/NN5Xg0wCNjHXG9OznAlVTVtta9a/w0n/rPCl416xaAL4QsLwxgps1/rpbkRMPS/PU4lhPRH8bV4jfaXfntNYtbhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PVL/2buL9fxngeZ2yL/+f+ZzC6kPLtRkSheR/MqL5mo=; b=CdcnCw/4ac0NhZM5nhsh7M4yjfn99Uckvmv2m5cPELJv81O5YRzMsTy0axUOfY/9WbaXHDSn1YhIK5iWLCdMYC3W9dyc7tzRTB4ruusC5E0wLVi/Coris3L9KvBEqAKl5tC/F0+n/atmvEzqXFWhR1N39jGWiVuL2s0YJZfuHi0= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by DM6PR18MB3585.namprd18.prod.outlook.com (2603:10b6:5:2af::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Thu, 29 Sep 2022 06:19:33 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::16f8:9275:a441:cfec%5]) with mapi id 15.20.5676.017; Thu, 29 Sep 2022 06:19:33 +0000 From: Shijith Thotton To: Olivier Matz CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula , "Honnappa.Nagarahalli@arm.com" , "bruce.richardson@intel.com" , Jerin Jacob Kollanukkaran , "mb@smartsharesystems.com" , "stephen@networkplumber.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" , Ruifeng Wang , Jan Viktorin , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Radha Chintakuntla , Veerasenareddy Burru , Ashwin Sekhar T K , Jakub Palider , Tomasz Duszynski Subject: RE: [EXT] Re: [PATCH v3 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Thread-Topic: [EXT] Re: [PATCH v3 4/5] drivers: mark Marvell cnxk PMDs work with IOVA as VA Thread-Index: AQHYzcIKjyIbiG2iSUK5tuExHMOwYa301vmAgAEjLxA= Date: Thu, 29 Sep 2022 06:19:32 +0000 Message-ID: References: <20220907134340.3629224-1-sthotton@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4425:EE_|DM6PR18MB3585:EE_ x-ms-office365-filtering-correlation-id: 78f2683c-fa85-44d1-01bb-08daa1e2932f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rP1T8YBVLOahhDwyQ6fgRhnlepojcIRT7IzaI4ApCSVxFtpkhfbz+fU/gdrh/L5bfLzSiurqRrgIC3zBLOWLuadheJWpWjvyJnNacvjH2LhqAo+OSfpeq/rKZFBGQCNZo9+Lmz/q5U8J0RcasAwzSyRWGG13qJHo0/I+KSbOl4uYsIDKCPPIw5yUj3g6FL6UekM7hQmmLjKwjTuOEcI0ySOLuD1yBAwx2X+e1dbBIgIgWpBJavpDqyBh5ssQFZywU7dcn8vgTAix4sZPtfOiL6JkyxdH0nLCan/O4dYcz9iHaMAuWshZKeJL55qdFEuXntT91Ypfdr1vzTX3bgqiLK+R5+CO06xbGN8pr5/5QEvZh7gkSh4HARA3w58qyBI8uAWL9Sjdtdz2jjlfLi1Irk58dTdwl6eEVzD3yFlyrj1VtZzgp3VdTYoODozkKB4luGs32GUvyH0oQTwZA6f6AT0xpxUXpI1nkzyUNvRdrUyhn9FJ+7QxfoHdLuzZqOW3oYmzrASlOpfThnQxOKpRO9O6CIEm9++rpOqCl/IF8qtGVPJf1GMxW40CSTghQRXOrszh6Fr08ewADBeBl3mGkuua21eZBqlilFFuW5NT7LmjajTs36EqtWIpezNii04m8pTm8MZ3UysYefAY76aQxsfHDDZdd21w4QEMZ+LF+fGBYtYyz4eAE/EI12MN/bJVlXQ8LSVhQR+9AsyyFHgwfH008Qj5AmSHeeI9gJDN5PIJQM4MxpNooPbbBMAhXjC4U20ucKoYtnIy7duAOOvuEw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4425.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(366004)(39860400002)(396003)(136003)(451199015)(54906003)(71200400001)(6916009)(316002)(83380400001)(478600001)(66946007)(8676002)(4326008)(76116006)(66556008)(41300700001)(107886003)(6506007)(64756008)(66476007)(52536014)(9686003)(5660300002)(30864003)(7416002)(26005)(2906002)(38070700005)(8936002)(66446008)(33656002)(186003)(7696005)(122000001)(38100700002)(86362001)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?13pD7DaNytpCqzQBUFxFkFHgnJw9SSq00jEUc69Jo8LTfE8oJaZULEjtjycG?= =?us-ascii?Q?frigimuL55L+wmzhI6l/Td4Ib0hGHneFTR5qJjY28KPKKhhUkS1dhk+IPUQ2?= =?us-ascii?Q?4jg085IoG6unQmr91jWh3Q7WRPP5O6uCx/Y8MiRKSCKdingYrmtxnUrhYxWm?= =?us-ascii?Q?okHtPPMbfh0Eq+Rtp8wEgyEuwcW5iyBQ/hQFQW/kq/2imUhO7/7wFY1p8MCc?= =?us-ascii?Q?0wbewAmeIWBLZHsPcf4eZopsL17QL9Ma5rxBRMros5zLkny9a1MivimYVROj?= =?us-ascii?Q?b8KYj8HNB5VYZaie3BoTp+WgQFBT2IWgdqM2fkyPhwl7Ra0/qvRBm+fctq+U?= =?us-ascii?Q?5F3wFt8+gbMbzd63pMaEBIAHceUvF3ewlOI+n5aO55FzoqDYunrPXek2yMmk?= =?us-ascii?Q?YPH16MjF6SlMP3oduKOkC7c9zXVqZqulM6z4yRXmfbNxivR065Z2wiqq1yvH?= =?us-ascii?Q?E09VspwgmWJnOR2bxH2iwsAwv/EPutI/tLpAIv68TAi/JL4AkoldhFaR3Rej?= =?us-ascii?Q?ei1tOwjiWlKjO9BxpjDepzO+cnOg4PmhPwtAczKbYpRsJaBcQGpq5WaQT1nV?= =?us-ascii?Q?uPSegi1CIPyvq/SACLB+3Xrtlw9LO/gvq43ZoBsmlXq7F9433Qdf8QrQ3Zph?= =?us-ascii?Q?WZkgWQEgWVAxBpagmjLi/in85TxBuZcijMS4DrKihxioUkpOT1+U4AtsRvbH?= =?us-ascii?Q?aTgUCynP/DdtEQ7nKKmCy5ULFe3vl4eKNSskOPZ3itABnWjc3d5JPzSGBksX?= =?us-ascii?Q?O9pS42idhVfutJYdb5/oge4GhAKuIJtS5mSnk0g4dODhhvqQq/LdLgCknRpJ?= =?us-ascii?Q?PhnqjadUZc3LctOOFVzqZ1rugqAfqS864evOpr+lAvOtBTP25/g2OJC533Da?= =?us-ascii?Q?2no1tEGXMrlc3cOpufGQhFZ36l7YEad58TxoLycqfWlTHFVcIFo1SCvtfXE1?= =?us-ascii?Q?0rJuDaXjlsaOOoMNV4EzFA4SbP1l2mmAutd6CW6un0WFXccBwXMwkDnqZpHD?= =?us-ascii?Q?QehmNWynlUC7puOYBtfZXE3PSAh2LNpgExBUmgLsu4BzOlVzL46DvfV7ggio?= =?us-ascii?Q?ZyD4SKCwIi2JMvNDJ8k4Rk+Mpk1T5YVzr9k4J7OupruKluLdVtSdsm219sU9?= =?us-ascii?Q?BX1ZnV8jEAcqa8LzVI4KMGFw49s8fXUwntXuid5k8JoxsGgycgKGGzc+HE+s?= =?us-ascii?Q?oxX8vWdccBjsTAUVhDkOZcXAkLz8bdasV0zcK9wkBAZQT1nyXi3Gvh5DweZs?= =?us-ascii?Q?F5jiGPNIDRpHM3/zpcURFsGx1KJD9aJoHY2C4U/v/cYmU6ZAcNrlyI1UsC83?= =?us-ascii?Q?5ZkZnTIdyUFqG//nb30UxsahXENu64qO69yK8nf3Gg1s5oZ4Le0O4+wS24jt?= =?us-ascii?Q?EYCixDhlwKFi8nXaZCzCIFlpwjs5Wdubf7L9YZzOioyhjFzgA+WELcRL4ocS?= =?us-ascii?Q?7xnAKf06OjZ8x+k+Cex4yTsZ6e+Ja+8acqpjKKvTCxBtzF1X6eN8V6rsM4b7?= =?us-ascii?Q?zegs6FLYvWrhIeBUVwAq9C18WP1CkqSlO3Fj0ih7iIKlHjVg2imXupumZwp8?= =?us-ascii?Q?auDlffBjH5pkDbzO7LZQR0cPQhlPqHCZBklR7nl8?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4425.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78f2683c-fa85-44d1-01bb-08daa1e2932f X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2022 06:19:32.9733 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hWSaNlyc9IKEoba9yy5GLlPEuEcpEUe640Av52F49Xac9/LlZd+99USXwQkH0M8Z0iXVXwHtXMrznjB5CfA5xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB3585 X-Proofpoint-GUID: hdG4RwAiceSBloz6dfmylVNdXfrkuhjB X-Proofpoint-ORIG-GUID: hdG4RwAiceSBloz6dfmylVNdXfrkuhjB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-29_04,2022-09-29_01,2022-06-22_01 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 >> Enabled the flag pmd_iova_as_va in cnxk driver build files as they work >> with IOVA as VA. Updated cn9k and cn10k soc build configurations to >> enable the IOVA as VA build by default. >> >> Signed-off-by: Shijith Thotton >> --- >> config/arm/meson.build | 8 +++- >> drivers/common/cnxk/meson.build | 1 + >> drivers/crypto/cnxk/cn10k_ipsec_la_ops.h | 4 +- >> drivers/crypto/cnxk/cn9k_ipsec_la_ops.h | 2 +- >> drivers/crypto/cnxk/meson.build | 2 + >> drivers/dma/cnxk/meson.build | 1 + >> drivers/event/cnxk/meson.build | 1 + >> drivers/mempool/cnxk/meson.build | 1 + >> drivers/net/cnxk/cn10k_tx.h | 55 +++++++----------------- >> drivers/net/cnxk/cn9k_tx.h | 55 +++++++----------------- >> drivers/net/cnxk/cnxk_ethdev.h | 1 - >> drivers/net/cnxk/meson.build | 1 + >> drivers/raw/cnxk_bphy/meson.build | 1 + >> drivers/raw/cnxk_gpio/meson.build | 1 + >> 14 files changed, 50 insertions(+), 84 deletions(-) >> >> diff --git a/config/arm/meson.build b/config/arm/meson.build >> index 9f1636e0d5..4e95e8b388 100644 >> --- a/config/arm/meson.build >> +++ b/config/arm/meson.build >> @@ -294,7 +294,8 @@ soc_cn10k =3D { >> 'flags': [ >> ['RTE_MAX_LCORE', 24], >> ['RTE_MAX_NUMA_NODES', 1], >> - ['RTE_MEMPOOL_ALIGN', 128] >> + ['RTE_MEMPOOL_ALIGN', 128], >> + ['RTE_IOVA_AS_VA', 1] >> ], >> 'part_number': '0xd49', >> 'extra_march_features': ['crypto'], >> @@ -370,7 +371,10 @@ soc_cn9k =3D { >> 'description': 'Marvell OCTEON 9', >> 'implementer': '0x43', >> 'part_number': '0xb2', >> - 'numa': false >> + 'numa': false, >> + 'flags': [ >> + ['RTE_IOVA_AS_VA', 1] >> + ] >> } > >I think this could go in a separate patch: "disable IOVA as PA for octeont= x2/3" > >The reason is that this patch clearly breaks the API (m->buf_iova field >becomes invalid) and the ABI (mbuf fields are moved) for these >architectures. This ABI breakage has to be advertised in the release >note. In fact, it should have been advertised before, but I suppose it >does not impact general purpose arm distributions, so I guess it is ok. > >One other thing to highlight: enabling RTE_IOVA_AS_VA means that it >disable all drivers that do not have the pmd_iova_as_va flag. Are there >use-cases where drivers other than cnxk are used? For instance, is there >a PCI bus which is likely to be used by a driver/* ? > All always enable drivers are enabled in this mode, which include bus/pci, bus/vdev and mempool/ring. >> >> soc_stingray =3D { >> diff --git a/drivers/common/cnxk/meson.build >b/drivers/common/cnxk/meson.build >> index 6f808271d1..d019cfa8d1 100644 >> --- a/drivers/common/cnxk/meson.build >> +++ b/drivers/common/cnxk/meson.build >> @@ -86,3 +86,4 @@ sources +=3D files('cnxk_telemetry_bphy.c', >> ) >> >> deps +=3D ['bus_pci', 'net', 'telemetry'] >> +pmd_iova_as_va =3D true >> diff --git a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h >b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h >> index 66cfe6ca98..16db14344d 100644 >> --- a/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h >> +++ b/drivers/crypto/cnxk/cn10k_ipsec_la_ops.h >> @@ -85,7 +85,7 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_cryp= to_op >*cop, >> >> /* Prepare CPT instruction */ >> inst->w4.u64 =3D inst_w4_u64 | rte_pktmbuf_pkt_len(m_src); >> - dptr =3D rte_pktmbuf_iova(m_src); >> + dptr =3D rte_pktmbuf_mtod(m_src, uint64_t); >> inst->dptr =3D dptr; >> inst->rptr =3D dptr; >> >> @@ -102,7 +102,7 @@ process_inb_sa(struct rte_crypto_op *cop, struct >cn10k_ipsec_sa *sa, >> >> /* Prepare CPT instruction */ >> inst->w4.u64 =3D sa->inst.w4 | rte_pktmbuf_pkt_len(m_src); >> - dptr =3D rte_pktmbuf_iova(m_src); >> + dptr =3D rte_pktmbuf_mtod(m_src, uint64_t); >> inst->dptr =3D dptr; >> inst->rptr =3D dptr; >> >> diff --git a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h >b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h >> index e469596756..8b68e4c728 100644 >> --- a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h >> +++ b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h >> @@ -99,7 +99,7 @@ process_inb_sa(struct rte_crypto_op *cop, struct >cn9k_ipsec_sa *sa, >> >> /* Prepare CPT instruction */ >> inst->w4.u64 =3D sa->inst.w4 | rte_pktmbuf_pkt_len(m_src); >> - inst->dptr =3D inst->rptr =3D rte_pktmbuf_iova(m_src); >> + inst->dptr =3D inst->rptr =3D rte_pktmbuf_mtod(m_src, uint64_t); >> inst->w7.u64 =3D sa->inst.w7; >> } >> #endif /* __CN9K_IPSEC_LA_OPS_H__ */ >> diff --git a/drivers/crypto/cnxk/meson.build b/drivers/crypto/cnxk/meson= .build >> index 23a1cc3aac..764e7bb99a 100644 >> --- a/drivers/crypto/cnxk/meson.build >> +++ b/drivers/crypto/cnxk/meson.build >> @@ -31,3 +31,5 @@ if get_option('buildtype').contains('debug') >> else >> cflags +=3D [ '-ULA_IPSEC_DEBUG' ] >> endif >> + >> +pmd_iova_as_va =3D true >> diff --git a/drivers/dma/cnxk/meson.build b/drivers/dma/cnxk/meson.build >> index d4be4ee860..ef0e3db109 100644 >> --- a/drivers/dma/cnxk/meson.build >> +++ b/drivers/dma/cnxk/meson.build >> @@ -3,3 +3,4 @@ >> >> deps +=3D ['bus_pci', 'common_cnxk', 'dmadev'] >> sources =3D files('cnxk_dmadev.c') >> +pmd_iova_as_va =3D true >> diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.b= uild >> index b27bae7b12..650d0d4256 100644 >> --- a/drivers/event/cnxk/meson.build >> +++ b/drivers/event/cnxk/meson.build >> @@ -479,3 +479,4 @@ foreach flag: extra_flags >> endforeach >> >> deps +=3D ['bus_pci', 'common_cnxk', 'net_cnxk', 'crypto_cnxk'] >> +pmd_iova_as_va =3D true >> diff --git a/drivers/mempool/cnxk/meson.build >b/drivers/mempool/cnxk/meson.build >> index d5d1978569..a328176457 100644 >> --- a/drivers/mempool/cnxk/meson.build >> +++ b/drivers/mempool/cnxk/meson.build >> @@ -17,3 +17,4 @@ sources =3D files( >> ) >> >> deps +=3D ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool'= ] >> +pmd_iova_as_va =3D true >> diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h >> index ea13866b20..2ef62da132 100644 >> --- a/drivers/net/cnxk/cn10k_tx.h >> +++ b/drivers/net/cnxk/cn10k_tx.h >> @@ -1775,14 +1775,6 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, >uint64_t *ws, >> mbuf2 =3D (uint64_t *)tx_pkts[2]; >> mbuf3 =3D (uint64_t *)tx_pkts[3]; >> >> - mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + >> - offsetof(struct rte_mbuf, buf_iova)); >> /* >> * Get mbuf's, olflags, iova, pktlen, dataoff >> * dataoff_iovaX.D[0] =3D iova, >> @@ -1790,28 +1782,24 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, >uint64_t *ws, >> * len_olflagsX.D[0] =3D ol_flags, >> * len_olflagsX.D[1](63:32) =3D mbuf->pkt_len >> */ >> - dataoff_iova0 =3D vld1q_u64(mbuf0); >> - len_olflags0 =3D vld1q_u64(mbuf0 + 2); >> - dataoff_iova1 =3D vld1q_u64(mbuf1); >> - len_olflags1 =3D vld1q_u64(mbuf1 + 2); >> - dataoff_iova2 =3D vld1q_u64(mbuf2); >> - len_olflags2 =3D vld1q_u64(mbuf2 + 2); >> - dataoff_iova3 =3D vld1q_u64(mbuf3); >> - len_olflags3 =3D vld1q_u64(mbuf3 + 2); >> + dataoff_iova0 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf0)->data_off, >vld1q_u64(mbuf0), 1); >> + len_olflags0 =3D vld1q_u64(mbuf0 + 3); >> + dataoff_iova1 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf0)->data_off, >vld1q_u64(mbuf1), 1); >> + len_olflags1 =3D vld1q_u64(mbuf1 + 3); >> + dataoff_iova2 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf0)->data_off, >vld1q_u64(mbuf2), 1); >> + len_olflags2 =3D vld1q_u64(mbuf2 + 3); >> + dataoff_iova3 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf0)->data_off, >vld1q_u64(mbuf3), 1); >> + len_olflags3 =3D vld1q_u64(mbuf3 + 3); >> >> /* Move mbufs to point pool */ >> - mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> + mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + offsetof(struct rte_mbuf, >pool)); >> + mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + offsetof(struct rte_mbuf, >pool)); >> + mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + offsetof(struct rte_mbuf, >pool)); >> + mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + offsetof(struct rte_mbuf, >pool)); >> >> if (flags & (NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | >> NIX_TX_OFFLOAD_L3_L4_CSUM_F)) { >> @@ -1861,17 +1849,6 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, >uint64_t *ws, >> xtmp128 =3D vzip2q_u64(len_olflags0, len_olflags1); >> ytmp128 =3D vzip2q_u64(len_olflags2, len_olflags3); >> >> - /* Clear dataoff_iovaX.D[1] bits other than dataoff(15:0) */ >> - const uint64x2_t and_mask0 =3D { >> - 0xFFFFFFFFFFFFFFFF, >> - 0x000000000000FFFF, >> - }; >> - >> - dataoff_iova0 =3D vandq_u64(dataoff_iova0, and_mask0); >> - dataoff_iova1 =3D vandq_u64(dataoff_iova1, and_mask0); >> - dataoff_iova2 =3D vandq_u64(dataoff_iova2, and_mask0); >> - dataoff_iova3 =3D vandq_u64(dataoff_iova3, and_mask0); >> - >> /* >> * Pick only 16 bits of pktlen preset at bits 63:32 >> * and place them at bits 15:0. >> diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h >> index 6ce81f5c96..f5d99ccb5a 100644 >> --- a/drivers/net/cnxk/cn9k_tx.h >> +++ b/drivers/net/cnxk/cn9k_tx.h >> @@ -1005,14 +1005,6 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct >rte_mbuf **tx_pkts, >> mbuf2 =3D (uint64_t *)tx_pkts[2]; >> mbuf3 =3D (uint64_t *)tx_pkts[3]; >> >> - mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + >> - offsetof(struct rte_mbuf, buf_iova)); >> /* >> * Get mbuf's, olflags, iova, pktlen, dataoff >> * dataoff_iovaX.D[0] =3D iova, >> @@ -1020,28 +1012,24 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct >rte_mbuf **tx_pkts, >> * len_olflagsX.D[0] =3D ol_flags, >> * len_olflagsX.D[1](63:32) =3D mbuf->pkt_len >> */ >> - dataoff_iova0 =3D vld1q_u64(mbuf0); >> - len_olflags0 =3D vld1q_u64(mbuf0 + 2); >> - dataoff_iova1 =3D vld1q_u64(mbuf1); >> - len_olflags1 =3D vld1q_u64(mbuf1 + 2); >> - dataoff_iova2 =3D vld1q_u64(mbuf2); >> - len_olflags2 =3D vld1q_u64(mbuf2 + 2); >> - dataoff_iova3 =3D vld1q_u64(mbuf3); >> - len_olflags3 =3D vld1q_u64(mbuf3 + 2); >> + dataoff_iova0 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf0)->data_off, >vld1q_u64(mbuf0), 1); >> + len_olflags0 =3D vld1q_u64(mbuf0 + 3); >> + dataoff_iova1 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf1)->data_off, >vld1q_u64(mbuf1), 1); >> + len_olflags1 =3D vld1q_u64(mbuf1 + 3); >> + dataoff_iova2 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf2)->data_off, >vld1q_u64(mbuf2), 1); >> + len_olflags2 =3D vld1q_u64(mbuf2 + 3); >> + dataoff_iova3 =3D >> + vsetq_lane_u64(((struct rte_mbuf *)mbuf3)->data_off, >vld1q_u64(mbuf3), 1); >> + len_olflags3 =3D vld1q_u64(mbuf3 + 3); >> >> /* Move mbufs to point pool */ >> - mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> - mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + >> - offsetof(struct rte_mbuf, pool) - >> - offsetof(struct rte_mbuf, buf_iova)); >> + mbuf0 =3D (uint64_t *)((uintptr_t)mbuf0 + offsetof(struct rte_mbuf, >pool)); >> + mbuf1 =3D (uint64_t *)((uintptr_t)mbuf1 + offsetof(struct rte_mbuf, >pool)); >> + mbuf2 =3D (uint64_t *)((uintptr_t)mbuf2 + offsetof(struct rte_mbuf, >pool)); >> + mbuf3 =3D (uint64_t *)((uintptr_t)mbuf3 + offsetof(struct rte_mbuf, >pool)); >> >> if (flags & (NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | >> NIX_TX_OFFLOAD_L3_L4_CSUM_F)) { >> @@ -1091,17 +1079,6 @@ cn9k_nix_xmit_pkts_vector(void *tx_queue, struct >rte_mbuf **tx_pkts, >> xtmp128 =3D vzip2q_u64(len_olflags0, len_olflags1); >> ytmp128 =3D vzip2q_u64(len_olflags2, len_olflags3); >> >> - /* Clear dataoff_iovaX.D[1] bits other than dataoff(15:0) */ >> - const uint64x2_t and_mask0 =3D { >> - 0xFFFFFFFFFFFFFFFF, >> - 0x000000000000FFFF, >> - }; >> - >> - dataoff_iova0 =3D vandq_u64(dataoff_iova0, and_mask0); >> - dataoff_iova1 =3D vandq_u64(dataoff_iova1, and_mask0); >> - dataoff_iova2 =3D vandq_u64(dataoff_iova2, and_mask0); >> - dataoff_iova3 =3D vandq_u64(dataoff_iova3, and_mask0); >> - >> /* >> * Pick only 16 bits of pktlen preset at bits 63:32 >> * and place them at bits 15:0. >> diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethd= ev.h >> index 4cb7c9e90c..abf1e4215f 100644 >> --- a/drivers/net/cnxk/cnxk_ethdev.h >> +++ b/drivers/net/cnxk/cnxk_ethdev.h >> @@ -690,7 +690,6 @@ cnxk_pktmbuf_detach(struct rte_mbuf *m) >> >> m->priv_size =3D priv_size; >> m->buf_addr =3D (char *)m + mbuf_size; >> - m->buf_iova =3D rte_mempool_virt2iova(m) + mbuf_size; >> m->buf_len =3D (uint16_t)buf_len; >> rte_pktmbuf_reset_headroom(m); >> m->data_len =3D 0; >> diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build >> index f347e98fce..01489b3a36 100644 >> --- a/drivers/net/cnxk/meson.build >> +++ b/drivers/net/cnxk/meson.build >> @@ -194,3 +194,4 @@ foreach flag: extra_flags >> endforeach >> >> headers =3D files('rte_pmd_cnxk.h') >> +pmd_iova_as_va =3D true >> diff --git a/drivers/raw/cnxk_bphy/meson.build >b/drivers/raw/cnxk_bphy/meson.build >> index 14147feaf4..781ed63e05 100644 >> --- a/drivers/raw/cnxk_bphy/meson.build >> +++ b/drivers/raw/cnxk_bphy/meson.build >> @@ -10,3 +10,4 @@ sources =3D files( >> 'cnxk_bphy_irq.c', >> ) >> headers =3D files('rte_pmd_bphy.h') >> +pmd_iova_as_va =3D true >> diff --git a/drivers/raw/cnxk_gpio/meson.build >b/drivers/raw/cnxk_gpio/meson.build >> index a75a5b9084..f9aed173b6 100644 >> --- a/drivers/raw/cnxk_gpio/meson.build >> +++ b/drivers/raw/cnxk_gpio/meson.build >> @@ -9,3 +9,4 @@ sources =3D files( >> 'cnxk_gpio_selftest.c', >> ) >> headers =3D files('rte_pmd_cnxk_gpio.h') >> +pmd_iova_as_va =3D true >> -- >> 2.25.1 >>