From: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
To: Edward Cree <ecree.xilinx@gmail.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Martin Habets <habetsm.xilinx@gmail.com>,
linux-net-drivers@amd.com
Subject: Re: [PATCH net-next] sfc: use flow_rule_no_unsupp_control_flags()
Date: Tue, 16 Apr 2024 14:11:52 +0000 [thread overview]
Message-ID: <ce0a08e2-a74a-4059-97c4-a38cae788a0a@fiberby.net> (raw)
In-Reply-To: <496dba36-1d40-e7d1-1250-a350bc590902@gmail.com>
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@fiberby.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
prev parent reply other threads:[~2024-04-16 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 13:44 Asbjørn Sloth Tønnesen
2024-04-16 13:57 ` Edward Cree
2024-04-16 14:11 ` Asbjørn Sloth Tønnesen [this message]
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=ce0a08e2-a74a-4059-97c4-a38cae788a0a@fiberby.net \
--to=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=habetsm.xilinx@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--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
all inboxes | Powered by JetHome®