* [LARTC] [PATCH] mark in u32
@ 2005-01-05 10:05 Catalin(ux aka Dino) BOIE
2005-01-05 14:59 ` Andy Furniss
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: Catalin(ux aka Dino) BOIE @ 2005-01-05 10:05 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: TEXT/PLAIN, Size: 457 bytes --]
Hello, Stephen, List!
Attached is the patch for iproute2 to add the possibility to use fwmark in
u32 filters.
The kernel part was included in 2.6.10.
Please apply!
Thank you!
For more info:
- Kernel patch (not needed for 2.6.10):
http://kernel.umbrella.ro/net/mark_in_u32/net-match-nfmark-in-u32.patch
- Examples:
http://kernel.umbrella.ro/net/mark_in_u32/examples.txt
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
[-- Attachment #2: Type: TEXT/PLAIN, Size: 4067 bytes --]
--- iproute2-2.6.9/tc/f_u32.c.orig 2004-11-04 15:38:53.000000000 +0200
+++ iproute2-2.6.9/tc/f_u32.c 2004-11-09 13:59:00.000000000 +0200
@@ -7,6 +7,7 @@
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Match mark added by Catalin(ux aka Dino) BOIE <catab at umbrella.ro> [5 nov 2004]
*
*/
@@ -33,7 +34,7 @@ static void explain(void)
fprintf(stderr, "or u32 divisor DIVISOR\n");
fprintf(stderr, "\n");
fprintf(stderr, "Where: SELECTOR := SAMPLE SAMPLE ...\n");
- fprintf(stderr, " SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} } SAMPLE_ARGS\n");
+ fprintf(stderr, " SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} | mark } SAMPLE_ARGS\n");
fprintf(stderr, " FILTERID := X:Y:Z\n");
}
@@ -590,9 +591,42 @@ done:
return res;
}
+static int parse_mark(int *argc_p, char ***argv_p, struct nlmsghdr *n)
+{
+ int res = -1;
+ int argc = *argc_p;
+ char **argv = *argv_p;
+ struct tc_u32_mark mark;
+
+ if (argc <= 1)
+ return -1;
+
+ if (get_u32(&mark.val, *argv, 0)) {
+ fprintf(stderr, "Illegal \"mark\" value\n");
+ return -1;
+ }
+ NEXT_ARG();
+
+ if (get_u32(&mark.mask, *argv, 0)) {
+ fprintf(stderr, "Illegal \"mark\" mask\n");
+ return -1;
+ }
+ NEXT_ARG();
+
+ if ((mark.val & mark.mask) != mark.val) {
+ fprintf(stderr, "Illegal \"mark\" (impossible combination)\n");
+ return -1;
+ }
+ addattr_l(n, MAX_MSG, TCA_U32_MARK, &mark, sizeof(mark));
+ res = 0;
+
+ *argc_p = argc;
+ *argv_p = argv;
+ return res;
+}
-static int parse_selector(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
+static int parse_selector(int *argc_p, char ***argv_p, struct tc_u32_sel *sel, struct nlmsghdr *n)
{
int argc = *argc_p;
char **argv = *argv_p;
@@ -641,6 +675,12 @@ static int parse_selector(int *argc_p, c
res = parse_icmp(&argc, &argv, sel);
goto done;
}
+ if (matches(*argv, "mark") == 0) {
+ NEXT_ARG();
+ res = parse_mark(&argc, &argv, n);
+ goto done;
+ }
+
return -1;
done:
@@ -760,7 +800,7 @@ static int u32_parse_opt(struct filter_u
while (argc > 0) {
if (matches(*argv, "match") == 0) {
NEXT_ARG();
- if (parse_selector(&argc, &argv, &sel.sel)) {
+ if (parse_selector(&argc, &argv, &sel.sel, n)) {
fprintf(stderr, "Illegal \"match\"\n");
return -1;
}
@@ -839,7 +879,7 @@ static int u32_parse_opt(struct filter_u
struct tc_u32_key keys[4];
} sel2;
NEXT_ARG();
- if (parse_selector(&argc, &argv, &sel2.sel)) {
+ if (parse_selector(&argc, &argv, &sel2.sel, n)) {
fprintf(stderr, "Illegal \"sample\"\n");
return -1;
}
@@ -964,11 +1004,22 @@ static int u32_print_opt(struct filter_u
pf = RTA_DATA(tb[TCA_U32_PCNT]);
}
+ if (sel && show_stats && NULL != pf)
+ fprintf(f, " (rule hit %llu success %llu)",pf->rcnt,pf->rhit);
+
+ if (tb[TCA_U32_MARK]) {
+ struct tc_u32_mark *mark = RTA_DATA(tb[TCA_U32_MARK]);
+ if (RTA_PAYLOAD(tb[TCA_U32_MARK]) < sizeof(*mark)) {
+ fprintf(f, "\n Invalid mark (kernel&iproute2 mismatch)\n");
+ } else {
+ fprintf(f, "\n mark 0x%04x 0x%04x (success %d)",
+ mark->val, mark->mask, mark->success);
+ }
+ }
+
if (sel) {
int i;
struct tc_u32_key *key = sel->keys;
- if (show_stats && NULL != pf)
- fprintf(f, " (rule hit %llu success %llu)",pf->rcnt,pf->rhit);
if (sel->nkeys) {
for (i=0; i<sel->nkeys; i++, key++) {
fprintf(f, "\n match %08x/%08x at %s%d",
--- iproute2-2.6.9/include/linux/pkt_cls.h.orig 2004-11-04 15:42:27.000000000 +0200
+++ iproute2-2.6.9/include/linux/pkt_cls.h 2004-11-09 13:58:15.000000000 +0200
@@ -190,6 +190,7 @@ enum
TCA_U32_ACT,
TCA_U32_INDEV,
TCA_U32_PCNT,
+ TCA_U32_MARK,
__TCA_U32_MAX
};
@@ -224,6 +225,14 @@ struct tc_u32_pcnt
__u64 rhit;
__u64 kcnts[0];
};
+
+struct tc_u32_mark
+{
+ __u32 val;
+ __u32 mask;
+ __u32 success;
+};
+
/* Flags */
#define TC_U32_TERMINAL 1
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
@ 2005-01-05 14:59 ` Andy Furniss
2005-01-05 15:10 ` Thomas Graf
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-05 14:59 UTC (permalink / raw)
To: lartc
Catalin(ux aka Dino) BOIE wrote:
> Hello, Stephen, List!
>
> Attached is the patch for iproute2 to add the possibility to use fwmark
> in u32 filters.
> The kernel part was included in 2.6.10.
>
> Please apply!
> Thank you!
>
> For more info:
> - Kernel patch (not needed for 2.6.10):
> http://kernel.umbrella.ro/net/mark_in_u32/net-match-nfmark-in-u32.patch
>
> - Examples:
> http://kernel.umbrella.ro/net/mark_in_u32/examples.txt
>
> ---
> Catalin(ux aka Dino) BOIE
> catab at deuroconsult.ro
> http://kernel.umbrella.ro/
That looks handy :-) Do you know why fw mark doesn't work with policers
in 2.6 (assuming it's not just me)
To stephen - I may be wrong here but in the readme it says that default
kernel include is /usr/src/linux/include but if I grep for
KERNEL_INCLUDE I see :-
./Makefile:KERNEL_INCLUDE:=/usr/include
./Makefile:CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
./Makefile: ./configure $(KERNEL_INCLUDE)
./README:KERNEL_INCLUDE should point to correct linux kernel include
directory.
ISTR having to mess about a bit last time when applying esfq patch to
get it to work.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
2005-01-05 14:59 ` Andy Furniss
@ 2005-01-05 15:10 ` Thomas Graf
2005-01-05 15:25 ` Andy Furniss
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Thomas Graf @ 2005-01-05 15:10 UTC (permalink / raw)
To: lartc
> That looks handy :-) Do you know why fw mark doesn't work with policers
> in 2.6 (assuming it's not just me)
Be prepared to see it removed again in favour of the meta extended
match. Don't rely too much on it.
Regarding fw, what exactly is not working? fw doesn't handle police
results properly, the patchset at http://people.suug.ch/~tgr/patches/pending/
fixes this. Given its another issue, I would be curious to know what
exactly is not working.
> ISTR having to mess about a bit last time when applying esfq patch to
> get it to work.
Would you guys like to see esfq included in mainline?
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
2005-01-05 14:59 ` Andy Furniss
2005-01-05 15:10 ` Thomas Graf
@ 2005-01-05 15:25 ` Andy Furniss
2005-01-05 15:52 ` Thomas Graf
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-05 15:25 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
>>That looks handy :-) Do you know why fw mark doesn't work with policers
>>in 2.6 (assuming it's not just me)
>
>
> Be prepared to see it removed again in favour of the meta extended
> match. Don't rely too much on it.
I searched a bit around meta data recently but couldn't find much - do
you have any links?
>
> Regarding fw, what exactly is not working? fw doesn't handle police
> results properly, the patchset at http://people.suug.ch/~tgr/patches/pending/
> fixes this. Given its another issue, I would be curious to know what
> exactly is not working.
It was for a test I did, though I notice some of the diffserv examples
use it aswell (albeit with ipchains).
http://marc.theaimsgroup.com/?l=lartc&m\x110122532022827&w=2
>
>
>>ISTR having to mess about a bit last time when applying esfq patch to
>>get it to work.
>
>
> Would you guys like to see esfq included in mainline?
>
Yea - that would be great :-)
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (2 preceding siblings ...)
2005-01-05 15:25 ` Andy Furniss
@ 2005-01-05 15:52 ` Thomas Graf
2005-01-05 16:40 ` Andy Furniss
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Thomas Graf @ 2005-01-05 15:52 UTC (permalink / raw)
To: lartc
* Andy Furniss <41DC06D8.70301@dsl.pipex.com> 2005-01-05 15:25
> Thomas Graf wrote:
> >>That looks handy :-) Do you know why fw mark doesn't work with policers
> >>in 2.6 (assuming it's not just me)
> >
> >
> >Be prepared to see it removed again in favour of the meta extended
> >match. Don't rely too much on it.
>
> I searched a bit around meta data recently but couldn't find much - do
> you have any links?
http://oss.sgi.com/archives/netdev/2004-12/msg00767.html
http://oss.sgi.com/archives/netdev/2005-01/msg00028.html
> http://marc.theaimsgroup.com/?l=lartc&m\x110122532022827&w=2
Do you see the police/action stats being updated? i.e. does
the matching itself work?
Ingress qdisc reads from prerouting hook as well, might be
a priority issue.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (3 preceding siblings ...)
2005-01-05 15:52 ` Thomas Graf
@ 2005-01-05 16:40 ` Andy Furniss
2005-01-05 23:44 ` Stephen Hemminger
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-05 16:40 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
> * Andy Furniss <41DC06D8.70301@dsl.pipex.com> 2005-01-05 15:25
>
>>Thomas Graf wrote:
>>
>>>>That looks handy :-) Do you know why fw mark doesn't work with policers
>>>>in 2.6 (assuming it's not just me)
>>>
>>>
>>>Be prepared to see it removed again in favour of the meta extended
>>>match. Don't rely too much on it.
>>
>>I searched a bit around meta data recently but couldn't find much - do
>>you have any links?
>
>
> http://oss.sgi.com/archives/netdev/2004-12/msg00767.html
> http://oss.sgi.com/archives/netdev/2005-01/msg00028.html
Thanks.
>
>
>>http://marc.theaimsgroup.com/?l=lartc&m\x110122532022827&w=2
>
>
> Do you see the police/action stats being updated? i.e. does
> the matching itself work?
From memory yes - counters showed OK on iptables and tc -s qdisc ls dev
eth0 just no drops
I'll repeat tonight to be sure.
Andy.
>
> Ingress qdisc reads from prerouting hook as well, might be
> a priority issue.
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (4 preceding siblings ...)
2005-01-05 16:40 ` Andy Furniss
@ 2005-01-05 23:44 ` Stephen Hemminger
2005-01-06 8:53 ` Andy Furniss
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2005-01-05 23:44 UTC (permalink / raw)
To: lartc
On Wed, 05 Jan 2005 14:59:44 +0000
Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
> Catalin(ux aka Dino) BOIE wrote:
> > Hello, Stephen, List!
> >
> > Attached is the patch for iproute2 to add the possibility to use fwmark
> > in u32 filters.
> > The kernel part was included in 2.6.10.
> >
> > Please apply!
> > Thank you!
> >
> > For more info:
> > - Kernel patch (not needed for 2.6.10):
> > http://kernel.umbrella.ro/net/mark_in_u32/net-match-nfmark-in-u32.patch
> >
> > - Examples:
> > http://kernel.umbrella.ro/net/mark_in_u32/examples.txt
> >
> > ---
> > Catalin(ux aka Dino) BOIE
> > catab at deuroconsult.ro
> > http://kernel.umbrella.ro/
>
> That looks handy :-) Do you know why fw mark doesn't work with policers
> in 2.6 (assuming it's not just me)
>
> To stephen - I may be wrong here but in the readme it says that default
> kernel include is /usr/src/linux/include but if I grep for
> KERNEL_INCLUDE I see :-
>
> ./Makefile:KERNEL_INCLUDE:=/usr/include
> ./Makefile:CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
> ./Makefile: ./configure $(KERNEL_INCLUDE)
> ./README:KERNEL_INCLUDE should point to correct linux kernel include
> directory.
I changed away from Alexey's old KERNEL_INCLUDE, because it was necessary
for the package to be able to be compiled without depending on the kernel
header files. There were cases where new features needed to be compiled on
old systems where the definition was missing. Think about building current
iproute2 util's with 2.4.20 includes.
The current solution (though less than ideal) was to put stripped down
version of the routing specific includes into the iproute2 package.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (5 preceding siblings ...)
2005-01-05 23:44 ` Stephen Hemminger
@ 2005-01-06 8:53 ` Andy Furniss
2005-01-06 9:00 ` Andy Furniss
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-06 8:53 UTC (permalink / raw)
To: lartc
Stephen Hemminger wrote:
> On Wed, 05 Jan 2005 14:59:44 +0000
> Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
>
>
>>Catalin(ux aka Dino) BOIE wrote:
>>
>>>Hello, Stephen, List!
>>>
>>>Attached is the patch for iproute2 to add the possibility to use fwmark
>>>in u32 filters.
>>>The kernel part was included in 2.6.10.
>>>
>>>Please apply!
>>>Thank you!
>>>
>>>For more info:
>>>- Kernel patch (not needed for 2.6.10):
>>>http://kernel.umbrella.ro/net/mark_in_u32/net-match-nfmark-in-u32.patch
>>>
>>>- Examples:
>>>http://kernel.umbrella.ro/net/mark_in_u32/examples.txt
>>>
>>>---
>>>Catalin(ux aka Dino) BOIE
>>>catab at deuroconsult.ro
>>>http://kernel.umbrella.ro/
>>
>>That looks handy :-) Do you know why fw mark doesn't work with policers
>>in 2.6 (assuming it's not just me)
>>
>>To stephen - I may be wrong here but in the readme it says that default
>>kernel include is /usr/src/linux/include but if I grep for
>>KERNEL_INCLUDE I see :-
>>
>>./Makefile:KERNEL_INCLUDE:=/usr/include
>>./Makefile:CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
>>./Makefile: ./configure $(KERNEL_INCLUDE)
>>./README:KERNEL_INCLUDE should point to correct linux kernel include
>>directory.
>
>
> I changed away from Alexey's old KERNEL_INCLUDE, because it was necessary
> for the package to be able to be compiled without depending on the kernel
> header files. There were cases where new features needed to be compiled on
> old systems where the definition was missing. Think about building current
> iproute2 util's with 2.4.20 includes.
>
> The current solution (though less than ideal) was to put stripped down
> version of the routing specific includes into the iproute2 package.
>
Ahh I see, thanks for the explanation.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (6 preceding siblings ...)
2005-01-06 8:53 ` Andy Furniss
@ 2005-01-06 9:00 ` Andy Furniss
2005-01-06 9:50 ` Thomas Graf
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-06 9:00 UTC (permalink / raw)
To: lartc
Andy Furniss wrote:
> Thomas Graf wrote:
>>
>> Do you see the police/action stats being updated? i.e. does
>> the matching itself work?
>
>
> From memory yes - counters showed OK on iptables and tc -s qdisc ls dev
> eth0 just no drops
>
> I'll repeat tonight to be sure.
I retried with a vanilla 2.6.10 + iptables 1.2.11 on a different box and
it is the same.
The only difference between working and not working cases when using tc
-s qdisc ls dev eth0 is the drops count. The stats are OK apart from that.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (7 preceding siblings ...)
2005-01-06 9:00 ` Andy Furniss
@ 2005-01-06 9:50 ` Thomas Graf
2005-01-06 13:27 ` Andy Furniss
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Thomas Graf @ 2005-01-06 9:50 UTC (permalink / raw)
To: lartc
* Andy Furniss <41DCFE27.4030704@dsl.pipex.com> 2005-01-06 09:00
> I retried with a vanilla 2.6.10 + iptables 1.2.11 on a different box and
> it is the same.
2 options:
1) get latest -bk snapshot and apply http://people.suug.ch/~tgr/patches/pending/
The patchset fixes a lot of small issues, adds action capabilities to
all classifiers, and extends tcindex and route classifier to be changeable
during runtime. If problem remains, goto to 2.
2) Provided detailed information about how your police configuration
looks like, wehther you are using CONFIG_NET_CLS_ACT, etc. so I can fix it.
> The only difference between working and not working cases when using tc
> -s qdisc ls dev eth0 is the drops count. The stats are OK apart from that.
And it is definitely classifier specific to fw?
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (8 preceding siblings ...)
2005-01-06 9:50 ` Thomas Graf
@ 2005-01-06 13:27 ` Andy Furniss
2005-01-06 16:45 ` Thomas Graf
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-06 13:27 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
> * Andy Furniss <41DCFE27.4030704@dsl.pipex.com> 2005-01-06 09:00
>
>>I retried with a vanilla 2.6.10 + iptables 1.2.11 on a different box and
>>it is the same.
>
>
> 2 options:
> 1) get latest -bk snapshot and apply http://people.suug.ch/~tgr/patches/pending/
> The patchset fixes a lot of small issues, adds action capabilities to
> all classifiers, and extends tcindex and route classifier to be changeable
> during runtime. If problem remains, goto to 2.
Could take some time - I don't have bitkeeper and will have to find some
disk space. I'll try soon(ish).
> 2) Provided detailed information about how your police configuration
> looks like, wehther you are using CONFIG_NET_CLS_ACT, etc. so I can fix it.
I just tried some variations - but get an error - I am using new tc and get
RTNETLINK answers: Invalid argument
We have an error talking to the kernel
with the last 2 - see below.
>
>
>>The only difference between working and not working cases when using tc
>>-s qdisc ls dev eth0 is the drops count. The stats are OK apart from that.
>
>
> And it is definitely classifier specific to fw?
I don't know what should I test with :-)
tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 match ip src
0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
Works OK.
tc filter add dev eth0 parent ffff: protocol 6 prio 1 u32 match ip src
0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
Doesn't work even on 2.4 that fw test works on.
[andy@amd ~]$ grep NET_CLS /boot/config-lfs-5.1-2.4.26
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_POLICE=y
Is the 2.4 that's OK.
[andy@amd ~]$ grep NET_CLS /boot/config-2.6.10
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y
Is the fail on fw but work on ip src 0.0.0.0/0
Below are the ones that throw an error when I tc filter add (anything)
tc qdisc add dev eth0 handle ffff: ingress is OK
[andy@amd ~]$ grep NET_CLS /boot/config-2.6.10-2
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y
[andy@amd ~]$ grep NET_CLS /boot/config-2.6.10-3
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_CLS_POLICE=y
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (9 preceding siblings ...)
2005-01-06 13:27 ` Andy Furniss
@ 2005-01-06 16:45 ` Thomas Graf
2005-01-06 23:23 ` Andy Furniss
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Thomas Graf @ 2005-01-06 16:45 UTC (permalink / raw)
To: lartc
* Andy Furniss <41DD3CBC.1010108@dsl.pipex.com> 2005-01-06 13:27
> Thomas Graf wrote:
> >* Andy Furniss <41DCFE27.4030704@dsl.pipex.com> 2005-01-06 09:00
> >
> >>I retried with a vanilla 2.6.10 + iptables 1.2.11 on a different box and
> >>it is the same.
> >
> >
> >2 options:
> > 1) get latest -bk snapshot and apply
> > http://people.suug.ch/~tgr/patches/pending/
> > The patchset fixes a lot of small issues, adds action capabilities to
> > all classifiers, and extends tcindex and route classifier to be
> > changeable
> > during runtime. If problem remains, goto to 2.
>
> Could take some time - I don't have bitkeeper and will have to find some
> disk space. I'll try soon(ish).
You don't need bitkeeper, just download the .10 and the latest patch to
get to -bk8 then apply my patches.
> tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 match ip src
> 0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
>
> Works OK.
>
> tc filter add dev eth0 parent ffff: protocol 6 prio 1 u32 match ip src
> 0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
Use a different prio, one that is not yet occupied by a protocol/kind
tuple.
> [andy@amd ~]$ grep NET_CLS /boot/config-2.6.10
> CONFIG_NET_CLS=y
> CONFIG_NET_CLS_TCINDEX=m
> CONFIG_NET_CLS_ROUTE4=m
> CONFIG_NET_CLS_ROUTE=y
> CONFIG_NET_CLS_FW=m
> CONFIG_NET_CLS_U32=m
> # CONFIG_NET_CLS_IND is not set
> CONFIG_NET_CLS_RSVP=m
> CONFIG_NET_CLS_RSVP6=m
> CONFIG_NET_CLS_ACT=y
CONFIG_NET_CLS_ACT_POLICE?
> [andy@amd ~]$ grep NET_CLS /boot/config-2.6.10-2
> CONFIG_NET_CLS=y
> CONFIG_NET_CLS_TCINDEX=m
> CONFIG_NET_CLS_ROUTE4=m
> CONFIG_NET_CLS_ROUTE=y
> CONFIG_NET_CLS_FW=m
> CONFIG_NET_CLS_U32=m
> # CONFIG_NET_CLS_IND is not set
> CONFIG_NET_CLS_RSVP=m
> CONFIG_NET_CLS_RSVP6=m
> # CONFIG_NET_CLS_ACT is not set
> CONFIG_NET_CLS_POLICE=y
>
> [andy@amd ~]$ grep NET_CLS /boot/config-2.6.10-3
> CONFIG_NET_CLS=y
> CONFIG_NET_CLS_TCINDEX=m
> CONFIG_NET_CLS_ROUTE4=m
> CONFIG_NET_CLS_ROUTE=y
> CONFIG_NET_CLS_FW=m
> CONFIG_NET_CLS_U32=m
> # CONFIG_NET_CLS_IND is not set
> CONFIG_NET_CLS_RSVP=m
> CONFIG_NET_CLS_RSVP6=m
Gonna look at this, do you preload the modules and if not, do you have
the correct modutils version etc?
> CONFIG_NET_CLS_ACT=y
> CONFIG_NET_CLS_POLICE=y
This is not valid and has been fixed in bk.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (10 preceding siblings ...)
2005-01-06 16:45 ` Thomas Graf
@ 2005-01-06 23:23 ` Andy Furniss
2005-01-06 23:25 ` Thomas Graf
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-06 23:23 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
> You don't need bitkeeper, just download the .10 and the latest patch to
> get to -bk8 then apply my patches.
>
>
>>tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 match ip src
>>0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
>>
>>Works OK.
>>
>>tc filter add dev eth0 parent ffff: protocol 6 prio 1 u32 match ip src
>>0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1
>
>
> Use a different prio, one that is not yet occupied by a protocol/kind
> tuple.
OK will try.
>
> CONFIG_NET_CLS_ACT_POLICE?
I can't find it! neither can grep .config
This could be it. I just deleted everything to do with 2.6.10, booted
into 2.6.9 to start again with fresh 2.6.10 source tree.
When I do make menuconfig I notice it uses defaults from
/boot/config-2.6.9 (I will remove and try again later).
So maybe this is why I can't find CONFIG_NET_CLS_ACT_POLICE ?
>>[andy@amd ~]$ grep NET_CLS /boot/config-2.6.10-3
>>CONFIG_NET_CLS=y
>>CONFIG_NET_CLS_TCINDEX=m
>>CONFIG_NET_CLS_ROUTE4=m
>>CONFIG_NET_CLS_ROUTE=y
>>CONFIG_NET_CLS_FW=m
>>CONFIG_NET_CLS_U32=m
>># CONFIG_NET_CLS_IND is not set
>>CONFIG_NET_CLS_RSVP=m
>>CONFIG_NET_CLS_RSVP6=m
>
>
> Gonna look at this, do you preload the modules and if not, do you have
> the correct modutils version etc?
Sorry - don't waste your time - I goofed my bzImage / GRUB naming so I
was loading the first one I did all along.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (11 preceding siblings ...)
2005-01-06 23:23 ` Andy Furniss
@ 2005-01-06 23:25 ` Thomas Graf
2005-01-06 23:35 ` Andy Furniss
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Thomas Graf @ 2005-01-06 23:25 UTC (permalink / raw)
To: lartc
* Andy Furniss <41DDC858.6010908@dsl.pipex.com> 2005-01-06 23:23
> >CONFIG_NET_CLS_ACT_POLICE?
>
> I can't find it! neither can grep .config
Sorry, it's called CONFIG_NET_ACT_POLICE
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (12 preceding siblings ...)
2005-01-06 23:25 ` Thomas Graf
@ 2005-01-06 23:35 ` Andy Furniss
2005-01-07 2:45 ` Andy Furniss
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-06 23:35 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
> * Andy Furniss <41DDC858.6010908@dsl.pipex.com> 2005-01-06 23:23
>
>>>CONFIG_NET_CLS_ACT_POLICE?
>>
>>I can't find it! neither can grep .config
>
>
> Sorry, it's called CONFIG_NET_ACT_POLICE
>
OK - will be booting back into LFS to try soon.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (13 preceding siblings ...)
2005-01-06 23:35 ` Andy Furniss
@ 2005-01-07 2:45 ` Andy Furniss
2005-01-07 10:29 ` Andy Furniss
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-07 2:45 UTC (permalink / raw)
To: lartc
Andy Furniss wrote:
> Thomas Graf wrote:
>
>> * Andy Furniss <41DDC858.6010908@dsl.pipex.com> 2005-01-06 23:23
>>
>>>> CONFIG_NET_CLS_ACT_POLICE?
>>>
>>>
>>> I can't find it! neither can grep .config
>>
>>
>>
>> Sorry, it's called CONFIG_NET_ACT_POLICE
>>
>
> OK - will be booting back into LFS to try soon.
Still no luck - I got build errors with bk8 (same type as below in fbdev
IIRC) so tried bk9 and got error below. I've seen that before with
2.95.3 (though it was mandrakes not LFS - had to move some vars up to
top to get Ed Wildgooses dsl patch to compile IIRC) so I tried bk8 with
gcc 3.3 and it built OK, but still no luck + my usb intelli mouse didn't
work.
I tried the prio change on a 2.4 but it makes no difference.
I have CONFIG_NET_ACT_POLICE in all my configs and police auto loads OK
on 2.6.9 (haven't checked others yet)- the 2.6.10-bk8 didn't autoload it
though, but modprobe first didn't help.
Probably lots more to try/check but it's getting late :-)
Does my initial test case work OK for you guys ?
http://marc.theaimsgroup.com/?l=lartc&m\x110122532022827&w=2
The build error -
CC net/sched/sch_generic.o
CC net/sched/sch_api.o
CC net/sched/sch_fifo.o
CC net/sched/cls_api.o
net/sched/cls_api.c: In function `tcf_exts_validate':
net/sched/cls_api.c:467: parse error before `int'
net/sched/cls_api.c:471: `act' undeclared (first use in this function)
net/sched/cls_api.c:471: (Each undeclared identifier is reported only once
net/sched/cls_api.c:471: for each function it appears in.)
net/sched/cls_api.c:472: `err' undeclared (first use in this function)
make[2]: *** [net/sched/cls_api.o] Error 1
make[1]: *** [net/sched] Error 2
make: *** [net] Error 2
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (14 preceding siblings ...)
2005-01-07 2:45 ` Andy Furniss
@ 2005-01-07 10:29 ` Andy Furniss
2005-01-08 2:34 ` Andy Furniss
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-07 10:29 UTC (permalink / raw)
To: lartc
Andy Furniss wrote:
> my usb intelli mouse didn't
> work.
>
the 2.6.10-bk8 didn't autoload it
> though,
Of course putting -bk8 on my /boot/System.map-2.6.10 will fix that ...
Will try more tonight.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (15 preceding siblings ...)
2005-01-07 10:29 ` Andy Furniss
@ 2005-01-08 2:34 ` Andy Furniss
2005-01-08 4:14 ` gypsy
2005-01-08 4:58 ` gypsy
18 siblings, 0 replies; 20+ messages in thread
From: Andy Furniss @ 2005-01-08 2:34 UTC (permalink / raw)
To: lartc
Andy Furniss wrote:
> Andy Furniss wrote:
>
>> my usb intelli mouse didn't work.
>>
> the 2.6.10-bk8 didn't autoload it
>
>> though,
>
>
> Of course putting -bk8 on my /boot/System.map-2.6.10 will fix that ...
It didn't :-( but I tried more on 2.6.9 and found a u32 that works -
tc filter add dev eth0 parent ffff: prio 1 protocol ip u32 match ip
protocol 6 0xff police rate 100kbit burst 10k drop flowid :1
is OK so maybe it is just the fw case that fails.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (16 preceding siblings ...)
2005-01-08 2:34 ` Andy Furniss
@ 2005-01-08 4:14 ` gypsy
2005-01-08 4:58 ` gypsy
18 siblings, 0 replies; 20+ messages in thread
From: gypsy @ 2005-01-08 4:14 UTC (permalink / raw)
To: lartc
Thomas Graf wrote:
>
> Would you guys like to see esfq included in mainline?
YES!!
gypsy
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [LARTC] [PATCH] mark in u32
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
` (17 preceding siblings ...)
2005-01-08 4:14 ` gypsy
@ 2005-01-08 4:58 ` gypsy
18 siblings, 0 replies; 20+ messages in thread
From: gypsy @ 2005-01-08 4:58 UTC (permalink / raw)
To: lartc
gypsy wrote:
>
> Thomas Graf wrote:
> >
>
> > Would you guys like to see esfq included in mainline?
>
> YES!!
>
> gypsy
Thomas,
Let me rephrase that.
I can't think of any reason that SFQ should be maintained without the E
<grin>. It makes very little sense to hard code parameters that the
user might wish or need to supply. That's the reason for ESFQ. When no
parameters are given, it _is_ SFQ; when there are parameters it complies
with ones wishes.
Name it what you like, but SFQ desperately needs to accept paramters,
and ESFQ should be the only SFQ.
gypsy
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2005-01-08 4:58 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-05 10:05 [LARTC] [PATCH] mark in u32 Catalin(ux aka Dino) BOIE
2005-01-05 14:59 ` Andy Furniss
2005-01-05 15:10 ` Thomas Graf
2005-01-05 15:25 ` Andy Furniss
2005-01-05 15:52 ` Thomas Graf
2005-01-05 16:40 ` Andy Furniss
2005-01-05 23:44 ` Stephen Hemminger
2005-01-06 8:53 ` Andy Furniss
2005-01-06 9:00 ` Andy Furniss
2005-01-06 9:50 ` Thomas Graf
2005-01-06 13:27 ` Andy Furniss
2005-01-06 16:45 ` Thomas Graf
2005-01-06 23:23 ` Andy Furniss
2005-01-06 23:25 ` Thomas Graf
2005-01-06 23:35 ` Andy Furniss
2005-01-07 2:45 ` Andy Furniss
2005-01-07 10:29 ` Andy Furniss
2005-01-08 2:34 ` Andy Furniss
2005-01-08 4:14 ` gypsy
2005-01-08 4:58 ` gypsy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.