net: pktgen: build skb list and call netif_receive_skb_list()
Build a batch with 8 skbuffs and inject them via netif_receive_skb_list.
Tested with:
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe dummy numdummies=1
ip link set up dev dummy0
ip ro add 198.18.0.0/24 dev dummy0 scope link
cd linux-stk/samples/pktgen/
./pktgen_bench_xmit_mode_netif_receive.sh -i eth0 -n 1500000 -m xx:xx:xx:xx:xx:xx
where xx:xx:xx:xx:xx:xx is the mac address of eth0.
without flowtable:
Result: OK: 591472(c591472+d0) usec, 1204224 (60byte,0frags)
254496pps 977Mb/sec (977264640bps) errors: 0
with flowtable:
Result: OK: 364031(c364031+d0) usec, 12001280 (60byte,0frags)
4120962pps 15824Mb/sec (15824494080bps) errors: 0
# cat ruleset.nft
table ip x {
flowtable x {
hook ingress priority filter
devices = { dummy0, eth0 }
}
chain y {
type filter hook forward priority filter; policy accept;
flow add @x counter packets 4 bytes 184
counter packets 64 bytes 2944
}
}
Update samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh to set
up source address different than the one of the ingress interface,
otherwise packets are dropped as martians.
2 files changed