From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 02C5828F3 for ; Tue, 22 May 2018 14:50:34 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8347B857A8; Tue, 22 May 2018 12:50:33 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1ECCD1134CD0; Tue, 22 May 2018 12:50:29 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, tiwei.bie@intel.com, ferruh.yigit@intel.com Cc: Maxime Coquelin Date: Tue, 22 May 2018 14:50:19 +0200 Message-Id: <20180522125019.26977-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 22 May 2018 12:50:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 22 May 2018 12:50:33 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: [dpdk-dev] [PATCH v3] net/vhost: convert to new Rx/Tx offload API 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: Tue, 22 May 2018 12:50:34 -0000 Signed-off-by: Maxime Coquelin --- Changes since v2: - Remove check for unsupported offload feature (Tiwei) drivers/net/vhost/rte_eth_vhost.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index f473bbbb3..ba9d768a0 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -491,12 +491,7 @@ eth_dev_configure(struct rte_eth_dev *dev __rte_unused) struct pmd_internal *internal = dev->data->dev_private; const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; - internal->vlan_strip = rxmode->hw_vlan_strip; - - if (rxmode->hw_vlan_filter) - VHOST_LOG(WARNING, - "vhost(%s): vlan filtering not available\n", - internal->dev_name); + internal->vlan_strip = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP); return 0; } @@ -1072,6 +1067,10 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = internal->max_queues; dev_info->max_tx_queues = internal->max_queues; dev_info->min_rx_bufsize = 0; + + dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_VLAN_INSERT; + dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP; } static int -- 2.14.3