From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Cong Wang <xiyou.wangcong@gmail.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 2/2] net_sched: optimize tcf_match_indev()
Date: Sun, 22 Dec 2013 12:12:16 -0500 [thread overview]
Message-ID: <52B71D70.5010401@mojatatu.com> (raw)
In-Reply-To: <52B71B89.2050603@mojatatu.com>
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
On 12/22/13 12:04, Jamal Hadi Salim wrote:
> On 12/22/13 11:26, Jamal Hadi Salim wrote:
>
>> BTW: This indev feature was supposed to be "temporary";->
>> but has stuck around all these years. Not sure how widely it is
>> used. I will send you a testcase shortly. If it passes for you
>> please add my ACKed-by
>
>
> Attached.
> Please run before and after your changes and compare results.
>
And here's another one for u32
cheers,
jamal
[-- Attachment #2: indev-tests2 --]
[-- Type: text/plain, Size: 1474 bytes --]
#
#
sudo ifconfig dummy0 up
#
sudo tc qdisc del dev dummy0 root handle 1: prio
sudo tc qdisc add dev dummy0 root handle 1: prio
# All traffic originating from eth0 will be accounted
# by the action
sudo tc filter add dev dummy0 protocol ip pref 1 parent 1: \
u32 match u32 0 0 \
classid 1:1 indev eth0 \
action ok
#
# All traffic originating from lo will be accounted
# by the action
sudo tc filter add dev dummy0 protocol ip pref 2 parent 1: \
u32 match u32 0 0 \
classid 1:2 indev lo \
action ok
#-- catch all if we screwed up ---
sudo tc filter add dev dummy0 protocol ip pref 3 parent 1: \
u32 match u32 0 0 \
classid 1:3 \
action ok
#
#
sudo tc qdisc del dev eth0 ingress
sudo tc qdisc add dev eth0 ingress
sudo tc qdisc del dev lo ingress
sudo tc qdisc add dev lo ingress
#
sudo tc filter add dev lo parent ffff: protocol ip \
u32 match ip protocol 1 0xff \
flowid 1:1 \
action skbedit mark 1 \
action mirred egress mirror dev dummy0
#
#
sudo tc filter add dev eth0 parent ffff: protocol ip \
u32 match ip src 8.8.8.8/32 \
flowid 1:11 \
action skbedit mark 1 \
action mirred egress mirror dev dummy0
# ping -c 1 127.0.0.1
# ping -c 1 8.8.8.8
# Then lets make sure all stats are correct
sudo tc -s actions ls action skbedit
sudo tc -s actions ls action mirred
sudo tc -s actions ls action gact
sudo tc -s filter ls dev dummy0 parent 1: protocol ip
sudo tc -s filter ls dev eth0 parent ffff: protocol ip
sudo tc -s filter ls dev lo parent ffff: protocol ip
#
#
next prev parent reply other threads:[~2013-12-22 17:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 1:34 [PATCH 1/2] net_sched: add struct net pointer to tcf_proto_ops->dump Cong Wang
2013-12-20 1:34 ` [PATCH 2/2] net_sched: optimize tcf_match_indev() Cong Wang
2013-12-20 6:22 ` Eric Dumazet
2013-12-20 6:36 ` Cong Wang
2013-12-20 6:54 ` Eric Dumazet
2013-12-20 8:12 ` Cong Wang
2013-12-20 12:14 ` Jamal Hadi Salim
2013-12-20 18:55 ` Cong Wang
2013-12-20 20:21 ` Jamal Hadi Salim
2013-12-20 21:36 ` Cong Wang
2013-12-20 23:00 ` Jamal Hadi Salim
2013-12-20 23:07 ` Cong Wang
2013-12-20 23:23 ` Jamal Hadi Salim
2013-12-20 23:49 ` Cong Wang
2013-12-20 23:59 ` Eric Dumazet
2013-12-21 0:12 ` Cong Wang
2013-12-21 21:09 ` Jamal Hadi Salim
2013-12-22 16:26 ` Jamal Hadi Salim
2013-12-22 17:04 ` Jamal Hadi Salim
2013-12-22 17:12 ` Jamal Hadi Salim [this message]
2013-12-22 19:33 ` Cong Wang
2013-12-23 13:10 ` Jamal Hadi Salim
2013-12-23 18:36 ` Cong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B71D70.5010401@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.