All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds
@ 2016-09-29 17:03 Ajit Khaparde
  2016-10-10 15:01 ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Ajit Khaparde @ 2016-09-29 17:03 UTC (permalink / raw)
  To: dev

Support to configure 25G and 50G speeds is missing from testpmd.
This patch also updates the testpmd user guide accordingly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 app/test-pmd/cmdline.c                      | 14 +++++++++-----
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 17d238f..6ffa771 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -545,7 +545,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Detach physical or virtual dev by port_id\n\n"
 
 			"port config (port_id|all)"
-			" speed (10|100|1000|10000|40000|100000|auto)"
+			" speed (10|100|1000|10000|25000|40000|50000|100000|auto)"
 			" duplex (half|full|auto)\n"
 			"    Set speed and duplex for all ports or port_id\n\n"
 
@@ -1016,8 +1016,12 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 			*speed = ETH_LINK_SPEED_1G;
 		} else if (!strcmp(speedstr, "10000")) {
 			*speed = ETH_LINK_SPEED_10G;
+		} else if (!strcmp(speedstr, "25000")) {
+			*speed = ETH_LINK_SPEED_25G;
 		} else if (!strcmp(speedstr, "40000")) {
 			*speed = ETH_LINK_SPEED_40G;
+		} else if (!strcmp(speedstr, "50000")) {
+			*speed = ETH_LINK_SPEED_50G;
 		} else if (!strcmp(speedstr, "100000")) {
 			*speed = ETH_LINK_SPEED_100G;
 		} else if (!strcmp(speedstr, "auto")) {
@@ -1067,7 +1071,7 @@ cmdline_parse_token_string_t cmd_config_speed_all_item1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item1, "speed");
 cmdline_parse_token_string_t cmd_config_speed_all_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,
-						"10#100#1000#10000#40000#100000#auto");
+						"10#100#1000#10000#25000#40000#50000#100000#auto");
 cmdline_parse_token_string_t cmd_config_speed_all_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "duplex");
 cmdline_parse_token_string_t cmd_config_speed_all_value2 =
@@ -1077,7 +1081,7 @@ cmdline_parse_token_string_t cmd_config_speed_all_value2 =
 cmdline_parse_inst_t cmd_config_speed_all = {
 	.f = cmd_config_speed_all_parsed,
 	.data = NULL,
-	.help_str = "port config all speed 10|100|1000|10000|40000|100000|auto duplex "
+	.help_str = "port config all speed 10|100|1000|10000|25000|40000|50000|100000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_all_port,
@@ -1141,7 +1145,7 @@ cmdline_parse_token_string_t cmd_config_speed_specific_item1 =
 								"speed");
 cmdline_parse_token_string_t cmd_config_speed_specific_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1,
-						"10#100#1000#10000#40000#100000#auto");
+						"10#100#1000#10000#25000#40000#50000#100000#auto");
 cmdline_parse_token_string_t cmd_config_speed_specific_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
 								"duplex");
@@ -1152,7 +1156,7 @@ cmdline_parse_token_string_t cmd_config_speed_specific_value2 =
 cmdline_parse_inst_t cmd_config_speed_specific = {
 	.f = cmd_config_speed_specific_parsed,
 	.data = NULL,
-	.help_str = "port config X speed 10|100|1000|10000|40000|100000|auto duplex "
+	.help_str = "port config X speed 10|100|1000|10000|25000|40000|50000|100000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_specific_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f87e0c2..e1eea34 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1167,7 +1167,7 @@ port config - speed
 
 Set the speed and duplex mode for all ports or a specific port::
 
-   testpmd> port config (port_id|all) speed (10|100|1000|10000|40000|100000|auto) \
+   testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|auto) \
             duplex (half|full|auto)
 
 port config - queues/descriptors
-- 
2.4.3

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

