From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D27D3A034E; Thu, 14 May 2020 13:57:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30F871D55D; Thu, 14 May 2020 13:57:09 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 96ED71B5E1 for ; Thu, 14 May 2020 13:57:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589457427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3o7tZLnV64BFq7biQ5fO0zLxNGwLl/Oov61uaVlF6NA=; b=EtfB8V0bl49SdNgEJs0iSIXhGG1IFQJEnZDk368+0QfDuSdeUxLXAFZmAxjcqVh2PVUyvf 3TNLOYBnVKdqWn8EylFLUZ3O2s3bemaKqqenTr9wztedpV1X62E/hGf979T2PBNlJ9+nfH k/XzWE4OI9oyDY6hZGPcnZ2c/t1XyRQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-422-h4kVtjgrNQqcnhL4VQj8fg-1; Thu, 14 May 2020 07:57:00 -0400 X-MC-Unique: h4kVtjgrNQqcnhL4VQj8fg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CEF1461; Thu, 14 May 2020 11:56:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-70.sin2.redhat.com [10.67.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4DABD51322; Thu, 14 May 2020 11:56:48 +0000 (UTC) From: Gowrishankar Muthukrishnan To: dev@dpdk.org Cc: Maxime Coquelin , Flavio Leitner , Tiwei Bie , Zhihong Wang Date: Thu, 14 May 2020 17:26:47 +0530 Message-Id: <20200514115647.23604-1-gmuthukr@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/virtio: include host features supported in guest 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Virtio pmd driver can not benefit from tso and csum offload as they are not included in negotiation check with host. Add them in virtio dev init and let negotiation decide the fate. Signed-off-by: Gowrishankar Muthukrishnan -- This patch has been tested with TSO tests in OVS-DPDK: https://patchwork.ozlabs.org/project/openvswitch/list/?series=176886 ## ------------------------------- ## ## openvswitch 2.13.90 test suite. ## ## ------------------------------- ## OVS-DPDK unit tests 1: OVS-DPDK - EAL init ok 2: OVS-DPDK - add standard DPDK port ok 3: OVS-DPDK - add vhost-user-client port ok 4: OVS-DPDK - ping vhost-user ports ok 5: OVS-DPDK - ping vhost-user-client ports ok 6: OVS-DPDK - validate tso negotiation ok ## ------------- ## ## Test results. ## ## ------------- ## All 6 tests were successful. --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 044eb10..91f6f16 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1914,7 +1914,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev, } /* reset device and negotiate default features */ - ret = virtio_init_device(eth_dev, VIRTIO_PMD_DEFAULT_GUEST_FEATURES); + ret = virtio_init_device(eth_dev, VIRTIO_PMD_SUPPORTED_GUEST_FEATURES); if (ret < 0) goto err_virtio_init; @@ -2064,7 +2064,7 @@ static int eth_virtio_pci_remove(struct rte_pci_device *pci_dev) int ret; PMD_INIT_LOG(DEBUG, "configure"); - req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES; + req_features = VIRTIO_PMD_SUPPORTED_GUEST_FEATURES; if (rxmode->mq_mode != ETH_MQ_RX_NONE) { PMD_DRV_LOG(ERR, -- 1.8.3.1