Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Peilin Ye <yepeilin.cs@gmail.com>, netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Cong Wang <cong.wang@bytedance.com>,
	Peilin Ye <peilin.ye@bytedance.com>
Subject: Re: [PATCH iproute2-next v3] tc/skbmod: Introduce SKBMOD_F_ECN option
Date: Sun, 8 Aug 2021 11:59:34 -0600	[thread overview]
Message-ID: <b29c5a1e-4255-5c6d-1e3f-9d9758c4ca67@gmail.com> (raw)
In-Reply-To: <20210804181516.11921-1-yepeilin.cs@gmail.com>

On 8/4/21 12:15 PM, Peilin Ye wrote:
> From: Peilin Ye <peilin.ye@bytedance.com>
> 
> Recently we added SKBMOD_F_ECN option support to the kernel; support it in
> the tc-skbmod(8) front end, and update its man page accordingly.
> 
> The 2 least significant bits of the Traffic Class field in IPv4 and IPv6
> headers are used to represent different ECN states [1]:
> 
> 	0b00: "Non ECN-Capable Transport", Non-ECT
> 	0b10: "ECN Capable Transport", ECT(0)
> 	0b01: "ECN Capable Transport", ECT(1)
> 	0b11: "Congestion Encountered", CE
> 
> This new option, "ecn", marks ECT(0) and ECT(1) IPv{4,6} packets as CE,
> which is useful for ECN-based rate limiting.  For example:
> 
> 	$ tc filter add dev eth0 parent 1: protocol ip prio 10 \
> 		u32 match ip protocol 1 0xff flowid 1:2 \
> 		action skbmod \
> 		ecn
> 
> The updated tc-skbmod SYNOPSIS looks like the following:
> 
> 	tc ... action skbmod { set SETTABLE | swap SWAPPABLE | ecn } ...
> 
> Only one of "set", "swap" or "ecn" shall be used in a single tc-skbmod
> command.  Trying to use more than one of them at a time is considered
> undefined behavior; pipe multiple tc-skbmod commands together instead.
> "set" and "swap" only affect Ethernet packets, while "ecn" only affects
> IP packets.
> 
> Depends on kernel patch "net/sched: act_skbmod: Add SKBMOD_F_ECN option
> support", as well as iproute2 patch "tc/skbmod: Remove misinformation
> about the swap action".
> 
> [1] https://en.wikipedia.org/wiki/Explicit_Congestion_Notification
> 
> Reviewed-by: Cong Wang <cong.wang@bytedance.com>
> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
> ---
> Hi David,
> 
>> I just merged main into next. Please fix up this patch and re-send. In
>> the future, just ask for a merge in cases like this.
> 
> Ah, I see; thanks!
> Peilin Ye
> 
> Change since v2:
>     - re-rebased on iproute2-next (David)
> 
>  man/man8/tc-skbmod.8 | 38 +++++++++++++++++++++++++++++---------
>  tc/m_skbmod.c        |  8 +++++++-
>  2 files changed, 36 insertions(+), 10 deletions(-)
> 

applied to iproute2-next.


  reply	other threads:[~2021-08-08 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 23:20 [PATCH iproute2-next] " Peilin Ye
2021-08-02 16:28 ` David Ahern
2021-08-02 17:54 ` [PATCH iproute2-next v2] " Peilin Ye
2021-08-04 15:25   ` David Ahern
2021-08-02 20:51 ` [PATCH iproute2-next] tc/ingress: Introduce clsact egress mini-Qdisc option Peilin Ye
2021-08-04 18:15 ` [PATCH iproute2-next v3] tc/skbmod: Introduce SKBMOD_F_ECN option Peilin Ye
2021-08-08 17:59   ` David Ahern [this message]
2021-08-08 18:00   ` patchwork-bot+netdevbpf

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=b29c5a1e-4255-5c6d-1e3f-9d9758c4ca67@gmail.com \
    --to=dsahern@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=peilin.ye@bytedance.com \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yepeilin.cs@gmail.com \
    --subject='Re: [PATCH iproute2-next v3] tc/skbmod: Introduce SKBMOD_F_ECN option' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).