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 167501B7AE; Wed, 25 Oct 2017 22:13:35 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2017 13:13:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,433,1503385200"; d="scan'208";a="1235277378" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga002.fm.intel.com with ESMTP; 25 Oct 2017 13:13:33 -0700 From: Bruce Richardson To: Jingjing Wu Cc: dev@dpdk.org, Bruce Richardson , stable@dpdk.org Date: Wed, 25 Oct 2017 21:09:45 +0100 Message-Id: <20171025200945.82300-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] app/test-pmd: fix compiler error with drivers disabled 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, 25 Oct 2017 20:13:36 -0000 When both ixgbe and bnxt drivers are disabled at build time, testpmd has a compiler errors due to unused parameters, and unused variables. Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof") CC: stable@dpdk.org Signed-off-by: Bruce Richardson --- app/test-pmd/cmdline.c | 5 +++++ app/test-pmd/config.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 1159a4a47..809e3c25b 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -7504,6 +7504,11 @@ 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 +#ifndef RTE_LIBRTE_IXGBE_PMD +#ifndef RTE_LIBRTE_BNXT_PMD + RTE_SET_USED(is_on); +#endif +#endif if (ret < 0) printf("bad VF receive mode parameter, return code = %d \n", ret); diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index bafe76cf4..9440ff540 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3194,6 +3194,13 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk) if (diag == -ENOTSUP) diag = rte_pmd_bnxt_set_vf_rate_limit(port_id, vf, rate, q_msk); #endif +#ifndef RTE_LIBRTE_IXGBE_PMD +#ifndef RTE_LIBRTE_BNXT_PMD + RTE_SET_USED(vf); + RTE_SET_USED(rate); + RTE_SET_USED(q_msk); +#endif +#endif if (diag == 0) return diag; -- 2.13.6