Re: [PATCH net-next v11 03/23] ovpn: add basic netlink support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.11.2024 12:05, Antonio Quartulli wrote:
On 09/11/2024 00:15, Sergey Ryazanov wrote:
On 29.10.2024 12:47, Antonio Quartulli wrote:
@@ -37,7 +41,7 @@ static int ovpn_newlink(struct net *src_net, struct net_device *dev,
  }
  static struct rtnl_link_ops ovpn_link_ops = {
-    .kind = "ovpn",
+    .kind = OVPN_FAMILY_NAME,

nit: are you sure that the link kind is the same as the GENL family? I mean, they are both deriviated from the protocol name that is common for both entities, but is it making RTNL kind a derivative of GENL family?

I just want to use the same name everywhere and I thought it doesn't make sense to create a separate define (they can be decoupled later should see any need for that).
But I can add:

#define OVPN_RTNL_LINK_KIND OVPN_FAMILY_NAME

to make this relationship explicit?

Can we just leave it as literal? This string is going to be a part of ABI and there will be no chance to change it in the future. So, what the purpose to define it using a macro if it's self-descriptive?

People also like to define a macro with a generic name like DRV_NAME and use it everywhere. What also looks reasonable.

--
Sergey




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux