From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F010C2629 for ; Tue, 22 May 2018 14:33:43 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 05:33:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,430,1520924400"; d="scan'208";a="230633993" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.203]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2018 05:33:42 -0700 Date: Tue, 22 May 2018 20:34:03 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, ferruh.yigit@intel.com Message-ID: <20180522123403.GA28178@debian> References: <20180522122211.26627-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180522122211.26627-1-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) Subject: Re: [dpdk-dev] [PATCH v2] 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:33:44 -0000 On Tue, May 22, 2018 at 02:22:11PM +0200, Maxime Coquelin wrote: > Signed-off-by: Maxime Coquelin > --- > Changes since v2: > - Announce supported Rx & Tx offload features (Tiwei) > > drivers/net/vhost/rte_eth_vhost.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c > index f473bbbb3..229a5ba8d 100644 > --- a/drivers/net/vhost/rte_eth_vhost.c > +++ b/drivers/net/vhost/rte_eth_vhost.c > @@ -491,9 +491,9 @@ 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; > + internal->vlan_strip = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP); > > - if (rxmode->hw_vlan_filter) > + if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER) > VHOST_LOG(WARNING, > "vhost(%s): vlan filtering not available\n", > internal->dev_name); I'm not quite sure whether we still need to log this warning. > @@ -1072,6 +1072,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; > } Other than that, it looks good to me. Thanks! Best regards, Tiwei Bie