Skip to contentSkip to conversation

app/testpmd: fix testpmd exit using ctrl+d

PATCH In review Jasvinder Singh 8 participants 28 messages Jul 23, 2018 – Jul 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: fix testpmd exit using ctrl+d

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
app/test-pmd/cmdline.c +6 -4
index 5885289..edaf0e6 100644
@@ -17581,12 +17581,14 @@ prompt(void)
 
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
+		if (status == RDLINE_EXITED || status == RDLINE_RES_EOF) {
+			if (status == RDLINE_RES_EOF)
+				pmd_test_exit();
+
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
-		}
+		} else if (status < 0)
+			rte_panic("CLI poll error (%" PRId32 ")\n", status);
 
 #if defined RTE_LIBRTE_PMD_SOFTNIC
 
lib/librte_cmdline/cmdline.c +1 -1
index 591b78b..47b0f6a 100644
@@ -187,7 +187,7 @@ cmdline_in(struct cmdline *cl, const char *buf, int size)
 			rdline_newline(&cl->rdl, cl->prompt);
 		}
 		else if (ret == RDLINE_RES_EOF)
-			return -1;
+			return RDLINE_RES_EOF;
 		else if (ret == RDLINE_RES_EXITED)
 			return -1;
 	}
Signature · 1 line
2.9.3
#1 lore raw

Hi Jasvider,

Quoted 56 lines

-----Original Message-----
From: Singh, Jasvinder
Sent: Monday, July 23, 2018 11:44 AM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>
Subject: [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

5885289..edaf0e6 100644

app/test-pmd/cmdline.c +6 -4
@@ -17581,12 +17581,14 @@ prompt(void)
 
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
+		if (status == RDLINE_EXITED || status == RDLINE_RES_EOF) {
+			if (status == RDLINE_RES_EOF)
+				pmd_test_exit();
+
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
-		}
+		} else if (status < 0)
+			rte_panic("CLI poll error (%" PRId32 ")\n", status);
 
 #if defined RTE_LIBRTE_PMD_SOFTNIC
 
lib/librte_cmdline/cmdline.c index renamed from lib/librte_cmdline/cmdline.c +0 -0

591b78b..47b0f6a 100644

lib/librte_cmdline/cmdline.c +1 -1
@@ -187,7 +187,7 @@ cmdline_in(struct cmdline *cl, const char *buf, int
 size)
 			rdline_newline(&cl->rdl, cl->prompt);
 		}
 		else if (ret == RDLINE_RES_EOF)
-			return -1;
+			return RDLINE_RES_EOF;
 		else if (ret == RDLINE_RES_EXITED)
 			return -1;
Quoted 3 lines

}
--
2.9.3

The check-git-log script is showing the following error:

./devtools/check-git-log.sh -1
Line too long:
Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT)

Regards,

Bernard.

#2 lore raw
In reply to Jasvinder Singh

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

#3 lore raw

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

#4 lore raw

Hi,

Jasvinder is OOO, let me have a look and send the next version of patch.

Thanks,
Reshma

Quoted 34 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 1:34 PM
To: Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

#5 lore raw
In reply to Thomas Monjalon

Hi Thomas,

+John

Quoted 10 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 1:34 PM
To: Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 24 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

Do you know what commit has broken testpmd?

Regards,

Bernard

#6 lore raw

24/07/2018 14:41, Iremonger, Bernard:

Quoted 26 lines

Hi Thomas,

+John

From: Thomas Monjalon [mailto:[email protected]]

Quoted 21 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 14 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

Do you know what commit has broken testpmd?

I think the "Fixes" line above is right:
0ad778b398c6 ("app/testpmd: rework softnic forward mode")

#7 lore raw
In reply to Thomas Monjalon

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-pmd/cmdline.c
and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 33 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky <[email protected]>; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

#8 lore raw
Quoted 21 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 34 lines
Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 27 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl + D behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call to cmdline_interact() with calling cmdline_poll() in a loop. These two approaches should be identical in behavior, but it looks like they are not due to some issue in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier would be very much appreciated!

It is really a bad practice to use cmdline_interact() in testpmd, as it is a blocking call that prohibits doing other things on the same thread that runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow softnic_manage() function.

Worst case scenario: We can revert the cmdline_poll() back to cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality.

#9 lore raw

24/07/2018 18:59, Dumitrescu, Cristian:

Quoted 18 lines

From: Mordechay Haimovsky [mailto:[email protected]]

Quoted 5 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

Quoted 11 lines

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

From: Thomas Monjalon [mailto:[email protected]]

Quoted 5 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 7 lines

First, testpmd is not really broken, as only thing that changed is the Ctrl + D behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call to cmdline_interact() with calling cmdline_poll() in a loop. These two approaches should be identical in behavior, but it looks like they are not due to some issue in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier would be very much appreciated!

