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 76071A00BE; Tue, 29 Oct 2019 08:22:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89F9C1BED1; Tue, 29 Oct 2019 08:22:08 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id E059FA3 for ; Tue, 29 Oct 2019 08:22:06 +0100 (CET) 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-us3.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 75648980062; Tue, 29 Oct 2019 07:22:05 +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; Tue, 29 Oct 2019 07:21:49 +0000 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: <20191025143314.11162-1-pbhagavatula@marvell.com> <20191029050312.2715-1-pbhagavatula@marvell.com> <20191029050312.2715-5-pbhagavatula@marvell.com> From: Andrew Rybchenko Message-ID: <62beba28-90a4-3760-316c-1475647e33c4@solarflare.com> Date: Tue, 29 Oct 2019 10:21:46 +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: <20191029050312.2715-5-pbhagavatula@marvell.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit 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-25008.003 X-TM-AS-Result: No-5.033600-8.000000-10 X-TMASE-MatchedRID: 6otD/cJAac0eimh1YYHcKKfOxh7hvX71iKQhvNyRXGHk1kyQDpEj8IP+ YDa/Dhu96dlqnF4gOVm0TL1wHXdwVZsyCEgzfA2XSvQm6xqmCPJp4xorO9dSme1VpmGiDxtcyJN a6DYLgM0FMvc3zLJP149CL1e45ag4O6vdW3MUstXMbQu1fPiCD/q9wyDsD+ClJX3t9Sm95f80NS C223LgVfXbdheTtrXAdzfGEjD8m6CCc9vl1epVq1HmrymVJ0uQBGvINcfHqhfoazN4PulnbPQP7 Gc63USFZRZpSpcHuStDHZlXFFHvOnxeIMB1sqRtgRTWSf0X8xkRMzHw4jihuZsoi2XrUn/Jsuf7 RWbvUtyrusVRy4an8SdET58jp62SUyCbjteIdf2jbpzyXh8/LKP7keqDW1cCt5/egHzyO/o/677 SzzI3UKE3bCbWZ8EPOXsyHBl8OriWM8pxvop1vhkcRu36vIXH8B1+fkPI48NcLq4mdz+nRKyCWS W0HzF0amjOS5qVJMM6/EVJu95U3A== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.033600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-25008.003 X-MDID: 1572333726-XoXyILDYQhiN Subject: Re: [dpdk-dev] [PATCH v14 4/7] 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/29/19 8:03 AM, 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/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c > index 63da807ea..d9d2ce6bd 100644 > --- a/drivers/net/sfc/sfc_ef10_essb_rx.c > +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c > @@ -715,7 +715,8 @@ 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, > + .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM | > + DEV_RX_OFFLOAD_RSS_HASH, > .queue_offload_capa = 0, > .get_dev_info = sfc_ef10_essb_rx_get_dev_info, > .pool_ops_supported = sfc_ef10_essb_rx_pool_ops_supported, > diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c > index f2fc6e70a..9e527b7fb 100644 > --- a/drivers/net/sfc/sfc_ef10_rx.c > +++ b/drivers/net/sfc/sfc_ef10_rx.c > @@ -796,7 +796,8 @@ struct sfc_dp_rx sfc_ef10_rx = { > .features = SFC_DP_RX_FEAT_MULTI_PROCESS | > SFC_DP_RX_FEAT_INTR, > .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM | > - DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM, > + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | > + DEV_RX_OFFLOAD_RSS_HASH, > .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER, > .get_dev_info = sfc_ef10_rx_get_dev_info, > .qsize_up_rings = sfc_ef10_rx_qsize_up_rings, > diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c > index e6809bb64..4af8f1977 100644 > --- a/drivers/net/sfc/sfc_rx.c > +++ b/drivers/net/sfc/sfc_rx.c > @@ -617,7 +617,8 @@ struct sfc_dp_rx sfc_efx_rx = { > .hw_fw_caps = 0, > }, > .features = SFC_DP_RX_FEAT_INTR, > - .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM, > + .dev_offload_capa = DEV_RX_OFFLOAD_CHECKSUM | > + DEV_RX_OFFLOAD_RSS_HASH, > .queue_offload_capa = DEV_RX_OFFLOAD_SCATTER, > .qsize_up_rings = sfc_efx_rx_qsize_up_rings, > .qcreate = sfc_efx_rx_qcreate, Thanks  a lot, above looks good to me now. > @@ -1556,6 +1557,9 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) > rxmode->offloads |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; > } > > + if (!(rxmode->offloads & DEV_RX_OFFLOAD_RSS_HASH)) > + rxmode->offloads |= DEV_RX_OFFLOAD_RSS_HASH; > + I've tried to highlight on my previous review notes, but it looks like not that successful. The right condition should check that offload is really supported: if ((offloads_supported & DEV_RX_OFFLOAD_RSS_HASH) &&     (~rxmode->offloads & DEV_RX_OFFLOAD_RSS_HASH))           rxmode->offloads |= DEV_RX_OFFLOAD_RSS_HASH; Basically similar to DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM above (including style of disabled offload check just to have common style). Thanks. > return rc; > } > [snip]