DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Renata Saiakhova <Renata.Saiakhova@ekinops.com>, dev@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation
Date: Wed, 13 May 2020 16:22:22 +0100
Message-ID: <7e3ef1e4-cca6-c113-3d15-648265d3072f@intel.com> (raw)
In-Reply-To: <20200513131425.27817-1-Renata.Saiakhova@ekinops.com>

On 5/13/2020 2:14 PM, Renata Saiakhova wrote:
> igb and ixgbe and some other drivers allocate HW rings using rte_eth_dma_zone_reserve(),
> which checks first if the memzone exists for a given name, consisting of port
> id, queue_id, rx/tx direction, but not for the size, alignment, and socket_id.
> If the memzone with a given name exists it is returned, otherwise it is
> allocated.
> Disconnecting dpdk port from one type of interface (igb) and connecting it
> to another type of interface (ixgbe) for the same port id, potentially creates
> memory overlap and corruption, because it may require memzone of bigger size.
> That's what is happening from switching from igb to ixgbe having the same port
> id.
> 
> v2->v3: Remove #undef ETH_DMA_MZONE_NAME and minor changes in code standard
> v1->v2: Minor changes on code standard and additional fixes in i40e em and ice drivers
> 
> Renata Saiakhova (4):
>   librte_ethdev: Introduce a function to release HW rings
>   drivers/net: Fix in igb and ixgbe HW rings memory
>   drivers/net: Fix in i40e HW rings memory overlap
>   drivers/net: Fix in em and ice HW rings memory overlap

I think all driver patches can be squashed into single patch, overall they are
implementing same logic.

But as mentioned before, there are multiple other drivers allocating HW rings
with exact same name. At least I can see:
iavf
nfp
fm10k
axgbe

Or how can we know if a new PMD won't cause exact same behavior? What to you
think adding pmd name as prefix to queue memzone name for all PMDs? This can
help new PMDs using existing code as sample.

I don't know if it has been discussed before, but wouldn't update the
'rte_eth_dma_zone_reserve()' to check the size & alignment instead of just name
fix the issue for all drivers without needing to update them?

  parent reply	other threads:[~2020-05-13 15:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 13:14 Renata Saiakhova
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
2020-05-14 13:14   ` Burakov, Anatoly
2020-05-15  8:04   ` Jeff Guo
2020-06-19 17:06     ` Ferruh Yigit
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 2/4] drivers/net: Fix in igb and ixgbe HW rings memory Renata Saiakhova
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 3/4] drivers/net: Fix in i40e HW rings memory overlap Renata Saiakhova
2020-06-01  7:58   ` Zhao1, Wei
2020-06-19 16:56     ` Ferruh Yigit
2020-06-20  3:02       ` Zhao1, Wei
2020-05-13 13:14 ` [dpdk-dev] [PATCH v3 4/4] drivers/net: Fix in em and ice " Renata Saiakhova
2020-05-13 15:22 ` Ferruh Yigit [this message]
2020-05-18  9:48   ` [dpdk-dev] [PATCH v3 0/4] Memory corruption due to HW rings allocation Renata Saiakhova
2020-06-03  1:36     ` Zhao1, Wei
2020-06-19 16:54       ` Ferruh Yigit
2020-06-19 16:54     ` Ferruh Yigit
2020-06-22  9:59       ` Renata Saiakhova
2020-06-20  3:27 ` Zhao1, Wei

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=7e3ef1e4-cca6-c113-3d15-648265d3072f@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Renata.Saiakhova@ekinops.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=nhorman@tuxdriver.com \
    --cc=thomas@monjalon.net \
    /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

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 \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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