It is really a bad practice to use cmdline_interact() in testpmd, as it is a blocking call that prohibits doing other things on the same thread that runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow softnic_manage() function.

Worst case scenario: We can revert the cmdline_poll() back to cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality.

There are some crashes, even without touching the keyboard. So yes, we should revert.

#10 lore raw
Quoted 48 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, July 25, 2018 9:19 AM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Mordechay Haimovsky <[email protected]>; Singh, Jasvinder <[email protected]>; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

24/07/2018 18:59, Dumitrescu, Cristian:

Quoted 11 lines

From: Mordechay Haimovsky [mailto:[email protected]]

Quoted 10 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 8 lines
Quoted 6 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 5 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

First, testpmd is not really broken, as only thing that changed is the Ctrl + D

behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop. These two approaches should be identical in behavior, but it looks like they are not due to some issue in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same thread that runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow softnic_manage() function.

Quoted 1 line
Quoted 6 lines
Quoted 1 line

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality.

There are some crashes, even without touching the keyboard.

Thomas, could you be specific here so that we can reproduce the issues you are mentioning? Thanks.

Quoted 2 lines

So yes, we should revert.

#11 lore raw
Quoted 69 lines

-----Original Message-----
From: Singh, Jasvinder
Sent: Wednesday, July 25, 2018 9:31 AM
To: Thomas Monjalon <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Mordechay Haimovsky <[email protected]>; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 10 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, July 25, 2018 9:19 AM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Mordechay Haimovsky <[email protected]>; Singh, Jasvinder <[email protected]>; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 20 lines

24/07/2018 18:59, Dumitrescu, Cristian:

Quoted 19 lines

From: Mordechay Haimovsky [mailto:[email protected]]

Quoted 5 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

Quoted 11 lines

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

From: Thomas Monjalon [mailto:[email protected]]

Quoted 5 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

First, testpmd is not really broken, as only thing that changed is the Ctrl +

D

Quoted 5 lines

behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop. These two

approaches

Quoted 1 line

should be identical in behavior, but it looks like they are not due to some

issue

Quoted 3 lines

in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier

would

Quoted 4 lines

be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same thread that runs

the

Quoted 1 line

CLI. Sometimes we need to run other things on the same core, e.g. the

slow

Quoted 5 lines

softnic_manage() function.

Quoted 2 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also

Quoted 8 lines

prevent

Quoted 3 lines

us from testing some Soft NIC functionality.

There are some crashes, even without touching the keyboard.

Thomas, could you be specific here so that we can reproduce the issues you are mentioning? Thanks.

Yeah, I think the crash mention was about a custom automation script relying on Ctrl+D behavior, not about tespmd crash. Moti, please clarify.

Quoted 2 lines
Quoted 2 lines

So yes, we should revert.

#12 lore raw
In reply to Singh, Jasvinder

Hi,
This issue happens on some of our setups sometimes without even pressing any key.
I will try to create a minimalistic setup which will show the problem and will be easy to construct by you. Will send you all the details later on today.

Moti

Quoted 76 lines

-----Original Message-----
From: Singh, Jasvinder [mailto:[email protected]]
Sent: Wednesday, July 25, 2018 11:31 AM
To: Thomas Monjalon <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Mordechay Haimovsky <[email protected]>; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 52 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Wednesday, July 25, 2018 9:19 AM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Mordechay Haimovsky <[email protected]>; Singh, Jasvinder <[email protected]>; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

24/07/2018 18:59, Dumitrescu, Cristian:

Quoted 13 lines

From: Mordechay Haimovsky [mailto:[email protected]]

Quoted 12 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

From: Thomas Monjalon [mailto:[email protected]]

Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

First, testpmd is not really broken, as only thing that changed is the Ctrl + D

behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

Quoted 3 lines

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop. These two approaches should be identical in behavior, but it looks like they are not due to some issue in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring
cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier would be very much appreciated!

Quoted 3 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same thread that runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow
softnic_manage() function.

Quoted 1 line
Quoted 6 lines
Quoted 1 line

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality.

There are some crashes, even without touching the keyboard.

Thomas, could you be specific here so that we can reproduce the issues you are mentioning? Thanks.

Quoted 2 lines

So yes, we should revert.

#13 lore raw
In reply to Dumitrescu, Cristian
Quoted 71 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu, Cristian
Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 19 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-pmd/cmdline.c and rework the SOFTNIC section there, preferably moving its poll section to use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 34 lines
Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 27 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 16 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 7 lines
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl + D behavior. I agree this is an issue that we need to fix, as it looks that it is breaking some automation scripts for some people.

Quoted 7 lines

