DPDK patches and discussions
 help / color / mirror / Atom feed
From: 陈浩 <chenh@yusur.tech>
To: "Xia, Chenbo" <chenbo.xia@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"houyl@yusur.tech" <houyl@yusur.tech>,
	"zy@yusur.tech" <zy@yusur.tech>
Subject: Re: [PATCH] vhost: enable CONFIG feature
Date: Sat, 8 Oct 2022 11:40:28 +0800	[thread overview]
Message-ID: <5265fcd7-ffe2-4da5-1dea-813a03b851d0@yusur.tech> (raw)
In-Reply-To: <SN6PR11MB350471A1AD4AAA6BEAD0ACB89C529@SN6PR11MB3504.namprd11.prod.outlook.com>


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

  reply	other threads:[~2022-10-08  3:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  9:55 Hao Chen
2022-09-15  8:04 ` houyl
2022-09-26  7:26 ` Xia, Chenbo
2022-10-08  3:40   ` 陈浩 [this message]
2022-10-08  7:56   ` Hao Chen

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=5265fcd7-ffe2-4da5-1dea-813a03b851d0@yusur.tech \
    --to=chenh@yusur.tech \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=houyl@yusur.tech \
    --cc=maxime.coquelin@redhat.com \
    --cc=zy@yusur.tech \
    /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).