Re: Missing generic netlink controller operations

From: Jakub Kicinski
Date: Thu Nov 17 2022 - 23:46:22 EST


On Thu, 17 Nov 2022 08:38:40 -0800 Randy Dunlap wrote:
> [change linux-netdev@ to netdev@]
>
> On 11/16/22 19:54, Collin wrote:
> > While messing around with libnl and netlink I noticed that despite
> > existing in an enum in linux/genetlink.h, the
> > CTRL_CMD_{NEW,DEL,GET}OPS operations (and in fact, all operations
> > except for
> > CTRL_CMD_{NEWFAMILY,DELFAMILY,NEWMCAST_GRP,DELMCAST_GRP}) are
> > unimplemented, and have been around, untouched, since the
> > introduction of the generic netlink family. Is there a reason these
> > exist without implementation, or has it simply not been done?

Only CTRL_CMD_GETMCAST_GRP was never used AFAIU, it was likely added
to maintain the triplet cadence (NEW,DEL,GET); probably cargo cult /
inspired by the classic netlink / rtnl.

Ops used to be more dynamic, and separately registered, I think.
Which found no real life use, so that option was dropped and now
all ops must be statically defined for the family at family
registration time.