The change in behavior for Ctrl + D exit is caused by replacing the call to cmdline_interact() with calling cmdline_poll() in a loop. These two approaches should be identical in behavior, but it looks like they are not due to some issue in the cmdline library. Jasvinder proposed a quick patch, but it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier would be very much appreciated!

It is really a bad practice to use cmdline_interact() in testpmd, as it is a blocking call that prohibits doing other things on the same thread that runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave CLI one for CLI? Konstantin

Quoted 3 lines

Worst case scenario: We can revert the cmdline_poll() back to cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality.

#14 lore raw
Quoted 101 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 2 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 14 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll section

to

Quoted 9 lines
Quoted 9 lines

use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

Quoted 3 lines
Quoted 3 lines

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 7 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl +

D behavior. I agree this is an issue that we need to fix, as

Quoted 3 lines

it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks like they

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else needs to

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier

would be very much appreciated!

Quoted 1 line
Quoted 8 lines
Quoted 1 line

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on the

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave CLI one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real life CPU cores are really expensive and dedicating a CPU core just for CLI is a colossal waste.

We did use the non-blocking cmdline_poll() function instead of the blocking cmdline_interact() in the past without any issues. The issues reported by Moti come as a surprise. It is probably good to see what this is about and see if we can quickly fix the issue in cmdline library. Otherwise, we can revert the usage of cmdline_poll() with cmdline_interact().

Quoted 6 lines
Quoted 3 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It would

also prevent us from testing some Soft NIC functionality.

#15 lore raw
Quoted 115 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 102 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 2 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 14 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll section

to

Quoted 9 lines
Quoted 9 lines

use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

Quoted 3 lines
Quoted 3 lines

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 7 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl +

D behavior. I agree this is an issue that we need to fix, as

Quoted 3 lines

it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks like they

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else needs to

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on the

Quoted 8 lines
Quoted 5 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave CLI one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real life CPU cores are really expensive and dedicating a CPU core just for CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the cores he owns :) What I am saying: there is a special thing (developed by Harry) service cores. As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for there background tasks in a unified and transparent way.

Quoted 1 line

From the description above - that seems to fit your needs (softnic background processing), no?

Konstantin

Quoted 12 lines

We did use the non-blocking cmdline_poll() function instead of the blocking cmdline_interact() in the past without any issues. The issues reported by Moti come as a surprise. It is probably good to see what this is about and see if we can quickly fix the issue in cmdline library. Otherwise, we can revert the usage of cmdline_poll() with cmdline_interact().

Quoted 6 lines
Quoted 3 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It would

also prevent us from testing some Soft NIC functionality.

#16 lore raw

This is how we reproduce the issue :
app/testpmd -n 4 --vdev="net_tap0,iface=tap0,remote=eth1" -- --burst=64 --mbcache=512 -i --rxq=2 --txq=2 --txd=512 --rxd=512 --port-topology=chained --forward-mode=rxonly

Quoted 180 lines

-----Original Message-----
From: Ananyev, Konstantin [mailto:[email protected]]
Sent: Wednesday, July 25, 2018 2:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 5 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>;

Quoted 15 lines

Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 7 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 64 lines
Quoted 64 lines

Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 2 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 3 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard
<[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 17 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 11 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines

Even after this fix we still have setups that use netvsc for example, on which testpmd exits with rte_panic right after loading it even without touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 2 lines
Quoted 2 lines

and rework the SOFTNIC section there, preferably moving its poll section

to

Quoted 9 lines
Quoted 9 lines

use rte_service in a separate file cleaning the CLI files from PMD-specific implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

Quoted 4 lines
Quoted 4 lines

<[email protected]>;

Quoted 3 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 3 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command

line.

Quoted 41 lines
Quoted 41 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl +

D behavior. I agree this is an issue that we need to fix, as

Quoted 4 lines

it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call to

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 2 lines

These two approaches should be identical in behavior, but it looks like they

are not due to some issue in the cmdline library.

Quoted 2 lines

Jasvinder proposed a quick patch, but it looks like something else needs to

be fixed in cmdline library in order to bring

Quoted 2 lines

cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier

would be very much appreciated!

Quoted 3 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same

Quoted 2 lines

thread that runs the CLI. Sometimes we need to run other things on the

Quoted 8 lines
Quoted 5 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave CLI one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real life CPU cores are really expensive and dedicating a CPU core just for

CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the cores he owns :) What I am saying: there is a special thing (developed by Harry) service cores.
As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for there background tasks in a unified and transparent way. From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the blocking cmdline_interact() in the past without any issues. The issues reported by Moti come as a surprise. It is probably good to see what this is

about and see if we can quickly fix the issue in cmdline library. Otherwise, we can revert the usage of cmdline_poll() with cmdline_interact().

Quoted 10 lines
Quoted 10 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 2 lines

doing things, as this is simply hiding the issue in cmdline library. It would

also prevent us from testing some Soft NIC functionality.

