Re: [PATCH net-next v2 3/8] ynl: support directional specs in ynl-gen-c.py

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

 



On Fri, 15 Nov 2024 11:36:41 -0800 Stanislav Fomichev wrote:
> The intent is to generate ethtool uapi headers. For now, some of the
> things are hard-coded:
> - <FAMILY>_MSG_{USER,KERNEL}_MAX
> - the split between USER and KERNEL messages

Maybe toss in a TODO: comment or some such on top of
render_uapi_directional(), to make it clear that the code needs 
more love before it can be reasonably reused.

nit: possibly split into two commits for ease of review

> +    if family.msg_id_model == 'unified':
> +        render_uapi_unified(family, cw, max_by_define, separate_ntf)
> +    elif family.msg_id_model == 'directional':
> +        render_uapi_directional(family, cw, max_by_define)
> +    else:
> +        raise Exception(f'Unsupported enum-model {family.msg_id_model}')

You gotta say "Message enum-model", enum-mode alone sounds like we're
doing something with how enums are processed, rather than message IDs.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux