From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next 01/12] net/mlx5e: Ethtool steering flow validation refactoring Date: Fri, 10 Aug 2018 19:22:40 -0700 (PDT) Message-ID: <20180810.192240.1330017327573643390.davem@davemloft.net> References: <20180810222630.11688-1-saeedm@mellanox.com> <20180810222630.11688-2-saeedm@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: saeedm@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:33262 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbeHKEzI (ORCPT ); Sat, 11 Aug 2018 00:55:08 -0400 In-Reply-To: <20180810222630.11688-2-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Saeed Mahameed Date: Fri, 10 Aug 2018 15:26:19 -0700 > +static int validate_tcpudp4(struct ethtool_rx_flow_spec *fs) > +{ > + struct ethtool_tcpip4_spec *l4_mask = &fs->m_u.tcp_ip4_spec; > + int ntuples = 0; > + > + if (fs->m_u.tcp_ip4_spec.tos) ^^^^^^^^^^^^^^^^^^^^^^^^ Since you've gone to the trouble of loading this object into l4_mask before this statement, please use "if (l4_mask->tos)" I know you're just moving existing code into a function, but it looks silly now.