mbox series

[bpf-next,0/2] netkit: two minor cleanups

Message ID 20231026094106.1505892-1-razor@blackwall.org (mailing list archive)
Headers show
Series netkit: two minor cleanups | expand

Message

Nikolay Aleksandrov Oct. 26, 2023, 9:41 a.m. UTC
Hi,
This set does two minor cleanups mentioned by Jiri. The first patch
removes explicit NULLing of primary/peer pointers and relies on the
implicit mem zeroing done at net device alloc. The second patch switches
netkit's mode and primary/peer policy netlink attributes to use
NLA_POLICY_VALIDATE_FN() type and sets the custom validate function to
return better user errors. This way netlink's policy is used to validate
the attributes and simplifies the code a bit. No functional changes are
intended.

Thanks,
 Nik


Nikolay Aleksandrov (2):
  netkit: remove explicit active/peer ptr initialization
  netkit: use netlink policy for mode and policy attributes validation

 drivers/net/netkit.c | 70 ++++++++++++++------------------------------
 1 file changed, 22 insertions(+), 48 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 26, 2023, 2:10 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Thu, 26 Oct 2023 12:41:04 +0300 you wrote:
> Hi,
> This set does two minor cleanups mentioned by Jiri. The first patch
> removes explicit NULLing of primary/peer pointers and relies on the
> implicit mem zeroing done at net device alloc. The second patch switches
> netkit's mode and primary/peer policy netlink attributes to use
> NLA_POLICY_VALIDATE_FN() type and sets the custom validate function to
> return better user errors. This way netlink's policy is used to validate
> the attributes and simplifies the code a bit. No functional changes are
> intended.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/2] netkit: remove explicit active/peer ptr initialization
    https://git.kernel.org/bpf/bpf-next/c/ea41b880cc85
  - [bpf-next,2/2] netkit: use netlink policy for mode and policy attributes validation
    https://git.kernel.org/bpf/bpf-next/c/3de07b963ab8

You are awesome, thank you!