From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v8 1/4] ethtool: move from sample folder to lib folder Date: Mon, 26 Jun 2017 12:02:54 +0100 Message-ID: <20170626110254.GA102672@bricha3-MOBL3.ger.corp.intel.com> References: <20170526165228.96919-1-ferruh.yigit@intel.com> <20170621110651.75299-1-ferruh.yigit@intel.com> <20170621110651.75299-2-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, anatoly.burakov@intel.com To: Ferruh Yigit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E47AF968 for ; Mon, 26 Jun 2017 13:02:58 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20170621110651.75299-2-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jun 21, 2017 at 12:06:48PM +0100, Ferruh Yigit wrote: > Signed-off-by: Ferruh Yigit This patch fails to compile with gcc 7.1 Comment at error site below. /Bruce > --- > v7: > * rebase v17.08 > --- > config/common_base | 5 ++ > config/common_linuxapp | 1 + > doc/api/doxy-api-index.md | 3 +- > doc/api/doxy-api.conf | 1 + > doc/guides/prog_guide/ethtool_lib.rst | 62 ++++++++++++++++++++++ > doc/guides/prog_guide/index.rst | 1 + > doc/guides/rel_notes/release_17_08.rst | 1 + > doc/guides/sample_app_ug/ethtool.rst | 36 ++----------- > examples/ethtool/Makefile | 24 +++++---- > examples/ethtool/{ethtool-app => }/ethapp.c | 2 +- > examples/ethtool/{ethtool-app => }/ethapp.h | 2 +- > examples/ethtool/{ethtool-app => }/main.c | 0 > lib/Makefile | 2 + > .../ethtool/lib => lib/librte_ethtool}/Makefile | 35 +++++------- > .../lib => lib/librte_ethtool}/rte_ethtool.c | 12 ----- > .../lib => lib/librte_ethtool}/rte_ethtool.h | 59 ++++++++++---------- > lib/librte_ethtool/rte_ethtool_version.map | 28 ++++++++++ > mk/rte.app.mk | 1 + > 18 files changed, 167 insertions(+), 108 deletions(-) > #include "rte_ethtool.h" > > #define PKTPOOL_SIZE 512 > @@ -363,20 +360,11 @@ rte_ethtool_net_set_rx_mode(uint8_t port_id) > { > uint16_t num_vfs; > struct rte_eth_dev_info dev_info; > - uint16_t vf; > > memset(&dev_info, 0, sizeof(dev_info)); > rte_eth_dev_info_get(port_id, &dev_info); > num_vfs = dev_info.max_vfs; > > - /* Set VF vf_rx_mode, VF unsupport status is discard */ > - for (vf = 0; vf < num_vfs; vf++) { > -#ifdef RTE_LIBRTE_IXGBE_PMD > - rte_pmd_ixgbe_set_vf_rxmode(port_id, vf, > - ETH_VMDQ_ACCEPT_UNTAG, 0); > -#endif > - } > - > /* Enable Rx vlan filter, VF unspport status is discard */ > rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK); > Compiler gives error about num_vfs being unused. Looking at the code now, with the removal of the ifdef, it looks like this can be collapsed down to a 1-line function.