On 10/19/2017 11:53 AM, avia...@dev.mellanox.co.il wrote:
> From: Aviad Yehezkel <avia...@mellanox.com>

Hi Aviad,

What do you think using RTE_SET_USED() as done in other samples, we know those
variables may not be used if PMDs are not defined, no need to make code more
complex.

Like:
  --- a/app/test-pmd/cmdline.c
  +++ b/app/test-pmd/cmdline.c
  @@ -7504,6 +7504,9 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
                  ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
                                                  rx_mode, (uint8_t)is_on);
   #endif
  +
  +       RTE_SET_USED(is_on);
  +
          if (ret < 0)
                  printf("bad VF receive mode parameter, return code = %d \n",
                  ret);

  --- a/app/test-pmd/config.c
  +++ b/app/test-pmd/config.c
  @@ -3197,6 +3197,10 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf,
uint16_t rate, uint64_t q_msk)
          if (diag == 0)
                  return diag;

  +       RTE_SET_USED(vf);
  +       RTE_SET_USED(rate);
  +       RTE_SET_USED(q_msk);
  +
          printf("set_vf_rate_limit for port_id=%d failed diag=%d\n",
                  port_id, diag);
          return diag;


> 
> Signed-off-by: Aviad Yehezkel <avia...@mellanox.com>
> Signed-off-by: Nicolai Radu <radu.nico...@intel.com>

<...>


Reply via email to