From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E45791150 for ; Wed, 1 Feb 2017 17:24:57 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 01 Feb 2017 08:24:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,320,1477983600"; d="scan'208";a="59688818" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga005.jf.intel.com with ESMTP; 01 Feb 2017 08:24:56 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX153.ger.corp.intel.com ([169.254.9.160]) with mapi id 14.03.0248.002; Wed, 1 Feb 2017 16:24:55 +0000 From: "Ananyev, Konstantin" To: "Lu, Wenzhuo" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: clean up rte_eth_dev_info_get Thread-Index: AQHSdrRVRl/bTuVA+02KkpIDzfQM9KFUYbeg Date: Wed, 1 Feb 2017 16:24:55 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583F10FFA1@irsmsx105.ger.corp.intel.com> References: <1485311962-62335-1-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: <1485311962-62335-1-git-send-email-wenzhuo.lu@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: clean up rte_eth_dev_info_get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 16:24:58 -0000 Hi Wenzhuo, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu > Sent: Wednesday, January 25, 2017 2:39 AM > To: dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: [dpdk-dev] [PATCH] net/ixgbe: clean up rte_eth_dev_info_get >=20 > It'not appropriate to call rte_eth_dev_info_get in PMD, > as rte_eth_dev_info_get need to get info from PMD. > Remove rte_eth_dev_info_get from PMD code and get the > info directly. >=20 > Signed-off-by: Wenzhuo Lu > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 144 ++++++++++++++++++---------------= ------ > 1 file changed, 68 insertions(+), 76 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index 64ce55a..f14a68b 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -4401,17 +4401,17 @@ static int ixgbevf_dev_xstats_get_names(__rte_unu= sed struct rte_eth_dev *dev, > int rar_entry; > uint8_t *new_mac =3D (uint8_t *)(mac_addr); > struct rte_eth_dev *dev; > - struct rte_eth_dev_info dev_info; > + struct rte_pci_device *pci_dev; >=20 > RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); >=20 > dev =3D &rte_eth_devices[port]; > - rte_eth_dev_info_get(port, &dev_info); > + pci_dev =3D IXGBE_DEV_TO_PCI(dev); >=20 > - if (is_ixgbe_pmd(dev_info.driver_name) !=3D 0) > + if (is_ixgbe_pmd(dev->data->drv_name)) > return -ENOTSUP; I wonder why do we need now that it is really an ixgbe device all over the = place? Konstantin