From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=PgW/AEE6; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 0B6D65A0619 for ; Fri, 24 Oct 2025 10:15:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761293704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zxOoFnVlVuRn/A3sOKczLcKkGYuuM2f2vb9bzHwK/kE=; b=PgW/AEE6tiO+bKZYDX+yhVjFZsm9tE0J2BNzXOSkfyoCNyX9lPE9L4Dlpq8DziUoRybR4v donFwr6HCWypOHz0vfvVGtdTi7Cow9PEzE9P12zLbg2bNgniogwHL6IN1IdBGLGskGbpAT gpYT83TOCRMea+Gj6/YFy0LTdSqfRtI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-JtHlQJUyObuf3QJhiw2kGw-1; Fri, 24 Oct 2025 04:15:03 -0400 X-MC-Unique: JtHlQJUyObuf3QJhiw2kGw-1 X-Mimecast-MFC-AGG-ID: JtHlQJUyObuf3QJhiw2kGw_1761293702 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3f6b44ab789so637314f8f.3 for ; Fri, 24 Oct 2025 01:15:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761293702; x=1761898502; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zxOoFnVlVuRn/A3sOKczLcKkGYuuM2f2vb9bzHwK/kE=; b=qRviDUosMeqRK8JNIPqkKJXtjyyhIy5XyYOAg5KwHtVlwPSuRvgJGeN93af5fBgfmk 3bv4TSAhof6Qnwax8PhlxeB+SCXc8khY0A3XIu7YuqtXyN9ouUO+Kh+iys1A3Wl1njV/ vhhwTjQtri1bO0pmmVYbrLn/FkAeCgMqqbYDNhvhODbbcvEgEc3pZwaX2cbdJOlY8Udv AlL9pNOKxXfVbvYnPpL1FF/ECAcqyuG4pG9xKdXdI9rWWY2kvHFp6rTqlFqqgDjzVNhJ BYr2lHlSU5gfpHyiVXLbTjLW8W3qqonzk/lt25VkXQPooOInMW3pJ7jUjsVOWKXUcVrV BmzQ== X-Forwarded-Encrypted: i=1; AJvYcCX0uPfz3FmwpjZAt1IYfyWG5+zSt3G7+fDO1YeiWYghtn3484eZTtpwryH8b+uWaeDqWZ/IjglnKss=@passt.top X-Gm-Message-State: AOJu0YyKSHPrD4LPbw8a9JqzXFRCJkLDXvBknHj/F+Gg/pQd9+wkYWG+ m6Sp0o7GJX9Y5kPmUypJ55mmKQXQpRZF26RSdTjgtchxbc0zPGsVU6tsrUM5pvwiCfXNkZn11OU U7t/fHF7UuBJMdi3Ete0zOqwz078K4wy8MEnUN9DvgqnJgNWpUVAX7w== X-Gm-Gg: ASbGnct3RS3EZs2ygx5XWBi/bD57//z9c9t/awRR2iIbmLExChY723nQcxrgmp1pLI2 MmaW3fiD/E3GqeOoaT/ZOkp3CwhOuOL7xX1HLgVlAdjYjQ/UoA9nXcrNiEsQHPtd15XrpduoWjK NEc+xuNJwr/pNmwtVoY/O9Mh/s28e4cdQLRyv27TsolB3oB8P61ggoKOxjTJ8BNQEWOvCMao9Qz M1eFYX8qbetF7t9zH0innUSayVSeb5gLeY5iRHtKYjCfEzZt0fQvrX252zxkplK26N9tty+7f7o RRMVgf0GGv0u3dEesdvwaahh8Q94P+tD1/WJvHyFLiQ4FkPPGqW19YGWrDmVrmpUs4ooq6CmWFj kI0qPYBBLVA== X-Received: by 2002:a05:6000:4387:b0:428:4354:aa36 with SMTP id ffacd0b85a97d-4298a0e913amr3545871f8f.58.1761293701775; Fri, 24 Oct 2025 01:15:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElDQ3ep5q5eXtUUbZg50fv6pmsQWxXaqYG5uUWxclpOCHD/JW4TLmmWx+v9t1YrAFYyXd4xA== X-Received: by 2002:a05:6000:4387:b0:428:4354:aa36 with SMTP id ffacd0b85a97d-4298a0e913amr3545840f8f.58.1761293701165; Fri, 24 Oct 2025 01:15:01 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429898add8bsm7823178f8f.23.2025.10.24.01.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Oct 2025 01:15:00 -0700 (PDT) Date: Fri, 24 Oct 2025 10:14:59 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v15 1/9] netlink: add subscription on changes in NDP/ARP table Message-ID: <20251024101459.77933d42@elisabeth> In-Reply-To: References: <20251024012933.1933642-1-jmaloy@redhat.com> <20251024012933.1933642-2-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 8JeurEYJPOBGae8KBgzkSLFGi1KkCNequtQP-n8C8Xg_1761293702 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: ORAJD5C5NNRKTNX4UVBWGMUOYFFZA3JQ X-Message-ID-Hash: ORAJD5C5NNRKTNX4UVBWGMUOYFFZA3JQ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jon Maloy , dgibson@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 24 Oct 2025 15:03:38 +1100 David Gibson wrote: > On Thu, Oct 23, 2025 at 09:29:25PM -0400, Jon Maloy wrote: > > The solution to bug https://bugs.passt.top/show_bug.cgi?id=120 > > requires the ability to translate from an IP address to its > > corresponding MAC address in cases where those are present in > > the ARP or NDP tables. > > > > To keep track of the contents of these tables we add a netlink > > based neighbour subscription feature. > > > > Signed-off-by: Jon Maloy > > Reviewed-by: David Gibson > > Though one nit > [snip] > > + if (!(ndm->ndm_state & NUD_VALID)) { > > + trace("neighbour notifier: %s unreachable, state: 0x%02x", > > + ip_str, ndm->ndm_state); > > nd_state is a u16, so should that be 0x%04x? My bad :( that was my suggestion. This is a mistake I keep doing over the years, for some reason, with apparently no fix in sight: if I see 16 bits, I think of "two things" and write %02x. I don't have a problem with 128, 64, 32 or 8 bits, just with 16. I'm finally catching this sometimes if I'm writing code, but catching this while reviewing others' code is probably a different challenge. I can fix this up on merge if that's the only thing that needs to be fixed (I didn't start reviewing yet). -- Stefano