[dpdk-dev] [PATCH v8 1/4] ethtool: move from sample folder to lib folder

Bruce Richardson bruce.richardson at intel.com
Mon Jun 26 13:02:54 CEST 2017


On Wed, Jun 21, 2017 at 12:06:48PM +0100, Ferruh Yigit wrote:
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>

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(-)

<snip>

>  #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.



More information about the dev mailing list