patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <>
To: Fang TongHao <>,
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix secondary process change share memory
Date: Wed, 15 Jan 2020 10:30:03 +0000
Message-ID: <> (raw)
In-Reply-To: <>

On 09-Jan-20 2:35 AM, Fang TongHao 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.


Thanks for your contribution! However, your patch could use some 
improvements, as it currently doesn't meet the standards expected by the 
DPDK community.

First of all, the commit log shouldn't read like an email :) Suggested 

When secondary process enters `rte_eth_copy_pci_info`, it resets the 
rte_eth_dev_data.dev_flags to zero. This may cause unintended 
consequences because this is a structure that is shared between primary 
and secondary processes. Fix it by only overwriting the flags if the 
process is primary.

Your commit message has also incorrectly called out the offending 
function as `rte_eth_dev_copy_pci_info`, while it is actually named 

Also, a Fixes: tag is missing. Please use git blame to find the commit 
that introduced the issue, and use the 'fixline' formatting. Please see 
Contribution Guidelines[1] on how to properly format fixline.

You will find instructions on how to submit a version 2 of the patch in 
the same document[2].




  reply	other threads:[~2020-01-15 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  2:35 [dpdk-stable] " Fang TongHao
2020-01-15 10:30 ` Burakov, Anatoly [this message]
2020-01-09  3:14 Fang TongHao
2020-01-10 15:32 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2020-01-13  3:02   ` 方统浩50450

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:

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

  git send-email \ \ \ \ \ \

* 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 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/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone