From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 53E5F2BD3; Fri, 21 Sep 2018 14:54:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Sep 2018 05:54:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,285,1534834800"; d="scan'208";a="76203870" Received: from btwcube1.sh.intel.com ([10.67.104.151]) by orsmga006.jf.intel.com with ESMTP; 21 Sep 2018 05:54:16 -0700 From: Tiwei Bie To: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 21 Sep 2018 20:52:43 +0800 Message-Id: <20180921125244.27861-3-tiwei.bie@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180921125244.27861-1-tiwei.bie@intel.com> References: <20180921125244.27861-1-tiwei.bie@intel.com> Subject: [dpdk-dev] [PATCH 2/3] net/virtio: add the missing supported features 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, 21 Sep 2018 12:54:19 -0000 The virtio features VIRTIO_NET_F_CSUM, VIRTIO_NET_F_HOST_TSO4 and VIRTIO_NET_F_HOST_TSO6 are supported by the virtio PMD. But they are missing in the supported feature set. And since below commit: commit 4174a7b59d05 ("net/virtio: improve Tx offload features negotiation") Virtio PMD will announce the Tx offloading capabilities based on the features read from the device. And virtio-user won't report the features which are not in virtio-PMD's supported feature set. So since that commit, virtio-user won't announce the DEV_TX_OFFLOAD_UDP_CKSUM, DEV_TX_OFFLOAD_TCP_CKSUM and DEV_TX_OFFLOAD_TCP_TSO offloading capabilities even if the vhost backend supports them. This patch adds these missing features, and virtio-user will report them if the backend supports them. Fixes: 142678d42959 ("net/virtio-user: fix wrongly get/set features") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_ethdev.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index b726ad108..e0f80e5a4 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -40,7 +40,10 @@ (VIRTIO_PMD_DEFAULT_GUEST_FEATURES | \ 1u << VIRTIO_NET_F_GUEST_CSUM | \ 1u << VIRTIO_NET_F_GUEST_TSO4 | \ - 1u << VIRTIO_NET_F_GUEST_TSO6) + 1u << VIRTIO_NET_F_GUEST_TSO6 | \ + 1u << VIRTIO_NET_F_CSUM | \ + 1u << VIRTIO_NET_F_HOST_TSO4 | \ + 1u << VIRTIO_NET_F_HOST_TSO6) /* * CQ function prototype -- 2.18.0