lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM0EoM=i6MsHeBYu6d-+bkxVWWHcj9b9ibM+dHr3w27mUMMhBw@mail.gmail.com>
Date: Sat, 22 Nov 2025 12:24:43 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: 정지수 <jschung2@...ton.me>
Cc: Cong Wang <xiyou.wangcong@...il.com>, 
	Stephen Hemminger <stephen@...workplumber.org>, netdev@...r.kernel.org, kuba@...nel.org, 
	linux-kernel@...r.kernel.org, will@...lsroot.io, savy@...t3mfailure.io
Subject: Re: Fw: [Bug 220774] New: netem is broken in 6.18

Hi 정지수,

On Sat, Nov 22, 2025 at 1:56 AM 정지수 <jschung2@...ton.me> wrote:
>
>
> #!/bin/bash
>
> set -euo pipefail
>
> DEV="wlo0"
> QUEUE="1"
> RTP_DST_PORT="5004"
> DUP_PCT="25%"
> CORR_PCT="60%"
> DELAY="1ms"
> VERIFY_SECONDS=15
>
> usage(){ echo "Usage: sudo $0 [-d DEV] [-q QUEUE] [-P UDP_PORT]"; exit 1; }
> while [[ $# -gt 0 ]]; do
>   case "$1" in
>     -d) DEV="$2"; shift 2;;
>     -q) QUEUE="$2"; shift 2;;
>     -P) RTP_DST_PORT="$2"; shift 2;;
>     *) usage;;
>   endac
> done || true
>
> [[ -d /sys/class/net/$DEV ]] || { echo "No such dev $DEV"; exit 1; }
>
>
> if ! tc qdisc show dev "$DEV" | grep -q ' qdisc mq '; then
>   echo "Setting root qdisc to mq.."
>   tc qdisc replace dev "$DEV" root handle 1: mq
> fi
>
>
> echo "Adding ntuple to steer UDP dport $RTP_DST_PORT -> tx-queue $QUEUE..."
> ethtool -N "$DEV" flow-type udp4 dst-port $RTP_DST_PORT action $QUEUE || {
>   echo "some flows will still land on :$QUEUE"
> }
>
>
> echo "Attaching netem duplicate=$DUP_PCT corr=$CORR_PCT delay=$DELAY on parent :$QUEUE.."
> tc qdisc replace dev "$DEV" parent :$QUEUE handle ${QUEUE}00: \
>   netem duplicate "$DUP_PCT" "$CORR_PCT" delay "$DELAY"
>
> tc qdisc show dev "$DEV"
>
> echo
> echo "Start an RTP/WebRTC/SFU downlink to a test client on UDP port $RTP_DST_PORT."
> echo "Capturing for $VERIFY_SECONDS s to observe duplicates by RTP seqno.."
> timeout "$VERIFY_SECONDS" tcpdump -ni "$DEV" "udp and dst port $RTP_DST_PORT" -vv -c 0 2>/dev/null | head -n 3 || true
>
>
> if command -v tshark >/dev/null 2>&1; then
>   echo "tshark live RTP view :"
>   timeout "$VERIFY_SECONDS" tshark -i "$DEV" -f "udp dst port $RTP_DST_PORT" -q -z rtp,streams || true
> fi
>
> echo
> echo "Netem stats, see duplicated counters under handle ${QUEUE}00:):"
> tc -s qdisc show dev "$DEV" | sed -n '1,200p'
>

Thanks for the config.

If you can talk about it: I was more interested in what your end goal is.
>From the dev name it seems $DEV is a wireless device? Are you
replicating these RTP packets across different ssids mapped to
different hw queues? Are you forwarding these packets? The ethtool
config indicates the RX direction but the netem replication is on the
tx.
And in the short term if a tc action could achieve what you are trying
to achieve - would that work for you?

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