#17 lore raw
In reply to Ananyev, Konstantin
Quoted 156 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 14 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 9 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected];

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for example,

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from PMD-

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 23 lines
Quoted 23 lines

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 7 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl

+

Quoted 4 lines
Quoted 4 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 3 lines

it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks like

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else needs

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 8 lines
Quoted 8 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on the

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real life

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Quoted 10 lines

Ok, but let's application developer to decide how to use (waste) the cores he owns :)
What I am saying: there is a special thing (developed by Harry) service cores. As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way.
From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Then why not put the testpmd CLI itself on a service core? Are you volunteering for a patch on this? :)

Quoted 16 lines
Quoted 2 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see what

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll() with

cmdline_interact().

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#18 lore raw
Quoted 178 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 12:57 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 154 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 14 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 9 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected];

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for example,

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from PMD-

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 23 lines
Quoted 23 lines

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 7 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the Ctrl

+

Quoted 4 lines
Quoted 4 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 3 lines

it looks that it is breaking some automation scripts for some people.

The change in behavior for Ctrl + D exit is caused by replacing the call

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks like

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else needs

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 8 lines
Quoted 8 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it is a

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on the

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and leave

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real life

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Quoted 10 lines

Ok, but let's application developer to decide how to use (waste) the cores he owns :)
What I am saying: there is a special thing (developed by Harry) service cores. As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way.
From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Quoted 1 line

Then why not put the testpmd CLI itself on a service core? Are you volunteering for a patch on this? :)

It was not me who broke testpmd at first place.
I'd better live without softnic support in testpmd :)
Though I still don't understand why do you feel that service cores are not good enough for you?

Quoted 1 line

From my understanding they were introduced for similar purposes

(Harry please feel free to correct me here).
So if you think they not fit for your case -
at least would be good to understand why.
Konstantin

Quoted 18 lines
Quoted 18 lines
Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see what

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll() with

cmdline_interact().

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#19 lore raw
Quoted 209 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 1:18 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 12:57 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay Haimovsky

<[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan,

Reshma <[email protected]>;

Quoted 28 lines

[email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 23 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 38 lines
Quoted 38 lines
Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 11 lines
Quoted 11 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dumitrescu,

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas Monjalon

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

Quoted 5 lines
Quoted 5 lines

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for

example,

Quoted 11 lines
Quoted 11 lines

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from

PMD-

Quoted 36 lines
Quoted 36 lines

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 23 lines
Quoted 23 lines

ctrl+d

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

24/07/2018 13:25, Thomas Monjalon:

Quoted 7 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is

the Ctrl

Quoted 3 lines
Quoted 3 lines

+

Quoted 2 lines
Quoted 2 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 1 line

it looks that it is breaking some automation scripts for some

people.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the

call

Quoted 3 lines
Quoted 3 lines

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks

like

Quoted 3 lines
Quoted 3 lines

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else

needs

Quoted 7 lines
Quoted 7 lines

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 3 lines
Quoted 3 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as

it is a

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and

leave

Quoted 5 lines
Quoted 5 lines

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real

life

Quoted 4 lines
Quoted 4 lines

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the cores

he

Quoted 2 lines
Quoted 2 lines

owns :)
What I am saying: there is a special thing (developed by Harry) service

cores.

Quoted 9 lines
Quoted 7 lines

As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way. From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Then why not put the testpmd CLI itself on a service core? Are you

volunteering for a patch on this? :)

Quoted 9 lines

It was not me who broke testpmd at first place.
I'd better live without softnic support in testpmd :)
Though I still don't understand why do you feel that service cores are not good enough for you?
From my understanding they were introduced for similar purposes (Harry please feel free to correct me here).
So if you think they not fit for your case -
at least would be good to understand why.
Konstantin

Service-cores is a mechanism to abstract SW fallback CPU core requirements;
Eg: A nic provides RSS, 0 cores required
A NIC does not provide RSS, use 1 service core to provide that RSS function

Result: the application can rely on RSS, as we have a transparent fallback:
no application controlled lcore is performing any different than before with HW provided functionality

Service cores is not intended to be used for "background" tasks, as the service-core consumes an Lcore and polls 100% of the time, regardless of what services it is performing.

If there are multiple things that we can run on service-cores, that would make sense. Eg: timer_manage(), CLI (non-blocking..), SoftNIC background tasks...

This design makes sense as the application can also register its own "background" services, and run them all on a single service-core.

Quoted 21 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see

what

Quoted 2 lines
Quoted 2 lines

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll()

with

Quoted 8 lines
Quoted 8 lines

cmdline_interact().

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library.

It

Quoted 2 lines
Quoted 2 lines

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#20 lore raw
Quoted 281 lines

