From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id AB50829CB for ; Fri, 14 Jul 2017 12:37:06 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id c24so10590033pfe.1 for ; Fri, 14 Jul 2017 03:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qVLwtJfbfHTUQcEXoU5FWJ2OTmgplseN5aiW160DVsM=; b=U+2vJemDCZk9NTFD+sVWxL6O80mo6XGhN2bqSxDv44xWUkMN0L2OOZ56usTf9Rq2cM uaTNMeTqFm2E4iiN7CZ+PV8xhArZpuV/QUq4LXzsPtMJYPLL80wDkk7ziNunKFf4qJCE 1c3eD28qBc8/ICmyObYXdqcxY1YCGmtjkFNfzFah0ha0b2eViWRpmVJ5d0xAfSUQFQJ+ zxq4FQ8RzBxUfapnmre9uwSLnxxlzHMEIWYwAm6UcFxFAwJY5h6pXPzw8u4iEjFy+9wL A8arCo8gcLDmyuYTenSvZRs7mD0PRORWNHSsA8Sz0U5GeAKDhX6uRFWFi1FdiKmsCnlQ aeoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qVLwtJfbfHTUQcEXoU5FWJ2OTmgplseN5aiW160DVsM=; b=HY1a+PzByfIqGGNuopF/KqRcOzIjrnOn4D2+Vk6KswrpQD/Kpdu5u/tavDRTpsimQ1 OSm8Fh2gxrhM9r8Xd8Vh7d2kO1lN1wiE1Yq1q3djmDXUfP0UqhdB4iCTNnALSuVMHuiO H1f35hHNv2gseuGGn7nm7AjSqtXkhriiHSOli8JrrokNgK+QXrTHjcV2l8XSFsKPLA2r 4I+TiJtGaI7RAZiy7X0KnD23JgLQfspyANTTF6ckO6Gg+PHbkxSUnySPGlGKaEMz2389 zhWJHVfDUJ4MdmTNOVyfKAUohi3wGM9K2XdGgh79TlyT2wqi17yGeUruc0L4uHTGAXiP pWJA== X-Gm-Message-State: AIVw110d3BCLhcDwJLk8sg/PVdefpzpVPXq3FS1h6Vit3dcuv4+x+799 Gca+DSJNWowMlO6C X-Received: by 10.101.76.3 with SMTP id u3mr14011363pgq.119.1500028626043; Fri, 14 Jul 2017 03:37:06 -0700 (PDT) Received: from localhost.localdomain ([180.158.48.171]) by smtp.gmail.com with ESMTPSA id y205sm15273553pfb.124.2017.07.14.03.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 03:37:04 -0700 (PDT) From: Yuanhan Liu To: Ivan Dyukov Cc: Maxime Coquelin , Yuanhan Liu , dpdk stable Date: Fri, 14 Jul 2017 18:34:07 +0800 Message-Id: <1500028450-25989-43-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> References: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: fix checking of device features' has been queued to LTS release 16.11.3 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: Fri, 14 Jul 2017 10:37:07 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/19/17. So please shout if anyone has objections. Thanks. --yliu --- >>From ba3547df77dd5b7affd65c23a5712f087fb0d6e8 Mon Sep 17 00:00:00 2001 From: Ivan Dyukov Date: Wed, 28 Jun 2017 15:40:31 +0300 Subject: [PATCH] vhost: fix checking of device features [ upstream commit c665d9a231945181af0a6e6fbeae7f56657f964a ] To compare enabled features in current device we must use bit mask instead of bit position. Fixes: c843af3aa13e ("vhost: access header only if offloading is supported") Signed-off-by: Ivan Dyukov Reviewed-by: Maxime Coquelin Acked-by: Yuanhan Liu --- 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 7d5b04c..ec9f1e5 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -644,9 +644,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; -- 2.7.4