From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D2EE73F9 for ; Mon, 11 Jul 2016 08:19:39 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 10 Jul 2016 23:19:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,345,1464678000"; d="scan'208";a="1019257827" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 10 Jul 2016 23:19:38 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 10 Jul 2016 23:19:38 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Mon, 11 Jul 2016 14:19:36 +0800 From: "Zhang, Helin" To: "Wu, Jingjing" , "thomas.monjalon@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH] i40e: move PCI device ids to driver Thread-Index: AQHR2yjqkivjGY/yC0urJgdixfXEfKASwYtw Date: Mon, 11 Jul 2016 06:19:36 +0000 Message-ID: References: <1468209673-21685-1-git-send-email-jingjing.wu@intel.com> In-Reply-To: <1468209673-21685-1-git-send-email-jingjing.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTBmNGNiNDMtZWY4NC00ODY3LTk2MzktMDdiNGY2NjZjMDI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkhEWXhiT1ZXanhVVW9rYjBMRld1V3BOXC9ZOXZHVks2ajY1VDAxWlZPOHJJPSJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: move PCI device ids to driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 06:19:40 -0000 Hi Jingjing I'd suggest to add a new header file in each PMD to define what we defined = in rte_pci_dev_ids.h. There was a patch set submitted several months ago, like that. Regards, Helin > -----Original Message----- > From: Wu, Jingjing > Sent: Monday, July 11, 2016 12:01 PM > To: thomas.monjalon@6wind.com > Cc: Zhang, Helin ; dev@dpdk.org; Wu, Jingjing > > Subject: [PATCH] i40e: move PCI device ids to driver >=20 > move PCI device ids from rte_pci_dev_ids.h to driver. >=20 > Signed-off-by: Jingjing Wu > --- > drivers/net/i40e/i40e_ethdev.c | 21 ++++++-- > drivers/net/i40e/i40e_ethdev_vf.c | 9 ++-- > lib/librte_eal/common/include/rte_pci_dev_ids.h | 71 -------------------= ------ > 3 files changed, 24 insertions(+), 77 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 31c2e11..e75d911 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -454,9 +454,24 @@ static void i40e_set_default_mac_addr(struct > rte_eth_dev *dev, static int i40e_dev_mtu_set(struct rte_eth_dev *dev, > uint16_t mtu); >=20 > static const struct rte_pci_id pci_id_i40e_map[] =3D { -#define > RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, > -#include "rte_pci_dev_ids.h" > -{ .vendor_id =3D 0, /* sentinel */ }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_C) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_A) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_B) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_C) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2_A) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T4) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_X722) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_X722) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_X722) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, > I40E_DEV_ID_1G_BASE_T_X722) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, > I40E_DEV_ID_10G_BASE_T_X722) }, > + { .vendor_id =3D 0, /* sentinel */ }, > }; >=20 > static const struct eth_dev_ops i40e_eth_dev_ops =3D { diff --git > a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c > index 31547db..a616ae0 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -1110,9 +1110,12 @@ i40evf_get_link_status(struct rte_eth_dev *dev, > struct rte_eth_link *link) } >=20 > static const struct rte_pci_id pci_id_i40evf_map[] =3D { -#define > RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, > -#include "rte_pci_dev_ids.h" > -{ .vendor_id =3D 0, /* sentinel */ }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) }, > + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) }, > + { .vendor_id =3D 0, /* sentinel */ }, > }; >=20 > static inline int > diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h > b/lib/librte_eal/common/include/rte_pci_dev_ids.h > index af39fbb..9a06313 100644 > --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h > +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h > @@ -74,8 +74,6 @@ > * RTE_PCI_DEV_ID_DECL_IGBVF > * RTE_PCI_DEV_ID_DECL_IXGBE > * RTE_PCI_DEV_ID_DECL_IXGBEVF > - * RTE_PCI_DEV_ID_DECL_I40E > - * RTE_PCI_DEV_ID_DECL_I40EVF > * RTE_PCI_DEV_ID_DECL_VIRTIO > * at the time when this file is included. > * > @@ -117,14 +115,6 @@ > #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif >=20 > -#ifndef RTE_PCI_DEV_ID_DECL_I40E > -#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) -#endif > - > -#ifndef RTE_PCI_DEV_ID_DECL_I40EVF > -#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) -#endif > - > #ifndef RTE_PCI_DEV_ID_DECL_VIRTIO > #define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) #endif @@ -528,52 +518,6 > @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, > IXGBE_DEV_ID_X550EM_X_KR) > RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, > IXGBE_DEV_ID_82599_BYPASS) #endif >=20 > -/*************** Physical I40E devices from i40e_type.h > *****************/ > - > -#define I40E_DEV_ID_SFP_XL710 0x1572 > -#define I40E_DEV_ID_QEMU 0x1574 > -#define I40E_DEV_ID_KX_B 0x1580 > -#define I40E_DEV_ID_KX_C 0x1581 > -#define I40E_DEV_ID_QSFP_A 0x1583 > -#define I40E_DEV_ID_QSFP_B 0x1584 > -#define I40E_DEV_ID_QSFP_C 0x1585 > -#define I40E_DEV_ID_10G_BASE_T 0x1586 > -#define I40E_DEV_ID_20G_KR2 0x1587 > -#define I40E_DEV_ID_20G_KR2_A 0x1588 > -#define I40E_DEV_ID_10G_BASE_T4 0x1589 > -#define I40E_DEV_ID_25G_B 0x158A > -#define I40E_DEV_ID_25G_SFP28 0x158B > -#define I40E_DEV_ID_X722_A0 0x374C > -#define I40E_DEV_ID_KX_X722 0x37CE > -#define I40E_DEV_ID_QSFP_X722 0x37CF > -#define I40E_DEV_ID_SFP_X722 0x37D0 > -#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1 > -#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 > -#define I40E_DEV_ID_SFP_I_X722 0x37D3 > -#define I40E_DEV_ID_QSFP_I_X722 0x37D4 > - > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_XL710) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QEMU) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_B) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_C) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_A) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_C) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_10G_BASE_T) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2_A) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_10G_BASE_T4) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_B) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_SFP28) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_1G_BASE_T_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_10G_BASE_T_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_I_X722) > -RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_QSFP_I_X722) > - > /*************** Physical FM10K devices from fm10k_type.h > ***************/ >=20 > #define FM10K_DEV_ID_PF 0x15A4 > @@ -618,19 +562,6 @@ > RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, > IXGBE_DEV_ID_X550EM_A_VF_HV) > RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, > IXGBE_DEV_ID_X550EM_X_VF) > RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, > IXGBE_DEV_ID_X550EM_X_VF_HV) >=20 > -/****************** Virtual I40E devices from i40e_type.h > ********************/ > - > -#define I40E_DEV_ID_VF 0x154C > -#define I40E_DEV_ID_VF_HV 0x1571 > -#define I40E_DEV_ID_X722_A0_VF 0x374D > -#define I40E_DEV_ID_X722_VF 0x37CD > -#define I40E_DEV_ID_X722_VF_HV 0x37D9 > - > -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_VF) > -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_VF_HV) > -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_X722_A0_VF) > -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF) > -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, > I40E_DEV_ID_X722_VF_HV) >=20 > /****************** Virtio devices from virtio.h ******************/ >=20 > @@ -737,8 +668,6 @@ > RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, > BROADCOM_DEV_ID_57314) #undef RTE_PCI_DEV_ID_DECL_IGBVF #undef > RTE_PCI_DEV_ID_DECL_IXGBE #undef RTE_PCI_DEV_ID_DECL_IXGBEVF > -#undef RTE_PCI_DEV_ID_DECL_I40E -#undef RTE_PCI_DEV_ID_DECL_I40EVF > #undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef > RTE_PCI_DEV_ID_DECL_VMXNET3 #undef RTE_PCI_DEV_ID_DECL_FM10K > -- > 2.4.0