Skip to content

Rebase#165

Open
AravindanNC wants to merge 155 commits intotopic/NM_dnsmasqfrom
develop
Open

Rebase#165
AravindanNC wants to merge 155 commits intotopic/NM_dnsmasqfrom
develop

Conversation

@AravindanNC
Copy link
Copy Markdown
Contributor

No description provided.

maniselva006c and others added 28 commits June 17, 2025 11:59
* RDKE-850: Include ethtool and libmnl

Reason for the change: Include  ethtool and libmnl needed for BCM devices into oss release

* Update package_revisions_oss.inc

* Update package_revisions_oss.inc

* Update package_revisions_oss.inc
Reason for the change: Fix the srcrev variable override

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Co-authored-by: mselva006c <mani_selvaraj@comcast.com>
* Add files via upload

* Update systemd_230.bbappend

* Update add_info_ntp_analytics.patch

* Update add_info_ntp_analytics.patch

* Add files via upload

* Update systemd_230.bbappend

* Add files via upload

* Add files via upload

* Add files via upload

* Update networkmanager_1.43.7.bb

* Update networkmanager_1.43.7.bb

* Add files via upload

* Update systemd_230.bbappend

* Delete recipes-core/systemd/files/add_info_ntp_analytics.patch

* Delete recipes-core/systemd/files/ntp_client_info.patch

* Update package_revisions_oss.inc

* Delete recipes-core/systemd/files/0001-Added-Extra-information-fro-NTP-Status.patch

* Update 0002-enable-more-ntp-info-logs.patch

---------

Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
* RDKE-855: Include wayland-default-egl

Reason for the change: The libwayland-egl.so has been removed from the Wayland module in OSS, with the assumption that the SoC vendor will provide an equivalent library as part of their platform-specific implementation.  the virtual/egl vendor module bundles libwayland-egl.so, effectively resolving dependencies for other layer modules that rely on libwayland-egl.so.

However, it has been found that some SoC platforms still rely on the libwayland-egl.so library being provided by the Wayland module. Including this library back into the Wayland module would break the build for other SoC platforms that have already providing this lib.

To address this issue, The wayland-default-egl recipe added to the OSS layer, will now provide the default libwayland-egl.so library which can be used on demand, until all platforms have transitioned to the new OSS consumption method, which supports platform specific OSS custamization.

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>

* Update wayland-default-egl_1.20.0.bb

