DPDK patches and discussions
 help / color / Atom feed
From: 方统浩50450 <fangtonghao@sangfor.com.cn>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: thomas@monjalon.net, ferruh.yigit@intel.com,
	arybchenko@solarflare.com,  dev@dpdk.org, stable@dpdk.org,
	cunming.liang@intel.com, jia.guo@intel.com
Subject: Re: [dpdk-dev] [PATCH] ethdev: fix secondary process change share memory
Date: Mon, 13 Jan 2020 11:02:42 +0800 (GMT+08:00)
Message-ID: <ANYA0gD2CB3gOKTferEYwqrw.3.1578884562470.Hmail.fangtonghao@sangfor.com.cn> (raw)
In-Reply-To: <20200110073215.09ad9a6f@hermes.lan>

secondary process will enter rte_eth_copy_pci_info function when initializing.
rte_eth_dev_pci_copy_info -> rte_eth_copy_pci_info

发件人:Stephen Hemminger <stephen@networkplumber.org>
发送日期:2020-01-10 23:32:15
收件人:Fang TongHao <fangtonghao@sangfor.com.cn>
主题:Re: [dpdk-dev] [PATCH] ethdev: fix secondary process change share memory>On Thu,  9 Jan 2020 11:14:25 +0800
>Fang TongHao <fangtonghao@sangfor.com.cn> wrote:
>> Hi all,I am from Sangfor Tech.I found a bug when using DPDK in
>> multiprocess scenario.The secondary process enters
>> "rte_eth_dev_pci_copy_info" function when initializing.Then it
>> sets the value of struct "rte_eth_dev_data.dev_flags" to zero,
>> but this struct is shared by primary process and secondary
>> process, and the value change is unexpected by primary process.
>> This may cause very serious damage.I think
>> the secondary process should not enter "rte_eth_dev_pci_copy_info"
>> function or changes the value of struct "rte_eth_dev_data.dev_flags"
>> in shared memory.
>> I fixed this bug by adding an if-statement to forbid the secondary
>> process changing the above-mentioned value.
>> Thansk, All.
>> Signed-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>
>Most of the drivers avoid calling rte_eth_dev_pci_copy_info
>in the secondary process, which one are you using?

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  3:14 Fang TongHao
2020-01-10 15:32 ` Stephen Hemminger
2020-01-13  3:02   ` 方统浩50450 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-09 12:27 Fang TongHao
2020-01-10  7:30 ` Jeff Guo
2020-01-10  7:53   ` 方统浩50450
2020-01-09  2:35 Fang TongHao
2020-01-15 10:30 ` Burakov, Anatoly

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ANYA0gD2CB3gOKTferEYwqrw.3.1578884562470.Hmail.fangtonghao@sangfor.com.cn \
    --to=fangtonghao@sangfor.com.cn \
    --cc=arybchenko@solarflare.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jia.guo@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/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 dev dev/ http://inbox.dpdk.org/dev \
	public-inbox-index dev

Newsgroup available over NNTP:

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