DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang
@ 2020-05-11 10:25 Ting Xu
  2020-05-11  5:12 ` Xing, Beilei
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Ting Xu @ 2020-05-11 10:25 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, beilei.xing, bernard.iremonger, stable

When set DCB in testpmd by clang, there is a segmentation fault.
It is because the local variable rss_conf in get_eth_dcb_conf()
is not cleared, so that the pointer member variable rss_key has
a random address, which leads to an error in the following
processing. This patch initialized the local variable rss_conf
to avoid random address.

Fixes: b57b66a97ebf ("app/testpmd: support mbuf dynamic flag")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 app/test-pmd/testpmd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 99bacddbf..1276476ca 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3408,6 +3408,7 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf,
 	int32_t rc;
 	struct rte_eth_rss_conf rss_conf;
 
+	memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf));
 	/*
 	 * Builds up the correct configuration for dcb+vt based on the vlan tags array
 	 * given above, and the number of traffic classes available for use.
-- 
2.17.1


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

end of thread, other threads:[~2020-05-18 17:07 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 10:25 [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang Ting Xu
2020-05-11  5:12 ` Xing, Beilei
2020-05-11  7:50 ` Huang, ZhiminX
2020-05-11 16:29 ` Ferruh Yigit
2020-05-12  2:17   ` Xu, Ting
2020-05-12 11:42     ` Iremonger, Bernard
2020-05-12 10:13 ` [dpdk-dev] [PATCH v2] app/testpmd: fix DCB set failure Ting Xu
2020-05-18 17:06   ` Ferruh Yigit
2020-05-13  9:50 ` [dpdk-dev] [PATCH v3] " Ting Xu
2020-05-13 10:07 ` [dpdk-dev] [PATCH v4] " Ting Xu
2020-05-13  8:54   ` Iremonger, Bernard
2020-05-13 12:58     ` Thomas Monjalon
2020-05-13 17:16 ` [dpdk-dev] [PATCH v5] ethdev: " Ting Xu
2020-05-13 13:28   ` Ferruh Yigit
2020-05-18 16:24     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-05-13 15:54   ` [dpdk-dev] " Iremonger, Bernard
2020-05-18 13:32   ` Andrew Rybchenko
2020-05-18 14:57     ` Matan Azrad
2020-05-18 16:21       ` Ferruh Yigit
2020-05-18 16:20     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).