---------

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Co-authored-by: mselva006c <mani_selvaraj@comcast.com>
… partition (#141)

Reason for change : Move Wifi User credentials to secure partition
Reason for the change: Add missing iptable packages required for rdk platform
Reason for change: Bring in wipefs and blkdiscard as they are required for few platforms while performing factory reset.
Also update "util-linux-" to ${PN} to support the MLPREFIX as well.

Signed-off-by: Arjun <arjun_daasuramdass@comcast.com>
Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
Reason for change: Update the util-linux package revision
Reason for change: Update the util-linux package revision
Reason for change: Bring in wipefs and blkdiscard as they are required for few platforms while performing factory reset.
Also update "util-linux-" to ${PN} to support the MLPREFIX as well.

Signed-off-by: Arjun <arjun_daasuramdass@comcast.com>
Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
Reason for the change: Add missing iptable packages required for rdk platform
Reason for change: Update the util-linux package revision
Reason for change: Update the util-linux package revision
Reason for change: Update packagegroup revision to reflect new version

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Reason for change: Update change log for 4.7.1 release

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Reason for change:
Detect FULL internet connectivity.
Notify other system components through D-Bus.
Log a milestone event.
Start network-up.target to Trigger time synchronization via NTP (systemd-timesyncd).
Disable connectivity check after first FULL to conserve system resources.
Reason for change: MW component depends on drm which is provided by libdrm (vendor arch). MW is building libdrm as it is not able to resolve dependency for drm in ipk consumption model.

Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
* RDKOSS-420: Use tune profile to determine OSS package arch

Reason for change: Configure OSS package arch using tune profile instead of machine name

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>

* RDKOSS-420: Support for REL_OSS_LAYER_ARCH and OSS_LAYER_ARCH

---------

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Co-authored-by: mselva006c <mani_selvaraj@comcast.com>
@AravindanNC AravindanNC requested review from a team August 6, 2025 14:16
Copilot AI review requested due to automatic review settings April 2, 2026 18:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 233 out of 332 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (2)

recipes-kernel/linux-libc-headers/files_516/0001-idle_metrics_v2.patch:1

  • This patch adds non-upstream PRCTL constants and large custom structs directly into include/uapi/linux/prctl.h. In particular, hardcoding NUM_CPUS 4 in a UAPI header is not ABI-safe across targets and will break consumers on systems with different CPU counts. Consider moving these definitions into a separate UAPI header, using a flexible array/size field instead of a fixed CPU count, and ensuring PR_* numbers do not collide with upstream allocations.
--- a/include/uapi/linux/prctl.h	2025-12-16 15:50:41.761927991 +0000

recipes-connectivity/socat/files/socat_restrict_localhost.patch:1

  • IPv6 loopback literals are typically passed as ::1 (without brackets); using \"[::1]\" will likely reject valid loopback usage. Also, calling exit(1) inside an address-resolution helper is a hard process abort that bypasses normal error propagation. Accept ::1 (and optionally localhost if desired) and return an error through the existing error-handling path instead of printing and exiting.
Date: Apr 27 16:25:26 2018

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +8
set -o pipefail

cd tests || exit 1

# Quick functional tests only - skip long-running stress tests

Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipefail is not POSIX and will fail under common /bin/sh implementations (e.g., dash). Either switch the shebang to /bin/bash (and ensure bash is in RDEPENDS) or remove/replace the pipefail usage.

Suggested change
set -o pipefail
cd tests || exit 1
# Quick functional tests only - skip long-running stress tests
cd tests || exit 1
# Quick functional tests only - skip long-running stress tests
# Quick functional tests only - skip long-running stress tests

Copilot uses AI. Check for mistakes.
skip_count=0

# Find all .sh scripts and executable binaries (using -perm -u+x for portability)
for test_script in $(find . -type f \( -name "*.sh" -o -perm -u+x \) | sort); do
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional on line 22 is invalid ([ ! -name \"*.sh\" ] is not a valid test expression), and the runner invokes every test via bash, which will break ELF binaries picked up by -perm -u+x. Update the logic to (1) correctly detect .sh scripts vs binaries and (2) execute binaries directly instead of forcing bash.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +15
for t in config control midi_event client_event_filter namehint
do
if ./$t > "alsa-lib_$t.log" 2>&1
then
echo "PASS: $t"
else
echo "FAIL: $t"
cat "alsa-lib_$t.log"
fi
rm "alsa-lib_$t.log"
done
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script prints FAIL but never returns a non-zero exit status when a test fails, so ptest will report success even with failures. Track a failure flag/counter and exit 1 if any test fails.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +11
PASS_COUNT=0
FAIL_COUNT=0
SKIP_COUNT=0
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAIL_COUNT is never incremented, so the summary will always report 0 failures even for genuine failures. Either increment FAIL_COUNT for mismatches (and optionally only SKIP for known/expected missing-feature cases), or remove FAIL_COUNT entirely to avoid misleading output. Also consider exiting non-zero when failures occur so ptest can fail correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +77
if [ "$rc_got" = "$rc_spec" ]; then
echo "PASS: $test_name"
PASS_COUNT=$((PASS_COUNT + 1))
else
# Treat as SKIP - likely missing kernel modules (ip6_tables, nat, mangle, etc.)
echo "SKIP: $test_name (expected $rc_spec got $rc_got)"
SKIP_COUNT=$((SKIP_COUNT + 1))
fi
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAIL_COUNT is never incremented, so the summary will always report 0 failures even for genuine failures. Either increment FAIL_COUNT for mismatches (and optionally only SKIP for known/expected missing-feature cases), or remove FAIL_COUNT entirely to avoid misleading output. Also consider exiting non-zero when failures occur so ptest can fail correctly.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.15)

project(wayland-egl VERSION 1.18.0 DESCRIPTION "Frontend wayland-egl library")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The declared project version (1.18.0), the shared library VERSION (1.0.0), and the pkg-config version (18.1.0) are inconsistent. Align these values or derive them from a single source of truth to avoid producing mismatched artifacts (.so metadata vs pkg-config version).

Copilot uses AI. Check for mistakes.
add_library(${PROJECT_NAME} SHARED wayland-egl.c)

set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION 1.0.0 SOVERSION 1)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The declared project version (1.18.0), the shared library VERSION (1.0.0), and the pkg-config version (18.1.0) are inconsistent. Align these values or derive them from a single source of truth to avoid producing mismatched artifacts (.so metadata vs pkg-config version).

Suggested change
VERSION 1.0.0 SOVERSION 1)
VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 16, 2026 14:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 233 out of 332 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.15)

