From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D5F81235 for ; Tue, 21 Nov 2017 14:24:44 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8A83320A11; Tue, 21 Nov 2017 08:24:44 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:24:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=VfRB3AYpPNd3RNCy+ zAfdpnBNk+L+dvWpcAObpgLb+Y=; b=YBexMJYhgktk9otl2q8Z3+7K39J8YLuCH DYdfZrQUGynDM0kyEkbjY8taoDUw4fwlI/XJ8un4bWi0cPBx/Rm/wCtG4crK8wUg 3j7U8ekeN8ddHfjgbLLVwuwA62H8iqo2i5LDI+j8DQFqpuFoiiv0l/mOXrbSztKa D83T9reiGweghXrBh+yqUh+pt+Hz7RSUeiyO2tv18PzbqTwQHmps8gRiN/hnmCFn pawXQ3XGjCt3nsHrJuwsdRHEYEQCyJyPJE4Bwyfm+L7q8hff7RL89ICfuAPHAIMO YkblSr+aNBCmQPxGj7lkqRjVBszuKbfgm/C75YCBopFH2+UMaqqHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=VfRB3AYpPNd3RNCy+zAfdpnBNk+L+dvWpcAObpgLb+Y=; b=iAMSz95Y zy/ZNQPJ6wruO/Du5AxBzTQ/wSH0du2o6z2olMe0/WvvrUnppWNZRh3taiP7T2Fi nRw/ZO7smVUpstVjIdzuA8Sia5Q4HdYSwq7BzYFlwlOtsR+TlcKerIS8KksBfSbf 8LPxiex+LllAWO6CQOkYaYcQB3UlBsnzw6G9XtPuMsc5Xfm0tldzG4XxL+3AzKxq 5n3WTHz+Oic9ChuJ12IbGfjTCKjlkCP3KPJbwfmvoT0FDSNYBaY18Ceqj9CvZOlK JvZD4aTT9lFeT1RfCZVWY1KWMc0Gq9v/DOCGJPKuN+yVYy/LwyXfWv54TEvCeCFh uakPULE6roEmOQ== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 2491524631; Tue, 21 Nov 2017 08:24:41 -0500 (EST) From: Yuanhan Liu To: Olivier Matz Cc: Yuanhan Liu , dpdk stable Date: Tue, 21 Nov 2017 21:17:06 +0800 Message-Id: <1511270333-31002-84-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/virtio: revert not claiming IP checksum offload' has been queued to stable release 17.08.1 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: Tue, 21 Nov 2017 13:24:45 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 71208f62d7f569899207f4d77371833bd1b0c12b Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 7 Sep 2017 14:13:39 +0200 Subject: [PATCH] net/virtio: revert not claiming IP checksum offload [ upstream commit d67d86ce5b0a149946f86161e507402ddce2038d ] This reverts commit 4dab342b7522 ("net/virtio: do not falsely claim to do IP checksum"). The description of rxmode->hw_ip_checksum is: hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */ Despite its name, this field can be set by an application to enable L3 and L4 checksums. In case of virtio, only L4 checksum is supported and L3 checksums flags will always be set to "unknown". Fixes: 4dab342b7522 ("net/virtio: do not falsely claim to do IP checksum") Signed-off-by: Olivier Matz Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index eb2d95a..7a84817 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1671,12 +1671,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) return ret; } - /* Virtio does L4 checksum but not L3! */ - if (rxmode->hw_ip_checksum) { - PMD_DRV_LOG(NOTICE, - "virtio does not support IP checksum"); - return -ENOTSUP; - } + /* The name hw_ip_checksum is a bit confusing since it can be + * set by the application to request L3 and/or L4 checksums. In + * case of virtio, only L4 checksum is supported. + */ + if (rxmode->hw_ip_checksum) + req_features |= (1ULL << VIRTIO_NET_F_GUEST_CSUM); + if (rxmode->enable_lro) req_features |= (1ULL << VIRTIO_NET_F_GUEST_TSO4) | @@ -1689,6 +1690,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) return ret; } + if (rxmode->hw_ip_checksum && + !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) { + PMD_DRV_LOG(NOTICE, + "rx checksum not available on this host"); + return -ENOTSUP; + } + if (rxmode->enable_lro && (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) || !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) { -- 2.7.4