* [dpdk-dev] time to kill rte_pci_dev_ids.h @ 2016-01-05 19:37 Stephen Hemminger 2016-01-06 1:40 ` Thomas Monjalon 0 siblings, 1 reply; 92+ messages in thread From: Stephen Hemminger @ 2016-01-05 19:37 UTC (permalink / raw) To: dev Has anyone looked at getting rid of rte_pci_dev_ids.h? The current method with #ifdef's and putting all devices in one file really doesn't scale well. Something more like other OS's where the data is only in each device driver would be better. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] time to kill rte_pci_dev_ids.h 2016-01-05 19:37 [dpdk-dev] time to kill rte_pci_dev_ids.h Stephen Hemminger @ 2016-01-06 1:40 ` Thomas Monjalon 2016-01-08 13:20 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-01-06 1:40 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev 2016-01-05 11:37, Stephen Hemminger: > Has anyone looked at getting rid of rte_pci_dev_ids.h? > The current method with #ifdef's and putting all devices in one file > really doesn't scale well. Something more like other OS's where > the data is only in each device driver would be better. I agree. The PCI ids should be embedded in drivers. If I remember well, it's already the case for some of them. I would love to see a tool able to list the supported devices by reading a binary libraries. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] time to kill rte_pci_dev_ids.h 2016-01-06 1:40 ` Thomas Monjalon @ 2016-01-08 13:20 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand 0 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-08 13:20 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev Hello, On Wed, Jan 6, 2016 at 2:40 AM, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > 2016-01-05 11:37, Stephen Hemminger: > > Has anyone looked at getting rid of rte_pci_dev_ids.h? > > The current method with #ifdef's and putting all devices in one file > > really doesn't scale well. Something more like other OS's where > > the data is only in each device driver would be better. > > I agree. > The PCI ids should be embedded in drivers. > If I remember well, it's already the case for some of them. > I would love to see a tool able to list the supported devices > by reading a binary libraries. > I have done the first part of the job, moving all pci dev ids to the pmds, just rebased it. I can post this. In the last patch of the series, I put all those ids in a dedicated section, that can be dumped with objdump. Having a tool for this (like what I proposed some time ago) would be great but I did not find time to write it. The thing is, what do we want to achieve with such a tool ? My usecase at the moment is for "automatic" device binding to kernel drivers before starting dpdk or when hotplugging. But for this, I think that introducing a hook system in the pci probe functions is better. I am thinking of a hook system that would execute an external tool (shell scripts, C, ...) with all needed informations: pci device, pmd that wants it, driver flags etc... Return value would tell eal what to do next. This would make it possible to implement the blacklist / whitelist out of eal itself, implement auto bind and maybe more. If I go this way, I don't think that we need to expose the pci dev ids :-) -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-08 13:20 ` David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver David Marchand ` (13 more replies) 0 siblings, 14 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon This patchset moves all pci device ids from eal to the pmds that need them (patches 1 to 8). Global pci device id list is then removed (patches 9, 10). In last patch, all those device ids are put in a dedicated section for retrieval by external tools. -- David Marchand David Marchand (11): e1000: move pci device ids to driver ixgbe: move pci device ids to driver i40e: move pci device ids to driver fm10k: move pci device ids to driver virtio: move pci device ids to driver vmxnet3: move pci device ids to driver enic: move pci device ids to driver bnx2x: move pci device ids to driver doc: refresh headers list pci: no need for global device ids list pci: place all uio pci device ids in a dedicated section app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 4 + app/test/test_pci.c | 5 +- doc/api/doxy-api-index.md | 1 - doc/guides/prog_guide/dev_kit_build_system.rst | 56 +- drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 29 +- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 +- drivers/net/e1000/em_pci_dev_ids.h | 200 +++++++ drivers/net/e1000/igb_ethdev.c | 8 +- drivers/net/e1000/igb_pci_dev_ids.h | 164 ++++++ drivers/net/enic/enic_ethdev.c | 14 +- drivers/net/fm10k/fm10k_ethdev.c | 10 +- drivers/net/i40e/i40e_ethdev.c | 20 +- drivers/net/i40e/i40e_ethdev_vf.c | 8 +- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 185 +++++++ drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 7 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 +- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci.h | 2 + lib/librte_eal/common/include/rte_pci_dev_ids.h | 667 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 2 + lib/librte_eal/linuxapp/kni/kni_misc.c | 8 +- 28 files changed, 678 insertions(+), 748 deletions(-) create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 02/11] ixgbe: " David Marchand ` (12 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon test application and kni still want to know e1000 pci devices. So let's create headers in the driver that will be used by them. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test/Makefile | 3 + app/test/test_pci.c | 3 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/em_pci_dev_ids.h | 200 +++++++++++++++++++ drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_pci_dev_ids.h | 164 ++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 245 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 375 insertions(+), 251 deletions(-) create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h diff --git a/app/test/Makefile b/app/test/Makefile index ec33e1a..687ae59 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -168,6 +168,9 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments endif endif +# pci tests want to know some pci devices ids +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 + # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 5530d99..b289138 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -77,8 +77,9 @@ struct rte_pci_id my_driver_id2[] = { /* IGB & EM NICS */ #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, +#include <em_pci_dev_ids.h> #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <igb_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 66e8993..4cf9217 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -139,7 +139,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_em_map[] = { #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "em_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/em_pci_dev_ids.h b/drivers/net/e1000/em_pci_dev_ids.h new file mode 100644 index 0000000..c79697b --- /dev/null +++ b/drivers/net/e1000/em_pci_dev_ids.h @@ -0,0 +1,200 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_EM +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical EM devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82542 0x1000 +#define E1000_DEV_ID_82543GC_FIBER 0x1001 +#define E1000_DEV_ID_82543GC_COPPER 0x1004 +#define E1000_DEV_ID_82544EI_COPPER 0x1008 +#define E1000_DEV_ID_82544EI_FIBER 0x1009 +#define E1000_DEV_ID_82544GC_COPPER 0x100C +#define E1000_DEV_ID_82544GC_LOM 0x100D +#define E1000_DEV_ID_82540EM 0x100E +#define E1000_DEV_ID_82540EM_LOM 0x1015 +#define E1000_DEV_ID_82540EP_LOM 0x1016 +#define E1000_DEV_ID_82540EP 0x1017 +#define E1000_DEV_ID_82540EP_LP 0x101E +#define E1000_DEV_ID_82545EM_COPPER 0x100F +#define E1000_DEV_ID_82545EM_FIBER 0x1011 +#define E1000_DEV_ID_82545GM_COPPER 0x1026 +#define E1000_DEV_ID_82545GM_FIBER 0x1027 +#define E1000_DEV_ID_82545GM_SERDES 0x1028 +#define E1000_DEV_ID_82546EB_COPPER 0x1010 +#define E1000_DEV_ID_82546EB_FIBER 0x1012 +#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D +#define E1000_DEV_ID_82546GB_COPPER 0x1079 +#define E1000_DEV_ID_82546GB_FIBER 0x107A +#define E1000_DEV_ID_82546GB_SERDES 0x107B +#define E1000_DEV_ID_82546GB_PCIE 0x108A +#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 +#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 +#define E1000_DEV_ID_82541EI 0x1013 +#define E1000_DEV_ID_82541EI_MOBILE 0x1018 +#define E1000_DEV_ID_82541ER_LOM 0x1014 +#define E1000_DEV_ID_82541ER 0x1078 +#define E1000_DEV_ID_82541GI 0x1076 +#define E1000_DEV_ID_82541GI_LF 0x107C +#define E1000_DEV_ID_82541GI_MOBILE 0x1077 +#define E1000_DEV_ID_82547EI 0x1019 +#define E1000_DEV_ID_82547EI_MOBILE 0x101A +#define E1000_DEV_ID_82547GI 0x1075 +#define E1000_DEV_ID_82571EB_COPPER 0x105E +#define E1000_DEV_ID_82571EB_FIBER 0x105F +#define E1000_DEV_ID_82571EB_SERDES 0x1060 +#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 +#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA +#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 +#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 +#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 +#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC +#define E1000_DEV_ID_82572EI_COPPER 0x107D +#define E1000_DEV_ID_82572EI_FIBER 0x107E +#define E1000_DEV_ID_82572EI_SERDES 0x107F +#define E1000_DEV_ID_82572EI 0x10B9 +#define E1000_DEV_ID_82573E 0x108B +#define E1000_DEV_ID_82573E_IAMT 0x108C +#define E1000_DEV_ID_82573L 0x109A +#define E1000_DEV_ID_82574L 0x10D3 +#define E1000_DEV_ID_82574LA 0x10F6 +#define E1000_DEV_ID_82583V 0x150C +#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 +#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 +#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA +#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB +#define E1000_DEV_ID_ICH8_82567V_3 0x1501 +#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 +#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A +#define E1000_DEV_ID_ICH8_IGP_C 0x104B +#define E1000_DEV_ID_ICH8_IFE 0x104C +#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 +#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 +#define E1000_DEV_ID_ICH8_IGP_M 0x104D +#define E1000_DEV_ID_ICH9_IGP_M 0x10BF +#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 +#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB +#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD +#define E1000_DEV_ID_ICH9_BM 0x10E5 +#define E1000_DEV_ID_ICH9_IGP_C 0x294C +#define E1000_DEV_ID_ICH9_IFE 0x10C0 +#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 +#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 +#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC +#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD +#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE +#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE +#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF +#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 + +#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA +#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB +#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF +#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 +#define E1000_DEV_ID_PCH2_LV_LM 0x1502 +#define E1000_DEV_ID_PCH2_LV_V 0x1503 +#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A +#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B +#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A +#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 +#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 +#define E1000_DEV_ID_PCH_I218_V2 0x15A1 +#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 +#define E1000_DEV_ID_PCH_I218_V3 0x15A3 + + +/* + * Tested (supported) on VM emulated HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) + +/* + * Tested (supported) on real HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) + +#undef RTE_PCI_DEV_ID_DECL_EM diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index d1bbcda..3f85a2c 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -276,7 +276,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; @@ -287,7 +287,7 @@ static const struct rte_pci_id pci_id_igb_map[] = { static const struct rte_pci_id pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/igb_pci_dev_ids.h b/drivers/net/e1000/igb_pci_dev_ids.h new file mode 100644 index 0000000..c5f8f97 --- /dev/null +++ b/drivers/net/e1000/igb_pci_dev_ids.h @@ -0,0 +1,164 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IGB +#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IGBVF +#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical IGB devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82576 0x10C9 +#define E1000_DEV_ID_82576_FIBER 0x10E6 +#define E1000_DEV_ID_82576_SERDES 0x10E7 +#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 +#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 +#define E1000_DEV_ID_82576_NS 0x150A +#define E1000_DEV_ID_82576_NS_SERDES 0x1518 +#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D +#define E1000_DEV_ID_82575EB_COPPER 0x10A7 +#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 +#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 +#define E1000_DEV_ID_82580_COPPER 0x150E +#define E1000_DEV_ID_82580_FIBER 0x150F +#define E1000_DEV_ID_82580_SERDES 0x1510 +#define E1000_DEV_ID_82580_SGMII 0x1511 +#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 +#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 +#define E1000_DEV_ID_I350_COPPER 0x1521 +#define E1000_DEV_ID_I350_FIBER 0x1522 +#define E1000_DEV_ID_I350_SERDES 0x1523 +#define E1000_DEV_ID_I350_SGMII 0x1524 +#define E1000_DEV_ID_I350_DA4 0x1546 +#define E1000_DEV_ID_I210_COPPER 0x1533 +#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 +#define E1000_DEV_ID_I210_COPPER_IT 0x1535 +#define E1000_DEV_ID_I210_FIBER 0x1536 +#define E1000_DEV_ID_I210_SERDES 0x1537 +#define E1000_DEV_ID_I210_SGMII 0x1538 +#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B +#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C +#define E1000_DEV_ID_I211_COPPER 0x1539 +#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 +#define E1000_DEV_ID_I354_SGMII 0x1F41 +#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 +#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 +#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A +#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C +#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) + +/****************** Virtual IGB devices from e1000_hw.h ******************/ + +#define E1000_DEV_ID_82576_VF 0x10CA +#define E1000_DEV_ID_82576_VF_HV 0x152D +#define E1000_DEV_ID_I350_VF 0x1520 +#define E1000_DEV_ID_I350_VF_HV 0x152F + +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) + +#undef RTE_PCI_DEV_ID_DECL_IGB +#undef RTE_PCI_DEV_ID_DECL_IGBVF 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 e31b934..244ef3d 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,9 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_EM - * RTE_PCI_DEV_ID_DECL_IGB - * RTE_PCI_DEV_ID_DECL_IGBVF * RTE_PCI_DEV_ID_DECL_IXGBE * RTE_PCI_DEV_ID_DECL_IXGBEVF * RTE_PCI_DEV_ID_DECL_I40E @@ -96,18 +93,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_EM -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGB -#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGBVF -#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_IXGBE #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) #endif @@ -177,221 +162,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/******************** Physical EM devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82542 0x1000 -#define E1000_DEV_ID_82543GC_FIBER 0x1001 -#define E1000_DEV_ID_82543GC_COPPER 0x1004 -#define E1000_DEV_ID_82544EI_COPPER 0x1008 -#define E1000_DEV_ID_82544EI_FIBER 0x1009 -#define E1000_DEV_ID_82544GC_COPPER 0x100C -#define E1000_DEV_ID_82544GC_LOM 0x100D -#define E1000_DEV_ID_82540EM 0x100E -#define E1000_DEV_ID_82540EM_LOM 0x1015 -#define E1000_DEV_ID_82540EP_LOM 0x1016 -#define E1000_DEV_ID_82540EP 0x1017 -#define E1000_DEV_ID_82540EP_LP 0x101E -#define E1000_DEV_ID_82545EM_COPPER 0x100F -#define E1000_DEV_ID_82545EM_FIBER 0x1011 -#define E1000_DEV_ID_82545GM_COPPER 0x1026 -#define E1000_DEV_ID_82545GM_FIBER 0x1027 -#define E1000_DEV_ID_82545GM_SERDES 0x1028 -#define E1000_DEV_ID_82546EB_COPPER 0x1010 -#define E1000_DEV_ID_82546EB_FIBER 0x1012 -#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D -#define E1000_DEV_ID_82546GB_COPPER 0x1079 -#define E1000_DEV_ID_82546GB_FIBER 0x107A -#define E1000_DEV_ID_82546GB_SERDES 0x107B -#define E1000_DEV_ID_82546GB_PCIE 0x108A -#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 -#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 -#define E1000_DEV_ID_82541EI 0x1013 -#define E1000_DEV_ID_82541EI_MOBILE 0x1018 -#define E1000_DEV_ID_82541ER_LOM 0x1014 -#define E1000_DEV_ID_82541ER 0x1078 -#define E1000_DEV_ID_82541GI 0x1076 -#define E1000_DEV_ID_82541GI_LF 0x107C -#define E1000_DEV_ID_82541GI_MOBILE 0x1077 -#define E1000_DEV_ID_82547EI 0x1019 -#define E1000_DEV_ID_82547EI_MOBILE 0x101A -#define E1000_DEV_ID_82547GI 0x1075 -#define E1000_DEV_ID_82571EB_COPPER 0x105E -#define E1000_DEV_ID_82571EB_FIBER 0x105F -#define E1000_DEV_ID_82571EB_SERDES 0x1060 -#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 -#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA -#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 -#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 -#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 -#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC -#define E1000_DEV_ID_82572EI_COPPER 0x107D -#define E1000_DEV_ID_82572EI_FIBER 0x107E -#define E1000_DEV_ID_82572EI_SERDES 0x107F -#define E1000_DEV_ID_82572EI 0x10B9 -#define E1000_DEV_ID_82573E 0x108B -#define E1000_DEV_ID_82573E_IAMT 0x108C -#define E1000_DEV_ID_82573L 0x109A -#define E1000_DEV_ID_82574L 0x10D3 -#define E1000_DEV_ID_82574LA 0x10F6 -#define E1000_DEV_ID_82583V 0x150C -#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 -#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 -#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA -#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB -#define E1000_DEV_ID_ICH8_82567V_3 0x1501 -#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 -#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A -#define E1000_DEV_ID_ICH8_IGP_C 0x104B -#define E1000_DEV_ID_ICH8_IFE 0x104C -#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 -#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 -#define E1000_DEV_ID_ICH8_IGP_M 0x104D -#define E1000_DEV_ID_ICH9_IGP_M 0x10BF -#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 -#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB -#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD -#define E1000_DEV_ID_ICH9_BM 0x10E5 -#define E1000_DEV_ID_ICH9_IGP_C 0x294C -#define E1000_DEV_ID_ICH9_IFE 0x10C0 -#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 -#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 -#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC -#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD -#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE -#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE -#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF -#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 - -#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA -#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB -#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF -#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 -#define E1000_DEV_ID_PCH2_LV_LM 0x1502 -#define E1000_DEV_ID_PCH2_LV_V 0x1503 -#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A -#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B -#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A -#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 -#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 -#define E1000_DEV_ID_PCH_I218_V2 0x15A1 -#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 -#define E1000_DEV_ID_PCH_I218_V3 0x15A3 - - -/* - * Tested (supported) on VM emulated HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) - -/* - * Tested (supported) on real HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) - -/******************** Physical IGB devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82576 0x10C9 -#define E1000_DEV_ID_82576_FIBER 0x10E6 -#define E1000_DEV_ID_82576_SERDES 0x10E7 -#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 -#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 -#define E1000_DEV_ID_82576_NS 0x150A -#define E1000_DEV_ID_82576_NS_SERDES 0x1518 -#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D -#define E1000_DEV_ID_82575EB_COPPER 0x10A7 -#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 -#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 -#define E1000_DEV_ID_82580_COPPER 0x150E -#define E1000_DEV_ID_82580_FIBER 0x150F -#define E1000_DEV_ID_82580_SERDES 0x1510 -#define E1000_DEV_ID_82580_SGMII 0x1511 -#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 -#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 -#define E1000_DEV_ID_I350_COPPER 0x1521 -#define E1000_DEV_ID_I350_FIBER 0x1522 -#define E1000_DEV_ID_I350_SERDES 0x1523 -#define E1000_DEV_ID_I350_SGMII 0x1524 -#define E1000_DEV_ID_I350_DA4 0x1546 -#define E1000_DEV_ID_I210_COPPER 0x1533 -#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 -#define E1000_DEV_ID_I210_COPPER_IT 0x1535 -#define E1000_DEV_ID_I210_FIBER 0x1536 -#define E1000_DEV_ID_I210_SERDES 0x1537 -#define E1000_DEV_ID_I210_SGMII 0x1538 -#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B -#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C -#define E1000_DEV_ID_I211_COPPER 0x1539 -#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 -#define E1000_DEV_ID_I354_SGMII 0x1F41 -#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 -#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 -#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A -#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C -#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) - /****************** Physical IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82598 0x10B6 @@ -534,18 +304,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IGB devices from e1000_hw.h ******************/ - -#define E1000_DEV_ID_82576_VF 0x10CA -#define E1000_DEV_ID_82576_VF_HV 0x152D -#define E1000_DEV_ID_I350_VF 0x1520 -#define E1000_DEV_ID_I350_VF_HV 0x152F - -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) - /****************** Virtual IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82599_VF 0x10ED @@ -654,9 +412,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_EM -#undef RTE_PCI_DEV_ID_DECL_IGB -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index ac99d3f..6ac7637 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -43,6 +43,7 @@ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index f5f18f0..96b07c2 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -353,7 +353,7 @@ kni_dev_remove(struct kni_dev *dev) switch (dev->device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): @@ -510,7 +510,7 @@ kni_ioctl_create(struct net *net, found_pci = pci; switch (dev_info.device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> ret = igb_kni_probe(found_pci, &lad_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 02/11] ixgbe: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 03/11] i40e: " David Marchand ` (11 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon test application and kni still want to know ixgbe pci devices. So let's create a header in the driver that will be used by them. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 1 + app/test/test_pci.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 185 ++++++++++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 130 ----------------- lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 195 insertions(+), 136 deletions(-) create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 72426f3..a8899b8 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -64,6 +64,8 @@ ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) CFLAGS_mempool_anon.o := -D_GNU_SOURCE endif CFLAGS_cmdline.o := -D_GNU_SOURCE +# for bypass pci device ids +CFLAGS_cmdline.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 73298c9..fdb2e1b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -9816,7 +9816,7 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue) } #ifdef RTE_NIC_BYPASS -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> uint8_t bypass_is_supported(portid_t port_id) { diff --git a/app/test/Makefile b/app/test/Makefile index 687ae59..13fed78 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -170,6 +170,7 @@ endif # pci tests want to know some pci devices ids CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index b289138..d6a23d6 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -68,7 +68,7 @@ static int my_driver_init(struct rte_pci_driver *dr, struct rte_pci_id my_driver_id[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 4c4c6df..b31f52e 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -381,7 +381,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev, static const struct rte_pci_id pci_id_ixgbe_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; @@ -393,7 +393,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = { static const struct rte_pci_id pci_id_ixgbevf_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_pci_dev_ids.h b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h new file mode 100644 index 0000000..362a2ce --- /dev/null +++ b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h @@ -0,0 +1,185 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBE +#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF +#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/****************** Physical IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82598 0x10B6 +#define IXGBE_DEV_ID_82598_BX 0x1508 +#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 +#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 +#define IXGBE_DEV_ID_82598AT 0x10C8 +#define IXGBE_DEV_ID_82598AT2 0x150B +#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB +#define IXGBE_DEV_ID_82598EB_CX4 0x10DD +#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC +#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 +#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 +#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 +#define IXGBE_DEV_ID_82599_KX4 0x10F7 +#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 +#define IXGBE_DEV_ID_82599_KR 0x1517 +#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 +#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C +#define IXGBE_DEV_ID_82599_CX4 0x10F9 +#define IXGBE_DEV_ID_82599_SFP 0x10FB +#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 +#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 +#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 +#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 +#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A +#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 +#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 +#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D +#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A +#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 +#define IXGBE_DEV_ID_82599EN_SFP 0x1557 +#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC +#define IXGBE_DEV_ID_82599_T3_LOM 0x151C +#define IXGBE_DEV_ID_82599_LS 0x154F +#define IXGBE_DEV_ID_X540T 0x1528 +#define IXGBE_DEV_ID_X540T1 0x1560 +#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC +#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD +#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE +#define IXGBE_DEV_ID_X550T 0x1563 +#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA +#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB + +#ifdef RTE_NIC_BYPASS +#define IXGBE_DEV_ID_82599_BYPASS 0x155D +#endif + +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_COMBO_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) + +#ifdef RTE_NIC_BYPASS +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) +#endif + +/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82599_VF 0x10ED +#define IXGBE_DEV_ID_82599_VF_HV 0x152E +#define IXGBE_DEV_ID_X540_VF 0x1515 +#define IXGBE_DEV_ID_X540_VF_HV 0x1530 +#define IXGBE_DEV_ID_X550_VF_HV 0x1564 +#define IXGBE_DEV_ID_X550_VF 0x1565 +#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 +#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 + +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) +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) + +#undef RTE_PCI_DEV_ID_DECL_IXGBE +#undef RTE_PCI_DEV_ID_DECL_IXGBEVF 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 244ef3d..ab6c4fb 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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 @@ -93,14 +91,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_IXGBE -#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF -#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_I40E #define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) #endif @@ -162,104 +152,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Physical IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82598 0x10B6 -#define IXGBE_DEV_ID_82598_BX 0x1508 -#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 -#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 -#define IXGBE_DEV_ID_82598AT 0x10C8 -#define IXGBE_DEV_ID_82598AT2 0x150B -#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB -#define IXGBE_DEV_ID_82598EB_CX4 0x10DD -#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC -#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 -#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 -#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 -#define IXGBE_DEV_ID_82599_KX4 0x10F7 -#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 -#define IXGBE_DEV_ID_82599_KR 0x1517 -#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 -#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C -#define IXGBE_DEV_ID_82599_CX4 0x10F9 -#define IXGBE_DEV_ID_82599_SFP 0x10FB -#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 -#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 -#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 -#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 -#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A -#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 -#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 -#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D -#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A -#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 -#define IXGBE_DEV_ID_82599EN_SFP 0x1557 -#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC -#define IXGBE_DEV_ID_82599_T3_LOM 0x151C -#define IXGBE_DEV_ID_82599_LS 0x154F -#define IXGBE_DEV_ID_X540T 0x1528 -#define IXGBE_DEV_ID_X540T1 0x1560 -#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC -#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD -#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE -#define IXGBE_DEV_ID_X550T 0x1563 -#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA -#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB - -#ifdef RTE_NIC_BYPASS -#define IXGBE_DEV_ID_82599_BYPASS 0x155D -#endif - -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598AF_SINGLE_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82599_COMBO_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) - -#ifdef RTE_NIC_BYPASS -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) -#endif - /*************** Physical I40E devices from i40e_type.h *****************/ #define I40E_DEV_ID_SFP_XL710 0x1572 @@ -304,26 +196,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82599_VF 0x10ED -#define IXGBE_DEV_ID_82599_VF_HV 0x152E -#define IXGBE_DEV_ID_X540_VF 0x1515 -#define IXGBE_DEV_ID_X540_VF_HV 0x1530 -#define IXGBE_DEV_ID_X550_VF_HV 0x1564 -#define IXGBE_DEV_ID_X550_VF 0x1565 -#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 -#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 - -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) -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) - /****************** Virtual I40E devices from i40e_type.h ********************/ #define I40E_DEV_ID_VF 0x154C @@ -412,8 +284,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index 6ac7637..3bdf352 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -44,6 +44,7 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/ixgbe ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 96b07c2..f731d7c 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -357,7 +357,7 @@ kni_dev_remove(struct kni_dev *dev) igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ixgbe_kni_remove(dev->pci_dev); break; default: @@ -515,7 +515,7 @@ kni_ioctl_create(struct net *net, break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ret = ixgbe_kni_probe(found_pci, &lad_dev); break; default: -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 03/11] i40e: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 02/11] ixgbe: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 20:02 ` Stephen Hemminger 2016-01-10 12:50 ` [dpdk-dev] [PATCH 04/11] fm10k: " David Marchand ` (10 subsequent siblings) 13 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/i40e/i40e_ethdev.c | 18 +++++++- drivers/net/i40e/i40e_ethdev_vf.c | 6 ++- lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 ------------------------- 3 files changed, 20 insertions(+), 64 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bf6220d..3213264 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -416,8 +416,22 @@ static int i40e_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, static const struct rte_pci_id pci_id_i40e_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +{ 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_A) }, +{ 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_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 = 0, /* sentinel */ }, }; diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 14d2a50..fd963fd 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1117,8 +1117,10 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) } static const struct rte_pci_id pci_id_i40evf_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +{ 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_VF) }, +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) }, { .vendor_id = 0, /* sentinel */ }, }; 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 ab6c4fb..f1f3e13 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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. * @@ -91,14 +89,6 @@ * Note that this file can be included multiple times within the same file. */ -#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 @@ -152,42 +142,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** 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_A 0x157F -#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_X722_A0 0x374C -#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 - -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_A) -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_X722_A0) -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) - /*************** Physical FM10K devices from fm10k_type.h ***************/ #define FM10K_DEV_ID_PF 0x15A4 @@ -196,18 +150,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** 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_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_VF) -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF_HV) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -284,8 +226,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 03/11] i40e: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 03/11] i40e: " David Marchand @ 2016-01-10 20:02 ` Stephen Hemminger 2016-01-12 8:45 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Stephen Hemminger @ 2016-01-10 20:02 UTC (permalink / raw) To: David Marchand; +Cc: dev, thomas.monjalon On Sun, 10 Jan 2016 13:50:46 +0100 David Marchand <david.marchand@6wind.com> wrote: > +{ 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_A) }, > +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) } You should indent the initializers. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 03/11] i40e: move pci device ids to driver 2016-01-10 20:02 ` Stephen Hemminger @ 2016-01-12 8:45 ` David Marchand 0 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-12 8:45 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev, thomas.monjalon On Sun, Jan 10, 2016 at 9:02 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Sun, 10 Jan 2016 13:50:46 +0100 > David Marchand <david.marchand@6wind.com> wrote: > > > +{ 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_A) }, > > +{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) } > > You should indent the initializers. > Ok will do, but I don't like having to break lines because of the 80-columns limit (which happens in some drivers). -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 04/11] fm10k: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (2 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 03/11] i40e: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 05/11] virtio: " David Marchand ` (9 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/fm10k/fm10k_ethdev.c | 8 +++---- lib/librte_eal/common/include/rte_pci_dev_ids.h | 29 ------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index e4aed94..3ab744a 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2741,10 +2741,10 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * and SRIOV-VF devices. */ static const struct rte_pci_id pci_id_fm10k_map[] = { -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#include "rte_pci_dev_ids.h" - { .vendor_id = 0, /* sentinel */ }, +{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, +{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) }, +{ RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, +{ .vendor_id = 0, /* sentinel */ }, }; static struct eth_driver rte_pmd_fm10k = { 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 f1f3e13..a19fdfa 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -97,14 +97,6 @@ #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_FM10K -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -117,11 +109,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_INTEL -/** Vendor ID used by Intel devices */ -#define PCI_VENDOR_ID_INTEL 0x8086 -#endif - #ifndef PCI_VENDOR_ID_QUMRANET /** Vendor ID used by virtio devices */ #define PCI_VENDOR_ID_QUMRANET 0x1AF4 @@ -142,14 +129,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** Physical FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_PF 0x15A4 -#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0 - -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -162,12 +141,6 @@ RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) -/*************** Virtual FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_VF 0x15A5 - -RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -228,5 +201,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) #undef RTE_PCI_DEV_ID_DECL_BNX2XVF #undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -#undef RTE_PCI_DEV_ID_DECL_FM10K -#undef RTE_PCI_DEV_ID_DECL_FM10KVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 05/11] virtio: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (3 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 04/11] fm10k: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 06/11] vmxnet3: " David Marchand ` (8 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Reused defines from virtio_pci.h. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/virtio/virtio_ethdev.c | 5 +---- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d928339..e9af0d7 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -106,10 +106,7 @@ static int virtio_dev_queue_stats_mapping_set( * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_virtio_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - +{ RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, { .vendor_id = 0, /* sentinel */ }, }; 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 a19fdfa..448b5e1 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,7 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_VIRTIO * at the time when this file is included. * * In order to populate an array, the user of this file must define this macro: @@ -89,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif @@ -109,11 +104,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_QUMRANET -/** Vendor ID used by virtio devices */ -#define PCI_VENDOR_ID_QUMRANET 0x1AF4 -#endif - #ifndef PCI_VENDOR_ID_VMWARE /** Vendor ID used by VMware devices */ #define PCI_VENDOR_ID_VMWARE 0x15AD @@ -129,12 +119,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Virtio devices from virtio.h ******************/ - -#define QUMRANET_DEV_ID_VIRTIO 0x1000 - -RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) - /****************** VMware VMXNET3 devices ******************/ #define VMWARE_DEV_ID_VMXNET3 0x07B0 @@ -199,5 +183,4 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 06/11] vmxnet3: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (4 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 05/11] virtio: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 07/11] enic: " David Marchand ` (7 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Moved vmware device ids macro since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 7 +++---- lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 ---------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index c363bf6..b9de8eb 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -98,11 +98,10 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_VMWARE 0x15AD +#define VMWARE_DEV_ID_VMXNET3 0x07B0 static const struct rte_pci_id pci_id_vmxnet3_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) }, { .vendor_id = 0, /* sentinel */ }, }; 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 448b5e1..0ecff3c 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -104,11 +100,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_VMWARE -/** Vendor ID used by VMware devices */ -#define PCI_VENDOR_ID_VMWARE 0x15AD -#endif - #ifndef PCI_VENDOR_ID_CISCO /** Vendor ID used by Cisco VIC devices */ #define PCI_VENDOR_ID_CISCO 0x1137 @@ -119,12 +110,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** VMware VMXNET3 devices ******************/ - -#define VMWARE_DEV_ID_VMXNET3 0x07B0 - -RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -183,4 +168,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 07/11] enic: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (5 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 06/11] vmxnet3: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 08/11] bnx2x: " David Marchand ` (6 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon, John Daley Moved cisco vendor id since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/enic/enic_ethdev.c | 12 ++++-------- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 2a88043..e3bd8ec 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -57,15 +57,11 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_CISCO 0x1137 static const struct rte_pci_id pci_id_enic_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#ifndef PCI_VENDOR_ID_CISCO -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif -#include "rte_pci_dev_ids.h" -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) -{.vendor_id = 0, /* Sentinal */}, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, +{.vendor_id = 0, /* sentinel */}, }; static 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 0ecff3c..1c22c04 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_ENIC -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNX2X #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) #endif @@ -100,24 +96,11 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_CISCO -/** Vendor ID used by Cisco VIC devices */ -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif - #ifndef PCI_VENDOR_ID_BROADCOM /** Vendor ID used by Broadcom devices */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Cisco VIC devices ******************/ - -#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ -#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */ - -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) - /****************** QLogic devices ******************/ /* Broadcom/QLogic BNX2X */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 08/11] bnx2x: move pci device ids to driver 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (6 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 07/11] enic: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 09/11] doc: refresh headers list David Marchand ` (5 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon, Sony Chacko Reused defines from the driver and moved broadcom vendor id macro. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 25 ++++++++--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 ------------------------- 3 files changed, 20 insertions(+), 68 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 67af5da..bf6dd71 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -22,7 +22,6 @@ #include "ecore_init_ops.h" #include "rte_version.h" -#include "rte_pci_dev_ids.h" #include <sys/types.h> #include <sys/stat.h> @@ -9592,7 +9591,7 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc) int f; struct stat st; - fwname = sc->devinfo.device_id == BNX2X_DEV_ID_57711 + fwname = sc->devinfo.device_id == CHIP_NUM_57711 ? FW_NAME_57711 : FW_NAME_57810; f = open(fwname, O_RDONLY); if (f < 0) { diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 69df02e..f822cfd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -16,16 +16,29 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_BROADCOM 0x14E4 static struct rte_pci_id pci_id_bnx2x_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - { .vendor_id = 0, } +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_OBS) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_4_10) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_2_20) }, +#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_MF) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_MF) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_MF) }, +#endif +{ .vendor_id = 0, } }; static struct rte_pci_id pci_id_bnx2xvf_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - { .vendor_id = 0, } +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, +{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_VF) }, +{ .vendor_id = 0, } }; static void 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 1c22c04..6720b7a 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,66 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_BNX2X -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) -#endif - -#ifndef PCI_VENDOR_ID_BROADCOM -/** Vendor ID used by Broadcom devices */ -#define PCI_VENDOR_ID_BROADCOM 0x14E4 -#endif - -/****************** QLogic devices ******************/ - -/* Broadcom/QLogic BNX2X */ -#define BNX2X_DEV_ID_57710 0x164e -#define BNX2X_DEV_ID_57711 0x164f -#define BNX2X_DEV_ID_57711E 0x1650 -#define BNX2X_DEV_ID_57712 0x1662 -#define BNX2X_DEV_ID_57712_MF 0x1663 -#define BNX2X_DEV_ID_57712_VF 0x166f -#define BNX2X_DEV_ID_57713 0x1651 -#define BNX2X_DEV_ID_57713E 0x1652 -#define BNX2X_DEV_ID_57800 0x168a -#define BNX2X_DEV_ID_57800_MF 0x16a5 -#define BNX2X_DEV_ID_57800_VF 0x16a9 -#define BNX2X_DEV_ID_57810 0x168e -#define BNX2X_DEV_ID_57810_MF 0x16ae -#define BNX2X_DEV_ID_57810_VF 0x16af -#define BNX2X_DEV_ID_57811 0x163d -#define BNX2X_DEV_ID_57811_MF 0x163e -#define BNX2X_DEV_ID_57811_VF 0x163f - -#define BNX2X_DEV_ID_57840_OBS 0x168d -#define BNX2X_DEV_ID_57840_OBS_MF 0x16ab -#define BNX2X_DEV_ID_57840_4_10 0x16a1 -#define BNX2X_DEV_ID_57840_2_20 0x16a2 -#define BNX2X_DEV_ID_57840_MF 0x16a4 -#define BNX2X_DEV_ID_57840_VF 0x16ad - -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_OBS) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_4_10) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_2_20) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_VF) -#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) -#endif - /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */ -#undef RTE_PCI_DEV_ID_DECL_BNX2X -#undef RTE_PCI_DEV_ID_DECL_BNX2XVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 09/11] doc: refresh headers list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (7 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 08/11] bnx2x: " David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-12 14:06 ` Mcnamara, John 2016-01-10 12:50 ` [dpdk-dev] [PATCH 10/11] pci: no need for global device ids list David Marchand ` (4 subsequent siblings) 13 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Since we are going to remove a header in next commit, let's first refresh documentation. Signed-off-by: David Marchand <david.marchand@6wind.com> --- doc/guides/prog_guide/dev_kit_build_system.rst | 57 +++++++++++++++++--------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index dd3e3d0..bbb9ea0 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -89,25 +89,44 @@ Each build directory contains include files, libraries, and applications: ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/ - arch rte_cpuflags.h rte_memcpy.h - cmdline_cirbuf.h rte_cycles.h rte_memory.h - cmdline.h rte_debug.h rte_mempool.h - cmdline_parse_etheraddr.h rte_eal.h rte_memzone.h - cmdline_parse.h rte_errno.h rte_pci_dev_ids.h - cmdline_parse_ipaddr.h rte_ethdev.h rte_pci.h - cmdline_parse_num.h rte_ether.h rte_per_lcore.h - cmdline_parse_portlist.h rte_fbk_hash.h rte_prefetch.h - cmdline_parse_string.h rte_hash_crc.h rte_random.h - cmdline_rdline.h rte_hash.h rte_ring.h - cmdline_socket.h rte_interrupts.h rte_rwlock.h - cmdline_vt100.h rte_ip.h rte_sctp.h - exec-env rte_jhash.h rte_spinlock.h - rte_alarm.h rte_launch.h rte_string_fns.h - rte_atomic.h rte_lcore.h rte_tailq.h - rte_branch_prediction.h rte_log.h rte_tcp.h - rte_byteorder.h rte_lpm.h rte_timer.h - rte_common.h rte_malloc.h rte_udp.h - rte_config.h rte_mbuf.h + cmdline_cirbuf.h rte_eal_memconfig.h rte_per_lcore.h + cmdline.h rte_errno.h rte_pipeline.h + cmdline_parse_etheraddr.h rte_eth_af_packet.h rte_port_ethdev.h + cmdline_parse.h rte_eth_bond_8023ad.h rte_port_frag.h + cmdline_parse_ipaddr.h rte_eth_bond.h rte_port.h + cmdline_parse_num.h rte_eth_ctrl.h rte_port_ras.h + cmdline_parse_portlist.h rte_ethdev.h rte_port_ring.h + cmdline_parse_string.h rte_ether.h rte_port_sched.h + cmdline_rdline.h rte_eth_ring.h rte_port_source_sink.h + cmdline_socket.h rte_fbk_hash.h rte_power.h + cmdline_vt100.h rte_hash_crc.h rte_prefetch.h + exec-env rte_hash.h rte_random.h + generic rte_hexdump.h rte_red.h + rte_acl.h rte_icmp.h rte_reorder.h + rte_acl_osdep.h rte_interrupts.h rte_ring.h + rte_alarm.h rte_ip_frag.h rte_rtm.h + rte_approx.h rte_ip.h rte_rwlock.h + rte_arp.h rte_jhash.h rte_sched_common.h + rte_atomic_32.h rte_jobstats.h rte_sched.h + rte_atomic_64.h rte_kvargs.h rte_sctp.h + rte_atomic.h rte_launch.h rte_spinlock.h + rte_bitmap.h rte_lcore.h rte_string_fns.h + rte_branch_prediction.h rte_log.h rte_table_acl.h + rte_byteorder_32.h rte_lpm6.h rte_table_array.h + rte_byteorder_64.h rte_lpm.h rte_table.h + rte_byteorder.h rte_lru.h rte_table_hash.h + rte_cfgfile.h rte_malloc.h rte_table_lpm.h + rte_common.h rte_malloc_heap.h rte_table_lpm_ipv6.h + rte_compat.h rte_mbuf.h rte_table_stub.h + rte_config.h rte_memcpy.h rte_tailq.h + rte_cpuflags.h rte_memory.h rte_tcp.h + rte_cycles.h rte_mempool.h rte_thash.h + rte_debug.h rte_memzone.h rte_timer.h + rte_devargs.h rte_meter.h rte_udp.h + rte_dev.h rte_pci_dev_feature_defs.h rte_vect.h + rte_dev_info.h rte_pci_dev_features.h rte_version.h + rte_distributor.h rte_pci_dev_ids.h rte_virtio_net.h + rte_eal.h rte_pci.h A build directory is specific to a configuration that includes architecture + execution environment + toolchain. -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 09/11] doc: refresh headers list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 09/11] doc: refresh headers list David Marchand @ 2016-01-12 14:06 ` Mcnamara, John 2016-01-16 15:10 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Mcnamara, John @ 2016-01-12 14:06 UTC (permalink / raw) To: David Marchand, dev; +Cc: thomas.monjalon > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > Sent: Sunday, January 10, 2016 12:51 PM > To: dev@dpdk.org > Cc: thomas.monjalon@dpdk.org > Subject: [dpdk-dev] [PATCH 09/11] doc: refresh headers list > > Since we are going to remove a header in next commit, let's first refresh > documentation. Hi, I don't like these parts of the docs that list files since they go out of date quite easily and, in general, the same information can be conveyed by just listing the directories. (That isn't future-proof either but it should be less subject to change.) In this case you could just remove everything in the console section after the output from "ls x86_64-native-linuxapp-gcc" like this: Each build directory contains include files, libraries, and applications like the following:: $ ls app tools config MAINTAINERS Makefile GNUmakefile drivers mk examples pkg doc README lib scripts LICENSE.GPL LICENSE.LGPL i686-native-linuxapp-gcc x86_64-native-linuxapp-gcc i686-native-linuxapp-icc x86_64-native-linuxapp-icc $ ls x86_64-native-linuxapp-gcc app build include kmod lib Makefile John. -- ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 09/11] doc: refresh headers list 2016-01-12 14:06 ` Mcnamara, John @ 2016-01-16 15:10 ` David Marchand 2016-01-18 9:47 ` Thomas Monjalon 2016-01-18 16:25 ` Mcnamara, John 0 siblings, 2 replies; 92+ messages in thread From: David Marchand @ 2016-01-16 15:10 UTC (permalink / raw) To: Mcnamara, John; +Cc: dev Hello John, On Tue, Jan 12, 2016 at 3:06 PM, Mcnamara, John <john.mcnamara@intel.com> wrote: >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand >> Sent: Sunday, January 10, 2016 12:51 PM >> To: dev@dpdk.org >> Cc: thomas.monjalon@dpdk.org >> Subject: [dpdk-dev] [PATCH 09/11] doc: refresh headers list >> >> Since we are going to remove a header in next commit, let's first refresh >> documentation. > > I don't like these parts of the docs that list files since they > go out of date quite easily and, in general, the same information > can be conveyed by just listing the directories. (That isn't > future-proof either but it should be less subject to change.) Well, we could imagine something automatic (in the build process), but I agree that the quickest solution is to get rid of it. > > In this case you could just remove everything in the console section > after the output from "ls x86_64-native-linuxapp-gcc" like this: > > > Each build directory contains include files, libraries, and applications like the following:: > > $ ls > app tools > config MAINTAINERS > Makefile GNUmakefile > drivers mk > examples pkg > doc README > lib scripts > LICENSE.GPL LICENSE.LGPL > i686-native-linuxapp-gcc x86_64-native-linuxapp-gcc > i686-native-linuxapp-icc x86_64-native-linuxapp-icc > > $ ls x86_64-native-linuxapp-gcc > app build include kmod lib Makefile > Well, from my pov, it is the same issue here. How about just removing all those files listings ? I am not sure they really help. If we go with this, I will send this patch out of the series since it would not really belong to it. Regards, -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 09/11] doc: refresh headers list 2016-01-16 15:10 ` David Marchand @ 2016-01-18 9:47 ` Thomas Monjalon 2016-01-18 16:25 ` Mcnamara, John 1 sibling, 0 replies; 92+ messages in thread From: Thomas Monjalon @ 2016-01-18 9:47 UTC (permalink / raw) To: David Marchand; +Cc: dev 2016-01-16 16:10, David Marchand: > On Tue, Jan 12, 2016 at 3:06 PM, Mcnamara, John <john.mcnamara@intel.com> wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > >> Since we are going to remove a header in next commit, let's first refresh > >> documentation. > > > > I don't like these parts of the docs that list files since they > > go out of date quite easily and, in general, the same information > > can be conveyed by just listing the directories. (That isn't > > future-proof either but it should be less subject to change.) +1 > > $ ls > > app tools > > config MAINTAINERS > > Makefile GNUmakefile > > drivers mk > > examples pkg > > doc README > > lib scripts > > LICENSE.GPL LICENSE.LGPL > > i686-native-linuxapp-gcc x86_64-native-linuxapp-gcc > > i686-native-linuxapp-icc x86_64-native-linuxapp-icc > > > > $ ls x86_64-native-linuxapp-gcc > > app build include kmod lib Makefile > > > > Well, from my pov, it is the same issue here. > How about just removing all those files listings ? > I am not sure they really help. +1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 09/11] doc: refresh headers list 2016-01-16 15:10 ` David Marchand 2016-01-18 9:47 ` Thomas Monjalon @ 2016-01-18 16:25 ` Mcnamara, John 1 sibling, 0 replies; 92+ messages in thread From: Mcnamara, John @ 2016-01-18 16:25 UTC (permalink / raw) To: David Marchand; +Cc: dev > -----Original Message----- > From: David Marchand [mailto:david.marchand@6wind.com] > Sent: Saturday, January 16, 2016 3:11 PM > To: Mcnamara, John > Cc: dev@dpdk.org; Thomas Monjalon > Subject: Re: [dpdk-dev] [PATCH 09/11] doc: refresh headers list > > Hello John, > > On Tue, Jan 12, 2016 at 3:06 PM, Mcnamara, John <john.mcnamara@intel.com> > wrote: > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > >> Sent: Sunday, January 10, 2016 12:51 PM > >> To: dev@dpdk.org > >> Cc: thomas.monjalon@dpdk.org > >> Subject: [dpdk-dev] [PATCH 09/11] doc: refresh headers list > >> > >> Since we are going to remove a header in next commit, let's first > >> refresh documentation. > > > > I don't like these parts of the docs that list files since they go out > > of date quite easily and, in general, the same information can be > > conveyed by just listing the directories. (That isn't future-proof > > either but it should be less subject to change.) > > Well, we could imagine something automatic (in the build process), but I > agree that the quickest solution is to get rid of it. > > > > > In this case you could just remove everything in the console section > > after the output from "ls x86_64-native-linuxapp-gcc" like this: > > > > > > Each build directory contains include files, libraries, and applications > like the following:: > > > > $ ls > > app tools > > config MAINTAINERS > > Makefile GNUmakefile > > drivers mk > > examples pkg > > doc README > > lib scripts > > LICENSE.GPL LICENSE.LGPL > > i686-native-linuxapp-gcc x86_64-native-linuxapp-gcc > > i686-native-linuxapp-icc x86_64-native-linuxapp-icc > > > > $ ls x86_64-native-linuxapp-gcc > > app build include kmod lib Makefile > > > > Well, from my pov, it is the same issue here. > How about just removing all those files listings ? > I am not sure they really help. Hi, I'm fine with that. I don't think the file listing adds much information to the previous paragraph. Or we could just add text that leaves out some of the information so that the reader doesn’t expect an exact representation and isn't confused when their file structure doesn't match. Something like: $ ls ... app config doc drivers examples lib ... i686-native-linuxapp-gcc i686-native-linuxapp-icc x86_64-native-linuxapp-gcc x86_64-native-linuxapp-icc ... John. -- ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 10/11] pci: no need for global device ids list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (8 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 09/11] doc: refresh headers list David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section David Marchand ` (3 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon Now that all pci device ids are in their respective drivers, we can remove this header. Signed-off-by: David Marchand <david.marchand@6wind.com> --- doc/api/doxy-api-index.md | 1 - doc/guides/prog_guide/dev_kit_build_system.rst | 75 ++++++++++---------- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 93 ------------------------- 4 files changed, 38 insertions(+), 133 deletions(-) delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 7a91001..0540aba 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -45,7 +45,6 @@ There are many libraries, so their headers may be grouped by topics: [vhost] (@ref rte_virtio_net.h), [KNI] (@ref rte_kni.h), [PCI] (@ref rte_pci.h), - [PCI IDs] (@ref rte_pci_dev_ids.h) - **memory**: [memseg] (@ref rte_memory.h), diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index bbb9ea0..6b89af6 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -89,44 +89,43 @@ Each build directory contains include files, libraries, and applications: ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/ - cmdline_cirbuf.h rte_eal_memconfig.h rte_per_lcore.h - cmdline.h rte_errno.h rte_pipeline.h - cmdline_parse_etheraddr.h rte_eth_af_packet.h rte_port_ethdev.h - cmdline_parse.h rte_eth_bond_8023ad.h rte_port_frag.h - cmdline_parse_ipaddr.h rte_eth_bond.h rte_port.h - cmdline_parse_num.h rte_eth_ctrl.h rte_port_ras.h - cmdline_parse_portlist.h rte_ethdev.h rte_port_ring.h - cmdline_parse_string.h rte_ether.h rte_port_sched.h - cmdline_rdline.h rte_eth_ring.h rte_port_source_sink.h - cmdline_socket.h rte_fbk_hash.h rte_power.h - cmdline_vt100.h rte_hash_crc.h rte_prefetch.h - exec-env rte_hash.h rte_random.h - generic rte_hexdump.h rte_red.h - rte_acl.h rte_icmp.h rte_reorder.h - rte_acl_osdep.h rte_interrupts.h rte_ring.h - rte_alarm.h rte_ip_frag.h rte_rtm.h - rte_approx.h rte_ip.h rte_rwlock.h - rte_arp.h rte_jhash.h rte_sched_common.h - rte_atomic_32.h rte_jobstats.h rte_sched.h - rte_atomic_64.h rte_kvargs.h rte_sctp.h - rte_atomic.h rte_launch.h rte_spinlock.h - rte_bitmap.h rte_lcore.h rte_string_fns.h - rte_branch_prediction.h rte_log.h rte_table_acl.h - rte_byteorder_32.h rte_lpm6.h rte_table_array.h - rte_byteorder_64.h rte_lpm.h rte_table.h - rte_byteorder.h rte_lru.h rte_table_hash.h - rte_cfgfile.h rte_malloc.h rte_table_lpm.h - rte_common.h rte_malloc_heap.h rte_table_lpm_ipv6.h - rte_compat.h rte_mbuf.h rte_table_stub.h - rte_config.h rte_memcpy.h rte_tailq.h - rte_cpuflags.h rte_memory.h rte_tcp.h - rte_cycles.h rte_mempool.h rte_thash.h - rte_debug.h rte_memzone.h rte_timer.h - rte_devargs.h rte_meter.h rte_udp.h - rte_dev.h rte_pci_dev_feature_defs.h rte_vect.h - rte_dev_info.h rte_pci_dev_features.h rte_version.h - rte_distributor.h rte_pci_dev_ids.h rte_virtio_net.h - rte_eal.h rte_pci.h + cmdline_cirbuf.h rte_eal.h rte_port_ethdev.h + cmdline.h rte_eal_memconfig.h rte_port_frag.h + cmdline_parse_etheraddr.h rte_errno.h rte_port.h + cmdline_parse.h rte_eth_af_packet.h rte_port_ras.h + cmdline_parse_ipaddr.h rte_eth_ctrl.h rte_port_ring.h + cmdline_parse_num.h rte_ethdev.h rte_port_sched.h + cmdline_parse_portlist.h rte_ether.h rte_port_source_sink.h + cmdline_parse_string.h rte_fbk_hash.h rte_power.h + cmdline_rdline.h rte_hash_crc.h rte_prefetch.h + cmdline_socket.h rte_hash.h rte_random.h + cmdline_vt100.h rte_hexdump.h rte_red.h + exec-env rte_icmp.h rte_reorder.h + generic rte_interrupts.h rte_ring.h + rte_acl.h rte_ip_frag.h rte_rtm.h + rte_acl_osdep.h rte_ip.h rte_rwlock.h + rte_alarm.h rte_jhash.h rte_sched_common.h + rte_approx.h rte_jobstats.h rte_sched.h + rte_arp.h rte_kvargs.h rte_sctp.h + rte_atomic_32.h rte_launch.h rte_spinlock.h + rte_atomic_64.h rte_lcore.h rte_string_fns.h + rte_atomic.h rte_log.h rte_table_acl.h + rte_bitmap.h rte_lpm6.h rte_table_array.h + rte_branch_prediction.h rte_lpm.h rte_table.h + rte_byteorder_32.h rte_lru.h rte_table_hash.h + rte_byteorder_64.h rte_malloc.h rte_table_lpm.h + rte_byteorder.h rte_malloc_heap.h rte_table_lpm_ipv6.h + rte_cfgfile.h rte_mbuf.h rte_table_stub.h + rte_common.h rte_memcpy.h rte_tailq.h + rte_compat.h rte_memory.h rte_tcp.h + rte_config.h rte_mempool.h rte_thash.h + rte_cpuflags.h rte_memzone.h rte_timer.h + rte_cycles.h rte_meter.h rte_udp.h + rte_debug.h rte_pci_dev_feature_defs.h rte_vect.h + rte_devargs.h rte_pci_dev_features.h rte_version.h + rte_dev.h rte_pci.h rte_virtio_net.h + rte_dev_info.h rte_per_lcore.h + rte_distributor.h rte_pipeline.h A build directory is specific to a configuration that includes architecture + execution environment + toolchain. diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile index f5ea0ee..bb9810d 100644 --- a/lib/librte_eal/common/Makefile +++ b/lib/librte_eal/common/Makefile @@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk INC := rte_branch_prediction.h rte_common.h INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h -INC += rte_pci_dev_ids.h rte_per_lcore.h rte_random.h +INC += rte_per_lcore.h rte_random.h INC += rte_tailq.h rte_interrupts.h rte_alarm.h INC += rte_string_fns.h rte_version.h INC += rte_eal_memconfig.h rte_malloc_heap.h diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h deleted file mode 100644 index 6720b7a..0000000 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - * The full GNU General Public License is included in this distribution - * in the file called LICENSE.GPL. - * - * Contact Information: - * Intel Corporation - * - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * @file - * - * This file contains a list of the PCI device IDs recognised by DPDK, which - * can be used to fill out an array of structures describing the devices. - * - * Currently four families of devices are recognised: those supported by the - * IGB driver, by EM driver, those supported by the IXGBE driver, and by virtio - * driver which is a para virtualization driver running in guest virtual machine. - * The inclusion of these in an array built using this file depends on the - * definition of - * at the time when this file is included. - * - * In order to populate an array, the user of this file must define this macro: - * RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID). For example: - * - * @code - * struct device { - * int vend; - * int dev; - * }; - * - * struct device devices[] = { - * #define RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID) {vend, dev}, - * #include <rte_pci_dev_ids.h> - * }; - * @endcode - * - * Note that this file can be included multiple times within the same file. - */ - -/* - * Undef all RTE_PCI_DEV_ID_DECL_* here. - */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (9 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 10/11] pci: no need for global device ids list David Marchand @ 2016-01-10 12:50 ` David Marchand 2016-01-10 12:58 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (2 subsequent siblings) 13 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 12:50 UTC (permalink / raw) To: dev; +Cc: thomas.monjalon We could do something à la modinfo, but let's keep it simple for now. With this, you can extract the devices that need to be bound to uio / vfio with tools like objdump : $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so Contents of section rte_pci_id_uio: 15760 8680a415 ffffffff 8680d015 ffffffff ................ 15770 8680a515 ffffffff 00000000 00000000 ................ Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- lib/librte_eal/common/include/rte_pci.h | 2 ++ 14 files changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index e500c1e..c9f5790 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -67,7 +67,7 @@ static struct rte_cryptodev_ops crypto_qat_ops = { * The set of PCI devices this driver supports */ -static struct rte_pci_id pci_id_qat_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_qat_map[] = { { .vendor_id = 0x8086, .device_id = 0x0443, diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index f822cfd..7599ec6 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -17,7 +17,7 @@ * The set of PCI devices this driver supports */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 -static struct rte_pci_id pci_id_bnx2x_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2x_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, @@ -33,7 +33,7 @@ static struct rte_pci_id pci_id_bnx2x_map[] = { { .vendor_id = 0, } }; -static struct rte_pci_id pci_id_bnx2xvf_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2xvf_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 97ef152..2620130 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -68,7 +68,7 @@ * Macros needed to support the PCI Device ID Table ... */ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ - static struct rte_pci_id cxgb4_pci_tbl[] = { + static struct rte_pci_id RTE_PCI_ID_UIO_SECTION cxgb4_pci_tbl[] = { #define CH_PCI_DEVICE_ID_FUNCTION 0x4 #define PCI_VENDOR_ID_CHELSIO 0x1425 diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 4cf9217..fb71686 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -136,7 +136,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_em_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_em_map[] = { #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "em_pci_dev_ids.h" diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 3f85a2c..f71bcd1 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -273,7 +273,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_igb_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "igb_pci_dev_ids.h" @@ -284,7 +284,7 @@ static const struct rte_pci_id pci_id_igb_map[] = { /* * The set of PCI devices this driver supports (for 82576&I350 VF) */ -static const struct rte_pci_id pci_id_igbvf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "igb_pci_dev_ids.h" diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index e3bd8ec..d67f643 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -58,7 +58,7 @@ * The set of PCI devices this driver supports */ #define PCI_VENDOR_ID_CISCO 0x1137 -static const struct rte_pci_id pci_id_enic_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_enic_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, {.vendor_id = 0, /* sentinel */}, diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 3ab744a..6b50abf 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2740,7 +2740,7 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * The set of PCI devices this driver supports. This driver will enable both PF * and SRIOV-VF devices. */ -static const struct rte_pci_id pci_id_fm10k_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_fm10k_map[] = { { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) }, { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 3213264..80dfd98 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -415,7 +415,7 @@ static int i40e_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); -static const struct rte_pci_id pci_id_i40e_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_i40e_map[] = { { 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_A) }, diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index fd963fd..47f5fab 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1116,7 +1116,7 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) return 0; } -static const struct rte_pci_id pci_id_i40evf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_i40evf_map[] = { { 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_VF) }, diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b31f52e..f970ca9 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -378,7 +378,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev, /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_ixgbe_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_ixgbe_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "ixgbe_pci_dev_ids.h" @@ -390,7 +390,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = { /* * The set of PCI devices this driver supports (for 82599 VF) */ -static const struct rte_pci_id pci_id_ixgbevf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_ixgbevf_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "ixgbe_pci_dev_ids.h" diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index bc2089f..32bcec1 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2444,7 +2444,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; } -static struct rte_pci_id pci_id_nfp_net_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_nfp_net_map[] = { { .vendor_id = PCI_VENDOR_ID_NETRONOME, .device_id = PCI_DEVICE_ID_NFP6000_PF_NIC, diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index e9af0d7..c1d9d11 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -105,7 +105,7 @@ static int virtio_dev_queue_stats_mapping_set( /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_virtio_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_virtio_map[] = { { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index b9de8eb..724ab4b 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -100,7 +100,7 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); */ #define PCI_VENDOR_ID_VMWARE 0x15AD #define VMWARE_DEV_ID_VMXNET3 0x07B0 -static const struct rte_pci_id pci_id_vmxnet3_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_vmxnet3_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) }, { .vendor_id = 0, /* sentinel */ }, }; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 334c12e..094b1c0 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -131,6 +131,8 @@ struct rte_pci_id { uint16_t subsystem_device_id; /**< Subsystem device ID or PCI_ANY_ID. */ }; +#define RTE_PCI_ID_UIO_SECTION __attribute__((section("rte_pci_id_uio"))) + /** * A structure describing the location of a PCI device. */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (10 preceding siblings ...) 2016-01-10 12:50 ` [dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section David Marchand @ 2016-01-10 12:58 ` David Marchand 2016-01-10 13:24 ` Thomas Monjalon 2016-01-10 15:53 ` Zhang, Helin 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand 13 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-10 12:58 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev Hello Thomas, Sorry, don't know how I ended up with this, I wrote an incorrect mail address for you (I should not send patches after sunday meal ;-)). -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 12:58 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand @ 2016-01-10 13:24 ` Thomas Monjalon 2016-01-10 13:26 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-01-10 13:24 UTC (permalink / raw) To: David Marchand; +Cc: dev 2016-01-10 13:58, David Marchand: > Hello Thomas, > > Sorry, don't know how I ended up with this, I wrote an incorrect mail > address for you (I should not send patches after sunday meal ;-)). No worries :) I was not expecting a patch so quickly after introducing you in this thread. Glad to see that you take time for - at least - your sunday meal :) ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 13:24 ` Thomas Monjalon @ 2016-01-10 13:26 ` David Marchand 2016-01-10 13:27 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-10 13:26 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Sun, Jan 10, 2016 at 2:24 PM, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > 2016-01-10 13:58, David Marchand: > > Hello Thomas, > > > > Sorry, don't know how I ended up with this, I wrote an incorrect mail > > address for you (I should not send patches after sunday meal ;-)). > > No worries :) > I was not expecting a patch so quickly after introducing you in this > thread. > Glad to see that you take time for - at least - your sunday meal :) > ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 13:26 ` David Marchand @ 2016-01-10 13:27 ` David Marchand 0 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-10 13:27 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev Really ... Last mail for today ... On Sun, Jan 10, 2016 at 2:26 PM, David Marchand <david.marchand@6wind.com> wrote: > > > On Sun, Jan 10, 2016 at 2:24 PM, Thomas Monjalon < > thomas.monjalon@6wind.com> wrote: > >> 2016-01-10 13:58, David Marchand: >> > Hello Thomas, >> > >> > Sorry, don't know how I ended up with this, I wrote an incorrect mail >> > address for you (I should not send patches after sunday meal ;-)). >> >> No worries :) >> I was not expecting a patch so quickly after introducing you in this >> thread. >> Glad to see that you take time for - at least - your sunday meal :) >> > > The patches were ready for a long time, just sent them today as it is rainy outside. -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (11 preceding siblings ...) 2016-01-10 12:58 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand @ 2016-01-10 15:53 ` Zhang, Helin 2016-01-16 15:02 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand 13 siblings, 1 reply; 92+ messages in thread From: Zhang, Helin @ 2016-01-10 15:53 UTC (permalink / raw) To: David Marchand, dev; +Cc: thomas.monjalon Hello David Thanks for your huge contribution! May you help to describe more details of why you made these huge changes? What benefit we can have with your changes. I guess there must have, while you did not tell that here. Regards, Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > Sent: Sunday, January 10, 2016 8:51 PM > To: dev@dpdk.org > Cc: thomas.monjalon@dpdk.org > Subject: [dpdk-dev] [PATCH 00/11] kill global pci device id list > > This patchset moves all pci device ids from eal to the pmds that need them > (patches 1 to 8). > Global pci device id list is then removed (patches 9, 10). > > In last patch, all those device ids are put in a dedicated section for retrieval by > external tools. > > -- > David Marchand > > David Marchand (11): > e1000: move pci device ids to driver > ixgbe: move pci device ids to driver > i40e: move pci device ids to driver > fm10k: move pci device ids to driver > virtio: move pci device ids to driver > vmxnet3: move pci device ids to driver > enic: move pci device ids to driver > bnx2x: move pci device ids to driver > doc: refresh headers list > pci: no need for global device ids list > pci: place all uio pci device ids in a dedicated section > > app/test-pmd/Makefile | 2 + > app/test-pmd/cmdline.c | 2 +- > app/test/Makefile | 4 + > app/test/test_pci.c | 5 +- > doc/api/doxy-api-index.md | 1 - > doc/guides/prog_guide/dev_kit_build_system.rst | 56 +- > drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- > drivers/net/bnx2x/bnx2x.c | 3 +- > drivers/net/bnx2x/bnx2x_ethdev.c | 29 +- > drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- > drivers/net/e1000/em_ethdev.c | 4 +- > drivers/net/e1000/em_pci_dev_ids.h | 200 +++++++ > drivers/net/e1000/igb_ethdev.c | 8 +- > drivers/net/e1000/igb_pci_dev_ids.h | 164 ++++++ > drivers/net/enic/enic_ethdev.c | 14 +- > drivers/net/fm10k/fm10k_ethdev.c | 10 +- > drivers/net/i40e/i40e_ethdev.c | 20 +- > drivers/net/i40e/i40e_ethdev_vf.c | 8 +- > drivers/net/ixgbe/ixgbe_ethdev.c | 8 +- > drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 185 +++++++ > drivers/net/nfp/nfp_net.c | 2 +- > drivers/net/virtio/virtio_ethdev.c | 7 +- > drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 +- > lib/librte_eal/common/Makefile | 2 +- > lib/librte_eal/common/include/rte_pci.h | 2 + > lib/librte_eal/common/include/rte_pci_dev_ids.h | 667 ------------------------ > lib/librte_eal/linuxapp/kni/Makefile | 2 + > lib/librte_eal/linuxapp/kni/kni_misc.c | 8 +- > 28 files changed, 678 insertions(+), 748 deletions(-) create mode 100644 > drivers/net/e1000/em_pci_dev_ids.h > create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h > create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h > delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h > > -- > 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-10 15:53 ` Zhang, Helin @ 2016-01-16 15:02 ` David Marchand 2016-01-21 1:12 ` Zhang, Helin 0 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-16 15:02 UTC (permalink / raw) To: Zhang, Helin; +Cc: dev Hello Helin, On Sun, Jan 10, 2016 at 4:53 PM, Zhang, Helin <helin.zhang@intel.com> wrote: > Thanks for your huge contribution! > May you help to describe more details of why you made these huge changes? As far as I can see, the only reason why we have a centralised header maintained in eal with all pci device ids is the need to identify pci devices that require a special treatment before starting a dpdk application (here, bind those pci devices to igb_uio / vfio). This patchset splits this header into small pieces maintained by the drivers themselves, then tries to come up with a way to retrieve those pci device ids from the final dpdk application and from the drivers compiled as shared libraries. With this, supported pci device ids are maintained by the drivers themselves rather than eal, pci devices ids requiring uio/vfio binding are still available. Regards, -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list 2016-01-16 15:02 ` David Marchand @ 2016-01-21 1:12 ` Zhang, Helin 0 siblings, 0 replies; 92+ messages in thread From: Zhang, Helin @ 2016-01-21 1:12 UTC (permalink / raw) To: David Marchand; +Cc: dev Hello David Yes, long time ago, the same device IDs need to be filled in 3 or 4 places. Then it would be better to have a centralized one, to avoid missing any. And yes, it would be good to maintain device IDs per PMD. As basically we don't expose any base driver header files, and sometimes those device IDs need to be defined into different meanings, I'd prefer to have each PMD has its own centralized device ID list header file, like you did for ixgbe. Thanks a lot! Regards, Helin > -----Original Message----- > From: David Marchand [mailto:david.marchand@6wind.com] > Sent: Saturday, January 16, 2016 11:03 PM > To: Zhang, Helin > Cc: dev@dpdk.org; Thomas Monjalon > Subject: Re: [dpdk-dev] [PATCH 00/11] kill global pci device id list > > Hello Helin, > > On Sun, Jan 10, 2016 at 4:53 PM, Zhang, Helin <helin.zhang@intel.com> > wrote: > > Thanks for your huge contribution! > > May you help to describe more details of why you made these huge > changes? > > As far as I can see, the only reason why we have a centralised header > maintained in eal with all pci device ids is the need to identify pci devices that > require a special treatment before starting a dpdk application (here, bind > those pci devices to igb_uio / vfio). > > This patchset splits this header into small pieces maintained by the drivers > themselves, then tries to come up with a way to retrieve those pci device ids > from the final dpdk application and from the drivers compiled as shared > libraries. > > With this, supported pci device ids are maintained by the drivers themselves > rather than eal, pci devices ids requiring uio/vfio binding are still available. > > > Regards, > -- > David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 00/10] kill global pci device id list 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand ` (12 preceding siblings ...) 2016-01-10 15:53 ` Zhang, Helin @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver David Marchand ` (10 more replies) 13 siblings, 11 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev This patchset moves all pci device ids from eal to the pmds that need them (patches 1 to 8). Global pci device id list is then removed (patch 9). In last patch, all those device ids are put in a dedicated section for retrieval by external tools. Changes since v1: - indent fixes in i40e, fm10k, virtio, vmxnet3, enic, bnx2c. - rebased on head (ixgbe update) - removed doc update (will be sent separately) -- David Marchand David Marchand (10): e1000: move pci device ids to driver ixgbe: move pci device ids to driver i40e: move pci device ids to driver fm10k: move pci device ids to driver virtio: move pci device ids to driver vmxnet3: move pci device ids to driver enic: move pci device ids to driver bnx2x: move pci device ids to driver pci: no need for global device ids list pci: place all uio pci device ids in a dedicated section app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 4 + app/test/test_pci.c | 5 +- doc/api/doxy-api-index.md | 1 - drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 25 +- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 4 +- drivers/net/e1000/em_pci_dev_ids.h | 200 +++++++ drivers/net/e1000/igb_ethdev.c | 8 +- drivers/net/e1000/igb_pci_dev_ids.h | 164 ++++++ drivers/net/enic/enic_ethdev.c | 14 +- drivers/net/fm10k/fm10k_ethdev.c | 8 +- drivers/net/i40e/i40e_ethdev.c | 22 +- drivers/net/i40e/i40e_ethdev_vf.c | 10 +- drivers/net/ixgbe/ixgbe_ethdev.c | 8 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 191 +++++++ drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 9 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 11 +- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci.h | 2 + lib/librte_eal/common/include/rte_pci_dev_ids.h | 669 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 2 + lib/librte_eal/linuxapp/kni/kni_misc.c | 8 +- 27 files changed, 648 insertions(+), 732 deletions(-) create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 02/10] ixgbe: " David Marchand ` (9 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev test application and kni still want to know e1000 pci devices. So let's create headers in the driver that will be used by them. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test/Makefile | 3 + app/test/test_pci.c | 3 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/em_pci_dev_ids.h | 200 +++++++++++++++++++ drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_pci_dev_ids.h | 164 ++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 245 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 375 insertions(+), 251 deletions(-) create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h diff --git a/app/test/Makefile b/app/test/Makefile index ec33e1a..687ae59 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -168,6 +168,9 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments endif endif +# pci tests want to know some pci devices ids +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 + # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 5530d99..b289138 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -77,8 +77,9 @@ struct rte_pci_id my_driver_id2[] = { /* IGB & EM NICS */ #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, +#include <em_pci_dev_ids.h> #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <igb_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 66e8993..4cf9217 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -139,7 +139,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_em_map[] = { #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "em_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/em_pci_dev_ids.h b/drivers/net/e1000/em_pci_dev_ids.h new file mode 100644 index 0000000..c79697b --- /dev/null +++ b/drivers/net/e1000/em_pci_dev_ids.h @@ -0,0 +1,200 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_EM +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical EM devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82542 0x1000 +#define E1000_DEV_ID_82543GC_FIBER 0x1001 +#define E1000_DEV_ID_82543GC_COPPER 0x1004 +#define E1000_DEV_ID_82544EI_COPPER 0x1008 +#define E1000_DEV_ID_82544EI_FIBER 0x1009 +#define E1000_DEV_ID_82544GC_COPPER 0x100C +#define E1000_DEV_ID_82544GC_LOM 0x100D +#define E1000_DEV_ID_82540EM 0x100E +#define E1000_DEV_ID_82540EM_LOM 0x1015 +#define E1000_DEV_ID_82540EP_LOM 0x1016 +#define E1000_DEV_ID_82540EP 0x1017 +#define E1000_DEV_ID_82540EP_LP 0x101E +#define E1000_DEV_ID_82545EM_COPPER 0x100F +#define E1000_DEV_ID_82545EM_FIBER 0x1011 +#define E1000_DEV_ID_82545GM_COPPER 0x1026 +#define E1000_DEV_ID_82545GM_FIBER 0x1027 +#define E1000_DEV_ID_82545GM_SERDES 0x1028 +#define E1000_DEV_ID_82546EB_COPPER 0x1010 +#define E1000_DEV_ID_82546EB_FIBER 0x1012 +#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D +#define E1000_DEV_ID_82546GB_COPPER 0x1079 +#define E1000_DEV_ID_82546GB_FIBER 0x107A +#define E1000_DEV_ID_82546GB_SERDES 0x107B +#define E1000_DEV_ID_82546GB_PCIE 0x108A +#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 +#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 +#define E1000_DEV_ID_82541EI 0x1013 +#define E1000_DEV_ID_82541EI_MOBILE 0x1018 +#define E1000_DEV_ID_82541ER_LOM 0x1014 +#define E1000_DEV_ID_82541ER 0x1078 +#define E1000_DEV_ID_82541GI 0x1076 +#define E1000_DEV_ID_82541GI_LF 0x107C +#define E1000_DEV_ID_82541GI_MOBILE 0x1077 +#define E1000_DEV_ID_82547EI 0x1019 +#define E1000_DEV_ID_82547EI_MOBILE 0x101A +#define E1000_DEV_ID_82547GI 0x1075 +#define E1000_DEV_ID_82571EB_COPPER 0x105E +#define E1000_DEV_ID_82571EB_FIBER 0x105F +#define E1000_DEV_ID_82571EB_SERDES 0x1060 +#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 +#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA +#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 +#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 +#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 +#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC +#define E1000_DEV_ID_82572EI_COPPER 0x107D +#define E1000_DEV_ID_82572EI_FIBER 0x107E +#define E1000_DEV_ID_82572EI_SERDES 0x107F +#define E1000_DEV_ID_82572EI 0x10B9 +#define E1000_DEV_ID_82573E 0x108B +#define E1000_DEV_ID_82573E_IAMT 0x108C +#define E1000_DEV_ID_82573L 0x109A +#define E1000_DEV_ID_82574L 0x10D3 +#define E1000_DEV_ID_82574LA 0x10F6 +#define E1000_DEV_ID_82583V 0x150C +#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 +#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 +#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA +#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB +#define E1000_DEV_ID_ICH8_82567V_3 0x1501 +#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 +#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A +#define E1000_DEV_ID_ICH8_IGP_C 0x104B +#define E1000_DEV_ID_ICH8_IFE 0x104C +#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 +#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 +#define E1000_DEV_ID_ICH8_IGP_M 0x104D +#define E1000_DEV_ID_ICH9_IGP_M 0x10BF +#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 +#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB +#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD +#define E1000_DEV_ID_ICH9_BM 0x10E5 +#define E1000_DEV_ID_ICH9_IGP_C 0x294C +#define E1000_DEV_ID_ICH9_IFE 0x10C0 +#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 +#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 +#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC +#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD +#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE +#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE +#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF +#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 + +#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA +#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB +#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF +#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 +#define E1000_DEV_ID_PCH2_LV_LM 0x1502 +#define E1000_DEV_ID_PCH2_LV_V 0x1503 +#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A +#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B +#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A +#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 +#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 +#define E1000_DEV_ID_PCH_I218_V2 0x15A1 +#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 +#define E1000_DEV_ID_PCH_I218_V3 0x15A3 + + +/* + * Tested (supported) on VM emulated HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) + +/* + * Tested (supported) on real HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) + +#undef RTE_PCI_DEV_ID_DECL_EM diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index d1bbcda..3f85a2c 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -276,7 +276,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; @@ -287,7 +287,7 @@ static const struct rte_pci_id pci_id_igb_map[] = { static const struct rte_pci_id pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/igb_pci_dev_ids.h b/drivers/net/e1000/igb_pci_dev_ids.h new file mode 100644 index 0000000..c5f8f97 --- /dev/null +++ b/drivers/net/e1000/igb_pci_dev_ids.h @@ -0,0 +1,164 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IGB +#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IGBVF +#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical IGB devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82576 0x10C9 +#define E1000_DEV_ID_82576_FIBER 0x10E6 +#define E1000_DEV_ID_82576_SERDES 0x10E7 +#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 +#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 +#define E1000_DEV_ID_82576_NS 0x150A +#define E1000_DEV_ID_82576_NS_SERDES 0x1518 +#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D +#define E1000_DEV_ID_82575EB_COPPER 0x10A7 +#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 +#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 +#define E1000_DEV_ID_82580_COPPER 0x150E +#define E1000_DEV_ID_82580_FIBER 0x150F +#define E1000_DEV_ID_82580_SERDES 0x1510 +#define E1000_DEV_ID_82580_SGMII 0x1511 +#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 +#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 +#define E1000_DEV_ID_I350_COPPER 0x1521 +#define E1000_DEV_ID_I350_FIBER 0x1522 +#define E1000_DEV_ID_I350_SERDES 0x1523 +#define E1000_DEV_ID_I350_SGMII 0x1524 +#define E1000_DEV_ID_I350_DA4 0x1546 +#define E1000_DEV_ID_I210_COPPER 0x1533 +#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 +#define E1000_DEV_ID_I210_COPPER_IT 0x1535 +#define E1000_DEV_ID_I210_FIBER 0x1536 +#define E1000_DEV_ID_I210_SERDES 0x1537 +#define E1000_DEV_ID_I210_SGMII 0x1538 +#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B +#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C +#define E1000_DEV_ID_I211_COPPER 0x1539 +#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 +#define E1000_DEV_ID_I354_SGMII 0x1F41 +#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 +#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 +#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A +#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C +#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) + +/****************** Virtual IGB devices from e1000_hw.h ******************/ + +#define E1000_DEV_ID_82576_VF 0x10CA +#define E1000_DEV_ID_82576_VF_HV 0x152D +#define E1000_DEV_ID_I350_VF 0x1520 +#define E1000_DEV_ID_I350_VF_HV 0x152F + +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) + +#undef RTE_PCI_DEV_ID_DECL_IGB +#undef RTE_PCI_DEV_ID_DECL_IGBVF 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 d088191..d2ea8e6 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,9 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_EM - * RTE_PCI_DEV_ID_DECL_IGB - * RTE_PCI_DEV_ID_DECL_IGBVF * RTE_PCI_DEV_ID_DECL_IXGBE * RTE_PCI_DEV_ID_DECL_IXGBEVF * RTE_PCI_DEV_ID_DECL_I40E @@ -96,18 +93,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_EM -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGB -#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGBVF -#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_IXGBE #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) #endif @@ -177,221 +162,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/******************** Physical EM devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82542 0x1000 -#define E1000_DEV_ID_82543GC_FIBER 0x1001 -#define E1000_DEV_ID_82543GC_COPPER 0x1004 -#define E1000_DEV_ID_82544EI_COPPER 0x1008 -#define E1000_DEV_ID_82544EI_FIBER 0x1009 -#define E1000_DEV_ID_82544GC_COPPER 0x100C -#define E1000_DEV_ID_82544GC_LOM 0x100D -#define E1000_DEV_ID_82540EM 0x100E -#define E1000_DEV_ID_82540EM_LOM 0x1015 -#define E1000_DEV_ID_82540EP_LOM 0x1016 -#define E1000_DEV_ID_82540EP 0x1017 -#define E1000_DEV_ID_82540EP_LP 0x101E -#define E1000_DEV_ID_82545EM_COPPER 0x100F -#define E1000_DEV_ID_82545EM_FIBER 0x1011 -#define E1000_DEV_ID_82545GM_COPPER 0x1026 -#define E1000_DEV_ID_82545GM_FIBER 0x1027 -#define E1000_DEV_ID_82545GM_SERDES 0x1028 -#define E1000_DEV_ID_82546EB_COPPER 0x1010 -#define E1000_DEV_ID_82546EB_FIBER 0x1012 -#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D -#define E1000_DEV_ID_82546GB_COPPER 0x1079 -#define E1000_DEV_ID_82546GB_FIBER 0x107A -#define E1000_DEV_ID_82546GB_SERDES 0x107B -#define E1000_DEV_ID_82546GB_PCIE 0x108A -#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 -#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 -#define E1000_DEV_ID_82541EI 0x1013 -#define E1000_DEV_ID_82541EI_MOBILE 0x1018 -#define E1000_DEV_ID_82541ER_LOM 0x1014 -#define E1000_DEV_ID_82541ER 0x1078 -#define E1000_DEV_ID_82541GI 0x1076 -#define E1000_DEV_ID_82541GI_LF 0x107C -#define E1000_DEV_ID_82541GI_MOBILE 0x1077 -#define E1000_DEV_ID_82547EI 0x1019 -#define E1000_DEV_ID_82547EI_MOBILE 0x101A -#define E1000_DEV_ID_82547GI 0x1075 -#define E1000_DEV_ID_82571EB_COPPER 0x105E -#define E1000_DEV_ID_82571EB_FIBER 0x105F -#define E1000_DEV_ID_82571EB_SERDES 0x1060 -#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 -#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA -#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 -#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 -#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 -#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC -#define E1000_DEV_ID_82572EI_COPPER 0x107D -#define E1000_DEV_ID_82572EI_FIBER 0x107E -#define E1000_DEV_ID_82572EI_SERDES 0x107F -#define E1000_DEV_ID_82572EI 0x10B9 -#define E1000_DEV_ID_82573E 0x108B -#define E1000_DEV_ID_82573E_IAMT 0x108C -#define E1000_DEV_ID_82573L 0x109A -#define E1000_DEV_ID_82574L 0x10D3 -#define E1000_DEV_ID_82574LA 0x10F6 -#define E1000_DEV_ID_82583V 0x150C -#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 -#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 -#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA -#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB -#define E1000_DEV_ID_ICH8_82567V_3 0x1501 -#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 -#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A -#define E1000_DEV_ID_ICH8_IGP_C 0x104B -#define E1000_DEV_ID_ICH8_IFE 0x104C -#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 -#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 -#define E1000_DEV_ID_ICH8_IGP_M 0x104D -#define E1000_DEV_ID_ICH9_IGP_M 0x10BF -#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 -#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB -#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD -#define E1000_DEV_ID_ICH9_BM 0x10E5 -#define E1000_DEV_ID_ICH9_IGP_C 0x294C -#define E1000_DEV_ID_ICH9_IFE 0x10C0 -#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 -#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 -#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC -#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD -#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE -#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE -#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF -#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 - -#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA -#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB -#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF -#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 -#define E1000_DEV_ID_PCH2_LV_LM 0x1502 -#define E1000_DEV_ID_PCH2_LV_V 0x1503 -#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A -#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B -#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A -#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 -#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 -#define E1000_DEV_ID_PCH_I218_V2 0x15A1 -#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 -#define E1000_DEV_ID_PCH_I218_V3 0x15A3 - - -/* - * Tested (supported) on VM emulated HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) - -/* - * Tested (supported) on real HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) - -/******************** Physical IGB devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82576 0x10C9 -#define E1000_DEV_ID_82576_FIBER 0x10E6 -#define E1000_DEV_ID_82576_SERDES 0x10E7 -#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 -#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 -#define E1000_DEV_ID_82576_NS 0x150A -#define E1000_DEV_ID_82576_NS_SERDES 0x1518 -#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D -#define E1000_DEV_ID_82575EB_COPPER 0x10A7 -#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 -#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 -#define E1000_DEV_ID_82580_COPPER 0x150E -#define E1000_DEV_ID_82580_FIBER 0x150F -#define E1000_DEV_ID_82580_SERDES 0x1510 -#define E1000_DEV_ID_82580_SGMII 0x1511 -#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 -#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 -#define E1000_DEV_ID_I350_COPPER 0x1521 -#define E1000_DEV_ID_I350_FIBER 0x1522 -#define E1000_DEV_ID_I350_SERDES 0x1523 -#define E1000_DEV_ID_I350_SGMII 0x1524 -#define E1000_DEV_ID_I350_DA4 0x1546 -#define E1000_DEV_ID_I210_COPPER 0x1533 -#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 -#define E1000_DEV_ID_I210_COPPER_IT 0x1535 -#define E1000_DEV_ID_I210_FIBER 0x1536 -#define E1000_DEV_ID_I210_SERDES 0x1537 -#define E1000_DEV_ID_I210_SGMII 0x1538 -#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B -#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C -#define E1000_DEV_ID_I211_COPPER 0x1539 -#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 -#define E1000_DEV_ID_I354_SGMII 0x1F41 -#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 -#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 -#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A -#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C -#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) - /****************** Physical IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82598 0x10B6 @@ -536,18 +306,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IGB devices from e1000_hw.h ******************/ - -#define E1000_DEV_ID_82576_VF 0x10CA -#define E1000_DEV_ID_82576_VF_HV 0x152D -#define E1000_DEV_ID_I350_VF 0x1520 -#define E1000_DEV_ID_I350_VF_HV 0x152F - -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) - /****************** Virtual IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82599_VF 0x10ED @@ -656,9 +414,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_EM -#undef RTE_PCI_DEV_ID_DECL_IGB -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index ac99d3f..6ac7637 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -43,6 +43,7 @@ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index f5f18f0..96b07c2 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -353,7 +353,7 @@ kni_dev_remove(struct kni_dev *dev) switch (dev->device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): @@ -510,7 +510,7 @@ kni_ioctl_create(struct net *net, found_pci = pci; switch (dev_info.device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> ret = igb_kni_probe(found_pci, &lad_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 02/10] ixgbe: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 03/10] i40e: " David Marchand ` (8 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev test application and kni still want to know ixgbe pci devices. So let's create a header in the driver that will be used by them. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 1 + app/test/test_pci.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 191 ++++++++++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 132 ---------------- lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 201 insertions(+), 138 deletions(-) create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 72426f3..a8899b8 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -64,6 +64,8 @@ ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) CFLAGS_mempool_anon.o := -D_GNU_SOURCE endif CFLAGS_cmdline.o := -D_GNU_SOURCE +# for bypass pci device ids +CFLAGS_cmdline.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 73298c9..fdb2e1b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -9816,7 +9816,7 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue) } #ifdef RTE_NIC_BYPASS -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> uint8_t bypass_is_supported(portid_t port_id) { diff --git a/app/test/Makefile b/app/test/Makefile index 687ae59..13fed78 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -170,6 +170,7 @@ endif # pci tests want to know some pci devices ids CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index b289138..d6a23d6 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -68,7 +68,7 @@ static int my_driver_init(struct rte_pci_driver *dr, struct rte_pci_id my_driver_id[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 4c4c6df..b31f52e 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -381,7 +381,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev, static const struct rte_pci_id pci_id_ixgbe_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; @@ -393,7 +393,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = { static const struct rte_pci_id pci_id_ixgbevf_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_pci_dev_ids.h b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h new file mode 100644 index 0000000..e2da88a --- /dev/null +++ b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h @@ -0,0 +1,191 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBE +#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF +#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/****************** Physical IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82598 0x10B6 +#define IXGBE_DEV_ID_82598_BX 0x1508 +#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 +#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 +#define IXGBE_DEV_ID_82598AT 0x10C8 +#define IXGBE_DEV_ID_82598AT2 0x150B +#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB +#define IXGBE_DEV_ID_82598EB_CX4 0x10DD +#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC +#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 +#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 +#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 +#define IXGBE_DEV_ID_82599_KX4 0x10F7 +#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 +#define IXGBE_DEV_ID_82599_KR 0x1517 +#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 +#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C +#define IXGBE_DEV_ID_82599_CX4 0x10F9 +#define IXGBE_DEV_ID_82599_SFP 0x10FB +#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 +#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 +#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 +#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 +#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A +#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 +#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 +#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D +#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A +#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 +#define IXGBE_DEV_ID_82599EN_SFP 0x1557 +#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC +#define IXGBE_DEV_ID_82599_T3_LOM 0x151C +#define IXGBE_DEV_ID_82599_LS 0x154F +#define IXGBE_DEV_ID_X540T 0x1528 +#define IXGBE_DEV_ID_X540T1 0x1560 +#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC +#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD +#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE +#define IXGBE_DEV_ID_X550T 0x1563 +#define IXGBE_DEV_ID_X550T1 0x15D1 +#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA +#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB + +#ifdef RTE_NIC_BYPASS +#define IXGBE_DEV_ID_82599_BYPASS 0x155D +#endif + +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ + IXGBE_DEV_ID_82598AF_SINGLE_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ + IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ + IXGBE_DEV_ID_82599_COMBO_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ + IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) + +#ifdef RTE_NIC_BYPASS +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) +#endif + +/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82599_VF 0x10ED +#define IXGBE_DEV_ID_82599_VF_HV 0x152E +#define IXGBE_DEV_ID_X540_VF 0x1515 +#define IXGBE_DEV_ID_X540_VF_HV 0x1530 +#define IXGBE_DEV_ID_X550_VF_HV 0x1564 +#define IXGBE_DEV_ID_X550_VF 0x1565 +#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 +#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 + +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) +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) + +#undef RTE_PCI_DEV_ID_DECL_IXGBE +#undef RTE_PCI_DEV_ID_DECL_IXGBEVF 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 d2ea8e6..ab6c4fb 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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 @@ -93,14 +91,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_IXGBE -#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF -#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_I40E #define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) #endif @@ -162,106 +152,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Physical IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82598 0x10B6 -#define IXGBE_DEV_ID_82598_BX 0x1508 -#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 -#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 -#define IXGBE_DEV_ID_82598AT 0x10C8 -#define IXGBE_DEV_ID_82598AT2 0x150B -#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB -#define IXGBE_DEV_ID_82598EB_CX4 0x10DD -#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC -#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 -#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 -#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 -#define IXGBE_DEV_ID_82599_KX4 0x10F7 -#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 -#define IXGBE_DEV_ID_82599_KR 0x1517 -#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 -#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C -#define IXGBE_DEV_ID_82599_CX4 0x10F9 -#define IXGBE_DEV_ID_82599_SFP 0x10FB -#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 -#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 -#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 -#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 -#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A -#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 -#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 -#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D -#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A -#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 -#define IXGBE_DEV_ID_82599EN_SFP 0x1557 -#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC -#define IXGBE_DEV_ID_82599_T3_LOM 0x151C -#define IXGBE_DEV_ID_82599_LS 0x154F -#define IXGBE_DEV_ID_X540T 0x1528 -#define IXGBE_DEV_ID_X540T1 0x1560 -#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC -#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD -#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE -#define IXGBE_DEV_ID_X550T 0x1563 -#define IXGBE_DEV_ID_X550T1 0x15D1 -#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA -#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB - -#ifdef RTE_NIC_BYPASS -#define IXGBE_DEV_ID_82599_BYPASS 0x155D -#endif - -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598AF_SINGLE_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82599_COMBO_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) - -#ifdef RTE_NIC_BYPASS -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) -#endif - /*************** Physical I40E devices from i40e_type.h *****************/ #define I40E_DEV_ID_SFP_XL710 0x1572 @@ -306,26 +196,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82599_VF 0x10ED -#define IXGBE_DEV_ID_82599_VF_HV 0x152E -#define IXGBE_DEV_ID_X540_VF 0x1515 -#define IXGBE_DEV_ID_X540_VF_HV 0x1530 -#define IXGBE_DEV_ID_X550_VF_HV 0x1564 -#define IXGBE_DEV_ID_X550_VF 0x1565 -#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 -#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 - -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) -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) - /****************** Virtual I40E devices from i40e_type.h ********************/ #define I40E_DEV_ID_VF 0x154C @@ -414,8 +284,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index 6ac7637..3bdf352 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -44,6 +44,7 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/ixgbe ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 96b07c2..f731d7c 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -357,7 +357,7 @@ kni_dev_remove(struct kni_dev *dev) igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ixgbe_kni_remove(dev->pci_dev); break; default: @@ -515,7 +515,7 @@ kni_ioctl_create(struct net *net, break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ret = ixgbe_kni_probe(found_pci, &lad_dev); break; default: -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 03/10] i40e: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 02/10] ixgbe: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 04/10] fm10k: " David Marchand ` (7 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/i40e/i40e_ethdev.c | 20 +++++++-- drivers/net/i40e/i40e_ethdev_vf.c | 8 ++-- lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 ------------------------- 3 files changed, 22 insertions(+), 66 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bf6220d..e9f6587 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -416,9 +416,23 @@ static int i40e_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, static const struct rte_pci_id pci_id_i40e_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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_A) }, + { 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_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 = 0, /* sentinel */ }, }; static const struct eth_dev_ops i40e_eth_dev_ops = { diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 14d2a50..9302f27 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1117,9 +1117,11 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) } static const struct rte_pci_id pci_id_i40evf_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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_VF) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) }, + { .vendor_id = 0, /* sentinel */ }, }; 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 ab6c4fb..f1f3e13 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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. * @@ -91,14 +89,6 @@ * Note that this file can be included multiple times within the same file. */ -#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 @@ -152,42 +142,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** 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_A 0x157F -#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_X722_A0 0x374C -#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 - -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_A) -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_X722_A0) -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) - /*************** Physical FM10K devices from fm10k_type.h ***************/ #define FM10K_DEV_ID_PF 0x15A4 @@ -196,18 +150,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** 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_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_VF) -RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF_HV) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -284,8 +226,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 04/10] fm10k: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (2 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 03/10] i40e: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 05/10] virtio: " David Marchand ` (6 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/fm10k/fm10k_ethdev.c | 6 ++--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 29 ------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index e4aed94..2c4905c 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2741,9 +2741,9 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * and SRIOV-VF devices. */ static const struct rte_pci_id pci_id_fm10k_map[] = { -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, { .vendor_id = 0, /* sentinel */ }, }; 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 f1f3e13..a19fdfa 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -97,14 +97,6 @@ #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_FM10K -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -117,11 +109,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_INTEL -/** Vendor ID used by Intel devices */ -#define PCI_VENDOR_ID_INTEL 0x8086 -#endif - #ifndef PCI_VENDOR_ID_QUMRANET /** Vendor ID used by virtio devices */ #define PCI_VENDOR_ID_QUMRANET 0x1AF4 @@ -142,14 +129,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** Physical FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_PF 0x15A4 -#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0 - -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -162,12 +141,6 @@ RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) -/*************** Virtual FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_VF 0x15A5 - -RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -228,5 +201,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) #undef RTE_PCI_DEV_ID_DECL_BNX2XVF #undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -#undef RTE_PCI_DEV_ID_DECL_FM10K -#undef RTE_PCI_DEV_ID_DECL_FM10KVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 05/10] virtio: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (3 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 04/10] fm10k: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 06/10] vmxnet3: " David Marchand ` (5 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev Reused defines from virtio_pci.h. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/virtio/virtio_ethdev.c | 7 ++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d928339..94486e6 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -106,11 +106,8 @@ static int virtio_dev_queue_stats_mapping_set( * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_virtio_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, + { .vendor_id = 0, /* sentinel */ }, }; struct rte_virtio_xstats_name_off { 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 a19fdfa..448b5e1 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,7 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_VIRTIO * at the time when this file is included. * * In order to populate an array, the user of this file must define this macro: @@ -89,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif @@ -109,11 +104,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_QUMRANET -/** Vendor ID used by virtio devices */ -#define PCI_VENDOR_ID_QUMRANET 0x1AF4 -#endif - #ifndef PCI_VENDOR_ID_VMWARE /** Vendor ID used by VMware devices */ #define PCI_VENDOR_ID_VMWARE 0x15AD @@ -129,12 +119,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Virtio devices from virtio.h ******************/ - -#define QUMRANET_DEV_ID_VIRTIO 0x1000 - -RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) - /****************** VMware VMXNET3 devices ******************/ #define VMWARE_DEV_ID_VMXNET3 0x07B0 @@ -199,5 +183,4 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 06/10] vmxnet3: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (4 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 05/10] virtio: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 07/10] enic: " David Marchand ` (4 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev Moved vmware device ids macro since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 ++++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 ---------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index c363bf6..304f076 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -98,12 +98,11 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_VMWARE 0x15AD +#define VMWARE_DEV_ID_VMXNET3 0x07B0 static const struct rte_pci_id pci_id_vmxnet3_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) }, + { .vendor_id = 0, /* sentinel */ }, }; static const struct eth_dev_ops vmxnet3_eth_dev_ops = { 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 448b5e1..0ecff3c 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -104,11 +100,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_VMWARE -/** Vendor ID used by VMware devices */ -#define PCI_VENDOR_ID_VMWARE 0x15AD -#endif - #ifndef PCI_VENDOR_ID_CISCO /** Vendor ID used by Cisco VIC devices */ #define PCI_VENDOR_ID_CISCO 0x1137 @@ -119,12 +110,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** VMware VMXNET3 devices ******************/ - -#define VMWARE_DEV_ID_VMXNET3 0x07B0 - -RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -183,4 +168,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 07/10] enic: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (5 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 06/10] vmxnet3: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 08/10] bnx2x: " David Marchand ` (3 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev; +Cc: John Daley Moved cisco vendor id since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/enic/enic_ethdev.c | 12 ++++-------- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 2a88043..a70c364 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -57,15 +57,11 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_CISCO 0x1137 static const struct rte_pci_id pci_id_enic_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#ifndef PCI_VENDOR_ID_CISCO -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif -#include "rte_pci_dev_ids.h" -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) -{.vendor_id = 0, /* Sentinal */}, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, + {.vendor_id = 0, /* sentinel */}, }; static 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 0ecff3c..1c22c04 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_ENIC -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNX2X #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) #endif @@ -100,24 +96,11 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_CISCO -/** Vendor ID used by Cisco VIC devices */ -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif - #ifndef PCI_VENDOR_ID_BROADCOM /** Vendor ID used by Broadcom devices */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Cisco VIC devices ******************/ - -#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ -#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */ - -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) - /****************** QLogic devices ******************/ /* Broadcom/QLogic BNX2X */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 08/10] bnx2x: move pci device ids to driver 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (6 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 07/10] enic: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 09/10] pci: no need for global device ids list David Marchand ` (2 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev; +Cc: Sony Chacko Reused defines from the driver and moved broadcom vendor id macro. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v1: - indent fix drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 21 +++++++-- lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 ------------------------- 3 files changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 67af5da..bf6dd71 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -22,7 +22,6 @@ #include "ecore_init_ops.h" #include "rte_version.h" -#include "rte_pci_dev_ids.h" #include <sys/types.h> #include <sys/stat.h> @@ -9592,7 +9591,7 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc) int f; struct stat st; - fwname = sc->devinfo.device_id == BNX2X_DEV_ID_57711 + fwname = sc->devinfo.device_id == CHIP_NUM_57711 ? FW_NAME_57711 : FW_NAME_57810; f = open(fwname, O_RDONLY); if (f < 0) { diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 69df02e..7655124 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -16,15 +16,28 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_BROADCOM 0x14E4 static struct rte_pci_id pci_id_bnx2x_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_OBS) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_4_10) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_2_20) }, +#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_MF) }, +#endif { .vendor_id = 0, } }; static struct rte_pci_id pci_id_bnx2xvf_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_VF) }, { .vendor_id = 0, } }; 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 1c22c04..6720b7a 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,66 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_BNX2X -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) -#endif - -#ifndef PCI_VENDOR_ID_BROADCOM -/** Vendor ID used by Broadcom devices */ -#define PCI_VENDOR_ID_BROADCOM 0x14E4 -#endif - -/****************** QLogic devices ******************/ - -/* Broadcom/QLogic BNX2X */ -#define BNX2X_DEV_ID_57710 0x164e -#define BNX2X_DEV_ID_57711 0x164f -#define BNX2X_DEV_ID_57711E 0x1650 -#define BNX2X_DEV_ID_57712 0x1662 -#define BNX2X_DEV_ID_57712_MF 0x1663 -#define BNX2X_DEV_ID_57712_VF 0x166f -#define BNX2X_DEV_ID_57713 0x1651 -#define BNX2X_DEV_ID_57713E 0x1652 -#define BNX2X_DEV_ID_57800 0x168a -#define BNX2X_DEV_ID_57800_MF 0x16a5 -#define BNX2X_DEV_ID_57800_VF 0x16a9 -#define BNX2X_DEV_ID_57810 0x168e -#define BNX2X_DEV_ID_57810_MF 0x16ae -#define BNX2X_DEV_ID_57810_VF 0x16af -#define BNX2X_DEV_ID_57811 0x163d -#define BNX2X_DEV_ID_57811_MF 0x163e -#define BNX2X_DEV_ID_57811_VF 0x163f - -#define BNX2X_DEV_ID_57840_OBS 0x168d -#define BNX2X_DEV_ID_57840_OBS_MF 0x16ab -#define BNX2X_DEV_ID_57840_4_10 0x16a1 -#define BNX2X_DEV_ID_57840_2_20 0x16a2 -#define BNX2X_DEV_ID_57840_MF 0x16a4 -#define BNX2X_DEV_ID_57840_VF 0x16ad - -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_OBS) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_4_10) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_2_20) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_VF) -#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) -#endif - /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */ -#undef RTE_PCI_DEV_ID_DECL_BNX2X -#undef RTE_PCI_DEV_ID_DECL_BNX2XVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 09/10] pci: no need for global device ids list 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (7 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 08/10] bnx2x: " David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev Now that all pci device ids are in their respective drivers, we can remove this header. Signed-off-by: David Marchand <david.marchand@6wind.com> --- doc/api/doxy-api-index.md | 1 - lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 93 ------------------------- 3 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 7a91001..0540aba 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -45,7 +45,6 @@ There are many libraries, so their headers may be grouped by topics: [vhost] (@ref rte_virtio_net.h), [KNI] (@ref rte_kni.h), [PCI] (@ref rte_pci.h), - [PCI IDs] (@ref rte_pci_dev_ids.h) - **memory**: [memseg] (@ref rte_memory.h), diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile index f5ea0ee..bb9810d 100644 --- a/lib/librte_eal/common/Makefile +++ b/lib/librte_eal/common/Makefile @@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk INC := rte_branch_prediction.h rte_common.h INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h -INC += rte_pci_dev_ids.h rte_per_lcore.h rte_random.h +INC += rte_per_lcore.h rte_random.h INC += rte_tailq.h rte_interrupts.h rte_alarm.h INC += rte_string_fns.h rte_version.h INC += rte_eal_memconfig.h rte_malloc_heap.h diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h deleted file mode 100644 index 6720b7a..0000000 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - * The full GNU General Public License is included in this distribution - * in the file called LICENSE.GPL. - * - * Contact Information: - * Intel Corporation - * - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * @file - * - * This file contains a list of the PCI device IDs recognised by DPDK, which - * can be used to fill out an array of structures describing the devices. - * - * Currently four families of devices are recognised: those supported by the - * IGB driver, by EM driver, those supported by the IXGBE driver, and by virtio - * driver which is a para virtualization driver running in guest virtual machine. - * The inclusion of these in an array built using this file depends on the - * definition of - * at the time when this file is included. - * - * In order to populate an array, the user of this file must define this macro: - * RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID). For example: - * - * @code - * struct device { - * int vend; - * int dev; - * }; - * - * struct device devices[] = { - * #define RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID) {vend, dev}, - * #include <rte_pci_dev_ids.h> - * }; - * @endcode - * - * Note that this file can be included multiple times within the same file. - */ - -/* - * Undef all RTE_PCI_DEV_ID_DECL_* here. - */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (8 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 09/10] pci: no need for global device ids list David Marchand @ 2016-01-18 12:30 ` David Marchand 2016-01-19 7:30 ` Thomas Monjalon 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 10 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-01-18 12:30 UTC (permalink / raw) To: dev We could do something à la modinfo, but let's keep it simple for now. With this, you can extract the devices that need to be bound to uio / vfio with tools like objdump : $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so Contents of section rte_pci_id_uio: 15760 8680a415 ffffffff 8680d015 ffffffff ................ 15770 8680a515 ffffffff 00000000 00000000 ................ Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- lib/librte_eal/common/include/rte_pci.h | 2 ++ 14 files changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index e500c1e..c9f5790 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -67,7 +67,7 @@ static struct rte_cryptodev_ops crypto_qat_ops = { * The set of PCI devices this driver supports */ -static struct rte_pci_id pci_id_qat_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_qat_map[] = { { .vendor_id = 0x8086, .device_id = 0x0443, diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 7655124..72546bd 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -17,7 +17,7 @@ * The set of PCI devices this driver supports */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 -static struct rte_pci_id pci_id_bnx2x_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2x_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, @@ -33,7 +33,7 @@ static struct rte_pci_id pci_id_bnx2x_map[] = { { .vendor_id = 0, } }; -static struct rte_pci_id pci_id_bnx2xvf_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_bnx2xvf_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 97ef152..2620130 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -68,7 +68,7 @@ * Macros needed to support the PCI Device ID Table ... */ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ - static struct rte_pci_id cxgb4_pci_tbl[] = { + static struct rte_pci_id RTE_PCI_ID_UIO_SECTION cxgb4_pci_tbl[] = { #define CH_PCI_DEVICE_ID_FUNCTION 0x4 #define PCI_VENDOR_ID_CHELSIO 0x1425 diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 4cf9217..fb71686 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -136,7 +136,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_em_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_em_map[] = { #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "em_pci_dev_ids.h" diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 3f85a2c..f71bcd1 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -273,7 +273,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_igb_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "igb_pci_dev_ids.h" @@ -284,7 +284,7 @@ static const struct rte_pci_id pci_id_igb_map[] = { /* * The set of PCI devices this driver supports (for 82576&I350 VF) */ -static const struct rte_pci_id pci_id_igbvf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "igb_pci_dev_ids.h" diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index a70c364..493b154 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -58,7 +58,7 @@ * The set of PCI devices this driver supports */ #define PCI_VENDOR_ID_CISCO 0x1137 -static const struct rte_pci_id pci_id_enic_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_enic_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, {.vendor_id = 0, /* sentinel */}, diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 2c4905c..4e5748c 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2740,7 +2740,7 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * The set of PCI devices this driver supports. This driver will enable both PF * and SRIOV-VF devices. */ -static const struct rte_pci_id pci_id_fm10k_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_fm10k_map[] = { { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) }, { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index e9f6587..6801b9f 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -415,7 +415,7 @@ static int i40e_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); -static const struct rte_pci_id pci_id_i40e_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_i40e_map[] = { { 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_A) }, diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 9302f27..f925265 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1116,7 +1116,7 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) return 0; } -static const struct rte_pci_id pci_id_i40evf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_i40evf_map[] = { { 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_VF) }, diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b31f52e..f970ca9 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -378,7 +378,7 @@ static int ixgbe_timesync_write_time(struct rte_eth_dev *dev, /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_ixgbe_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_ixgbe_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "ixgbe_pci_dev_ids.h" @@ -390,7 +390,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = { /* * The set of PCI devices this driver supports (for 82599 VF) */ -static const struct rte_pci_id pci_id_ixgbevf_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_ixgbevf_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, #include "ixgbe_pci_dev_ids.h" diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index bc2089f..32bcec1 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2444,7 +2444,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; } -static struct rte_pci_id pci_id_nfp_net_map[] = { +static struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_nfp_net_map[] = { { .vendor_id = PCI_VENDOR_ID_NETRONOME, .device_id = PCI_DEVICE_ID_NFP6000_PF_NIC, diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 94486e6..9cbb5dd 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -105,7 +105,7 @@ static int virtio_dev_queue_stats_mapping_set( /* * The set of PCI devices this driver supports */ -static const struct rte_pci_id pci_id_virtio_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_virtio_map[] = { { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 304f076..6d03695 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -100,7 +100,7 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); */ #define PCI_VENDOR_ID_VMWARE 0x15AD #define VMWARE_DEV_ID_VMXNET3 0x07B0 -static const struct rte_pci_id pci_id_vmxnet3_map[] = { +static const struct rte_pci_id RTE_PCI_ID_UIO_SECTION pci_id_vmxnet3_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) }, { .vendor_id = 0, /* sentinel */ }, }; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 334c12e..094b1c0 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -131,6 +131,8 @@ struct rte_pci_id { uint16_t subsystem_device_id; /**< Subsystem device ID or PCI_ANY_ID. */ }; +#define RTE_PCI_ID_UIO_SECTION __attribute__((section("rte_pci_id_uio"))) + /** * A structure describing the location of a PCI device. */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section David Marchand @ 2016-01-19 7:30 ` Thomas Monjalon 2016-01-19 14:29 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-01-19 7:30 UTC (permalink / raw) To: David Marchand; +Cc: dev, Neil Horman 2016-01-18 13:30, David Marchand: > We could do something à la modinfo, but let's keep it simple for now. > > With this, you can extract the devices that need to be bound to uio / vfio > with tools like objdump : > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > Contents of section rte_pci_id_uio: > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > 15770 8680a515 ffffffff 00000000 00000000 ................ Yes we need a modinfo-like tool. Currently, the UIO/VFIO binding can be done after parsing the PCI device list. It is better to define the device ids locally to their drivers but it must be integrated with an appropriate parsing tool at the same time. And more importantly than any tool, the format of these ELF data must be properly defined, documented and extensible. Is there someone experimented with such format definition? Stephen, you were asking for this change, what is your opinion? I remember that Neil was also interested in this change: http://dpdk.org/ml/archives/dev/2015-January/012115.html Panu, Christian, this change could be related to distribution packaging. Thanks for helping to move this change forward. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-19 7:30 ` Thomas Monjalon @ 2016-01-19 14:29 ` Neil Horman 2016-01-19 16:10 ` Stephen Hemminger 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-01-19 14:29 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > 2016-01-18 13:30, David Marchand: > > We could do something à la modinfo, but let's keep it simple for now. > > > > With this, you can extract the devices that need to be bound to uio / vfio > > with tools like objdump : > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > Contents of section rte_pci_id_uio: > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > Yes we need a modinfo-like tool. > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > It is better to define the device ids locally to their drivers but it must > be integrated with an appropriate parsing tool at the same time. > And more importantly than any tool, the format of these ELF data must be > properly defined, documented and extensible. > > Is there someone experimented with such format definition? > Stephen, you were asking for this change, what is your opinion? > I remember that Neil was also interested in this change: > http://dpdk.org/ml/archives/dev/2015-January/012115.html > Panu, Christian, this change could be related to distribution packaging. > Thanks for helping to move this change forward. Yes, I would be interested in seeing this. Is the ask here that someone do it? As I recall from the last thread that you reference, I thought David M was interested in writing it and soliciting for ideas. If thats no longer the case, I can take a stab at writing it. Neil ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-19 14:29 ` Neil Horman @ 2016-01-19 16:10 ` Stephen Hemminger 2016-01-19 20:56 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: Stephen Hemminger @ 2016-01-19 16:10 UTC (permalink / raw) To: Neil Horman; +Cc: dev On Tue, 19 Jan 2016 09:29:31 -0500 Neil Horman <nhorman@redhat.com> wrote: > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > 2016-01-18 13:30, David Marchand: > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > with tools like objdump : > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > Contents of section rte_pci_id_uio: > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > Yes we need a modinfo-like tool. > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > It is better to define the device ids locally to their drivers but it must > > be integrated with an appropriate parsing tool at the same time. > > And more importantly than any tool, the format of these ELF data must be > > properly defined, documented and extensible. > > > > Is there someone experimented with such format definition? > > Stephen, you were asking for this change, what is your opinion? > > I remember that Neil was also interested in this change: > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > Panu, Christian, this change could be related to distribution packaging. > > Thanks for helping to move this change forward. > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > As I recall from the last thread that you reference, I thought David M was > interested in writing it and soliciting for ideas. If thats no longer the case, > I can take a stab at writing it. > > Neil > If these are libraries is there a way to have a real entry point to dump PCI id's. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-19 16:10 ` Stephen Hemminger @ 2016-01-19 20:56 ` Neil Horman 2016-01-19 21:35 ` Stephen Hemminger 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-01-19 20:56 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev, Neil Horman On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > On Tue, 19 Jan 2016 09:29:31 -0500 > Neil Horman <nhorman@redhat.com> wrote: > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > 2016-01-18 13:30, David Marchand: > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > with tools like objdump : > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > Contents of section rte_pci_id_uio: > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > Yes we need a modinfo-like tool. > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > It is better to define the device ids locally to their drivers but it must > > > be integrated with an appropriate parsing tool at the same time. > > > And more importantly than any tool, the format of these ELF data must be > > > properly defined, documented and extensible. > > > > > > Is there someone experimented with such format definition? > > > Stephen, you were asking for this change, what is your opinion? > > > I remember that Neil was also interested in this change: > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > Panu, Christian, this change could be related to distribution packaging. > > > Thanks for helping to move this change forward. > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > As I recall from the last thread that you reference, I thought David M was > > interested in writing it and soliciting for ideas. If thats no longer the case, > > I can take a stab at writing it. > > > > Neil > > > > If these are libraries is there a way to have a real entry point > to dump PCI id's. > Sure, you could write a method that could be dlsym-ed easily enough to fetch an array of pci ids, or just print stuff the console. Not sure thats the best way, but definately an option Neil ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-19 20:56 ` Neil Horman @ 2016-01-19 21:35 ` Stephen Hemminger 2016-01-20 15:40 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: Stephen Hemminger @ 2016-01-19 21:35 UTC (permalink / raw) To: Neil Horman; +Cc: dev, Neil Horman On Tue, 19 Jan 2016 15:56:14 -0500 Neil Horman <nhorman@tuxdriver.com> wrote: > On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > > On Tue, 19 Jan 2016 09:29:31 -0500 > > Neil Horman <nhorman@redhat.com> wrote: > > > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > > 2016-01-18 13:30, David Marchand: > > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > > with tools like objdump : > > > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > > > Contents of section rte_pci_id_uio: > > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > > > Yes we need a modinfo-like tool. > > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > > It is better to define the device ids locally to their drivers but it must > > > > be integrated with an appropriate parsing tool at the same time. > > > > And more importantly than any tool, the format of these ELF data must be > > > > properly defined, documented and extensible. > > > > > > > > Is there someone experimented with such format definition? > > > > Stephen, you were asking for this change, what is your opinion? > > > > I remember that Neil was also interested in this change: > > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > > Panu, Christian, this change could be related to distribution packaging. > > > > Thanks for helping to move this change forward. > > > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > > As I recall from the last thread that you reference, I thought David M was > > > interested in writing it and soliciting for ideas. If thats no longer the case, > > > I can take a stab at writing it. > > > > > > Neil > > > > > > > If these are libraries is there a way to have a real entry point > > to dump PCI id's. > > > Sure, you could write a method that could be dlsym-ed easily enough to fetch an > array of pci ids, or just print stuff the console. Not sure thats the best way, > but definately an option > Neil It is just that reading data with objdump is a kludge likely to get broken. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-19 21:35 ` Stephen Hemminger @ 2016-01-20 15:40 ` Neil Horman 2016-02-24 11:37 ` Bruce Richardson 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-01-20 15:40 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev, Neil Horman On Tue, Jan 19, 2016 at 01:35:14PM -0800, Stephen Hemminger wrote: > On Tue, 19 Jan 2016 15:56:14 -0500 > Neil Horman <nhorman@tuxdriver.com> wrote: > > > On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > > > On Tue, 19 Jan 2016 09:29:31 -0500 > > > Neil Horman <nhorman@redhat.com> wrote: > > > > > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > > > 2016-01-18 13:30, David Marchand: > > > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > > > with tools like objdump : > > > > > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > > > > > Contents of section rte_pci_id_uio: > > > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > > > > > Yes we need a modinfo-like tool. > > > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > > > It is better to define the device ids locally to their drivers but it must > > > > > be integrated with an appropriate parsing tool at the same time. > > > > > And more importantly than any tool, the format of these ELF data must be > > > > > properly defined, documented and extensible. > > > > > > > > > > Is there someone experimented with such format definition? > > > > > Stephen, you were asking for this change, what is your opinion? > > > > > I remember that Neil was also interested in this change: > > > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > > > Panu, Christian, this change could be related to distribution packaging. > > > > > Thanks for helping to move this change forward. > > > > > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > > > As I recall from the last thread that you reference, I thought David M was > > > > interested in writing it and soliciting for ideas. If thats no longer the case, > > > > I can take a stab at writing it. > > > > > > > > Neil > > > > > > > > > > If these are libraries is there a way to have a real entry point > > > to dump PCI id's. > > > > > Sure, you could write a method that could be dlsym-ed easily enough to fetch an > > array of pci ids, or just print stuff the console. Not sure thats the best way, > > but definately an option > > Neil > > It is just that reading data with objdump is a kludge likely to get broken. > Not suggesting that we rely on objdump in perpituity, only that we export the data, rather than a method to access it so that it can be reached via libelf. Using a function to return the information has implicit issues at the moment (specifically if you dlopen a dpdk driver, its constructor will attempt to register it with the core libraries). While thats not catastrophic, it means more stuff than you expect gets loaded, which might have wierd side effects. Adding a separate section that you could reach via libelf would be nice I think Neil ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-01-20 15:40 ` Neil Horman @ 2016-02-24 11:37 ` Bruce Richardson 2016-02-24 11:50 ` Thomas Monjalon 0 siblings, 1 reply; 92+ messages in thread From: Bruce Richardson @ 2016-02-24 11:37 UTC (permalink / raw) To: Neil Horman; +Cc: dev, Neil Horman On Wed, Jan 20, 2016 at 10:40:00AM -0500, Neil Horman wrote: > On Tue, Jan 19, 2016 at 01:35:14PM -0800, Stephen Hemminger wrote: > > On Tue, 19 Jan 2016 15:56:14 -0500 > > Neil Horman <nhorman@tuxdriver.com> wrote: > > > > > On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > > > > On Tue, 19 Jan 2016 09:29:31 -0500 > > > > Neil Horman <nhorman@redhat.com> wrote: > > > > > > > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > > > > 2016-01-18 13:30, David Marchand: > > > > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > > > > with tools like objdump : > > > > > > > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > > > > > > > Contents of section rte_pci_id_uio: > > > > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > > > > > > > Yes we need a modinfo-like tool. > > > > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > > > > It is better to define the device ids locally to their drivers but it must > > > > > > be integrated with an appropriate parsing tool at the same time. > > > > > > And more importantly than any tool, the format of these ELF data must be > > > > > > properly defined, documented and extensible. > > > > > > > > > > > > Is there someone experimented with such format definition? > > > > > > Stephen, you were asking for this change, what is your opinion? > > > > > > I remember that Neil was also interested in this change: > > > > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > > > > Panu, Christian, this change could be related to distribution packaging. > > > > > > Thanks for helping to move this change forward. > > > > > > > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > > > > As I recall from the last thread that you reference, I thought David M was > > > > > interested in writing it and soliciting for ideas. If thats no longer the case, > > > > > I can take a stab at writing it. > > > > > > > > > > Neil > > > > > > > > > > > > > If these are libraries is there a way to have a real entry point > > > > to dump PCI id's. > > > > > > > Sure, you could write a method that could be dlsym-ed easily enough to fetch an > > > array of pci ids, or just print stuff the console. Not sure thats the best way, > > > but definately an option > > > Neil > > > > It is just that reading data with objdump is a kludge likely to get broken. > > > Not suggesting that we rely on objdump in perpituity, only that we export the > data, rather than a method to access it so that it can be reached via libelf. > Using a function to return the information has implicit issues at the moment > (specifically if you dlopen a dpdk driver, its constructor will attempt to > register it with the core libraries). While thats not catastrophic, it means > more stuff than you expect gets loaded, which might have wierd side effects. > Adding a separate section that you could reach via libelf would be nice I think > > Neil > Hi, while there is interesting discussion on tools, are there any objections to taking and merging this patchset as-is to at least do the cleanup of the existing pci ids list? I would assume that any tools for querying the patchlist can be done as additional work once this is applied. Regards, /Bruce ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-02-24 11:37 ` Bruce Richardson @ 2016-02-24 11:50 ` Thomas Monjalon 2016-02-24 14:18 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-02-24 11:50 UTC (permalink / raw) To: dev; +Cc: Neil Horman 2016-02-24 11:37, Bruce Richardson: > On Wed, Jan 20, 2016 at 10:40:00AM -0500, Neil Horman wrote: > > On Tue, Jan 19, 2016 at 01:35:14PM -0800, Stephen Hemminger wrote: > > > On Tue, 19 Jan 2016 15:56:14 -0500 > > > Neil Horman <nhorman@tuxdriver.com> wrote: > > > > > > > On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > > > > > On Tue, 19 Jan 2016 09:29:31 -0500 > > > > > Neil Horman <nhorman@redhat.com> wrote: > > > > > > > > > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > > > > > 2016-01-18 13:30, David Marchand: > > > > > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > > > > > with tools like objdump : > > > > > > > > > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > > > > > > > > > Contents of section rte_pci_id_uio: > > > > > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > > > > > > > > > Yes we need a modinfo-like tool. > > > > > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > > > > > It is better to define the device ids locally to their drivers but it must > > > > > > > be integrated with an appropriate parsing tool at the same time. > > > > > > > And more importantly than any tool, the format of these ELF data must be > > > > > > > properly defined, documented and extensible. > > > > > > > > > > > > > > Is there someone experimented with such format definition? > > > > > > > Stephen, you were asking for this change, what is your opinion? > > > > > > > I remember that Neil was also interested in this change: > > > > > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > > > > > Panu, Christian, this change could be related to distribution packaging. > > > > > > > Thanks for helping to move this change forward. > > > > > > > > > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > > > > > As I recall from the last thread that you reference, I thought David M was > > > > > > interested in writing it and soliciting for ideas. If thats no longer the case, > > > > > > I can take a stab at writing it. > > > > > > > > > > > > Neil > > > > > > > > > > > > > > > > If these are libraries is there a way to have a real entry point > > > > > to dump PCI id's. > > > > > > > > > Sure, you could write a method that could be dlsym-ed easily enough to fetch an > > > > array of pci ids, or just print stuff the console. Not sure thats the best way, > > > > but definately an option > > > > Neil > > > > > > It is just that reading data with objdump is a kludge likely to get broken. > > > > > Not suggesting that we rely on objdump in perpituity, only that we export the > > data, rather than a method to access it so that it can be reached via libelf. > > Using a function to return the information has implicit issues at the moment > > (specifically if you dlopen a dpdk driver, its constructor will attempt to > > register it with the core libraries). While thats not catastrophic, it means > > more stuff than you expect gets loaded, which might have wierd side effects. > > Adding a separate section that you could reach via libelf would be nice I think > > > > Neil > > > Hi, > > while there is interesting discussion on tools, are there any objections to > taking and merging this patchset as-is to at least do the cleanup of the > existing pci ids list? I would assume that any tools for querying the patchlist > can be done as additional work once this is applied. Today we can parse the global PCI list to bind devices to DPDK. If we remove this list, we must replace it by another convenient method. And more importantly, the informations in the ELF files must be extendible and in a stable syntax. The problem here is that it is poorly specified. Please let's describe a syntax for these ELF data, first. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section 2016-02-24 11:50 ` Thomas Monjalon @ 2016-02-24 14:18 ` Neil Horman 0 siblings, 0 replies; 92+ messages in thread From: Neil Horman @ 2016-02-24 14:18 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Wed, Feb 24, 2016 at 12:50:40PM +0100, Thomas Monjalon wrote: > 2016-02-24 11:37, Bruce Richardson: > > On Wed, Jan 20, 2016 at 10:40:00AM -0500, Neil Horman wrote: > > > On Tue, Jan 19, 2016 at 01:35:14PM -0800, Stephen Hemminger wrote: > > > > On Tue, 19 Jan 2016 15:56:14 -0500 > > > > Neil Horman <nhorman@tuxdriver.com> wrote: > > > > > > > > > On Tue, Jan 19, 2016 at 08:10:19AM -0800, Stephen Hemminger wrote: > > > > > > On Tue, 19 Jan 2016 09:29:31 -0500 > > > > > > Neil Horman <nhorman@redhat.com> wrote: > > > > > > > > > > > > > On Tue, Jan 19, 2016 at 08:30:40AM +0100, Thomas Monjalon wrote: > > > > > > > > 2016-01-18 13:30, David Marchand: > > > > > > > > > We could do something à la modinfo, but let's keep it simple for now. > > > > > > > > > > > > > > > > > > With this, you can extract the devices that need to be bound to uio / vfio > > > > > > > > > with tools like objdump : > > > > > > > > > > > > > > > > > > $ objdump -j rte_pci_id_uio -s build/lib/librte_pmd_fm10k.so > > > > > > > > > > > > > > > > > > Contents of section rte_pci_id_uio: > > > > > > > > > 15760 8680a415 ffffffff 8680d015 ffffffff ................ > > > > > > > > > 15770 8680a515 ffffffff 00000000 00000000 ................ > > > > > > > > > > > > > > > > Yes we need a modinfo-like tool. > > > > > > > > Currently, the UIO/VFIO binding can be done after parsing the PCI device list. > > > > > > > > It is better to define the device ids locally to their drivers but it must > > > > > > > > be integrated with an appropriate parsing tool at the same time. > > > > > > > > And more importantly than any tool, the format of these ELF data must be > > > > > > > > properly defined, documented and extensible. > > > > > > > > > > > > > > > > Is there someone experimented with such format definition? > > > > > > > > Stephen, you were asking for this change, what is your opinion? > > > > > > > > I remember that Neil was also interested in this change: > > > > > > > > http://dpdk.org/ml/archives/dev/2015-January/012115.html > > > > > > > > Panu, Christian, this change could be related to distribution packaging. > > > > > > > > Thanks for helping to move this change forward. > > > > > > > > > > > > > > Yes, I would be interested in seeing this. Is the ask here that someone do it? > > > > > > > As I recall from the last thread that you reference, I thought David M was > > > > > > > interested in writing it and soliciting for ideas. If thats no longer the case, > > > > > > > I can take a stab at writing it. > > > > > > > > > > > > > > Neil > > > > > > > > > > > > > > > > > > > If these are libraries is there a way to have a real entry point > > > > > > to dump PCI id's. > > > > > > > > > > > Sure, you could write a method that could be dlsym-ed easily enough to fetch an > > > > > array of pci ids, or just print stuff the console. Not sure thats the best way, > > > > > but definately an option > > > > > Neil > > > > > > > > It is just that reading data with objdump is a kludge likely to get broken. > > > > > > > Not suggesting that we rely on objdump in perpituity, only that we export the > > > data, rather than a method to access it so that it can be reached via libelf. > > > Using a function to return the information has implicit issues at the moment > > > (specifically if you dlopen a dpdk driver, its constructor will attempt to > > > register it with the core libraries). While thats not catastrophic, it means > > > more stuff than you expect gets loaded, which might have wierd side effects. > > > Adding a separate section that you could reach via libelf would be nice I think > > > > > > Neil > > > > > Hi, > > > > while there is interesting discussion on tools, are there any objections to > > taking and merging this patchset as-is to at least do the cleanup of the > > existing pci ids list? I would assume that any tools for querying the patchlist > > can be done as additional work once this is applied. > > Today we can parse the global PCI list to bind devices to DPDK. > If we remove this list, we must replace it by another convenient method. > And more importantly, the informations in the ELF files must be extendible > and in a stable syntax. > The problem here is that it is poorly specified. > Please let's describe a syntax for these ELF data, first. Agreed, I'd be fine with taking the patch if it didn't preclude admins from being able to identify which drivers match which devices without loading the modules first. Neil ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 00/13] kill global pci device id list 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand ` (9 preceding siblings ...) 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand ` (14 more replies) 10 siblings, 15 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt This patchset moves all pci device ids from eal to the pmds that need them. Global pci device id list is then removed. A new tool (name to be discussed) has been added to retrieve some information from the dpdk elf objects. I can't work on this subject at the moment, so please feel free to make these patches yours if you have better ideas / ways to achieve the same result. Changes since v2: - rebased on HEAD - ena driver has been aligned - this patchset now depends on [1] as it avoids touching all drivers this way - not storing the pci ids in a dedicated section anymore, pci drivers are exported and parsed by a quickly written (and naive) tool Changes since v1: - indent fixes in i40e, fm10k, virtio, vmxnet3, enic, bnx2c. - rebased on head (ixgbe update) - removed doc update (will be sent separately) [1]: http://dpdk.org/ml/archives/dev/2016-April/037686.html -- David Marchand David Marchand (13): e1000: move pci device ids to driver ixgbe: move pci device ids to driver i40e: move pci device ids to driver fm10k: move pci device ids to driver virtio: move pci device ids to driver vmxnet3: move pci device ids to driver enic: move pci device ids to driver bnx2x: move pci device ids to driver ena: remove unneeded pci macro pci: no need for global device ids list drivers: constify pci id tables drivers: export pci drivers app: introduce dpdk-obj-info tool app/Makefile | 1 + app/dpdk-obj-info/Makefile | 45 ++ app/dpdk-obj-info/dpdk-obj-info.c | 188 +++++++ app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 4 + app/test/test_pci.c | 5 +- doc/api/doxy-api-index.md | 1 - drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 25 +- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/em_pci_dev_ids.h | 208 +++++++ drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_pci_dev_ids.h | 165 ++++++ drivers/net/ena/ena_ethdev.c | 10 +- drivers/net/enic/enic_ethdev.c | 13 +- drivers/net/fm10k/fm10k_ethdev.c | 7 +- drivers/net/i40e/i40e_ethdev.c | 21 +- drivers/net/i40e/i40e_ethdev_vf.c | 9 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 213 +++++++ drivers/net/mlx4/mlx4.c | 1 + drivers/net/mlx5/mlx5.c | 1 + drivers/net/nfp/nfp_net.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 8 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 +- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci.h | 7 + lib/librte_eal/common/include/rte_pci_dev_ids.h | 704 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 2 + lib/librte_eal/linuxapp/kni/kni_misc.c | 8 +- 33 files changed, 918 insertions(+), 762 deletions(-) create mode 100644 app/dpdk-obj-info/Makefile create mode 100644 app/dpdk-obj-info/dpdk-obj-info.c create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 13:29 ` Neil Horman 2016-07-08 13:31 ` Thomas Monjalon 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 02/13] ixgbe: " David Marchand ` (13 subsequent siblings) 14 siblings, 2 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Wenzhuo Lu test application and kni still want to know e1000 pci devices. So let's create headers in the driver that will be used by them. I wanted to reuse base/ headers, but because of some headaches trying to resolve macros redefinition collisions in kni (with ixgbe next commit), I left it as is. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test/Makefile | 3 + app/test/test_pci.c | 3 +- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/em_pci_dev_ids.h | 208 +++++++++++++++++++ drivers/net/e1000/igb_ethdev.c | 4 +- drivers/net/e1000/igb_pci_dev_ids.h | 165 +++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 254 ------------------------ lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 384 insertions(+), 260 deletions(-) create mode 100644 drivers/net/e1000/em_pci_dev_ids.h create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h diff --git a/app/test/Makefile b/app/test/Makefile index a4907d5..8a1f54c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -171,6 +171,9 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments endif endif +# pci tests want to know some pci devices ids +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 + # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 0ed357e..7215936 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -77,8 +77,9 @@ struct rte_pci_id my_driver_id2[] = { /* IGB & EM NICS */ #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, +#include <em_pci_dev_ids.h> #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <igb_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 1f80c05..203a9e5 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -139,7 +139,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_em_map[] = { #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "em_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/em_pci_dev_ids.h b/drivers/net/e1000/em_pci_dev_ids.h new file mode 100644 index 0000000..736a68e --- /dev/null +++ b/drivers/net/e1000/em_pci_dev_ids.h @@ -0,0 +1,208 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_EM +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical EM devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82542 0x1000 +#define E1000_DEV_ID_82543GC_FIBER 0x1001 +#define E1000_DEV_ID_82543GC_COPPER 0x1004 +#define E1000_DEV_ID_82544EI_COPPER 0x1008 +#define E1000_DEV_ID_82544EI_FIBER 0x1009 +#define E1000_DEV_ID_82544GC_COPPER 0x100C +#define E1000_DEV_ID_82544GC_LOM 0x100D +#define E1000_DEV_ID_82540EM 0x100E +#define E1000_DEV_ID_82540EM_LOM 0x1015 +#define E1000_DEV_ID_82540EP_LOM 0x1016 +#define E1000_DEV_ID_82540EP 0x1017 +#define E1000_DEV_ID_82540EP_LP 0x101E +#define E1000_DEV_ID_82545EM_COPPER 0x100F +#define E1000_DEV_ID_82545EM_FIBER 0x1011 +#define E1000_DEV_ID_82545GM_COPPER 0x1026 +#define E1000_DEV_ID_82545GM_FIBER 0x1027 +#define E1000_DEV_ID_82545GM_SERDES 0x1028 +#define E1000_DEV_ID_82546EB_COPPER 0x1010 +#define E1000_DEV_ID_82546EB_FIBER 0x1012 +#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D +#define E1000_DEV_ID_82546GB_COPPER 0x1079 +#define E1000_DEV_ID_82546GB_FIBER 0x107A +#define E1000_DEV_ID_82546GB_SERDES 0x107B +#define E1000_DEV_ID_82546GB_PCIE 0x108A +#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 +#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 +#define E1000_DEV_ID_82541EI 0x1013 +#define E1000_DEV_ID_82541EI_MOBILE 0x1018 +#define E1000_DEV_ID_82541ER_LOM 0x1014 +#define E1000_DEV_ID_82541ER 0x1078 +#define E1000_DEV_ID_82541GI 0x1076 +#define E1000_DEV_ID_82541GI_LF 0x107C +#define E1000_DEV_ID_82541GI_MOBILE 0x1077 +#define E1000_DEV_ID_82547EI 0x1019 +#define E1000_DEV_ID_82547EI_MOBILE 0x101A +#define E1000_DEV_ID_82547GI 0x1075 +#define E1000_DEV_ID_82571EB_COPPER 0x105E +#define E1000_DEV_ID_82571EB_FIBER 0x105F +#define E1000_DEV_ID_82571EB_SERDES 0x1060 +#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 +#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA +#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 +#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 +#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 +#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC +#define E1000_DEV_ID_82572EI_COPPER 0x107D +#define E1000_DEV_ID_82572EI_FIBER 0x107E +#define E1000_DEV_ID_82572EI_SERDES 0x107F +#define E1000_DEV_ID_82572EI 0x10B9 +#define E1000_DEV_ID_82573E 0x108B +#define E1000_DEV_ID_82573E_IAMT 0x108C +#define E1000_DEV_ID_82573L 0x109A +#define E1000_DEV_ID_82574L 0x10D3 +#define E1000_DEV_ID_82574LA 0x10F6 +#define E1000_DEV_ID_82583V 0x150C +#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 +#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 +#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA +#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB +#define E1000_DEV_ID_ICH8_82567V_3 0x1501 +#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 +#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A +#define E1000_DEV_ID_ICH8_IGP_C 0x104B +#define E1000_DEV_ID_ICH8_IFE 0x104C +#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 +#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 +#define E1000_DEV_ID_ICH8_IGP_M 0x104D +#define E1000_DEV_ID_ICH9_IGP_M 0x10BF +#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 +#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB +#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD +#define E1000_DEV_ID_ICH9_BM 0x10E5 +#define E1000_DEV_ID_ICH9_IGP_C 0x294C +#define E1000_DEV_ID_ICH9_IFE 0x10C0 +#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 +#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 +#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC +#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD +#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE +#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE +#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF +#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 + +#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA +#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB +#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF +#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 +#define E1000_DEV_ID_PCH2_LV_LM 0x1502 +#define E1000_DEV_ID_PCH2_LV_V 0x1503 +#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A +#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B +#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A +#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 +#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 +#define E1000_DEV_ID_PCH_I218_V2 0x15A1 +#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 +#define E1000_DEV_ID_PCH_I218_V3 0x15A3 + + +/* + * Tested (supported) on VM emulated HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) + +/* + * Tested (supported) on real HW. + */ + +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_LM) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_V) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_LM) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_V) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM2) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V2) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM3) +RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V3) + +#undef RTE_PCI_DEV_ID_DECL_EM diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 9b5f985..ba4195e 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -284,7 +284,7 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full; static const struct rte_pci_id pci_id_igb_map[] = { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; @@ -295,7 +295,7 @@ static const struct rte_pci_id pci_id_igb_map[] = { static const struct rte_pci_id pci_id_igbvf_map[] = { #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "igb_pci_dev_ids.h" {0}, }; diff --git a/drivers/net/e1000/igb_pci_dev_ids.h b/drivers/net/e1000/igb_pci_dev_ids.h new file mode 100644 index 0000000..958df0e --- /dev/null +++ b/drivers/net/e1000/igb_pci_dev_ids.h @@ -0,0 +1,165 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IGB +#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IGBVF +#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/******************** Physical IGB devices from e1000_hw.h ********************/ + +#define E1000_DEV_ID_82576 0x10C9 +#define E1000_DEV_ID_82576_FIBER 0x10E6 +#define E1000_DEV_ID_82576_SERDES 0x10E7 +#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 +#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 +#define E1000_DEV_ID_82576_NS 0x150A +#define E1000_DEV_ID_82576_NS_SERDES 0x1518 +#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D +#define E1000_DEV_ID_82575EB_COPPER 0x10A7 +#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 +#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 +#define E1000_DEV_ID_82580_COPPER 0x150E +#define E1000_DEV_ID_82580_FIBER 0x150F +#define E1000_DEV_ID_82580_SERDES 0x1510 +#define E1000_DEV_ID_82580_SGMII 0x1511 +#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 +#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 +#define E1000_DEV_ID_I350_COPPER 0x1521 +#define E1000_DEV_ID_I350_FIBER 0x1522 +#define E1000_DEV_ID_I350_SERDES 0x1523 +#define E1000_DEV_ID_I350_SGMII 0x1524 +#define E1000_DEV_ID_I350_DA4 0x1546 +#define E1000_DEV_ID_I210_COPPER 0x1533 +#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 +#define E1000_DEV_ID_I210_COPPER_IT 0x1535 +#define E1000_DEV_ID_I210_FIBER 0x1536 +#define E1000_DEV_ID_I210_SERDES 0x1537 +#define E1000_DEV_ID_I210_SGMII 0x1538 +#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B +#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C +#define E1000_DEV_ID_I211_COPPER 0x1539 +#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 +#define E1000_DEV_ID_I354_SGMII 0x1F41 +#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 +#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 +#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A +#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C +#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) + +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, + E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) + +/****************** Virtual IGB devices from e1000_hw.h ******************/ + +#define E1000_DEV_ID_82576_VF 0x10CA +#define E1000_DEV_ID_82576_VF_HV 0x152D +#define E1000_DEV_ID_I350_VF 0x1520 +#define E1000_DEV_ID_I350_VF_HV 0x152F + +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) +RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) + +#undef RTE_PCI_DEV_ID_DECL_IGB +#undef RTE_PCI_DEV_ID_DECL_IGBVF 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 cf7b548..9e2dc00 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,9 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_EM - * RTE_PCI_DEV_ID_DECL_IGB - * RTE_PCI_DEV_ID_DECL_IGBVF * RTE_PCI_DEV_ID_DECL_IXGBE * RTE_PCI_DEV_ID_DECL_IXGBEVF * RTE_PCI_DEV_ID_DECL_I40E @@ -96,18 +93,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_EM -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGB -#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IGBVF -#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_IXGBE #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) #endif @@ -177,230 +162,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/******************** Physical EM devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82542 0x1000 -#define E1000_DEV_ID_82543GC_FIBER 0x1001 -#define E1000_DEV_ID_82543GC_COPPER 0x1004 -#define E1000_DEV_ID_82544EI_COPPER 0x1008 -#define E1000_DEV_ID_82544EI_FIBER 0x1009 -#define E1000_DEV_ID_82544GC_COPPER 0x100C -#define E1000_DEV_ID_82544GC_LOM 0x100D -#define E1000_DEV_ID_82540EM 0x100E -#define E1000_DEV_ID_82540EM_LOM 0x1015 -#define E1000_DEV_ID_82540EP_LOM 0x1016 -#define E1000_DEV_ID_82540EP 0x1017 -#define E1000_DEV_ID_82540EP_LP 0x101E -#define E1000_DEV_ID_82545EM_COPPER 0x100F -#define E1000_DEV_ID_82545EM_FIBER 0x1011 -#define E1000_DEV_ID_82545GM_COPPER 0x1026 -#define E1000_DEV_ID_82545GM_FIBER 0x1027 -#define E1000_DEV_ID_82545GM_SERDES 0x1028 -#define E1000_DEV_ID_82546EB_COPPER 0x1010 -#define E1000_DEV_ID_82546EB_FIBER 0x1012 -#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D -#define E1000_DEV_ID_82546GB_COPPER 0x1079 -#define E1000_DEV_ID_82546GB_FIBER 0x107A -#define E1000_DEV_ID_82546GB_SERDES 0x107B -#define E1000_DEV_ID_82546GB_PCIE 0x108A -#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 -#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 -#define E1000_DEV_ID_82541EI 0x1013 -#define E1000_DEV_ID_82541EI_MOBILE 0x1018 -#define E1000_DEV_ID_82541ER_LOM 0x1014 -#define E1000_DEV_ID_82541ER 0x1078 -#define E1000_DEV_ID_82541GI 0x1076 -#define E1000_DEV_ID_82541GI_LF 0x107C -#define E1000_DEV_ID_82541GI_MOBILE 0x1077 -#define E1000_DEV_ID_82547EI 0x1019 -#define E1000_DEV_ID_82547EI_MOBILE 0x101A -#define E1000_DEV_ID_82547GI 0x1075 -#define E1000_DEV_ID_82571EB_COPPER 0x105E -#define E1000_DEV_ID_82571EB_FIBER 0x105F -#define E1000_DEV_ID_82571EB_SERDES 0x1060 -#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 -#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA -#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 -#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 -#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 -#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC -#define E1000_DEV_ID_82572EI_COPPER 0x107D -#define E1000_DEV_ID_82572EI_FIBER 0x107E -#define E1000_DEV_ID_82572EI_SERDES 0x107F -#define E1000_DEV_ID_82572EI 0x10B9 -#define E1000_DEV_ID_82573E 0x108B -#define E1000_DEV_ID_82573E_IAMT 0x108C -#define E1000_DEV_ID_82573L 0x109A -#define E1000_DEV_ID_82574L 0x10D3 -#define E1000_DEV_ID_82574LA 0x10F6 -#define E1000_DEV_ID_82583V 0x150C -#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 -#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 -#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA -#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB -#define E1000_DEV_ID_ICH8_82567V_3 0x1501 -#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 -#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A -#define E1000_DEV_ID_ICH8_IGP_C 0x104B -#define E1000_DEV_ID_ICH8_IFE 0x104C -#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 -#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 -#define E1000_DEV_ID_ICH8_IGP_M 0x104D -#define E1000_DEV_ID_ICH9_IGP_M 0x10BF -#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 -#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB -#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD -#define E1000_DEV_ID_ICH9_BM 0x10E5 -#define E1000_DEV_ID_ICH9_IGP_C 0x294C -#define E1000_DEV_ID_ICH9_IFE 0x10C0 -#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 -#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 -#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC -#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD -#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE -#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE -#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF -#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 - -#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA -#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB -#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF -#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 -#define E1000_DEV_ID_PCH2_LV_LM 0x1502 -#define E1000_DEV_ID_PCH2_LV_V 0x1503 -#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A -#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B -#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A -#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 -#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 -#define E1000_DEV_ID_PCH_I218_V2 0x15A1 -#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 -#define E1000_DEV_ID_PCH_I218_V3 0x15A3 - - -/* - * Tested (supported) on VM emulated HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) - -/* - * Tested (supported) on real HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_LM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_LM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM2) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V2) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM3) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V3) - - -/******************** Physical IGB devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82576 0x10C9 -#define E1000_DEV_ID_82576_FIBER 0x10E6 -#define E1000_DEV_ID_82576_SERDES 0x10E7 -#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 -#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 -#define E1000_DEV_ID_82576_NS 0x150A -#define E1000_DEV_ID_82576_NS_SERDES 0x1518 -#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D -#define E1000_DEV_ID_82575EB_COPPER 0x10A7 -#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 -#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 -#define E1000_DEV_ID_82580_COPPER 0x150E -#define E1000_DEV_ID_82580_FIBER 0x150F -#define E1000_DEV_ID_82580_SERDES 0x1510 -#define E1000_DEV_ID_82580_SGMII 0x1511 -#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 -#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 -#define E1000_DEV_ID_I350_COPPER 0x1521 -#define E1000_DEV_ID_I350_FIBER 0x1522 -#define E1000_DEV_ID_I350_SERDES 0x1523 -#define E1000_DEV_ID_I350_SGMII 0x1524 -#define E1000_DEV_ID_I350_DA4 0x1546 -#define E1000_DEV_ID_I210_COPPER 0x1533 -#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 -#define E1000_DEV_ID_I210_COPPER_IT 0x1535 -#define E1000_DEV_ID_I210_FIBER 0x1536 -#define E1000_DEV_ID_I210_SERDES 0x1537 -#define E1000_DEV_ID_I210_SGMII 0x1538 -#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B -#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C -#define E1000_DEV_ID_I211_COPPER 0x1539 -#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 -#define E1000_DEV_ID_I354_SGMII 0x1F41 -#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 -#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 -#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A -#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C -#define E1000_DEV_ID_DH89XXCC_SFP 0x0440 - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER) - -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP) - /****************** Physical IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82598 0x10B6 @@ -565,18 +326,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IGB devices from e1000_hw.h ******************/ - -#define E1000_DEV_ID_82576_VF 0x10CA -#define E1000_DEV_ID_82576_VF_HV 0x152D -#define E1000_DEV_ID_I350_VF 0x1520 -#define E1000_DEV_ID_I350_VF_HV 0x152F - -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF) -RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV) - /****************** Virtual IXGBE devices from ixgbe_type.h ******************/ #define IXGBE_DEV_ID_82599_VF 0x10ED @@ -691,9 +440,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_EM -#undef RTE_PCI_DEV_ID_DECL_IGB -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index ac99d3f..6ac7637 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -43,6 +43,7 @@ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index ae8133f..5342c53 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -352,7 +352,7 @@ kni_dev_remove(struct kni_dev *dev) switch (dev->device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): @@ -509,7 +509,7 @@ kni_ioctl_create(struct net *net, found_pci = pci; switch (dev_info.device_id) { #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <igb_pci_dev_ids.h> ret = igb_kni_probe(found_pci, &lad_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand @ 2016-04-20 13:29 ` Neil Horman 2016-04-20 13:39 ` David Marchand 2016-07-08 13:31 ` Thomas Monjalon 1 sibling, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-04-20 13:29 UTC (permalink / raw) To: David Marchand Cc: dev, thomas.monjalon, stephen, bruce.richardson, pmatilai, christian.ehrhardt, Wenzhuo Lu On Wed, Apr 20, 2016 at 02:43:44PM +0200, David Marchand wrote: > test application and kni still want to know e1000 pci devices. > So let's create headers in the driver that will be used by them. > > I wanted to reuse base/ headers, but because of some headaches trying to resolve > macros redefinition collisions in kni (with ixgbe next commit), I left it as is. > > Signed-off-by: David Marchand <david.marchand@6wind.com> > --- > app/test/Makefile | 3 + > app/test/test_pci.c | 3 +- > drivers/net/e1000/em_ethdev.c | 2 +- > drivers/net/e1000/em_pci_dev_ids.h | 208 +++++++++++++++++++ > drivers/net/e1000/igb_ethdev.c | 4 +- > drivers/net/e1000/igb_pci_dev_ids.h | 165 +++++++++++++++ > lib/librte_eal/common/include/rte_pci_dev_ids.h | 254 ------------------------ > lib/librte_eal/linuxapp/kni/Makefile | 1 + > lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- > 9 files changed, 384 insertions(+), 260 deletions(-) > create mode 100644 drivers/net/e1000/em_pci_dev_ids.h > create mode 100644 drivers/net/e1000/igb_pci_dev_ids.h > > diff --git a/app/test/Makefile b/app/test/Makefile > index a4907d5..8a1f54c 100644 > --- a/app/test/Makefile > +++ b/app/test/Makefile > @@ -171,6 +171,9 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments > endif > endif > > +# pci tests want to know some pci devices ids > +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 > + > # this application needs libraries first > DEPDIRS-y += lib drivers > > diff --git a/app/test/test_pci.c b/app/test/test_pci.c > index 0ed357e..7215936 100644 > --- a/app/test/test_pci.c > +++ b/app/test/test_pci.c > @@ -77,8 +77,9 @@ struct rte_pci_id my_driver_id2[] = { > > /* IGB & EM NICS */ > #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, > +#include <em_pci_dev_ids.h> > #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, > -#include <rte_pci_dev_ids.h> > +#include <igb_pci_dev_ids.h> > > { .vendor_id = 0, /* sentinel */ }, > }; > diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c > index 1f80c05..203a9e5 100644 > --- a/drivers/net/e1000/em_ethdev.c > +++ b/drivers/net/e1000/em_ethdev.c > @@ -139,7 +139,7 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; > static const struct rte_pci_id pci_id_em_map[] = { > > #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, > -#include "rte_pci_dev_ids.h" > +#include "em_pci_dev_ids.h" > > {0}, > }; > diff --git a/drivers/net/e1000/em_pci_dev_ids.h b/drivers/net/e1000/em_pci_dev_ids.h > new file mode 100644 > index 0000000..736a68e > --- /dev/null > +++ b/drivers/net/e1000/em_pci_dev_ids.h > @@ -0,0 +1,208 @@ > +/*- > + * This file is provided under a dual BSD/GPLv2 license. When using or > + * redistributing this file, you may do so under either license. > + * > + * GPL LICENSE SUMMARY > + * > + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of version 2 of the GNU General Public License as > + * published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but > + * WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * General Public License for more details. > + * > + * The full GNU General Public License is included in this distribution > + * in the file called LICENSE.GPL. > + * > + * Contact Information: > + * Intel Corporation > + * > + * BSD LICENSE > + * > + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Intel Corporation nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + * > + */ > + > +#ifndef RTE_PCI_DEV_ID_DECL_EM > +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) > +#endif > + > +#ifndef PCI_VENDOR_ID_INTEL > +/** Vendor ID used by Intel devices */ > +#define PCI_VENDOR_ID_INTEL 0x8086 > +#endif > + This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for all pci drivers, not redefined in every compilation unit. And you can likely just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. ><snip> > + > +#undef RTE_PCI_DEV_ID_DECL_EM Why are you undefining this here? Is it because its in a header file and you're concerned about multiple inclusion? You should use an ifdef guard instead, or just define all the device id's in the header and ennumerate the pci table in one of the C files for the driver. That should apply to all the patches in this series I think Neil ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 13:29 ` Neil Horman @ 2016-04-20 13:39 ` David Marchand 2016-04-20 18:15 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-04-20 13:39 UTC (permalink / raw) To: Neil Horman Cc: dev, Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, christian.ehrhardt, Wenzhuo Lu On Wed, Apr 20, 2016 at 3:29 PM, Neil Horman <nhorman@tuxdriver.com> wrote: >> +#ifndef RTE_PCI_DEV_ID_DECL_EM >> +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) >> +#endif >> + >> +#ifndef PCI_VENDOR_ID_INTEL >> +/** Vendor ID used by Intel devices */ >> +#define PCI_VENDOR_ID_INTEL 0x8086 >> +#endif >> + > This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for > all pci drivers, not redefined in every compilation unit. And you can likely Well we can keep the vendors in a common header, but I don't see the benefit. > just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the > RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. app/test/test_pci.c:#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, lib/librte_eal/linuxapp/kni/kni_misc.c: #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): All this stuff is because of pci tests and kni code. >><snip> > >> + >> +#undef RTE_PCI_DEV_ID_DECL_EM > Why are you undefining this here? Is it because its in a header file and you're > concerned about multiple inclusion? You should use an ifdef guard instead, or > just define all the device id's in the header and ennumerate the pci table in > one of the C files for the driver. That should apply to all the patches in this > series I think Just moved the code. -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 13:39 ` David Marchand @ 2016-04-20 18:15 ` Neil Horman 2016-04-21 7:27 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-04-20 18:15 UTC (permalink / raw) To: David Marchand Cc: dev, Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, christian.ehrhardt, Wenzhuo Lu On Wed, Apr 20, 2016 at 03:39:59PM +0200, David Marchand wrote: > On Wed, Apr 20, 2016 at 3:29 PM, Neil Horman <nhorman@tuxdriver.com> wrote: > >> +#ifndef RTE_PCI_DEV_ID_DECL_EM > >> +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) > >> +#endif > >> + > >> +#ifndef PCI_VENDOR_ID_INTEL > >> +/** Vendor ID used by Intel devices */ > >> +#define PCI_VENDOR_ID_INTEL 0x8086 > >> +#endif > >> + > > This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for > > all pci drivers, not redefined in every compilation unit. And you can likely > > Well we can keep the vendors in a common header, but I don't see the benefit. > ? The fact that you won't have to do this #ifndef PCI_VENDOR_ID_INTEL #define PCI_VENDOR_ID_INTEL ... #endif in every pmd > > just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the > > RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. > > app/test/test_pci.c:#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) > {RTE_PCI_DEVICE(vend, dev)}, > lib/librte_eal/linuxapp/kni/kni_misc.c: #define > RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): > > All this stuff is because of pci tests and kni code. > You're going to have to explain a bit further than that. Why does the kni code and pci testing code require that each driver have their own macro that just maps to the same macro underneath? Looking at the test_pci code, it appears its done because we used to contain all our pci device ids in a single file, and the device specific macros were used to selectively enable devices that were there for testing. But the point of this series is in part to separate out the device ids to their own locations, so it seems like you will have to fix up the pci tests anyway (and additionally it would be nice to include more than just EM, IGB, and IXGBE in thsoe tests anyway, though I understand thats outside the scope of this series) > >><snip> > > > >> + > >> +#undef RTE_PCI_DEV_ID_DECL_EM > > Why are you undefining this here? Is it because its in a header file and you're > > concerned about multiple inclusion? You should use an ifdef guard instead, or > > just define all the device id's in the header and ennumerate the pci table in > > one of the C files for the driver. That should apply to all the patches in this > > series I think > > Just moved the code. > Ok, do you plan on cleaning that up? Neil > > -- > David Marchand > ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 18:15 ` Neil Horman @ 2016-04-21 7:27 ` David Marchand 2016-04-21 12:08 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-04-21 7:27 UTC (permalink / raw) To: Neil Horman Cc: dev, Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Zhang, Helin On Wed, Apr 20, 2016 at 8:15 PM, Neil Horman <nhorman@tuxdriver.com> wrote: > On Wed, Apr 20, 2016 at 03:39:59PM +0200, David Marchand wrote: >> On Wed, Apr 20, 2016 at 3:29 PM, Neil Horman <nhorman@tuxdriver.com> wrote: >> >> +#ifndef RTE_PCI_DEV_ID_DECL_EM >> >> +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) >> >> +#endif >> >> + >> >> +#ifndef PCI_VENDOR_ID_INTEL >> >> +/** Vendor ID used by Intel devices */ >> >> +#define PCI_VENDOR_ID_INTEL 0x8086 >> >> +#endif >> >> + >> > This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for >> > all pci drivers, not redefined in every compilation unit. And you can likely >> >> Well we can keep the vendors in a common header, but I don't see the benefit. >> > ? > The fact that you won't have to do this > #ifndef PCI_VENDOR_ID_INTEL > #define PCI_VENDOR_ID_INTEL ... > #endif > in every pmd Ok, so you would keep the rte_pci_dev_ids.h with just the vendors in it ? Or, we could rely on linux kernel headers (pci_ids.h), rather than maintain a header in dpdk. But this would add a dependency build on dpdk and I am not sure there is something equivalent on freebsd (afaics all drivers seem to duplicate the pci vendor id). Any freebsd gourou reading this ? >> > just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the >> > RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. >> >> app/test/test_pci.c:#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) >> {RTE_PCI_DEVICE(vend, dev)}, >> lib/librte_eal/linuxapp/kni/kni_misc.c: #define >> RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): >> >> All this stuff is because of pci tests and kni code. >> > You're going to have to explain a bit further than that. Why does the kni code > and pci testing code require that each driver have their own macro that just > maps to the same macro underneath? Looking at the test_pci code, it appears its > done because we used to contain all our pci device ids in a single file, and the > device specific macros were used to selectively enable devices that were there > for testing. But the point of this series is in part to separate out the device > ids to their own locations, so it seems like you will have to fix up the pci > tests anyway (and additionally it would be nice to include more than just EM, > IGB, and IXGBE in thsoe tests anyway, though I understand thats outside the > scope of this series) - test_pci.c should be about testing pci infrastructure. Relying on igb / ixgbe (or whatever pci device if we extend the list to all pci ids) being present on the system to run successfully is flawed but I have no better idea. - kni implements specific ethtool stuff based on pci ids. kni contains duplicated code from the kernel and it uses those ids to drive to the right ops. The solutions I have imagined so far : * use a shared header for the devices that it supports * drop the use of pci ids between kni library and kni kernel driver, instead use the pmd name that would be resolved internally by the kni library at RTE_KNI_IOCTL_CREATE time, and use this in the kni kernel driver * drop kni :-) I don't mind doing trivial changes, but I don't have time for more on this series. -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-21 7:27 ` David Marchand @ 2016-04-21 12:08 ` Neil Horman 2016-04-21 12:41 ` Thomas Monjalon 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-04-21 12:08 UTC (permalink / raw) To: David Marchand Cc: dev, Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Zhang, Helin On Thu, Apr 21, 2016 at 09:27:18AM +0200, David Marchand wrote: > On Wed, Apr 20, 2016 at 8:15 PM, Neil Horman <nhorman@tuxdriver.com> wrote: > > On Wed, Apr 20, 2016 at 03:39:59PM +0200, David Marchand wrote: > >> On Wed, Apr 20, 2016 at 3:29 PM, Neil Horman <nhorman@tuxdriver.com> wrote: > >> >> +#ifndef RTE_PCI_DEV_ID_DECL_EM > >> >> +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) > >> >> +#endif > >> >> + > >> >> +#ifndef PCI_VENDOR_ID_INTEL > >> >> +/** Vendor ID used by Intel devices */ > >> >> +#define PCI_VENDOR_ID_INTEL 0x8086 > >> >> +#endif > >> >> + > >> > This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for > >> > all pci drivers, not redefined in every compilation unit. And you can likely > >> > >> Well we can keep the vendors in a common header, but I don't see the benefit. > >> > > ? > > The fact that you won't have to do this > > #ifndef PCI_VENDOR_ID_INTEL > > #define PCI_VENDOR_ID_INTEL ... > > #endif > > in every pmd > > Ok, so you would keep the rte_pci_dev_ids.h with just the vendors in it ? > Thats an option, yes, I'd rename it rte_pci_vendor_ids.h perhaps, but you get the idea. > Or, we could rely on linux kernel headers (pci_ids.h), rather than > maintain a header in dpdk. Thats also a good idea. > But this would add a dependency build on dpdk and I am not sure there > is something equivalent on freebsd (afaics all drivers seem to > duplicate the pci vendor id). > Any freebsd gourou reading this ? > If the dependency is unpalitable, I suppose its fine to duplicate the header file. My more direct point was really more just that you didn't need to duplicate the vendor id macro multiple times within the dpdk project. You can still define the device ids internally to each pmd if you don't need it in other locations, and the duplication against other projects there is ok by me. > > >> > just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the > >> > RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. > >> > >> app/test/test_pci.c:#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) > >> {RTE_PCI_DEVICE(vend, dev)}, > >> lib/librte_eal/linuxapp/kni/kni_misc.c: #define > >> RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): > >> > >> All this stuff is because of pci tests and kni code. > >> > > You're going to have to explain a bit further than that. Why does the kni code > > and pci testing code require that each driver have their own macro that just > > maps to the same macro underneath? Looking at the test_pci code, it appears its > > done because we used to contain all our pci device ids in a single file, and the > > device specific macros were used to selectively enable devices that were there > > for testing. But the point of this series is in part to separate out the device > > ids to their own locations, so it seems like you will have to fix up the pci > > tests anyway (and additionally it would be nice to include more than just EM, > > IGB, and IXGBE in thsoe tests anyway, though I understand thats outside the > > scope of this series) > > - test_pci.c should be about testing pci infrastructure. > Relying on igb / ixgbe (or whatever pci device if we extend the list > to all pci ids) being present on the system to run successfully is > flawed but I have no better idea. > Ok, so if I'm reading you correctly, you're indicating that test_pci is just there to test the pci common infrastructure code, and happens to use a few well known and supported pci id's (igb and ixgbe) to do that. i.e. theres no need for exhaustive pci device enumeration there, right? If thats the case then you can just create a data structure with the RTE_PCI_DEV macro and stop aliasing it to all the device specific DECL macros, no? My main concern here is really just the needless aliasing of those macros. > > - kni implements specific ethtool stuff based on pci ids. > kni contains duplicated code from the kernel and it uses those ids to > drive to the right ops. > Ok, but how does that relate to the use of device specific PCI ennumeration values? Looking at the KNI code I see no reason that they are required any longer (or previously were), and if you're going to move them around you may as well clean up the usage at the same time. > The solutions I have imagined so far : > * use a shared header for the devices that it supports > * drop the use of pci ids between kni library and kni kernel driver, > instead use the pmd name that would be resolved internally by the kni > library at RTE_KNI_IOCTL_CREATE time, and use this in the kni kernel > driver > * drop kni :-) > These all sound good :) > I don't mind doing trivial changes, but I don't have time for more on > this series. > Um, I'm not sure what to say here. The whole point of review is to help improve the code. If you don't have time to do anything non-trivial, Why are we reviewing it? Neil > > -- > David Marchand > ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-21 12:08 ` Neil Horman @ 2016-04-21 12:41 ` Thomas Monjalon 2016-04-22 12:13 ` Neil Horman 0 siblings, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-04-21 12:41 UTC (permalink / raw) To: Neil Horman Cc: dev, David Marchand, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Zhang, Helin 2016-04-21 08:08, Neil Horman: > On Thu, Apr 21, 2016 at 09:27:18AM +0200, David Marchand wrote: > > I don't mind doing trivial changes, but I don't have time for more on > > this series. > > > Um, I'm not sure what to say here. The whole point of review is to help improve > the code. If you don't have time to do anything non-trivial, Why are we > reviewing it? Neil, thanks for reviewing. If David has no time to improve this series, maybe someone else can take over. I don't see any problem to have several authors on the same series. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-21 12:41 ` Thomas Monjalon @ 2016-04-22 12:13 ` Neil Horman 2016-04-22 13:22 ` Thomas Monjalon 0 siblings, 1 reply; 92+ messages in thread From: Neil Horman @ 2016-04-22 12:13 UTC (permalink / raw) To: Thomas Monjalon Cc: dev, David Marchand, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Zhang, Helin On Thu, Apr 21, 2016 at 02:41:38PM +0200, Thomas Monjalon wrote: > 2016-04-21 08:08, Neil Horman: > > On Thu, Apr 21, 2016 at 09:27:18AM +0200, David Marchand wrote: > > > I don't mind doing trivial changes, but I don't have time for more on > > > this series. > > > > > Um, I'm not sure what to say here. The whole point of review is to help improve > > the code. If you don't have time to do anything non-trivial, Why are we > > reviewing it? > > Neil, thanks for reviewing. > If David has no time to improve this series, maybe someone else can take over. > I don't see any problem to have several authors on the same series. > Fair point, and yes, I've not done anything toward this goal at all, so I admit some work is better than none. We just can't allow lack of time to be a reason to do something halfway. ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-22 12:13 ` Neil Horman @ 2016-04-22 13:22 ` Thomas Monjalon 0 siblings, 0 replies; 92+ messages in thread From: Thomas Monjalon @ 2016-04-22 13:22 UTC (permalink / raw) To: Neil Horman Cc: dev, David Marchand, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Zhang, Helin 2016-04-22 08:13, Neil Horman: > On Thu, Apr 21, 2016 at 02:41:38PM +0200, Thomas Monjalon wrote: > > 2016-04-21 08:08, Neil Horman: > > > On Thu, Apr 21, 2016 at 09:27:18AM +0200, David Marchand wrote: > > > > I don't mind doing trivial changes, but I don't have time for more on > > > > this series. > > > > > > > Um, I'm not sure what to say here. The whole point of review is to help improve > > > the code. If you don't have time to do anything non-trivial, Why are we > > > reviewing it? > > > > Neil, thanks for reviewing. > > If David has no time to improve this series, maybe someone else can take over. > > I don't see any problem to have several authors on the same series. > > Fair point, and yes, I've not done anything toward this goal at all, so I > admit some work is better than none. We just can't allow lack of time to be a > reason to do something halfway. Yes we can have steps in patchwork. But no, it won't be merged until it is complete. Volunteers are welcome to follow-up on this series. Thanks ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand 2016-04-20 13:29 ` Neil Horman @ 2016-07-08 13:31 ` Thomas Monjalon 2016-07-11 5:33 ` Yuanhan Liu 1 sibling, 1 reply; 92+ messages in thread From: Thomas Monjalon @ 2016-07-08 13:31 UTC (permalink / raw) To: dev Cc: David Marchand, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Wenzhuo Lu, bruce.richardson, ferruh.yigit, Rasesh Mody, johndale, Yuanhan Liu, Yong Wang 2016-04-20 14:43, David Marchand: > test application and kni still want to know e1000 pci devices. > So let's create headers in the driver that will be used by them. There is also an usage of ixgbe ID for the broken bypass API. Sharing those PCI ids outside of the drivers was really a wrong idea. So this a plan to get rid of them: 1/ remove need in PCI autotest (done: http://dpdk.org/commit/1dbba165) 2/ move PCI ids in bnx2x, bnxt, e1000, enic, fm10k, i40e, virtio, vmxnet3 3/ remove KNI ethtool (only igb/ixgbe support) 4/ remove bypass API or move it to ixgbe specific API 5/ move remaining PCI ids in igb and ixgbe drivers Please driver maintainers, move your PCI ids in your drivers as soon as possible. Thanks ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-07-08 13:31 ` Thomas Monjalon @ 2016-07-11 5:33 ` Yuanhan Liu 2016-07-11 5:56 ` Thomas Monjalon 0 siblings, 1 reply; 92+ messages in thread From: Yuanhan Liu @ 2016-07-11 5:33 UTC (permalink / raw) To: Thomas Monjalon Cc: dev, David Marchand, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Wenzhuo Lu, ferruh.yigit, Rasesh Mody, johndale, Yong Wang On Fri, Jul 08, 2016 at 03:31:27PM +0200, Thomas Monjalon wrote: > 2016-04-20 14:43, David Marchand: > > test application and kni still want to know e1000 pci devices. > > So let's create headers in the driver that will be used by them. > > There is also an usage of ixgbe ID for the broken bypass API. > > Sharing those PCI ids outside of the drivers was really a wrong idea. > So this a plan to get rid of them: > > 1/ remove need in PCI autotest (done: http://dpdk.org/commit/1dbba165) > 2/ move PCI ids in bnx2x, bnxt, e1000, enic, fm10k, i40e, virtio, vmxnet3 > 3/ remove KNI ethtool (only igb/ixgbe support) > 4/ remove bypass API or move it to ixgbe specific API > 5/ move remaining PCI ids in igb and ixgbe drivers > > Please driver maintainers, move your PCI ids in your drivers as soon as > possible. Thanks Hi Thomas, I'm not quite sure I understood it well: are you asking us to resend what David has already send, say me for resending the virtio part? If so, what's the point of that? What's worse, it's likely to fail apply (due to conflicts), as every one of us make a patch based on the same base while touching some same files. --yliu ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-07-11 5:33 ` Yuanhan Liu @ 2016-07-11 5:56 ` Thomas Monjalon 2016-07-11 6:05 ` Yuanhan Liu 2016-07-11 11:35 ` David Marchand 0 siblings, 2 replies; 92+ messages in thread From: Thomas Monjalon @ 2016-07-11 5:56 UTC (permalink / raw) To: Yuanhan Liu Cc: dev, David Marchand, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Wenzhuo Lu, ferruh.yigit, Rasesh Mody, johndale, Yong Wang 2016-07-11 13:33, Yuanhan Liu: > On Fri, Jul 08, 2016 at 03:31:27PM +0200, Thomas Monjalon wrote: > > 2016-04-20 14:43, David Marchand: > > > test application and kni still want to know e1000 pci devices. > > > So let's create headers in the driver that will be used by them. > > > > There is also an usage of ixgbe ID for the broken bypass API. > > > > Sharing those PCI ids outside of the drivers was really a wrong idea. > > So this a plan to get rid of them: > > > > 1/ remove need in PCI autotest (done: http://dpdk.org/commit/1dbba165) > > 2/ move PCI ids in bnx2x, bnxt, e1000, enic, fm10k, i40e, virtio, vmxnet3 > > 3/ remove KNI ethtool (only igb/ixgbe support) > > 4/ remove bypass API or move it to ixgbe specific API > > 5/ move remaining PCI ids in igb and ixgbe drivers > > > > Please driver maintainers, move your PCI ids in your drivers as soon as > > possible. Thanks > > Hi Thomas, > > I'm not quite sure I understood it well: are you asking us to resend > what David has already send, say me for resending the virtio part? > > If so, what's the point of that? What's worse, it's likely to fail > apply (due to conflicts), as every one of us make a patch based on > the same base while touching some same files. Good point. There were some changes since the patches from David (and a new bnxt). That's why I was thinking to ask maintainers to take care of this change. But maybe it's better to do the change in one patchset. David, ok to refresh these patches? ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-07-11 5:56 ` Thomas Monjalon @ 2016-07-11 6:05 ` Yuanhan Liu 2016-07-11 11:35 ` David Marchand 1 sibling, 0 replies; 92+ messages in thread From: Yuanhan Liu @ 2016-07-11 6:05 UTC (permalink / raw) To: Thomas Monjalon Cc: dev, David Marchand, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Wenzhuo Lu, ferruh.yigit, Rasesh Mody, johndale, Yong Wang On Mon, Jul 11, 2016 at 07:56:16AM +0200, Thomas Monjalon wrote: > 2016-07-11 13:33, Yuanhan Liu: > > On Fri, Jul 08, 2016 at 03:31:27PM +0200, Thomas Monjalon wrote: > > > 2016-04-20 14:43, David Marchand: > > > > test application and kni still want to know e1000 pci devices. > > > > So let's create headers in the driver that will be used by them. > > > > > > There is also an usage of ixgbe ID for the broken bypass API. > > > > > > Sharing those PCI ids outside of the drivers was really a wrong idea. > > > So this a plan to get rid of them: > > > > > > 1/ remove need in PCI autotest (done: http://dpdk.org/commit/1dbba165) > > > 2/ move PCI ids in bnx2x, bnxt, e1000, enic, fm10k, i40e, virtio, vmxnet3 > > > 3/ remove KNI ethtool (only igb/ixgbe support) > > > 4/ remove bypass API or move it to ixgbe specific API > > > 5/ move remaining PCI ids in igb and ixgbe drivers > > > > > > Please driver maintainers, move your PCI ids in your drivers as soon as > > > possible. Thanks > > > > Hi Thomas, > > > > I'm not quite sure I understood it well: are you asking us to resend > > what David has already send, say me for resending the virtio part? > > > > If so, what's the point of that? What's worse, it's likely to fail > > apply (due to conflicts), as every one of us make a patch based on > > the same base while touching some same files. > > Good point. > There were some changes since the patches from David (and a new bnxt). > That's why I was thinking to ask maintainers to take care of this change. > But maybe it's better to do the change in one patchset. Yes, I'd think so. --yliu > David, ok to refresh these patches? ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-07-11 5:56 ` Thomas Monjalon 2016-07-11 6:05 ` Yuanhan Liu @ 2016-07-11 11:35 ` David Marchand 2016-07-11 12:05 ` Yuanhan Liu 1 sibling, 1 reply; 92+ messages in thread From: David Marchand @ 2016-07-11 11:35 UTC (permalink / raw) To: Thomas Monjalon Cc: Yuanhan Liu, dev, Stephen Hemminger, Richardson, Bruce, Neil Horman, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Ferruh Yigit, Rasesh Mody, johndale, Yong Wang Hello all, On Mon, Jul 11, 2016 at 7:56 AM, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > 2016-07-11 13:33, Yuanhan Liu: >> I'm not quite sure I understood it well: are you asking us to resend >> what David has already send, say me for resending the virtio part? >> >> If so, what's the point of that? What's worse, it's likely to fail >> apply (due to conflicts), as every one of us make a patch based on >> the same base while touching some same files. > > Good point. > There were some changes since the patches from David (and a new bnxt). > That's why I was thinking to ask maintainers to take care of this change. > But maybe it's better to do the change in one patchset. > David, ok to refresh these patches? Now that we have a modinfo-like infra and the test code is exempt from igb pci ids, all that remains (to fully get rid of this header) are bypass api and kni/ethtool. So the deal with Thomas is that I refresh those patches letting igb and ixgbe pmd as is. Will send this later. -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 2016-07-11 11:35 ` David Marchand @ 2016-07-11 12:05 ` Yuanhan Liu 0 siblings, 0 replies; 92+ messages in thread From: Yuanhan Liu @ 2016-07-11 12:05 UTC (permalink / raw) To: David Marchand Cc: Thomas Monjalon, dev, Stephen Hemminger, Richardson, Bruce, Neil Horman, Panu Matilainen, Christian Ehrhardt, Wenzhuo Lu, Ferruh Yigit, Rasesh Mody, johndale, Yong Wang On Mon, Jul 11, 2016 at 01:35:46PM +0200, David Marchand wrote: > Hello all, > > On Mon, Jul 11, 2016 at 7:56 AM, Thomas Monjalon > <thomas.monjalon@6wind.com> wrote: > > 2016-07-11 13:33, Yuanhan Liu: > >> I'm not quite sure I understood it well: are you asking us to resend > >> what David has already send, say me for resending the virtio part? > >> > >> If so, what's the point of that? What's worse, it's likely to fail > >> apply (due to conflicts), as every one of us make a patch based on > >> the same base while touching some same files. > > > > Good point. > > There were some changes since the patches from David (and a new bnxt). > > That's why I was thinking to ask maintainers to take care of this change. > > But maybe it's better to do the change in one patchset. > > David, ok to refresh these patches? > > Now that we have a modinfo-like infra and the test code is exempt from > igb pci ids, all that remains (to fully get rid of this header) are > bypass api and kni/ethtool. > So the deal with Thomas is that I refresh those patches letting igb > and ixgbe pmd as is. > > Will send this later. Thanks, and feel free to put my ack for the virtio part. Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Great work, BTW! --yliu ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 02/13] ixgbe: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-29 1:34 ` Wu, Jingjing 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 03/13] i40e: " David Marchand ` (12 subsequent siblings) 14 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Helin Zhang, Konstantin Ananyev test application and kni still want to know ixgbe pci devices. So let's create a header in the driver that will be used by them. Same comment as for e1000 driver, we can't reuse base/ headers at the moment because of macros redefinitions nightmare. Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/test-pmd/Makefile | 2 + app/test-pmd/cmdline.c | 2 +- app/test/Makefile | 1 + app/test/test_pci.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 213 ++++++++++++++++++++++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 154 ----------------- lib/librte_eal/linuxapp/kni/Makefile | 1 + lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- 9 files changed, 223 insertions(+), 160 deletions(-) create mode 100644 drivers/net/ixgbe/ixgbe_pci_dev_ids.h diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 72426f3..a8899b8 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -64,6 +64,8 @@ ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) CFLAGS_mempool_anon.o := -D_GNU_SOURCE endif CFLAGS_cmdline.o := -D_GNU_SOURCE +# for bypass pci device ids +CFLAGS_cmdline.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index c5b9479..45cbcff 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -10586,7 +10586,7 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue) } #ifdef RTE_NIC_BYPASS -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> uint8_t bypass_is_supported(portid_t port_id) { diff --git a/app/test/Makefile b/app/test/Makefile index 8a1f54c..051eb8c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -173,6 +173,7 @@ endif # pci tests want to know some pci devices ids CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/e1000 +CFLAGS_test_pci.o += -I$(RTE_SDK)/drivers/net/ixgbe # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 7215936..cdb79ab 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -68,7 +68,7 @@ static int my_driver_init(struct rte_pci_driver *dr, struct rte_pci_id my_driver_id[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> +#include <ixgbe_pci_dev_ids.h> { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 5103c7c..098918a 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -421,7 +421,7 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev, static const struct rte_pci_id pci_id_ixgbe_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; @@ -433,7 +433,7 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = { static const struct rte_pci_id pci_id_ixgbevf_map[] = { #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" +#include "ixgbe_pci_dev_ids.h" { .vendor_id = 0, /* sentinel */ }, }; diff --git a/drivers/net/ixgbe/ixgbe_pci_dev_ids.h b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h new file mode 100644 index 0000000..467a281 --- /dev/null +++ b/drivers/net/ixgbe/ixgbe_pci_dev_ids.h @@ -0,0 +1,213 @@ +/*- + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * The full GNU General Public License is included in this distribution + * in the file called LICENSE.GPL. + * + * Contact Information: + * Intel Corporation + * + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBE +#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) +#endif + +#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF +#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) +#endif + +#ifndef PCI_VENDOR_ID_INTEL +/** Vendor ID used by Intel devices */ +#define PCI_VENDOR_ID_INTEL 0x8086 +#endif + +/****************** Physical IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82598 0x10B6 +#define IXGBE_DEV_ID_82598_BX 0x1508 +#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 +#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 +#define IXGBE_DEV_ID_82598AT 0x10C8 +#define IXGBE_DEV_ID_82598AT2 0x150B +#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB +#define IXGBE_DEV_ID_82598EB_CX4 0x10DD +#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC +#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 +#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 +#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 +#define IXGBE_DEV_ID_82599_KX4 0x10F7 +#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 +#define IXGBE_DEV_ID_82599_KR 0x1517 +#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 +#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C +#define IXGBE_DEV_ID_82599_CX4 0x10F9 +#define IXGBE_DEV_ID_82599_SFP 0x10FB +#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 +#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 +#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 +#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 +#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A +#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 +#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 +#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D +#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A +#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 +#define IXGBE_DEV_ID_82599EN_SFP 0x1557 +#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC +#define IXGBE_DEV_ID_82599_T3_LOM 0x151C +#define IXGBE_DEV_ID_82599_LS 0x154F +#define IXGBE_DEV_ID_X540T 0x1528 +#define IXGBE_DEV_ID_X540T1 0x1560 +#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC +#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD +#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE +#define IXGBE_DEV_ID_X550T 0x1563 +#define IXGBE_DEV_ID_X550T1 0x15D1 +#define IXGBE_DEV_ID_X550EM_A_KR 0x15C2 +#define IXGBE_DEV_ID_X550EM_A_KR_L 0x15C3 +#define IXGBE_DEV_ID_X550EM_A_SFP_N 0x15C4 +#define IXGBE_DEV_ID_X550EM_A_1G_T 0x15C6 +#define IXGBE_DEV_ID_X550EM_A_1G_T_L 0x15C7 +#define IXGBE_DEV_ID_X550EM_A_10G_T 0x15C8 +#define IXGBE_DEV_ID_X550EM_A_QSFP 0x15CA +#define IXGBE_DEV_ID_X550EM_A_QSFP_N 0x15CC +#define IXGBE_DEV_ID_X550EM_A_SFP 0x15CE +#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA +#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB + +#ifdef RTE_NIC_BYPASS +#define IXGBE_DEV_ID_82599_BYPASS 0x155D +#endif + +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, + IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, + IXGBE_DEV_ID_82599_COMBO_BACKPLANE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, + IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, + IXGBE_DEV_ID_82599_BACKPLANE_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR_L) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_10G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP_N) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) + +#ifdef RTE_NIC_BYPASS +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) +#endif + +/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ + +#define IXGBE_DEV_ID_82599_VF 0x10ED +#define IXGBE_DEV_ID_82599_VF_HV 0x152E +#define IXGBE_DEV_ID_X540_VF 0x1515 +#define IXGBE_DEV_ID_X540_VF_HV 0x1530 +#define IXGBE_DEV_ID_X550_VF_HV 0x1564 +#define IXGBE_DEV_ID_X550_VF 0x1565 +#define IXGBE_DEV_ID_X550EM_A_VF 0x15C5 +#define IXGBE_DEV_ID_X550EM_A_VF_HV 0x15B4 +#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 +#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 + +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) +RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF) +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) + +#undef RTE_PCI_DEV_ID_DECL_IXGBE +#undef RTE_PCI_DEV_ID_DECL_IXGBEVF 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 9e2dc00..ac2a6d6 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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 @@ -93,14 +91,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_IXGBE -#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF -#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_I40E #define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) #endif @@ -162,124 +152,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Physical IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82598 0x10B6 -#define IXGBE_DEV_ID_82598_BX 0x1508 -#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6 -#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 -#define IXGBE_DEV_ID_82598AT 0x10C8 -#define IXGBE_DEV_ID_82598AT2 0x150B -#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB -#define IXGBE_DEV_ID_82598EB_CX4 0x10DD -#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC -#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1 -#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1 -#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4 -#define IXGBE_DEV_ID_82599_KX4 0x10F7 -#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514 -#define IXGBE_DEV_ID_82599_KR 0x1517 -#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8 -#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C -#define IXGBE_DEV_ID_82599_CX4 0x10F9 -#define IXGBE_DEV_ID_82599_SFP 0x10FB -#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9 -#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72 -#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0 -#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470 -#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A -#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529 -#define IXGBE_DEV_ID_82599_SFP_EM 0x1507 -#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D -#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A -#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558 -#define IXGBE_DEV_ID_82599EN_SFP 0x1557 -#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC -#define IXGBE_DEV_ID_82599_T3_LOM 0x151C -#define IXGBE_DEV_ID_82599_LS 0x154F -#define IXGBE_DEV_ID_X540T 0x1528 -#define IXGBE_DEV_ID_X540T1 0x1560 -#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC -#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD -#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE -#define IXGBE_DEV_ID_X550T 0x1563 -#define IXGBE_DEV_ID_X550T1 0x15D1 -#define IXGBE_DEV_ID_X550EM_A_KR 0x15C2 -#define IXGBE_DEV_ID_X550EM_A_KR_L 0x15C3 -#define IXGBE_DEV_ID_X550EM_A_SFP_N 0x15C4 -#define IXGBE_DEV_ID_X550EM_A_1G_T 0x15C6 -#define IXGBE_DEV_ID_X550EM_A_1G_T_L 0x15C7 -#define IXGBE_DEV_ID_X550EM_A_10G_T 0x15C8 -#define IXGBE_DEV_ID_X550EM_A_QSFP 0x15CA -#define IXGBE_DEV_ID_X550EM_A_QSFP_N 0x15CC -#define IXGBE_DEV_ID_X550EM_A_SFP 0x15CE -#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA -#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB - -#ifdef RTE_NIC_BYPASS -#define IXGBE_DEV_ID_82599_BYPASS 0x155D -#endif - -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598AF_SINGLE_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_DEV_ID_82599_COMBO_BACKPLANE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \ - IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR_L) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_10G_T) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP_N) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR) - -#ifdef RTE_NIC_BYPASS -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS) -#endif - /*************** Physical I40E devices from i40e_type.h *****************/ #define I40E_DEV_ID_SFP_XL710 0x1572 @@ -326,30 +198,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** Virtual IXGBE devices from ixgbe_type.h ******************/ - -#define IXGBE_DEV_ID_82599_VF 0x10ED -#define IXGBE_DEV_ID_82599_VF_HV 0x152E -#define IXGBE_DEV_ID_X540_VF 0x1515 -#define IXGBE_DEV_ID_X540_VF_HV 0x1530 -#define IXGBE_DEV_ID_X550_VF_HV 0x1564 -#define IXGBE_DEV_ID_X550_VF 0x1565 -#define IXGBE_DEV_ID_X550EM_A_VF 0x15C5 -#define IXGBE_DEV_ID_X550EM_A_VF_HV 0x15B4 -#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8 -#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9 - -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF) -RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF) -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) - /****************** Virtual I40E devices from i40e_type.h ********************/ #define I40E_DEV_ID_VF 0x154C @@ -440,8 +288,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index 6ac7637..3bdf352 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -44,6 +44,7 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/e1000 +MODULE_CFLAGS += -I$(RTE_SDK)/drivers/net/ixgbe ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | tr -d .) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 5342c53..c6f42f2 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -356,7 +356,7 @@ kni_dev_remove(struct kni_dev *dev) igb_kni_remove(dev->pci_dev); break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ixgbe_kni_remove(dev->pci_dev); break; default: @@ -514,7 +514,7 @@ kni_ioctl_create(struct net *net, break; #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \ case (dev): - #include <rte_pci_dev_ids.h> + #include <ixgbe_pci_dev_ids.h> ret = ixgbe_kni_probe(found_pci, &lad_dev); break; default: -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 02/13] ixgbe: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 02/13] ixgbe: " David Marchand @ 2016-04-29 1:34 ` Wu, Jingjing 2016-05-04 8:26 ` David Marchand 0 siblings, 1 reply; 92+ messages in thread From: Wu, Jingjing @ 2016-04-29 1:34 UTC (permalink / raw) To: David Marchand, dev Cc: thomas.monjalon, stephen, Richardson, Bruce, nhorman, pmatilai, christian.ehrhardt, Zhang, Helin, Ananyev, Konstantin Hi, David For the changes on igb, ixgbe, I saw you create a new header file called **__pci_dev_ids.h to replace the rte_pci_dev_ids.h for each driver. But for the changes on i40e, you didn't do that way. If you look into the base code, you will find for each Intel NIC, the device ids are defined there, such as ixgbe_type.h; i40e_devid.h; E1000_hw.h. I'd prefer the way you did in i40e driver. It's clearer and with minor change. Thanks Jingjing > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand > Sent: Wednesday, April 20, 2016 8:44 PM > To: dev@dpdk.org > Cc: thomas.monjalon@6wind.com; stephen@networkplumber.org; > Richardson, Bruce; nhorman@tuxdriver.com; pmatilai@redhat.com; > christian.ehrhardt@canonical.com; Zhang, Helin; Ananyev, Konstantin > Subject: [dpdk-dev] [PATCH v3 02/13] ixgbe: move pci device ids to driver > > test application and kni still want to know ixgbe pci devices. > So let's create a header in the driver that will be used by them. > > Same comment as for e1000 driver, we can't reuse base/ headers at the > moment because of macros redefinitions nightmare. > > Signed-off-by: David Marchand <david.marchand@6wind.com> > --- > app/test-pmd/Makefile | 2 + > app/test-pmd/cmdline.c | 2 +- > app/test/Makefile | 1 + > app/test/test_pci.c | 2 +- > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- > drivers/net/ixgbe/ixgbe_pci_dev_ids.h | 213 > ++++++++++++++++++++++++ > lib/librte_eal/common/include/rte_pci_dev_ids.h | 154 ----------------- > lib/librte_eal/linuxapp/kni/Makefile | 1 + > lib/librte_eal/linuxapp/kni/kni_misc.c | 4 +- > 9 files changed, 223 insertions(+), 160 deletions(-) create mode 100644 > drivers/net/ixgbe/ixgbe_pci_dev_ids.h > > diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index > 72426f3..a8899b8 100644 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 02/13] ixgbe: move pci device ids to driver 2016-04-29 1:34 ` Wu, Jingjing @ 2016-05-04 8:26 ` David Marchand 0 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-05-04 8:26 UTC (permalink / raw) To: Wu, Jingjing Cc: dev, thomas.monjalon, stephen, Richardson, Bruce, nhorman, pmatilai, christian.ehrhardt, Zhang, Helin, Ananyev, Konstantin On Fri, Apr 29, 2016 at 3:34 AM, Wu, Jingjing <jingjing.wu@intel.com> wrote: > Hi, David > > For the changes on igb, ixgbe, I saw you create a new header file called **__pci_dev_ids.h to replace the rte_pci_dev_ids.h for each driver. > But for the changes on i40e, you didn't do that way. > If you look into the base code, you will find for each Intel NIC, the device ids are defined there, such as ixgbe_type.h; i40e_devid.h; E1000_hw.h. > > I'd prefer the way you did in i40e driver. It's clearer and with minor change. This is what I wanted to do, but this requires a rework in kni and the pci test. -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 03/13] i40e: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 02/13] ixgbe: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 04/13] fm10k: " David Marchand ` (11 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Helin Zhang, Jingjing Wu Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- 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 | 64 ------------------------- 3 files changed, 24 insertions(+), 70 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 4e87399..b43acf1 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -448,9 +448,24 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr); static const struct rte_pci_id pci_id_i40e_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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 = 0, /* sentinel */ }, }; static const struct eth_dev_ops i40e_eth_dev_ops = { diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 1e41b3a..967324c 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1089,9 +1089,12 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link) } static const struct rte_pci_id pci_id_i40evf_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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 = 0, /* sentinel */ }, }; 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 ac2a6d6..f1f3e13 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,8 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * 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. * @@ -91,14 +89,6 @@ * Note that this file can be included multiple times within the same file. */ -#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 @@ -152,44 +142,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** 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_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 - -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_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) - /*************** Physical FM10K devices from fm10k_type.h ***************/ #define FM10K_DEV_ID_PF 0x15A4 @@ -198,20 +150,6 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) -/****************** 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) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -288,8 +226,6 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#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 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 04/13] fm10k: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (2 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 03/13] i40e: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 05/13] virtio: " David Marchand ` (10 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Jing Chen Since the base driver already defines all pci device ids, no need to redefine them, let's just drop the previous RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/fm10k/fm10k_ethdev.c | 7 +++--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 29 ------------------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 146bc2a..40b57f9 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3018,9 +3018,10 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * and SRIOV-VF devices. */ static const struct rte_pci_id pci_id_fm10k_map[] = { -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, + FM10K_DEV_ID_SDI_FM10420_QDA2) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, { .vendor_id = 0, /* sentinel */ }, }; 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 f1f3e13..a19fdfa 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -97,14 +97,6 @@ #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_FM10K -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -117,11 +109,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_INTEL -/** Vendor ID used by Intel devices */ -#define PCI_VENDOR_ID_INTEL 0x8086 -#endif - #ifndef PCI_VENDOR_ID_QUMRANET /** Vendor ID used by virtio devices */ #define PCI_VENDOR_ID_QUMRANET 0x1AF4 @@ -142,14 +129,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/*************** Physical FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_PF 0x15A4 -#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0 - -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -162,12 +141,6 @@ RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) -/*************** Virtual FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_VF 0x15A5 - -RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -228,5 +201,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) #undef RTE_PCI_DEV_ID_DECL_BNX2XVF #undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -#undef RTE_PCI_DEV_ID_DECL_FM10K -#undef RTE_PCI_DEV_ID_DECL_FM10KVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 05/13] virtio: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (3 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 04/13] fm10k: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 06/13] vmxnet3: " David Marchand ` (9 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Huawei Xie, Yuanhan Liu Reused defines from virtio_pci.h. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/virtio/virtio_ethdev.c | 7 ++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index f8cc158..ee95cab 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -102,11 +102,8 @@ static int virtio_dev_queue_stats_mapping_set( * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_virtio_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, + { .vendor_id = 0, /* sentinel */ }, }; struct rte_virtio_xstats_name_off { 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 a19fdfa..448b5e1 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -68,7 +68,6 @@ * driver which is a para virtualization driver running in guest virtual machine. * The inclusion of these in an array built using this file depends on the * definition of - * RTE_PCI_DEV_ID_DECL_VIRTIO * at the time when this file is included. * * In order to populate an array, the user of this file must define this macro: @@ -89,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif @@ -109,11 +104,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_QUMRANET -/** Vendor ID used by virtio devices */ -#define PCI_VENDOR_ID_QUMRANET 0x1AF4 -#endif - #ifndef PCI_VENDOR_ID_VMWARE /** Vendor ID used by VMware devices */ #define PCI_VENDOR_ID_VMWARE 0x15AD @@ -129,12 +119,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Virtio devices from virtio.h ******************/ - -#define QUMRANET_DEV_ID_VIRTIO 0x1000 - -RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) - /****************** VMware VMXNET3 devices ******************/ #define VMWARE_DEV_ID_VMXNET3 0x07B0 @@ -199,5 +183,4 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 06/13] vmxnet3: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (4 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 05/13] virtio: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 07/13] enic: " David Marchand ` (8 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Yong Wang Moved vmware device ids macro since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 ++++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 ---------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 375e681..e3cfee4 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -100,12 +100,11 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_VMWARE 0x15AD +#define VMWARE_DEV_ID_VMXNET3 0x07B0 static const struct rte_pci_id pci_id_vmxnet3_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) }, + { .vendor_id = 0, /* sentinel */ }, }; static const struct eth_dev_ops vmxnet3_eth_dev_ops = { 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 448b5e1..0ecff3c 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -104,11 +100,6 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_VMWARE -/** Vendor ID used by VMware devices */ -#define PCI_VENDOR_ID_VMWARE 0x15AD -#endif - #ifndef PCI_VENDOR_ID_CISCO /** Vendor ID used by Cisco VIC devices */ #define PCI_VENDOR_ID_CISCO 0x1137 @@ -119,12 +110,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** VMware VMXNET3 devices ******************/ - -#define VMWARE_DEV_ID_VMXNET3 0x07B0 - -RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -183,4 +168,3 @@ RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_VMXNET3 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 07/13] enic: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (5 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 06/13] vmxnet3: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 08/13] bnx2x: " David Marchand ` (7 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, John Daley, Nelson Escobar Moved cisco vendor id since the driver had no such information. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/enic/enic_ethdev.c | 13 +++++-------- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 7539811..0e26aa9 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -57,15 +57,12 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_CISCO 0x1137 static const struct rte_pci_id pci_id_enic_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#ifndef PCI_VENDOR_ID_CISCO -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif -#include "rte_pci_dev_ids.h" -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) -{.vendor_id = 0, /* Sentinal */}, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_CISCO, + PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, + {.vendor_id = 0, /* sentinel */}, }; static 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 0ecff3c..1c22c04 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,10 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_ENIC -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNX2X #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) #endif @@ -100,24 +96,11 @@ #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) #endif -#ifndef PCI_VENDOR_ID_CISCO -/** Vendor ID used by Cisco VIC devices */ -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif - #ifndef PCI_VENDOR_ID_BROADCOM /** Vendor ID used by Broadcom devices */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/****************** Cisco VIC devices ******************/ - -#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ -#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */ - -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) - /****************** QLogic devices ******************/ /* Broadcom/QLogic BNX2X */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 08/13] bnx2x: move pci device ids to driver 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (6 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 07/13] enic: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 09/13] ena: remove unneeded pci macro David Marchand ` (6 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Sony Chacko, Harish Patil, Rasesh Mody Reused defines from the driver and moved broadcom vendor id macro. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 21 +++++++-- lib/librte_eal/common/include/rte_pci_dev_ids.h | 60 ------------------------- 3 files changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 6edb2f9..8264a74 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -22,7 +22,6 @@ #include "ecore_init_ops.h" #include "rte_version.h" -#include "rte_pci_dev_ids.h" #include <sys/types.h> #include <sys/stat.h> @@ -9588,7 +9587,7 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc) int f; struct stat st; - fwname = sc->devinfo.device_id == BNX2X_DEV_ID_57711 + fwname = sc->devinfo.device_id == CHIP_NUM_57711 ? FW_NAME_57711 : FW_NAME_57810; f = open(fwname, O_RDONLY); if (f < 0) { diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index ba194b5..06a0add 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -16,15 +16,28 @@ /* * The set of PCI devices this driver supports */ +#define PCI_VENDOR_ID_BROADCOM 0x14E4 static struct rte_pci_id pci_id_bnx2x_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_OBS) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_4_10) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_2_20) }, +#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_MF) }, +#endif { .vendor_id = 0, } }; static struct rte_pci_id pci_id_bnx2xvf_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57840_VF) }, { .vendor_id = 0, } }; 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 1c22c04..6720b7a 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -88,66 +88,6 @@ * Note that this file can be included multiple times within the same file. */ -#ifndef RTE_PCI_DEV_ID_DECL_BNX2X -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) -#endif - -#ifndef PCI_VENDOR_ID_BROADCOM -/** Vendor ID used by Broadcom devices */ -#define PCI_VENDOR_ID_BROADCOM 0x14E4 -#endif - -/****************** QLogic devices ******************/ - -/* Broadcom/QLogic BNX2X */ -#define BNX2X_DEV_ID_57710 0x164e -#define BNX2X_DEV_ID_57711 0x164f -#define BNX2X_DEV_ID_57711E 0x1650 -#define BNX2X_DEV_ID_57712 0x1662 -#define BNX2X_DEV_ID_57712_MF 0x1663 -#define BNX2X_DEV_ID_57712_VF 0x166f -#define BNX2X_DEV_ID_57713 0x1651 -#define BNX2X_DEV_ID_57713E 0x1652 -#define BNX2X_DEV_ID_57800 0x168a -#define BNX2X_DEV_ID_57800_MF 0x16a5 -#define BNX2X_DEV_ID_57800_VF 0x16a9 -#define BNX2X_DEV_ID_57810 0x168e -#define BNX2X_DEV_ID_57810_MF 0x16ae -#define BNX2X_DEV_ID_57810_VF 0x16af -#define BNX2X_DEV_ID_57811 0x163d -#define BNX2X_DEV_ID_57811_MF 0x163e -#define BNX2X_DEV_ID_57811_VF 0x163f - -#define BNX2X_DEV_ID_57840_OBS 0x168d -#define BNX2X_DEV_ID_57840_OBS_MF 0x16ab -#define BNX2X_DEV_ID_57840_4_10 0x16a1 -#define BNX2X_DEV_ID_57840_2_20 0x16a2 -#define BNX2X_DEV_ID_57840_MF 0x16a4 -#define BNX2X_DEV_ID_57840_VF 0x16ad - -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_OBS) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_4_10) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_2_20) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_VF) -#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) -#endif - /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */ -#undef RTE_PCI_DEV_ID_DECL_BNX2X -#undef RTE_PCI_DEV_ID_DECL_BNX2XVF -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 09/13] ena: remove unneeded pci macro 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (7 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 08/13] bnx2x: " David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 10/13] pci: no need for global device ids list David Marchand ` (5 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin I suppose this is a remnant of rte_pci_dev_ids.h, just remove this. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/ena/ena_ethdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 2b60a67..efa5e31 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -80,11 +80,9 @@ #define PCI_DEVICE_ID_ENA_LLQ_VF 0xEC21 static struct rte_pci_id pci_id_ena_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENA(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, - - RTE_PCI_DEV_ID_DECL_ENA(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) - RTE_PCI_DEV_ID_DECL_ENA(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) - {.device_id = 0}, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) }, + { .device_id = 0 }, }; static int ena_device_init(struct ena_com_dev *ena_dev, -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 10/13] pci: no need for global device ids list 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (8 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 09/13] ena: remove unneeded pci macro David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 11/13] drivers: constify pci id tables David Marchand ` (4 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt Now that all pci device ids are in their respective drivers, we can remove this header. Signed-off-by: David Marchand <david.marchand@6wind.com> --- doc/api/doxy-api-index.md | 1 - lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 93 ------------------------- 3 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index f626386..6b0ea11 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -45,7 +45,6 @@ There are many libraries, so their headers may be grouped by topics: [vhost] (@ref rte_virtio_net.h), [KNI] (@ref rte_kni.h), [PCI] (@ref rte_pci.h), - [PCI IDs] (@ref rte_pci_dev_ids.h) - **memory**: [memseg] (@ref rte_memory.h), diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile index f5ea0ee..bb9810d 100644 --- a/lib/librte_eal/common/Makefile +++ b/lib/librte_eal/common/Makefile @@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk INC := rte_branch_prediction.h rte_common.h INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h -INC += rte_pci_dev_ids.h rte_per_lcore.h rte_random.h +INC += rte_per_lcore.h rte_random.h INC += rte_tailq.h rte_interrupts.h rte_alarm.h INC += rte_string_fns.h rte_version.h INC += rte_eal_memconfig.h rte_malloc_heap.h diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h deleted file mode 100644 index 6720b7a..0000000 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - * The full GNU General Public License is included in this distribution - * in the file called LICENSE.GPL. - * - * Contact Information: - * Intel Corporation - * - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * @file - * - * This file contains a list of the PCI device IDs recognised by DPDK, which - * can be used to fill out an array of structures describing the devices. - * - * Currently four families of devices are recognised: those supported by the - * IGB driver, by EM driver, those supported by the IXGBE driver, and by virtio - * driver which is a para virtualization driver running in guest virtual machine. - * The inclusion of these in an array built using this file depends on the - * definition of - * at the time when this file is included. - * - * In order to populate an array, the user of this file must define this macro: - * RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID). For example: - * - * @code - * struct device { - * int vend; - * int dev; - * }; - * - * struct device devices[] = { - * #define RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID) {vend, dev}, - * #include <rte_pci_dev_ids.h> - * }; - * @endcode - * - * Note that this file can be included multiple times within the same file. - */ - -/* - * Undef all RTE_PCI_DEV_ID_DECL_* here. - */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 11/13] drivers: constify pci id tables 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (9 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 10/13] pci: no need for global device ids list David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 12/13] drivers: export pci drivers David Marchand ` (3 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/crypto/qat/rte_qat_cryptodev.c | 2 +- drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/ena/ena_ethdev.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index 54f0c95..bce962f 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -67,7 +67,7 @@ static struct rte_cryptodev_ops crypto_qat_ops = { * The set of PCI devices this driver supports */ -static struct rte_pci_id pci_id_qat_map[] = { +static const struct rte_pci_id pci_id_qat_map[] = { { .vendor_id = 0x8086, .device_id = 0x0443, diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 06a0add..a94b2e2 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -17,7 +17,7 @@ * The set of PCI devices this driver supports */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 -static struct rte_pci_id pci_id_bnx2x_map[] = { +static const struct rte_pci_id pci_id_bnx2x_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57711) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810) }, @@ -33,7 +33,7 @@ static struct rte_pci_id pci_id_bnx2x_map[] = { { .vendor_id = 0, } }; -static struct rte_pci_id pci_id_bnx2xvf_map[] = { +static const struct rte_pci_id pci_id_bnx2xvf_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57800_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57810_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, CHIP_NUM_57811_VF) }, diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 72b1a7b..919b4b7 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -68,7 +68,7 @@ * Macros needed to support the PCI Device ID Table ... */ #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ - static struct rte_pci_id cxgb4_pci_tbl[] = { + static const struct rte_pci_id cxgb4_pci_tbl[] = { #define CH_PCI_DEVICE_ID_FUNCTION 0x4 #define PCI_VENDOR_ID_CHELSIO 0x1425 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index efa5e31..2f53d84 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -79,7 +79,7 @@ #define PCI_DEVICE_ID_ENA_VF 0xEC20 #define PCI_DEVICE_ID_ENA_LLQ_VF 0xEC21 -static struct rte_pci_id pci_id_ena_map[] = { +static const struct rte_pci_id pci_id_ena_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) }, { .device_id = 0 }, diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index baa840e..33256c9 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2455,7 +2455,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) return 0; } -static struct rte_pci_id pci_id_nfp_net_map[] = { +static const struct rte_pci_id pci_id_nfp_net_map[] = { { .vendor_id = PCI_VENDOR_ID_NETRONOME, .device_id = PCI_DEVICE_ID_NFP6000_PF_NIC, -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 12/13] drivers: export pci drivers 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (10 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 11/13] drivers: constify pci id tables David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 13/13] app: introduce dpdk-obj-info tool David Marchand ` (2 subsequent siblings) 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/mlx4/mlx4.c | 1 + drivers/net/mlx5/mlx5.c | 1 + drivers/net/virtio/virtio_ethdev.c | 1 + lib/librte_eal/common/include/rte_pci.h | 7 +++++++ 4 files changed, 10 insertions(+) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 0c76e72..14fe9dd 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5789,6 +5789,7 @@ static struct eth_driver mlx4_driver = { .dev_private_size = sizeof(struct priv) }; +RTE_EAL_PCI_DRIVER_EXPORT(mlx4, mlx4_driver.pci_drv); RTE_INIT(rte_mlx4_pmd_init); static void rte_mlx4_pmd_init(void) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index f6399fc..975bb3f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -646,6 +646,7 @@ static struct eth_driver mlx5_driver = { .dev_private_size = sizeof(struct priv) }; +RTE_EAL_PCI_DRIVER_EXPORT(mlx5, mlx5_driver.pci_drv); RTE_INIT(rte_mlx5_pmd_init); static void rte_mlx5_pmd_init(void) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index ee95cab..587ba60 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1211,6 +1211,7 @@ static struct eth_driver rte_virtio_pmd = { .dev_private_size = sizeof(struct virtio_hw), }; +RTE_EAL_PCI_DRIVER_EXPORT(virtio, rte_virtio_pmd.pci_drv); RTE_INIT(rte_virtio_pmd_init); static void rte_virtio_pmd_init(void) diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 3bb1833..3095f94 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -497,12 +497,19 @@ void rte_eal_pci_dump(FILE *f); void rte_eal_pci_register(struct rte_pci_driver *driver); #define RTE_EAL_PCI_REGISTER(name, d) \ +RTE_EAL_PCI_DRIVER_EXPORT(name, d); \ RTE_INIT(pciinitfn_ ##name); \ static void pciinitfn_ ##name(void) \ { \ rte_eal_pci_register(&d); \ } +#define RTE_EAL_PCI_DRIVER_PREFIX "pcidriver_" + +#define RTE_EAL_PCI_DRIVER_EXPORT(name, d) \ +extern const typeof(d) *pcidriver_ ##name; \ +const typeof(d) *pcidriver_ ##name = &d + /** * Unregister a PCI driver. * -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v3 13/13] app: introduce dpdk-obj-info tool 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (11 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 12/13] drivers: export pci drivers David Marchand @ 2016-04-20 12:43 ` David Marchand 2016-04-21 8:07 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand 14 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-04-20 12:43 UTC (permalink / raw) To: dev Cc: thomas.monjalon, stephen, bruce.richardson, nhorman, pmatilai, christian.ehrhardt Export some useful information for startup scripts and debug. For now, only pci drivers are handled. Example for a static binary: marchand@gloops:~/git/dpdk$ ./build/app/dpdk-obj-info ./build/app/testpmd pci:driver=cxgbe,flags=needmapping,lsc pci:driver=cxgbe,id=vendor=1425,device=5400,subvendor=ffff,subdevice=ffff pci:driver=cxgbe,id=vendor=1425,device=5401,subvendor=ffff,subdevice=ffff pci:driver=cxgbe,id=vendor=1425,device=5402,subvendor=ffff,subdevice=ffff Example for a dso: marchand@gloops:~/git/dpdk$ ./build/app/dpdk-obj-info ./build/lib/librte_pmd_ixgbe.so pci:driver=ixgbe,flags=needmapping,lsc,detachable pci:driver=ixgbe,id=vendor=8086,device=10b6,subvendor=ffff,subdevice=ffff pci:driver=ixgbe,id=vendor=8086,device=1508,subvendor=ffff,subdevice=ffff pci:driver=ixgbe,id=vendor=8086,device=10c6,subvendor=ffff,subdevice=ffff Signed-off-by: David Marchand <david.marchand@6wind.com> --- app/Makefile | 1 + app/dpdk-obj-info/Makefile | 45 +++++++++ app/dpdk-obj-info/dpdk-obj-info.c | 188 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 234 insertions(+) create mode 100644 app/dpdk-obj-info/Makefile create mode 100644 app/dpdk-obj-info/dpdk-obj-info.c diff --git a/app/Makefile b/app/Makefile index 1151e09..0461a35 100644 --- a/app/Makefile +++ b/app/Makefile @@ -37,5 +37,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info +DIRS-y += dpdk-obj-info include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/app/dpdk-obj-info/Makefile b/app/dpdk-obj-info/Makefile new file mode 100644 index 0000000..b0f4bc7 --- /dev/null +++ b/app/dpdk-obj-info/Makefile @@ -0,0 +1,45 @@ +# BSD LICENSE +# +# Copyright 2016 6WIND S.A. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of 6WIND S.A. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + + +APP = dpdk-obj-info + +SRCS-y += dpdk-obj-info.c + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +LDLIBS += -lbfd --as-needed + +DEPDIRS-y += lib + +include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/dpdk-obj-info/dpdk-obj-info.c b/app/dpdk-obj-info/dpdk-obj-info.c new file mode 100644 index 0000000..23c183d --- /dev/null +++ b/app/dpdk-obj-info/dpdk-obj-info.c @@ -0,0 +1,188 @@ +/*- + * BSD LICENSE + * + * Copyright 2016 6WIND S.A. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of 6WIND S.A. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/mman.h> +#include <fcntl.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <bfd.h> + +#include <rte_pci.h> + +static char * +dump_flags(uint32_t flags) +{ + static char buffer[sizeof("needmapping,lsc,detachable,")]; + int written = 0; + + buffer[0] = '\0'; + + if (flags & RTE_PCI_DRV_NEED_MAPPING) + written += snprintf(&buffer[written], sizeof(buffer) - written, + "%s,", "needmapping"); + if (flags & RTE_PCI_DRV_INTR_LSC) + written += snprintf(&buffer[written], sizeof(buffer) - written, + "%s,", "lsc"); + if (flags & RTE_PCI_DRV_DETACHABLE) + written += snprintf(&buffer[written], sizeof(buffer) - written, + "%s,", "detachable"); + if (written) + buffer[written-1] = '\0'; + + return buffer; +} + +static bfd *cur_bfd; +static void *bin_start; +static asymbol **sym_table; +static long sym_number; + +static asymbol * +find_symbol(const uintptr_t p) +{ + int i; + + for (i = 0; i < sym_number; i++) { + asymbol *sym = sym_table[i]; + + if (bfd_asymbol_value(sym) == p) + return sym; + } + + return NULL; +} + +static off_t +get_sec_vma_offset(const asection *sec) +{ + return (uintptr_t) bin_start + sec->filepos + - bfd_get_section_vma(cur_bfd, sec); +} + +static uintptr_t +get_value(const asymbol *sym) +{ + asection *sec = bfd_get_section(sym); + off_t sec_vma_offset = get_sec_vma_offset(sec); + return bfd_asymbol_value(sym) + sec_vma_offset; +} + +int main(int argc, char *argv[]) +{ + int fd; + struct stat st; + long sym_table_size; + long i; + const char *filename; + const char *filter = NULL; + + /* for now, handle one file, and an optional driver name */ + if (argc < 2 || argc > 3) + return -1; + + filename = argv[1]; + if (argc > 2) + filter = argv[2]; + + fd = open(filename, O_RDONLY); + if (fd < 0) + return -1; + if (fstat(fd, &st) < 0) + return -1; + + bin_start = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + if (bin_start == MAP_FAILED) + return -1; + + bfd_init(); + + cur_bfd = bfd_fdopenr(filename, NULL, fd); + if (!cur_bfd) { + printf("could not init bfd: %s\n", strerror(errno)); + return -1; + } + + if (!bfd_check_format(cur_bfd, bfd_object)) + return -1; + + sym_table_size = bfd_get_symtab_upper_bound(cur_bfd); + if (sym_table_size <= 0) + return -1; + + sym_table = malloc(sym_table_size); + if (!sym_table) + return -1; + + sym_number = bfd_canonicalize_symtab(cur_bfd, sym_table); + if (sym_number < 0) + return -1; + + for (i = 0; i < sym_number; i++) { + asymbol *sym = sym_table[i]; + const struct rte_pci_driver *dr; + asymbol *symid; + const struct rte_pci_id *id; + const char *name; + + if (strncmp(sym->name, RTE_EAL_PCI_DRIVER_PREFIX, + strlen(RTE_EAL_PCI_DRIVER_PREFIX))) + continue; + + name = sym->name + strlen(RTE_EAL_PCI_DRIVER_PREFIX); + if (filter && strcmp(name, filter)) + continue; + + /* pcidriver_* symbols are pointers to real symbol */ + dr = (typeof(dr))get_value(find_symbol(*(uintptr_t *)get_value(sym))); + symid = find_symbol((uintptr_t)dr->id_table); + id = (typeof(id))get_value(symid); + + printf("pci:driver=%s,", name); + printf("flags=%s\n", dump_flags(dr->drv_flags)); + + while (id->vendor_id) { + printf("pci:driver=%s,", name); + printf("id="); + printf("vendor=%4.4x,", id->vendor_id); + printf("device=%4.4x,", id->device_id); + printf("subvendor=%4.4x,", id->subsystem_vendor_id); + printf("subdevice=%4.4x\n", id->subsystem_device_id); + id++; + } + } + + return 0; +} -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/13] kill global pci device id list 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (12 preceding siblings ...) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 13/13] app: introduce dpdk-obj-info tool David Marchand @ 2016-04-21 8:07 ` David Marchand 2016-04-21 12:13 ` Neil Horman 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand 14 siblings, 1 reply; 92+ messages in thread From: David Marchand @ 2016-04-21 8:07 UTC (permalink / raw) To: dev Cc: Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Neil Horman, Panu Matilainen, Christian Ehrhardt On Wed, Apr 20, 2016 at 2:43 PM, David Marchand <david.marchand@6wind.com> wrote: > - not storing the pci ids in a dedicated section anymore, pci drivers are > exported and parsed by a quickly written (and naive) tool Rethinking about this, this part won't do. Stripping symbols breaks it, and I had to go some gymnastics to get the symbols, while having exported information sanitised as strings in a dedicated section constructed at build time would be saner. Yes, this really sounds like modinfo ... Volunteers ? -- David Marchand ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/13] kill global pci device id list 2016-04-21 8:07 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand @ 2016-04-21 12:13 ` Neil Horman 0 siblings, 0 replies; 92+ messages in thread From: Neil Horman @ 2016-04-21 12:13 UTC (permalink / raw) To: David Marchand Cc: dev, Thomas Monjalon, Stephen Hemminger, Richardson, Bruce, Panu Matilainen, Christian Ehrhardt On Thu, Apr 21, 2016 at 10:07:51AM +0200, David Marchand wrote: > On Wed, Apr 20, 2016 at 2:43 PM, David Marchand > <david.marchand@6wind.com> wrote: > > - not storing the pci ids in a dedicated section anymore, pci drivers are > > exported and parsed by a quickly written (and naive) tool > > Rethinking about this, this part won't do. > Stripping symbols breaks it, and I had to go some gymnastics to get > the symbols, while having exported information sanitised as strings in > a dedicated section constructed at build time would be saner. > Yes, this really sounds like modinfo ... > > Volunteers ? modinfo (or a tool likes it), requires more gymnastics in the actual code than what we have. It requires the auto-generation of extra c code that gets linked into its own section (which implies the need for a linker script). Not saying its a bad idea, its a pretty good one, just that its alot of work. We might be able to do something a bit more simple, perhaps convert the macros to strings that we can extract with a tool? not sure Neil > > > -- > David Marchand > ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand ` (13 preceding siblings ...) 2016-04-21 8:07 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen David Marchand ` (10 more replies) 14 siblings, 11 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Wenzhuo Lu, Helin Zhang, Jingjing Wu, Jing Chen, Huawei Xie, Yuanhan Liu, Yong Wang, John Daley, Nelson Escobar, Sony Chacko, Harish Patil, Rasesh Mody, Stephen Hurd, Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin With the introduction of pmdinfo by Neil, we have almost everything in place to get rid of the pci devices in eal. We still have some ties with some pmds for functionalities like kni/ethtool or ixgbe bypass api, so the plan has switched to touch all pmds but those igb and ixgbe drivers. Since we still need rte_pci_dev_ids.h for those drivers, I just stripped the doxygen parts to stop referencing it in the documentation. I have validated this patchset by comparing the pmdinfo outputs and just noticed a difference for enic (where the pci ids were registered twice before). Yet, please maintainers review carefully. Thanks. Changes since v3: - dropped my approach at extracting informations from binaries - let igb{,vf} and ixgbe{,vf} untouched - rebased on HEAD - added bnxt Changes since v2: - rebased on HEAD - ena driver has been aligned - this patchset now depends on [1] as it avoids touching all drivers this way - not storing the pci ids in a dedicated section anymore, pci drivers are exported and parsed by a quickly written (and naive) tool Changes since v1: - indent fixes in i40e, fm10k, virtio, vmxnet3, enic, bnx2x. - rebased on head (ixgbe update) - removed doc update (will be sent separately) [1]: http://dpdk.org/ml/archives/dev/2016-April/037686.html -- David Marchand David Marchand (10): eal: remove PCI device ids header from doxygen net/e1000: move em PCI device ids to the driver net/i40e: move PCI device ids to the driver net/fm10k: move PCI device ids to the driver net/virtio: move PCI device ids to the driver net/vmxnet3: move PCI device ids to the driver net/enic: move PCI device ids to the driver net/bnx2x: move PCI device ids to the driver net/bnxt: move PCI device ids to the driver net/ena: remove unneeded pci macro doc/api/doxy-api-index.md | 1 - drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 21 +- drivers/net/bnxt/bnxt_ethdev.c | 27 +- drivers/net/e1000/e1000_ethdev.h | 2 + drivers/net/e1000/em_ethdev.c | 37 ++- drivers/net/ena/ena_ethdev.c | 7 +- drivers/net/enic/enic_ethdev.c | 12 +- drivers/net/fm10k/fm10k_ethdev.c | 6 +- drivers/net/i40e/i40e_ethdev.c | 25 +- drivers/net/i40e/i40e_ethdev_vf.c | 9 +- drivers/net/virtio/virtio_ethdev.c | 7 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 420 ------------------------ 14 files changed, 120 insertions(+), 466 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 02/10] net/e1000: move em PCI device ids to the driver David Marchand ` (9 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen This file is going to disappear, remove the doxygen parts that reference various drivers and remove it from the doxygen index. Signed-off-by: David Marchand <david.marchand@6wind.com> --- doc/api/doxy-api-index.md | 1 - lib/librte_eal/common/include/rte_pci_dev_ids.h | 40 ------------------------- 2 files changed, 41 deletions(-) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 5e7f024..2284a53 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -45,7 +45,6 @@ There are many libraries, so their headers may be grouped by topics: [vhost] (@ref rte_virtio_net.h), [KNI] (@ref rte_kni.h), [PCI] (@ref rte_pci.h), - [PCI IDs] (@ref rte_pci_dev_ids.h) - **memory**: [memseg] (@ref rte_memory.h), 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..ecb877c 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -57,46 +57,6 @@ * */ -/** - * @file - * - * This file contains a list of the PCI device IDs recognised by DPDK, which - * can be used to fill out an array of structures describing the devices. - * - * Currently five families of devices are recognised: those supported by the - * IGB driver, by EM driver, those supported by the IXGBE driver, those - * supported by the BNXT driver, and by virtio driver which is a para - * virtualization driver running in guest virtual machine. The inclusion of - * these in an array built using this file depends on the definition of - * RTE_PCI_DEV_ID_DECL_BNXT - * RTE_PCI_DEV_ID_DECL_EM - * RTE_PCI_DEV_ID_DECL_IGB - * 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. - * - * In order to populate an array, the user of this file must define this macro: - * RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID). For example: - * - * @code - * struct device { - * int vend; - * int dev; - * }; - * - * struct device devices[] = { - * #define RTE_PCI_DEV_ID_DECL_IXGBE(vendorID, deviceID) {vend, dev}, - * #include <rte_pci_dev_ids.h> - * }; - * @endcode - * - * Note that this file can be included multiple times within the same file. - */ - #ifndef RTE_PCI_DEV_ID_DECL_EM #define RTE_PCI_DEV_ID_DECL_EM(vend, dev) #endif -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 02/10] net/e1000: move em PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 03/10] net/i40e: move " David Marchand ` (8 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Wenzhuo Lu Reused defines from the driver and added a Intel vendor id macro for use by igb later. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. igb/igbvf is left as is, waiting for kni/ethtool cleanup. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v3: - dropped all but em pci device ids --- drivers/net/e1000/e1000_ethdev.h | 2 + drivers/net/e1000/em_ethdev.c | 37 +++++- lib/librte_eal/common/include/rte_pci_dev_ids.h | 148 ------------------------ 3 files changed, 34 insertions(+), 153 deletions(-) diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h index e8bf8da..6c25c8d 100644 --- a/drivers/net/e1000/e1000_ethdev.h +++ b/drivers/net/e1000/e1000_ethdev.h @@ -35,6 +35,8 @@ #define _E1000_ETHDEV_H_ #include <rte_time.h> +#define E1000_INTEL_VENDOR_ID 0x8086 + /* need update link, bit flag */ #define E1000_FLAG_NEED_LINK_UPDATE (uint32_t)(1 << 0) #define E1000_FLAG_MAILBOX (uint32_t)(1 << 1) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 4de5eb2..ad104ed 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -137,11 +137,38 @@ static enum e1000_fc_mode em_fc_setting = e1000_fc_full; * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_em_map[] = { - -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{0}, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82540EM) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82545EM_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82545EM_FIBER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82546EB_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82546EB_FIBER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82546EB_QUAD_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_FIBER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_SERDES) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_SERDES_DUAL) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_SERDES_QUAD) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_QUAD_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571PT_QUAD_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_QUAD_FIBER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82572EI_COPPER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82572EI_FIBER) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82572EI_SERDES) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82572EI) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82573L) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82574L) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82574LA) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82583V) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_LPT_I217_LM) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_LPT_I217_V) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_LPTLP_I218_LM) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_LPTLP_I218_V) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_LM2) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_V2) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_LM3) }, + { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_I218_V3) }, + { .vendor_id = 0, /* sentinel */ }, }; static const struct eth_dev_ops eth_em_ops = { 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 ecb877c..1b22adb 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -57,10 +57,6 @@ * */ -#ifndef RTE_PCI_DEV_ID_DECL_EM -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_IGB #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) #endif @@ -142,149 +138,6 @@ #define PCI_VENDOR_ID_BROADCOM 0x14E4 #endif -/******************** Physical EM devices from e1000_hw.h ********************/ - -#define E1000_DEV_ID_82542 0x1000 -#define E1000_DEV_ID_82543GC_FIBER 0x1001 -#define E1000_DEV_ID_82543GC_COPPER 0x1004 -#define E1000_DEV_ID_82544EI_COPPER 0x1008 -#define E1000_DEV_ID_82544EI_FIBER 0x1009 -#define E1000_DEV_ID_82544GC_COPPER 0x100C -#define E1000_DEV_ID_82544GC_LOM 0x100D -#define E1000_DEV_ID_82540EM 0x100E -#define E1000_DEV_ID_82540EM_LOM 0x1015 -#define E1000_DEV_ID_82540EP_LOM 0x1016 -#define E1000_DEV_ID_82540EP 0x1017 -#define E1000_DEV_ID_82540EP_LP 0x101E -#define E1000_DEV_ID_82545EM_COPPER 0x100F -#define E1000_DEV_ID_82545EM_FIBER 0x1011 -#define E1000_DEV_ID_82545GM_COPPER 0x1026 -#define E1000_DEV_ID_82545GM_FIBER 0x1027 -#define E1000_DEV_ID_82545GM_SERDES 0x1028 -#define E1000_DEV_ID_82546EB_COPPER 0x1010 -#define E1000_DEV_ID_82546EB_FIBER 0x1012 -#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D -#define E1000_DEV_ID_82546GB_COPPER 0x1079 -#define E1000_DEV_ID_82546GB_FIBER 0x107A -#define E1000_DEV_ID_82546GB_SERDES 0x107B -#define E1000_DEV_ID_82546GB_PCIE 0x108A -#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 -#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 -#define E1000_DEV_ID_82541EI 0x1013 -#define E1000_DEV_ID_82541EI_MOBILE 0x1018 -#define E1000_DEV_ID_82541ER_LOM 0x1014 -#define E1000_DEV_ID_82541ER 0x1078 -#define E1000_DEV_ID_82541GI 0x1076 -#define E1000_DEV_ID_82541GI_LF 0x107C -#define E1000_DEV_ID_82541GI_MOBILE 0x1077 -#define E1000_DEV_ID_82547EI 0x1019 -#define E1000_DEV_ID_82547EI_MOBILE 0x101A -#define E1000_DEV_ID_82547GI 0x1075 -#define E1000_DEV_ID_82571EB_COPPER 0x105E -#define E1000_DEV_ID_82571EB_FIBER 0x105F -#define E1000_DEV_ID_82571EB_SERDES 0x1060 -#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 -#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA -#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 -#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 -#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 -#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC -#define E1000_DEV_ID_82572EI_COPPER 0x107D -#define E1000_DEV_ID_82572EI_FIBER 0x107E -#define E1000_DEV_ID_82572EI_SERDES 0x107F -#define E1000_DEV_ID_82572EI 0x10B9 -#define E1000_DEV_ID_82573E 0x108B -#define E1000_DEV_ID_82573E_IAMT 0x108C -#define E1000_DEV_ID_82573L 0x109A -#define E1000_DEV_ID_82574L 0x10D3 -#define E1000_DEV_ID_82574LA 0x10F6 -#define E1000_DEV_ID_82583V 0x150C -#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 -#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 -#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA -#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB -#define E1000_DEV_ID_ICH8_82567V_3 0x1501 -#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 -#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A -#define E1000_DEV_ID_ICH8_IGP_C 0x104B -#define E1000_DEV_ID_ICH8_IFE 0x104C -#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 -#define E1000_DEV_ID_ICH8_IFE_G 0x10C5 -#define E1000_DEV_ID_ICH8_IGP_M 0x104D -#define E1000_DEV_ID_ICH9_IGP_M 0x10BF -#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 -#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB -#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD -#define E1000_DEV_ID_ICH9_BM 0x10E5 -#define E1000_DEV_ID_ICH9_IGP_C 0x294C -#define E1000_DEV_ID_ICH9_IFE 0x10C0 -#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 -#define E1000_DEV_ID_ICH9_IFE_G 0x10C2 -#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC -#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD -#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE -#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE -#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF -#define E1000_DEV_ID_ICH10_D_BM_V 0x1525 - -#define E1000_DEV_ID_PCH_M_HV_LM 0x10EA -#define E1000_DEV_ID_PCH_M_HV_LC 0x10EB -#define E1000_DEV_ID_PCH_D_HV_DM 0x10EF -#define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 -#define E1000_DEV_ID_PCH2_LV_LM 0x1502 -#define E1000_DEV_ID_PCH2_LV_V 0x1503 -#define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A -#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B -#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A -#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 -#define E1000_DEV_ID_PCH_I218_LM2 0x15A0 -#define E1000_DEV_ID_PCH_I218_V2 0x15A1 -#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 -#define E1000_DEV_ID_PCH_I218_V3 0x15A3 - - -/* - * Tested (supported) on VM emulated HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82540EM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82545EM_FIBER) - -/* - * Tested (supported) on real HW. - */ - -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82546EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_COPPER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_FIBER) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI_SERDES) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82572EI) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82573L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574L) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82574LA) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82583V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_LM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPT_I217_V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_LM) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_LPTLP_I218_V) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM2) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V2) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_LM3) -RTE_PCI_DEV_ID_DECL_EM(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_PCH_I218_V3) - - /******************** Physical IGB devices from e1000_hw.h ********************/ #define E1000_DEV_ID_82576 0x10C9 @@ -692,7 +545,6 @@ RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314) */ #undef RTE_PCI_DEV_ID_DECL_BNX2X #undef RTE_PCI_DEV_ID_DECL_BNX2XVF -#undef RTE_PCI_DEV_ID_DECL_EM #undef RTE_PCI_DEV_ID_DECL_IGB #undef RTE_PCI_DEV_ID_DECL_IGBVF #undef RTE_PCI_DEV_ID_DECL_IXGBE -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 03/10] net/i40e: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 02/10] net/e1000: move em PCI device ids to the driver David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 04/10] net/fm10k: " David Marchand ` (7 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Helin Zhang, Jingjing Wu Reused defines from the driver. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- Changes since v3 - added new pci ids from HEAD --- drivers/net/i40e/i40e_ethdev.c | 25 +++++++-- drivers/net/i40e/i40e_ethdev_vf.c | 9 ++-- lib/librte_eal/common/include/rte_pci_dev_ids.h | 70 ------------------------- 3 files changed, 28 insertions(+), 76 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 31c2e11..daac236 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -454,9 +454,28 @@ 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); static const struct rte_pci_id pci_id_i40e_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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_25G_B) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_25G_SFP28) }, + { 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) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_I_X722) }, + { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_I_X722) }, + { .vendor_id = 0, /* sentinel */ }, }; static const struct eth_dev_ops i40e_eth_dev_ops = { 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) } static const struct rte_pci_id pci_id_i40evf_map[] = { -#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" -{ .vendor_id = 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 = 0, /* sentinel */ }, }; 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 1b22adb..30fcdee 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,14 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#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 @@ -341,52 +333,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 -/*************** 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 ***************/ #define FM10K_DEV_ID_PF 0x15A4 @@ -431,20 +377,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) -/****************** 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) - /****************** Virtio devices from virtio.h ******************/ #define QUMRANET_DEV_ID_VIRTIO 0x1000 @@ -549,8 +481,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 -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 04/10] net/fm10k: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (2 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 03/10] net/i40e: move " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 05/10] net/virtio: " David Marchand ` (6 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Jing Chen Reused defines from the driver. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/fm10k/fm10k_ethdev.c | 6 +++--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 24 ------------------------ 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 66be9c6..217853f 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3049,9 +3049,9 @@ eth_fm10k_dev_uninit(struct rte_eth_dev *dev) * and SRIOV-VF devices. */ static const struct rte_pci_id pci_id_fm10k_map[] = { -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) }, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_PF) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_SDI_FM10420_QDA2) }, + { RTE_PCI_DEVICE(FM10K_INTEL_VENDOR_ID, FM10K_DEV_ID_VF) }, { .vendor_id = 0, /* sentinel */ }, }; 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 30fcdee..9e97d7c 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -81,14 +81,6 @@ #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_FM10K -#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF -#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -333,14 +325,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 -/*************** Physical FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_PF 0x15A4 -#define FM10K_DEV_ID_SDI_FM10420_QDA2 0x15D0 - -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_PF) -RTE_PCI_DEV_ID_DECL_FM10K(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_SDI_FM10420_QDA2) - /****************** Virtual IGB devices from e1000_hw.h ******************/ #define E1000_DEV_ID_82576_VF 0x10CA @@ -389,12 +373,6 @@ RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) -/*************** Virtual FM10K devices from fm10k_type.h ***************/ - -#define FM10K_DEV_ID_VF 0x15A5 - -RTE_PCI_DEV_ID_DECL_FM10KVF(PCI_VENDOR_ID_INTEL, FM10K_DEV_ID_VF) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -483,6 +461,4 @@ RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314) #undef RTE_PCI_DEV_ID_DECL_IXGBEVF #undef RTE_PCI_DEV_ID_DECL_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 -#undef RTE_PCI_DEV_ID_DECL_FM10K -#undef RTE_PCI_DEV_ID_DECL_FM10KVF #undef RTE_PCI_DEV_ID_DECL_BNXT -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 05/10] net/virtio: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (3 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 04/10] net/fm10k: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 06/10] net/vmxnet3: " David Marchand ` (5 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Huawei Xie, Yuanhan Liu Reused defines from the driver. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> --- drivers/net/virtio/virtio_ethdev.c | 7 ++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 ---------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 8467b3c..850e3ba 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -103,11 +103,8 @@ static int virtio_dev_queue_stats_mapping_set( * The set of PCI devices this driver supports */ static const struct rte_pci_id pci_id_virtio_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(VIRTIO_PCI_VENDORID, VIRTIO_PCI_DEVICEID_MIN) }, + { .vendor_id = 0, /* sentinel */ }, }; struct rte_virtio_xstats_name_off { 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 9e97d7c..1c66784 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,10 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO -#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) #endif @@ -102,11 +98,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #endif -#ifndef PCI_VENDOR_ID_QUMRANET -/** Vendor ID used by virtio devices */ -#define PCI_VENDOR_ID_QUMRANET 0x1AF4 -#endif - #ifndef PCI_VENDOR_ID_VMWARE /** Vendor ID used by VMware devices */ #define PCI_VENDOR_ID_VMWARE 0x15AD @@ -361,12 +352,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) -/****************** Virtio devices from virtio.h ******************/ - -#define QUMRANET_DEV_ID_VIRTIO 0x1000 - -RTE_PCI_DEV_ID_DECL_VIRTIO(PCI_VENDOR_ID_QUMRANET, QUMRANET_DEV_ID_VIRTIO) - /****************** VMware VMXNET3 devices ******************/ #define VMWARE_DEV_ID_VMXNET3 0x07B0 @@ -459,6 +444,5 @@ 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_VIRTIO #undef RTE_PCI_DEV_ID_DECL_VMXNET3 #undef RTE_PCI_DEV_ID_DECL_BNXT -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 06/10] net/vmxnet3: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (4 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 05/10] net/virtio: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 07/10] net/enic: " David Marchand ` (4 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Yong Wang Moved vmware device ids macro since the driver had no such information. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 9 ++++----- lib/librte_eal/common/include/rte_pci_dev_ids.h | 16 ---------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 8da4449..5874215 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -100,12 +100,11 @@ static void vmxnet3_process_events(struct vmxnet3_hw *); /* * The set of PCI devices this driver supports */ +#define VMWARE_PCI_VENDOR_ID 0x15AD +#define VMWARE_DEV_ID_VMXNET3 0x07B0 static const struct rte_pci_id pci_id_vmxnet3_map[] = { - -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - -{ .vendor_id = 0, /* sentinel */ }, + { RTE_PCI_DEVICE(VMWARE_PCI_VENDOR_ID, VMWARE_DEV_ID_VMXNET3) }, + { .vendor_id = 0, /* sentinel */ }, }; static const struct eth_dev_ops vmxnet3_eth_dev_ops = { 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 1c66784..a4aba6d 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,10 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_VMXNET3 -#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_ENIC #define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) #endif @@ -98,11 +94,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #endif -#ifndef PCI_VENDOR_ID_VMWARE -/** Vendor ID used by VMware devices */ -#define PCI_VENDOR_ID_VMWARE 0x15AD -#endif - #ifndef PCI_VENDOR_ID_CISCO /** Vendor ID used by Cisco VIC devices */ #define PCI_VENDOR_ID_CISCO 0x1137 @@ -352,12 +343,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) -/****************** VMware VMXNET3 devices ******************/ - -#define VMWARE_DEV_ID_VMXNET3 0x07B0 - -RTE_PCI_DEV_ID_DECL_VMXNET3(PCI_VENDOR_ID_VMWARE, VMWARE_DEV_ID_VMXNET3) - /****************** Cisco VIC devices ******************/ #define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ @@ -444,5 +429,4 @@ 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_VMXNET3 #undef RTE_PCI_DEV_ID_DECL_BNXT -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 07/10] net/enic: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (5 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 06/10] net/vmxnet3: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 08/10] net/bnx2x: " David Marchand ` (3 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, John Daley, Nelson Escobar Moved cisco vendor id since the driver had no such information. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/enic/enic_ethdev.c | 12 ++++-------- lib/librte_eal/common/include/rte_pci_dev_ids.h | 17 ----------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 633e431..3c87b49 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -57,15 +57,11 @@ /* * The set of PCI devices this driver supports */ +#define CISCO_PCI_VENDOR_ID 0x1137 static const struct rte_pci_id pci_id_enic_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#ifndef PCI_VENDOR_ID_CISCO -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif -#include "rte_pci_dev_ids.h" -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) -{.vendor_id = 0, /* Sentinal */}, + { RTE_PCI_DEVICE(CISCO_PCI_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET) }, + { RTE_PCI_DEVICE(CISCO_PCI_VENDOR_ID, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) }, + {.vendor_id = 0, /* sentinel */}, }; static 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 a4aba6d..ef85d08 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,10 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_ENIC -#define RTE_PCI_DEV_ID_DECL_ENIC(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNX2X #define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) #endif @@ -94,11 +90,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #endif -#ifndef PCI_VENDOR_ID_CISCO -/** Vendor ID used by Cisco VIC devices */ -#define PCI_VENDOR_ID_CISCO 0x1137 -#endif - #ifndef PCI_VENDOR_ID_BROADCOM /** Vendor ID used by Broadcom devices */ #define PCI_VENDOR_ID_BROADCOM 0x14E4 @@ -343,14 +334,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) -/****************** Cisco VIC devices ******************/ - -#define PCI_DEVICE_ID_CISCO_VIC_ENET 0x0043 /* ethernet vnic */ -#define PCI_DEVICE_ID_CISCO_VIC_ENET_VF 0x0071 /* enet SRIOV VF */ - -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET) -RTE_PCI_DEV_ID_DECL_ENIC(PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_CISCO_VIC_ENET_VF) - /****************** QLogic devices ******************/ /* Broadcom/QLogic BNX2X */ -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 08/10] net/bnx2x: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (6 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 07/10] net/enic: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 09/10] net/bnxt: " David Marchand ` (2 subsequent siblings) 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Sony Chacko, Harish Patil, Rasesh Mody Reused defines from the driver and moved broadcom vendor id macro. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x_ethdev.c | 21 ++++++++-- lib/librte_eal/common/include/rte_pci_dev_ids.h | 55 ------------------------- 3 files changed, 18 insertions(+), 61 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 10859c1..95fbad8 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -22,7 +22,6 @@ #include "ecore_init_ops.h" #include "rte_version.h" -#include "rte_pci_dev_ids.h" #include <sys/types.h> #include <sys/stat.h> @@ -9572,7 +9571,7 @@ void bnx2x_load_firmware(struct bnx2x_softc *sc) int f; struct stat st; - fwname = sc->devinfo.device_id == BNX2X_DEV_ID_57711 + fwname = sc->devinfo.device_id == CHIP_NUM_57711 ? FW_NAME_57711 : FW_NAME_57810; f = open(fwname, O_RDONLY); if (f < 0) { diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 84c9662..c8d2bf2 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -16,15 +16,28 @@ /* * The set of PCI devices this driver supports */ +#define BROADCOM_PCI_VENDOR_ID 0x14E4 static struct rte_pci_id pci_id_bnx2x_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57711) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_OBS) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_4_10) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_2_20) }, +#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_MF) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_MF) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_MF) }, +#endif { .vendor_id = 0, } }; static struct rte_pci_id pci_id_bnx2xvf_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800_VF) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_VF) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_VF) }, + { RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_VF) }, { .vendor_id = 0, } }; 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 ef85d08..fd2eb5d 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,14 +73,6 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_BNX2X -#define RTE_PCI_DEV_ID_DECL_BNX2X(vend, dev) -#endif - -#ifndef RTE_PCI_DEV_ID_DECL_BNX2XVF -#define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev) -#endif - #ifndef RTE_PCI_DEV_ID_DECL_BNXT #define RTE_PCI_DEV_ID_DECL_BNXT(vend, dev) #endif @@ -334,51 +326,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) -/****************** QLogic devices ******************/ - -/* Broadcom/QLogic BNX2X */ -#define BNX2X_DEV_ID_57710 0x164e -#define BNX2X_DEV_ID_57711 0x164f -#define BNX2X_DEV_ID_57711E 0x1650 -#define BNX2X_DEV_ID_57712 0x1662 -#define BNX2X_DEV_ID_57712_MF 0x1663 -#define BNX2X_DEV_ID_57712_VF 0x166f -#define BNX2X_DEV_ID_57713 0x1651 -#define BNX2X_DEV_ID_57713E 0x1652 -#define BNX2X_DEV_ID_57800 0x168a -#define BNX2X_DEV_ID_57800_MF 0x16a5 -#define BNX2X_DEV_ID_57800_VF 0x16a9 -#define BNX2X_DEV_ID_57810 0x168e -#define BNX2X_DEV_ID_57810_MF 0x16ae -#define BNX2X_DEV_ID_57810_VF 0x16af -#define BNX2X_DEV_ID_57811 0x163d -#define BNX2X_DEV_ID_57811_MF 0x163e -#define BNX2X_DEV_ID_57811_VF 0x163f - -#define BNX2X_DEV_ID_57840_OBS 0x168d -#define BNX2X_DEV_ID_57840_OBS_MF 0x16ab -#define BNX2X_DEV_ID_57840_4_10 0x16a1 -#define BNX2X_DEV_ID_57840_2_20 0x16a2 -#define BNX2X_DEV_ID_57840_MF 0x16a4 -#define BNX2X_DEV_ID_57840_VF 0x16ad - -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57800_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57711) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_VF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_OBS) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_4_10) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_2_20) -RTE_PCI_DEV_ID_DECL_BNX2XVF(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_VF) -#ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57810_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_MF) -RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF) -#endif - /****************** Broadcom bnxt devices ******************/ #define BROADCOM_DEV_ID_57301 0x16c8 @@ -406,8 +353,6 @@ RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314) /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */ -#undef RTE_PCI_DEV_ID_DECL_BNX2X -#undef RTE_PCI_DEV_ID_DECL_BNX2XVF #undef RTE_PCI_DEV_ID_DECL_IGB #undef RTE_PCI_DEV_ID_DECL_IGBVF #undef RTE_PCI_DEV_ID_DECL_IXGBE -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 09/10] net/bnxt: move PCI device ids to the driver 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (7 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 08/10] net/bnx2x: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 10/10] net/ena: remove unneeded PCI macro David Marchand 2016-07-11 16:27 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) Thomas Monjalon 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Stephen Hurd Moved defines since the driver had no such information. Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/bnxt/bnxt_ethdev.c | 27 +++++++++++++++++--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 34 ------------------------- 2 files changed, 24 insertions(+), 37 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 9a2123e..3795fac 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -56,10 +56,31 @@ static const char bnxt_version[] = "Broadcom Cumulus driver " DRV_MODULE_NAME "\n"; +#define PCI_VENDOR_ID_BROADCOM 0x14E4 + +#define BROADCOM_DEV_ID_57301 0x16c8 +#define BROADCOM_DEV_ID_57302 0x16c9 +#define BROADCOM_DEV_ID_57304_PF 0x16ca +#define BROADCOM_DEV_ID_57304_VF 0x16cb +#define BROADCOM_DEV_ID_57402 0x16d0 +#define BROADCOM_DEV_ID_57404 0x16d1 +#define BROADCOM_DEV_ID_57406_PF 0x16d2 +#define BROADCOM_DEV_ID_57406_VF 0x16d3 +#define BROADCOM_DEV_ID_57406_MF 0x16d4 +#define BROADCOM_DEV_ID_57314 0x16df + static struct rte_pci_id bnxt_pci_id_map[] = { -#define RTE_PCI_DEV_ID_DECL_BNXT(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include "rte_pci_dev_ids.h" - {.device_id = 0}, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57301) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57302) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_PF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57402) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57404) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_PF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314) }, + { .vendor_id = 0, /* sentinel */ }, }; #define BNXT_ETH_RSS_SUPPORT ( \ 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 fd2eb5d..6ec8ae8 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -73,20 +73,11 @@ #define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) #endif -#ifndef RTE_PCI_DEV_ID_DECL_BNXT -#define RTE_PCI_DEV_ID_DECL_BNXT(vend, dev) -#endif - #ifndef PCI_VENDOR_ID_INTEL /** Vendor ID used by Intel devices */ #define PCI_VENDOR_ID_INTEL 0x8086 #endif -#ifndef PCI_VENDOR_ID_BROADCOM -/** Vendor ID used by Broadcom devices */ -#define PCI_VENDOR_ID_BROADCOM 0x14E4 -#endif - /******************** Physical IGB devices from e1000_hw.h ********************/ #define E1000_DEV_ID_82576 0x10C9 @@ -326,30 +317,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) -/****************** Broadcom bnxt devices ******************/ - -#define BROADCOM_DEV_ID_57301 0x16c8 -#define BROADCOM_DEV_ID_57302 0x16c9 -#define BROADCOM_DEV_ID_57304_PF 0x16ca -#define BROADCOM_DEV_ID_57304_VF 0x16cb -#define BROADCOM_DEV_ID_57402 0x16d0 -#define BROADCOM_DEV_ID_57404 0x16d1 -#define BROADCOM_DEV_ID_57406_PF 0x16d2 -#define BROADCOM_DEV_ID_57406_VF 0x16d3 -#define BROADCOM_DEV_ID_57406_MF 0x16d4 -#define BROADCOM_DEV_ID_57314 0x16df - -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57301) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57302) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_PF) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_VF) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57402) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57404) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_PF) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_VF) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57406_MF) -RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314) - /* * Undef all RTE_PCI_DEV_ID_DECL_* here. */ @@ -357,4 +324,3 @@ 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_BNXT -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* [dpdk-dev] [PATCH v4 10/10] net/ena: remove unneeded PCI macro 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (8 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 09/10] net/bnxt: " David Marchand @ 2016-07-11 14:40 ` David Marchand 2016-07-11 16:27 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) Thomas Monjalon 10 siblings, 0 replies; 92+ messages in thread From: David Marchand @ 2016-07-11 14:40 UTC (permalink / raw) To: dev Cc: bruce.richardson, thomas.monjalon, nhorman, pmatilai, christian.ehrhardt, stephen, Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin I suppose this is a remnant of rte_pci_dev_ids.h, just remove this. Signed-off-by: David Marchand <david.marchand@6wind.com> --- drivers/net/ena/ena_ethdev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index f1b5e64..ac0803d 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -169,10 +169,9 @@ static const struct ena_stats ena_stats_ena_com_strings[] = { #define PCI_DEVICE_ID_ENA_LLQ_VF 0xEC21 static struct rte_pci_id pci_id_ena_map[] = { -#define RTE_PCI_DEV_ID_DECL_ENA(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, - RTE_PCI_DEV_ID_DECL_ENA(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) - RTE_PCI_DEV_ID_DECL_ENA(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) - {.device_id = 0}, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) }, + { .device_id = 0 }, }; static int ena_device_init(struct ena_com_dev *ena_dev, -- 1.9.1 ^ permalink raw reply [flat|nested] 92+ messages in thread
* Re: [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand ` (9 preceding siblings ...) 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 10/10] net/ena: remove unneeded PCI macro David Marchand @ 2016-07-11 16:27 ` Thomas Monjalon 10 siblings, 0 replies; 92+ messages in thread From: Thomas Monjalon @ 2016-07-11 16:27 UTC (permalink / raw) To: David Marchand Cc: dev, bruce.richardson, nhorman, pmatilai, christian.ehrhardt, stephen, Wenzhuo Lu, Helin Zhang, Jingjing Wu, Jing Chen, Huawei Xie, Yuanhan Liu, Yong Wang, John Daley, Nelson Escobar, Sony Chacko, Harish Patil, Rasesh Mody, Stephen Hurd, Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin 2016-07-11 16:40, David Marchand: > With the introduction of pmdinfo by Neil, we have almost everything in place > to get rid of the pci devices in eal. > > We still have some ties with some pmds for functionalities like kni/ethtool or > ixgbe bypass api, so the plan has switched to touch all pmds but those igb and > ixgbe drivers. > > Since we still need rte_pci_dev_ids.h for those drivers, I just stripped the > doxygen parts to stop referencing it in the documentation. > > I have validated this patchset by comparing the pmdinfo outputs and just > noticed a difference for enic (where the pci ids were registered twice > before). > Yet, please maintainers review carefully. Applied, thanks ^ permalink raw reply [flat|nested] 92+ messages in thread
end of thread, other threads:[~2016-07-11 16:27 UTC | newest] Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-01-05 19:37 [dpdk-dev] time to kill rte_pci_dev_ids.h Stephen Hemminger 2016-01-06 1:40 ` Thomas Monjalon 2016-01-08 13:20 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 02/11] ixgbe: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 03/11] i40e: " David Marchand 2016-01-10 20:02 ` Stephen Hemminger 2016-01-12 8:45 ` David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 04/11] fm10k: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 05/11] virtio: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 06/11] vmxnet3: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 07/11] enic: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 08/11] bnx2x: " David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 09/11] doc: refresh headers list David Marchand 2016-01-12 14:06 ` Mcnamara, John 2016-01-16 15:10 ` David Marchand 2016-01-18 9:47 ` Thomas Monjalon 2016-01-18 16:25 ` Mcnamara, John 2016-01-10 12:50 ` [dpdk-dev] [PATCH 10/11] pci: no need for global device ids list David Marchand 2016-01-10 12:50 ` [dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section David Marchand 2016-01-10 12:58 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand 2016-01-10 13:24 ` Thomas Monjalon 2016-01-10 13:26 ` David Marchand 2016-01-10 13:27 ` David Marchand 2016-01-10 15:53 ` Zhang, Helin 2016-01-16 15:02 ` David Marchand 2016-01-21 1:12 ` Zhang, Helin 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 02/10] ixgbe: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 03/10] i40e: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 04/10] fm10k: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 05/10] virtio: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 06/10] vmxnet3: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 07/10] enic: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 08/10] bnx2x: " David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 09/10] pci: no need for global device ids list David Marchand 2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section David Marchand 2016-01-19 7:30 ` Thomas Monjalon 2016-01-19 14:29 ` Neil Horman 2016-01-19 16:10 ` Stephen Hemminger 2016-01-19 20:56 ` Neil Horman 2016-01-19 21:35 ` Stephen Hemminger 2016-01-20 15:40 ` Neil Horman 2016-02-24 11:37 ` Bruce Richardson 2016-02-24 11:50 ` Thomas Monjalon 2016-02-24 14:18 ` Neil Horman 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand 2016-04-20 13:29 ` Neil Horman 2016-04-20 13:39 ` David Marchand 2016-04-20 18:15 ` Neil Horman 2016-04-21 7:27 ` David Marchand 2016-04-21 12:08 ` Neil Horman 2016-04-21 12:41 ` Thomas Monjalon 2016-04-22 12:13 ` Neil Horman 2016-04-22 13:22 ` Thomas Monjalon 2016-07-08 13:31 ` Thomas Monjalon 2016-07-11 5:33 ` Yuanhan Liu 2016-07-11 5:56 ` Thomas Monjalon 2016-07-11 6:05 ` Yuanhan Liu 2016-07-11 11:35 ` David Marchand 2016-07-11 12:05 ` Yuanhan Liu 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 02/13] ixgbe: " David Marchand 2016-04-29 1:34 ` Wu, Jingjing 2016-05-04 8:26 ` David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 03/13] i40e: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 04/13] fm10k: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 05/13] virtio: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 06/13] vmxnet3: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 07/13] enic: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 08/13] bnx2x: " David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 09/13] ena: remove unneeded pci macro David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 10/13] pci: no need for global device ids list David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 11/13] drivers: constify pci id tables David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 12/13] drivers: export pci drivers David Marchand 2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 13/13] app: introduce dpdk-obj-info tool David Marchand 2016-04-21 8:07 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand 2016-04-21 12:13 ` Neil Horman 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 02/10] net/e1000: move em PCI device ids to the driver David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 03/10] net/i40e: move " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 04/10] net/fm10k: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 05/10] net/virtio: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 06/10] net/vmxnet3: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 07/10] net/enic: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 08/10] net/bnx2x: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 09/10] net/bnxt: " David Marchand 2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 10/10] net/ena: remove unneeded PCI macro David Marchand 2016-07-11 16:27 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).