From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
Ivan Dyukov <i.dyukov@samsung.com>,
"yliu@fridaylinux.org" <yliu@fridaylinux.org>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "i.maximets@samsung.com" <i.maximets@samsung.com>,
"heetae82.ahn@samsung.com" <heetae82.ahn@samsung.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] vhost: fix checking of device features
Date: Thu, 29 Jun 2017 09:27:28 +0200 [thread overview]
Message-ID: <83633496-abe1-a1b0-7ea8-03d9542f0e49@redhat.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E365121C833@SHSMSX103.ccr.corp.intel.com>
On 06/29/2017 08:13 AM, Tan, Jianfeng wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ivan Dyukov
>> Sent: Wednesday, June 28, 2017 8:41 PM
>> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com; dev@dpdk.org
>> Cc: i.maximets@samsung.com; heetae82.ahn@samsung.com; Ivan Dyukov;
>> stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] vhost: fix checking of device features
>>
>> To compare enabled features in current device we must use bit
>> mask instead of bit position.
>>
>> CC: stable@dpdk.org
>> Fixes: c843af3aa13e ("vhost: access header only")
>>
>> Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
>> ---
>> lib/librte_vhost/virtio_net.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
>> index ebfda1c..4fae4c1 100644
>> --- a/lib/librte_vhost/virtio_net.c
>> +++ b/lib/librte_vhost/virtio_net.c
>> @@ -601,9 +601,11 @@ static inline bool
>> virtio_net_with_host_offload(struct virtio_net *dev)
>> {
>> if (dev->features &
>> - (VIRTIO_NET_F_CSUM | VIRTIO_NET_F_HOST_ECN |
>> - VIRTIO_NET_F_HOST_TSO4 |
>> VIRTIO_NET_F_HOST_TSO6 |
>> - VIRTIO_NET_F_HOST_UFO))
>> + ((1ULL << VIRTIO_NET_F_CSUM) |
>> + (1ULL << VIRTIO_NET_F_HOST_ECN) |
>> + (1ULL << VIRTIO_NET_F_HOST_TSO4) |
>> + (1ULL << VIRTIO_NET_F_HOST_TSO6) |
>> + (1ULL << VIRTIO_NET_F_HOST_UFO)))
>
> Another problem in this piece of code, we don't support VIRTIO_NET_F_HOST_ECN and VIRTIO_NET_F_HOST_UFO in vhost-user. We might consider to remove those two lines?
It is not really a problem as the feature is never negotiated as not
supported, it would just be a clean-up.
I think we should stick with this version as it targets also -stable.
Another patch could be sent on top to remove these unsupported feature
bits.
Thanks,
Maxime
> Thanks,
> Jianfeng
>
>
>> return true;
>>
>> return false;
>> --
>> 2.7.4
>
next prev parent reply other threads:[~2017-06-29 7:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170628124049eucas1p1688178d88249ae416d653abfc19d0478@eucas1p1.samsung.com>
2017-06-28 12:40 ` Ivan Dyukov
2017-06-28 12:54 ` Maxime Coquelin
2017-06-29 6:07 ` Ivan Dyukov
2017-06-29 7:21 ` Maxime Coquelin
2017-06-29 7:37 ` Maxime Coquelin
2017-06-29 6:13 ` Tan, Jianfeng
2017-06-29 7:27 ` Maxime Coquelin [this message]
2017-06-29 8:05 ` Tan, Jianfeng
2017-07-01 23:36 ` Yuanhan Liu
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=83633496-abe1-a1b0-7ea8-03d9542f0e49@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=heetae82.ahn@samsung.com \
--cc=i.dyukov@samsung.com \
--cc=i.maximets@samsung.com \
--cc=jianfeng.tan@intel.com \
--cc=stable@dpdk.org \
--cc=yliu@fridaylinux.org \
/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).