From nobody Fri Nov 21 08:02:07 2025 X-Original-To: dev-commits-src-main@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 4dCSNw0rpKz6Gn96 for ; Fri, 21 Nov 2025 08:02:08 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dCSNv6rZ1z3wcw for ; Fri, 21 Nov 2025 08:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763712128; 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; bh=oHRL36SWCJ6SWc1rJIYnddz0V5dVJi2/NoPpCgU0sMk=; b=T8ckUtb1gFD7QUFR/3AUVW+O4gJOZjN9+8Yp+Y9PqpW6pYLfP2OMdjtTAdGQjP0FN7E6R5 t8Ggpl3B4M2M1b9pB3tDZkryJleD/ZowLw1JaJizKt1hvU0ySh8PVTGRM28ez6GOy8cDmn LDFc90faaXXIUPU6WKvUTUoHzCGqom+qVYzRZ7lL+LoRzaUw5g0csRctmB4OY+u6YSk9zy WSyr4bt6MOOsKFEesXEtcbfqHfMaINIEAgsKaGMKP6euKn5bPooFcGjLZUaY76U1HzlAPd urJnkMRLEJJODsjq/x1b9Go3TYLxn7repUY96PPq6/Ihki6G1Bkx4x+vjSsZDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763712128; 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; bh=oHRL36SWCJ6SWc1rJIYnddz0V5dVJi2/NoPpCgU0sMk=; b=ZT55pI/JVlxMZza0l6sTL4wqLbDlyo16HePGwuD8Mrc/JqGs3To3CtLGV+0UUZ2TsRZO4T g563Q5gAcGTdBYZX6hDpVyK05HYs1if7fl4gOWEOJEuD+Wz1zpl4qRlpnecYYs8i+J+3N+ 40WvxNrIngY6eeu5AXV1VpPhBkP9npRZtNxCC+aMigJCWiu4vmhc5CqcCO/f4zX/6XIfUC bWlZPnAiZKnRnMT7yz5ILF8vO00n4vejsGKeP54N9ny7gU1V+GgGTS6NK2nwkYf3Kd2WbP lXtq57PmPyEZT2sPEyfZvYTheVJei7S3Uh/8iJwIjXByj1V5OnPH6pqB8156Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763712128; a=rsa-sha256; cv=none; b=ecAoPL0CsP5ti1Nxl4oXZEGk79WxQG35iTARD61/SM4Z+tsPTRQvvU6p1iqeD7wsWvyaPl 1gzdTs85zeiF75jw0RcJFFuqSP/RAEayVr4gc19V4EvRZBOE2jru3pLjc3sn/BhfELhPGP G0nMK2083tm9DbzoWrHrI9o81/WXVLxQb29ZwJ4Hq/NYn+Y5z/0vo1rWfnDlir5qsYW/UO U+gFuhO3dR52yY87TgPglhR6fiL6lFwQjzyPUzOwi44ZvMeM0VNzY5nIit4bh5DTPU6TYm MPWlyzZC5YFgsrSZ4VRYDqNK/3YA1pcGc84Y31/4xtEZSsz1QKsaYeVvc1N9OA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dCSNv69dFz13tx for ; Fri, 21 Nov 2025 08:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2de95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 21 Nov 2025 08:02:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Seyed Pouria Mousavizadeh Tehrani From: Michael Tuexen Subject: git: f2582653a429 - main - ip: use standard C types for ECN helper functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2582653a429a7c8d55b023c6f5a006f5d51ea34 Auto-Submitted: auto-generated Date: Fri, 21 Nov 2025 08:02:07 +0000 Message-Id: <69201c7f.2de95.45a0c9c6@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f2582653a429a7c8d55b023c6f5a006f5d51ea34 commit f2582653a429a7c8d55b023c6f5a006f5d51ea34 Author: Seyed Pouria Mousavizadeh Tehrani AuthorDate: 2025-11-21 07:58:12 +0000 Commit: Michael Tuexen CommitDate: 2025-11-21 07:58:12 +0000 ip: use standard C types for ECN helper functions No functional change intended, suggested by glebius. Reviewed by: rscheff, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D53739 --- sys/netinet/ip_ecn.c | 16 ++++++++-------- sys/netinet/ip_ecn.h | 4 ++-- sys/netinet6/ip6_ecn.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/netinet/ip_ecn.c b/sys/netinet/ip_ecn.c index 30d2c95ddbd7..2f700c43bbfa 100644 --- a/sys/netinet/ip_ecn.c +++ b/sys/netinet/ip_ecn.c @@ -92,7 +92,7 @@ * modify outer ECN (TOS) field on ingress operation (tunnel encapsulation). */ void -ip_ecn_ingress(int mode, u_int8_t *outer, const u_int8_t *inner) +ip_ecn_ingress(int mode, uint8_t *outer, const uint8_t *inner) { if (!outer || !inner) @@ -124,7 +124,7 @@ ip_ecn_ingress(int mode, u_int8_t *outer, const u_int8_t *inner) * the caller should drop the packet if the return value is 0. */ int -ip_ecn_egress(int mode, const u_int8_t *outer, u_int8_t *inner) +ip_ecn_egress(int mode, const uint8_t *outer, uint8_t *inner) { if (!outer || !inner) @@ -158,9 +158,9 @@ ip_ecn_egress(int mode, const u_int8_t *outer, u_int8_t *inner) #ifdef INET6 void -ip6_ecn_ingress(int mode, u_int32_t *outer, const u_int32_t *inner) +ip6_ecn_ingress(int mode, uint32_t *outer, const uint32_t *inner) { - u_int8_t outer8, inner8; + uint8_t outer8, inner8; if (!outer || !inner) panic("NULL pointer passed to ip6_ecn_ingress"); @@ -168,13 +168,13 @@ ip6_ecn_ingress(int mode, u_int32_t *outer, const u_int32_t *inner) inner8 = (ntohl(*inner) >> 20) & 0xff; ip_ecn_ingress(mode, &outer8, &inner8); *outer &= ~htonl(0xff << 20); - *outer |= htonl((u_int32_t)outer8 << 20); + *outer |= htonl((uint32_t)outer8 << 20); } int -ip6_ecn_egress(int mode, const u_int32_t *outer, u_int32_t *inner) +ip6_ecn_egress(int mode, const uint32_t *outer, uint32_t *inner) { - u_int8_t outer8, inner8, oinner8; + uint8_t outer8, inner8, oinner8; if (!outer || !inner) panic("NULL pointer passed to ip6_ecn_egress"); @@ -185,7 +185,7 @@ ip6_ecn_egress(int mode, const u_int32_t *outer, u_int32_t *inner) return (0); if (inner8 != oinner8) { *inner &= ~htonl(0xff << 20); - *inner |= htonl((u_int32_t)inner8 << 20); + *inner |= htonl((uint32_t)inner8 << 20); } return (1); } diff --git a/sys/netinet/ip_ecn.h b/sys/netinet/ip_ecn.h index 7390d812606f..6632418fc9ca 100644 --- a/sys/netinet/ip_ecn.h +++ b/sys/netinet/ip_ecn.h @@ -44,7 +44,7 @@ #define ECN_NOCARE (-1) /* no consideration to ECN */ #ifdef _KERNEL -extern void ip_ecn_ingress(int, u_int8_t *, const u_int8_t *); -extern int ip_ecn_egress(int, const u_int8_t *, u_int8_t *); +extern void ip_ecn_ingress(int, uint8_t *, const uint8_t *); +extern int ip_ecn_egress(int, const uint8_t *, uint8_t *); #endif #endif diff --git a/sys/netinet6/ip6_ecn.h b/sys/netinet6/ip6_ecn.h index 45a28e9f419a..169e027dc265 100644 --- a/sys/netinet6/ip6_ecn.h +++ b/sys/netinet6/ip6_ecn.h @@ -37,6 +37,6 @@ */ #ifdef _KERNEL -extern void ip6_ecn_ingress(int, u_int32_t *, const u_int32_t *); -extern int ip6_ecn_egress(int, const u_int32_t *, u_int32_t *); +extern void ip6_ecn_ingress(int, uint32_t *, const uint32_t *); +extern int ip6_ecn_egress(int, const uint32_t *, uint32_t *); #endif