crypto/virtio: add vhost-vdpa backend
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK. We have come up with functional changes which is similar to the support available in net:
commit 6b901437056eed3ed7c9932c333ba24ac5be116f
net/virtio: introduce vhost-vDPA backend
vhost-vDPA is a new virtio backend type introduced by vDPA kernel framework, which provides abstraction to the vDPA devices and exposes an unified control interface through a char dev.
Our current development reuses some code from net/virtio/virtio_user/, and we realize that we could keep a few things in common between net and crypto, such as:
-> vhost_vdpa.c (and its header file) from net/virtio/virtio_user/:
Except for VHOST_VDPA_GET_DEVICE_ID and enabling queue pairs, virtio_user_backend_ops can be reused.
-> virtio_user_dev.c (and its header file) from net/virtio/virtio_user/:
virtio_user_dev_init and its capabilities differ.
-> virtio_cvq.c (and its header file) from net/virtio/:
There is a difference in the usage of the first and last descriptors for the virtio header and status (net vs. crypto).
We need to standardize these codes to ensure they work universally. Therefore, we propose creating a driver/common/virtio/ directory to house them. This approach will help address common issues and extend Virtio functionalities shared between crypto and net. For example, the crypto PMD can benefit from packed ring support. We welcome your valuable feedback and any suggestions.
Thanks,
Gowrishankar
Signature · 1 line
2.37.1
Hi,
I wanted to follow up on my previous message regarding the development of a vhost vDPA host driver for crypto/virtio. We have proposed creating a driver/common/virtio/ directory to hold common implementations for both net and crypto functionalities. This approach aims to help in fixing common issues and extending virtio functionalities efficiently.
As we plan to include this feature in DPDK 25.03, we would like to conclude on the implementation direction soon. We would greatly appreciate your valuable feedback or any suggestions on this proposal. Thank you!
Thanks,
Gowrishankar
Quoted 36 lines
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK. We have come up with functional changes which is similar to the support available in net:commit
6b901437056eed3ed7c9932c333ba24ac5be116fnet/virtio: introduce vhost-vDPA backend
vhost-vDPA is a new virtio backend type introduced by vDPA kernel framework, which provides abstraction to the vDPA devices and exposes an unified control interface through a char dev.Our current development reuses some code from
net/virtio/virtio_user/, and we realize that we could keep a few things in common between net and crypto, such as:->
vhost_vdpa.c(and its header file) fromnet/virtio/virtio_user/:
Except forVHOST_VDPA_GET_DEVICE_IDand enabling queue pairs,virtio_user_backend_opscan be reused.
->virtio_user_dev.c(and its header file) fromnet/virtio/virtio_user/:
virtio_user_dev_initand its capabilities differ.
->virtio_cvq.c(and its header file) fromnet/virtio/:
There is a difference in the usage of the first and last descriptors for the virtio
header and status (net vs. crypto).We need to standardize these codes to ensure they work universally. Therefore, we propose creating a driver/common/virtio/ directory to house them. This approach will help address common issues and extend Virtio functionalities shared between crypto and net. For example, the crypto PMD can benefit from packed ring support. We welcome your valuable feedback and any suggestions.
Thanks,
Gowrishankar
--
2.37.1
Hi Gowrishankar,
Quoted 9 lines · Gowrishankar Muthukrishnan
External email: Use caution opening links or attachments
Hi,
I wanted to follow up on my previous message regarding the development of a vhost vDPA host driver forcrypto/virtio. We have proposed creating a driver/common/virtio/ directory to hold common implementations for both net and crypto functionalities. This approach aims to help in fixing common issues and extending virtio functionalities efficiently.As we plan to include this feature in DPDK 25.03, we would like to conclude on the implementation direction soon. We would greatly appreciate your valuable feedback or any suggestions on this proposal. Thank you!
Thanks for the efforts!
IIUC, you want to make sure it’s good direction to have a common folder for both net and crypto. Of course overall this is a good idea as it’s more friendly for maintaining the code. I checked your list of code to be shared, seems it will be many code in the common layer. So please go on with this :)
Cheers,
Chenbo
Quoted 41 lines
Thanks,
GowrishankarQuoted 36 lines
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK. We have come up with functional changes which is similar to the support available in net:commit
6b901437056eed3ed7c9932c333ba24ac5be116fnet/virtio: introduce vhost-vDPA backend
vhost-vDPA is a new virtio backend type introduced by vDPA kernel framework, which provides abstraction to the vDPA devices and exposes an unified control interface through a char dev.Our current development reuses some code from
net/virtio/virtio_user/, and we realize that we could keep a few things in common between net and crypto, such as:->
vhost_vdpa.c(and its header file) fromnet/virtio/virtio_user/:
Except forVHOST_VDPA_GET_DEVICE_IDand enabling queue pairs,virtio_user_backend_opscan be reused.
->virtio_user_dev.c(and its header file) fromnet/virtio/virtio_user/:
virtio_user_dev_initand its capabilities differ.
->virtio_cvq.c(and its header file) fromnet/virtio/:
There is a difference in the usage of the first and last descriptors for the virtio
header and status (net vs. crypto).We need to standardize these codes to ensure they work universally. Therefore, we propose creating a driver/common/virtio/ directory to house them. This approach will help address common issues and extend Virtio functionalities shared between crypto and net. For example, the crypto PMD can benefit from packed ring support. We welcome your valuable feedback and any suggestions.
Thanks,
Gowrishankar
--
2.37.1
Hello:
Quoted 3 lines · Gowrishankar Muthukrishnan
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK.
I wonder what kind of vDPA device you are using? Is there a marvell specific vDPA or just a standard virtio-pci device via vp-vdpa.
Thanks
Hi Jason,
Quoted 11 lines
Hello:
Quoted 3 lines · Gowrishankar Muthukrishnan
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK.I wonder what kind of vDPA device you are using? Is there a marvell specific vDPA or just a standard virtio-pci device via vp-vdpa.
Yes, we have Marvell specific vDPA.
https://github.com/ColinIanKing/linux-next/commit/8b6c724cdab85d8923dd8c474a5a9464228379c5
Thanks,
Gowrishankar
Quoted 1 line
Thanks
Quoted 7 lines · Gowrishankar Muthukrishnan
Hi Jason,
Quoted 5 lines
Hello:
Quoted 1 line · Gowrishankar Muthukrishnan
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Hi,
We are adding support for vDPA user backend for virtio-crypto PMD in DPDK.I wonder what kind of vDPA device you are using? Is there a marvell specific vDPA or just a standard virtio-pci device via vp-vdpa.
Yes, we have Marvell specific vDPA.
https://github.com/ColinIanKing/linux-next/commit/8b6c724cdab85d8923dd8c474a5a9464228379c5
Right, I'm asking since it claims to support networking device only:
static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
{ 0 },
};
Thanks
Quoted 4 lines
Thanks,
GowrishankarQuoted 1 line
Thanks
Hi Jason,
Quoted 8 lines
Right, I'm asking since it claims to support networking device only:
static struct
virtio_device_idid_table[] = {
{VIRTIO_ID_NET,VIRTIO_DEV_ANY_ID},
{ 0 },
};
Yes, there is already a fix in it to support crypto id as well.
https://lore.kernel.org/virtualization/[email protected]/
Regards,
Gowrishankar