All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "Xu, Ting" <ting.xu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: fix DCB set failure
Date: Wed, 13 May 2020 08:54:33 +0000	[thread overview]
Message-ID: <DM6PR11MB2537874F781637B7023B7366EFBF0@DM6PR11MB2537.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200513100745.13118-1-ting.xu@intel.com>

Hi Ting,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ting Xu
> Sent: Wednesday, May 13, 2020 11:08 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Yigit, Ferruh <ferruh.yigit@intel.com>;
> arybchenko@solarflare.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v4] app/testpmd: fix DCB set failure

The fix is no longer in testpmd, so the commit line should be "ethdev: fix DCB set failure".

 
> When set DCB in testpmd, 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 this situation.

The commit message should probably be revised.

> 
> Fixes: ac7c491c3fec ("app/testpmd: fix DCB config")

Also the Fixes line may need to change.

> Cc: stable@dpdk.org
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>
> 
> ---
> V3->v4: fix build failure
> v2->v3: move memset to rte_eth_dev_rss_hash_conf_get from testpmd
> v1->v2: modify commit log, move memset to else leg
> ---
>  lib/librte_ethdev/rte_ethdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 8e10a6fc3..1f6ca742a 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -3549,6 +3549,8 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
> {
>  	struct rte_eth_dev *dev;
> 
> +	memset(rss_conf, 0, sizeof(*rss_conf));

The memset call should be moved to after the error checks to just before the function is called.

> +
>  	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
>  	dev = &rte_eth_devices[port_id];
>  	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_conf_get,
> -ENOTSUP);
> --
> 2.17.1

Regards,

Bernard.


  reply	other threads:[~2020-05-13  8:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=DM6PR11MB2537874F781637B7023B7366EFBF0@DM6PR11MB2537.namprd11.prod.outlook.com \
    --to=bernard.iremonger@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=ting.xu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.