DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: ZY Qiu <quzeyao@gmail.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	dev@dpdk.org, ZY Qiu <tgw_team@tencent.com>
Subject: Re: [dpdk-dev] [PATCH v2] rte_ethdev: safer memory access by calling Rx callback
Date: Wed, 4 Mar 2020 09:56:38 -0800
Message-ID: <20200304095638.7c7fed0b@hermes.lan> (raw)
In-Reply-To: <20200304173349.26459-1-tgw_team@tencent.com>

On Thu,  5 Mar 2020 01:33:49 +0800
ZY Qiu <quzeyao@gmail.com> wrote:

> When compiling with -O0,
> the compiler does not optimize two memory accesses into one.
> Leads to accessing a null pointer when queue post Rx burst callback
> removal while traffic is running.
> See rte_eth_tx_burst function.
> Signed-off-by: ZY Qiu <tgw_team@tencent.com>

This is a problem many places in DPDK. You said it was related to -O0
but that is just what is causing a more generic problem to be exposed.
Your solution is not sufficient.

DPDK is sloppy in several places in handling memory ordering issues     

It should have a macro to do RTE_READ_ONCE(). Several drives have this,
the Linux kernel has it, Liburcu has it.

The macro RTE_READ_ONCE() can then be used in many places in DPDK.

  reply	other threads:[~2020-03-04 17:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 14:05 [dpdk-dev] [PATCH] rte_ethdev: fix unsafe memory access by calling RX callback Tencent TGW team
2020-03-04 14:16 ` Andrew Rybchenko
     [not found]   ` <61a6b7d5533643d692c40dc0ab1a2cdc@tencent.com>
2020-03-04 16:26     ` tgw_team(腾讯网关团队)
2020-03-04 16:15 ` Stephen Hemminger
2020-03-04 16:38   ` [dpdk-dev] [PATCH] rte_ethdev: fix unsafe memory access by calling RX callback.(Internet mail) tgw_team(腾讯网关团队)
2020-03-04 17:37     ` Stephen Hemminger
2020-03-04 17:44       ` [dpdk-dev] [PATCH] rte_ethdev: fix unsafe memory access by calling RX callback tgw_team(腾讯网关团队)
2020-03-04 17:33 ` [dpdk-dev] [PATCH v2] rte_ethdev: safer memory access by calling Rx callback ZY Qiu
2020-03-04 17:56   ` Stephen Hemminger [this message]
2020-03-04 18:31     ` tgw_team(腾讯网关团队)
2020-03-05  9:19   ` Bruce Richardson
2020-03-05 11:27     ` Ananyev, Konstantin
2020-03-05 14:23       ` tgw_team(腾讯网关团队)
2020-03-05 14:47       ` Liang, Ma
2020-03-05 15:19         ` Ananyev, Konstantin
2020-03-05 15:42           ` Liang, Ma
2020-03-05 16:47   ` [dpdk-dev] [PATCH v3] rte_ethdev: safer memory access by calling Rx/Tx callback ZY Qiu
2020-03-05 17:23     ` Jerin Jacob
2020-03-11 12:22     ` Ananyev, Konstantin
2020-03-11 12:26       ` Jerin Jacob
2020-10-01 15:14         ` Ferruh Yigit

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 \
    --in-reply-to=20200304095638.7c7fed0b@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=quzeyao@gmail.com \
    --cc=tgw_team@tencent.com \
    --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

This inbox may be cloned and mirrored by anyone:

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

Example config snippet for mirrors.
Newsgroup available over NNTP:

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