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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f6bccd7-a117-fbae-cd1b-26db1d2a958f@engleder-embedded.com>
Date:   Sat, 7 Jan 2023 00:34:38 +0100
From:   Gerhard Engleder <gerhard@...leder-embedded.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Alexander Lobakin <alexandr.lobakin@...el.com>,
        davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 4/9] tsnep: Add XDP TX support

On 06.01.23 23:13, Jakub Kicinski wrote:
> On Thu, 5 Jan 2023 22:13:00 +0100 Gerhard Engleder wrote:
>>>> -	if (entry->skb) {
>>>> +	if (entry->skb || entry->xdpf) {
>>>>    		entry->properties = length & TSNEP_DESC_LENGTH_MASK;
>>>>    		entry->properties |= TSNEP_DESC_INTERRUPT_FLAG;
>>>> -		if (skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS)
>>>> +		if (entry->type == TSNEP_TX_TYPE_SKB &&
>>>> +		    skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS)
>>>
>>> Please enclose bitops (& here) hanging around any logical ops (&& here
>>> in their own set of braces ().
>>
>> Will be done.
> 
> Dunno if that's strictly required in the kernel coding style.
> Don't we expect a good understanding of operator precedence
> from people reading the code?

checkpatch accepts both and I found no ruling in coding-style.rst.
I also found both styles in Ethernet drivers. checkpatch often
complained about unnecessary braces in my code, so I assumed less
braces are welcome. This fits to that a good understanding of operator
precedence is expected.

Gerhard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