-----Original Message-----
From: Van Haaren, Harry
Sent: Wednesday, July 25, 2018 1:27 PM
To: Ananyev, Konstantin <[email protected]>; Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 1:18 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay

Haimovsky

Quoted 1 line

<[email protected]>; Thomas Monjalon <[email protected]>;

Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan,

Quoted 1 line

Reshma <[email protected]>; [email protected]; Van

Haaren, Harry

Quoted 9 lines

<[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 12:57 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky

Quoted 3 lines

<[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan,

Quoted 2 lines

Reshma <[email protected]>;

Quoted 1 line

[email protected]; Van Haaren, Harry

<[email protected]>

Quoted 1 line
Quoted 1 line

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected]; Van

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>;

Mordechay

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 1 line

<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 11 lines
Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>;

Mordechay

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Haimovsky <[email protected]>; Thomas Monjalon
<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected]

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

ctrl+d

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of

Dumitrescu,

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas

Monjalon

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

ctrl+d

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh,

Jasvinder

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

Quoted 16 lines
Quoted 3 lines
Quoted 3 lines

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for

example,

Quoted 8 lines
Quoted 8 lines

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its

poll

Quoted 16 lines
Quoted 3 lines
Quoted 3 lines

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from

PMD-

Quoted 12 lines
Quoted 12 lines

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd

exit

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

using

Quoted 10 lines
Quoted 10 lines

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 2 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 1 line

Fix testpmd app exit by pressing ctrl+d, End-of-

Transmission

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

character (EOT) on the empty command line.

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic

forward

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

mode")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Reported-by Mordechay Haimovsky

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Jasvinder Singh

<[email protected]>

Quoted 27 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is

the Ctrl

Quoted 3 lines
Quoted 3 lines

+

Quoted 2 lines
Quoted 2 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 1 line

it looks that it is breaking some automation scripts for some

people.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the

call

Quoted 3 lines
Quoted 3 lines

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks

like

Quoted 3 lines
Quoted 3 lines

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else

needs

Quoted 10 lines
Quoted 7 lines
Quoted 7 lines

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 3 lines
Quoted 3 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as

it is a

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things

on

Quoted 10 lines

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and

leave

Quoted 5 lines
Quoted 5 lines

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in

real

Quoted 5 lines

life

Quoted 4 lines
Quoted 4 lines

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the

cores

Quoted 15 lines

he

Quoted 2 lines
Quoted 2 lines

owns :)
What I am saying: there is a special thing (developed by Harry) service

cores.

Quoted 9 lines
Quoted 7 lines

As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way. From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Then why not put the testpmd CLI itself on a service core? Are you

volunteering for a patch on this? :)

Quoted 9 lines

It was not me who broke testpmd at first place.
I'd better live without softnic support in testpmd :)
Though I still don't understand why do you feel that service cores are not good enough for you?
From my understanding they were introduced for similar purposes (Harry please feel free to correct me here).
So if you think they not fit for your case -
at least would be good to understand why.
Konstantin

Service-cores is a mechanism to abstract SW fallback CPU core requirements;
Eg: A nic provides RSS, 0 cores required
A NIC does not provide RSS, use 1 service core to provide that RSS
function

Result: the application can rely on RSS, as we have a transparent fallback:
no application controlled lcore is performing any different than before with HW provided functionality

Service cores is not intended to be used for "background" tasks, as the service-core consumes an Lcore and polls 100% of the time, regardless of what services it is performing.

Quoted 9 lines

If there are multiple things that we can run on service-cores, that would make
sense. Eg: timer_manage(), CLI (non-blocking..), SoftNIC background tasks...

This design makes sense as the application can also register its own "background"
services, and run them all on a single service-core.

Thanks, Harry, we might have to revert to service core if we are not able to reproduce & fix this issue quickly enough.

Quoted 22 lines
Quoted 17 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see

what

Quoted 2 lines
Quoted 2 lines

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll()

with

Quoted 7 lines
Quoted 7 lines

cmdline_interact().

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way

of

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library.

It

Quoted 2 lines
Quoted 2 lines

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#21 lore raw
In reply to Ananyev, Konstantin
Quoted 220 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 1:18 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 12:57 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 1 line

[email protected]; Van Haaren, Harry

<[email protected]>

Quoted 12 lines

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 8 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected];

Van

Quoted 2 lines
Quoted 2 lines

Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 1 line

<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>;

Mordechay

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Haimovsky <[email protected]>; Thomas Monjalon
<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected]

Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of

Dumitrescu,

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas

Monjalon

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 10 lines
Quoted 10 lines

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

Quoted 5 lines
Quoted 5 lines

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for

example,

Quoted 36 lines
Quoted 36 lines

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from PMD-

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 12 lines
Quoted 12 lines

ctrl+d

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 4 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Reported-by Mordechay Haimovsky

<[email protected]>

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the

Ctrl

