summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>2026-08-14 09:11:27 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2026-08-17 10:32:53 +0200
commitc238ff829eb14c6bb014ee44dbc32ec25b78aa7c (patch)
tree82bec22e4150b5c754c45e39672db58ef79d2671 /tools/testing
parent34e0eb763becfee4487a7105e3204d9fc486be93 (diff)
downloadlinux-c238ff829eb14c6bb014ee44dbc32ec25b78aa7c.tar.gz
linux-c238ff829eb14c6bb014ee44dbc32ec25b78aa7c.zip
selftests/bpf: Fix comment style in network_helpers.c
BPF subsystem requires multi-line comments to have the opening /* start on its own line. Update multi-line comments in network_helpers.c to follow this requirement. Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20260814-tc_tunnel_flaky-v5-1-5b93d030c42c@bootlin.com
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/network_helpers.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/tools/testing/selftests/bpf/network_helpers.c b/tools/testing/selftests/bpf/network_helpers.c
index db935a9d9fc1..cdf2d7d3ab32 100644
--- a/tools/testing/selftests/bpf/network_helpers.c
+++ b/tools/testing/selftests/bpf/network_helpers.c
@@ -424,7 +424,8 @@ int make_sockaddr(int family, const char *addr_str, __u16 port,
*len = sizeof(*sin6);
return 0;
} else if (family == AF_UNIX) {
- /* Note that we always use abstract unix sockets to avoid having
+ /*
+ * Note that we always use abstract unix sockets to avoid having
* to clean up leftover files.
*/
struct sockaddr_un *sun = (void *)addr;
@@ -865,7 +866,8 @@ static bool is_ethernet(const u_char *packet)
memcpy(&arphdr_type, packet + 8, 2);
arphdr_type = ntohs(arphdr_type);
- /* Except the following cases, the protocol type contains the
+ /*
+ * Except the following cases, the protocol type contains the
* Ethernet protocol type for the packet.
*
* https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL2.html
@@ -1033,19 +1035,22 @@ static void *traffic_monitor_thread(void *arg)
if (!packet)
continue;
- /* According to the man page of pcap_dump(), first argument
+ /*
+ * According to the man page of pcap_dump(), first argument
* is the pcap_dumper_t pointer even it's argument type is
* u_char *.
*/
pcap_dump((u_char *)dumper, &header, packet);
- /* Not sure what other types of packets look like. Here, we
+ /*
+ * Not sure what other types of packets look like. Here, we
* parse only Ethernet and compatible packets.
*/
if (!is_ethernet(packet))
continue;
- /* Skip SLL2 header
+ /*
+ * Skip SLL2 header
* https://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL2.html
*
* Although the document doesn't mention that, the payload
@@ -1079,7 +1084,8 @@ static void *traffic_monitor_thread(void *arg)
return NULL;
}
-/* Prepare the pcap handle to capture packets.
+/*
+ * Prepare the pcap handle to capture packets.
*
* This pcap is non-blocking and immediate mode is enabled to receive
* captured packets as soon as possible. The snaplen is set to 1024 bytes
@@ -1150,7 +1156,8 @@ static void encode_test_name(char *buf, size_t len, const char *test_name, const
#define PCAP_DIR "/tmp/tmon_pcap"
-/* Start to monitor the network traffic in the given network namespace.
+/*
+ * Start to monitor the network traffic in the given network namespace.
*
* netns: the name of the network namespace to monitor. If NULL, the
* current network namespace is monitored.
@@ -1255,7 +1262,8 @@ static void traffic_monitor_release(struct tmonitor_ctx *ctx)
free(ctx);
}
-/* Stop the network traffic monitor.
+/*
+ * Stop the network traffic monitor.
*
* ctx: the context returned by traffic_monitor_start()
*/