From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 4FB922BBB for ; Thu, 15 Jun 2017 11:54:56 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D5E5320B3A; Thu, 15 Jun 2017 05:54:55 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 15 Jun 2017 05:54:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=PY2lqDVivEbuRS/QJn8UkFZyF1BcidT8gAmPjk Xv44A=; b=R9SLoGAv4SvC0G6xyA7MYrTVcR/9K1Si/raW1KhJfKcMe0gzZxwDUo sSlYghw/O6vzInrxycB0JNk+aNQBsytrwkqVNSCh9xRrskErE7tQNlTBzT24nqzH SjEcPJ9OZfZUuT8RcK0Ve6R1xMx5yQ/1sILgON/151GC3xY0xyGp8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=PY2lqDVivEbuRS/QJn 8UkFZyF1BcidT8gAmPjkXv44A=; b=ke+9AePy9a7dS4B3y7otNojG197wRdxQV2 L2vr+TasFRi3Y/8wAnpCBF4MevV5qH7yt7chtbjLPM5kSamS7Zs/zKQ3Yd0ZXB1f 6jxKtfgDnv0TguRrJJUB2Rv4hy7wlqQuNhETTy7RhPnosDb3lb9Aj39wUodciASK S32eRr+ViZsFjlIWue67NkrI+nNJEpp5i6HUMpJvBUmbld1rlcyfnqJOnKz1PcLh jOvXMe3wrVU0RDkDc0XdyRNjK4N48tafX93+5sSVF5lMntSoIOEXkohyCxWoSrXF RFr2KTh/FXr1HrFX5ksFjvsALhMxOrB+hSBHoMse2+MHFFasB2PQ== X-ME-Sender: X-Sasl-enc: wFfVe8Bn63sEiTmz5NP7ahCAGyv1LJQCDsZUQrnEtoi5 1497520495 Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 208212492D; Thu, 15 Jun 2017 05:54:54 -0400 (EDT) From: Thomas Monjalon To: radu.nicolau@intel.com Cc: wenzhuo.lu@intel.com, dev@dpdk.org Date: Thu, 15 Jun 2017 11:54:46 +0200 Message-Id: <20170615095446.2187-1-thomas@monjalon.net> X-Mailer: git-send-email 2.13.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe 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: Thu, 15 Jun 2017 09:54:56 -0000 When ixgbe bypass is not explictly disabled while ixgbe is disabled: app/test-pmd/testpmd.c:304:27: error: ‘RTE_PMD_IXGBE_BYPASS_TMT_OFF’ undeclared here The ixgbe bypass feature is meaningful only if ixgbe is enabled. So we need to check both. A best fix will be to enable bypass always and remove this option. Fixes: e261265e42a1 ("ethdev: move bypass functions to ixgbe PMD") Signed-off-by: Thomas Monjalon --- app/test-pmd/cmdline.c | 8 ++++---- app/test-pmd/testpmd.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index b84c1ab40..7f5373a7e 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -3928,7 +3928,7 @@ cmd_set_bypass_mode_parsed(void *parsed_result, portid_t port_id = res->port_id; int32_t rc = -EINVAL; -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL; if (!strcmp(res->value, "bypass")) @@ -3996,7 +3996,7 @@ cmd_set_bypass_event_parsed(void *parsed_result, struct cmd_set_bypass_event_result *res = parsed_result; portid_t port_id = res->port_id; -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS uint32_t bypass_event = RTE_PMD_IXGBE_BYPASS_EVENT_NONE; uint32_t bypass_mode = RTE_PMD_IXGBE_BYPASS_MODE_NORMAL; @@ -4101,7 +4101,7 @@ cmd_set_bypass_timeout_parsed(void *parsed_result, { __rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result; -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS if (!strcmp(res->value, "1.5")) bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC; else if (!strcmp(res->value, "2")) @@ -4164,7 +4164,7 @@ cmd_show_bypass_config_parsed(void *parsed_result, struct cmd_show_bypass_config_result *res = parsed_result; portid_t port_id = res->port_id; int rc = -EINVAL; -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS uint32_t event_mode; uint32_t bypass_mode; uint32_t timeout = bypass_timeout; diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index d32cbb96d..b29328a69 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -299,7 +299,7 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) | * NIC bypass mode configuration options. */ -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS /* The NIC bypass watchdog timeout. */ uint32_t bypass_timeout = RTE_PMD_IXGBE_BYPASS_TMT_OFF; #endif @@ -2015,7 +2015,7 @@ init_port_config(void) rte_eth_macaddr_get(pid, &port->eth_addr); map_port_queue_stats_mapping_registers(pid, port); -#ifdef RTE_LIBRTE_IXGBE_BYPASS +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS rte_pmd_ixgbe_bypass_init(pid); #endif -- 2.13.1