project(wayland-egl VERSION 1.18.0 DESCRIPTION "Frontend wayland-egl library")
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hardcodes prefix/libdir/include paths (and forces lib even on multilib systems like lib64), which can install pkg-config metadata and libraries into the wrong locations. Use CMake/GNUInstallDirs variables (CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_INCLUDEDIR) and generate the .pc file from those values to respect the Yocto toolchain configuration.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
#!/bin/sh

set -o pipefail
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set -o pipefail is not POSIX and will fail under many /bin/sh implementations (e.g., BusyBox ash), causing the ptest to abort immediately. Either switch the shebang to /bin/bash (and ensure bash is in RDEPENDS) or remove pipefail and handle pipeline errors explicitly.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +4
workdir=$(dirname `realpath $0`)
cd ${workdir}/testing
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script has unquoted expansions and legacy backticks, which can break if the path contains whitespace or special characters. Use $(...) and quote $0, $workdir, and the cd target to make the runner robust.

Suggested change
workdir=$(dirname `realpath $0`)
cd ${workdir}/testing
workdir=$(dirname "$(realpath "$0")")
cd "${workdir}/testing"

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +75
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch introduces new prctl() numbers, hardcodes NUM_CPUS, and adds typedefs/structs directly into a UAPI header (include/uapi/linux/prctl.h). UAPI headers are part of the stable ABI surface: hardcoding CPU counts and adding new PR_* numbers without ensuring they are aligned with upstream/kernel-side definitions risks ABI conflicts and user-space breakage. A safer approach is to (a) keep these definitions in a separate, project-specific UAPI header, or (b) ensure the kernel implementation and UAPI definitions are upstream-aligned and do not reuse/overlap existing PR_* values.

Suggested change
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2
+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
@@ -272,4 +272,4 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +75
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch introduces new prctl() numbers, hardcodes NUM_CPUS, and adds typedefs/structs directly into a UAPI header (include/uapi/linux/prctl.h). UAPI headers are part of the stable ABI surface: hardcoding CPU counts and adding new PR_* numbers without ensuring they are aligned with upstream/kernel-side definitions risks ABI conflicts and user-space breakage. A safer approach is to (a) keep these definitions in a separate, project-specific UAPI header, or (b) ensure the kernel implementation and UAPI definitions are upstream-aligned and do not reuse/overlap existing PR_* values.

Suggested change
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2
+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
@@ -272,4 +272,4 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +75
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch introduces new prctl() numbers, hardcodes NUM_CPUS, and adds typedefs/structs directly into a UAPI header (include/uapi/linux/prctl.h). UAPI headers are part of the stable ABI surface: hardcoding CPU counts and adding new PR_* numbers without ensuring they are aligned with upstream/kernel-side definitions risks ABI conflicts and user-space breakage. A safer approach is to (a) keep these definitions in a separate, project-specific UAPI header, or (b) ensure the kernel implementation and UAPI definitions are upstream-aligned and do not reuse/overlap existing PR_* values.

