Re: [PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-29 Thread Shmulik Ladkani
Hi Eric, On Tue, 27 Sep 2016 14:27:13 -0700 Eric Dumazet wrote: > > Since this runs lockless, another cpu might change m->tcfm_eaction in > the middle, and you could call dev_queue_xmit(skb2) while the skb2 was > prepared for the opposite action. Well, seem members of 'struct tcf_mirred' are ou

Re: [PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-27 Thread Eric Dumazet
On Wed, 2016-09-28 at 00:42 +0300, Shmulik Ladkani wrote: > Thanks Eric. > > I assume adding a READ_ONCE(m->tcfm_eaction) at beggining of section, > and using the read value, will solve this specific inconsistency? Sure, adding a READ_ONCE() might work, if done properly ;)

Re: [PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-27 Thread Shmulik Ladkani
Hi, On Tue, 27 Sep 2016 14:27:13 -0700 Eric Dumazet wrote: > On Tue, 2016-09-27 at 23:59 +0300, Shmulik Ladkani wrote: > > Up until now, 'action mirred' supported only egress actions (either > > TCA_EGRESS_REDIR or TCA_EGRESS_MIRROR). > > > > This patch implements the corresponding ingress actio

Re: [PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-27 Thread Eric Dumazet
On Tue, 2016-09-27 at 23:59 +0300, Shmulik Ladkani wrote: > Up until now, 'action mirred' supported only egress actions (either > TCA_EGRESS_REDIR or TCA_EGRESS_MIRROR). > > This patch implements the corresponding ingress actions > TCA_INGRESS_REDIR and TCA_INGRESS_MIRROR. > - if (m-

[PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-27 Thread Shmulik Ladkani
Up until now, 'action mirred' supported only egress actions (either TCA_EGRESS_REDIR or TCA_EGRESS_MIRROR). This patch implements the corresponding ingress actions TCA_INGRESS_REDIR and TCA_INGRESS_MIRROR. This allows attaching filters whose target is to hand matching skbs into the rx processing