patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Yang, Qiming" <qiming.yang@intel.com>
To: "Ye, Xiaolong" <xiaolong.ye@intel.com>
Cc: "Jiang, JunyuX" <junyux.jiang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>, Chas Williams <chas3@att.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bonding: fix segfault using invalid port
Date: Tue, 29 Oct 2019 08:32:59 +0000
Message-ID: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF17A56BB67@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20191029062559.GH12923@intel.com>

Thanks for the information, got it.

Qiming
> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Tuesday, October 29, 2019 2:26 PM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org; Chas Williams
> <chas3@att.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix segfault using invalid port
> 
> On 10/29, Yang, Qiming wrote:
> >> -----Original Message-----
> >> From: Ye, Xiaolong
> >> Sent: Tuesday, October 29, 2019 11:04 AM
> >> To: Yang, Qiming <qiming.yang@intel.com>
> >> Cc: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org; Chas
> >> Williams <chas3@att.com>; stable@dpdk.org
> >> Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix segfault using
> >> invalid port
> >>
> >> On 10/28, Yang, Qiming wrote:
> >> >Hi, Junyu
> >> >
> >> >> +	dev = &rte_eth_devices[port];
> >> >> +	internals = dev->data->dev_private;
> >> >Have you build success? I think we need to add (struct
> >> >bond_dev_private *)
> >> for force transfer
> >>
> >> dev_private is a void *, an explicit type conversion is not needed here.
> >
> >OK, I saw the original code used.
> >-	struct bond_dev_private *internals = (struct bond_dev_private *)
> >-		dev->data->dev_private;
> 
> The original cast is redundant, there is a patchset from Stephen before to
> cleanup these unnecessary casts.
> 
> http://patches.dpdk.org/cover/53858/
> 
> Thanks,
> Xiaolong
> 
> 
> >
> >>
> >> Thanks,
> >> Xiaolong
> >> >
> >> >>
> >> >>  	if (check_for_bonded_ethdev(dev) != 0)
> >> >>  		return -1;
> >> >> @@ -1689,9 +1696,14 @@ int
> >> >>  rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)  {
> >> >>  	int retval = 0;
> >> >> -	struct rte_eth_dev *dev = &rte_eth_devices[port];
> >> >> -	struct bond_dev_private *internals = (struct bond_dev_private *)
> >> >> -		dev->data->dev_private;
> >> >> +	struct rte_eth_dev *dev;
> >> >> +	struct bond_dev_private *internals;
> >> >> +
> >> >> +	if (valid_bonded_port_id(port) != 0)
> >> >> +		return -EINVAL;
> >> >> +
> >> >> +	dev = &rte_eth_devices[port];
> >> >> +	internals = dev->data->dev_private;
> >> >Same as before
> >> >
> >> >>
> >> >>  	if (check_for_bonded_ethdev(dev) != 0)
> >> >>  		return -1;
> >> >> --
> >> >> 2.17.1
> >> >

  reply	other threads:[~2019-10-29  8:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 20:55 [dpdk-stable] " Jiang JunyuX
2019-10-28  5:42 ` Yang, Qiming
2019-10-29  3:04   ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2019-10-29  6:15     ` Yang, Qiming
2019-10-29  6:25       ` Ye Xiaolong
2019-10-29  8:32         ` Yang, Qiming [this message]
2019-10-28 20:19 ` [dpdk-stable] [PATCH v2] " Jiang JunyuX
2019-10-28 20:48   ` [dpdk-stable] [PATCH v3] net/bonding: fix invalid port using Jiang JunyuX
2019-10-29  2:23     ` [dpdk-stable] [PATCH v4] " Jiang JunyuX
2019-10-29 15:59       ` [dpdk-stable] [dpdk-dev] " Chas Williams
2019-10-30  8:48         ` Ferruh Yigit
2019-10-30  2:24       ` [dpdk-stable] " Yang, Qiming

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=F5DF4F0E3AFEF648ADC1C3C33AD4DBF17A56BB67@SHSMSX101.ccr.corp.intel.com \
    --to=qiming.yang@intel.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=junyux.jiang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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