DPDK patches and discussions
 help / color / mirror / Atom feed
From: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
Cc: dev@dpdk.org, Renata Saiakhova <Renata.Saiakhova@ekinops.com>
Subject: [dpdk-dev] [PATCH v2 0/4] Memory corruption due to HW rings allocation
Date: Wed, 13 May 2020 11:15:43 +0200	[thread overview]
Message-ID: <20200513091547.19658-1-Renata.Saiakhova@ekinops.com> (raw)

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.


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

 drivers/net/e1000/em_rxtx.c              |  2 ++
 drivers/net/e1000/igb_rxtx.c             |  2 ++
 drivers/net/i40e/i40e_rxtx.c             |  2 ++
 drivers/net/ice/ice_rxtx.c               |  2 ++
 drivers/net/ixgbe/ixgbe_rxtx.c           |  2 ++
 lib/librte_ethdev/rte_ethdev.c           | 30 ++++++++++++++++++++++--
 lib/librte_ethdev/rte_ethdev_driver.h    | 19 +++++++++++++++
 lib/librte_ethdev/rte_ethdev_version.map |  1 +
 8 files changed, 58 insertions(+), 2 deletions(-)

-- 
2.17.2


             reply	other threads:[~2020-05-13  9:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  9:15 Renata Saiakhova [this message]
2020-05-13  9:15 ` [dpdk-dev] [PATCH v2 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
2020-05-13  9:48   ` Burakov, Anatoly
2020-05-13 11:00   ` Neil Horman
2020-05-14  7:07   ` Ray Kinsella
2020-05-13  9:15 ` [dpdk-dev] [PATCH v2 2/4] drivers/net: Fix in igb and ixgbe HW rings memory Renata Saiakhova
2020-05-13  9:15 ` [dpdk-dev] [PATCH v2 3/4] drivers/net: Fix in i40e HW rings memory overlap Renata Saiakhova
2020-05-13  9:15 ` [dpdk-dev] [PATCH v2 4/4] drivers/net: Fix in em and ice " Renata Saiakhova

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=20200513091547.19658-1-Renata.Saiakhova@ekinops.com \
    --to=renata.saiakhova@ekinops.com \
    --cc=dev@dpdk.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).