Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"tc filter show dev eth0" - does not show match conditions #1116

Closed
J-Kerman opened this issue Aug 23, 2015 · 6 comments
Closed

"tc filter show dev eth0" - does not show match conditions #1116

J-Kerman opened this issue Aug 23, 2015 · 6 comments

Comments

@J-Kerman
Copy link

I recently updated to wheezy 2015-05-05 after purchasing the latest Raspberry PI v2 and noticed the "tc filter show" option does not display the IP header match settings. I use my Raspberry PI as a network emulator and have a GUI front-end to retrieve the current emulation settings from TC. Since these match filters are not returned, I cannot display those settings and/or modify them in my GUI.

Here's an example of a filter that captures traffic from src 192.168.0.0/16 to dst 192.168.101.0/24.

tc qdisc add dev eth0 handle 1: root htb
tc filter add dev eth0 parent 1: protocol ip prio 0 u32 match ip src 192.168.0.0/16 match ip dst 192.168.101.0/24 flowid 1:1

If you run the command "tc filter show dev eth0", this is what you'll see in Raspbian wheezy:
filter parent 1: protocol ip pref 49152 u32
filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1

On an older build of Raspbian (2014-09-09), Debian jessie (8.1.0), CentOS 6.5, and Slackware 14.1, this is what should be shown:
filter parent 1: protocol ip pref 49152 u32
filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
match c0a80000/ffff0000 at 12
match c0a86500/ffffff00 at 16

TC command line tools haven't changed, so perhaps there's something different in the new kernel build that is no longer printing out this information? Anyone have thoughts on how to correct this?

@popcornmix
Copy link
Collaborator

Can you report output of uname -a for the working and not working raspbian images?

@J-Kerman
Copy link
Author

On the older Raspberry PI v1 with Raspbian release 2014-09, here's the printout:
Linux 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux

On the newer Raspberry PI v2 with Raspbian release 2015-05, here's the printout:
Linux 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

@popcornmix
Copy link
Collaborator

I've just tried with latest rpi-update firmware:

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
root@raspberrypi:/home/pi# tc qdisc add dev eth0 handle 1: root htb
root@raspberrypi:/home/pi# tc filter add dev eth0 parent 1: protocol ip prio 0 u32 match ip src 192.168.0.0/16 match ip dst 192.168.101.0/24 flowid 1:1
root@raspberrypi:/home/pi# tc filter show dev eth0
filter parent 1: protocol ip pref 49152 u32 
filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 
  match c0a80000/ffff0000 at 12
  match c0a86500/ffffff00 at 16

which looks like the behaviour you wanted. Can you try sudo rpi-update and reboot and try again?

@J-Kerman
Copy link
Author

Thanks popcornmix. Updating the firmware / kernel to 4.1.6-v7+ has resolved the issue.

@Ruffio
Copy link

Ruffio commented Aug 17, 2016

@J-Kerman has your issue been resolved? If so, please close this issue. Thanks.

popcornmix pushed a commit that referenced this issue Sep 5, 2016
This commit appends a few _rcuidle suffixes to fix the following
RCU-used-from-idle bug:

> ===============================
> [ INFO: suspicious RCU usage. ]
> 4.6.0-rc5-next-20160426+ #1116 Not tainted
> -------------------------------
> include/trace/events/rpm.h:95 suspicious rcu_dereference_check() usage!
>
> other info that might help us debug this:
>
>
> RCU used illegally from idle CPU!
> rcu_scheduler_active = 1, debug_locks = 0
> RCU used illegally from extended quiescent state!
> 1 lock held by swapper/0/0:
>  #0:  (&(&dev->power.lock)->rlock){-.-...}, at: [<c052cc2c>] __rpm_callback+0x58/0x60
>
> stack backtrace:
> CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1116
> Hardware name: Generic OMAP36xx (Flattened Device Tree)
> [<c0110290>] (unwind_backtrace) from [<c010c3a8>] (show_stack+0x10/0x14)
> [<c010c3a8>] (show_stack) from [<c047fd68>] (dump_stack+0xb0/0xe4)
> [<c047fd68>] (dump_stack) from [<c052d5d0>] (rpm_suspend+0x580/0x768)
> [<c052d5d0>] (rpm_suspend) from [<c052ec58>] (__pm_runtime_suspend+0x64/0x84)
> [<c052ec58>] (__pm_runtime_suspend) from [<c04bf25c>] (omap2_gpio_prepare_for_idle+0x5c/0x70)
> [<c04bf25c>] (omap2_gpio_prepare_for_idle) from [<c0125568>] (omap_sram_idle+0x140/0x244)
> [<c0125568>] (omap_sram_idle) from [<c01269dc>] (omap3_enter_idle_bm+0xfc/0x1ec)
> [<c01269dc>] (omap3_enter_idle_bm) from [<c0601bdc>] (cpuidle_enter_state+0x80/0x3d4)
> [<c0601bdc>] (cpuidle_enter_state) from [<c0183b08>] (cpu_startup_entry+0x198/0x3a0)
> [<c0183b08>] (cpu_startup_entry) from [<c0b00c0c>] (start_kernel+0x354/0x3c8)
> [<c0b00c0c>] (start_kernel) from [<8000807c>] (0x8000807c)

In the immortal words of Steven Rostedt, "*Whack* *Whack* *Whack*!!!"

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
WhACKED-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
@JamesH65
Copy link
Contributor

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants