On 8/25/22 05:25, yangchang wrote:
> If the attached flag is not set, the dev is not detached when it is desruct,
> and other dpdk processes will report an error when using it.
>
> Signed-off-by: yangchang <[email protected]>
> ---
Hi, yangchang.
OVS doesn't detach devices that it didn't attach, i.e. didn't explicitly
call rte_dev_probe(). The main historical reason for this is that
there were non-detachable devices that will require application restart
in order to use them again. With the re-worked hotplug implementation in
DPDK that might not be the problem anymore (I didn't check), but it's still
logically incorrect to call rte_dev_remove() on devices that we didn't
rte_dev_probe().
If the driver is unable to initialize the device on startup, that sounds
to me like a bug in that particular driver. With which card you have this
problem?
Best regards, Ilya Maximets.
> lib/netdev-dpdk.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index e0a2dccf5..1740df0f7 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -1808,7 +1808,10 @@ netdev_dpdk_process_devargs(struct netdev_dpdk *dev,
> new_port_id = DPDK_ETH_PORT_ID_INVALID;
> }
> }
> - }
> + } else {
> + dev->attached = true;
> + VLOG_INFO("Device '%s' has been attachde to DPDK", devargs);
> + }
> }
>
> if (new_port_id == DPDK_ETH_PORT_ID_INVALID) {
> --
> 2.27.0.windows.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev