public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: "Fu, Qiaobin" <qiaobinf@bu.edu>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	Michel Machado <michel@digirati.com.br>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>
Subject: Re: [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit
Date: Mon, 28 May 2018 12:42:28 -0300	[thread overview]
Message-ID: <20180528154228.GC3787@localhost.localdomain> (raw)
In-Reply-To: <A371B54E-186D-4747-B4FB-744E201C3FE5@bu.edu>

On Mon, May 28, 2018 at 05:40:18AM +0000, Fu, Qiaobin wrote:
> The new action inheritdsfield copies the field DS of
> IPv4 and IPv6 packets into skb->priority. This enables
> later classification of packets based on the DS field.
> 
> Original idea by Jamal Hadi Salim <jhs@mojatatu.com>
> 
> Signed-off-by: Qiaobin Fu <qiaobinf@bu.edu>
> Reviewed-by: Michel Machado <michel@digirati.com.br>
> ---
> 
> Note that the motivation for this patch is found in the following discussion:
> https://www.spinics.net/lists/netdev/msg501061.html
> ---
> 
> diff --git a/include/uapi/linux/tc_act/tc_skbedit.h b/include/uapi/linux/tc_act/tc_skbedit.h
> index fbcfe27..432ad2f 100644
> --- a/include/uapi/linux/tc_act/tc_skbedit.h
> +++ b/include/uapi/linux/tc_act/tc_skbedit.h
> @@ -30,9 +30,11 @@
>  #define SKBEDIT_F_MARK			0x4
>  #define SKBEDIT_F_PTYPE			0x8
>  #define SKBEDIT_F_MASK			0x10
> +#define SKBEDIT_F_INHERITDSFIELD	0x20
>  
>  struct tc_skbedit {
>  	tc_gen;
> +	__u64 flags;

I don't think this is doable. It looks like it was prepared for such
change, but it breaks UAPI as it causes tc without the respective
patch to not be able to talk to skbedit anymore:

With this patch:
[root@f28 ~]# tc action add action skbedit priority 1 
RTNETLINK answers: Numerical result out of range
We have an error talking to the kernel
[root@f28 ~]#

While without this patch:
[root@f28 ~]# tc action add action skbedit priority 1
[root@f28 ~]#


>  };
>  
>  enum {

  reply	other threads:[~2018-05-28 15:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28  5:40 [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit Fu, Qiaobin
2018-05-28 15:42 ` Marcelo Ricardo Leitner [this message]
2018-05-28 16:01   ` Jamal Hadi Salim
2018-06-09 22:35 ` [PATCH v3 " Fu, Qiaobin
2018-06-09 22:51   ` Marcelo Ricardo Leitner
2018-06-12 15:42   ` [PATCH v4 " Fu, Qiaobin
2018-06-19 12:01     ` Jamal Hadi Salim
2018-06-19 12:39       ` Michel Machado
2018-06-20 11:53         ` Jamal Hadi Salim
2018-06-20 12:42           ` Michel Machado
2018-06-20 14:45     ` Marcelo Ricardo Leitner
2018-06-20 16:08     ` Davide Caratti
2018-06-20 16:47       ` Michel Machado
2018-06-20 17:02         ` Davide Caratti
2018-06-20 18:40           ` Marcelo Ricardo Leitner
2018-06-21 15:46             ` Fu, Qiaobin
2018-06-21 15:50               ` [PATCH v5 " Fu, Qiaobin
2018-06-21 16:13                 ` Davide Caratti
2018-06-26 15:58                 ` Fu, Qiaobin
2018-06-28  7:05                   ` David Miller

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=20180528154228.GC3787@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=michel@digirati.com.br \
    --cc=netdev@vger.kernel.org \
    --cc=qiaobinf@bu.edu \
    --cc=xiyou.wangcong@gmail.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