Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-17 Thread Jamal Hadi Salim
On 09/14/15 18:04, Cong Wang wrote: That is exactly the original code. But it is not readable at all, at least I still missed it when I touched the tp->init() part. :( Having a boolean doesn't harm anything. The default should really be no head alloced (given that is the main use case). The o

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-14 Thread Cong Wang
On Mon, Sep 14, 2015 at 5:28 AM, Jamal Hadi Salim wrote: > On 09/11/15 20:00, Cong Wang wrote: >> >> On Fri, Sep 11, 2015 at 3:24 PM, Akshat Kakkar >> wrote: > > >> Hmm, I didn't know that before either. Looks like my tp->init change >> breaks it. >> >> Could you try the following patch? >> > > I

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-14 Thread Jamal Hadi Salim
On 09/11/15 20:00, Cong Wang wrote: On Fri, Sep 11, 2015 at 3:24 PM, Akshat Kakkar wrote: Hmm, I didn't know that before either. Looks like my tp->init change breaks it. Could you try the following patch? I would just make init() empty for this classifier (return 0?). If someone wants to

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-11 Thread Cong Wang
On Fri, Sep 11, 2015 at 3:24 PM, Akshat Kakkar wrote: > There is no handle with fw filter. That's the whole point is. If > handle and class (flow id) is not specified, then whatever be the mark > on the packet, its automatically set as flowid. So if mark is 0x10003, > then this fw filter > > tc fi

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-11 Thread Akshat Kakkar
There is no handle with fw filter. That's the whole point is. If handle and class (flow id) is not specified, then whatever be the mark on the packet, its automatically set as flowid. So if mark is 0x10003, then this fw filter tc filter add dev eth0 parent 1:0 protocol ip fw will cause 0x10003 be

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-11 Thread Cong Wang
On Fri, Sep 11, 2015 at 9:34 AM, Akshat Kakkar wrote: > Recently I came to know that, > Without any options fw classifier maps fwmark to classid. > > tc filter add dev parent protocol ip prio 1 fw > > i.e. if my packet has mark(0x10001) and class id is not set, > then above tc filter, will set c

[fw filter]: Broken! fw mark based tc class selection not working

2015-09-11 Thread Akshat Kakkar
Recently I came to know that, Without any options fw classifier maps fwmark to classid. tc filter add dev parent protocol ip prio 1 fw i.e. if my packet has mark(0x10001) and class id is not set, then above tc filter, will set class id = 0x10001 i.e. 1:1 But when I am trying it out, its not wo