2024-04-24 12:54:49

by Asbjørn Sloth Tønnesen

[permalink] [raw]
Subject: [PATCH net-next v2 0/3] net: lan966x: flower: validate control flags

This series adds flower control flags validation to the
lan966x driver, and changes it from assuming that it handles
all control flags, to instead reject rules if they have
masked any unknown/unsupported control flags.

---
Changelog:

v2:
* Split first patch into 2 (requested by Jiri)
* Added cover letter (requested by Simon)

v1: https://lore.kernel.org/netdev/[email protected]/

Asbjørn Sloth Tønnesen (3):
net: lan966x: flower: add extack to
lan966x_tc_flower_handler_control_usage()
net: lan966x: flower: rename goto in
lan966x_tc_flower_handler_control_usage()
net: lan966x: flower: check for unsupported control flags

.../ethernet/microchip/lan966x/lan966x_tc_flower.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

--
2.43.0



2024-04-24 12:54:55

by Asbjørn Sloth Tønnesen

[permalink] [raw]
Subject: [PATCH net-next v2 1/3] net: lan966x: flower: add extack to lan966x_tc_flower_handler_control_usage()

Define extack locally, to reduce line lengths and aid future users.

Only compile-tested.

Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]>
---
drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c b/drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c
index d696cf9dbd19..a63b83fa2823 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;

@@ -80,7 +81,7 @@ lan966x_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
return err;

out:
- NL_SET_ERR_MSG_MOD(st->fco->common.extack, "ip_frag parse error");
+ NL_SET_ERR_MSG_MOD(extack, "ip_frag parse error");
return err;
}

--
2.43.0


2024-04-24 17:07:48

by Jiri Pirko

[permalink] [raw]
Subject: Re: [PATCH net-next v2 0/3] net: lan966x: flower: validate control flags

Wed, Apr 24, 2024 at 02:53:37PM CEST, [email protected] wrote:
>This series adds flower control flags validation to the
>lan966x driver, and changes it from assuming that it handles
>all control flags, to instead reject rules if they have
>masked any unknown/unsupported control flags.
>
>---
>Changelog:
>
>v2:
>* Split first patch into 2 (requested by Jiri)
>* Added cover letter (requested by Simon)

set-
Reviewed-by: Jiri Pirko <[email protected]>

2024-04-24 19:20:36

by Horatiu Vultur

[permalink] [raw]
Subject: Re: [PATCH net-next v2 0/3] net: lan966x: flower: validate control flags

The 04/24/2024 12:53, Asbjørn Sloth Tønnesen wrote:
>
> This series adds flower control flags validation to the
> lan966x driver, and changes it from assuming that it handles
> all control flags, to instead reject rules if they have
> masked any unknown/unsupported control flags.

For the entire series:
Reviewed-by: Horatiu Vultur <[email protected]>
>
> ---
> Changelog:
>
> v2:
> * Split first patch into 2 (requested by Jiri)
> * Added cover letter (requested by Simon)
>
> v1: https://lore.kernel.org/netdev/[email protected]/
>
> Asbjørn Sloth Tønnesen (3):
> net: lan966x: flower: add extack to
> lan966x_tc_flower_handler_control_usage()
> net: lan966x: flower: rename goto in
> lan966x_tc_flower_handler_control_usage()
> net: lan966x: flower: check for unsupported control flags
>
> .../ethernet/microchip/lan966x/lan966x_tc_flower.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> --
> 2.43.0
>

--
/Horatiu

2024-04-26 02:40:51

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next v2 0/3] net: lan966x: flower: validate control flags

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email protected]>:

On Wed, 24 Apr 2024 12:53:37 +0000 you wrote:
> This series adds flower control flags validation to the
> lan966x driver, and changes it from assuming that it handles
> all control flags, to instead reject rules if they have
> masked any unknown/unsupported control flags.
>
> ---
> Changelog:
>
> [...]

Here is the summary with links:
- [net-next,v2,1/3] net: lan966x: flower: add extack to lan966x_tc_flower_handler_control_usage()
https://git.kernel.org/netdev/net-next/c/505ccf890c21
- [net-next,v2,2/3] net: lan966x: flower: rename goto in lan966x_tc_flower_handler_control_usage()
https://git.kernel.org/netdev/net-next/c/12b8e129c409
- [net-next,v2,3/3] net: lan966x: flower: check for unsupported control flags
https://git.kernel.org/netdev/net-next/c/8c65e27b42fc

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html