DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications
@ 2018-07-25 14:40 Moti Haimovsky
  2018-07-25 14:42 ` Thomas Monjalon
  2018-07-25 15:30 ` [dpdk-dev] [PATCH v3] " Moti Haimovsky
  0 siblings, 2 replies; 7+ messages in thread
From: Moti Haimovsky @ 2018-07-25 14:40 UTC (permalink / raw)
  To: thomas; +Cc: dev, stable, Moti Haimovsky

This patch reverts the testpmd CLI prompt routine modifications done
in order to support softnic.
The reason of doing so is due to testpmd abnormal exit observed on
several setups caused by the softnic modifications to this routine,
for example: When running testpmd with tap interface
(/app/testpmd
 -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
 --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
 --rxd=512 --port-topology=chained --forward-mode=rxonly)
testpmd crashes seconds after presenting its prompt with the following
error:
  testpmd> PANIC in prompt():
  CLI poll error (-1)

  Thread 1 "testpmd" received signal SIGABRT, Aborted.
  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  (gdb) bt
  #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
  #2  0x0000000000468027 in __rte_panic ()
  #3  0x00000000004876ed in prompt ()
  #4  0x000000000046dffc in main ()

When running testpmd with bare-metal device
(app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
 --burst=64 --mbcache=512 -i  --nb-cores=7
 --rxq=64  --txq=4 --txd=16 --rxd=16)
and pressing CTRL+D right after testpmd prompt is presented then
the program crashes while presenting the same messages as above.

