DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v4 0/4] Memory corruption due to HW rings allocation
@ 2020-06-22  9:54 Renata Saiakhova
  2020-06-22  9:54 ` [dpdk-dev] [PATCH v4 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Renata Saiakhova @ 2020-06-22  9:54 UTC (permalink / raw)
  To: dev; +Cc: Renata Saiakhova

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.

v3->v4: Improve return code in rte_eth_dma_zone_free() in case mz is not found;
        Release explicitly i40e Flow Director rx/tx rings by calling
        rte_eth_dma_zone_free().
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

 drivers/net/e1000/em_rxtx.c              |  2 ++
 drivers/net/e1000/igb_rxtx.c             |  2 ++
 drivers/net/i40e/i40e_fdir.c             |  3 +++
 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    | 20 ++++++++++++++++
 lib/librte_ethdev/rte_ethdev_version.map |  1 +
 9 files changed, 62 insertions(+), 2 deletions(-)

-- 
2.17.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-10 14:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22  9:54 [dpdk-dev] [PATCH v4 0/4] Memory corruption due to HW rings allocation Renata Saiakhova
2020-06-22  9:54 ` [dpdk-dev] [PATCH v4 1/4] librte_ethdev: Introduce a function to release HW rings Renata Saiakhova
2020-06-22 17:09   ` Ferruh Yigit
2020-06-23  9:11     ` Renata Saiakhova
2020-06-23 12:25       ` Ferruh Yigit
2020-06-22 17:13   ` Ferruh Yigit
2020-06-22  9:54 ` [dpdk-dev] [PATCH v4 2/4] drivers/net: Fix in igb and ixgbe HW rings memory Renata Saiakhova
2020-06-22  9:54 ` [dpdk-dev] [PATCH v4 3/4] drivers/net: Fix in i40e HW rings memory overlap Renata Saiakhova
2020-06-22  9:54 ` [dpdk-dev] [PATCH v4 4/4] drivers/net: Fix in em and ice " Renata Saiakhova
2020-07-10 14:36 ` [dpdk-dev] [PATCH v5 1/2] ethdev: add function to release HW rings Ferruh Yigit
2020-07-10 14:36   ` [dpdk-dev] [PATCH v5 2/2] drivers/net: delete HW rings while freeing queues Ferruh Yigit

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).