[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 10 Oct 2022 11:56:45 +0200
From: Guillaume Nault <gnault@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, robh@...nel.org, johannes@...solutions.net,
ecree.xilinx@...il.com, stephen@...workplumber.org, sdf@...gle.com,
f.fainelli@...il.com, fw@...len.de, linux-doc@...r.kernel.org,
razor@...ckwall.org, nicolas.dichtel@...nd.com,
Bagas Sanjaya <bagasdotme@...il.com>
Subject: Re: [PATCH net-next v2 1/7] docs: add more netlink docs (incl. spec
docs)
On Thu, Sep 29, 2022 at 07:34:12PM -0700, Jakub Kicinski wrote:
> +==============================
> +Netlink spec C code generation
> +==============================
> +
> +This document describes how Netlink specifications are used to render
> +C code (uAPI, policies etc.). It also defines the additional properties
> +allowed in older families by the ``genetlink-c`` protocol level,
> +to control the naming.
> +
> +For brevity this document refers to ``name`` properties of various
> +objects by the object type. For example ``$attr`` is the value
> +of ``name`` in an attribute, and ``$family`` is the name of the
> +family (the global ``name`` property).
> +
> +The upper case is used to denote literal values, e.g. ``$family-CMD``
> +means the concatenation of ``$family``, a dash character, and the literal
> +``CMD``.
> +
> +The names of ``#defines`` and enum values are always converted to upper case,
> +and with dashes (``-``) replaced by underscores (``_``).
> +
> +If the constructured name is a C keyword, an extra underscore is
s/constructured/constructed/
[...]
> +header
> +~~~~~~
> +
> +For C-compatible languages, header which already defines this value.
> +In case the definition is shared by multiple families (e.g. ``IFNAMSIZ``)
> +code generators for C-compabile languages may prefer to add an appropriate
s/C-compabile/C-compatible/
Powered by blists - more mailing lists