Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbcLES0r (ORCPT ); Mon, 5 Dec 2016 13:26:47 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:38030 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbcLES0o (ORCPT ); Mon, 5 Dec 2016 13:26:44 -0500 Subject: Re: [PATCH V2 net 04/20] net/ena: fix ethtool RSS flow configuration To: Matt Wilson References: <1480857578-5065-1-git-send-email-netanel@annapurnalabs.com> <1480857578-5065-5-git-send-email-netanel@annapurnalabs.com> <20161205041815.GE4310@u54ee753d2d1854bda401.ant.amazon.com> Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, netdev@vger.kernel.org, dwmw@amazon.com, zorik@annapurnalabs.com, alex@annapurnalabs.com, saeed@annapurnalabs.com, msw@amazon.com, aliguori@amazon.com, nafea@annapurnalabs.com From: Netanel Belgazal Message-ID: <376d4953-277e-b10d-bf71-1c4e05954a7c@annapurnalabs.com> Date: Mon, 5 Dec 2016 20:26:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161205041815.GE4310@u54ee753d2d1854bda401.ant.amazon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1768 Lines: 58 On 12/05/2016 06:18 AM, Matt Wilson wrote: > On Sun, Dec 04, 2016 at 03:19:22PM +0200, Netanel Belgazal wrote: >> ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type >> treat the ena_flow_hash_to_flow_type enum as power of two values. >> >> Change the values of ena_admin_flow_hash_fields to be power of two values. > Then I generally prefer BIT(0), BIT(1), BIT(2), etc. I'll use BIT(x) > > Also it would be helpful to include some comments about the > consequences of the current state of the code. I'll add explanation. > > --msw > >> Signed-off-by: Netanel Belgazal >> --- >> drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h >> index a46e749..f48c886 100644 >> --- a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h >> +++ b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h >> @@ -631,22 +631,22 @@ enum ena_admin_flow_hash_proto { >> /* RSS flow hash fields */ >> enum ena_admin_flow_hash_fields { >> /* Ethernet Dest Addr */ >> - ENA_ADMIN_RSS_L2_DA = 0, >> + ENA_ADMIN_RSS_L2_DA = 0x1, >> >> /* Ethernet Src Addr */ >> - ENA_ADMIN_RSS_L2_SA = 1, >> + ENA_ADMIN_RSS_L2_SA = 0x2, >> >> /* ipv4/6 Dest Addr */ >> - ENA_ADMIN_RSS_L3_DA = 2, >> + ENA_ADMIN_RSS_L3_DA = 0x4, >> >> /* ipv4/6 Src Addr */ >> - ENA_ADMIN_RSS_L3_SA = 5, >> + ENA_ADMIN_RSS_L3_SA = 0x8, >> >> /* tcp/udp Dest Port */ >> - ENA_ADMIN_RSS_L4_DP = 6, >> + ENA_ADMIN_RSS_L4_DP = 0x10, >> >> /* tcp/udp Src Port */ >> - ENA_ADMIN_RSS_L4_SP = 7, >> + ENA_ADMIN_RSS_L4_SP = 0x20, >> }; >> >> struct ena_admin_proto_input {