Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-21 Thread Fu, Qiaobin
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. v5: *Update the drop counter for TC_ACT_SHOT. v4: *Not allow setting flags other than the expected ones. *Allow dumping the pure flag

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Marcelo Ricardo Leitner
On Wed, Jun 20, 2018 at 07:02:41PM +0200, Davide Caratti wrote: ... > > I agree that we should update the drop counter, but given that > > you're already converting the stats to be per-cpu counters, whatever we > > add now will be just symbolic since you're going to change it anyway. It woul

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Davide Caratti
On Wed, 2018-06-20 at 12:47 -0400, Michel Machado wrote: > On 06/20/2018 12:08 PM, Davide Caratti wrote: > > On Tue, 2018-06-12 at 15:42 +, Fu, Qiaobin wrote: > > > The new action inheritdsfield copies the field DS of > > > IPv4 and IPv6 packets into skb->priority. This enables > > > later clas

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Michel Machado
On 06/20/2018 12:08 PM, Davide Caratti wrote: On Tue, 2018-06-12 at 15:42 +, 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. v4: *Not allow setting flags oth

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Davide Caratti
On Tue, 2018-06-12 at 15:42 +, 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. > > v4: > *Not allow setting flags other than the expected ones. > > *Allo

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Marcelo Ricardo Leitner
On Tue, Jun 12, 2018 at 03:42:55PM +, 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. > > v4: > *Not allow setting flags other than the expected ones. >

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Michel Machado
On 06/20/2018 07:53 AM, Jamal Hadi Salim wrote: On 19/06/18 08:39 AM, Michel Machado wrote:  Notice that, different from skbmod, there's no field parm->flags in skbedit. Skbedit infers the flags in d->flags from the presence of the parameters of each of its actions. But SKBEDIT_F_INHERITDSFIEL

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-20 Thread Jamal Hadi Salim
On 19/06/18 08:39 AM, Michel Machado wrote: Notice that, different from skbmod, there's no field parm->flags in skbedit. Skbedit infers the flags in d->flags from the presence of the parameters of each of its actions. But SKBEDIT_F_INHERITDSFIELD has no parameter and adding field parm->flags

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-19 Thread Michel Machado
On 06/19/2018 08:01 AM, Jamal Hadi Salim wrote: Per my previous comments, why do we need the TCA_SKBEDIT_FLAGS TLV? Isnt SKBEDIT_F_INHERITDSFIELD sufficient? i.e in tcf_skbedit_init() check for d->flags&SKBEDIT_F_INHERITDSFIELD then set skb->priority and flags|=SKBEDIT_F_INHERITDSFIELD Notic

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-19 Thread Jamal Hadi Salim
Hi Qiaobin, Per my previous comments, why do we need the TCA_SKBEDIT_FLAGS TLV? Isnt SKBEDIT_F_INHERITDSFIELD sufficient? i.e in tcf_skbedit_init() check for d->flags&SKBEDIT_F_INHERITDSFIELD then set skb->priority and flags|=SKBEDIT_F_INHERITDSFIELD Side note: Infact the whole flags setting i

[PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-12 Thread Fu, Qiaobin
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. v4: *Not allow setting flags other than the expected ones. *Allow dumping the pure flags. Original idea by Jamal Hadi Salim Signed-