Re: [net-next PATCH] e1000: add initial XDP support
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2016-08-29 10:53:56
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