mbox series

[net-next,v2,00/14] net: qede: convert filter code to use extack

Message ID 20240508143404.95901-1-ast@fiberby.net (mailing list archive)
Headers show
Series net: qede: convert filter code to use extack | expand

Message

Asbjørn Sloth Tønnesen May 8, 2024, 2:33 p.m. UTC
This series converts the filter code in the qede driver
to use NL_SET_ERR_MSG_*(extack, ...) for error handling.

Patch 1-12 converts qede_parse_flow_attr() to use extack,
along with all it's static helper functions.

qede_parse_flow_attr() is used in two places:
- qede_add_tc_flower_fltr()
- qede_flow_spec_to_rule()

In the latter call site extack is faked in the same way as
is done in mlxsw (patch 12).

While the conversion is going on, some error messages are silenced
in between patch 1-12. If wanted could squash patch 1-12 in a v3, but
I felt that it would be easier to review as 12 more trivial patches.

Patch 13 and 14, finishes up by converting qede_parse_actions(),
and ensures that extack is propagated to it, in both call contexts.

---
Changelog:

v2:
- Reworked to always add extack as last argument. (Requested by Przemek)

v1: https://lore.kernel.org/netdev/20240507104421.1628139-1-ast@fiberby.net/

Asbjørn Sloth Tønnesen (14):
  net: qede: use extack in qede_flow_parse_ports()
  net: qede: use extack in qede_set_v6_tuple_to_profile()
  net: qede: use extack in qede_set_v4_tuple_to_profile()
  net: qede: use extack in qede_flow_parse_v6_common()
  net: qede: use extack in qede_flow_parse_v4_common()
  net: qede: use extack in qede_flow_parse_tcp_v6()
  net: qede: use extack in qede_flow_parse_tcp_v4()
  net: qede: use extack in qede_flow_parse_udp_v6()
  net: qede: use extack in qede_flow_parse_udp_v4()
  net: qede: add extack in qede_add_tc_flower_fltr()
  net: qede: use extack in qede_parse_flow_attr()
  net: qede: use faked extack in qede_flow_spec_to_rule()
  net: qede: propagate extack through qede_flow_spec_validate()
  net: qede: use extack in qede_parse_actions()

 .../net/ethernet/qlogic/qede/qede_filter.c    | 114 ++++++++++--------
 1 file changed, 63 insertions(+), 51 deletions(-)

Comments

Simon Horman May 10, 2024, 11:25 a.m. UTC | #1
On Wed, May 08, 2024 at 02:33:48PM +0000, Asbjørn Sloth Tønnesen wrote:
> This series converts the filter code in the qede driver
> to use NL_SET_ERR_MSG_*(extack, ...) for error handling.
> 
> Patch 1-12 converts qede_parse_flow_attr() to use extack,
> along with all it's static helper functions.
> 
> qede_parse_flow_attr() is used in two places:
> - qede_add_tc_flower_fltr()
> - qede_flow_spec_to_rule()
> 
> In the latter call site extack is faked in the same way as
> is done in mlxsw (patch 12).
> 
> While the conversion is going on, some error messages are silenced
> in between patch 1-12. If wanted could squash patch 1-12 in a v3, but
> I felt that it would be easier to review as 12 more trivial patches.

FWIIW, I like the easy to review approach taken here :)

> Patch 13 and 14, finishes up by converting qede_parse_actions(),
> and ensures that extack is propagated to it, in both call contexts.

...
patchwork-bot+netdevbpf@kernel.org May 11, 2024, 2:40 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  8 May 2024 14:33:48 +0000 you wrote:
> This series converts the filter code in the qede driver
> to use NL_SET_ERR_MSG_*(extack, ...) for error handling.
> 
> Patch 1-12 converts qede_parse_flow_attr() to use extack,
> along with all it's static helper functions.
> 
> qede_parse_flow_attr() is used in two places:
> - qede_add_tc_flower_fltr()
> - qede_flow_spec_to_rule()
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/14] net: qede: use extack in qede_flow_parse_ports()
    https://git.kernel.org/netdev/net-next/c/a7c9540e967b
  - [net-next,v2,02/14] net: qede: use extack in qede_set_v6_tuple_to_profile()
    https://git.kernel.org/netdev/net-next/c/6f88f1257a40
  - [net-next,v2,03/14] net: qede: use extack in qede_set_v4_tuple_to_profile()
    https://git.kernel.org/netdev/net-next/c/f63a9dc507f9
  - [net-next,v2,04/14] net: qede: use extack in qede_flow_parse_v6_common()
    https://git.kernel.org/netdev/net-next/c/a62944d11ae1
  - [net-next,v2,05/14] net: qede: use extack in qede_flow_parse_v4_common()
    https://git.kernel.org/netdev/net-next/c/f2f993835b26
  - [net-next,v2,06/14] net: qede: use extack in qede_flow_parse_tcp_v6()
    https://git.kernel.org/netdev/net-next/c/b1a18d5781d4
  - [net-next,v2,07/14] net: qede: use extack in qede_flow_parse_tcp_v4()
    https://git.kernel.org/netdev/net-next/c/f84d52776ccf
  - [net-next,v2,08/14] net: qede: use extack in qede_flow_parse_udp_v6()
    https://git.kernel.org/netdev/net-next/c/b73ad5c7a72e
  - [net-next,v2,09/14] net: qede: use extack in qede_flow_parse_udp_v4()
    https://git.kernel.org/netdev/net-next/c/9c8f5ed8849c
  - [net-next,v2,10/14] net: qede: add extack in qede_add_tc_flower_fltr()
    https://git.kernel.org/netdev/net-next/c/f833a6555e9e
  - [net-next,v2,11/14] net: qede: use extack in qede_parse_flow_attr()
    https://git.kernel.org/netdev/net-next/c/d6883bceb254
  - [net-next,v2,12/14] net: qede: use faked extack in qede_flow_spec_to_rule()
    https://git.kernel.org/netdev/net-next/c/eb705d734525
  - [net-next,v2,13/14] net: qede: propagate extack through qede_flow_spec_validate()
    https://git.kernel.org/netdev/net-next/c/d2a437efd017
  - [net-next,v2,14/14] net: qede: use extack in qede_parse_actions()
    https://git.kernel.org/netdev/net-next/c/841548793bd6

You are awesome, thank you!