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 6D8F9A0556; Mon, 17 Oct 2022 09:17:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56CA541144; Mon, 17 Oct 2022 09:17:39 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A3CE441144 for ; Mon, 17 Oct 2022 09:17:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665991057; x=1697527057; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=rakQV2IHcfDwfZqNZi7dr/4nebJyRsH3mVtU0TtwwFc=; b=gZSX4dkZ7Qu9ZmkQ3imEbAe3tSSR5S0olXVCwVbza6UFiNozu2xTvvCw iIgdVEYMJYW7qTW9ZY885kKt47VV4u14JqD37nSRj8qT8ntP//G9HD7x6 RpKUixwGFTyfSzuiS5dQEj/EEvmQUCFB5CB/axUdgokKEPdqfBd9ky/oe +MHUN5cPl2n/987Y7hzPI/+H0mv8LJcrgb4vHTw+ySeEzAZgFaojAc7Qo zmQCpf07XPQb0hA12LK8PU6DyysdfMl0ohPPHZ+nh+gbqc5l30xZvAVYy Xc5Dr6ZHNVWLOsKu65x2B1H37wdbSaMFShcKkj7pDQjbBAfAW/pg3HWKy g==; X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="367751397" X-IronPort-AV: E=Sophos;i="5.95,190,1661842800"; d="scan'208";a="367751397" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 00:17:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="696949532" X-IronPort-AV: E=Sophos;i="5.95,190,1661842800"; d="scan'208";a="696949532" Received: from dpdk-dipei.sh.intel.com ([10.67.110.251]) by fmsmga004.fm.intel.com with ESMTP; 17 Oct 2022 00:17:35 -0700 From: Andy Pei To: dev@dpdk.org Cc: chenbo.xia@intel.com, rosen.xu@intel.com, wei.huang@intel.com, gang.cao@intel.com, maxime.coquelin@redhat.com Subject: [PATCH v5 1/8] vdpa/ifc: add new device ID for legacy network device Date: Mon, 17 Oct 2022 15:13:46 +0800 Message-Id: <1665990833-44710-2-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1665990833-44710-1-git-send-email-andy.pei@intel.com> References: <1661229305-240952-2-git-send-email-andy.pei@intel.com> <1665990833-44710-1-git-send-email-andy.pei@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 From: Huang Wei Add new device id to support IFCVF_NET_TRANSITIONAL_DEVICE_ID (0x1000). Rename macro from "IFCVF_BLK_DEVICE_ID" to "IFCVF_SUBSYS_BLK_DEVICE_ID". Signed-off-by: Huang Wei Signed-off-by: Andy Pei Reviewed-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- drivers/vdpa/ifc/base/ifcvf.h | 6 ++++-- drivers/vdpa/ifc/ifcvf_vdpa.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h index 9d95aac..ef7697a 100644 --- a/drivers/vdpa/ifc/base/ifcvf.h +++ b/drivers/vdpa/ifc/base/ifcvf.h @@ -12,12 +12,14 @@ #define IFCVF_BLK 1 #define IFCVF_VENDOR_ID 0x1AF4 -#define IFCVF_NET_DEVICE_ID 0x1041 +#define IFCVF_NET_MODERN_DEVICE_ID 0x1041 #define IFCVF_BLK_MODERN_DEVICE_ID 0x1042 +#define IFCVF_NET_TRANSITIONAL_DEVICE_ID 0x1000 #define IFCVF_BLK_TRANSITIONAL_DEVICE_ID 0x1001 #define IFCVF_SUBSYS_VENDOR_ID 0x8086 #define IFCVF_SUBSYS_DEVICE_ID 0x001A -#define IFCVF_BLK_DEVICE_ID 0x0002 +#define IFCVF_SUBSYS_NET_DEVICE_ID 0x0001 +#define IFCVF_SUBSYS_BLK_DEVICE_ID 0x0002 #define IFCVF_MAX_QUEUES 1 diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index d5ac583..b4389a0 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1684,23 +1684,30 @@ struct rte_vdpa_dev_info dev_info[] = { static const struct rte_pci_id pci_id_ifcvf_map[] = { { .class_id = RTE_CLASS_ANY_ID, .vendor_id = IFCVF_VENDOR_ID, - .device_id = IFCVF_NET_DEVICE_ID, + .device_id = IFCVF_NET_MODERN_DEVICE_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, .subsystem_device_id = IFCVF_SUBSYS_DEVICE_ID, }, { .class_id = RTE_CLASS_ANY_ID, .vendor_id = IFCVF_VENDOR_ID, + .device_id = IFCVF_NET_TRANSITIONAL_DEVICE_ID, + .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, + .subsystem_device_id = IFCVF_SUBSYS_NET_DEVICE_ID, + }, + + { .class_id = RTE_CLASS_ANY_ID, + .vendor_id = IFCVF_VENDOR_ID, .device_id = IFCVF_BLK_TRANSITIONAL_DEVICE_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, - .subsystem_device_id = IFCVF_BLK_DEVICE_ID, + .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID, }, { .class_id = RTE_CLASS_ANY_ID, .vendor_id = IFCVF_VENDOR_ID, .device_id = IFCVF_BLK_MODERN_DEVICE_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, - .subsystem_device_id = IFCVF_BLK_DEVICE_ID, + .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID, }, { .vendor_id = 0, /* sentinel */ -- 1.8.3.1