[PATCH mptcp-next] mptcp: use _BITUL() instead of (1 << x)

Matthieu Baerts (NGI0) posted 1 patch 1 day, 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20250916-mptcp-pm-addr-flag-bitul-v1-1-5805a6ddde27@kernel.org
include/uapi/linux/mptcp.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH mptcp-next] mptcp: use _BITUL() instead of (1 << x)
Posted by Matthieu Baerts (NGI0) 1 day, 5 hours ago
Simply to use the proper way to declare bits, and to align with all
other flags declared in this file.

No functional changes intended.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 include/uapi/linux/mptcp.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
index 95d621f6d59810126cbc37b1d6baf896a40dd9bc..15eef878690b8556af21be8d959b6a2c9fe617d3 100644
--- a/include/uapi/linux/mptcp.h
+++ b/include/uapi/linux/mptcp.h
@@ -34,11 +34,11 @@
 #define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0		_BITUL(0)
 #define MPTCP_PM_EV_FLAG_SERVER_SIDE		_BITUL(1)
 
-#define MPTCP_PM_ADDR_FLAG_SIGNAL                      (1 << 0)
-#define MPTCP_PM_ADDR_FLAG_SUBFLOW                     (1 << 1)
-#define MPTCP_PM_ADDR_FLAG_BACKUP                      (1 << 2)
-#define MPTCP_PM_ADDR_FLAG_FULLMESH                    (1 << 3)
-#define MPTCP_PM_ADDR_FLAG_IMPLICIT                    (1 << 4)
+#define MPTCP_PM_ADDR_FLAG_SIGNAL		_BITUL(0)
+#define MPTCP_PM_ADDR_FLAG_SUBFLOW		_BITUL(1)
+#define MPTCP_PM_ADDR_FLAG_BACKUP		_BITUL(2)
+#define MPTCP_PM_ADDR_FLAG_FULLMESH		_BITUL(3)
+#define MPTCP_PM_ADDR_FLAG_IMPLICIT		_BITUL(4)
 
 struct mptcp_info {
 	__u8	mptcpi_subflows;

---
base-commit: 7064ceb50d7f26c7190bfe6d2ff76a3b6afa27c1
change-id: 20250916-mptcp-pm-addr-flag-bitul-da35c20cfa3c

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-next] mptcp: use _BITUL() instead of (1 << x)
Posted by MPTCP CI 1 day, 3 hours ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Unstable: 1 failed test(s): packetdrill_mp_capable 🔴
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/17761240676

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/9353586010dd
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1002844


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Re: [PATCH mptcp-next] mptcp: use _BITUL() instead of (1 << x)
Posted by Geliang Tang 1 day, 4 hours ago
Hi Matt,

Thanks for this patch.

On Tue, 2025-09-16 at 11:04 +0200, Matthieu Baerts (NGI0) wrote:
> Simply to use the proper way to declare bits, and to align with all
> other flags declared in this file.
> 
> No functional changes intended.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

LGTM!

Reviewed-by: Geliang Tang <geliang@kernel.org>

-Geliang

> ---
>  include/uapi/linux/mptcp.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
> index
> 95d621f6d59810126cbc37b1d6baf896a40dd9bc..15eef878690b8556af21be8d959
> b6a2c9fe617d3 100644
> --- a/include/uapi/linux/mptcp.h
> +++ b/include/uapi/linux/mptcp.h
> @@ -34,11 +34,11 @@
>  #define MPTCP_PM_EV_FLAG_DENY_JOIN_ID0		_BITUL(0)
>  #define MPTCP_PM_EV_FLAG_SERVER_SIDE		_BITUL(1)
>  
> -#define MPTCP_PM_ADDR_FLAG_SIGNAL                      (1 << 0)
> -#define MPTCP_PM_ADDR_FLAG_SUBFLOW                     (1 << 1)
> -#define MPTCP_PM_ADDR_FLAG_BACKUP                      (1 << 2)
> -#define MPTCP_PM_ADDR_FLAG_FULLMESH                    (1 << 3)
> -#define MPTCP_PM_ADDR_FLAG_IMPLICIT                    (1 << 4)
> +#define MPTCP_PM_ADDR_FLAG_SIGNAL		_BITUL(0)
> +#define MPTCP_PM_ADDR_FLAG_SUBFLOW		_BITUL(1)
> +#define MPTCP_PM_ADDR_FLAG_BACKUP		_BITUL(2)
> +#define MPTCP_PM_ADDR_FLAG_FULLMESH		_BITUL(3)
> +#define MPTCP_PM_ADDR_FLAG_IMPLICIT		_BITUL(4)
>  
>  struct mptcp_info {
>  	__u8	mptcpi_subflows;
> 
> ---
> base-commit: 7064ceb50d7f26c7190bfe6d2ff76a3b6afa27c1
> change-id: 20250916-mptcp-pm-addr-flag-bitul-da35c20cfa3c
> 
> Best regards,
Re: [PATCH mptcp-next] mptcp: use _BITUL() instead of (1 << x)
Posted by Matthieu Baerts 1 day, 4 hours ago
Hi Geliang,

On 16/09/2025 11:46, Geliang Tang wrote:
> Hi Matt,
> 
> Thanks for this patch.
> 
> On Tue, 2025-09-16 at 11:04 +0200, Matthieu Baerts (NGI0) wrote:
>> Simply to use the proper way to declare bits, and to align with all
>> other flags declared in this file.
>>
>> No functional changes intended.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> 
> LGTM!
> 
> Reviewed-by: Geliang Tang <geliang@kernel.org>

Thank you for the review!

Now in our tree:

New patches for t/upstream:
- 433d828a5f5d: mptcp: use _BITUL() instead of (1 << x)
- Results: 7064ceb50d7f..1b2f5ca10592 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/8a11b0ac082577aced4e944a6ef39399e2efd6b1/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.