DPDK usage discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@nvidia.com>
To: jinag <15720603159@163.com>
Cc: "users@dpdk.org" <users@dpdk.org>,
	Shahaf Shuler <shahafs@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>
Subject: RE: Re:RE: Does the mlx5 NIC support reloading
Date: Mon, 14 Aug 2023 10:25:54 +0000	[thread overview]
Message-ID: <DM4PR12MB5389D901007B1386DCB019E6DF17A@DM4PR12MB5389.namprd12.prod.outlook.com> (raw)
In-Reply-To: <3a22d918.d50a.189f382061b.Coremail.15720603159@163.com>

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

You can see the failsafe driver.
https://git.dpdk.org/dpdk/tree/drivers/net/failsafe?h=v19.11

Generally, it gets 2 devices.
Once the primary device gets the RMV event it closes it and switch the control to a secondary device.
Meanwhile the drive periodically checks if the primary device is back in the bus and if so, it probe the device again and reconfigure it to be able to switch the control back to the primary device.

Thanks,
Matan


From: jinag <15720603159@163.com>
Sent: Monday, 14 August 2023 13:06
To: Matan Azrad <matan@nvidia.com>
Cc: users@dpdk.org; Shahaf Shuler <shahafs@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
Subject: Re:RE: Does the mlx5 NIC support reloading

External email: Use caution opening links or attachments

Hi Matan:
Could you please provide me a example?
Thanks a lot


At 2023-08-14 14:41:22, "Matan Azrad" <matan@nvidia.com<mailto:matan@nvidia.com>> wrote:
Hi Jinag

After plugging out the device from the bus, you need to get the event RTE_ETH_EVENT_INTR_RMV.
You need to listen to this event and close the port when you see it.

After plugging in the device, you need to scan the bus again and attach the mlx5 device, so it will be probed again and a new ethdev port will be created.

Then, you need to reconfigure the port, as regular, and reuse the device.

Thanks,
Matan

From: jinag <15720603159@163.com<mailto:15720603159@163.com>>
Sent: Monday, 14 August 2023 6:07
To: users@dpdk.org<mailto:users@dpdk.org>; Matan Azrad <matan@nvidia.com<mailto:matan@nvidia.com>>; Shahaf Shuler <shahafs@nvidia.com<mailto:shahafs@nvidia.com>>; Slava Ovsiienko <viacheslavo@nvidia.com<mailto:viacheslavo@nvidia.com>>
Subject: Does the mlx5 NIC support reloading

External email: Use caution opening links or attachments

Hi
I am verifying the reload function of the mlx5 nic based on dpdk 19.11:
echo 1 > /sys/bus/pci/devices/$pci_address/remove
echo 1 > /sys/bus/pci/rescan
rte_bus_probe();
rte_eth_dev_stop();
rte_eth_dev_start();
    net_mlx5: port 0 TX queue 0 CQ creation failure
    net_mlx5: port 0 TX queue allocation failed: cannot allocate memory
The nic cannot be reinitialized.

I am not sure if the above operation is correct. Could you please tell me if the mlx5 nic supports reloading(for example, the network card is down during normal  operation) and which dpdk functions need to be called.

Thanks!




[-- Attachment #2: Type: text/html, Size: 17557 bytes --]

  reply	other threads:[~2023-08-14 10:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14  3:06 jinag
2023-08-14  6:41 ` Matan Azrad
2023-08-14 10:05   ` jinag
2023-08-14 10:25     ` Matan Azrad [this message]
2023-08-17  5:13   ` Slava Ovsiienko
2023-08-24  7:35     ` jinag

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=DM4PR12MB5389D901007B1386DCB019E6DF17A@DM4PR12MB5389.namprd12.prod.outlook.com \
    --to=matan@nvidia.com \
    --cc=15720603159@163.com \
    --cc=shahafs@nvidia.com \
    --cc=users@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /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).