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 1C290235 for ; Tue, 21 Nov 2017 14:24:41 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C51DC20AFD; Tue, 21 Nov 2017 08:24:40 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:24:40 -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=5gHL4XTkn9jkQ2zGo WAHjGRlCxA7S8n+Awq1hDQfKQ0=; b=PdsA3COC0HHCgYsF2dfhdKoiLWSikffd0 jeQhui5wzpDeWQCYbVy0+nsAX72fJL2VQ0IMpIWTZhmXpU5HsffjCuD6OxFhuN/8 qLT8NPyY8AX1DG4O9pIcz2LOJD4c2cbn1FTnSPQq2nd04sI9tUDqCM5tpUvY1db/ AfWQ08uI3dx3sCPLufD19l8P9ZL1yaqkReoBpZJwj9vSJcOJvGFCikRaqnrz/9rD jrddVxLAoeeeJhF1bk4Jh4418eY/h77IoVGmTaS1lJ6SkJ2CESMsLcRBx5PxpSoa /PnQY/JT5URgZOvba7zBawqprZZPnclUSJcHZVLo4zo0uAGXAArqQ== 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=5gHL4XTkn9jkQ2zGoWAHjGRlCxA7S8n+Awq1hDQfKQ0=; b=V1kvynMG 3WrWTrLK4o0n8A9YYYJEumhHJvXHDg4+A9QFV5ultm5Hh7MADBfx9dLdDWrM7yMi 7nDM7D20aTqfAYm/9tSpUrLt7so/Qzikcbtj7fzMrVOjxAfvkgrdTRk3SG4TOwfO CoJhhRgmfRiTvebnEku7pgc4xgbIHMhl4ECVEEJ0yZyNhBd0Mv73NR2IKb6I7xhI 5mUw2zrvYl4XIQL9Zh8e3HcKSlXg6ukpjakFLtz9GdbzFYa/LHk24R4lgUiJ8QVL o1QCOi0Ob5+vjaR3VGxHGoYUoRasN0OmB5lgKpnF4onS9GXthrMwt+7GJcwkTX1i snAJUSe5hVbeNA== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id B410624631; Tue, 21 Nov 2017 08:24:37 -0500 (EST) From: Yuanhan Liu To: Olivier Matz Cc: Yuanhan Liu , dpdk stable Date: Tue, 21 Nov 2017 21:17:05 +0800 Message-Id: <1511270333-31002-83-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 LRO support' 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:41 -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 74a7ac7e7037928d40242f541be4aa3938f5ad42 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 7 Sep 2017 14:13:38 +0200 Subject: [PATCH] net/virtio: revert not claiming LRO support [ upstream commit ec9f3d122a58934a2c52ae984be7114d03234a11 ] This reverts commit 701a64622c26 ("net/virtio: do not claim to support LRO") Setting rxmode->enable_lro is a way to tell the host that the guest is ok to receive tso packets. From the guest point of view, it is like enabling LRO on a physical driver. Fixes: 701a64622c26 ("net/virtio: do not claim to support LRO") Signed-off-by: Olivier Matz Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index e320811..eb2d95a 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1659,9 +1659,11 @@ virtio_dev_configure(struct rte_eth_dev *dev) { const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; struct virtio_hw *hw = dev->data->dev_private; + uint64_t req_features; int ret; PMD_INIT_LOG(DEBUG, "configure"); + req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES; if (dev->data->dev_conf.intr_conf.rxq) { ret = virtio_init_device(dev, hw->req_guest_features); @@ -1675,10 +1677,23 @@ virtio_dev_configure(struct rte_eth_dev *dev) "virtio does not support IP checksum"); return -ENOTSUP; } + if (rxmode->enable_lro) + req_features |= + (1ULL << VIRTIO_NET_F_GUEST_TSO4) | + (1ULL << VIRTIO_NET_F_GUEST_TSO6); - if (rxmode->enable_lro) { + /* if request features changed, reinit the device */ + if (req_features != hw->req_guest_features) { + ret = virtio_init_device(dev, req_features); + if (ret < 0) + return ret; + } + + if (rxmode->enable_lro && + (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) || + !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) { PMD_DRV_LOG(NOTICE, - "virtio does not support Large Receive Offload"); + "Large Receive Offload not available on this host"); return -ENOTSUP; } @@ -1904,6 +1919,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) } tso_mask = (1ULL << VIRTIO_NET_F_GUEST_TSO4) | (1ULL << VIRTIO_NET_F_GUEST_TSO6); + if ((host_features & tso_mask) == tso_mask) + dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TCP_LRO; dev_info->tx_offload_capa = 0; if (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) { -- 2.7.4