From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: Jon Maloy <jmaloy@redhat.com>,
Paul Holzinger <pholzing@redhat.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 2/2] netlink: Fix comments to variables for netlink sockets and sequence
Date: Thu, 21 May 2026 20:01:46 +0200 [thread overview]
Message-ID: <20260521180146.1834333-3-sbrivio@redhat.com> (raw)
In-Reply-To: <20260521180146.1834333-1-sbrivio@redhat.com>
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>
---
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
next prev parent reply other threads:[~2026-05-21 18:01 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 ` Stefano Brivio [this message]
2026-05-22 0:03 ` [PATCH 2/2] netlink: Fix comments to variables for netlink sockets and sequence David Gibson
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=20260521180146.1834333-3-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
--cc=pholzing@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).