From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [Patch net] net_sched: refetch skb protocol for each filter Date: Sun, 13 Jan 2019 12:58:05 -0800 Message-ID: References: <20190112025542.397-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Martin Olsson , Jiri Pirko , Lucas Bates To: Jamal Hadi Salim Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:43986 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfAMU6S (ORCPT ); Sun, 13 Jan 2019 15:58:18 -0500 Received: by mail-pl1-f195.google.com with SMTP id gn14so9163087plb.10 for ; Sun, 13 Jan 2019 12:58:17 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Jan 12, 2019 at 4:23 AM Jamal Hadi Salim wrote: > Cong, > I am a little worried about the impact of this change. Smells > more like it has to do with Vlan action or related issues > than with reclassifying. You can verify this patch with Martin's test case. I verified it with the script below, it works as expected. Not sure if it is feasible to add it to tc-tests as it needs a vlan device on top of veth. ip netns add test1 ip netns add test2 ip link add dev veth1 type veth peer name veth2 ip link set dev veth1 netns test1 up ip link set dev veth2 netns test2 up ip netns exec test1 ifconfig veth1 192.168.1.1 netmask 255.255.255.0 ip netns exec test2 ifconfig veth2 192.168.1.2 netmask 255.255.255.0 ip netns exec test1 ip link add link veth1 name veth1.100 type vlan id 100 ip netns exec test2 ip link add link veth2 name veth2.100 type vlan id 100 ip netns exec test1 ip link set link dev veth1.100 up ip netns exec test2 ip link set link dev veth2.100 up ip netns exec test1 ifconfig veth1.100 192.168.100.1 netmask 255.255.255.0 ip netns exec test2 ifconfig veth2.100 192.168.100.2 netmask 255.255.255.0 ip netns exec test2 ip link set dev veth2 address 00:c0:7b:7d:00:c8 ip netns exec test1 ip neighbor add 192.168.100.2 lladdr 00:c0:7b:7d:00:c8 dev veth1.100 nud permanent ip netns exec test1 tc qdisc add dev veth1 clsact ip netns exec test1 tc filter add dev veth1 egress prio 100 protocol 802.1Q matchall action vlan pop continue #reclassify ip netns exec test1 tc filter add dev veth1 egress prio 200 protocol ip u32 match ip src 192.168.1.0/24 action drop ip netns exec test1 tc filter add dev veth1 egress prio 201 protocol ip u32 match ip dst 192.168.100.0/24 action drop Thanks.