Suggested change
@@ -272,4 +272,73 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2
+#define PR_SET_FTRACE_MARKER 99
+
+/* sets max size of string buffer */
+#define FTRACE_BUF_SIZE 1024
+
+
+#define NUM_CPUS 4
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ __u64 idle_time[NUM_CPUS];
+} IDLE_METRICS;
+
+typedef struct {
+ __u64 sum_idle_time;
+ __u32 max_idle_time;
+ __u32 idle_count;
+} PER_CPU_IDLE_METRIC;
+
+/* define structure(s) used for logging idle metrics */
+typedef struct {
+ __u64 metricStartTime;
+ __u64 metricEndTime;
+ PER_CPU_IDLE_METRIC idle[NUM_CPUS];
+ __u64 sum_all_cpus_running_time;
+ __u64 sum_run_time_lt_1ms;
+ __u64 sum_run_time_gt_1ms;
+ __u64 sum_run_time_gt_5ms;
+ __u64 sum_run_time_gt_10ms;
+ __u64 sum_run_time_gt_20ms;
+ __u64 sum_run_time_gt_30ms;
+ __u64 sum_run_time_gt_40ms;
+ __u64 sum_run_time_gt_50ms;
+ __u64 sum_run_time_gt_75ms;
+ __u64 sum_run_time_gt_100ms;
+ __u32 max_run_time_lt_1ms;
+ __u32 max_run_time_gt_1ms;
+ __u32 max_run_time_gt_5ms;
+ __u32 max_run_time_gt_10ms;
+ __u32 max_run_time_gt_20ms;
+ __u32 max_run_time_gt_30ms;
+ __u32 max_run_time_gt_40ms;
+ __u32 max_run_time_gt_50ms;
+ __u32 max_run_time_gt_75ms;
+ __u32 max_run_time_gt_100ms;
+ __u32 max_all_cpus_running_time;
+ __u32 count;
+ __u32 run_time_gt_1ms;
+ __u32 run_time_gt_5ms;
+ __u32 run_time_gt_10ms;
+ __u32 run_time_gt_20ms;
+ __u32 run_time_gt_30ms;
+ __u32 run_time_gt_40ms;
+ __u32 run_time_gt_50ms;
+ __u32 run_time_gt_75ms;
+ __u32 run_time_gt_100ms;
+} IDLE_METRICS_V2;
+
+#define PR_GET_IDLE_METRICS 104
+#define PR_GET_IDLE_METRICS_VERSION 105
+
+typedef enum {
+ IDLE_METRICS_VERSION_V1 = 0,
+ IDLE_METRICS_VERSION_V2,
+ IDLE_METRICS_VERSION_NUM_VERSIONS
+} IDLE_METRICS_VERSION;
+
@@ -272,4 +272,4 @@
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2

Copilot uses AI. Check for mistakes.
Comment on lines +74 to +76
# Treat as SKIP - likely missing kernel modules (ip6_tables, nat, mangle, etc.)
echo "SKIP: $test_name (expected $rc_spec got $rc_got)"
SKIP_COUNT=$((SKIP_COUNT + 1))
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAIL_COUNT is never incremented and any unexpected return code is treated as SKIP, which can mask genuine regressions (e.g., a test that should pass but fails for functional reasons). Consider treating mismatches as FAIL by default, and only SKIP when you can positively detect an environmental reason (missing capability/module) or when the expected rc indicates skip semantics.

Suggested change
# Treat as SKIP - likely missing kernel modules (ip6_tables, nat, mangle, etc.)
echo "SKIP: $test_name (expected $rc_spec got $rc_got)"
SKIP_COUNT=$((SKIP_COUNT + 1))
# Treat unexpected return codes as FAIL by default.
# Only explicitly detected environmental conditions should be reported as SKIP.
echo "FAIL: $test_name (expected $rc_spec got $rc_got)"
FAIL_COUNT=$((FAIL_COUNT + 1))

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.