Skip to contentSkip to conversation

question about vdpa_mgmt_dev

DISCUSSION Liu,Feng(INF) 2 participants 4 messages Nov 15, 2021 virtio core

lore
Share & tools
lore
#0 lore raw

Hi Experts
I have read the upstream code about vdpa, and I notice that there is a new struct vdpa_mgmt_dev have been added.
Every driver implements dev_add() interface, such as mlx5 use mlx5_vdpa_dev_add(). This interface completes the creation of the vdpa device, hardware initialization and system registration. And I found that only netlink will call the dev_add() interface, in vdpa_nl_cmd_dev_add_set_doit(). While the probe() function just register vdpa_mgmt_dev without call dev_add() So, my questions are:
Does it create a vdpa device only through the netlink interface? The system scans the PCI device and does not automatically create the corresponding vdpa device?

Thanks
Feng

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#1 lore raw
Quoted 6 lines · Liu,Feng(INF)

Hi Experts
I have read the upstream code about vdpa, and I notice that there is a new struct vdpa_mgmt_dev have been added.
Every driver implements dev_add() interface, such as mlx5 use mlx5_vdpa_dev_add(). This interface completes the creation of the vdpa device, hardware initialization and system registration. And I found that only netlink will call the dev_add() interface, in vdpa_nl_cmd_dev_add_set_doit(). While the probe() function just register vdpa_mgmt_dev without call dev_add() So, my questions are:
Does it create a vdpa device only through the netlink interface?

Yes, this is the plan, and we're working on converting all the drivers to support that.

Quoted 1 line

The system scans the PCI device and does not automatically create the corresponding vdpa device?

It's a choice for the vDPA parent driver but we suggest creating vDPA via netlink(), this gives a persistent method for the management layer.

Thanks

Quoted 5 lines

Thanks
Feng

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw

Jason
Thanks for your comments

Thanks
Feng

Quoted 25 lines

-----邮件原件-----
发件人: Jason Wang <[email protected]>
发送时间: 2021年11月15日 14:31
收件人: Liu,Feng(INF) <[email protected]>
抄送: [email protected]
主题: Re: question about vdpa_mgmt_dev

Quoted 3 lines · Liu,Feng(INF)

Hi Experts
I have read the upstream code about vdpa, and I notice that

there is a new struct vdpa_mgmt_dev have been added.

Quoted 1 line

Every driver implements dev_add() interface, such as mlx5 use

mlx5_vdpa_dev_add(). This interface completes the creation of the vdpa device, hardware initialization and system registration. And I found that only netlink will call the dev_add() interface, in vdpa_nl_cmd_dev_add_set_doit(). While the probe() function just register vdpa_mgmt_dev without call dev_add()

Quoted 2 lines

So, my questions are:
Does it create a vdpa device only through the netlink interface?

Yes, this is the plan, and we're working on converting all the drivers to support that.

Quoted 13 lines
Quoted 1 line

The system scans the PCI device and does not automatically create the

corresponding vdpa device?

It's a choice for the vDPA parent driver but we suggest creating vDPA via netlink(), this gives a persistent method for the management layer.

Thanks

Quoted 5 lines

Thanks
Feng

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#3 lore raw
In reply to Jason Wang

Jason
It's clear, thanks for your comments

Thanks
Feng

Quoted 25 lines

-----邮件原件-----
发件人: Jason Wang <[email protected]>
发送时间: 2021年11月15日 14:31
收件人: Liu,Feng(INF) <[email protected]>
抄送: [email protected]
主题: Re: question about vdpa_mgmt_dev

Quoted 3 lines · Liu,Feng(INF)

Hi Experts
I have read the upstream code about vdpa, and I notice that

there is a new struct vdpa_mgmt_dev have been added.

Quoted 1 line

Every driver implements dev_add() interface, such as mlx5 use

mlx5_vdpa_dev_add(). This interface completes the creation of the vdpa device, hardware initialization and system registration. And I found that only netlink will call the dev_add() interface, in vdpa_nl_cmd_dev_add_set_doit(). While the probe() function just register vdpa_mgmt_dev without call dev_add()

Quoted 2 lines

So, my questions are:
Does it create a vdpa device only through the netlink interface?

Yes, this is the plan, and we're working on converting all the drivers to support that.

Quoted 13 lines
Quoted 1 line

The system scans the PCI device and does not automatically create the

corresponding vdpa device?

It's a choice for the vDPA parent driver but we suggest creating vDPA via netlink(), this gives a persistent method for the management layer.

Thanks

Quoted 5 lines

Thanks
Feng

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization