]> git.baikalelectronics.ru Git - kernel.git/commit
act_mirred: use TC_ACT_REINSERT when possible
authorPaolo Abeni <pabeni@redhat.com>
Mon, 30 Jul 2018 12:30:45 +0000 (14:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jul 2018 16:31:14 +0000 (09:31 -0700)
commit8a952a94d8ec73d103ff23cd0c9e368df3c8d31e
treee0120e70e86ad96977d6a92b59aebbb1e06af3eb
parentfe9122889a4622083a8ba2dbf51e17b4af8337ca
act_mirred: use TC_ACT_REINSERT when possible

When mirred is invoked from the ingress path, and it wants to redirect
the processed packet, it can now use the TC_ACT_REINSERT action,
filling the tcf_result accordingly, and avoiding a per packet
skb_clone().

Overall this gives a ~10% improvement in forwarding performance for the
TC S/W data path and TC S/W performances are now comparable to the
kernel openvswitch datapath.

v1 -> v2: use ACT_MIRRED instead of ACT_REDIRECT
v2 -> v3: updated after action rename, fixed typo into the commit
message
v3 -> v4: updated again after action rename, added more comments to
the code (JiriP), skip the optimization if the control action
need to touch the tcf_result (Paolo)
v4 -> v5: fix sparse warning (kbuild bot)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_mirred.c