* Re: [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds
  2016-09-29 17:03 [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds Ajit Khaparde
@ 2016-10-10 15:01 ` Ferruh Yigit
  2016-10-10 18:40   ` Ajit Khaparde
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2016-10-10 15:01 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Pablo de Lara

Hi Ajit,

On 9/29/2016 6:03 PM, Ajit Khaparde wrote:
> Support to configure 25G and 50G speeds is missing from testpmd.
> This patch also updates the testpmd user guide accordingly.
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

This patch seems not really part of the patchset for bnxt driver, but
standalone testpmd only modification, and can be threaded as single patch.

I am adding testpmd maintainer to cc.

Thanks,
ferruh

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

* Re: [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds
  2016-10-10 15:01 ` Ferruh Yigit
@ 2016-10-10 18:40   ` Ajit Khaparde
       [not found]     ` <E115CCD9D858EF4F90C690B0DCB4D8973CA07C0F@IRSMSX108.ger.corp.intel.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Ajit Khaparde @ 2016-10-10 18:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Pablo de Lara

On Mon, Oct 10, 2016 at 10:01 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> Hi Ajit,
>
> On 9/29/2016 6:03 PM, Ajit Khaparde wrote:
> > Support to configure 25G and 50G speeds is missing from testpmd.
> > This patch also updates the testpmd user guide accordingly.
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
> This patch seems not really part of the patchset for bnxt driver, but
> standalone testpmd only modification,
> ​​
> and can be threaded as single patch.
>
​OK. Got it.
I had worked on this change in the middle of other things.
​So it got bundled along with other bnxt patches.


>
> I am adding testpmd maintainer to cc.
>
​Let me know if you want me to send it again as a standalone patch.

Thanks​


>
> Thanks,
> ferruh
>
>

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

* Re: [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds
       [not found]     ` <E115CCD9D858EF4F90C690B0DCB4D8973CA07C0F@IRSMSX108.ger.corp.intel.com>
@ 2016-10-12  1:24       ` De Lara Guarch, Pablo
  2016-10-12 21:26         ` [PATCH v2] app/testpmd: add " Ajit Khaparde
  0 siblings, 1 reply; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2016-10-12  1:24 UTC (permalink / raw)
  To: Ajit Khaparde, Yigit, Ferruh; +Cc: dev

Hi,

> From: Ajit Khaparde [mailto:ajit.khaparde@broadcom.com]
> Sent: Monday, October 10, 2016 11:41 AM
> To: Yigit, Ferruh
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> Subject: Re: [dpdk-dev] [PATCH 1/4] testpmd: Add support to configure 25G
> and 50G speeds
> 
> On Mon, Oct 10, 2016 at 10:01 AM, Ferruh Yigit <ferruh.yigit@intel.com>
> wrote:
> Hi Ajit,
> 
> On 9/29/2016 6:03 PM, Ajit Khaparde wrote:
> > Support to configure 25G and 50G speeds is missing from testpmd.
> > This patch also updates the testpmd user guide accordingly.
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> 
> This patch seems not really part of the patchset for bnxt driver, but
> standalone testpmd only modification,
> ​​
> and can be threaded as single patch.
> ​OK. Got it.
> I had worked on this change in the middle of other things.
> ​So it got bundled along with other bnxt patches.
> 
> 
> I am adding testpmd maintainer to cc.
> ​Let me know if you want me to send it again as a standalone patch.

Yes, I think it is a good idea.
Apart from that, there are a couple of things to fix:

There are two lines that exceed the character limit (from checkpatch):
WARNING: line over 80 characters
#55: FILE: app/test-pmd/cmdline.c:1084:
+       .help_str = "port config all speed 10|100|1000|10000|25000|40000|50000|100000|auto duplex "

WARNING: line over 80 characters
#73: FILE: app/test-pmd/cmdline.c:1159:
+       .help_str = "port config X speed 10|100|1000|10000|25000|40000|50000|100000|auto duplex "

check-git-log.sh complains about the title:

Wrong headline label:
        testpmd: Add support to configure 25G and 50G speeds
Wrong headline uppercase:
        testpmd: Add support to configure 25G and 50G speeds

Title should be "app/testpmd: add ...."

Could you send a separate v2 with this changes?
And probably change the bnxt patchset to 3 patches only.

Thanks,
Pablo

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

* [PATCH v2] app/testpmd: add support to configure 25G and 50G speeds
  2016-10-12  1:24       ` De Lara Guarch, Pablo
@ 2016-10-12 21:26         ` Ajit Khaparde
  2016-10-13 15:27           ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Ajit Khaparde @ 2016-10-12 21:26 UTC (permalink / raw)
  To: dev; +Cc: Pablo de Lara

Support to configure 25G and 50G speeds is missing from testpmd.
This patch also updates the testpmd user guide accordingly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v2: shorten lines > 80 character limit
---
 app/test-pmd/cmdline.c                      | 16 +++++++++++-----
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a1da8b8..b8c7b8b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -545,7 +545,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Detach physical or virtual dev by port_id\n\n"
 
 			"port config (port_id|all)"
-			" speed (10|100|1000|10000|40000|100000|auto)"
+			" speed (10|100|1000|10000|25000|40000|50000|100000|auto)"
 			" duplex (half|full|auto)\n"
 			"    Set speed and duplex for all ports or port_id\n\n"
 
@@ -1016,8 +1016,12 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 			*speed = ETH_LINK_SPEED_1G;
 		} else if (!strcmp(speedstr, "10000")) {
 			*speed = ETH_LINK_SPEED_10G;
+		} else if (!strcmp(speedstr, "25000")) {
+			*speed = ETH_LINK_SPEED_25G;
 		} else if (!strcmp(speedstr, "40000")) {
 			*speed = ETH_LINK_SPEED_40G;
+		} else if (!strcmp(speedstr, "50000")) {
+			*speed = ETH_LINK_SPEED_50G;
 		} else if (!strcmp(speedstr, "100000")) {
 			*speed = ETH_LINK_SPEED_100G;
 		} else if (!strcmp(speedstr, "auto")) {
@@ -1067,7 +1071,7 @@ cmdline_parse_token_string_t cmd_config_speed_all_item1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item1, "speed");
 cmdline_parse_token_string_t cmd_config_speed_all_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,
-						"10#100#1000#10000#40000#100000#auto");
+				"10#100#1000#10000#25000#40000#50000#100000#auto");
 cmdline_parse_token_string_t cmd_config_speed_all_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "duplex");
 cmdline_parse_token_string_t cmd_config_speed_all_value2 =
