Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xdp-tools for openSUSE:Factory checked in at 2024-01-31 23:54:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xdp-tools (Old) and /work/SRC/openSUSE:Factory/.xdp-tools.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xdp-tools" Wed Jan 31 23:54:56 2024 rev:3 rq:1142940 version:1.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/xdp-tools/xdp-tools.changes 2023-11-15 21:10:32.776588956 +0100 +++ /work/SRC/openSUSE:Factory/.xdp-tools.new.1815/xdp-tools.changes 2024-01-31 23:55:16.860303674 +0100 @@ -1,0 +2,8 @@ +Wed Jan 31 07:45:28 UTC 2024 - Shung-Hsi Yu <shung-hsi...@suse.com> + +- Update to v1.4.2 + * Added support for clang-17 + * xdp-bench: Add l4-sport and l4-dport cpumap modes + * Fix xdp prog memory leak in xsk_setup_xdp_prog + +------------------------------------------------------------------- Old: ---- xdp-tools-1.4.1.tar.gz New: ---- xdp-tools-1.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xdp-tools.spec ++++++ --- /var/tmp/diff_new_pack.EebiFt/_old 2024-01-31 23:55:17.416323738 +0100 +++ /var/tmp/diff_new_pack.EebiFt/_new 2024-01-31 23:55:17.416323738 +0100 @@ -1,7 +1,7 @@ # # spec file for package xdp-tools # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ # workaround binutils/strip issue with BPF object, see #boo#1217108 %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: xdp-tools -Version: 1.4.1 +Version: 1.4.2 Release: 0 Group: Productivity/Networking/Other Summary: Utilities and example programs for use with XDP ++++++ xdp-tools-1.4.1.tar.gz -> xdp-tools-1.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/.github/workflows/release.yml new/xdp-tools-1.4.2/.github/workflows/release.yml --- old/xdp-tools-1.4.1/.github/workflows/release.yml 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/.github/workflows/release.yml 2024-01-30 13:36:27.000000000 +0100 @@ -19,7 +19,7 @@ - name: "Create source archive" run: | - make archive + ./mkarchive.sh - uses: "marvinpinto/action-automatic-releases@v1.2.1" with: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/configure new/xdp-tools-1.4.2/configure --- old/xdp-tools-1.4.1/configure 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/configure 2024-01-30 13:36:27.000000000 +0100 @@ -39,7 +39,7 @@ # we're looking for a binary with the same name as tool_name; try version # suffixes in order until we find one - for v in 16 15 14 13 12 11; do + for v in 17 16 15 14 13 12 11; do tool_path="${tool_name}-$v" if command -v "$tool_path" >/dev/null 2>&1; then echo $tool_path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/lib/libxdp/libxdp.3 new/xdp-tools-1.4.2/lib/libxdp/libxdp.3 --- old/xdp-tools-1.4.1/lib/libxdp/libxdp.3 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/lib/libxdp/libxdp.3 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "libxdp" "3" "June 29, 2023" "v1.4.1" "libxdp - library for loading XDP programs" +.TH "libxdp" "3" "June 29, 2023" "v1.4.2" "libxdp - library for loading XDP programs" .SH "NAME" libxdp \- library for attaching XDP programs and using AF_XDP sockets diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/lib/libxdp/xsk.c new/xdp-tools-1.4.2/lib/libxdp/xsk.c --- old/xdp-tools-1.4.1/lib/libxdp/xsk.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/lib/libxdp/xsk.c 2024-01-30 13:36:27.000000000 +0100 @@ -978,6 +978,7 @@ static void xsk_destroy_xsk_struct(struct xsk_socket *xsk) { + xdp_program__close(xsk->ctx->xdp_prog); free(xsk->ctx); free(xsk); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/lib/util/params.c new/xdp-tools-1.4.2/lib/util/params.c --- old/xdp-tools-1.4.1/lib/util/params.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/lib/util/params.c 2024-01-30 13:36:27.000000000 +0100 @@ -248,7 +248,7 @@ if (ifindex < 0) return ifindex; - iface = calloc(sizeof(*iface), 1); + iface = calloc(1, sizeof(*iface)); if (!iface) return -ENOMEM; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/lib/util/xpcapng.c new/xdp-tools-1.4.2/lib/util/xpcapng.c --- old/xdp-tools-1.4.1/lib/util/xpcapng.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/lib/util/xpcapng.c 2024-01-30 13:36:27.000000000 +0100 @@ -226,7 +226,7 @@ shb_length += sizeof(uint32_t); /* Allocate the SHB and fill it. */ - shb = calloc(shb_length, 1); + shb = calloc(1, shb_length); if (shb == NULL) { errno = ENOMEM; return false; @@ -318,7 +318,7 @@ idb_length += sizeof(uint32_t); /* Allocate the IDB and fill it. */ - idb = calloc(idb_length, 1); + idb = calloc(1, idb_length); if (idb == NULL) { errno = ENOMEM; return false; @@ -549,7 +549,7 @@ goto error_exit; } - pd = calloc(sizeof(*pd), 1); + pd = calloc(1, sizeof(*pd)); if (pd == NULL) { errno = ENOMEM; goto error_exit; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/mkarchive.sh new/xdp-tools-1.4.2/mkarchive.sh --- old/xdp-tools-1.4.1/mkarchive.sh 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/mkarchive.sh 2024-01-30 13:36:27.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/bash -VERSION="$1" WORKDIR=$(dirname "${BASH_SOURCE[0]}") +VERSION="${1:-$(make -f $WORKDIR/version.mk)}" OUTFILE="$WORKDIR/xdp-tools-$VERSION.tar.gz" PREFIX=xdp-tools-$VERSION TMPDIR=$(mktemp -d) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/packaging/rpm/xdp-tools.spec new/xdp-tools-1.4.2/packaging/rpm/xdp-tools.spec --- old/xdp-tools-1.4.1/packaging/rpm/xdp-tools.spec 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/packaging/rpm/xdp-tools.spec 2024-01-30 13:36:27.000000000 +0100 @@ -1,5 +1,5 @@ Name: xdp-tools -Version: 1.4.1 +Version: 1.4.2 Release: 1%{?dist} Summary: Utilities and example programs for use with XDP %global _soversion 1.4.0 @@ -121,6 +121,9 @@ %{_libdir}/pkgconfig/libxdp.pc %changelog +* Tue Jan 30 2024 Toke Høiland-Jørgensen <t...@redhat.com> 1.4.2-1 +- Upstream version bump + * Fri Oct 20 2023 Toke Høiland-Jørgensen <t...@redhat.com> 1.4.1-1 - Upstream version bump diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/version.mk new/xdp-tools-1.4.2/version.mk --- old/xdp-tools-1.4.1/version.mk 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/version.mk 2024-01-30 13:36:27.000000000 +0100 @@ -1,2 +1,8 @@ -TOOLS_VERSION := "1.4.1" +TOOLS_VERSION := "1.4.2" +# Conditionally defined make target makes it possible to print the version +# defined above by running 'make -f version.mk' +ifeq ($(MAKEFILE_LIST),version.mk) +print_version: + @echo $(TOOLS_VERSION) +endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/README.org new/xdp-tools-1.4.2/xdp-bench/README.org --- old/xdp-tools-1.4.1/xdp-bench/README.org 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/README.org 2024-01-30 13:36:27.000000000 +0100 @@ -356,6 +356,8 @@ l4-proto - Choose the target CPU based on the layer-4 protocol of packet l4-filter - Like l4-proto, but drop UDP packets with destination port 9 (used by pktgen) l4-hash - Use source and destination IP hashing to pick target CPU + l4-sport - Use modulo of source port to pick target CPU + l4-dport - Use modulo of destination port to pick target CPU #+end_src The =no-touch= and =touch= modes always redirect packets to the same CPU (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/xdp-bench.8 new/xdp-tools-1.4.2/xdp-bench/xdp-bench.8 --- old/xdp-tools-1.4.1/xdp-bench/xdp-bench.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/xdp-bench.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdp-bench" "8" "JUNE 8, 2023" "V1.4.1" "A simple XDP benchmarking tool" +.TH "xdp-bench" "8" "OCTOBER 26, 2023" "V1.4.2" "A simple XDP benchmarking tool" .SH "NAME" XDP-bench \- a simple XDP benchmarking tool @@ -449,6 +449,8 @@ l4-proto - Choose the target CPU based on the layer-4 protocol of packet l4-filter - Like l4-proto, but drop UDP packets with destination port 9 (used by pktgen) l4-hash - Use source and destination IP hashing to pick target CPU +l4-sport - Use modulo of source port to pick target CPU +l4-dport - Use modulo of destination port to pick target CPU \fP .fi .RE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/xdp-bench.c new/xdp-tools-1.4.2/xdp-bench/xdp-bench.c --- old/xdp-tools-1.4.1/xdp-bench/xdp-bench.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/xdp-bench.c 2024-01-30 13:36:27.000000000 +0100 @@ -63,6 +63,8 @@ {"l4-proto", CPUMAP_CPU_L4_PROTO}, {"l4-filter", CPUMAP_CPU_L4_PROTO_FILTER}, {"l4-hash", CPUMAP_CPU_L4_HASH}, + {"l4-sport", CPUMAP_CPU_L4_SPORT}, + {"l4-dport", CPUMAP_CPU_L4_DPORT}, {NULL, 0} }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/xdp-bench.h new/xdp-tools-1.4.2/xdp-bench/xdp-bench.h --- old/xdp-tools-1.4.1/xdp-bench/xdp-bench.h 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/xdp-bench.h 2024-01-30 13:36:27.000000000 +0100 @@ -80,6 +80,8 @@ CPUMAP_CPU_L4_PROTO, CPUMAP_CPU_L4_PROTO_FILTER, CPUMAP_CPU_L4_HASH, + CPUMAP_CPU_L4_SPORT, + CPUMAP_CPU_L4_DPORT, }; struct cpumap_opts { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/xdp_redirect_cpumap.bpf.c new/xdp-tools-1.4.2/xdp-bench/xdp_redirect_cpumap.bpf.c --- old/xdp-tools-1.4.1/xdp-bench/xdp_redirect_cpumap.bpf.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/xdp_redirect_cpumap.bpf.c 2024-01-30 13:36:27.000000000 +0100 @@ -96,7 +96,7 @@ } static __always_inline -__u16 get_dest_port_ipv4_udp(struct xdp_md *ctx, __u64 nh_off) +__u16 get_port_ipv4_udp(struct xdp_md *ctx, __u64 nh_off, bool src) { void *data_end = (void *)(long)ctx->data_end; void *data = (void *)(long)ctx->data; @@ -112,10 +112,83 @@ if (udph + 1 > data_end) return 0; - return bpf_ntohs(udph->dest); + if (src) + return bpf_ntohs(udph->source); + else + return bpf_ntohs(udph->dest); } static __always_inline +__u16 get_port_ipv6_udp(struct xdp_md *ctx, __u64 nh_off, bool src) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data = (void *)(long)ctx->data; + struct ipv6hdr *ip6h = data + nh_off; + struct udphdr *udph; + + if (ip6h + 1 > data_end) + return 0; + if (!(ip6h->nexthdr == IPPROTO_UDP)) + return 0; + + udph = (void *)(ip6h + 1); + if (udph + 1 > data_end) + return 0; + + if (src) + return bpf_ntohs(udph->source); + else + return bpf_ntohs(udph->dest); +} + +static __always_inline +__u16 get_port_ipv4_tcp(struct xdp_md *ctx, __u64 nh_off, bool src) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data = (void *)(long)ctx->data; + struct iphdr *iph = data + nh_off; + struct tcphdr *tcph; + + if (iph + 1 > data_end) + return 0; + if (!(iph->protocol == IPPROTO_TCP)) + return 0; + + tcph = (void *)(iph + 1); + if (tcph + 1 > data_end) + return 0; + + if (src) + return bpf_ntohs(tcph->source); + else + return bpf_ntohs(tcph->dest); +} + +static __always_inline +__u16 get_port_ipv6_tcp(struct xdp_md *ctx, __u64 nh_off, bool src) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data = (void *)(long)ctx->data; + struct ipv6hdr *ip6h = data + nh_off; + struct tcphdr *tcph; + + if (ip6h + 1 > data_end) + return 0; + if (!(ip6h->nexthdr == IPPROTO_UDP)) + return 0; + + tcph = (void *)(ip6h + 1); + if (tcph + 1 > data_end) + return 0; + + if (src) + return bpf_ntohs(tcph->source); + else + return bpf_ntohs(tcph->dest); +} + + +static __always_inline int get_proto_ipv4(struct xdp_md *ctx, __u64 nh_off) { void *data_end = (void *)(long)ctx->data_end; @@ -368,7 +441,7 @@ case IPPROTO_UDP: cpu_idx = 1; /* DDoS filter UDP port 9 (pktgen) */ - dest_port = get_dest_port_ipv4_udp(ctx, l3_offset); + dest_port = get_port_ipv4_udp(ctx, l3_offset, false); if (dest_port == 9) { NO_TEAR_INC(rec->dropped); return XDP_DROP; @@ -491,6 +564,94 @@ return bpf_redirect_map(&cpu_map, cpu_dest, 0); } +static __always_inline +int cpumap_l4_port(struct xdp_md *ctx, bool src) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data = (void *)(long)ctx->data; + __u32 key = bpf_get_smp_processor_id(); + struct ethhdr *eth = data; + __u8 ip_proto = IPPROTO_UDP; + struct datarec *rec; + __u16 eth_proto = 0; + __u64 l3_offset = 0; + __u32 cpu_dest = 0; + __u32 *cpu_lookup; + __u32 cpu_idx = 0; + __u32 *cpu_max; + __u32 key0 = 0; + __u16 port; + + rec = bpf_map_lookup_elem(&rx_cnt, &key); + if (!rec) + return XDP_PASS; + NO_TEAR_INC(rec->processed); + + cpu_max = bpf_map_lookup_elem(&cpus_count, &key0); + if (!cpu_max) + return XDP_ABORTED; + + if (!(parse_eth(eth, data_end, ð_proto, &l3_offset))) + return XDP_PASS; /* Just skip */ + + /* Extract L4 source port */ + switch (eth_proto) { + case ETH_P_IP: + ip_proto = get_proto_ipv4(ctx, l3_offset); + switch (ip_proto) { + case IPPROTO_TCP: + port = get_port_ipv4_tcp(ctx, l3_offset, src); + break; + case IPPROTO_UDP: + port = get_port_ipv4_udp(ctx, l3_offset, src); + break; + default: + port = 0; + } + break; + case ETH_P_IPV6: + ip_proto = get_proto_ipv6(ctx, l3_offset); + switch (ip_proto) { + case IPPROTO_TCP: + port = get_port_ipv6_tcp(ctx, l3_offset, src); + break; + case IPPROTO_UDP: + port = get_port_ipv6_udp(ctx, l3_offset, src); + break; + default: + port = 0; + } + break; + default: + port = 0; + } + + cpu_idx = port % *cpu_max; + + cpu_lookup = bpf_map_lookup_elem(&cpus_available, &cpu_idx); + if (!cpu_lookup) + return XDP_ABORTED; + cpu_dest = *cpu_lookup; + + if (cpu_dest >= nr_cpus) { + NO_TEAR_INC(rec->issue); + return XDP_ABORTED; + } + return bpf_redirect_map(&cpu_map, cpu_dest, 0); +} + +SEC("xdp") +int cpumap_l4_sport(struct xdp_md *ctx) +{ + return cpumap_l4_port(ctx, true); +} + +SEC("xdp") +int cpumap_l4_dport(struct xdp_md *ctx) +{ + return cpumap_l4_port(ctx, false); +} + SEC("xdp/cpumap") int cpumap_redirect(struct xdp_md *ctx) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-bench/xdp_redirect_cpumap.c new/xdp-tools-1.4.2/xdp-bench/xdp_redirect_cpumap.c --- old/xdp-tools-1.4.1/xdp-bench/xdp_redirect_cpumap.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-bench/xdp_redirect_cpumap.c 2024-01-30 13:36:27.000000000 +0100 @@ -50,6 +50,8 @@ "cpumap_l4_proto", "cpumap_l4_filter", "cpumap_l4_hash", + "cpumap_l4_sport", + "cpumap_l4_dport", }; DEFINE_SAMPLE_INIT(xdp_redirect_cpumap); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-dump/xdpdump.8 new/xdp-tools-1.4.2/xdp-dump/xdpdump.8 --- old/xdp-tools-1.4.1/xdp-dump/xdpdump.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-dump/xdpdump.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdpdump" "8" "JANUARY 13, 2021" "V1.4.1" "a simple tcpdump like tool for capturing packets at the XDP layer" +.TH "xdpdump" "8" "JANUARY 13, 2021" "V1.4.2" "a simple tcpdump like tool for capturing packets at the XDP layer" .SH "NAME" xdpdump \- a simple tcpdump like tool for capturing packets at the XDP layer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-filter/xdp-filter.8 new/xdp-tools-1.4.2/xdp-filter/xdp-filter.8 --- old/xdp-tools-1.4.1/xdp-filter/xdp-filter.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-filter/xdp-filter.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdp-filter" "8" "SEPTEMBER 5, 2022" "V1.4.1" "A simple XDP-powered packet filter" +.TH "xdp-filter" "8" "SEPTEMBER 5, 2022" "V1.4.2" "A simple XDP-powered packet filter" .SH "NAME" xdp-filter \- a simple XDP-powered packet filter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-loader/xdp-loader.8 new/xdp-tools-1.4.2/xdp-loader/xdp-loader.8 --- old/xdp-tools-1.4.1/xdp-loader/xdp-loader.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-loader/xdp-loader.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdp-loader" "8" "JUNE 8, 2023" "V1.4.1" "XDP program loader" +.TH "xdp-loader" "8" "JUNE 8, 2023" "V1.4.2" "XDP program loader" .SH "NAME" xdp-loader \- an XDP program loader diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-monitor/xdp-monitor.8 new/xdp-tools-1.4.2/xdp-monitor/xdp-monitor.8 --- old/xdp-tools-1.4.1/xdp-monitor/xdp-monitor.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-monitor/xdp-monitor.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdp-monitor" "8" "DECEMBER 12, 2022" "V1.4.1" "A simple XDP monitoring tool" +.TH "xdp-monitor" "8" "DECEMBER 12, 2022" "V1.4.2" "A simple XDP monitoring tool" .SH "NAME" XDP-monitor \- a simple BPF-powered XDP monitoring tool diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-trafficgen/xdp-trafficgen.8 new/xdp-tools-1.4.2/xdp-trafficgen/xdp-trafficgen.8 --- old/xdp-tools-1.4.1/xdp-trafficgen/xdp-trafficgen.8 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-trafficgen/xdp-trafficgen.8 2024-01-30 13:36:27.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "xdp-trafficgen" "8" "FEBRUARY 4, 2023" "V1.4.1" "An XDP-based traffic generator" +.TH "xdp-trafficgen" "8" "FEBRUARY 4, 2023" "V1.4.2" "An XDP-based traffic generator" .SH "NAME" XDP-trafficgen \- an XDP-based traffic generator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xdp-tools-1.4.1/xdp-trafficgen/xdp-trafficgen.c new/xdp-tools-1.4.2/xdp-trafficgen/xdp-trafficgen.c --- old/xdp-tools-1.4.1/xdp-trafficgen/xdp-trafficgen.c 2023-10-20 18:08:05.000000000 +0200 +++ new/xdp-tools-1.4.2/xdp-trafficgen/xdp-trafficgen.c 2024-01-30 13:36:27.000000000 +0100 @@ -197,13 +197,13 @@ pthread_t *threads; int i, err; - threads = calloc(sizeof(pthread_t), num_threads); + threads = calloc(num_threads, sizeof(pthread_t)); if (!threads) { pr_warn("Couldn't allocate memory\n"); return -ENOMEM; } - t = calloc(sizeof(struct thread_config), num_threads); + t = calloc(num_threads, sizeof(struct thread_config)); if (!t) { pr_warn("Couldn't allocate memory\n"); free(threads);