From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by dpdk.org (Postfix) with ESMTP id 5EEF82BFF for ; Fri, 7 Jul 2017 21:53:01 +0200 (CEST) Received: by mail-pg0-f53.google.com with SMTP id t186so21890991pgb.1 for ; Fri, 07 Jul 2017 12:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q73KtLwUPxCtBzlleXL1Bew3j9B1HqNM3Xu4OfbmKl8=; b=xx1hlizZs+gUuZytxbRQ7Rgx5+A8A9UMGC6Ip262RmC5sH7zhlPRf5n0ndJPaHxvuE 5ZfWFitc1oocmALdRvDgJQ6CE+05WGeqxlkwZCxqpWfuvJs/VfadBB/nyRwi3zc20kUj VlzjA/52rDHtBWKrDIT6c5coxYLRSNUgd/EOl/6+ux9IOYqkNtQD9sx6GMnnmr09DI3O EwGwvpMd0hsSdyMatyEzTp+vrNsKbGB5vHJVZaxkSm0gaEy8NQT6vXY5aI3xlqjnNh/p D+H3s50xw9XeuhFYtTzQTvSc1v11KQG7+GtrFuR5OgvLALI0lS/vmWLlaTrLLfs2FZCj zKZw== 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=q73KtLwUPxCtBzlleXL1Bew3j9B1HqNM3Xu4OfbmKl8=; b=ZJX4ebo3Z+0HppKxIvoM+JB9D5BDH7jOYfPdCxvjsU8TXWrOJNolm4y3fBJtpkNIvC hGXJOsNFE8rzncQEt7oz5P6DQRH9x/xzRM8muqaVjmrGwsQTygTGhqxmLcZHtNjq/tiw PQt/FSbo2kgIwE7D2I4YqNLFRrWlGc61iN4H0b0Hr2fvxyenqcHM7PfIcnHHx+ZXhfHy R+60hHoSNnHIjOpoGgUYvJh9VnJgJcPMkhVkoD4TbHqg+AmA7BkhF1eTFCFc2M4l/i6c BXS0oWihvEVOC78ydeQwgxrWY8tmNVcXcvHb4DdPIYxQQMfSjNbowkIXQJb+fMLr4kpK LBcQ== X-Gm-Message-State: AIVw111JcWQiBj5ofFUWsXynXmR5rBoSDL/3kTJY4oa5pEOmdFObKHB6 3JF4sPNMZokB8joW X-Received: by 10.84.169.3 with SMTP id g3mr4803838plb.136.1499457180465; Fri, 07 Jul 2017 12:53:00 -0700 (PDT) Received: from xeon-e3.wavecable.com (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id j14sm7273938pgt.7.2017.07.07.12.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 12:52:59 -0700 (PDT) From: Stephen Hemminger To: yliu@fridaylinux.org, maxime.coquelin@redhat.com Cc: dev@dpdk.org, Stephen Hemminger Date: Fri, 7 Jul 2017 12:52:50 -0700 Message-Id: <20170707195250.22259-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170707195250.22259-1-stephen@networkplumber.org> References: <20170707195250.22259-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 2/2] virtio: don't claim to support LRO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 19:53:02 -0000 The current virtio supports Transmit Segmentation Offload, but does not really support Large Receive Offload. The driver was confusing the two offloads. Signed-off-by: Stephen Hemminger --- drivers/net/virtio/virtio_ethdev.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index ca607904fa37..00a3122780ba 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1659,11 +1659,8 @@ 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; /* Virtio does L4 checksum but not L3! */ if (rxmode->hw_ip_checksum) { @@ -1671,23 +1668,10 @@ 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 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))) { + if (rxmode->enable_lro) { PMD_DRV_LOG(NOTICE, - "lro not available on this host"); + "virtio does not support Large Receive Offload"); return -ENOTSUP; } @@ -1913,8 +1897,6 @@ 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.11.0