[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61de1b91-30b4-67ba-4192-834fa30757ea@mojatatu.com>
Date: Mon, 29 Aug 2016 06:53:53 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: John Fastabend <john.fastabend@...il.com>, bblanco@...mgrid.com,
davem@...emloft.net, alexei.starovoitov@...il.com,
john.r.fastabend@...el.com, netdev@...r.kernel.org,
xiyou.wangcong@...il.com
Subject: Re: [net-next PATCH] e1000: add initial XDP support
On 16-08-29 04:30 AM, Jesper Dangaard Brouer wrote:
> Hi Jamal,
>
> Can you please provide a simple "tc" command that implements "tc drop"?
>
> Then, I'll add this to the series of tests I'm using for (what I call)
> "zoom-in" benchmarking.
>
Thanks Jesper.
Something simple since this is done in ingress; lets say drop icmp
packets:
export ETH=eth0
export TC=/sbin/tc
#delete existing ingress qdisc - flushes all filters/actions
sudo $TC qdisc del dev $ETH ingress
#re-add ingress
sudo $TC qdisc add dev $ETH ingress
#
#simple rule to drop all icmp
sudo $TC filter add dev $ETH parent ffff: prio 4 protocol ip \
u32 match ip protocol 1 0xff flowid 1:1 \
action drop
# other type of filters if you want to compare instead of above
#
# a)drop all
sudo $TC filter add dev $ETH parent ffff: prio 2 protocol ip \
u32 match u32 0 0 flowid 1:1 \
action drop
#b) drop if src is XXX
sudo $TC filter add dev $ETH parent ffff: prio 2 protocol ip \
u32 match ip src 192.168.100.1 flowid 1:1 \
action drop
If you can do one core vs many cores (XDP should probably do very well
in multi-core)
I think given how ancient the e1000 is we may see the driver being
a contributing overhead. I believe XDP given location will do
well - but for this kind of driver my gut feeling is probably not
by large margin.
cheers,
jamal
Powered by blists - more mailing lists