Thread (82 messages) 82 messages, 7 authors, 2021-04-29

Re: [dpdk-dev] [Linuxarm] Re: [PATCH 1/3] app/testpmd: fix forwarding configuration when DCB test

From: Li, Xiaoyun <hidden>
Date: 2021-03-25 02:21:20

-----Original Message-----
From: oulijun <redacted>
Sent: Wednesday, March 24, 2021 21:40
To: linuxarm@openeuler.org; Li, Xiaoyun <redacted>; dev
[off-list ref]
Subject: Re: [Linuxarm] Re: [PATCH 1/3] app/testpmd: fix forwarding
configuration when DCB test



在 2021/3/24 10:03, Li, Xiaoyun 写道:
quoted
quoted
-----Original Message-----
From: oulijun <redacted>
Sent: Tuesday, March 23, 2021 22:19
To: Li, Xiaoyun <redacted>; Yigit, Ferruh
[off-list ref]
Cc: dev@dpdk.org; linuxarm@openeuler.org
Subject: Re: [PATCH 1/3] app/testpmd: fix forwarding configuration
when DCB test
<snip>
quoted
quoted
quoted
@@ -2707,14 +2707,16 @@ stop_port(portid_t pid)
   	portid_t peer_pl[RTE_MAX_ETHPORTS];
   	int peer_pi;

-	if (dcb_test) {
-		dcb_test = 0;
-		dcb_config = 0;
-	}
-
   	if (port_id_is_invalid(pid, ENABLED_WARN))
   		return;

+	/*
+	 * In "start_port" function, dcb_test is set to 1 based on dcb_config.
+	 * So it should be cleared when dcb_config is 0.
+	 */
+	if (dcb_config == 0)
+		dcb_test = 0;
+
I don't understand why are you changing this.
dcb_test will only be set when dcb_config is 1 when starting ports.
And both
dcb_test and dcb_config will be cleared when stopping ports.
quoted
So dcb will only affect when you set port dcb and then start port
and when
stop port dcb will be cleared.
quoted
Yes, I think. The forwarding streams should not be changed from
"dcb_fwd_config_setup" to "rss_fwd_config_setup" after dcb info is
configured.
quoted
quoted
But, now, the logical codes do it when stopping ports and then starting ports.
quoted
So what's the problem of original codes?

Your change will cause issues that there's no place to set
dcb_config as 0. If
you config dcb, then it'll be always dcb mode unless restart the whole
testpmd.
quoted
quoted
quoted
As far as I know, the current testpmd only supports switching from
the normal mode to the dcb mode, but does not support the reverse
operation.
quoted
quoted
And " dcb_config" is set to 1, and then "dcb_test" is set to 1 after
config.
You're not answering my questions. Why are you changing the behavior of
testpmd?
quoted
Your change will make testpmd stay dcb mode once set dcb mode and can't go
back to normal mode. If users want to go back to normal mode, he/she has to
restart the whole testpmd.
quoted
Yes. Testpmd and PMD driver are both in dcb mode after dcb info is configured.
In my opinion, the 'dcb_test' flag can't be clear to go back to normal mode after
stopping port and then starting port. Because PMD driver is still dcb mode. If
users want to go back it, users should disable dcb mode and enable RSS or other
mode.
quoted
It worked as you can set dcb mode and start port. After stopping port, if you
still want dcb mode, you need to set dcb mode command again. But at least the
old way won't break anything.
quoted
@Yigit, Ferruh Not sure which behavior is better, what do you think?

And @oulijun can you just answer all comments in one thread?
After stopping port, the 'dcb_test' flag is clear. At this moment, the dcb
configuration in testpmd has not be changed.  users may not understand why
the DCB mode needs to be reconfigured.
OK. You're right. There's no place writing port->dcb_flag back to 0.
quoted
quoted
quoted
quoted
   	printf("Stopping ports...\n");

   	RTE_ETH_FOREACH_DEV(pi) {
--
2.7.4
.
_______________________________________________
Linuxarm mailing list -- linuxarm@openeuler.org To unsubscribe send an
email to linuxarm-leave@openeuler.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help