Needless to say that this behavior is not observed when using the
previous CLI prompt routine.

Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
v2:
* Removed softnic modifications altogether.
v1:
* Wrapped softnic modifications with compilation switch.
---
 app/test-pmd/cmdline.c | 39 ++-------------------------------------
 1 file changed, 2 insertions(+), 37 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2c32029..d058860 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17896,50 +17896,15 @@ struct cmd_config_per_queue_tx_offload_result {
 void
 prompt(void)
 {
-	int status;
-
 	/* initialize non-constant commands */
 	cmd_set_fwd_mode_init();
 	cmd_set_fwd_retry_mode_init();
 
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	portid_t softnic_portid, pid;
-	uint8_t softnic_enable = 0;
-
-	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
-		RTE_ETH_FOREACH_DEV(pid) {
-			struct rte_port *port = &ports[pid];
-			const char *driver = port->dev_info.driver_name;
-
-			if (strcmp(driver, "net_softnic") == 0) {
-				softnic_portid = pid;
-				softnic_enable = 1;
-				break;
-			}
-		}
-	}
-#endif
-
 	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
 	if (testpmd_cl == NULL)
 		return;
-
-	for (;;) {
-		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
-			cmdline_stdin_exit(testpmd_cl);
-			rte_exit(0, "\n");
-		}
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-
-	if ((softnic_enable == 1) &&
-		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
-		rte_pmd_softnic_manage(softnic_portid);
-#endif
-	}
+	cmdline_interact(testpmd_cl);
+	cmdline_stdin_exit(testpmd_cl);
 }
 
 void
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications
  2018-07-25 14:40 [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications Moti Haimovsky
@ 2018-07-25 14:42 ` Thomas Monjalon
  2018-07-25 14:59   ` Singh, Jasvinder
  2018-07-25 15:30 ` [dpdk-dev] [PATCH v3] " Moti Haimovsky
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2018-07-25 14:42 UTC (permalink / raw)
  To: Moti Haimovsky
  Cc: dev, stable, jasvinder.singh, cristian.dumitrescu, konstantin.ananyev

+Cc

25/07/2018 16:40, Moti Haimovsky:
> This patch reverts the testpmd CLI prompt routine modifications done
> in order to support softnic.
> The reason of doing so is due to testpmd abnormal exit observed on
> several setups caused by the softnic modifications to this routine,
> for example: When running testpmd with tap interface
> (/app/testpmd
>  -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
>  --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
>  --rxd=512 --port-topology=chained --forward-mode=rxonly)
> testpmd crashes seconds after presenting its prompt with the following
> error:
>   testpmd> PANIC in prompt():
>   CLI poll error (-1)
> 
>   Thread 1 "testpmd" received signal SIGABRT, Aborted.
>   0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   (gdb) bt
>   #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
>   #2  0x0000000000468027 in __rte_panic ()
>   #3  0x00000000004876ed in prompt ()
>   #4  0x000000000046dffc in main ()
> 
> When running testpmd with bare-metal device
> (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
>  --burst=64 --mbcache=512 -i  --nb-cores=7
>  --rxq=64  --txq=4 --txd=16 --rxd=16)
> and pressing CTRL+D right after testpmd prompt is presented then
> the program crashes while presenting the same messages as above.
> 
> Needless to say that this behavior is not observed when using the
> previous CLI prompt routine.
> 
> Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---
> v2:
> * Removed softnic modifications altogether.
> v1:
> * Wrapped softnic modifications with compilation switch.
> ---
>  app/test-pmd/cmdline.c | 39 ++-------------------------------------
>  1 file changed, 2 insertions(+), 37 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 2c32029..d058860 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -17896,50 +17896,15 @@ struct cmd_config_per_queue_tx_offload_result {
>  void
>  prompt(void)
>  {
> -	int status;
> -
>  	/* initialize non-constant commands */
>  	cmd_set_fwd_mode_init();
>  	cmd_set_fwd_retry_mode_init();
>  
> -#if defined RTE_LIBRTE_PMD_SOFTNIC
> -	portid_t softnic_portid, pid;
> -	uint8_t softnic_enable = 0;
> -
> -	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
> -		RTE_ETH_FOREACH_DEV(pid) {
> -			struct rte_port *port = &ports[pid];
> -			const char *driver = port->dev_info.driver_name;
> -
> -			if (strcmp(driver, "net_softnic") == 0) {
> -				softnic_portid = pid;
> -				softnic_enable = 1;
> -				break;
> -			}
> -		}
> -	}
> -#endif
> -
>  	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
>  	if (testpmd_cl == NULL)
>  		return;
> -
> -	for (;;) {
> -		status = cmdline_poll(testpmd_cl);
> -		if (status < 0)
> -			rte_panic("CLI poll error (%" PRId32 ")\n", status);
> -		else if (status == RDLINE_EXITED) {
> -			cmdline_stdin_exit(testpmd_cl);
> -			rte_exit(0, "\n");
> -		}
> -
> -#if defined RTE_LIBRTE_PMD_SOFTNIC
> -
> -	if ((softnic_enable == 1) &&
> -		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
> -		rte_pmd_softnic_manage(softnic_portid);
> -#endif
> -	}
> +	cmdline_interact(testpmd_cl);
> +	cmdline_stdin_exit(testpmd_cl);
>  }
>  
>  void
> 

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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications
  2018-07-25 14:42 ` Thomas Monjalon
@ 2018-07-25 14:59   ` Singh, Jasvinder
  0 siblings, 0 replies; 7+ messages in thread
From: Singh, Jasvinder @ 2018-07-25 14:59 UTC (permalink / raw)
  To: Thomas Monjalon, Moti Haimovsky
  Cc: dev, stable, Dumitrescu, Cristian, Ananyev, Konstantin


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Wednesday, July 25, 2018 3:43 PM
> To: Moti Haimovsky <motih@mellanox.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Singh, Jasvinder
> <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Subject: Re: [PATCH v2] app/testpmd: removed softnic CLI modifications
> 
> +Cc
> 
> 25/07/2018 16:40, Moti Haimovsky:
> > This patch reverts the testpmd CLI prompt routine modifications done
> > in order to support softnic.
> > The reason of doing so is due to testpmd abnormal exit observed on
> > several setups caused by the softnic modifications to this routine,
> > for example: When running testpmd with tap interface (/app/testpmd  -n
> > 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
> >  --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
> >  --rxd=512 --port-topology=chained --forward-mode=rxonly) testpmd
> > crashes seconds after presenting its prompt with the following
> > error:
> >   testpmd> PANIC in prompt():
> >   CLI poll error (-1)
> >
> >   Thread 1 "testpmd" received signal SIGABRT, Aborted.
> >   0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
> >   (gdb) bt
> >   #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
> >   #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
> >   #2  0x0000000000468027 in __rte_panic ()
> >   #3  0x00000000004876ed in prompt ()
> >   #4  0x000000000046dffc in main ()
> >
> > When running testpmd with bare-metal device (app/testpmd -n 4
> > --socket-mem=1024,1024 -w 04:00.0  --
> >  --burst=64 --mbcache=512 -i  --nb-cores=7
> >  --rxq=64  --txq=4 --txd=16 --rxd=16)
> > and pressing CTRL+D right after testpmd prompt is presented then the
> > program crashes while presenting the same messages as above.
> >
> > Needless to say that this behavior is not observed when using the
> > previous CLI prompt routine.
> >
> > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> > ---
> > v2:
> > * Removed softnic modifications altogether.
> > v1:
> > * Wrapped softnic modifications with compilation switch.
> > ---
> >  app/test-pmd/cmdline.c | 39 ++-------------------------------------
> >  1 file changed, 2 insertions(+), 37 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 2c32029..d058860 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -17896,50 +17896,15 @@ struct
> > cmd_config_per_queue_tx_offload_result {  void
> >  prompt(void)
> >  {
> > -	int status;
> > -
> >  	/* initialize non-constant commands */
> >  	cmd_set_fwd_mode_init();
> >  	cmd_set_fwd_retry_mode_init();
> >
> > -#if defined RTE_LIBRTE_PMD_SOFTNIC
> > -	portid_t softnic_portid, pid;
> > -	uint8_t softnic_enable = 0;
> > -
> > -	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
> > -		RTE_ETH_FOREACH_DEV(pid) {
> > -			struct rte_port *port = &ports[pid];
> > -			const char *driver = port->dev_info.driver_name;
> > -
> > -			if (strcmp(driver, "net_softnic") == 0) {
> > -				softnic_portid = pid;
> > -				softnic_enable = 1;
> > -				break;
> > -			}
> > -		}
> > -	}
> > -#endif
> > -
> >  	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
> >  	if (testpmd_cl == NULL)
> >  		return;
> > -
> > -	for (;;) {
> > -		status = cmdline_poll(testpmd_cl);
> > -		if (status < 0)
> > -			rte_panic("CLI poll error (%" PRId32 ")\n", status);
> > -		else if (status == RDLINE_EXITED) {
> > -			cmdline_stdin_exit(testpmd_cl);
> > -			rte_exit(0, "\n");
> > -		}
> > -
> > -#if defined RTE_LIBRTE_PMD_SOFTNIC
> > -
> > -	if ((softnic_enable == 1) &&
> > -		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
> > -		rte_pmd_softnic_manage(softnic_portid);
> > -#endif
> > -	}
> > +	cmdline_interact(testpmd_cl);
> > +	cmdline_stdin_exit(testpmd_cl);
> >  }
> >
> >  void
> >

With above changes in cmdline.c, you should also consider removing following from the file -

#ifdef RTE_LIBRTE_PMD_SOFTNIC
#include <rte_eth_softnic.h>
#endif
 

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

* [dpdk-dev] [PATCH v3] app/testpmd: removed softnic CLI modifications
  2018-07-25 14:40 [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications Moti Haimovsky
  2018-07-25 14:42 ` Thomas Monjalon
@ 2018-07-25 15:30 ` Moti Haimovsky
  2018-07-25 16:15   ` Dumitrescu, Cristian
  2018-07-25 20:27   ` Aaron Conole
  1 sibling, 2 replies; 7+ messages in thread
From: Moti Haimovsky @ 2018-07-25 15:30 UTC (permalink / raw)
  To: thomas; +Cc: jasvinder.singh, dev, stable, Moti Haimovsky

This patch reverts the testpmd CLI prompt routine modifications done
in order to support softnic.
The reason of doing so is due to testpmd abnormal exit observed on
several setups caused by the softnic modifications to this routine,
for example: When running testpmd with tap interface
(/app/testpmd
 -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
 --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
 --rxd=512 --port-topology=chained --forward-mode=rxonly)
testpmd crashes seconds after presenting its prompt with the following
error:
  testpmd> PANIC in prompt():
  CLI poll error (-1)

  Thread 1 "testpmd" received signal SIGABRT, Aborted.
  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  (gdb) bt
  #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
  #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
  #2  0x0000000000468027 in __rte_panic ()
  #3  0x00000000004876ed in prompt ()
  #4  0x000000000046dffc in main ()

When running testpmd with bare-metal device
(app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
 --burst=64 --mbcache=512 -i  --nb-cores=7
 --rxq=64  --txq=4 --txd=16 --rxd=16)
and pressing CTRL+D right after testpmd prompt is presented then
the program crashes while presenting the same messages as above.

Needless to say that this behavior is not observed when using the
previous CLI prompt routine.

Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
v3:
* Removed unneeded include file.

v2:
* Removed softnic modifications altogether.

v1:
* Wrapped softnic modifications with compilation switch.
---
 app/test-pmd/cmdline.c | 42 ++----------------------------------------
 1 file changed, 2 insertions(+), 40 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2c32029..8708875 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -69,9 +69,6 @@
 #ifdef RTE_LIBRTE_I40E_PMD
 #include <rte_pmd_i40e.h>
 #endif
-#ifdef RTE_LIBRTE_PMD_SOFTNIC
-#include <rte_eth_softnic.h>
-#endif
 #ifdef RTE_LIBRTE_BNXT_PMD
 #include <rte_pmd_bnxt.h>
 #endif
@@ -17896,50 +17893,15 @@ struct cmd_config_per_queue_tx_offload_result {
 void
 prompt(void)
 {
-	int status;
-
 	/* initialize non-constant commands */
 	cmd_set_fwd_mode_init();
 	cmd_set_fwd_retry_mode_init();
 
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-	portid_t softnic_portid, pid;
-	uint8_t softnic_enable = 0;
-
-	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
-		RTE_ETH_FOREACH_DEV(pid) {
-			struct rte_port *port = &ports[pid];
-			const char *driver = port->dev_info.driver_name;
-
-			if (strcmp(driver, "net_softnic") == 0) {
-				softnic_portid = pid;
-				softnic_enable = 1;
-				break;
-			}
-		}
-	}
-#endif
-
 	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
 	if (testpmd_cl == NULL)
 		return;
-
-	for (;;) {
-		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
-			cmdline_stdin_exit(testpmd_cl);
-			rte_exit(0, "\n");
-		}
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-
-	if ((softnic_enable == 1) &&
-		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
-		rte_pmd_softnic_manage(softnic_portid);
-#endif
-	}
+	cmdline_interact(testpmd_cl);
+	cmdline_stdin_exit(testpmd_cl);
 }
 
 void
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v3] app/testpmd: removed softnic CLI modifications
  2018-07-25 15:30 ` [dpdk-dev] [PATCH v3] " Moti Haimovsky
@ 2018-07-25 16:15   ` Dumitrescu, Cristian
  2018-07-25 20:27   ` Aaron Conole
  1 sibling, 0 replies; 7+ messages in thread
From: Dumitrescu, Cristian @ 2018-07-25 16:15 UTC (permalink / raw)
  To: Moti Haimovsky, thomas; +Cc: Singh, Jasvinder, dev, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Moti Haimovsky
> Sent: Wednesday, July 25, 2018 4:30 PM
> To: thomas@monjalon.net
> Cc: Singh, Jasvinder <jasvinder.singh@intel.com>; dev@dpdk.org;
> stable@dpdk.org; Moti Haimovsky <motih@mellanox.com>
> Subject: [dpdk-dev] [PATCH v3] app/testpmd: removed softnic CLI
> modifications
> 
> This patch reverts the testpmd CLI prompt routine modifications done
> in order to support softnic.
> The reason of doing so is due to testpmd abnormal exit observed on
> several setups caused by the softnic modifications to this routine,
> for example: When running testpmd with tap interface
> (/app/testpmd
>  -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
>  --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
>  --rxd=512 --port-topology=chained --forward-mode=rxonly)
> testpmd crashes seconds after presenting its prompt with the following
> error:
>   testpmd> PANIC in prompt():
>   CLI poll error (-1)
> 
>   Thread 1 "testpmd" received signal SIGABRT, Aborted.
>   0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   (gdb) bt
>   #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
>   #2  0x0000000000468027 in __rte_panic ()
>   #3  0x00000000004876ed in prompt ()
>   #4  0x000000000046dffc in main ()
> 
> When running testpmd with bare-metal device
> (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
>  --burst=64 --mbcache=512 -i  --nb-cores=7
>  --rxq=64  --txq=4 --txd=16 --rxd=16)
> and pressing CTRL+D right after testpmd prompt is presented then
> the program crashes while presenting the same messages as above.
> 
> Needless to say that this behavior is not observed when using the
> previous CLI prompt routine.
> 
> Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---
> v3:
> * Removed unneeded include file.
> 
> v2:
> * Removed softnic modifications altogether.
> 
> v1:
> * Wrapped softnic modifications with compilation switch.
> ---
>  app/test-pmd/cmdline.c | 42 ++----------------------------------------
>  1 file changed, 2 insertions(+), 40 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 2c32029..8708875 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -69,9 +69,6 @@
>  #ifdef RTE_LIBRTE_I40E_PMD
>  #include <rte_pmd_i40e.h>
>  #endif
> -#ifdef RTE_LIBRTE_PMD_SOFTNIC
> -#include <rte_eth_softnic.h>
> -#endif
>  #ifdef RTE_LIBRTE_BNXT_PMD
>  #include <rte_pmd_bnxt.h>
>  #endif
> @@ -17896,50 +17893,15 @@ struct
> cmd_config_per_queue_tx_offload_result {
>  void
>  prompt(void)
>  {
> -	int status;
> -
>  	/* initialize non-constant commands */
>  	cmd_set_fwd_mode_init();
>  	cmd_set_fwd_retry_mode_init();
> 
> -#if defined RTE_LIBRTE_PMD_SOFTNIC
> -	portid_t softnic_portid, pid;
> -	uint8_t softnic_enable = 0;
> -
> -	if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) {
> -		RTE_ETH_FOREACH_DEV(pid) {
> -			struct rte_port *port = &ports[pid];
> -			const char *driver = port->dev_info.driver_name;
> -
> -			if (strcmp(driver, "net_softnic") == 0) {
> -				softnic_portid = pid;
> -				softnic_enable = 1;
> -				break;
> -			}
> -		}
> -	}
> -#endif
> -
>  	testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
>  	if (testpmd_cl == NULL)
>  		return;
> -
> -	for (;;) {
> -		status = cmdline_poll(testpmd_cl);
> -		if (status < 0)
> -			rte_panic("CLI poll error (%" PRId32 ")\n", status);
> -		else if (status == RDLINE_EXITED) {
> -			cmdline_stdin_exit(testpmd_cl);
> -			rte_exit(0, "\n");
> -		}
> -
> -#if defined RTE_LIBRTE_PMD_SOFTNIC
> -
> -	if ((softnic_enable == 1) &&
> -		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
> -		rte_pmd_softnic_manage(softnic_portid);
> -#endif
> -	}
> +	cmdline_interact(testpmd_cl);
> +	cmdline_stdin_exit(testpmd_cl);
>  }
> 
>  void
> --
> 1.8.3.1

We could not reproduce this in our setup, but we'll give the benefit of the doubt in favor of Moti, as we are running out of time for RC2.

We are not fixing the real issue in cmdline library, but it is likely that replacing cmdline_interactive() with cmdline_poll() might have more challenges difficult to predict.

This revert prevents us from using test-pmd CLI to configure some Soft NCI features such as the Traffic Manager, so we preparing a patch set to expose some of these features though Soft NIC firmware scripts.

Therefore, reluctantly,

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

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

* Re: [dpdk-dev] [PATCH v3] app/testpmd: removed softnic CLI modifications
  2018-07-25 15:30 ` [dpdk-dev] [PATCH v3] " Moti Haimovsky
  2018-07-25 16:15   ` Dumitrescu, Cristian
@ 2018-07-25 20:27   ` Aaron Conole
  2018-07-26 14:12     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Aaron Conole @ 2018-07-25 20:27 UTC (permalink / raw)
  To: Moti Haimovsky
  Cc: thomas, jasvinder.singh, dev, stable, Bala Sankaran, Reshma Pattan

Moti Haimovsky <motih@mellanox.com> writes:

> This patch reverts the testpmd CLI prompt routine modifications done
> in order to support softnic.
> The reason of doing so is due to testpmd abnormal exit observed on
> several setups caused by the softnic modifications to this routine,
> for example: When running testpmd with tap interface
> (/app/testpmd
>  -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
>  --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
>  --rxd=512 --port-topology=chained --forward-mode=rxonly)
> testpmd crashes seconds after presenting its prompt with the following
> error:
>   testpmd> PANIC in prompt():
>   CLI poll error (-1)
>
>   Thread 1 "testpmd" received signal SIGABRT, Aborted.
>   0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   (gdb) bt
>   #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
>   #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
>   #2  0x0000000000468027 in __rte_panic ()
>   #3  0x00000000004876ed in prompt ()
>   #4  0x000000000046dffc in main ()
>
> When running testpmd with bare-metal device
> (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
>  --burst=64 --mbcache=512 -i  --nb-cores=7
>  --rxq=64  --txq=4 --txd=16 --rxd=16)
> and pressing CTRL+D right after testpmd prompt is presented then
> the program crashes while presenting the same messages as above.
>
> Needless to say that this behavior is not observed when using the
> previous CLI prompt routine.
>
> Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> Cc: stable@dpdk.org
>
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---

Thanks for the fix - I was just writing to explain that I observe this
on master but see that folks are busy fixing it up.

I've applied this patch, and no longer see the panic.

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v3] app/testpmd: removed softnic CLI modifications
  2018-07-25 20:27   ` Aaron Conole
@ 2018-07-26 14:12     ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2018-07-26 14:12 UTC (permalink / raw)
  To: Moti Haimovsky
  Cc: Aaron Conole, jasvinder.singh, dev, Bala Sankaran, Reshma Pattan,
	cristian.dumitrescu

25/07/2018 22:27, Aaron Conole:
> Moti Haimovsky <motih@mellanox.com> writes:
> 
> > This patch reverts the testpmd CLI prompt routine modifications done
> > in order to support softnic.
> > The reason of doing so is due to testpmd abnormal exit observed on
> > several setups caused by the softnic modifications to this routine,
> > for example: When running testpmd with tap interface
> > (/app/testpmd
> >  -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64
> >  --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512
> >  --rxd=512 --port-topology=chained --forward-mode=rxonly)
> > testpmd crashes seconds after presenting its prompt with the following
> > error:
> >   testpmd> PANIC in prompt():
> >   CLI poll error (-1)
> >
> >   Thread 1 "testpmd" received signal SIGABRT, Aborted.
> >   0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
> >   (gdb) bt
> >   #0  0x00007ffff668e0d0 in raise () from /lib64/libc.so.6
> >   #1  0x00007ffff668f6b1 in abort () from /lib64/libc.so.6
> >   #2  0x0000000000468027 in __rte_panic ()
> >   #3  0x00000000004876ed in prompt ()
> >   #4  0x000000000046dffc in main ()
> >
> > When running testpmd with bare-metal device
> > (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0  --
> >  --burst=64 --mbcache=512 -i  --nb-cores=7
> >  --rxq=64  --txq=4 --txd=16 --rxd=16)
> > and pressing CTRL+D right after testpmd prompt is presented then
> > the program crashes while presenting the same messages as above.
> >
> > Needless to say that this behavior is not observed when using the
> > previous CLI prompt routine.
> >
> > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> > Cc: stable@dpdk.org

Removing stable for this fix.

> > Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> > ---
> 
> Thanks for the fix - I was just writing to explain that I observe this
> on master but see that folks are busy fixing it up.
> 
> I've applied this patch, and no longer see the panic.
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Applied, thanks

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

end of thread, other threads:[~2018-07-26 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 14:40 [dpdk-dev] [PATCH v2] app/testpmd: removed softnic CLI modifications Moti Haimovsky
2018-07-25 14:42 ` Thomas Monjalon
2018-07-25 14:59   ` Singh, Jasvinder
2018-07-25 15:30 ` [dpdk-dev] [PATCH v3] " Moti Haimovsky
2018-07-25 16:15   ` Dumitrescu, Cristian
2018-07-25 20:27   ` Aaron Conole
2018-07-26 14:12     ` [dpdk-dev] [dpdk-stable] " 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).