DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode
@ 2020-06-30 13:25 Lijun Ou
  2020-06-30 14:09 ` Wisam Monther
  0 siblings, 1 reply; 3+ messages in thread
From: Lijun Ou @ 2020-06-30 13:25 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: linuxarm

When set the forwarding mode of the pkt, it needs to update
the fwd_eng that it is the member of cur_fwd_config. Otherwise,
an error will occur when executing the set command and show
confg fwd.
the flows as follows:
   1. ./tespmd -w xxx -l xx -n 4 -- i
   2. set fwd mac
      testpmd> set fwd mac
      Set mac packet forwarding mode

   3. show config fwd
      testpmd> show config fwd
      io packet forwarding - ports=1 - cores=1 - streams=8 -...
      Logical Core 1 (socket 0) forwards packets on 8 streams:

When run the 1 ~ 3 step, it should show the packet forwarding is
mac.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a7112c9..ee0e904 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3158,6 +3158,7 @@ set_pkt_forwarding_mode(const char *fwd_mode_name)
 			       fwd_mode_name,
 			       retry_enabled == 0 ? "" : " with retry");
 			cur_fwd_eng = fwd_eng;
+			cur_fwd_config.fwd_eng = fwd_eng;
 			return;
 		}
 		i++;
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode
  2020-06-30 13:25 [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode Lijun Ou
@ 2020-06-30 14:09 ` Wisam Monther
  2020-07-01  7:12   ` [dpdk-dev] 答复: " oulijun
  0 siblings, 1 reply; 3+ messages in thread
From: Wisam Monther @ 2020-06-30 14:09 UTC (permalink / raw)
  To: Lijun Ou, dev, ferruh.yigit; +Cc: linuxarm

Hi Lijun,


>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Lijun Ou
>Sent: Tuesday, June 30, 2020 4:25 PM
>To: dev@dpdk.org; ferruh.yigit@intel.com
>Cc: linuxarm@huawei.com
>Subject: [dpdk-dev] [PATCH] app/testpmd: update uninitialized member
>when set fwd mode

The member is actually initialized before so I think the title somehow misleading,
What about: "fix missing set for current forward engine" 

>
>When set the forwarding mode of the pkt, it needs to update the fwd_eng
>that it is the member of cur_fwd_config. Otherwise, an error will occur when
>executing the set command and show confg fwd.
>the flows as follows:
>   1. ./tespmd -w xxx -l xx -n 4 -- i
>   2. set fwd mac
>      testpmd> set fwd mac
>      Set mac packet forwarding mode
>
>   3. show config fwd
>      testpmd> show config fwd
>      io packet forwarding - ports=1 - cores=1 - streams=8 -...
>      Logical Core 1 (socket 0) forwards packets on 8 streams:
>
>When run the 1 ~ 3 step, it should show the packet forwarding is mac.

I think this should be consider as a fix, and you need to add the fixed commit and cc
It's auther

>
>Signed-off-by: Lijun Ou <oulijun@huawei.com>
>---
> app/test-pmd/config.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
>a7112c9..ee0e904 100644
>--- a/app/test-pmd/config.c
>+++ b/app/test-pmd/config.c
>@@ -3158,6 +3158,7 @@ set_pkt_forwarding_mode(const char
>*fwd_mode_name)
> 			       fwd_mode_name,
> 			       retry_enabled == 0 ? "" : " with retry");
> 			cur_fwd_eng = fwd_eng;
>+			cur_fwd_config.fwd_eng = fwd_eng;
> 			return;
> 		}
> 		i++;
>--
>2.7.4


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

* [dpdk-dev] 答复:  [PATCH] app/testpmd: update uninitialized member when set fwd mode
  2020-06-30 14:09 ` Wisam Monther
@ 2020-07-01  7:12   ` " oulijun
  0 siblings, 0 replies; 3+ messages in thread
From: oulijun @ 2020-07-01  7:12 UTC (permalink / raw)
  To: Wisam Monther, dev, ferruh.yigit; +Cc: Linuxarm

Thanks. I will send the V2.

-----ÓʼþÔ­¼þ-----
·¢¼þÈË: Wisam Monther [mailto:wisamm@mellanox.com] 
·¢ËÍʱ¼ä: 2020Äê6ÔÂ30ÈÕ 22:10
ÊÕ¼þÈË: oulijun <oulijun@huawei.com>; dev@dpdk.org; ferruh.yigit@intel.com
³­ËÍ: Linuxarm <linuxarm@huawei.com>
Ö÷Ìâ: RE: [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode

Hi Lijun,


>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Lijun Ou
>Sent: Tuesday, June 30, 2020 4:25 PM
>To: dev@dpdk.org; ferruh.yigit@intel.com
>Cc: linuxarm@huawei.com
>Subject: [dpdk-dev] [PATCH] app/testpmd: update uninitialized member 
>when set fwd mode

The member is actually initialized before so I think the title somehow misleading, What about: "fix missing set for current forward engine" 

>
>When set the forwarding mode of the pkt, it needs to update the fwd_eng 
>that it is the member of cur_fwd_config. Otherwise, an error will occur 
>when executing the set command and show confg fwd.
>the flows as follows:
>   1. ./tespmd -w xxx -l xx -n 4 -- i
>   2. set fwd mac
>      testpmd> set fwd mac
>      Set mac packet forwarding mode
>
>   3. show config fwd
>      testpmd> show config fwd
>      io packet forwarding - ports=1 - cores=1 - streams=8 -...
>      Logical Core 1 (socket 0) forwards packets on 8 streams:
>
>When run the 1 ~ 3 step, it should show the packet forwarding is mac.

I think this should be consider as a fix, and you need to add the fixed commit and cc It's auther

>
>Signed-off-by: Lijun Ou <oulijun@huawei.com>
>---
> app/test-pmd/config.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
>a7112c9..ee0e904 100644
>--- a/app/test-pmd/config.c
>+++ b/app/test-pmd/config.c
>@@ -3158,6 +3158,7 @@ set_pkt_forwarding_mode(const char
>*fwd_mode_name)
> 			       fwd_mode_name,
> 			       retry_enabled == 0 ? "" : " with retry");
> 			cur_fwd_eng = fwd_eng;
>+			cur_fwd_config.fwd_eng = fwd_eng;
> 			return;
> 		}
> 		i++;
>--
>2.7.4


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 13:25 [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode Lijun Ou
2020-06-30 14:09 ` Wisam Monther
2020-07-01  7:12   ` [dpdk-dev] 答复: " oulijun

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox