From: Gerhard Engleder <gerhard@engleder-embedded.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/9] tsnep: Add XDP TX support
Date: Sat, 7 Jan 2023 00:34:38 +0100 [thread overview]
Message-ID: <4f6bccd7-a117-fbae-cd1b-26db1d2a958f@engleder-embedded.com> (raw)
In-Reply-To: <20230106141346.73f7c925@kernel.org>
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
next prev parent reply other threads:[~2023-01-06 23:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 19:41 [PATCH net-next v3 0/9] tsnep: XDP support Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 1/9] tsnep: Use spin_lock_bh for TX Gerhard Engleder
2023-01-05 12:40 ` Alexander Lobakin
2023-01-05 19:48 ` Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 2/9] tsnep: Do not print DMA mapping error Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 3/9] tsnep: Add adapter down state Gerhard Engleder
2023-01-05 12:44 ` Alexander Lobakin
2023-01-05 19:54 ` Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 4/9] tsnep: Add XDP TX support Gerhard Engleder
2023-01-05 13:01 ` Alexander Lobakin
2023-01-05 21:13 ` Gerhard Engleder
2023-01-06 22:13 ` Jakub Kicinski
2023-01-06 23:34 ` Gerhard Engleder [this message]
2023-01-04 19:41 ` [PATCH net-next v3 5/9] tsnep: Substract TSNEP_RX_INLINE_METADATA_SIZE once Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 6/9] tsnep: Support XDP BPF program setup Gerhard Engleder
2023-01-05 17:24 ` Alexander Lobakin
2023-01-05 22:09 ` Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 7/9] tsnep: Prepare RX buffer for XDP support Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 8/9] tsnep: Add RX queue info " Gerhard Engleder
2023-01-05 17:35 ` Alexander Lobakin
2023-01-05 22:28 ` Gerhard Engleder
2023-01-04 19:41 ` [PATCH net-next v3 9/9] tsnep: Add XDP RX support Gerhard Engleder
2023-01-05 17:52 ` Alexander Lobakin
2023-01-05 23:22 ` Gerhard Engleder
2023-01-07 8:46 ` Dan Carpenter
2023-01-07 20:12 ` Gerhard Engleder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f6bccd7-a117-fbae-cd1b-26db1d2a958f@engleder-embedded.com \
--to=gerhard@engleder-embedded.com \
--cc=alexandr.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).