@@ -1077,7 +1081,8 @@ cmdline_parse_token_string_t cmd_config_speed_all_value2 =
 cmdline_parse_inst_t cmd_config_speed_all = {
 	.f = cmd_config_speed_all_parsed,
 	.data = NULL,
-	.help_str = "port config all speed 10|100|1000|10000|40000|100000|auto duplex "
+	.help_str = "port config all speed "
+		"10|100|1000|10000|25000|40000|50000|100000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_all_port,
@@ -1141,7 +1146,7 @@ cmdline_parse_token_string_t cmd_config_speed_specific_item1 =
 								"speed");
 cmdline_parse_token_string_t cmd_config_speed_specific_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1,
-						"10#100#1000#10000#40000#100000#auto");
+				"10#100#1000#10000#25000#40000#50000#100000#auto");
 cmdline_parse_token_string_t cmd_config_speed_specific_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
 								"duplex");
@@ -1152,7 +1157,8 @@ cmdline_parse_token_string_t cmd_config_speed_specific_value2 =
 cmdline_parse_inst_t cmd_config_speed_specific = {
 	.f = cmd_config_speed_specific_parsed,
 	.data = NULL,
-	.help_str = "port config X speed 10|100|1000|10000|40000|100000|auto duplex "
+	.help_str = "port config X speed "
+		"10|100|1000|10000|25000|40000|50000|100000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_specific_port,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f87e0c2..e1eea34 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1167,7 +1167,7 @@ port config - speed
 
 Set the speed and duplex mode for all ports or a specific port::
 
-   testpmd> port config (port_id|all) speed (10|100|1000|10000|40000|100000|auto) \
+   testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|auto) \
             duplex (half|full|auto)
 
 port config - queues/descriptors
-- 
2.8.4 (Apple Git-73)

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

* Re: [PATCH v2] app/testpmd: add support to configure 25G and 50G speeds
  2016-10-12 21:26         ` [PATCH v2] app/testpmd: add " Ajit Khaparde
@ 2016-10-13 15:27           ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2016-10-13 15:27 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dev, Pablo de Lara

2016-10-12 16:26, Ajit Khaparde:
> Support to configure 25G and 50G speeds is missing from testpmd.
> This patch also updates the testpmd user guide accordingly.
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> --
> v2: shorten lines > 80 character limit
> ---

Applied, thanks

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

end of thread, other threads:[~2016-10-13 15:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 17:03 [PATCH 1/4] testpmd: Add support to configure 25G and 50G speeds Ajit Khaparde
2016-10-10 15:01 ` Ferruh Yigit
2016-10-10 18:40   ` Ajit Khaparde
     [not found]     ` <E115CCD9D858EF4F90C690B0DCB4D8973CA07C0F@IRSMSX108.ger.corp.intel.com>
2016-10-12  1:24       ` De Lara Guarch, Pablo
2016-10-12 21:26         ` [PATCH v2] app/testpmd: add " Ajit Khaparde
2016-10-13 15:27           ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.