addr and id fields are deprecated and are not used in the kni library.
Stop populating them in the in-tree examples.

Signed-off-by: David Marchand <david.march...@redhat.com>
Acked-by: Bruce Richardson <bruce.richard...@intel.com>
---
 app/test/test_kni.c        | 30 ------------------------------
 examples/ip_pipeline/kni.c | 10 ----------
 2 files changed, 40 deletions(-)

diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 622315c8b1..4039da0b08 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -25,7 +25,6 @@ test_kni(void)
 #include <rte_string_fns.h>
 #include <rte_mempool.h>
 #include <rte_ethdev.h>
-#include <rte_bus_pci.h>
 #include <rte_cycles.h>
 #include <rte_kni.h>
 
@@ -426,8 +425,6 @@ test_kni_processing(uint16_t port_id, struct rte_mempool 
*mp)
        struct rte_kni_conf conf;
        struct rte_eth_dev_info info;
        struct rte_kni_ops ops;
-       const struct rte_pci_device *pci_dev;
-       const struct rte_bus *bus = NULL;
 
        if (!mp)
                return -1;
@@ -443,13 +440,6 @@ test_kni_processing(uint16_t port_id, struct rte_mempool 
*mp)
                return -1;
        }
 
-       if (info.device)
-               bus = rte_bus_find_by_device(info.device);
-       if (bus && !strcmp(bus->name, "pci")) {
-               pci_dev = RTE_DEV_TO_PCI(info.device);
-               conf.addr = pci_dev->addr;
-               conf.id = pci_dev->id;
-       }
        snprintf(conf.name, sizeof(conf.name), TEST_KNI_PORT);
 
        /* core id 1 configured for kernel thread */
@@ -545,8 +535,6 @@ test_kni(void)
        struct rte_kni_conf conf;
        struct rte_eth_dev_info info;
        struct rte_kni_ops ops;
-       const struct rte_pci_device *pci_dev;
-       const struct rte_bus *bus;
        FILE *fd;
        DIR *dir;
        char buf[16];
@@ -645,15 +633,6 @@ test_kni(void)
                return -1;
        }
 
-       if (info.device)
-               bus = rte_bus_find_by_device(info.device);
-       else
-               bus = NULL;
-       if (bus && !strcmp(bus->name, "pci")) {
-               pci_dev = RTE_DEV_TO_PCI(info.device);
-               conf.addr = pci_dev->addr;
-               conf.id = pci_dev->id;
-       }
        conf.group_id = port_id;
        conf.mbuf_size = MAX_PACKET_SZ;
 
@@ -689,15 +668,6 @@ test_kni(void)
                goto fail;
        }
 
-       if (info.device)
-               bus = rte_bus_find_by_device(info.device);
-       else
-               bus = NULL;
-       if (bus && !strcmp(bus->name, "pci")) {
-               pci_dev = RTE_DEV_TO_PCI(info.device);
-               conf.addr = pci_dev->addr;
-               conf.id = pci_dev->id;
-       }
        conf.group_id = port_id;
        conf.mbuf_size = MAX_PACKET_SZ;
 
diff --git a/examples/ip_pipeline/kni.c b/examples/ip_pipeline/kni.c
index a2d3331cb0..cd02c39478 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"
@@ -107,8 +106,6 @@ kni_create(const char *name, struct kni_params *params)
        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 */
@@ -134,13 +131,6 @@ kni_create(const char *name, struct kni_params *params)
        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.37.2

Reply via email to