Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Anna Emese Nyiri <annaemesenyiri@gmail.com>,  netdev@vger.kernel.org
Cc: fejes@inf.elte.hu,  edumazet@google.com,  kuba@kernel.org,
	 pabeni@redhat.com,  willemb@google.com,  idosch@idosch.org,
	 Anna Emese Nyiri <annaemesenyiri@gmail.com>
Subject: Re: [PATCH net-next v6 3/4] selftests: net: test SO_PRIORITY ancillary data with cmsg_sender
Date: Tue, 10 Dec 2024 19:56:45 -0500	[thread overview]
Message-ID: <6758e34d1b9c_3ed2bc294c0@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20241210191309.8681-4-annaemesenyiri@gmail.com>

Anna Emese Nyiri wrote:
> Extend cmsg_sender.c with a new option '-Q' to send SO_PRIORITY
> ancillary data.
> 
> cmsg_so_priority.sh script added to validate SO_PRIORITY behavior 
> by creating VLAN device with egress QoS mapping and testing packet
> priorities using flower filters. Verify that packets with different
> priorities are correctly matched and counted by filters for multiple
> protocols and IP versions.
> 
> Suggested-by: Ido Schimmel <idosch@idosch.org>
> Signed-off-by: Anna Emese Nyiri <annaemesenyiri@gmail.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>


> +            ip netns exec $NS ./cmsg_sender -$i -Q $priority -d "${DELAY}" \
> +	            -p $proto $TGT $PORT
> +
> +            pkts=$(tc -n $NS -j -s filter show dev dummy1 egress \
> +                | jq ".[] | select(.options.handle == ${handle}) | \
> +                .options.actions[0].stats.packets")
> +            if [[ $pkts == 1 ]]; then
> +                check_result 0
> +            else
> +                echo "prio $priority -Q: expected 1, got $pkts"
> +                check_result 1
> +            fi
> +
> +            ip netns exec $NS ./cmsg_sender -$i -P $priority -d "${DELAY}" \
> +	            -p $proto $TGT $PORT

nit: delay is not used here. Neither txtime nor ts is set (and only
one packet is sent). It's harmless. No need to respin just for this.

  reply	other threads:[~2024-12-11  0:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 19:13 [PATCH net-next v6 0/4] Add support for SO_PRIORITY cmsg Anna Emese Nyiri
2024-12-10 19:13 ` [PATCH net-next v6 1/4] sock: Introduce sk_set_prio_allowed helper function Anna Emese Nyiri
2024-12-10 19:13 ` [PATCH net-next v6 2/4] sock: support SO_PRIORITY cmsg Anna Emese Nyiri
2024-12-10 19:13 ` [PATCH net-next v6 3/4] selftests: net: test SO_PRIORITY ancillary data with cmsg_sender Anna Emese Nyiri
2024-12-11  0:56   ` Willem de Bruijn [this message]
2024-12-11 10:01   ` Ido Schimmel
2024-12-12 16:35     ` Anna Nyiri
2024-12-12 16:51       ` Willem de Bruijn
2024-12-10 19:13 ` [PATCH net-next v6 4/4] sock: Introduce SO_RCVPRIORITY socket option Anna Emese Nyiri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6758e34d1b9c_3ed2bc294c0@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=annaemesenyiri@gmail.com \
    --cc=edumazet@google.com \
    --cc=fejes@inf.elte.hu \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox