From: "Huang, ZhiminX" <zhiminx.huang@intel.com>
To: "Xu, Ting" <ting.xu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"Iremonger, Bernard" <bernard.iremonger@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang
Date: Mon, 11 May 2020 07:50:27 +0000 [thread overview]
Message-ID: <1DCDE90B92229844B9E6C0E67C1C8D6B046AF76D@CDSMSX102.ccr.corp.intel.com> (raw)
In-Reply-To: <20200511102504.23936-1-ting.xu@intel.com>
Tested-by: Huang, ZhiminX <zhiminx.huang@intel.com>
Regards,
HuangZhiMin
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ting Xu
Sent: Monday, May 11, 2020 6:25 PM
To: dev@dpdk.org
Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH v1] app/testpmd: fix DCB set failure in FreeBSD by clang
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
next prev parent reply other threads:[~2020-05-11 7:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 10:25 [dpdk-stable] " Ting Xu
2020-05-11 5:12 ` Xing, Beilei
2020-05-11 7:50 ` Huang, ZhiminX [this message]
2020-05-11 16:29 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2020-05-12 2:17 ` Xu, Ting
2020-05-12 11:42 ` Iremonger, Bernard
2020-05-12 10:13 ` [dpdk-stable] [PATCH v2] app/testpmd: fix DCB set failure Ting Xu
2020-05-18 17:06 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2020-05-13 9:50 ` [dpdk-stable] [PATCH v3] " Ting Xu
2020-05-13 10:07 ` [dpdk-stable] [PATCH v4] " Ting Xu
2020-05-13 8:54 ` [dpdk-stable] [dpdk-dev] " Iremonger, Bernard
2020-05-13 12:58 ` Thomas Monjalon
2020-05-13 17:16 ` [dpdk-stable] [PATCH v5] ethdev: " Ting Xu
2020-05-13 13:28 ` Ferruh Yigit
2020-05-18 16:24 ` Ferruh Yigit
2020-05-13 15:54 ` [dpdk-stable] [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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1DCDE90B92229844B9E6C0E67C1C8D6B046AF76D@CDSMSX102.ccr.corp.intel.com \
--to=zhiminx.huang@intel.com \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=ting.xu@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).