From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 3D3542B96; Thu, 29 Jun 2017 08:07:45 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OSA001N2P0WY010@mailout1.w1.samsung.com>; Thu, 29 Jun 2017 07:07:44 +0100 (BST) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170629060743eucas1p289d5a1c2ee3a33003c6da587a5e887d3~Mgq72X7G42127621276eucas1p2O; Thu, 29 Jun 2017 06:07:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges4.samsung.com (EUCPMTA) with SMTP id A4.6C.04729.F2994595; Thu, 29 Jun 2017 07:07:43 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170629060743eucas1p2721f38e76bb4b7e9b822990545d2cd01~Mgq7JMIqs1976219762eucas1p2X; Thu, 29 Jun 2017 06:07:43 +0000 (GMT) X-AuditID: cbfec7f4-f79806d000001279-46-5954992f312e Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 61.2B.17452.F2994595; Thu, 29 Jun 2017 07:07:43 +0100 (BST) Received: from [106.109.129.29] by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OSA001T5P0U1L30@eusync2.samsung.com>; Thu, 29 Jun 2017 07:07:43 +0100 (BST) To: Maxime Coquelin , yliu@fridaylinux.org, dev@dpdk.org Cc: i.maximets@samsung.com, heetae82.ahn@samsung.com, stable@dpdk.org From: Ivan Dyukov Message-id: Date: Thu, 29 Jun 2017 09:07:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-version: 1.0 In-reply-to: <3b44a715-612d-2ef7-aac2-15f74ac4aa07@redhat.com> Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit Content-language: en-GB X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAKsWRmVeSWpSXmKPExsWy7djPc7r6M0MiDXYt1bF492k7k8W0z7fZ La60/2S3ONa5h8XiX8cfdouWJTuZHNg8fi1Yyupx498tNo/3+66yefRtWcUYwBLFZZOSmpNZ llqkb5fAlXGj6RVLwVKeit3vj7M3MK7m7GLk5JAQMJFY8mM2E4QtJnHh3nq2LkYuDiGBpYwS 29fvZYdwPjNKfF28lBWm40fXOkaIxDJGievP26Gc54wSn09OZgepEhawlnj99waYLSIQJtF4 p5cZxGYWcJW4+uoZmM0moCFxumMe2G5eATuJXeuPAtVzcLAIqEpsnOgGEhYViJBYNGkiO0SJ oMSPyfdYQGxOoPIL065BjbSSePavlRXClpfYvOYtVFxc4tj9m2C3SQgsY5fY/PcoI8h8CQFZ iU0HmCGecZH4dmwDO4QtLPHq+BYoW0ais+MgE0RvM6PEjtkT2CCcHkaJGfdhOuwlTt28ygSx jU9i0rbpzBALeCU62oQgTA+JY51GENWOEouvXIeG1RlGiS0Nh5gnMCrMQvLbLCT/zELyzywk /yxgZFnFKJJaWpybnlpsolecmFtcmpeul5yfu4kRmG5O/zv+ZQfj4mNWhxgFOBiVeHhXrAqO FGJNLCuuzD3EKMHBrCTC694QEinEm5JYWZValB9fVJqTWnyIUZqDRUmcl+vUtQghgfTEktTs 1NSC1CKYLBMHp1QDI9cdh6JC3fSld7QZD4rN8jZmEfzAul101VZ1QT1Hx4rtHcKPi/Nzi9rn c+klvgrNF54daeyyt5cznH9K+qG5h/553d6Qs7Y5fsmFtAf2oRPmcxzZn7Fgsb/86h8L73o8 qzv48AXL/cLXzqJGvsU809nc+0rUd6jteqV5+dSPB07sP65dmLpnhxJLcUaioRZzUXEiAOg7 UzgzAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsVy+t/xK7r6M0MiDSZ38li8+7SdyWLa59vs Flfaf7JbHOvcw2Lxr+MPu0XLkp1MDmwevxYsZfW48e8Wm8f7fVfZPPq2rGIMYIlys8lITUxJ LVJIzUvOT8nMS7dVCg1x07VQUshLzE21VYrQ9Q0JUlIoS8wpBfKMDNCAg3OAe7CSvl2CW8aN plcsBUt5Kna/P87ewLias4uRk0NCwETiR9c6RghbTOLCvfVsXYxcHEICSxgl/i6+wwrhPGeU WDmnkR2kSljAWuL13xtgtohAmMS6DW0sIDazgKvE1VfPmCEazjFKNH47wwySYBPQkDjdMY8J xOYVsJPYtf4oUDMHB4uAqsTGiW4gYVGBCIld1w+wQpQISvyYfA9sJidQ+YVp15gh5ptJfHl5 mBXClpfYvOYtVFxc4tj9m4wTGAVnIWmfhaRlFpKWWUhaFjCyrGIUSS0tzk3PLTbUK07MLS7N S9dLzs/dxAiMvW3Hfm7ewXhpY/AhRgEORiUe3hWrgiOFWBPLiitzDzFKcDArifC6N4RECvGm JFZWpRblxxeV5qQWH2I0BfptIrOUaHI+MC3klcQbmhiaWxoaGVtYmBsZKYnzlny4Ei4kkJ5Y kpqdmlqQWgTTx8TBKdXA6PaNYUOX348H0/7l7k+5rtT3J/519P9zmlzqH4+7HbWqkyjbfq9H b38/MK14uj/WWOvVtU86/tUqjRnRkda/vzSG7/Av8uydbncoUK5CPby79O222CALIbOU+1Ye R5/ev/cyV8EuoOexj5VLUMfBHRvVqy/zzfp4ne2YxtaSth8nd5hHvNFQYinOSDTUYi4qTgQA NwJ269MCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170629060743eucas1p2721f38e76bb4b7e9b822990545d2cd01 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?SXZhbiBEeXVrb3YbU1JSLVZpcnR1YWxpemF0aW9uIExhYhs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG0V4cGVydCBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?SXZhbiBEeXVrb3YbU1JSLVZpcnR1YWxpemF0aW9uIExhYhtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG0V4cGVydCBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1NA==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170628124049eucas1p1688178d88249ae416d653abfc19d0478 X-RootMTR: 20170628124049eucas1p1688178d88249ae416d653abfc19d0478 References: <1498653631-15307-1-git-send-email-i.dyukov@samsung.com> <3b44a715-612d-2ef7-aac2-15f74ac4aa07@redhat.com> Subject: Re: [dpdk-stable] [PATCH] vhost: fix checking of device features X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 06:07:46 -0000 On 06/28/2017 03:54 PM, Maxime Coquelin wrote: > > > On 06/28/2017 02:40 PM, Ivan Dyukov wrote: >> 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 >> --- >> lib/librte_vhost/virtio_net.c | 8 +++++--- >> 1 file changed, 5 insertions(+), 3 deletions(-) > > Thanks for the fix Ivan, and sorry for introducing this bug. > Out of curiosity, did you noticed it because it broke offloading, > or just by code review? I didn't see any breakages. It's just code review. > > Reviewed-by: Maxime Coquelin > >> 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))) >> return true; >> return false; >> > > > >