Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-16 Thread Jamal Hadi Salim
On 2019-01-15 12:57 p.m., Cong Wang wrote: On Tue, Jan 15, 2019 at 8:21 AM Jamal Hadi Salim wrote: Lets have Lucas create the tdc test, then add my Ack. As I said, this case is a bit hard to add to tdc test, because: 1. It requires a vlan device on top. This is not hard to do, but still

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-16 Thread Jamal Hadi Salim
On 2019-01-11 9:55 p.m., Cong Wang wrote: Martin reported a set of filters don't work after changing from reclassify to continue. Looking into the code, it looks like skb protocol is not always fetched for each iteration of the filters. But, as demonstrated by Martin, TC actions could modify skb-

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Cong Wang
On Tue, Jan 15, 2019 at 8:21 AM Jamal Hadi Salim wrote: > > On 2019-01-15 10:59 a.m., Jamal Hadi Salim wrote: > > On 2019-01-13 4:08 p.m., Cong Wang wrote: > >> On Sat, Jan 12, 2019 at 7:41 AM Jamal Hadi Salim > > [..] > > I agree with your rationale. > > Lets have Lucas give this a run and we ca

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Cong Wang
On Tue, Jan 15, 2019 at 7:59 AM Jamal Hadi Salim wrote: > > On 2019-01-13 4:08 p.m., Cong Wang wrote: > > On Sat, Jan 12, 2019 at 7:41 AM Jamal Hadi Salim wrote: > >> > >> On 2019-01-12 7:23 a.m., Jamal Hadi Salim wrote: > >> > >>> Do we have a test case for a setup like this in tdc? > >>> i.e in

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Jamal Hadi Salim
On 2019-01-15 10:59 a.m., Jamal Hadi Salim wrote: On 2019-01-13 4:08 p.m., Cong Wang wrote: On Sat, Jan 12, 2019 at 7:41 AM Jamal Hadi Salim [..] I agree with your rationale. Lets have Lucas give this a run and we can move forward. And as an addendum - Martin corrected me, he did have a "c

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Jamal Hadi Salim
On 2019-01-13 4:08 p.m., Cong Wang wrote: On Sat, Jan 12, 2019 at 7:41 AM Jamal Hadi Salim wrote: On 2019-01-12 7:23 a.m., Jamal Hadi Salim wrote: Do we have a test case for a setup like this in tdc? i.e incoming tagged and then vlan popped by action? Otherwise a test with IFE which resets t

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Jamal Hadi Salim
On 2019-01-14 4:15 a.m., Martin Olsson wrote: "did this setup use to work before? If yes, rough idea of which kernels?" Unknown. I haven't tried it before. Ok, IMO we are dealing with vlan breakage. cheers, jamal

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-15 Thread Jamal Hadi Salim
On 2019-01-13 3:58 p.m., Cong Wang wrote: On Sat, Jan 12, 2019 at 4:23 AM Jamal Hadi Salim wrote: Cong, I am a little worried about the impact of this change. Smells more like it has to do with Vlan action or related issues than with reclassifying. You can verify this patch with Martin's test

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Lucas Bates
On Sat, Jan 12, 2019 at 7:23 AM Jamal Hadi Salim wrote: > > On 2019-01-11 9:55 p.m., Cong Wang wrote: > > Martin reported a set of filters don't work after changing > > from reclassify to continue. Looking into the code, it > > looks like skb protocol is not always fetched for each > > iteration o

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Cong Wang
On Mon, Jan 14, 2019 at 1:23 AM Daniel Borkmann wrote: > Can't we do something like the below instead? Otherwise we'll needlessly > refetch > protocol every time there is a mismatch in above tp->protocol check as well. Does this save anything given the fact we simply return if err>=0? The proto

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Daniel Borkmann
On 01/12/2019 03:55 AM, Cong Wang wrote: > Martin reported a set of filters don't work after changing > from reclassify to continue. Looking into the code, it > looks like skb protocol is not always fetched for each > iteration of the filters. But, as demonstrated by Martin, > TC actions could modi

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Martin Olsson
"did this setup use to work before? If yes, rough idea of which kernels?" Unknown. I haven't tried it before. /Martin On Sat, 12 Jan 2019, Jamal Hadi Salim wrote: On 2019-01-11 9:55 p.m., Cong Wang wrote: Martin reported a set of filters don't work after changing from reclassify to cont

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-13 Thread Cong Wang
On Sat, Jan 12, 2019 at 7:41 AM Jamal Hadi Salim wrote: > > On 2019-01-12 7:23 a.m., Jamal Hadi Salim wrote: > > > Do we have a test case for a setup like this in tdc? > > i.e incoming tagged and then vlan popped by action? > > Otherwise a test with IFE which resets the ethertype > > would be suff

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-13 Thread Cong Wang
On Sat, Jan 12, 2019 at 4:23 AM Jamal Hadi Salim wrote: > Cong, > I am a little worried about the impact of this change. Smells > more like it has to do with Vlan action or related issues > than with reclassifying. You can verify this patch with Martin's test case. I verified it with the script b

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-12 Thread Jamal Hadi Salim
On 2019-01-12 7:23 a.m., Jamal Hadi Salim wrote: Do we have a test case for a setup like this in tdc? i.e incoming tagged and then vlan popped by action? Otherwise a test with IFE which resets the ethertype would be sufficient i.e just something that will messup with skb->protocol. And here is

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-12 Thread Jamal Hadi Salim
On 2019-01-11 9:55 p.m., Cong Wang wrote: Martin reported a set of filters don't work after changing from reclassify to continue. Looking into the code, it looks like skb protocol is not always fetched for each iteration of the filters. But, as demonstrated by Martin, TC actions could modify skb-

[Patch net] net_sched: refetch skb protocol for each filter

2019-01-11 Thread Cong Wang
Martin reported a set of filters don't work after changing from reclassify to continue. Looking into the code, it looks like skb protocol is not always fetched for each iteration of the filters. But, as demonstrated by Martin, TC actions could modify skb->protocol, for example act_vlan, this means