From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9232DA057C; Thu, 26 Mar 2020 15:14:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E06CE2C15; Thu, 26 Mar 2020 15:14:36 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by dpdk.org (Postfix) with ESMTP id 1B82B2BAE for ; Thu, 26 Mar 2020 15:14:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585232074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ULdaAVO4CaEjVcPQUajJDQPoL/Z4ohGb4dxAfg6DPE=; b=irGWWLTEoh74uGPsxuaCqkZQfvGV7n9aRVeL9IiWCuOYYH0gSIuM+OLazv8b+7xOjXCw+a olhUFsZz0Cls69NNz/7t460NOJon5wELWHg6x8bA3YbXG2gkR/QNabffJ2VQr/m6X3aP1m uxAYE0pq+DA7KBYogL+ningmd3C3b2I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-494-_eC7o-ytOXaB1J-0ILmoHQ-1; Thu, 26 Mar 2020 10:14:32 -0400 X-MC-Unique: _eC7o-ytOXaB1J-0ILmoHQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8218818CA241; Thu, 26 Mar 2020 14:14:31 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.110.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFC2119C70; Thu, 26 Mar 2020 14:14:26 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, xiaolong.ye@intel.com, zhihong.wang@intel.com, viacheslavo@mellanox.com, matan@mellanox.com, xiao.w.wang@intel.com Cc: Maxime Coquelin Date: Thu, 26 Mar 2020 15:14:22 +0100 Message-Id: <20200326141422.20264-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH] vhost: prefix vDPA enum value for PCI address type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In order to avoid potential conflicts, rename the PCI_ADDR enum value to VDPA_ADDR_PCI in vdpa_addr_type_enum. All symbols referencing this enum are experimental, so it does not break API policy. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 2 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +- examples/vdpa/main.c | 2 +- lib/librte_vhost/rte_vdpa.h | 2 +- lib/librte_vhost/vdpa.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index da4667ba5..ec97178dc 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1177,7 +1177,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_= unused, =09=09(1ULL << VHOST_F_LOG_ALL); =20 =09internal->dev_addr.pci_addr =3D pci_dev->addr; -=09internal->dev_addr.type =3D PCI_ADDR; +=09internal->dev_addr.type =3D VDPA_ADDR_PCI; =09list->internal =3D internal; =20 =09if (rte_kvargs_count(kvlist, IFCVF_SW_FALLBACK_LM)) { diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index 97d914a47..0a9f31a87 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -446,7 +446,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rt= e_unused, =09} =09priv->ctx =3D ctx; =09priv->dev_addr.pci_addr =3D pci_dev->addr; -=09priv->dev_addr.type =3D PCI_ADDR; +=09priv->dev_addr.type =3D VDPA_ADDR_PCI; =09priv->id =3D rte_vdpa_register_device(&priv->dev_addr, &mlx5_vdpa_ops); =09if (priv->id < 0) { =09=09DRV_LOG(ERR, "Failed to register vDPA device."); diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c index d2e2cb7cd..78d72634b 100644 --- a/examples/vdpa/main.c +++ b/examples/vdpa/main.c @@ -331,7 +331,7 @@ static void cmd_create_vdpa_port_parsed(void *parsed_re= sult, =09=09cmdline_printf(cl, "Unable to parse the given bdf.\n"); =09=09return; =09} -=09addr.type =3D PCI_ADDR; +=09addr.type =3D VDPA_ADDR_PCI; =09did =3D rte_vdpa_find_device_id(&addr); =09if (did < 0) { =09=09cmdline_printf(cl, "Unable to find vdpa device id.\n"); diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h index 9a3deb31d..3c400ee79 100644 --- a/lib/librte_vhost/rte_vdpa.h +++ b/lib/librte_vhost/rte_vdpa.h @@ -19,7 +19,7 @@ #define MAX_VDPA_NAME_LEN 128 =20 enum vdpa_addr_type { -=09PCI_ADDR, +=09VDPA_ADDR_PCI, =09VDPA_ADDR_MAX }; =20 diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c index 2b8670873..b2b2a105f 100644 --- a/lib/librte_vhost/vdpa.c +++ b/lib/librte_vhost/vdpa.c @@ -27,7 +27,7 @@ is_same_vdpa_device(struct rte_vdpa_dev_addr *a, =09=09return false; =20 =09switch (a->type) { -=09case PCI_ADDR: +=09case VDPA_ADDR_PCI: =09=09if (a->pci_addr.domain !=3D b->pci_addr.domain || =09=09=09=09a->pci_addr.bus !=3D b->pci_addr.bus || =09=09=09=09a->pci_addr.devid !=3D b->pci_addr.devid || --=20 2.24.1