Skip to contentSkip to conversation

proposal of xt_physdev's patch to limit traffic

DISCUSSION ahmed amamou 4 participants 4 messages Oct 21, 2010

lore
Share & tools
lore
#0 lore raw

Good morning every Body

I'm new in modules programming and I've made a patch to limit packet traffic in bridge(patch is joined with the mail).

In order to limit the traffic, i used the netback limitation method to count traffic with skb->len for each vif to stop traffic, as i can't put down vif, i change the hotdrop flag to 1 (change was based on xt_physdev of dom 0 2.6.18.8 so in the patch will find it 1 but it's easy to change the patch to recent dom 0 version by just changing *hotdrop=1; to *par->hotdrop=true;)

The problem that i have is that when i reach traffic limit (30mb/s by defaut and can be changed via proc EX: "echo vif1.0 312500,50000' >/proc/changeRXrate know that doing it via proc is the worst way but i don't know any other way to do it any suggestion will be welcome ) and begin drop traffic fell terribly and became 10mb/s

will be really thankful if anybody could help me with suggestions and advices in order to solve this problem

Sincerly

Ahmed AMAMOU

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 12 lines · ahmed amamou

Good morning every Body

I'm new in modules programming and I've made a patch to limit packet traffic in bridge(patch is joined with the mail).

In order to limit the traffic, i used the netback limitation method to count traffic with skb->len for each vif to stop traffic, as i can't put down vif, i change the hotdrop flag to 1 (change was based on xt_physdev of dom 0 2.6.18.8 so in the patch will find it 1 but it's easy to change the patch to recent dom 0 version by just changing *hotdrop=1; to *par->hotdrop=true;)

Quoted 8 lines

The problem that i have is that when i reach traffic limit (30mb/s by defaut and can be changed via proc EX: "echo vif1.0 312500,50000'

Quoted 1 line

/proc/changeRXrate know that doing it via proc is the worst way but i

don't know any other way to do it any suggestion will be welcome ) and begin drop traffic fell terribly and became 10mb/s

will be really thankful if anybody could help me with suggestions and advices in order to solve this problem

Isn't this possible with either QoS/tc possibly combined with IMQ (intermediate queueing device) ?

In either case, I think linux-net is the place to discuss this.

Gianni

#2 lore raw
In reply to ahmed amamou

Hi Ahmed,

Quoted 12 lines · ahmed amamou

Good morning every Body

I'm new in modules programming and I've made a patch to limit packet traffic in bridge(patch is joined with the mail).

In order to limit the traffic, i used the netback limitation method to count traffic with skb->len for each vif to stop traffic, as i can't put down vif, i change the hotdrop flag to 1 (change was based on xt_physdev of dom 0 2.6.18.8 so in the patch will find it 1 but it's easy to change the patch to recent dom 0 version by just changing *hotdrop=1; to *par->hotdrop=true;)

Quoted 8 lines

The problem that i have is that when i reach traffic limit (30mb/s by defaut and can be changed via proc EX: "echo vif1.0 312500,50000'

Quoted 1 line

/proc/changeRXrate know that doing it via proc is the worst way but i

don't know any other way to do it any suggestion will be welcome ) and begin drop traffic fell terribly and became 10mb/s

will be really thankful if anybody could help me with suggestions and advices in order to solve this problem

There doesn't seem to be anything particularly xen specific about your patch. I think you will likely find more people able to help on the netfilter lists (see the MAINTAINERS file).

However I'd first recommend reading Documentation/CodingStyle and Documentation/SubmittingPatches as well as rebasing to a much newer kernel than 2.6.18 (which is ancient even by Xen standards). You might find ./scripts/checkpatch.pl useful as a rough guide to the coding style fixes.

Ian.

#3 lore raw
In reply to ahmed amamou

I think you don't even need any new netfilter patches or features.

Just using "physdev" together with the "quota" match should be sufficient (maybe it's not in the 2.6.18 kernel, but definitely in recent or pv_ops kernels).

In addition, I don't think that the netfilter will be interested in a quota patch to physdev; physdev is meant to match the device a packages was coming from on a bridge - quotas are definitely the job of the quota match or QoS, not the physdev match.

Regards,
Felix

Am 21.10.2010 12:27, schrieb ahmed amamou:

Quoted 24 lines

Good morning every Body

I'm new in modules programming and I've made a patch to limit packet traffic in bridge(patch is joined with the mail).

In order to limit the traffic, i used the netback limitation method to count traffic with skb->len for each vif to stop traffic, as i can't put down vif, i change the hotdrop flag to 1 (change was based on xt_physdev of dom 0 2.6.18.8 so in the patch will find it 1 but it's easy to change the patch to recent dom 0 version by just changing *hotdrop=1; to *par->hotdrop=true;)

The problem that i have is that when i reach traffic limit (30mb/s by defaut and can be changed via proc EX: "echo vif1.0 312500,50000'

Quoted 1 line

/proc/changeRXrate know that doing it via proc is the worst way but i

don't know any other way to do it any suggestion will be welcome ) and begin drop traffic fell terribly and became 10mb/s

will be really thankful if anybody could help me with suggestions and advices in order to solve this problem

Sincerly

Quoted 7 lines

Ahmed AMAMOU

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel