Closed gfreewind closed 9 years ago
The fix has passed my tests.
Hi, I try it too and patch on Gentoo kernel 4.0.5 works fine...
update: after qdisc restart kernel crash...
Ok. Then please accept the pull request after tests
I have fixed the crash issue.
I think you should configure the imq rule in localout hook. It is the process context.
I didn't consider about this case before, and it is not used in my env.
hi Feng i not find patch for kernel 4.0.0 please post link
----edit----
i found patch and now start build and test
Hi micron, you could use my fork link https://github.com/gfreewind/linuximq/blob/master/kernel/v4.x/linux-4.0-imq.diff
Hi Micron,
The 4.x patch file is not accepted by imq, so you could use my fork link above firstly
-------------- edit ---------------------------
I am waiting for your tests result:)
Hi gfreewind, now I was testing your last patch on Gentoo kernel 4.0.5.
with this easy script it works fine:
ip link set imq0 up ip link set imq1 up tc qdisc add dev imq0 root handle 1: htb default 2 tc qdisc add dev imq1 root handle 1: htb default 2 tc filter add dev imq0 parent 1: protocol ip u32 tc filter add dev imq1 parent 1: protocol ip u32 tc class add dev imq0 parent 1: classid 1:1 htb rate 50Mbit tc class add dev imq1 parent 1: classid 1:1 htb rate 50Mbit tc class add dev imq0 parent 1:1 classid 1:2 htb rate 1Kbit ceil 8Kbit prio 8 quantum 1514 tc class add dev imq1 parent 1:1 classid 1:2 htb rate 1Kbit ceil 8Kbit prio 8 quantum 1514
tc class add dev imq0 parent 1:1 classid 1:5 htb rate 1Kbit ceil 50Mbit prio 5 quantum 1515 tc class add dev imq1 parent 1:1 classid 1:5 htb rate 1Kbit ceil 50Mbit prio 5 quantum 1515 tc class add dev imq0 parent 1:5 classid 1:a htb rate 1Kbit ceil 1Mbit prio 5 quantum 1515 tc class add dev imq1 parent 1:5 classid 1:a htb rate 1Kbit ceil 5Mbit prio 5 quantum 1515
tc filter add dev imq0 parent 1: protocol ip prio 1 handle 2: u32 divisor 256 tc filter add dev imq1 parent 1: protocol ip prio 1 handle 2: u32 divisor 256 tc filter add dev imq0 protocol ip parent 1: prio 1 u32 ht 800:: match ip src 10.17.0.0/16 hashkey mask 0x0000ff00 at 12 link 2: tc filter add dev imq1 protocol ip parent 1: prio 1 u32 ht 800:: match ip dst 10.17.0.0/16 hashkey mask 0x0000ff00 at 16 link 2: tc filter add dev imq0 parent 1: protocol ip prio 1 handle 3: u32 divisor 256 tc filter add dev imq1 parent 1: protocol ip prio 1 handle 3: u32 divisor 256 tc filter add dev imq0 protocol ip parent 1: prio 1 u32 ht 2:fe match ip src 10.17.254.0/24 hashkey mask 0x000000ff at 12 link 3: tc filter add dev imq1 protocol ip parent 1: prio 1 u32 ht 2:fe match ip dst 10.17.254.0/24 hashkey mask 0x000000ff at 16 link 3: iptables -N acl-ipv4-10.17.254-src iptables -A FORWARD -s 10.17.254.0/24 -j acl-ipv4-10.17.254-src iptables -A acl-ipv4-10.17.254-src -j DROP
tc filter add dev imq0 protocol ip parent 1: prio 5 u32 ht 3:1: match ip src 10.17.254.1/32 flowid 1:a tc filter add dev imq1 protocol ip parent 1: prio 5 u32 ht 3:1: match ip dst 10.17.254.1/32 flowid 1:a iptables -I acl-ipv4-10.17.254-src -s 10.17.254.1 -j ACCEPT iptables -t mangle -A PREROUTING -i eth2 -j IMQ --todev 0 iptables -t mangle -A POSTROUTING -o eth2 -j IMQ --todev 1
bud I found situation when kernel crash: 1) interfaces are UP 2) qdiscs, class and filters are ON (the script) 3) and when i try shutdown interfaces before remove qdiscs every time kernel crash with this:
Jun 19 10:38:25 igw /etc/init.d/net.eth2[3871]: net.eth2: caught SIGINT, aborting
Jun 19 10:38:40 igw kernel: INFO: rcu_sched self-detected stall on CPU { 3} (t=60000 jiffies g=1491 c=1490 q=0)
Jun 19 10:38:40 igw kernel: Task dump for CPU 3:
Jun 19 10:38:40 igw kernel: kworker/3:1 R running task 13512 1452 2 0x00080008
Jun 19 10:38:40 igw kernel: Workqueue: ipv6_addrconf addrconf_dad_work
Jun 19 10:38:40 igw kernel: ffffffff81c35940 ffff88013fcc3da8 ffffffff810655bc 0000000000000003
Jun 19 10:38:40 igw kernel: ffffffff81c35940 ffff88013fcc3dc8 ffffffff81068158 ffff88013fcc3e08
Jun 19 10:38:40 igw kernel: 0000000000000004 ffff88013fcc3df8 ffffffff81083cb0 ffff88013fcd2d40
Jun 19 10:38:40 igw kernel: Call Trace:
Jun 19 10:38:40 igw kernel:
Hi coolex,
"when i try shutdown interfaces before remove qdiscs every time kernel crash with this:"
How do you shutdown the interfaces? Could you paste the command please? Then I could how it works and which interfaces
BTW, is it ok if you shutdown the interfaces before remove imq rule without my enhancement?
1) /opt/shaper.sh start (script above) 2) ifconfig eth2 down 3) ifconfig eth2 up
I try same situation on kernel 3.14.21 + imq and it works fine.
Now I made another fix according to your description to avoid it crash when interface is down before rule is removed.
Please try it.
The link https://github.com/gfreewind/linuximq/blob/master/kernel/v4.x/linux-4.0-imq.diff
Now test new patch with this fix. Other fix work great.
After coolex confirmed fix with interface up/down whether you will be able to do it for kernel 4.1?
m.
Hi m,
Thanks your tests.
I will continue working on the imq.
But there are too many commits pending which are not merged now.
So I will do it after accept my pull requests.
oki i wait no problem
if I can fix it, I will write you and will give you a link.
Hi m,
OK. Maybe I will commit to my fork repository https://github.com/gfreewind/linuximq. You could watch it too.
gfreewind, on kernel 3.14.21 i had old one https://github.com/imq/linuximq/blob/master/kernel/v3.x/gentoo/linux-3.13.10_hardened_gentoo.diff
Hi coolex,
thank you.
But I did one performance enhancement from 3.14, it could enhance the IMQ performance about 20%
Hi m,
The 4.1 is not released now. Are you urgent to get it really?
I know, I will try test all your patches and give you results....
Dne 19/06/15 v 13:27 Feng Gao napsal(a):
Hi coolex,
thank you.
But I did one performance enhancement from 3.14, it could enhance the IMQ performance about 20%
— Reply to this email directly or view it on GitHub https://github.com/imq/linuximq/pull/9#issuecomment-113482937.
Thanks coolex:)
Hi Coolex & m,
Could you give me a star (my fork repository) please if you like my enhancement?
Hi Feng i know but next monday is a release date for kernel 4.1 and i start test system with new kernel to test stabel . best regards, m.
IPacct ltd. Micron On Jun 19, 2015 2:28 PM, "Feng Gao" notifications@github.com wrote:
Hi m,
The 4.1 is not released now. Are you urgent to get it really?
— Reply to this email directly or view it on GitHub https://github.com/imq/linuximq/pull/9#issuecomment-113483216.
Hi MihaiC,
The 4.0 patch is ok now. Could you accept the pull request?
Hi all,
The 4.1 initial patch is ready. Frankly i could not test it because the 4.1 is not released really.
Done, I've added the patch. Thanks.
Hi imq,
Welcome. I will continue enhancing the imq because i am using it too.
Hi,
There are two problems in the old codes.