From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org,
Thomas Monjalon <thomas.monjalon@6wind.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Jan Blunck <jblunck@infradead.org>
Subject: Re: [PATCH v4] ethdev: fix port data mismatched in multiple process model
Date: Fri, 20 Jan 2017 15:58:50 +0800 [thread overview]
Message-ID: <20170120075850.GU10293@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <b38ce384-2e58-db7a-4ce3-f2b995f729c6@intel.com>
On Thu, Jan 19, 2017 at 06:39:13PM +0000, Ferruh Yigit wrote:
> > struct rte_eth_dev *
> > rte_eth_dev_allocate(const char *name)
> > {
> > @@ -210,13 +223,41 @@ struct rte_eth_dev *
> > return NULL;
> > }
> >
> > - eth_dev = &rte_eth_devices[port_id];
> > - eth_dev->data = &rte_eth_dev_data[port_id];
> > + eth_dev = eth_dev_get(port_id);
>
> There can be a merge issue here, please help me understand.
>
> In repo, different from seen here, this patch does this here:
> - eth_dev = &rte_eth_devices[port_id];
> - eth_dev->data = &rte_eth_dev_data[port_id];
> - memset(eth_dev->data, 0, sizeof(*eth_dev->data));
> + memset(&rte_eth_devices[port_id], 0, sizeof(*eth_dev->data));
> + eth_dev = eth_dev_get(port_id);
>
> Which no more resets the eth_dev->data, but rte_eth_devices[port_id]
> (with sizeof(*eth_dev->data))
Nice catch! Sorry, it's a silly error by auto-complete :/
As you said, it should be:
memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data));
Will make a patch soon. Thanks.
--yliu
>
> memset(eth_dev->data) added by Jan Blunck on comment:
> 7f95f78a8aea ("ethdev: clear data when allocating device")
>
> most probably it should stay as "memset(eth_dev->data)", but if not,
> please aware that commit 7f95f78a8aea removed some assignment from
> drivers relying this memset, they needs to be added back.
next prev parent reply other threads:[~2017-01-20 7:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 7:18 [PATCH 0/3] net/virtio: a temp to fix few multiple process issues Yuanhan Liu
2016-12-22 7:18 ` [PATCH 1/3] net/virtio: fix crash for secondary process Yuanhan Liu
2016-12-22 7:18 ` [PATCH 2/3] net/virtio: fix multiple process support Yuanhan Liu
2016-12-22 7:18 ` [PATCH 3/3] net/virtio: fix wrong Rx/Tx method for secondary process Yuanhan Liu
2016-12-22 7:23 ` [PATCH 0/3] net/virtio: a temp to fix few multiple process issues Yuanhan Liu
2016-12-22 8:29 ` Xu, Qian Q
2016-12-28 11:02 ` [PATCH v2 0/6] net/virtio: fix several " Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 1/6] ethdev: fix port data mismatched in multiple process model Yuanhan Liu
2017-01-04 17:34 ` Thomas Monjalon
2017-01-05 6:25 ` Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 2/6] net/virtio: fix wrong Rx/Tx method for secondary process Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 3/6] net/virtio: store PCI operators pointer locally Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 4/6] net/virtio: store IO port info locally Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 5/6] net/virtio: fix multiple process support Yuanhan Liu
2016-12-28 11:14 ` Yuanhan Liu
2016-12-28 11:02 ` [PATCH v2 6/6] net/virtio: remove dead structure field Yuanhan Liu
2017-01-06 10:16 ` [PATCH v3 0/6] net/virtio: fix several multiple process issues Yuanhan Liu
2017-01-06 10:16 ` [PATCH v3 1/6] ethdev: fix port data mismatched in multiple process model Yuanhan Liu
2017-01-06 13:12 ` Thomas Monjalon
2017-01-06 14:19 ` Yuanhan Liu
2017-01-09 7:50 ` [PATCH v4] " Yuanhan Liu
2017-01-09 17:08 ` Thomas Monjalon
2017-01-10 14:33 ` Yuanhan Liu
2017-01-11 13:32 ` Thomas Monjalon
2017-01-12 3:10 ` Yuanhan Liu
2017-01-19 18:39 ` Ferruh Yigit
2017-01-20 7:58 ` Yuanhan Liu [this message]
2017-01-06 10:16 ` [PATCH v3 2/6] net/virtio: fix wrong Rx/Tx method for secondary process Yuanhan Liu
2017-01-08 23:15 ` Stephen Hemminger
2017-01-09 5:19 ` Yuanhan Liu
2017-01-09 8:02 ` Xu, Qian Q
2017-01-09 8:05 ` Wei, FangfangX
2017-01-06 10:16 ` [PATCH v3 3/6] net/virtio: store PCI operators pointer locally Yuanhan Liu
2017-01-06 10:16 ` [PATCH v3 4/6] net/virtio: store IO port info locally Yuanhan Liu
2017-01-06 10:16 ` [PATCH v3 5/6] net/virtio: fix multiple process support Yuanhan Liu
2017-01-06 10:16 ` [PATCH v3 6/6] net/virtio: remove dead structure field Yuanhan Liu
2017-01-12 6:02 ` Yuanhan Liu
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=20170120075850.GU10293@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jblunck@infradead.org \
--cc=stable@dpdk.org \
--cc=thomas.monjalon@6wind.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.