[dpdk-dev] [PATCH 0/2] Memory corruption due to HW rings allocation

Thomas Monjalon thomas at monjalon.net
Tue May 5 14:35:59 CEST 2020


05/05/2020 13:19, Renata Saiakhova:
> Hi Thomas,
> 
> In our application dpdk port can be connected and disconnected:
> 
> Connect:
> new_port_id = netdev_dpdk_get_port_by_devargs(dpdk_port->pci_addr_str);
> 
>    if (!rte_eth_dev_is_valid_port(new_port_id)) {
>       /* Device not found in DPDK, attempt to attach it */
>       if (rte_dev_probe(dpdk_port->pci_addr_str)) {
>          new_port_id = DPDK_ETH_PORT_ID_INVALID;
>       } else {
>          new_port_id = netdev_dpdk_get_port_by_devargs(dpdk_port->pci_addr_str);
>          if (rte_eth_dev_is_valid_port(new_port_id)) {
>             LO_TRACE("Device '%s' attached to DPDK", dpdk_port->pci_addr_str);
>          } else {
>             /* Attach unsuccessful */
>             new_port_id = DPDK_ETH_PORT_ID_INVALID;
>          }
>       }
>    }
> 
> Disconnect:
> 
>    dp_ConfigureRxQueues(dpdk_port, FALSE);
>    rte_eth_dev_set_link_down(port_id);
>    rte_eth_dev_stop(port_id);
>    rte_eth_dev_close(port_id);
> 
> and yes, exactly, port id is recycled by eth_dev. Next time, switching from igb port to ixgbe with the same port and using HW rings of bigger size for ixgbe creates memory corruption.

I see.

Reusing the same rings for a new port seems really wrong indeed.
Please check if same issue must be fixed in other PMDs.





More information about the dev mailing list