From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 515ACA32A4 for ; Fri, 25 Oct 2019 16:57:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA2801C221; Fri, 25 Oct 2019 16:57:17 +0200 (CEST) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id A38A41C207 for ; Fri, 25 Oct 2019 16:57:15 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 5F28ABC0072; Fri, 25 Oct 2019 14:57:12 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 25 Oct 2019 15:56:53 +0100 To: , , , Ajit Khaparde , "Somnath Kotur" , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Wenzhuo Lu , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Jingjing Wu , Qiming Yang , Konstantin Ananyev , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Alejandro Lucero , Nithin Dabilpuram , Kiran Kumar K , "Rasesh Mody" , Shahed Shaikh , Maciej Czekaj , Yong Wang CC: References: <20191017120245.984-1-pbhagavatula@marvell.com> <20191025143314.11162-1-pbhagavatula@marvell.com> <20191025143314.11162-4-pbhagavatula@marvell.com> From: Andrew Rybchenko Message-ID: <24745c14-7485-7781-80f9-3c790266805c@solarflare.com> Date: Fri, 25 Oct 2019 17:56:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191025143314.11162-4-pbhagavatula@marvell.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-25000.003 X-TM-AS-Result: No-16.640600-8.000000-10 X-TMASE-MatchedRID: ZFzIhWOuIzseimh1YYHcKKfOxh7hvX71iKQhvNyRXGHk1kyQDpEj8IP+ YDa/Dhu96dlqnF4gOVm0TL1wHXdwVZsyCEgzfA2XSvQm6xqmCPJp4xorO9dSme1VpmGiDxtcyJN a6DYLgM0FMvc3zLJP149CL1e45ag4cj8zE1EjtST1xv2JHBkcHz+7olaZ5ixYH1bhq4z+yfSlzb GAkBjouhEOP59EuENNUjyunbdUqJCRyUXgTydza2Y+xOrx57jW1K3bse3FjTtKDy5+nmfdPtgSk KeGM5sE4EXw14zmtrJu9+bdF2jJf3VVlWlpBwvrNyh9G6pvCVIA+JHhu0IR5p3ONfftVRxaanEx 6Q9PkPAR3jpud/OKuRzxTTakBnijRlRZprugM0HVHEmXVZHbcwX/tYZf6r/wDO+DX+rUwfaYzm8 B0eB8XKnf2C6FfI+d8n+TRW1yhDMy460Qq7VK+6o2fOuRT7aa+ma2kEuhRFpXPwnnY5XL5MaYaU JNrGtERz0trbawVs1SZFgUxk5NNNzvWQXw1lfczNIobH2DzGEhFjPtWsXnp5soi2XrUn/JyeMtM D9QOgChMIDkR/KfwI2j49Ftap9EOwBXM346/+ypFPkF6QozxPywUB2Jvct+5zq2st8Mq6ml0FRC Z+mW/h0KYxDYEQrm X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--16.640600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-25000.003 X-MDID: 1572015434-p-1g8WecOJnW Subject: Re: [dpdk-dev] [PATCH v13 3/6] drivers/net: update Rx RSS hash offload capabilities 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/25/19 5:33 PM, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash > delivery. > > Signed-off-by: Pavan Nikhilesh > Reviewed-by: Andrew Rybchenko > Reviewed-by: Hemant Agrawal > Acked-by: Jerin Jacob > Acked-by: Ajit Khaparde [snip] > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index e7ec99e15..d4f8cc92a 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -117,7 +117,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = { > DEV_RX_OFFLOAD_KEEP_CRC | \ > DEV_RX_OFFLOAD_VLAN_EXTEND | \ > DEV_RX_OFFLOAD_TCP_LRO | \ > - DEV_RX_OFFLOAD_SCATTER) > + DEV_RX_OFFLOAD_SCATTER | \ > + DEV_RX_OFFLOAD_RSS_HASH) > > static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask); > static void bnxt_print_link_info(struct rte_eth_dev *eth_dev); > @@ -681,6 +682,12 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev) > bp->rx_cp_nr_rings = bp->rx_nr_rings; > bp->tx_cp_nr_rings = bp->tx_nr_rings; > > + if (!(rx_offloads & DEV_RX_OFFLOAD_RSS_HASH)) { > + PMD_DRV_LOG(INFO, "RX_OFFLOAD_RSS_HASH cannot be disabled\n"); Shouldn't logging be done from rte_eth_dev_configure()? I.e. a generic function which is called after dev_configure callback and take a look at dev_conf->rx_mode.offloads and dev->data->dev_conf.rxmode.offloads and for each bit which differs log message using rte_eth_dev_rx_offload_name(). Same for Tx while we are on the page. I.e. two more patch just before this one. > + rx_offloads |= DEV_RX_OFFLOAD_RSS_HASH; > + eth_dev->data->dev_conf.rxmode.offloads = rx_offloads; > + } > + > if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { > eth_dev->data->mtu = > eth_dev->data->dev_conf.rxmode.max_rx_pkt_len - [snip] > diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c > index 63da807ea..220ef0e47 100644 > --- a/drivers/net/sfc/sfc_ef10_essb_rx.c > +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c > @@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = { > .features = SFC_DP_RX_FEAT_FLOW_FLAG | > SFC_DP_RX_FEAT_FLOW_MARK, > .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM, > - .queue_offload_capa = 0, > + .queue_offload_capa = DEV_RX_OFFLOAD_RSS_HASH, Please, move it dev_offload_capa to be sure that it cannot be requested on queue level and no checks are required on queue level that the offload cannot be disabled. We'll move to queue level when/if it is really supported on queue level. > .get_dev_info = sfc_ef10_essb_rx_get_dev_info, > .pool_ops_supported = sfc_ef10_essb_rx_pool_ops_supported, > .qsize_up_rings = sfc_ef10_essb_rx_qsize_up_rings, > diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c > index f2fc6e70a..85b5df466 100644 > --- a/drivers/net/sfc/sfc_ef10_rx.c > +++ b/drivers/net/sfc/sfc_ef10_rx.c > @@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = { > SFC_DP_RX_FEAT_INTR, > .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM | > DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM, > - .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER, > + .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER | > + DEV_RX_OFFLOAD_RSS_HASH, Same here > .get_dev_info = sfc_ef10_rx_get_dev_info, > .qsize_up_rings = sfc_ef10_rx_qsize_up_rings, > .qcreate = sfc_ef10_rx_qcreate, > diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c > index 454b8956a..403711ca0 100644 > --- a/drivers/net/sfc/sfc_ethdev.c > +++ b/drivers/net/sfc/sfc_ethdev.c > @@ -206,6 +206,11 @@ sfc_dev_configure(struct rte_eth_dev *dev) > sfc_log_init(sa, "entry n_rxq=%u n_txq=%u", > dev_data->nb_rx_queues, dev_data->nb_tx_queues); > > + if (!(dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) { > + sfc_info(sa, "RX_OFFLOAD_RSS_HASH cannot be disabled"); > + dev_data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; > + } > + It should be in drivers/net/sfc/sfc_rx.c sfc_rx_check_mode() close to the end of the function and similar to DEV_RX_OFFLOAD_CHECKSUM. > sfc_adapter_lock(sa); > switch (sa->state) { > case SFC_ADAPTER_CONFIGURED: > diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c > index e6809bb64..695580b22 100644 > --- a/drivers/net/sfc/sfc_rx.c > +++ b/drivers/net/sfc/sfc_rx.c > @@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = { > }, > .features = SFC_DP_RX_FEAT_INTR, > .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM, > - .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER, > + .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER | > + DEV_RX_OFFLOAD_RSS_HASH, Please, move to dev_offload_capa. > .qsize_up_rings = sfc_efx_rx_qsize_up_rings, > .qcreate = sfc_efx_rx_qcreate, > .qdestroy = sfc_efx_rx_qdestroy, [snip]