Quoted 3 lines
Quoted 3 lines

+

Quoted 2 lines
Quoted 2 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 1 line

it looks that it is breaking some automation scripts for some

people.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the

call

Quoted 3 lines
Quoted 3 lines

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks

like

Quoted 3 lines
Quoted 3 lines

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else

needs

Quoted 7 lines
Quoted 7 lines

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 3 lines
Quoted 3 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it

is a

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and

leave

Quoted 5 lines
Quoted 5 lines

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real

life

Quoted 4 lines
Quoted 4 lines

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the

cores he

Quoted 2 lines
Quoted 2 lines

owns :)
What I am saying: there is a special thing (developed by Harry) service

cores.

Quoted 8 lines
Quoted 7 lines

As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way. From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Quoted 4 lines
Quoted 1 line

Then why not put the testpmd CLI itself on a service core? Are you

volunteering for a patch on this? :)

It was not me who broke testpmd at first place.

I don't think you understand the issue. The issue is related to using the cmdline library in non-blocking mode, it has nothing to do with Soft NIC.

Quoted 1 line

I'd better live without softnic support in testpmd :)

Thanks a lot for your help ;(

Quoted 2 lines

Though I still don't understand why do you feel that service cores are not good enough for you?

You don't seem to realize there is an issue that we need to root cause and hopefully fix rather than hiding it. This has nothing to do with service core.

Quoted 4 lines

From my understanding they were introduced for similar purposes (Harry please feel free to correct me here).
So if you think they not fit for your case -
at least would be good to understand why.

Service core could be used here, as long as a new core is not wasted. Running this on the same core as CLI is also a valid solution.

Quoted 22 lines

Konstantin

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see

what

Quoted 2 lines
Quoted 2 lines

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll()

with

Quoted 10 lines
Quoted 10 lines

cmdline_interact().

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#22 lore raw
Quoted 231 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 1:41 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 218 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 1:18 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected]; Van Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 4 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 12:57 PM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 2 lines

<[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>;

Pattan, Reshma <[email protected]>;

Quoted 1 line

[email protected]; Van Haaren, Harry

<[email protected]>

Quoted 12 lines

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d

Quoted 8 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 12:39 PM
To: Dumitrescu, Cristian <[email protected]>; Mordechay Haimovsky <[email protected]>; Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard <[email protected]>; Pattan, Reshma <[email protected]>; [email protected];

Van

Quoted 2 lines
Quoted 2 lines

Haaren, Harry <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

-----Original Message-----
From: Dumitrescu, Cristian
Sent: Wednesday, July 25, 2018 10:36 AM
To: Ananyev, Konstantin <[email protected]>; Mordechay

Haimovsky <[email protected]>; Thomas Monjalon

Quoted 1 line

<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, July 25, 2018 10:04 AM
To: Dumitrescu, Cristian <[email protected]>;

Mordechay

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Haimovsky <[email protected]>; Thomas Monjalon
<[email protected]>; Singh, Jasvinder

<[email protected]>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected]

Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using

ctrl+d

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of

Dumitrescu,

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Cristian

Quoted 2 lines

Sent: Tuesday, July 24, 2018 5:59 PM
To: Mordechay Haimovsky <[email protected]>; Thomas

Monjalon

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

<[email protected]>; Singh, Jasvinder

Quoted 2 lines

<[email protected]>
Cc: [email protected]; Iremonger, Bernard

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Pattan, Reshma <[email protected]>;

Quoted 2 lines

