* [PATCH] vhost: enable CONFIG feature
@ 2022-09-13 9:55 Hao Chen
2022-09-15 8:04 ` houyl
2022-09-26 7:26 ` Xia, Chenbo
0 siblings, 2 replies; 5+ messages in thread
From: Hao Chen @ 2022-09-13 9:55 UTC (permalink / raw)
To: maxime.coquelin, chenbo.xia; +Cc: dev, houyl, zy, Hao Chen
Enable this feature, so that libvirt or qemu can call vdpa vendor
driver's ops '.get_config' through 'vhost_net_get_config' to get
the mac address of the vdpa hardware without manual configuration.
Signed-off-by: Hao Chen <chenh@yusur.tech>
---
lib/vhost/vhost_user.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
index 8ecca68597..12e8d116f3 100644
--- a/lib/vhost/vhost_user.h
+++ b/lib/vhost/vhost_user.h
@@ -23,7 +23,8 @@
(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
(1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
(1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) | \
- (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
+ (1ULL << VHOST_USER_PROTOCOL_F_STATUS) | \
+ (1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
typedef enum VhostUserRequest {
VHOST_USER_NONE = 0,
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vhost: enable CONFIG feature
2022-09-13 9:55 [PATCH] vhost: enable CONFIG feature Hao Chen
@ 2022-09-15 8:04 ` houyl
2022-09-26 7:26 ` Xia, Chenbo
1 sibling, 0 replies; 5+ messages in thread
From: houyl @ 2022-09-15 8:04 UTC (permalink / raw)
To: 陈浩, maxime.coquelin, chenbo.xia; +Cc: dev, zy, 陈浩
On Tue, Sep 13, 2022 at 17:55 PM Hao Chen <chenh@yusur.tech> wrote:
>From: Hao Chen
>Date: 2022-09-13 17:55
>To: maxime.coquelin; chenbo.xia
>CC: dev; houyl; zy; Hao Chen
>Subject: [PATCH] vhost: enable CONFIG feature
>Enable this feature, so that libvirt or qemu can call vdpa vendor
>driver's ops '.get_config' through 'vhost_net_get_config' to get
>the mac address of the vdpa hardware without manual configuration.
>Signed-off-by: Hao Chen <chenh@yusur.tech>
>---
>lib/vhost/vhost_user.h | 3 ++-
>1 file changed, 2 insertions(+), 1 deletion(-)
>diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
>index 8ecca68597..12e8d116f3 100644
>--- a/lib/vhost/vhost_user.h
>+++ b/lib/vhost/vhost_user.h
>@@ -23,7 +23,8 @@
>(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
>(1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
>(1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) | \
>- (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
>+ (1ULL << VHOST_USER_PROTOCOL_F_STATUS) | \
>+ (1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
>typedef enum VhostUserRequest {
>VHOST_USER_NONE = 0,
>--
Yusur (YUSUR Technology Co., Ltd.) focuses on the research and development of special data processors.
The independently developed international leading DPU series products can be widely used in ultra-low
latency network, big data processing, 5G edge computing, high-speed storage and other scenarios,
helping computing power become the new productivity of the digital era.
The company put forward innovative Software Defined Accelerator technology and independently
developed the chip architecture KPU(Kernel Processing Unit) and agile heterogeneous Software stack
(HADOS) for domain-specific computing (DSA).
Now, adding the feature of obtain vdpa device's mac address automatically for DPDK vDPA path.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] vhost: enable CONFIG feature
2022-09-13 9:55 [PATCH] vhost: enable CONFIG feature Hao Chen
2022-09-15 8:04 ` houyl
@ 2022-09-26 7:26 ` Xia, Chenbo
2022-10-08 3:40 ` 陈浩
2022-10-08 7:56 ` Hao Chen
1 sibling, 2 replies; 5+ messages in thread
From: Xia, Chenbo @ 2022-09-26 7:26 UTC (permalink / raw)
To: Hao Chen, maxime.coquelin; +Cc: dev, houyl, zy
> -----Original Message-----
> From: Hao Chen <chenh@yusur.tech>
> Sent: Tuesday, September 13, 2022 5:55 PM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; houyl@yusur.tech; zy@yusur.tech; Hao Chen
> <chenh@yusur.tech>
> Subject: [PATCH] vhost: enable CONFIG feature
>
> Enable this feature, so that libvirt or qemu can call vdpa vendor
> driver's ops '.get_config' through 'vhost_net_get_config' to get
> the mac address of the vdpa hardware without manual configuration.
I think we should add this in vendor's vdpa driver, not in common library.
Because some hardware and the sw back-end can't support get/set config.
Thanks,
Chenbo
>
> Signed-off-by: Hao Chen <chenh@yusur.tech>
> ---
> lib/vhost/vhost_user.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
> index 8ecca68597..12e8d116f3 100644
> --- a/lib/vhost/vhost_user.h
> +++ b/lib/vhost/vhost_user.h
> @@ -23,7 +23,8 @@
> (1ULL <<
> VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
> (1ULL <<
> VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
> (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) |
> \
> - (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
> + (1ULL << VHOST_USER_PROTOCOL_F_STATUS) | \
> + (1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
>
> typedef enum VhostUserRequest {
> VHOST_USER_NONE = 0,
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vhost: enable CONFIG feature
2022-09-26 7:26 ` Xia, Chenbo
@ 2022-10-08 3:40 ` 陈浩
2022-10-08 7:56 ` Hao Chen
1 sibling, 0 replies; 5+ messages in thread
From: 陈浩 @ 2022-10-08 3:40 UTC (permalink / raw)
To: Xia, Chenbo, maxime.coquelin; +Cc: dev, houyl, zy
On 2022/9/26 15:26, Xia, Chenbo wrote:
>> -----Original Message-----
>> From: Hao Chen <chenh@yusur.tech>
>> Sent: Tuesday, September 13, 2022 5:55 PM
>> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
>> Cc: dev@dpdk.org; houyl@yusur.tech; zy@yusur.tech; Hao Chen
>> <chenh@yusur.tech>
>> Subject: [PATCH] vhost: enable CONFIG feature
>>
>> Enable this feature, so that libvirt or qemu can call vdpa vendor
>> driver's ops '.get_config' through 'vhost_net_get_config' to get
>> the mac address of the vdpa hardware without manual configuration.
> I think we should add this in vendor's vdpa driver, not in common library.
> Because some hardware and the sw back-end can't support get/set config.
>
> Thanks,
> Chenbo
In function 'rte_vhost_driver_get_protocol_features' at
lib/vhost/socket.c, "*protocol_features = vsocket->protocol_features &
vdpa_protocol_features". If you want vdpa driver to support VHOST_ USER_
PROTOCOL_ F_ CONFIG, we need to add this feature here, and we also need
the vdpa driver to support VHOST_ USER_ PROTOCOL_ F_ CONFIG in rte_
vdpa_ dev_ ops's get_ features, only add this in vendor's vdpa driver
is invalid.
Thanks.
>> Signed-off-by: Hao Chen <chenh@yusur.tech>
>> ---
>> lib/vhost/vhost_user.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
>> index 8ecca68597..12e8d116f3 100644
>> --- a/lib/vhost/vhost_user.h
>> +++ b/lib/vhost/vhost_user.h
>> @@ -23,7 +23,8 @@
>> (1ULL <<
>> VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
>> (1ULL <<
>> VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
>> (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) |
>> \
>> - (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
>> + (1ULL << VHOST_USER_PROTOCOL_F_STATUS) | \
>> + (1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
>>
>> typedef enum VhostUserRequest {
>> VHOST_USER_NONE = 0,
>> --
>> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vhost: enable CONFIG feature
2022-09-26 7:26 ` Xia, Chenbo
2022-10-08 3:40 ` 陈浩
@ 2022-10-08 7:56 ` Hao Chen
1 sibling, 0 replies; 5+ messages in thread
From: Hao Chen @ 2022-10-08 7:56 UTC (permalink / raw)
To: Xia, Chenbo, maxime.coquelin; +Cc: dev, houyl, zy
On 2022/9/26 15:26, Xia, Chenbo wrote:
>> -----Original Message-----
>> From: Hao Chen <chenh@yusur.tech>
>> Sent: Tuesday, September 13, 2022 5:55 PM
>> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
>> Cc: dev@dpdk.org; houyl@yusur.tech; zy@yusur.tech; Hao Chen
>> <chenh@yusur.tech>
>> Subject: [PATCH] vhost: enable CONFIG feature
>>
>> Enable this feature, so that libvirt or qemu can call vdpa vendor
>> driver's ops '.get_config' through 'vhost_net_get_config' to get
>> the mac address of the vdpa hardware without manual configuration.
> I think we should add this in vendor's vdpa driver, not in common library.
> Because some hardware and the sw back-end can't support get/set config.
>
> Thanks,
> Chenbo
Yeah, maybe add "if (vdpa_protocol_features & (1ULL <<
VHOST_USER_PROTOCOL_F_CONFIG)) *protocol_features |= (1ULL <<
VHOST_USER_PROTOCOL_F_CONFIG);" at the end of function
'rte_vhost_driver_get_protocol_features' will be better. I will send
patch v2.
Thanks.
>> Signed-off-by: Hao Chen <chenh@yusur.tech>
>> ---
>> lib/vhost/vhost_user.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/vhost/vhost_user.h b/lib/vhost/vhost_user.h
>> index 8ecca68597..12e8d116f3 100644
>> --- a/lib/vhost/vhost_user.h
>> +++ b/lib/vhost/vhost_user.h
>> @@ -23,7 +23,8 @@
>> (1ULL <<
>> VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
>> (1ULL <<
>> VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
>> (1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT) |
>> \
>> - (1ULL << VHOST_USER_PROTOCOL_F_STATUS))
>> + (1ULL << VHOST_USER_PROTOCOL_F_STATUS) | \
>> + (1ULL << VHOST_USER_PROTOCOL_F_CONFIG))
>>
>> typedef enum VhostUserRequest {
>> VHOST_USER_NONE = 0,
>> --
>> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-08 7:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 9:55 [PATCH] vhost: enable CONFIG feature Hao Chen
2022-09-15 8:04 ` houyl
2022-09-26 7:26 ` Xia, Chenbo
2022-10-08 3:40 ` 陈浩
2022-10-08 7:56 ` Hao Chen
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).