On 19/11/2024 03:05, Sergey Ryazanov wrote:
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?
I don't truly have a strong opinion, but the netlink family name is also
expected to not change anytime soon.
Anyway, I see that using the literal is pretty common across all other
drivers, therefore I'll go for it as well.
People also like to define a macro with a generic name like DRV_NAME and
use it everywhere. What also looks reasonable.
Yeah, that's exactly how I am using OVPN_FAMILY_NAME.
Anyway, I am switching to literal.
Regards,
--
Sergey
--
Antonio Quartulli
OpenVPN Inc.