Subject: Re: [PATCH 5/10] [NET]: Avoid unnecessary cloning for ingress filtering

From: jamal <[email-masked]>
Date: Mon, 15 Oct 2007 09:57:45 -0400

On Sun, 2007-14-10 at 06:49 -0400, jamal wrote:
> Once this patchset makes
> it into net-2.6.24 i can do testing on my laptop and provide you any
> further feedback. 

Works on all 4 tests i tried out on net-2.6[1]. GoodStuff Herbert.

Herbert, please look at the comment i sent on the clone vs copy. 

Also, iirc this started as a netfilter optimization thing starting with
tail-calls - can someone (Patrick?) clue me how it helps in that
optimization aspect? 

cheers,
jamal

[1] Didnt try any ipt action, will when i get the chance again. Heres
test 18b):

---
Window1) tc qdisc del dev lo ingress
Window1) tc qdisc add dev lo ingress
Window1) ifconfig dummy0 up
Window1) tcpdump -n -i lo -x -e -t &

Window2) tcpdump -n -i dummy0 -x -e -t &

Window1) tc filter add dev lo parent ffff: protocol ip prio 10 u32 \
match ip dst 127.0.0.1/32 flowid 1:2 \
action pedit munge offset 0 u32 clear pipe \
action mirred egress mirror dev dummy0

Window2) ping -c 1 127.0.0.1

Ping will fail since we are clearing first 4 byte of ip header.

Window1 will show the packet as seen on incoming by lo; the first few
bytes look like:

----
4500 0054 0000 4000 4001 3ca7 7f00 0001
----

Window2 will show the 4 bytes zeroed out as requested of pedit (and as
seen on dummy0)

---
0000 0000 0000 4000 4001 3ca7 7f00 0001
---------