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 DCCF3A00C2; Wed, 28 Sep 2022 06:43:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E0984113C; Wed, 28 Sep 2022 06:43:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5DC4F41133 for ; Wed, 28 Sep 2022 06:43:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664340208; x=1695876208; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LqqA0TpM6cxMiea7o2lVfa/lHhRzE4hgzAMNRVAmpNg=; b=fcFCTpw/Q+zAaJ8/NgnbSp/63lQBeyeox3+wXvSy+9cI3h3UagkT4icl APK/kfqtj+glG9hZsbBD57qJbnQChVeCNdnquS/JdOWXOleRdBCcktkSM JSREe2j6t6Uo9JIH9fqHMfWPN0553uXJ4slEHvyS7Juw7yq6V+6s2LIAc 9BPT9NMSabJv2qfqXSY+LGS6dnyUTEdCldOZSgtdk9XM0hf9F8zXpCgFM SKEZCeSR4z8ONTVnPqFDpzik+rx9Z00XHZYEgE2xd2WyGgKHoe2RgEPUG L2erhVq066qibjaByxerTlVw7/X8U6Siy1iqpe5WNbQwdhL5QMyXAbjYE g==; X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="288659806" X-IronPort-AV: E=Sophos;i="5.93,351,1654585200"; d="scan'208";a="288659806" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 21:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="747291586" X-IronPort-AV: E=Sophos;i="5.93,351,1654585200"; d="scan'208";a="747291586" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 27 Sep 2022 21:43:17 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 21:43:17 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 21:43:17 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 27 Sep 2022 21:43:17 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.46) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 27 Sep 2022 21:43:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lrsAM8a6Pv6BURI3JCOvpnbuHG7pD+IK5g36hBenI3jyJ+Xk2AAe1L1/X+YWr6FBGsLtonR4EwQyKPtE77U/T4/ggpsD7mzjXE8mcOHNCuMMY7VN0GZyMRJZm1Pq8nWZxlyiOJAtOpsHn8nZw/iVO0fEIW0StL4kvuSalvo+1ddyIKr/z1nXtFR3ypxGJqmWg8mfNERHkgmC2f4AbOpnTo8a3GDa17rV6TaIsURLoLDCPFjy2pgR/MO//LV68NW5NNuNs6ImMiO/3NjIShwLarUhQF80XNBXFnR7ovZqCjRNfdFETaOY2lKW5CsQHiY/Ex5McxueyfLHkSwMowCnCw== 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=OOyu8lx3g8Xw6idU12un8XnncBUHq8nmDv658XHZ8PM=; b=WWcmwSj+gYd0emvDbMXRfxWkXn38a+fa0QjkHJf5KZ7SGLbVr5oXFEQVZdXRXbGX2bDclCj+TVrvpVk5fn9zTgeqC47BawYmBpGLq1RdGtcGdIwb8SLC9RzTBPYBGVaGPMwuTObwC8aLtXE0T6PzDa9L2ADqXFf8iKVUTnIcWXBf66M6AE0niYH4LyKZyG4vCVrXcOpWZapafsOGbBGdRr8gj+VrAk2zOumYuFOBR7UOBy8XC9yPRoDP4xjF+/wC+ErOsUUkWqldxjaUdpc1A/CobWke5APD8l2lLTrvMf228QZdY1w2sue8qltlr0zUGIHo/J9JBIBNkAp1ml/9Iw== 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 SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by SJ1PR11MB6299.namprd11.prod.outlook.com (2603:10b6:a03:456::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.20; Wed, 28 Sep 2022 04:43:15 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::39bf:57b1:4824:d40d]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::39bf:57b1:4824:d40d%6]) with mapi id 15.20.5676.017; Wed, 28 Sep 2022 04:43:15 +0000 From: "Xia, Chenbo" To: David Marchand , "dev@dpdk.org" CC: Maxime Coquelin , Ray Kinsella Subject: RE: [PATCH] vhost: remove deprecated helpers Thread-Topic: [PATCH] vhost: remove deprecated helpers Thread-Index: AQHY0mWLlLMdpJxy706Bg8TtcJlXQ630RLCA Date: Wed, 28 Sep 2022 04:43:15 +0000 Message-ID: References: <20220927113608.3015654-1-david.marchand@redhat.com> In-Reply-To: <20220927113608.3015654-1-david.marchand@redhat.com> Accept-Language: en-US, zh-CN 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: SN6PR11MB3504:EE_|SJ1PR11MB6299:EE_ x-ms-office365-filtering-correlation-id: f65cd60a-5168-4e5b-cc8a-08daa10bf4fc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dTnXYf6w6oFMsS2Dvg1SEqTuuTQ4sI+vBH/LogBVlujEkfm3EkHSKYkTHjdJBoKUxJjhfeNfzJpNu4hnOyRuTFQB0p77H+GxlOddTk4Hys2f9AVVyeMfBaeco4QDK7WnAw3vcbMUOAwfBOUTe/bBd3mZQ1WPsHnrYDiK+kFKv9sPIPAekhKV0wyJ+78tOU0DfqT54AsRpuyBIOTunu9lLYI3zr3FMcq+jGRM58qYTxSopW+srEWj43EbKVAnMix3R/TplcravykHBBgHSjEpYIVTEK7ufVscWwBUNDqCB7kSFKvm4OdM4fpCEzR0cMAZxYpCoGiJ8DdXL1qFcbsW6j/jild0Tr4CVXtzFg4tLDaJHSj+e9NzUQYjbAyKew5YvnnQqTQi3fWNE/PvffcyeGXuBHRfwXtVrquMjrDUPOlo3T4V5omYQ35vDQcZDJ0LjIoxChumlyCtlcQW2xK++Mh8WCu74O2AjevZ4huvEhjtJ9d8g26wWagyogw+lHILFHfB0gaAQXag1cJiSouvjx8wO26NPQ5N8vL9n5/iYDz9yDlrRZPL6b8rThkYRftwpsPT1e3tMU4Rx2pnjxtCwiJEucgL2KOvx8lpQVzJ4UE20ETGzlUu1TS4Ocax5Bk4Ad/aJHzj/W/ABdnhuxRgSuuE1PvXXaR3tX2ezWcpJbnR9X0osHEvY87NyZS0GYGMJOrPkidLqgMaJRcpAuXIGn7WH8Flk/bKEXj+W28XqqahrJslXd4U7xzmOHYpRWDegyFeeZI80oBF+fE9xDERrA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(346002)(136003)(366004)(39860400002)(396003)(451199015)(110136005)(55016003)(53546011)(7696005)(122000001)(2906002)(186003)(316002)(86362001)(38070700005)(33656002)(83380400001)(478600001)(6506007)(54906003)(82960400001)(4326008)(66476007)(66946007)(9686003)(64756008)(76116006)(66446008)(8676002)(26005)(41300700001)(66556008)(38100700002)(52536014)(71200400001)(8936002)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rWynGINuJxvEGtZvasY82OMWmxHuB9JTbCWxATY8lIngatfBie6w0gOBgS0A?= =?us-ascii?Q?ugbBBpZ1ulBQo+iKwROwUEVSbDqRtm/xEpakgZAfx3xk0j5hB+6G5upsHk2j?= =?us-ascii?Q?RePRCSt1Dy/a+IVkT9dNi52tNxPJ1amTKgE9D2B8769Wb/Fl02u9sa8VjmNE?= =?us-ascii?Q?YSDNZ21V6AJA1GKwxYTBRn+CoDksms5RHvjphHJuDi0EYM96wemQKkFe/lLZ?= =?us-ascii?Q?iMvIaOOvew35G2O1G3AUwCC3Y95ENsxl5zUUkKBMfMxceOxzDIPe/MpdM4iF?= =?us-ascii?Q?btK25jdDH4TkelAldv0d5i/KJn46AaDyS1fgxKhDsBbon70qWT5o198kosL3?= =?us-ascii?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ffiMmukJpKhvhmLKYFko6?= =?us-ascii?Q?0skStDX4b9SdD3oc61M6j+jKMihvIk4seaa7rEYAXNKShuo+yFiCcX8S1CEJ?= =?us-ascii?Q?rM1P+2xNVcV5rsawHNYU9PJqIXZ+dyN3reX0J5XlOk1nYRzWDQ+38nL7oV7D?= =?us-ascii?Q?hrsgBJsPL9Ad0S2tBBf/u/HJAX4jD5Uq6iVfRGjD71sGMQ9UqOkB8z3E+00u?= =?us-ascii?Q?G/AGyxsyjq3iEapSLele80kIt6Y5DmTxMLANWupMgtZ0SmqEsx5euZzu8xTK?= =?us-ascii?Q?thnJvIjcSvO757fm1yTVCxy/i9mUhfMXTTtiJwXJG3JwaJGtxwGEUe+ciOIO?= =?us-ascii?Q?qnnRX8nOdhzjFmPRWXpF4TLKFMMELB0UrdQvR0Jk?= 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: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f65cd60a-5168-4e5b-cc8a-08daa10bf4fc X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2022 04:43:15.2798 (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: EnUzeYn12B7xgTiBDXFVrEioBnUxQHb+QYWNbsH1dyGcs+OT8y6iKlTomoMs8BO7bNSrRSwEyOC5nLuUxhfggQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6299 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: David Marchand > Sent: Tuesday, September 27, 2022 7:36 PM > To: dev@dpdk.org > Cc: Maxime Coquelin ; Xia, Chenbo > ; Ray Kinsella > Subject: [PATCH] vhost: remove deprecated helpers >=20 > Those helpers have been marked as deprecated for a long time and have > documented equivalent helpers. >=20 > Signed-off-by: David Marchand > --- > doc/guides/rel_notes/release_22_11.rst | 3 ++ > lib/vhost/rte_vhost.h | 55 -------------------------- > lib/vhost/version.map | 2 - > lib/vhost/vhost.c | 11 ------ > 4 files changed, 3 insertions(+), 68 deletions(-) >=20 > diff --git a/doc/guides/rel_notes/release_22_11.rst > b/doc/guides/rel_notes/release_22_11.rst > index 684bf74596..7f61cdf56a 100644 > --- a/doc/guides/rel_notes/release_22_11.rst > +++ b/doc/guides/rel_notes/release_22_11.rst > @@ -204,6 +204,9 @@ API Changes > Names for the telemetry commands are now similarly limited. > The parameters for telemetry commands are unaffected by this change. >=20 > +* vhost: Removed deprecated ``rte_vhost_gpa_to_vva`` and > + ``rte_vhost_get_queue_num`` helpers. > + > * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed= . >=20 >=20 > diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h > index 617425e8d6..bb7d86a432 100644 > --- a/lib/vhost/rte_vhost.h > +++ b/lib/vhost/rte_vhost.h > @@ -354,44 +354,6 @@ struct rte_vhost_stat_name { > /** > * Convert guest physical address to host virtual address > * > - * This function is deprecated because unsafe. > - * New rte_vhost_va_from_guest_pa() should be used instead to ensure > - * guest physical ranges are fully and contiguously mapped into > - * process virtual address space. > - * > - * @param mem > - * the guest memory regions > - * @param gpa > - * the guest physical address for querying > - * @return > - * the host virtual address on success, 0 on failure > - */ > -__rte_deprecated > -static __rte_always_inline uint64_t > -rte_vhost_gpa_to_vva(struct rte_vhost_memory *mem, uint64_t gpa) > -{ > - struct rte_vhost_mem_region *reg; > - uint32_t i; > - > - for (i =3D 0; i < mem->nregions; i++) { > - reg =3D &mem->regions[i]; > - if (gpa >=3D reg->guest_phys_addr && > - gpa < reg->guest_phys_addr + reg->size) { > - return gpa - reg->guest_phys_addr + > - reg->host_user_addr; > - } > - } > - > - return 0; > -} > - > -/** > - * Convert guest physical address to host virtual address safely > - * > - * This variant of rte_vhost_gpa_to_vva() takes care all the > - * requested length is mapped and contiguous in process address > - * space. > - * > * @param mem > * the guest memory regions > * @param gpa > @@ -696,23 +658,6 @@ int rte_vhost_get_mtu(int vid, uint16_t *mtu); > */ > int rte_vhost_get_numa_node(int vid); >=20 > -/** > - * @deprecated > - * Get the number of queues the device supports. > - * > - * Note this function is deprecated, as it returns a queue pair number, > - * which is vhost specific. Instead, rte_vhost_get_vring_num should > - * be used. > - * > - * @param vid > - * vhost device ID > - * > - * @return > - * The number of queues, 0 on failure > - */ > -__rte_deprecated > -uint32_t rte_vhost_get_queue_num(int vid); > - > /** > * Get the number of vrings the device supports. > * > diff --git a/lib/vhost/version.map b/lib/vhost/version.map > index 18574346d5..7a00b65740 100644 > --- a/lib/vhost/version.map > +++ b/lib/vhost/version.map > @@ -41,14 +41,12 @@ DPDK_23 { > rte_vhost_get_mtu; > rte_vhost_get_negotiated_features; > rte_vhost_get_numa_node; > - rte_vhost_get_queue_num; > rte_vhost_get_vdpa_device; > rte_vhost_get_vhost_ring_inflight; > rte_vhost_get_vhost_vring; > rte_vhost_get_vring_base; > rte_vhost_get_vring_base_from_inflight; > rte_vhost_get_vring_num; > - rte_vhost_gpa_to_vva; > rte_vhost_log_used_vring; > rte_vhost_log_write; > rte_vhost_rx_queue_count; > diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c > index aa671f47a3..abf17eb509 100644 > --- a/lib/vhost/vhost.c > +++ b/lib/vhost/vhost.c > @@ -859,17 +859,6 @@ rte_vhost_get_numa_node(int vid) > #endif > } >=20 > -uint32_t > -rte_vhost_get_queue_num(int vid) > -{ > - struct virtio_net *dev =3D get_device(vid); > - > - if (dev =3D=3D NULL) > - return 0; > - > - return dev->nr_vring / 2; > -} > - > uint16_t > rte_vhost_get_vring_num(int vid) > { > -- > 2.37.3 Reviewed-by: Chenbo Xia