[email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 10 lines
Quoted 10 lines

ctrl+d

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

-----Original Message-----
From: Mordechay Haimovsky [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:37 PM
To: Thomas Monjalon <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Iremonger, Bernard

Quoted 5 lines
Quoted 5 lines

<[email protected]>;

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Pattan, Reshma <[email protected]>;

[email protected];

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Dumitrescu, Cristian <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ctrl+d

Quoted 2 lines
Quoted 2 lines

Even after this fix we still have setups that use netvsc for

example,

Quoted 36 lines
Quoted 36 lines

on

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

which testpmd exits with rte_panic right after loading it even

without

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

touching the KBD.

I recommend returning the previous prompt routine in test-

pmd/cmdline.c

Quoted 1 line
Quoted 1 line

and rework the SOFTNIC section there, preferably moving its poll

section

Quoted 2 lines
Quoted 2 lines

to

Quoted 1 line
Quoted 1 line

use rte_service in a separate file cleaning the CLI files from PMD-

specific

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

implementation.

Quoted 6 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, July 24, 2018 3:34 PM
To: Jasvinder Singh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Mordechay Haimovsky

<[email protected]>;

Quoted 2 lines

[email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit

using

Quoted 12 lines
Quoted 12 lines

ctrl+d

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

Important note:
testpmd is currently really broken.
We cannot have a RC2 until it is fixed.

24/07/2018 13:25, Thomas Monjalon:

Quoted 4 lines

23/07/2018 12:44, Jasvinder Singh:

Quoted 2 lines

Fix testpmd app exit by pressing ctrl+d, End-of-Transmission character (EOT) on the empty command line.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Please describe what is the issue and what is the cause.

Quoted 1 line
Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward

mode")

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Reported-by Mordechay Haimovsky

<[email protected]>

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
---
 app/test-pmd/cmdline.c       | 10 ++++++----
 lib/librte_cmdline/cmdline.c |  2 +-
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

It is very suspicious to change the cmdline library. If there is a bug in this library, it deserves a separate fix.

First, testpmd is not really broken, as only thing that changed is the

Ctrl

Quoted 3 lines
Quoted 3 lines

+

Quoted 2 lines
Quoted 2 lines

D behavior. I agree this is an issue that we need to fix, as

Quoted 1 line

it looks that it is breaking some automation scripts for some

people.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The change in behavior for Ctrl + D exit is caused by replacing the

call

Quoted 3 lines
Quoted 3 lines

to

Quoted 2 lines
Quoted 2 lines

cmdline_interact() with calling cmdline_poll() in a loop.

Quoted 1 line

These two approaches should be identical in behavior, but it looks

like

Quoted 3 lines
Quoted 3 lines

they

Quoted 2 lines
Quoted 2 lines

are not due to some issue in the cmdline library.

Quoted 1 line

Jasvinder proposed a quick patch, but it looks like something else

needs

Quoted 7 lines
Quoted 7 lines

to

Quoted 2 lines
Quoted 2 lines

be fixed in cmdline library in order to bring

Quoted 1 line

cmdline_poll() on parity with cmdline_interact(). Any advice from

Olivier

Quoted 3 lines
Quoted 3 lines

would be very much appreciated!

Quoted 2 lines

It is really a bad practice to use cmdline_interact() in testpmd, as it

is a

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

blocking call that prohibits doing other things on the same

Quoted 1 line

thread that runs the CLI. Sometimes we need to run other things on

the

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

same core, e.g. the slow softnic_manage() function.

Curious why not use a service core for softnic background stuff, and

leave

Quoted 5 lines
Quoted 5 lines

CLI

Quoted 4 lines
Quoted 2 lines

one for CLI?
Konstantin

I guess for a test application you can do anything you want, but in real

life

Quoted 4 lines
Quoted 4 lines

CPU cores are really expensive and dedicating a CPU core

Quoted 1 line

just for CLI is a colossal waste.

Ok, but let's application developer to decide how to use (waste) the

cores he

Quoted 2 lines
Quoted 2 lines

owns :)
What I am saying: there is a special thing (developed by Harry) service

cores.

Quoted 8 lines
Quoted 7 lines

As I understand why of it's the purpose - allow PMD(s) to allocate CPU resources for
there background tasks in a unified and transparent way. From the description above - that seems to fit your needs (softnic background processing), no?
Konstantin

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Then why not put the testpmd CLI itself on a service core? Are you

volunteering for a patch on this? :)

It was not me who broke testpmd at first place.

I don't think you understand the issue. The issue is related to using the cmdline library in non-blocking mode, it has nothing to do with Soft NIC.

Yep, I understand that.
What I am trying to say: you introduce rte_pmd_softnic_manage(),
and, as I understand, it is a user responsibility to call it from time to time to keep softnic working correctly.
That's ok, but it means that now any app that wants to use softnic
has to be modified, correct?
While if you put that into service core - only startup EAL cmdline has to be changed. Though yes there are drawbacks: softnic would rely on presence of service core, and if there is no other services registered - it would probably be a waste of cycles. But it probably could be made configurable
(does user want to call softnic_manage(), or is it ok to run it as a service). Another thought - could it be registered as alarm handler, so it could be called from DPDK interrupt thread?
Konstantin

Quoted 40 lines
Quoted 2 lines

I'd better live without softnic support in testpmd :)

Thanks a lot for your help ;(

Quoted 2 lines

Though I still don't understand why do you feel that service cores are not good enough for you?

You don't seem to realize there is an issue that we need to root cause and hopefully fix rather than hiding it. This has nothing to do with service core.

Quoted 4 lines

From my understanding they were introduced for similar purposes (Harry please feel free to correct me here).
So if you think they not fit for your case -
at least would be good to understand why.

Service core could be used here, as long as a new core is not wasted. Running this on the same core as CLI is also a valid solution.

Quoted 22 lines

Konstantin

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

We did use the non-blocking cmdline_poll() function instead of the

blocking cmdline_interact() in the past without any issues. The

Quoted 1 line

issues reported by Moti come as a surprise. It is probably good to see

what

Quoted 2 lines
Quoted 2 lines

this is about and see if we can quickly fix the issue in

Quoted 1 line

cmdline library. Otherwise, we can revert the usage of cmdline_poll()

with

Quoted 10 lines
Quoted 10 lines

cmdline_interact().

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

Worst case scenario: We can revert the cmdline_poll() back to

cmdline_interact(), this is a small change, but not the proper way of

Quoted 1 line

doing things, as this is simply hiding the issue in cmdline library. It

would

Quoted 1 line
Quoted 1 line

also prevent us from testing some Soft NIC functionality.

#23 lore raw

PATCH v2 1/1 app/testpmd: fix testpmd exit for ctrl+d

In reply to Jasvinder Singh

Testpmd should be existed gracefully when ctrl+d is typed. This behaviour is not handled properly, fix this by calling pmd_test_exit() instead of rte_panic.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

---
v2: removed changes done to lib/librte_cmdline/cmdline.c reworded commit message and heading.

---
 app/test-pmd/cmdline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
app/test-pmd/cmdline.c +3 -3
index 588528928..406008d73 100644
@@ -17581,9 +17581,9 @@ prompt(void)
 
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
+		if (status == RDLINE_EXITED || status == -1) {
+			if (status == -1)
+				pmd_test_exit();
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
 		}
Signature · 1 line
2.14.4
#24 lore raw

Re: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

+ CC: Olivier and Mordechay Haimovsky.

Quoted 44 lines

-----Original Message-----
From: Pattan, Reshma
Sent: Tuesday, July 24, 2018 3:17 PM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; [email protected]; Singh, Jasvinder <[email protected]>; Pattan, Reshma <[email protected]>
Subject: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

Testpmd should be existed gracefully when ctrl+d is typed. This behaviour is not handled properly, fix this by calling pmd_test_exit() instead of rte_panic.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

---
v2: removed changes done to lib/librte_cmdline/cmdline.c reworded commit message and heading.

---
 app/test-pmd/cmdline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

588528928..406008d73 100644

app/test-pmd/cmdline.c +3 -4
@@ -17581,9 +17581,9 @@ prompt(void)
 
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
+		if (status == RDLINE_EXITED || status == -1) {
+			if (status == -1)
+				pmd_test_exit();
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
 		}
--

2.14.4

#25 lore raw

Re: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

Hi Reshma,

Quoted 9 lines

-----Original Message-----
From: Pattan, Reshma
Sent: Tuesday, July 24, 2018 3:47 PM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; [email protected]; Singh, Jasvinder <[email protected]>; [email protected]; Mordechay Haimovsky <[email protected]>
Subject: RE: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

Quoted 12 lines

+ CC: Olivier and Mordechay Haimovsky.

Quoted 10 lines

-----Original Message-----
From: Pattan, Reshma
Sent: Tuesday, July 24, 2018 3:17 PM
To: [email protected]
Cc: Iremonger, Bernard <[email protected]>; [email protected]; Singh, Jasvinder <[email protected]>; Pattan, Reshma <[email protected]>
Subject: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

Testpmd should be existed gracefully when ctrl+d is typed.

Typo in commit message:
"should be existed" should be "should exit"

Quoted 21 lines
Quoted 21 lines

This behaviour is not handled properly, fix this by calling pmd_test_exit() instead of rte_panic.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

---
v2: removed changes done to lib/librte_cmdline/cmdline.c reworded commit message and heading.

---
 app/test-pmd/cmdline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0 -0

588528928..406008d73 100644

app/test-pmd/cmdline.c +0 -0
@@ -17581,9 +17581,9 @@ prompt(void)
 
Quoted 13 lines
Quoted 12 lines
app/test-pmd/cmdline.c +3 -4
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
-		if (status < 0)
-			rte_panic("CLI poll error (%" PRId32 ")\n", status);
-		else if (status == RDLINE_EXITED) {
+		if (status == RDLINE_EXITED || status == -1) {
+			if (status == -1)
+				pmd_test_exit();
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
 		}
--
Quoted 1 line

2.14.4

Regards,

Bernard.

#26 lore raw

Re: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

In reply to Pattan, Reshma

Hi ,

Can you check if v2 version is working ? And it would be great if you add Tested-by: if test passes.

Else, please let me know the steps to reproduce the issue.

Thanks,
Reshma

#27 lore raw

Re: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d

In reply to Pattan, Reshma

24/07/2018 16:46, Pattan, Reshma:

Quoted 14 lines

+ CC: Olivier and Mordechay Haimovsky.

Quoted 12 lines

Testpmd should be existed gracefully when ctrl+d is typed. This behaviour is not handled properly, fix this by calling pmd_test_exit() instead of rte_panic.

Fixes 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

---
v2: removed changes done to lib/librte_cmdline/cmdline.c reworded commit message and heading.

The partial revert from Moti is preferred.