From: Jiri Pirko <jiri@resnulli.us>
To: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>
Cc: netdev@vger.kernel.org,
Horatiu Vultur <horatiu.vultur@microchip.com>,
UNGLinuxDriver@microchip.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: lan966x: cleanup lan966x_tc_flower_handler_control_usage()
Date: Tue, 23 Apr 2024 13:21:10 +0200 [thread overview]
Message-ID: <ZieZpixUPfTxIRs4@nanopsycho> (raw)
In-Reply-To: <20240423102720.228728-1-ast@fiberby.net>
Tue, Apr 23, 2024 at 12:27:17PM CEST, ast@fiberby.net wrote:
>Define extack locally, to reduce line lengths and future users.
>
>Rename goto, as the error message is specific to the fragment flags.
2 changes, 2 patches?
>
>Only compile-tested.
>
>Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
>---
> .../net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c
>index d696cf9dbd19..8baec0cd8d95 100644
>--- a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c
>+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c
>@@ -45,6 +45,7 @@ static bool lan966x_tc_is_known_etype(struct vcap_tc_flower_parse_usage *st,
> static int
> lan966x_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
> {
>+ struct netlink_ext_ack *extack = st->fco->common.extack;
> struct flow_match_control match;
> int err = 0;
>
>@@ -59,7 +60,7 @@ lan966x_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
> VCAP_KF_L3_FRAGMENT,
> VCAP_BIT_0);
> if (err)
>- goto out;
>+ goto bad_frag_out;
> }
>
> if (match.mask->flags & FLOW_DIS_FIRST_FRAG) {
>@@ -72,15 +73,15 @@ lan966x_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
> VCAP_KF_L3_FRAG_OFS_GT0,
> VCAP_BIT_1);
> if (err)
>- goto out;
>+ goto bad_frag_out;
> }
>
> st->used_keys |= BIT_ULL(FLOW_DISSECTOR_KEY_CONTROL);
>
> return err;
>
>-out:
>- NL_SET_ERR_MSG_MOD(st->fco->common.extack, "ip_frag parse error");
>+bad_frag_out:
>+ NL_SET_ERR_MSG_MOD(extack, "ip_frag parse error");
> return err;
> }
>
>--
>2.43.0
>
>
next prev parent reply other threads:[~2024-04-23 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 10:27 [PATCH net-next 1/2] net: lan966x: cleanup lan966x_tc_flower_handler_control_usage() Asbjørn Sloth Tønnesen
2024-04-23 10:27 ` [PATCH net-next 2/2] net: lan966x: flower: check for unsupported control flags Asbjørn Sloth Tønnesen
2024-04-23 11:21 ` Jiri Pirko [this message]
2024-04-23 14:00 ` [PATCH net-next 1/2] net: lan966x: cleanup lan966x_tc_flower_handler_control_usage() Simon Horman
2024-04-23 14:58 ` Asbjørn Sloth Tønnesen
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=ZieZpixUPfTxIRs4@nanopsycho \
--to=jiri@resnulli.us \
--cc=UNGLinuxDriver@microchip.com \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.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).