PCI ID and address in structure rte_kni_conf are never used and
will be removed in kni library. So remove the setting of them
first in the example.

Signed-off-by: Chenbo Xia <chenbo....@intel.com>
---
 examples/ip_pipeline/kni.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/examples/ip_pipeline/kni.c b/examples/ip_pipeline/kni.c
index a2d3331cb0..fccecc3dc6 100644
--- a/examples/ip_pipeline/kni.c
+++ b/examples/ip_pipeline/kni.c
@@ -6,7 +6,6 @@
 #include <string.h>
 
 #include <rte_ethdev.h>
-#include <rte_bus_pci.h>
 #include <rte_string_fns.h>
 
 #include "kni.h"
@@ -100,16 +99,12 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 struct kni *
 kni_create(const char *name, struct kni_params *params)
 {
-       struct rte_eth_dev_info dev_info;
        struct rte_kni_conf kni_conf;
        struct rte_kni_ops kni_ops;
        struct kni *kni;
        struct mempool *mempool;
        struct link *link;
        struct rte_kni *k;
-       const struct rte_pci_device *pci_dev;
-       const struct rte_bus *bus = NULL;
-       int ret;
 
        /* Check input params */
        if ((name == NULL) ||
@@ -124,23 +119,12 @@ kni_create(const char *name, struct kni_params *params)
                return NULL;
 
        /* Resource create */
-       ret = rte_eth_dev_info_get(link->port_id, &dev_info);
-       if (ret != 0)
-               return NULL;
-
        memset(&kni_conf, 0, sizeof(kni_conf));
        strlcpy(kni_conf.name, name, RTE_KNI_NAMESIZE);
        kni_conf.force_bind = params->force_bind;
        kni_conf.core_id = params->thread_id;
        kni_conf.group_id = link->port_id;
        kni_conf.mbuf_size = mempool->buffer_size;
-       if (dev_info.device)
-               bus = rte_bus_find_by_device(dev_info.device);
-       if (bus && !strcmp(bus->name, "pci")) {
-               pci_dev = RTE_DEV_TO_PCI(dev_info.device);
-               kni_conf.addr = pci_dev->addr;
-               kni_conf.id = pci_dev->id;
-       }
 
        memset(&kni_ops, 0, sizeof(kni_ops));
        kni_ops.port_id = link->port_id;
-- 
2.17.1

Reply via email to