public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, Jon Maloy <jmaloy@redhat.com>,
	Paul Holzinger <pholzing@redhat.com>
Subject: Re: [PATCH 2/2] netlink: Fix comments to variables for netlink sockets and sequence
Date: Fri, 22 May 2026 10:03:58 +1000	[thread overview]
Message-ID: <ag-dbq9s1KQc1hzN@zatzit> (raw)
In-Reply-To: <20260521180146.1834333-3-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]

On Thu, May 21, 2026 at 08:01:46PM +0200, Stefano Brivio wrote:
11;rgb:ffff/ffff/ffff> Commit 3c469013cfaa ("netlink: add subscription on changes in NDP/ARP
> table") added the descriptor for the new socket, int nl_sock_neigh,
> next to the variables for the existing sockets, without updating the
> comment, and before the variable reserved for the sequence number.
> 
> That seems to suggest that the sequence number applies to the notifier
> socket as well, but that's not the case. Further, the comment didn't
> match anymore.
> 
> Move the variable declaration for nl_sock_neigh below, and add a
> separate comment for it, actually describing it. While at it, fix the
> indentation.
> 
> Fixes: 3c469013cfaa ("netlink: add subscription on changes in NDP/ARP table")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  netlink.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/netlink.c b/netlink.c
> index 0863734..8d20dbb 100644
> --- a/netlink.c
> +++ b/netlink.c
> @@ -56,10 +56,12 @@
>  #define NLBUFSIZ 65536
>  
>  /* Socket in init, in target namespace, sequence (just needs to be monotonic) */
> -int nl_sock		 = -1;
> -int nl_sock_ns		 = -1;
> -static int nl_sock_neigh = -1;
> -static int nl_seq	 = 1;
> +int nl_sock			= -1;
> +int nl_sock_ns			= -1;
> +static int nl_seq		=  1;
> +
> +/* Socket for neighbour event notifier */
> +static int nl_sock_neigh	= -1;
>  
>  /**
>   * nl_sock_init_do() - Set up netlink sockets in init or target namespace
> -- 
> 2.43.0
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-05-22  0:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 18:01 [PATCH 0/2] Fix equence collision with neighbour notification, and one nit Stefano Brivio
2026-05-21 18:01 ` [PATCH 1/2] netlink: Use regular request/response netlink socket for initial neighbour sync Stefano Brivio
2026-05-22  0:02   ` David Gibson
2026-05-21 18:01 ` [PATCH 2/2] netlink: Fix comments to variables for netlink sockets and sequence Stefano Brivio
2026-05-22  0:03   ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ag-dbq9s1KQc1hzN@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=jmaloy@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=pholzing@redhat.com \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).