DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
@ 2017-06-15  9:54 Thomas Monjalon
  2017-06-15 11:37 ` Radu Nicolau
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2017-06-15  9:54 UTC (permalink / raw)
  To: radu.nicolau; +Cc: wenzhuo.lu, dev

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 <thomas@monjalon.net>
---
 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-15  9:54 [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe Thomas Monjalon
@ 2017-06-15 11:37 ` Radu Nicolau
  2017-06-15 12:48   ` Thomas Monjalon
  2017-06-16  1:29   ` Lu, Wenzhuo
  0 siblings, 2 replies; 7+ messages in thread
From: Radu Nicolau @ 2017-06-15 11:37 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: wenzhuo.lu, dev

Looks ok to me, but why would one enable IXGBE_BYPASS without enabling 
IXGBE?


On 6/15/2017 10:54 AM, Thomas Monjalon wrote:
> 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 <thomas@monjalon.net>
> ---
>   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
>   

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-15 11:37 ` Radu Nicolau
@ 2017-06-15 12:48   ` Thomas Monjalon
  2017-06-16  1:29   ` Lu, Wenzhuo
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-06-15 12:48 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: wenzhuo.lu, dev

15/06/2017 13:37, Radu Nicolau:
> Looks ok to me, but why would one enable IXGBE_BYPASS without enabling 
> IXGBE?
[...]
> > -#ifdef RTE_LIBRTE_IXGBE_BYPASS
> > +#if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS

RTE_LIBRTE_IXGBE_BYPASS should not be enabled if RTE_LIBRTE_IXGBE_PMD is disabled.
But it can happen in some scripted configuration like test-build.sh does.

Anyway we should drop the RTE_LIBRTE_IXGBE_BYPASS configuration option
and enables it always.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-15 11:37 ` Radu Nicolau
  2017-06-15 12:48   ` Thomas Monjalon
@ 2017-06-16  1:29   ` Lu, Wenzhuo
  2017-06-16 14:09     ` Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Lu, Wenzhuo @ 2017-06-16  1:29 UTC (permalink / raw)
  To: Nicolau, Radu, Thomas Monjalon; +Cc: dev

Hi Radu,

> -----Original Message-----
> From: Nicolau, Radu
> Sent: Thursday, June 15, 2017 7:37 PM
> To: Thomas Monjalon
> Cc: Lu, Wenzhuo; dev@dpdk.org
> Subject: Re: [PATCH] app/testpmd: fix build without ixgbe
> 
> Looks ok to me, but why would one enable IXGBE_BYPASS without enabling
> IXGBE?
Although the scenario doesn't make sense, I think it's better to add more check to avoid the users making any mistake.

> 
> 
> On 6/15/2017 10:54 AM, Thomas Monjalon wrote:
> > 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 <thomas@monjalon.net>
> > ---
> >   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
> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-16  1:29   ` Lu, Wenzhuo
@ 2017-06-16 14:09     ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-06-16 14:09 UTC (permalink / raw)
  To: Lu, Wenzhuo, Nicolau, Radu; +Cc: dev

16/06/2017 03:29, Lu, Wenzhuo:
> From: Nicolau, Radu
> > 
> > Looks ok to me, but why would one enable IXGBE_BYPASS without enabling
> > IXGBE?
> 
> Although the scenario doesn't make sense, I think it's better to add more check to avoid the users making any mistake.

Applied

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-15 10:17 ` [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe Thomas Monjalon
@ 2017-06-15 16:35   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-06-15 16:35 UTC (permalink / raw)
  To: ajit.khaparde; +Cc: dev, Jan Viktorin

15/06/2017 12:17, Thomas Monjalon:
> cmd_set_vf_rxmode_parsed() was defined only in the build context
> of RTE_LIBRTE_IXGBE_PMD:
> app/test-pmd/cmdline.c:13817:27: error: ‘cmd_set_vf_rxmode’ undeclared here
> 
> Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
> 
> Reported-by: Jan Viktorin <viktorin@rehivetech.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Applied quickly

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe
  2017-06-15  7:26 [dpdk-dev] cmdline.c: error: ‘cmd_set_vf_rxmode’ undeclared here (not in a function) Jan Viktorin
@ 2017-06-15 10:17 ` Thomas Monjalon
  2017-06-15 16:35   ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2017-06-15 10:17 UTC (permalink / raw)
  To: ajit.khaparde; +Cc: Jan Viktorin, dev

cmd_set_vf_rxmode_parsed() was defined only in the build context
of RTE_LIBRTE_IXGBE_PMD:
app/test-pmd/cmdline.c:13817:27: error: ‘cmd_set_vf_rxmode’ undeclared here

Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")

Reported-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 7f5373a7e..105c71f39 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6803,6 +6803,7 @@ cmdline_parse_inst_t cmd_set_vf_traffic = {
 		NULL,
 	},
 };
+#endif /* RTE_LIBRTE_IXGBE_PMD */
 
 /* *** CONFIGURE VF RECEIVE MODE *** */
 struct cmd_set_vf_rxmode {
@@ -6894,7 +6895,6 @@ cmdline_parse_inst_t cmd_set_vf_rxmode = {
 		NULL,
 	},
 };
-#endif
 
 /* *** ADD MAC ADDRESS FILTER FOR A VF OF A PORT *** */
 struct cmd_vf_mac_addr_result {
-- 
2.13.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-16 14:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15  9:54 [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe Thomas Monjalon
2017-06-15 11:37 ` Radu Nicolau
2017-06-15 12:48   ` Thomas Monjalon
2017-06-16  1:29   ` Lu, Wenzhuo
2017-06-16 14:09     ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2017-06-15  7:26 [dpdk-dev] cmdline.c: error: ‘cmd_set_vf_rxmode’ undeclared here (not in a function) Jan Viktorin
2017-06-15 10:17 ` [dpdk-dev] [PATCH] app/testpmd: fix build without ixgbe Thomas Monjalon
2017-06-15 16:35   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).