From: Hangbin Liu <liuhangbin@gmail.com>
To: Victor Nogueira <victor@mojatatu.com>
Cc: stephen@networkplumber.org, dsahern@kernel.org,
netdev@vger.kernel.org, jhs@mojatatu.com, kernel@mojatatu.com
Subject: Re: [PATCH iproute2-next 0/2] tc: add NLM_F_ECHO support for actions and filters
Date: Thu, 25 Jan 2024 10:37:46 +0800 [thread overview]
Message-ID: <ZbHJendeEKzhw5ly@Laptop-X1> (raw)
In-Reply-To: <20240124153456.117048-1-victor@mojatatu.com>
On Wed, Jan 24, 2024 at 12:34:54PM -0300, Victor Nogueira wrote:
> Continuing on what Hangbin Liu started [1], this patch set adds support for
> the NLM_F_ECHO flag for tc actions and filters. For qdiscs it will require
> some kernel surgery, and we'll send it soon after this surgery is merged.
>
> When user space configures the kernel with netlink messages, it can set
> NLM_F_ECHO flag to request the kernel to send the applied configuration
> back to the caller. This allows user space to receive back configuration
> information that is populated by the kernel. Often because there are
> parameters that can only be set by the kernel which become visible with the
> echo, or because user space lets the kernel choose a default value.
>
> To illustrate a use case where the kernel will give us a default value,
> the example below shows the user not specifying the action index:
>
> tc -echo actions add action mirred egress mirror dev lo
>
> total acts 0
> Added action
> action order 1: mirred (Egress Mirror to device lo) pipe
> index 1 ref 1 bind 0
> not_in_hw
>
> Note that the echoed response indicates that the kernel gave us a value
> of index 1
>
Looks good to me.
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
next prev parent reply other threads:[~2024-01-25 2:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 15:34 [PATCH iproute2-next 0/2] tc: add NLM_F_ECHO support for actions and filters Victor Nogueira
2024-01-24 15:34 ` [PATCH iproute2-next 1/2] tc: add NLM_F_ECHO support for actions Victor Nogueira
2024-01-24 15:34 ` [PATCH iproute2-next 2/2] tc: Add NLM_F_ECHO support for filters Victor Nogueira
2024-01-25 2:37 ` Hangbin Liu [this message]
2024-01-30 15:50 ` [PATCH iproute2-next 0/2] tc: add NLM_F_ECHO support for actions and filters 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=ZbHJendeEKzhw5ly@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=dsahern@kernel.org \
--cc=jhs@mojatatu.com \
--cc=kernel@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=victor@mojatatu.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