On Tue, Oct 18, 2022 at 12:21:12PM -0700, Jakub Kicinski wrote:
> On Tue, 18 Oct 2022 15:04:01 +0300 Ido Schimmel wrote:
> > [ MDBE_ATTR_SRC_LIST ] // new
> > [ MDBE_SRC_LIST_ENTRY ]
> > [ MDBE_SRCATTR_ADDRESS ]
> > struct in_addr / struct in6_addr
> > [ ...]
>
> nit: I found that the MDBE_ATTR_SRC_LIST level of wrapping corresponds
> to how "sane" formats work, but in practice there is no need for it in
> netlink. You can put the entry nests directly in the outer. Saves one
> layer of parsing. Just thought I'd mention it, you can keep as is if
> you prefer.
I guess you mean:
[ MDBA_SET_ENTRY_ATTRS ]
[ MDBE_SRC_LIST_ENTRY ]
[ MDBE_SRCATTR_ADDRESS ]
struct in_addr / struct in6_addr
[ MDBE_SRC_LIST_ENTRY ]
[ ... ]
It is a good suggestion, but I wanted to make the request format similar
to the existing response / notification format that already has this
level of wrapping. See example in the commit message of patch #17:
https://lore.kernel.org/netdev/[email protected]/