mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@openvpn.net>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	sd@queasysnail.net, ryazanov.s.a@gmail.com,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Xiao Liang <shaw.leon@gmail.com>
Subject: Re: [PATCH net-next v15 03/22] ovpn: add basic interface creation/destruction/management routines
Date: Fri, 13 Dec 2024 13:37:55 +0100	[thread overview]
Message-ID: <8db525b6-3384-4e12-b16c-47b0a2898f1e@openvpn.net> (raw)
In-Reply-To: <CAD4GDZyXK6rBH_ccHkYrA4h71bDkKxVy_B5o-bj0ezzdHTJKxQ@mail.gmail.com>

On 13/12/2024 13:32, Donald Hunter wrote:
> On Wed, 11 Dec 2024 at 21:32, Antonio Quartulli <antonio@openvpn.net> wrote:
>>
>>   static int ovpn_newlink(struct net *src_net, struct net_device *dev,
>>                          struct nlattr *tb[], struct nlattr *data[],
>>                          struct netlink_ext_ack *extack)
>>   {
>> -       return -EOPNOTSUPP;
>> +       struct ovpn_priv *ovpn = netdev_priv(dev);
>> +       enum ovpn_mode mode = OVPN_MODE_P2P;
>> +
>> +       if (data && data[IFLA_OVPN_MODE]) {
>> +               mode = nla_get_u8(data[IFLA_OVPN_MODE]);
>> +               netdev_dbg(dev, "setting device mode: %u\n", mode);
>> +       }
>> +
>> +       ovpn->dev = dev;
>> +       ovpn->mode = mode;
>> +
>> +       /* turn carrier explicitly off after registration, this way state is
>> +        * clearly defined
>> +        */
>> +       netif_carrier_off(dev);
>> +
>> +       return register_netdevice(dev);
>>   }
>>
>>   static struct rtnl_link_ops ovpn_link_ops = {
>>          .kind = "ovpn",
>>          .netns_refund = false,
>> +       .priv_size = sizeof(struct ovpn_priv),
>> +       .setup = ovpn_setup,
>> +       .policy = ovpn_policy,
>> +       .maxtype = IFLA_OVPN_MAX,
>>          .newlink = ovpn_newlink,
>>          .dellink = unregister_netdevice_queue,
>>   };
> 
> You need to implement .fill_info to add IFLA_OVPN_MODE into get / dump ops.

Ok, I'll add it in v16.

Thanks a lot.
Regards,


-- 
Antonio Quartulli
OpenVPN Inc.


  reply	other threads:[~2024-12-13 12:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 21:15 [PATCH net-next v15 00/22] Introducing OpenVPN Data Channel Offload Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 01/22] net: introduce OpenVPN Data Channel Offload (ovpn) Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 02/22] ovpn: add basic netlink support Antonio Quartulli
2024-12-13 16:45   ` Donald Hunter
2024-12-13 17:00     ` Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 03/22] ovpn: add basic interface creation/destruction/management routines Antonio Quartulli
2024-12-13 12:32   ` Donald Hunter
2024-12-13 12:37     ` Antonio Quartulli [this message]
2024-12-11 21:15 ` [PATCH net-next v15 04/22] ovpn: keep carrier always on for MP interfaces Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 05/22] ovpn: introduce the ovpn_peer object Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 06/22] ovpn: introduce the ovpn_socket object Antonio Quartulli
2024-12-12 16:19   ` Sabrina Dubroca
2024-12-12 22:46     ` Antonio Quartulli
2024-12-16 11:09       ` Sabrina Dubroca
2024-12-16 11:50         ` Antonio Quartulli
2024-12-17  0:40           ` Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 07/22] ovpn: implement basic TX path (UDP) Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 08/22] ovpn: implement basic RX " Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 09/22] ovpn: implement packet processing Antonio Quartulli
2024-12-16 14:58   ` Sabrina Dubroca
2024-12-11 21:15 ` [PATCH net-next v15 10/22] ovpn: store tunnel and transport statistics Antonio Quartulli
2024-12-16 14:20   ` Sabrina Dubroca
2024-12-11 21:15 ` [PATCH net-next v15 11/22] ovpn: implement TCP transport Antonio Quartulli
2024-12-16 13:59   ` Sabrina Dubroca
2024-12-16 14:09     ` Antonio Quartulli
2024-12-16 14:19       ` Sabrina Dubroca
2024-12-11 21:15 ` [PATCH net-next v15 12/22] ovpn: implement multi-peer support Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 13/22] ovpn: implement peer lookup logic Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 14/22] ovpn: implement keepalive mechanism Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 15/22] ovpn: add support for updating local UDP endpoint Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 16/22] ovpn: add support for peer floating Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 17/22] ovpn: implement peer add/get/dump/delete via netlink Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 18/22] ovpn: implement key add/get/del/swap " Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 19/22] ovpn: kill key and notify userspace in case of IV exhaustion Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 20/22] ovpn: notify userspace when a peer is deleted Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 21/22] ovpn: add basic ethtool support Antonio Quartulli
2024-12-11 21:15 ` [PATCH net-next v15 22/22] testing/selftests: add test tool and scripts for ovpn module 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=8db525b6-3384-4e12-b16c-47b0a2898f1e@openvpn.net \
    --to=antonio@openvpn.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --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=shaw.leon@gmail.com \
    --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

all inboxes | Powered by JetHome®