[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ASx87MmTb79KImWwsBhstFGoue2UNiX4l0Y0NXCSob-VNrOsz05jh8lG76DbQ7FWjGABCdc45LY6vQ3VI7UIv4KzI5LI2mB65eje2PwlHrE=@proton.me>
Date: Thu, 27 Nov 2025 06:08:13 +0000
From: 정지수 <jschung2@...ton.me>
To: Jamal Hadi Salim <jhs@...atatu.com>
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
Mr Salim,
I do not understand what your saying. You provide a bash script, and I can test
- Ji-Soo
에 2025년 11월 22일 토요일 17:24 Jamal Hadi Salim <jhs@...atatu.com> 님이 작성함:
>
>
> 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