> On 8 Nov 2022, at 21:08, Klemens Nanni <k...@openbsd.org> wrote:
> 
> Now properly.  How about a single comment block at the top instead of
> repeating it for every struct?
> 
> 

You forgot to mark [I] `if_cloners’ within net/if.c.

> diff --git a/sys/net/if_var.h b/sys/net/if_var.h
> index 28514a0bfcd..6272be882f4 100644
> --- a/sys/net/if_var.h
> +++ b/sys/net/if_var.h
> @@ -73,6 +73,18 @@
>  * interfaces.  These routines live in the files if.c and route.c
>  */
> 
> +/*
> + *  Locks used to protect struct members in this file:
> + *   I       immutable after creation
> + *   d       protection left do the driver
> + *   c       only used in ioctl or routing socket contexts (kernel lock)
> + *   K       kernel lock
> + *   N       net lock
> + *
> + *  For SRP related structures that allow lock-free reads, the write lock
> + *  is indicated below.
> + */
> +
> struct rtentry;
> struct ifnet;
> struct task;
> @@ -82,7 +94,7 @@ struct cpumem;
>  * Structure describing a `cloning' interface.
>  */
> struct if_clone {
> -     LIST_ENTRY(if_clone)     ifc_list;      /* on list of cloners */
> +     LIST_ENTRY(if_clone)     ifc_list;      /* [I] on list of cloners */
>       const char              *ifc_name;      /* name of device, e.g. `gif' */
>       size_t                   ifc_namelen;   /* length of name */
> 
> @@ -99,17 +111,6 @@ struct if_clone {
>   .ifc_destroy        = destroy,                                              
> \
> }
> 
> -/*
> - *  Locks used to protect struct members in this file:
> - *   I       immutable after creation
> - *   d       protection left do the driver
> - *   c       only used in ioctl or routing socket contexts (kernel lock)
> - *   K       kernel lock
> - *   N       net lock
> - *
> - *  For SRP related structures that allow lock-free reads, the write lock
> - *  is indicated below.
> - */
> /*
>  * Structure defining a queue for a network interface.
>  *
> 

Reply via email to