From nobody Tue Dec 10 18:13:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y76KS4yWZz5gRh3; Tue, 10 Dec 2024 18:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y76KS44hLz458c; Tue, 10 Dec 2024 18:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733854380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JY4lo/STjC2Co0kx0HMD7orlpEvrxas6KPgfnZuLUU=; b=BTmtjdongcXefTgonmwCmBEw25A/Fh3+KSRowD2+LQZcG1s2XCqx186HMebQCMBlmLE5ZG iN2L5/1Z1a0fkOSuKa81BqUW10SjtEI9FjYhMoDndMrQSyzRfwj6tv5dYCHQv9aqgHX09B 904OQTlyOgTou+yYYgNNYha5wS9VOhjsueo1cgWq6kRfKUQz03G7eoeonWhrDZskO0YrkG RbgDRT8AFIKegpPnYx7Co946rmk84zTVQidCoLxrj6BviM+HZCJCtd7BpxrwKZbw2qNt0O BCooEFEdLC/ukpJqbnlVeuDY9BU3zYbTwyhXmtarzGIjLB6dKoGvR/YWlGXShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733854380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+JY4lo/STjC2Co0kx0HMD7orlpEvrxas6KPgfnZuLUU=; b=ct6RkcmtZOdPn9FrEuU7tfsGWNQ1In3bY6AhD+bWKmI5m3MvCw/YzqxFGdgmUUx6JfHuCZ QN808iZ5nw6SoJoRo9P72TQAHZUg2yHq/RCx3oqITsrZELqraqvPBTAnW/ik4TOcqr+Hzl CSKSjbXwPzEcikvev/3/wxtYaSssyrz+F1FKq9hF2c4m/Qr8rKswOj0kWGlI2XAu8NREHa 9RDHlrtRAKMHUjk+/8uk9TqDIaOTLvhdWjE9Wj0AxGi1ECET98rcvRMsjAyuM0N/8Hatpt cA+d19g8zbTkm8ENKEacvlIXNgY2PLJO2yLDF0ZkEjIIIFsH15DE1ZGayFwNDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733854380; a=rsa-sha256; cv=none; b=vDA9x+vXaHaxFIFelDgxOJ02ls9v2n74JHDfnXYAX5tkcWQ7Gsb5OCOo3jcGKACJQLlZ+t 5rvOvCYWjrzFq8vaEvB0HTUM22bcvT7HA7VJ6WHfAZ948ij4fK6Cl2scmPv6x3u+gox9ob mXEqby+eYFnjZZG3TchzTbYPYJoXCwTkDc/O7VUsEwrNag/8BsRW/1+vyg+mIqrSdW6zQ4 mHkbGQm7YSHDKfFYSyAmWK3Vmf3m+P1FaG68ommWYsQGc1uK/3qYYhc/DSccd4/3IL6aS0 lHDedGJuf0oVZgmDDcUGqTWrUVgMSgTP+tFRkTgTm03v7gBo/AEFBYbAnZjRLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y76KS3hHczYdh; Tue, 10 Dec 2024 18:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BAID0Q5022745; Tue, 10 Dec 2024 18:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BAID0Xo022742; Tue, 10 Dec 2024 18:13:00 GMT (envelope-from git) Date: Tue, 10 Dec 2024 18:13:00 GMT Message-Id: <202412101813.4BAID0Xo022742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: 9df901c8f8c8 - main - netlink: Pop NLMSG_ALIGNTO and NLMSG_ALIGN out of the #ifndef _KERNEL block List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9df901c8f8c8f6a0766d87fbc6ef3dc1b73423f8 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=9df901c8f8c8f6a0766d87fbc6ef3dc1b73423f8 commit 9df901c8f8c8f6a0766d87fbc6ef3dc1b73423f8 Author: Gleb Popov AuthorDate: 2024-10-31 16:23:23 +0000 Commit: Gleb Popov CommitDate: 2024-12-10 18:12:09 +0000 netlink: Pop NLMSG_ALIGNTO and NLMSG_ALIGN out of the #ifndef _KERNEL block Sponsored by: Future Crew, LLC Approved by: melifaro Differential Revision: https://reviews.freebsd.org/D47333 --- sys/netlink/netlink.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netlink/netlink.h b/sys/netlink/netlink.h index e677365b9a21..a87363197187 100644 --- a/sys/netlink/netlink.h +++ b/sys/netlink/netlink.h @@ -205,11 +205,12 @@ enum nlmsginfo_attrs { #define NL_ITEM_ITER(_ptr, _len, _LEN_MACRO) \ ((_len) -= _LEN_MACRO(_ptr), NL_ITEM_NEXT(_ptr, _LEN_MACRO)) - -#ifndef _KERNEL /* part of netlink(3) API */ #define NLMSG_ALIGNTO NL_ITEM_ALIGN_SIZE #define NLMSG_ALIGN(_len) NL_ITEM_ALIGN(_len) + +#ifndef _KERNEL +/* part of netlink(3) API */ #define NLMSG_HDRLEN (sizeof(struct nlmsghdr)) #define NLMSG_LENGTH(_len) ((_len) + NLMSG_HDRLEN) #define NLMSG_SPACE(_len) NLMSG_ALIGN(NLMSG_LENGTH(_len)) @@ -221,8 +222,6 @@ enum nlmsginfo_attrs { #define NLMSG_NEXT(_hdr, _len) NL_ITEM_ITER(_hdr, _len, _NLMSG_ALIGNED_LEN) #else -#define NLMSG_ALIGNTO 4U -#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1)) #define NLMSG_HDRLEN (NLMSG_ALIGN(sizeof(struct nlmsghdr))) #endif