lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce0a08e2-a74a-4059-97c4-a38cae788a0a@fiberby.net>
Date: Tue, 16 Apr 2024 14:11:52 +0000
From: Asbjørn Sloth Tønnesen <ast@...erby.net>
To: Edward Cree <ecree.xilinx@...il.com>, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Martin Habets <habetsm.xilinx@...il.com>,
 linux-net-drivers@....com
Subject: Re: [PATCH net-next] sfc: use flow_rule_no_unsupp_control_flags()

Hi Ed,

On 4/16/24 1:57 PM, Edward Cree wrote:
> On 16/04/2024 14:44, Asbjørn Sloth Tønnesen wrote:
>> Adopt nfp-style *_FLOWER_SUPPORTED_CTLFLAGS define.
>>
>> Change the check for unsupported control flags, to use the new helper
>> flow_rule_is_supp_control_flags().
>>
>> Since the helper was based on sfc, then nothing really changes.
>>
>> Compile-tested, and compiled objects are identical.
>>
>> Signed-off-by: Asbjørn Sloth Tønnesen <ast@...erby.net>
> 
> Subject line doesn't match the patch (I guess because the helper
>   got renamed).

Correct, through I had fixed it everywhere. Apparently I missed one.


>> ---
>>   drivers/net/ethernet/sfc/tc.c | 10 ++++++----
>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/sfc/tc.c b/drivers/net/ethernet/sfc/tc.c
>> index 82e8891a619a..5f73f1dea524 100644
>> --- a/drivers/net/ethernet/sfc/tc.c
>> +++ b/drivers/net/ethernet/sfc/tc.c
>> @@ -21,6 +21,10 @@
>>   #include "ef100_rep.h"
>>   #include "efx.h"
>>   
>> +#define SFC_FLOWER_SUPPORTED_CTLFLAGS \
>> +	(FLOW_DIS_IS_FRAGMENT | \
>> +	 FLOW_DIS_FIRST_FRAG)
> 
> I'd rather keep the flags in-line, next to where they're actually
>   used.  I.e. we have
>      if (flags & FRAGMENT)
>          blah;
>      if (flags & FIRST_FRAG)
>          foo;
>      if (!blah_supported(FRAGMENT | FIRST_FRAG))
>          return -EEK;
>   and it's very clear that anyone changing one of those parts also
>   needs to change the other.  Whereas with your #define it's not
>   immediately obvious to someone reading the code where that set
>   of supported flags comes from conceptually.

Ok, I liked the NFP-style #define, but will drop trying to expand that.

pw-bot: changes-requested

-- 
Best regards
Asbjørn Sloth Tønnesen
Network Engineer
Fiberby - AS42541

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