DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Remy Horton <remy.horton@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] ethdev: fix multi-process NULL dereference crashes
Date: Tue, 24 Jan 2017 11:49:14 +0100	[thread overview]
Message-ID: <15501893.0xUg90OPpe@xps13> (raw)
In-Reply-To: <9128e0fe-23b5-4a9f-31c5-29ee22358909@intel.com>

2017-01-24 08:16, Remy Horton:
> 
> On 20/01/2017 18:37, Thomas Monjalon wrote:
> [..]
> > 3 comments here:
> > - it is in the wrong section (EAL instead of Drivers)
> > - secondary processes can setup a vdev PMD
> > - before Yuanhan's patch, even PCI PMD were blanking primary process data
> 
> Since the code being changed is in rte_ether rather than drivers/net it 
> seemed the logical place to me.. :)

The change is in ethdev, and you put the release note in EAL.
So no, it is not logical, because ethdev is not EAL.

> > I propose this rebase:
> >
> > -       memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data));
> >         eth_dev = eth_dev_get(port_id);
> > +       if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> > +               memset(eth_dev->data, 0, sizeof(*eth_dev->data));
> >         snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name);
> >         eth_dev->data->port_id = port_id;
> >         eth_dev->data->mtu = ETHER_MTU;
> 
> Seems OK to me, assuming Yuanhan's patch is going in as-is.

Yuanhan's patch is already part of RC1.

  reply	other threads:[~2017-01-24 10:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 18:42 Remy Horton
2017-01-11 14:22 ` Thomas Monjalon
2017-01-11 15:01   ` Remy Horton
2017-01-20 18:37 ` Thomas Monjalon
2017-01-24  8:16   ` Remy Horton
2017-01-24 10:49     ` Thomas Monjalon [this message]
2017-01-24 11:03       ` Remy Horton
2017-01-24 15:01 ` [dpdk-dev] [PATCH v2] " Remy Horton
2017-01-25 11:56   ` Thomas Monjalon
2017-01-25 12:13     ` Remy Horton
2017-01-25 14:02   ` Remy Horton
2017-01-25 14:31     ` Thomas Monjalon
2017-01-25 14:38       ` Remy Horton

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=15501893.0xUg90OPpe@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=remy.horton@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).