[dpdk-dev,v2,5/5] testpmd: show topology at forwarding start

Message ID 1464751663-135211-6-git-send-email-zhihong.wang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Zhihong Wang June 1, 2016, 3:27 a.m. UTC
  This patch show topology at forwarding start.

"show config fwd" also does this, but showing it directly can reduce the
possibility of misconfiguration.


Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.c | 2 +-
 app/test-pmd/testpmd.h | 3 +--
 4 files changed, 5 insertions(+), 6 deletions(-)
  

Comments

De Lara Guarch, Pablo June 7, 2016, 10:56 a.m. UTC | #1
> -----Original Message-----
> From: Wang, Zhihong
> Sent: Wednesday, June 01, 2016 4:28 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin; Richardson, Bruce; De Lara Guarch, Pablo;
> thomas.monjalon@6wind.com; Wang, Zhihong
> Subject: [PATCH v2 5/5] testpmd: show topology at forwarding start
> 
> This patch show topology at forwarding start.
> 
> "show config fwd" also does this, but showing it directly can reduce the
> possibility of misconfiguration.
> 
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
De Lara Guarch, Pablo June 14, 2016, 3:13 p.m. UTC | #2
Hi Zhihong,

> -----Original Message-----
> From: Wang, Zhihong
> Sent: Wednesday, June 01, 2016 4:28 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin; Richardson, Bruce; De Lara Guarch, Pablo;
> thomas.monjalon@6wind.com; Wang, Zhihong
> Subject: [PATCH v2 5/5] testpmd: show topology at forwarding start
> 
> This patch show topology at forwarding start.
> 
> "show config fwd" also does this, but showing it directly can reduce the
> possibility of misconfiguration.
> 
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
[...]

> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 9b1d99c..b946034 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -1009,7 +1009,7 @@ start_packet_forwarding(int with_tx_first)
>  	if(!no_flush_rx)
>  		flush_fwd_rx_queues();
> 
> -	fwd_config_setup();
> +	fwd_config_setup_display();

Bernard has made a patch that separates the display and setup of the configuration,
(http://dpdk.org/dev/patchwork/patch/13650/)
so fwd_config_display() does not call fwd_config_setup() anymore.

Could you modify this patch, so you call fwd_config_setup() and fwd_config_display()?

Sorry for the confusion,
Pablo

>  	rxtx_config_display();
> 
>  	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
  
Zhihong Wang June 15, 2016, 7:05 a.m. UTC | #3
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, June 14, 2016 11:13 PM
> To: Wang, Zhihong <zhihong.wang@intel.com>; dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; thomas.monjalon@6wind.com
> Subject: RE: [PATCH v2 5/5] testpmd: show topology at forwarding start
> 
> 
> Hi Zhihong,
> 
> > -----Original Message-----
> > From: Wang, Zhihong
> > Sent: Wednesday, June 01, 2016 4:28 AM
> > To: dev@dpdk.org
> > Cc: Ananyev, Konstantin; Richardson, Bruce; De Lara Guarch, Pablo;
> > thomas.monjalon@6wind.com; Wang, Zhihong
> > Subject: [PATCH v2 5/5] testpmd: show topology at forwarding start
> >
> > This patch show topology at forwarding start.
> >
> > "show config fwd" also does this, but showing it directly can reduce the
> > possibility of misconfiguration.
> >
> >
> > Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> [...]
> 
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> > index 9b1d99c..b946034 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -1009,7 +1009,7 @@ start_packet_forwarding(int with_tx_first)
> >  	if(!no_flush_rx)
> >  		flush_fwd_rx_queues();
> >
> > -	fwd_config_setup();
> > +	fwd_config_setup_display();
> 
> Bernard has made a patch that separates the display and setup of the
> configuration,
> (http://dpdk.org/dev/patchwork/patch/13650/)
> so fwd_config_display() does not call fwd_config_setup() anymore.
> 
> Could you modify this patch, so you call fwd_config_setup() and
> fwd_config_display()?

Thanks for the info! I've updated this patch with a v3.
Could you please help review?


> 
> Sorry for the confusion,
> Pablo
> 
> >  	rxtx_config_display();
> >
> >  	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ef66d4e..bc800f8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5445,7 +5445,7 @@  static void cmd_showcfg_parsed(void *parsed_result,
 	else if (!strcmp(res->what, "cores"))
 		fwd_lcores_config_display();
 	else if (!strcmp(res->what, "fwd"))
-		fwd_config_display();
+		fwd_config_setup_display();
 	else if (!strcmp(res->what, "txpkts"))
 		show_tx_pkt_segments();
 }
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cfdacd8..c70f308 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1383,7 +1383,7 @@  icmp_echo_config_setup(void)
 	}
 }
 
-void
+static void
 fwd_config_setup(void)
 {
 	cur_fwd_config.fwd_eng = cur_fwd_eng;
@@ -1443,7 +1443,7 @@  pkt_fwd_config_display(struct fwd_config *cfg)
 
 
 void
-fwd_config_display(void)
+fwd_config_setup_display(void)
 {
 	fwd_config_setup();
 	pkt_fwd_config_display(&cur_fwd_config);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9b1d99c..b946034 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1009,7 +1009,7 @@  start_packet_forwarding(int with_tx_first)
 	if(!no_flush_rx)
 		flush_fwd_rx_queues();
 
-	fwd_config_setup();
+	fwd_config_setup_display();
 	rxtx_config_display();
 
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 62ec055..5fd08e8 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -480,9 +480,8 @@  void port_infos_display(portid_t port_id);
 void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);
 void fwd_lcores_config_display(void);
-void fwd_config_display(void);
+void fwd_config_setup_display(void);
 void rxtx_config_display(void);
-void fwd_config_setup(void);
 void set_def_fwd_config(void);
 void reconfig(portid_t new_port_id, unsigned socket_id);
 int init_fwd_streams(void);