Hello. I am testing the edge31-ca-u32 script (full source in http://web.opalsoft.net/qos/default.php?p=ds-33 ) on an Ubuntu (32 bit) machine. I am interested in policing traffic at the ingress interface, and marking IP packets not conforming to the policer, but I am having some problems with that. Specifically, these lines may behave differently depending on the kernel version: tc qdisc add dev eth0 handle ffff: ingress tc filter add dev eth0 parent ffff: protocol ip prio 4 handle 1: u32 divisor 1 tc filter add dev eth0 parent ffff: protocol ip prio 4 u32 match ip tos 0x88 0xfc police index 1 rate 1500kbit burst 90k continue flowid :1 According to some tutorials describing the script, the last line should set tcindex to 1 for traffic exceeding the policer specification. Depending on the Ubuntu release I use, the script works (up to Ubuntu 14.04, kernel 3.13). But for more recent kernel versions, either the system has a kernel panic (Ubuntu 14.10, kernel 3.16), and with recent 4.x kernels the script simply does not work as intended, but the system does not crash. At the end of this message I attach the kernel panic message for kernel 3.16. I assume that there was some bug at the kernel, but it seems that the patches have removed the functionality that was used in the edge31-ca-u32 script. Do you know if there is a way of achieving, using recent (4.x) kernels, the same behaviour provided by the script, that worked up to kernel 3.13? Thank you for any help. -- Javier P.D. Kernel panic message in kernel 3.16, in case it helps to detect the problem: [ 748.174056] BUG: unable to handle kernel NULL pointer dereference at 000002b6 [ 748.175257] IP: [<c15fc44a>] tcf_action_exec+0x3a/0x90 [ 748.176285] *pdpt = 0000000000145001 *pde = 0000000000000000 [ 748.177688] Oops: 0000 [#1] SMP [ 748.177930] Modules linked in: cls_tcindex sch_dsmark act_police cls_u32 sch_ingress kvm_intel kvm crc32_pclmul aesni_intel aes_i586 xts lrw gf128mul ablk_helper cryptd cirrus ttm serio_raw rfcomm bnep bluetooth 6lowpan_iphc drm_kms_helper drm syscopyarea sysfillrect i2c_piix4 mac_hid parport_pc sysimgblt ppdev lp parport 8139too psmouse 8139cp mii floppy e1000 pata_acpi [ 748.177930] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-44-generic #59-Ubuntu [ 748.177930] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 748.177930] task: c19b4ac0 ti: c19a6000 task.ti: c19a6000 [ 748.177930] EIP: 0060:[<c15fc44a>] EFLAGS: 00210287 CPU: 0 [ 748.177930] EIP is at tcf_action_exec+0x3a/0x90 [ 748.177930] EAX: dc64cf00 EBX: dc64cf00 ECX: ddc0bcd8 EDX: dd01f9d4 [ 748.177930] ESI: dd01f9d4 EDI: 00000292 EBP: ddc0bc48 ESP: ddc0bc34 [ 748.177930] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 748.177930] CR0: 80050033 CR2: 000002b6 CR3: 0005f000 CR4: 001407f0 [ 748.177930] Stack: [ 748.177930] dcea1ec8 ddc0bcd8 da64fb60 ddc0bcd8 dc64cf00 ddc0bc7c e091968d dcf891e4 [ 748.177930] dcf891c0 dcf891e0 dbc7b600 00000001 dbc7b610 00000001 dcea14c0 dcea14c0 [ 748.177930] 00000008 dc64cf00 ddc0bc94 c15f829f ddc0bcd8 dc64cf00 dcea14c0 ddc0bcd8 [ 748.177930] Call Trace: [ 748.177930] [<e091968d>] tcindex_classify+0x7d/0x150 [cls_tcindex] [ 748.177930] [<c15f829f>] tc_classify_compat+0x3f/0x80 [ 748.177930] [<c15f8da1>] tc_classify+0x51/0xb0 [ 748.177930] [<e0914d1e>] dsmark_enqueue+0xce/0x33f [sch_dsmark] [ 748.177930] [<c15da2d1>] __dev_queue_xmit+0x231/0x470 [ 748.177930] [<c15da51f>] dev_queue_xmit+0xf/0x20 [ 748.177930] [<c160f931>] ip_finish_output+0x6d1/0x8b0 [ 748.177930] [<c16091ea>] ? ip_route_input_noref+0x8ea/0xac0 [ 748.177930] [<c1611257>] ip_output+0x87/0xd0 [ 748.177930] [<c160cad8>] ip_forward_finish+0x88/0xa0 [ 748.177930] [<c160ce90>] ip_forward+0x3a0/0x470 [ 748.177930] [<c1092c1f>] ? update_cfs_rq_blocked_load+0x17f/0x1b0 [ 748.177930] [<c160accf>] ip_rcv_finish+0x6f/0x390 [ 748.177930] [<c15f8da1>] ? tc_classify+0x51/0xb0 [ 748.177930] [<c160b6c5>] ip_rcv+0x2e5/0x410 [ 748.177930] [<e09040ef>] ? ingress_enqueue+0x1f/0x83 [sch_ingress] [ 748.177930] [<c15d7e1b>] __netif_receive_skb_core+0x49b/0x720 [ 748.177930] [<c15d80b6>] __netif_receive_skb+0x16/0x70 [ 748.177930] [<c15d812f>] netif_receive_skb_internal+0x1f/0x90 [ 748.177930] [<c15d8a5f>] napi_gro_receive+0x9f/0xd0 [ 748.177930] [<e09d3441>] e1000_clean_rx_irq+0x141/0x4e0 [e1000] [ 748.177930] [<e09d44f4>] e1000_clean+0x214/0x850 [e1000] [ 748.177930] [<c106af80>] ? call_timer_fn+0x30/0x100 [ 748.177930] [<c15d8470>] net_rx_action+0x110/0x200 [ 748.177930] [<c10642d7>] __do_softirq+0xe7/0x240 [ 748.177930] [<c10641f0>] ? cpu_callback+0x180/0x180 [ 748.177930] [<c10124a6>] do_softirq_own_stack+0x26/0x30 [ 748.177930] <IRQ> [ 748.177930] [<c10645a5>] irq_exit+0x95/0xa0 [ 748.177930] [<c16c9e05>] do_IRQ+0x45/0xd0 [ 748.177930] [<c16c9333>] common_interrupt+0x33/0x38 [ 748.177930] [<c104dfc5>] ? native_safe_halt+0x5/0x10 [ 748.177930] [<c101954c>] default_idle+0x1c/0xa0 [ 748.177930] [<c1019cce>] arch_cpu_idle+0xe/0x10 [ 748.177930] [<c10a13ff>] cpu_startup_entry+0x31f/0x3e0 [ 748.177930] [<c1121b30>] ? trace_remove_event_call+0x30/0xc0 [ 748.177930] [<c16b9732>] rest_init+0x62/0x70 [ 748.177930] [<c1a55b26>] start_kernel+0x3ba/0x3c2 [ 748.177930] [<c1121b30>] ? trace_remove_event_call+0x30/0xc0 [ 748.177930] [<c1a552e7>] i386_start_kernel+0x82/0x86 [ 748.177930] Code: b7 b0 82 00 00 00 66 f7 c6 00 01 75 57 89 c3 8b 02 89 cf 89 55 ec 39 c2 8d 70 f0 74 5d 89 7d f0 90 8b 7e 04 89 f2 8b 4d f0 89 d8 <ff> 57 24 0f b7 93 82 00 00 00 f6 c2 01 74 0d 83 e2 fe 83 ca 02 [ 748.177930] EIP: [<c15fc44a>] tcf_action_exec+0x3a/0x90 SS:ESP 0068:ddc0bc34 [ 748.177930] CR2: 00000000000002b6 [ 748.177930] ---[ end trace f2165b14c0ff405b ]--- [ 748.177930] Kernel panic - not syncing: Fatal exception in interrupt [ 748.177930] Kernel Offset: 0x0 from 0xc1000000 (relocation range: 0xc0000000-0xe07dffff) [ 748.177930] drm_kms_helper: panic occurred, switching back to text console [ 748.177930] ------------[ cut here ]------------ [ 748.177930] kernel BUG at /build/linux-9SLR6O/linux-3.16.0/mm/vmalloc.c:1320! [ 748.177930] invalid opcode: 0000 [#2] SMP [ 748.177930] Modules linked in: cls_tcindex sch_dsmark act_police cls_u32 sch_ingress kvm_intel kvm crc32_pclmul aesni_intel aes_i586 xts lrw gf128mul ablk_helper cryptd cirrus ttm serio_raw rfcomm bnep bluetooth 6lowpan_iphc drm_kms_helper drm syscopyarea sysfillrect i2c_piix4 mac_hid parport_pc sysimgblt ppdev lp parport 8139too psmouse 8139cp mii floppy e1000 pata_acpi [ 748.177930] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 3.16.0-44-generic #59-Ubuntu [ 748.177930] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 748.177930] task: c19b4ac0 ti: c19a6000 task.ti: c19a6000 [ 748.177930] EIP: 0060:[<c1175da8>] EFLAGS: 00210006 CPU: 0 [ 748.177930] EIP is at __get_vm_area_node.isra.30+0x118/0x120 [ 748.177930] EAX: 00240000 EBX: dffe0000 ECX: 00000001 EDX: 00000500 [ 748.177930] ESI: 00000001 EDI: 00000001 EBP: ddc0b760 ESP: ddc0b748 [ 748.177930] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 748.177930] CR0: 80050033 CR2: 000002b6 CR3: 0005f000 CR4: 001407f0 [ 748.177930] Stack: [ 748.177930] c19c0c80 ddc0b77c c106563d dffe0000 00000008 00240000 ddc0b77c c1176b4f [ 748.177930] e07e0000 ff7fe000 000000d0 e0b0fb3a 00000000 ddc0b7d8 c1051778 fc240000 [ 748.177930] 00000000 00000008 ddc0b7c8 ddc0b79c c114de13 ddc0b7bc c117944a fc240000 [ 748.177930] Call Trace: [ 748.177930] [<c106563d>] ? walk_system_ram_range+0x8d/0x200 [ 748.177930] [<c1176b4f>] get_vm_area_caller+0x4f/0x60 [ 748.177930] [<e0b0fb3a>] ? ttm_mem_reg_ioremap+0xea/0x100 [ttm] [ 748.177930] [<c1051778>] __ioremap_caller+0x238/0x370 [ 748.177930] [<c114de13>] ? lru_add_drain+0x13/0x20 [ 748.177930] [<c117944a>] ? free_pages_and_swap_cache+0x1a/0xb0 [ 748.177930] [<e0b0fb3a>] ? ttm_mem_reg_ioremap+0xea/0x100 [ttm] [ 748.177930] [<c1051a2c>] ioremap_wc+0x3c/0x50 [ 748.177930] [<e0b0fb3a>] ? ttm_mem_reg_ioremap+0xea/0x100 [ttm] [ 748.177930] [<e0b0fb3a>] ttm_mem_reg_ioremap+0xea/0x100 [ttm] [ 748.177930] [<e0b0fc60>] ttm_bo_move_memcpy+0x90/0x490 [ttm] [ 748.177930] [<c118a27e>] ? __kmalloc+0x1ee/0x210 [ 748.177930] [<e0b0c36a>] ? ttm_tt_init+0x8a/0xb0 [ttm] [ 748.177930] [<e0ba1f00>] ? cirrus_bo_verify_access+0x20/0x20 [cirrus] [ 748.177930] [<e0ba1f1e>] cirrus_bo_move+0x1e/0x30 [cirrus] [ 748.177930] [<e0b0dd0a>] ttm_bo_handle_move_mem+0x23a/0x540 [ttm] [ 748.177930] [<e0b0e5c3>] ? ttm_bo_mem_space+0xe3/0x300 [ttm] [ 748.177930] [<e0b0ec52>] ttm_bo_validate+0x1f2/0x200 [ttm] [ 748.177930] [<e0ba26bf>] cirrus_bo_push_sysram+0x7f/0xe0 [cirrus] [ 748.177930] [<e0b0d028>] ? ttm_bo_del_sub_from_lru+0x58/0x80 [ttm] [ 748.177930] [<e0ba0b62>] cirrus_crtc_do_set_base.isra.6.constprop.8+0x62/0x370 [cirrus] [ 748.177930] [<e0b4215f>] ? _object_find+0x5f/0x90 [drm] [ 748.177930] [<e0b421b2>] ? drm_mode_object_find+0x22/0x60 [drm] [ 748.177930] [<e0ba12a0>] cirrus_crtc_mode_set_base+0x10/0x20 [cirrus] [ 748.177930] [<e0ae2290>] drm_crtc_helper_set_config+0x5e0/0xa20 [drm_kms_helper] [ 748.177930] [<c10b54cd>] ? wake_up_klogd+0x2d/0x30 [ 748.177930] [<c10b57b5>] ? console_unlock+0x2e5/0x4d0 [ 748.177930] [<c10b3a7d>] ? log_store+0x1cd/0x210 [ 748.177930] [<e0b41bde>] drm_mode_set_config_internal+0x4e/0xb0 [drm] [ 748.177930] [<e0ae473c>] restore_fbdev_mode+0xac/0xe0 [drm_kms_helper] [ 748.177930] [<e0ae48d7>] drm_fb_helper_force_kernel_mode+0x57/0xa0 [drm_kms_helper] [ 748.177930] [<e0ae5489>] drm_fb_helper_panic+0x29/0x30 [drm_kms_helper] [ 748.177930] [<c1084519>] notifier_call_chain+0x49/0x70 [ 748.177930] [<c1084592>] atomic_notifier_call_chain+0x22/0x30 [ 748.177930] [<c16bfeb5>] panic+0xaa/0x199 [ 748.177930] [<c1013749>] oops_end+0x129/0x130 [ 748.177930] [<c1050478>] no_context+0xe8/0x220 [ 748.177930] [<c1050665>] __bad_area_nosemaphore+0xb5/0x140 [ 748.177930] [<c1050707>] bad_area_nosemaphore+0x17/0x20 [ 748.177930] [<c1050e7c>] __do_page_fault+0x17c/0x570 [ 748.177930] [<c15d6562>] ? skb_checksum_help+0x82/0x160 [ 748.177930] [<c15da2a9>] ? __dev_queue_xmit+0x209/0x470 [ 748.177930] [<c104dd37>] ? kvm_clock_read+0x17/0x20 [ 748.177930] [<c10512c4>] trace_do_page_fault+0x34/0xb0 [ 748.177930] [<c104d490>] ? kvm_async_pf_task_wake+0xe0/0xe0 [ 748.177930] [<c104d4b3>] do_async_page_fault+0x23/0x80 [ 748.177930] [<c16c9be7>] error_code+0x67/0x6c [ 748.177930] [<c109007b>] ? build_sched_domains+0x4cb/0x870 [ 748.177930] [<c15fc44a>] ? tcf_action_exec+0x3a/0x90 [ 748.177930] [<e091968d>] tcindex_classify+0x7d/0x150 [cls_tcindex] [ 748.177930] [<c15f829f>] tc_classify_compat+0x3f/0x80 [ 748.177930] [<c15f8da1>] tc_classify+0x51/0xb0 [ 748.177930] [<e0914d1e>] dsmark_enqueue+0xce/0x33f [sch_dsmark] [ 748.177930] [<c15da2d1>] __dev_queue_xmit+0x231/0x470 [ 748.177930] [<c15da51f>] dev_queue_xmit+0xf/0x20 [ 748.177930] [<c160f931>] ip_finish_output+0x6d1/0x8b0 [ 748.177930] [<c16091ea>] ? ip_route_input_noref+0x8ea/0xac0 [ 748.177930] [<c1611257>] ip_output+0x87/0xd0 [ 748.177930] [<c160cad8>] ip_forward_finish+0x88/0xa0 [ 748.177930] [<c160ce90>] ip_forward+0x3a0/0x470 [ 748.177930] [<c1092c1f>] ? update_cfs_rq_blocked_load+0x17f/0x1b0 [ 748.177930] [<c160accf>] ip_rcv_finish+0x6f/0x390 [ 748.177930] [<c15f8da1>] ? tc_classify+0x51/0xb0 [ 748.177930] [<c160b6c5>] ip_rcv+0x2e5/0x410 [ 748.177930] [<e09040ef>] ? ingress_enqueue+0x1f/0x83 [sch_ingress] [ 748.177930] [<c15d7e1b>] __netif_receive_skb_core+0x49b/0x720 [ 748.177930] [<c15d80b6>] __netif_receive_skb+0x16/0x70 [ 748.177930] [<c15d812f>] netif_receive_skb_internal+0x1f/0x90 [ 748.177930] [<c15d8a5f>] napi_gro_receive+0x9f/0xd0 [ 748.177930] [<e09d3441>] e1000_clean_rx_irq+0x141/0x4e0 [e1000] [ 748.177930] [<e09d44f4>] e1000_clean+0x214/0x850 [e1000] [ 748.177930] [<c106af80>] ? call_timer_fn+0x30/0x100 [ 748.177930] [<c15d8470>] net_rx_action+0x110/0x200 [ 748.177930] [<c10642d7>] __do_softirq+0xe7/0x240 [ 748.177930] [<c10641f0>] ? cpu_callback+0x180/0x180 [ 748.177930] [<c10124a6>] do_softirq_own_stack+0x26/0x30 [ 748.177930] <IRQ> [ 748.177930] [<c10645a5>] irq_exit+0x95/0xa0 [ 748.177930] [<c16c9e05>] do_IRQ+0x45/0xd0 [ 748.177930] [<c16c9333>] common_interrupt+0x33/0x38 [ 748.177930] [<c104dfc5>] ? native_safe_halt+0x5/0x10 [ 748.177930] [<c101954c>] default_idle+0x1c/0xa0 [ 748.177930] [<c1019cce>] arch_cpu_idle+0xe/0x10 [ 748.177930] [<c10a13ff>] cpu_startup_entry+0x31f/0x3e0 [ 748.177930] [<c1121b30>] ? trace_remove_event_call+0x30/0xc0 [ 748.177930] [<c16b9732>] rest_init+0x62/0x70 [ 748.177930] [<c1a55b26>] start_kernel+0x3ba/0x3c2 [ 748.177930] [<c1121b30>] ? trace_remove_event_call+0x30/0xc0 [ 748.177930] [<c1a552e7>] i386_start_kernel+0x82/0x86 [ 748.177930] Code: ca b2 13 83 f9 13 0f 4f ca d3 e6 e9 31 ff ff ff 8d 76 00 89 d8 e8 19 35 01 00 83 c4 0c 31 c0 5b 5e 5f 5d c3 8d b4 26 00 00 00 00 <0f> 0b 8d b6 00 00 00 00 55 89 e5 53 83 ec 10 3e 8d 74 26 00 8b [ 748.177930] EIP: [<c1175da8>] __get_vm_area_node.isra.30+0x118/0x120 SS:ESP 0068:ddc0b748 [ 748.177930] ---[ end trace f2165b14c0ff405c ]--- -- To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html