netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: Antonio Quartulli <antonio@openvpn.net>
Cc: Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,  sd@queasysnail.net,
	ryazanov.s.a@gmail.com
Subject: Re: [PATCH net-next v8 03/24] ovpn: add basic netlink support
Date: Fri, 4 Oct 2024 17:13:40 +0100	[thread overview]
Message-ID: <CAD4GDZyZruh+gbA+=Wu_2aSOnaF8R6eDRU0=EE0qnWe-bTi2-Q@mail.gmail.com> (raw)
In-Reply-To: <20241002-b4-ovpn-v8-3-37ceffcffbde@openvpn.net>

On Wed, 2 Oct 2024 at 10:03, Antonio Quartulli <antonio@openvpn.net> wrote:
>
> +definitions:
> +  -
> +    type: const
> +    name: nonce-tail-size
> +    value: 8
> +  -
> +    type: enum
> +    name: cipher-alg
> +    value-start: 0

value-start defaults to 0 for enum so this is unnecessary. Same for
the following enum definitions.

> +    entries: [ none, aes-gcm, chacha20-poly1305 ]
> +  -
> +    type: enum
> +    name: del-peer-reason
> +    value-start: 0
> +    entries: [ teardown, userspace, expired, transport-error, transport-disconnect ]
> +  -
> +    type: enum
> +    name: key-slot
> +    value-start: 0
> +    entries: [ primary, secondary ]
> +  -
> +    type: enum
> +    name: mode
> +    value-start: 0
> +    entries: [ p2p, mp ]
> +

[...]

> +operations:
> +  list:
> +    -
> +      name: dev-new
> +      attribute-set: ovpn
> +      flags: [ admin-perm ]
> +      doc: Create a new interface of type ovpn
> +      do:
> +        request:
> +          attributes:
> +            - ifname
> +            - mode
> +        reply:
> +          attributes:
> +            - ifname
> +            - ifindex
> +    -
> +      name: dev-del
> +      attribute-set: ovpn
> +      flags: [ admin-perm ]
> +      doc: Delete existing interface of type ovpn
> +      do:
> +        pre: ovpn-nl-pre-doit
> +        post: ovpn-nl-post-doit
> +        request:
> +          attributes:
> +            - ifindex

There's no dev-get do/dump op. I think there should be one for
diagnostics and metrics.

> +    -
> +      name: key-new
> +      attribute-set: ovpn
> +      flags: [ admin-perm ]
> +      doc: Add a cipher key for a specific peer
> +      do:
> +        pre: ovpn-nl-pre-doit
> +        post: ovpn-nl-post-doit
> +        request:
> +          attributes:
> +            - ifindex
> +            - keyconf
> +    -
> +      name: key-swap
> +      attribute-set: ovpn
> +      flags: [ admin-perm ]
> +      doc: Swap primary and secondary session keys for a specific peer
> +      do:
> +        pre: ovpn-nl-pre-doit
> +        post: ovpn-nl-post-doit
> +        request:
> +          attributes:
> +            - ifindex
> +            - keyconf
> +    -
> +      name: key-swap-ntf
> +      notify: key-new

This doesn't work because key-new doesn't have a reply. You should
define it with an event: block instead. You can see the build errors
here:

make -C tools/net/ynl

CC ovpn-user.o
In file included from ovpn-user.c:8:
ovpn-user.h:1194:33: error: field ‘obj’ has incomplete type
 1194 |         struct ovpn_key_new_rsp obj __attribute__((aligned(8)));
      |                                 ^~~
ovpn-user.c:835:35: error: ‘ovpn_key_new_rsp_parse’ undeclared here
(not in a function); did you mean ‘ovpn_dev_new_rsp_parse’?
  835 |                 .cb             = ovpn_key_new_rsp_parse,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                   ovpn_dev_new_rsp_parse
make[1]: *** [Makefile:41: ovpn-user.o] Error 1

> +      doc: |
> +        Notification about key having exhausted its IV space and requiring
> +        renegotiation
> +      mcgrp: peers
> +    -
> +      name: key-del
> +      attribute-set: ovpn
> +      flags: [ admin-perm ]
> +      doc: Delete cipher key for a specific peer
> +      do:
> +        pre: ovpn-nl-pre-doit
> +        post: ovpn-nl-post-doit
> +        request:
> +          attributes:
> +            - ifindex
> +            - keyconf
> +
> +mcast-groups:
> +  list:
> +    -
> +      name: peers

  parent reply	other threads:[~2024-10-04 16:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02  9:02 [PATCH net-next v8 00/24] Introducing OpenVPN Data Channel Offload Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 01/24] netlink: add NLA_POLICY_MAX_LEN macro Antonio Quartulli
2024-10-04 12:58   ` Donald Hunter
2024-10-04 13:38     ` Jakub Kicinski
2024-10-04 14:41       ` Donald Hunter
2024-10-07 10:04       ` Antonio Quartulli
2024-10-07 15:53         ` Jakub Kicinski
2024-10-08  7:51           ` Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 02/24] net: introduce OpenVPN Data Channel Offload (ovpn) Antonio Quartulli
2024-10-02 11:08   ` kernel test robot
2024-10-02  9:02 ` [PATCH net-next v8 03/24] ovpn: add basic netlink support Antonio Quartulli
2024-10-02 14:13   ` kernel test robot
2024-10-04 16:13   ` Donald Hunter [this message]
2024-10-07 10:57     ` Antonio Quartulli
2024-10-07 15:32   ` Jiri Pirko
2024-10-08  8:01     ` Antonio Quartulli
2024-10-08  8:58       ` Jiri Pirko
2024-10-08  9:16         ` Antonio Quartulli
2024-10-08 12:52           ` Jiri Pirko
2024-10-08 13:21             ` Antonio Quartulli
2024-11-01  0:17             ` Sergey Ryazanov
2024-10-02  9:02 ` [PATCH net-next v8 04/24] ovpn: add basic interface creation/destruction/management routines Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 05/24] ovpn: implement interface creation/destruction via netlink Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 06/24] ovpn: keep carrier always on Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 07/24] ovpn: introduce the ovpn_peer object Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 08/24] ovpn: introduce the ovpn_socket object Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 09/24] ovpn: implement basic TX path (UDP) Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 10/24] ovpn: implement basic RX " Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 11/24] ovpn: implement packet processing Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 12/24] ovpn: store tunnel and transport statistics Antonio Quartulli
2024-10-03  9:20   ` kernel test robot
2024-10-02  9:02 ` [PATCH net-next v8 13/24] ovpn: implement TCP transport Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 14/24] ovpn: implement multi-peer support Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 15/24] ovpn: implement peer lookup logic Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 16/24] ovpn: implement keepalive mechanism Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 17/24] ovpn: add support for updating local UDP endpoint Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 18/24] ovpn: add support for peer floating Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 19/24] ovpn: implement peer add/dump/delete via netlink Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 20/24] ovpn: implement key add/del/swap " Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 21/24] ovpn: kill key and notify userspace in case of IV exhaustion Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 22/24] ovpn: notify userspace when a peer is deleted Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 23/24] ovpn: add basic ethtool support Antonio Quartulli
2024-10-02  9:02 ` [PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module Antonio Quartulli
2024-10-02 22:35   ` Shuah Khan
2024-10-04  9:50     ` Antonio Quartulli

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='CAD4GDZyZruh+gbA+=Wu_2aSOnaF8R6eDRU0=EE0qnWe-bTi2-Q@mail.gmail.com' \
    --to=donald.hunter@gmail.com \
    --cc=antonio@openvpn.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=sd@queasysnail.net \
    --cc=shuah@kernel.org \
    /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).