From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A735A0548; Fri, 10 Sep 2021 04:38:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2498D41104; Fri, 10 Sep 2021 04:38:13 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id ED164410FE for ; Fri, 10 Sep 2021 04:38:11 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="243292325" X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="243292325" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 19:38:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="540096619" Received: from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.119.53]) by FMSMGA003.fm.intel.com with ESMTP; 09 Sep 2021 19:38:10 -0700 From: Chenbo Xia To: dev@dpdk.org Cc: Cristian Dumitrescu Date: Fri, 10 Sep 2021 10:24:00 +0800 Message-Id: <20210910022402.26620-7-chenbo.xia@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210910022402.26620-1-chenbo.xia@intel.com> References: <20210910022402.26620-1-chenbo.xia@intel.com> Subject: [dpdk-dev] [PATCH 6/8] examples/ip_pipeline: remove setting of PCI ID and address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 #include -#include #include #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