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 570EE28F3 for ; Tue, 22 May 2018 14:48:20 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3957BB402; Tue, 22 May 2018 12:48:19 +0000 (UTC) Received: from [10.36.112.17] (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A6782023585; Tue, 22 May 2018 12:48:18 +0000 (UTC) To: Ferruh Yigit , Tiwei Bie Cc: dev@dpdk.org References: <20180522122211.26627-1-maxime.coquelin@redhat.com> <20180522123403.GA28178@debian> <288d7bb4-f8bd-22e8-8664-19ad1b273846@intel.com> From: Maxime Coquelin Message-ID: <6b9a655f-deb9-8f63-948a-c21f80fc7c4c@redhat.com> Date: Tue, 22 May 2018 14:48:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <288d7bb4-f8bd-22e8-8664-19ad1b273846@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 22 May 2018 12:48:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 22 May 2018 12:48:19 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' 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:48:20 -0000 On 05/22/2018 02:38 PM, Ferruh Yigit wrote: > On 5/22/2018 1:34 PM, Tiwei Bie wrote: >> 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. > > Similar warning exists in ethdev layer, when an offload requested that is not > reported in capability. So I agree to remove this. > > And in next release that warning will be converted into error, so that PMD will > not get those values at all. Ok, I'll post a v3 removing the check. Thanks, Maxime >> >>> @@ -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 >> >