From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 50BE11B7BF for ; Fri, 11 May 2018 11:17:08 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 99D469C0076; Fri, 11 May 2018 09:17:06 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 11 May 2018 10:17:00 +0100 To: Rasesh Mody , CC: Harish Patil , , References: <1522196155-30972-1-git-send-email-rasesh.mody@cavium.com> From: Andrew Rybchenko Message-ID: <729baae1-5b98-d09b-a38b-b18d886cd976@solarflare.com> Date: Fri, 11 May 2018 12:16:56 +0300 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: <1522196155-30972-1-git-send-email-rasesh.mody@cavium.com> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23836.003 X-TM-AS-Result: No--16.427500-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1526030227-2doiYDNjgxw4 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 1/5] net/qede: convert to new Rx/Tx offloads 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: Fri, 11 May 2018 09:17:08 -0000 On 03/28/2018 03:15 AM, Rasesh Mody wrote: > From: Harish Patil > > Ethdev RX/TX offloads API has changed since: > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") > commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") > > This patch makes use of new offload flags as suggested and fix > the default RX/TX configuration. Also indent the code properly > around those changes. > > Signed-off-by: Harish Patil > Signed-off-by: Rasesh Mody > --- > drivers/net/qede/qede_ethdev.c | 103 ++++++++++++++++++++++------------------ > drivers/net/qede/qede_rxtx.c | 2 +- > drivers/net/qede/qede_rxtx.h | 2 - > 3 files changed, 59 insertions(+), 48 deletions(-) > > diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c > index a91f436..6a51e3d 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c [...] > @@ -1534,26 +1527,46 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) > dev_info->reta_size = ECORE_RSS_IND_TABLE_SIZE; > dev_info->hash_key_size = ECORE_RSS_KEY_SIZE * sizeof(uint32_t); > dev_info->flow_type_rss_offloads = (uint64_t)QEDE_RSS_OFFLOAD_ALL; > - > - dev_info->default_txconf = (struct rte_eth_txconf) { > - .txq_flags = QEDE_TXQ_FLAGS, > - }; > - > - dev_info->rx_offload_capa = (DEV_RX_OFFLOAD_VLAN_STRIP | > - DEV_RX_OFFLOAD_IPV4_CKSUM | > + dev_info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM | > DEV_RX_OFFLOAD_UDP_CKSUM | > DEV_RX_OFFLOAD_TCP_CKSUM | > DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | > - DEV_RX_OFFLOAD_TCP_LRO); > - > + DEV_RX_OFFLOAD_TCP_LRO | > + DEV_RX_OFFLOAD_CRC_STRIP | > + DEV_RX_OFFLOAD_SCATTER | > + DEV_RX_OFFLOAD_JUMBO_FRAME | > + DEV_RX_OFFLOAD_VLAN_FILTER | > + DEV_RX_OFFLOAD_VLAN_STRIP); > + dev_info->rx_queue_offload_capa = 0; > + > + /* TX offloads are on a per-packet basis, so it is applicable > + * to both at port and queue levels. > + */ > dev_info->tx_offload_capa = (DEV_TX_OFFLOAD_VLAN_INSERT | > DEV_TX_OFFLOAD_IPV4_CKSUM | > DEV_TX_OFFLOAD_UDP_CKSUM | > DEV_TX_OFFLOAD_TCP_CKSUM | > DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | > - DEV_TX_OFFLOAD_TCP_TSO | > + DEV_TX_OFFLOAD_QINQ_INSERT | > + DEV_TX_OFFLOAD_MULTI_SEGS | > + DEV_TX_OFFLOAD_TCP_TSO | > DEV_TX_OFFLOAD_VXLAN_TNL_TSO | > DEV_TX_OFFLOAD_GENEVE_TNL_TSO); > + dev_info->tx_queue_offload_capa = dev_info->tx_offload_capa; > + > + dev_info->default_txconf = (struct rte_eth_txconf) { > + .txq_flags = DEV_TX_OFFLOAD_MULTI_SEGS, It is incorrect to initialize TxQ flags using Tx offload define. > + }; > + > + dev_info->default_rxconf = (struct rte_eth_rxconf) { > + /* Packets are always dropped if no descriptors are available */ > + .rx_drop_en = 1, > + /* The below RX offloads are always enabled */ > + .offloads = (DEV_RX_OFFLOAD_CRC_STRIP | > + DEV_RX_OFFLOAD_IPV4_CKSUM | > + DEV_RX_OFFLOAD_TCP_CKSUM | > + DEV_RX_OFFLOAD_UDP_CKSUM), > + }; > > memset(&link, 0, sizeof(struct qed_link_output)); > qdev->ops->common->get_link(edev, &link);