All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Subject: [PATCH net-next 0/4] TC: refactor TC_ACT_REDIRECT action
Date: Fri, 13 Jul 2018 11:54:58 +0200	[thread overview]
Message-ID: <cover.1531473946.git.pabeni@redhat.com> (raw)

This series is aimed at improving the act_mirred redirect performances.
Such action is used by OVS to represent TC S/W flows, and it's current largest
bottle-neck is the need for a skb_clone() for each packet.

The first 2 patches introduce some cleanup and safeguards to allow changing the
TC_ACT_REDIRECT handling: currently the action context is stored in per CPU
variables, and we allow also to use the tcf_result. Finally we use this extended
infrastructure in act_mirred to implement redirect via TC_ACT_REDIRECT, when
possible.

Overall this the above gives a ~10% performance improvement in forwarding tput,
when using the TC S/W datapath.

Paolo Abeni (4):
  tc/act: user space can't use TC_ACT_REDIRECT directly
  tc/act: remove unneeded RCU lock in action callback
  net/sched: refactor TC_ACT_REDIRECT handling
  act_mirred: use ACT_REDIRECT when possible

 include/net/act_api.h        |  2 +-
 include/net/sch_generic.h    | 17 ++++++++++++++++-
 include/uapi/linux/pkt_cls.h |  1 +
 net/core/dev.c               |  4 ++--
 net/core/filter.c            | 29 +++++++++++++++++++++++------
 net/core/lwt_bpf.c           |  5 ++++-
 net/sched/act_api.c          |  5 +++++
 net/sched/act_bpf.c          |  8 ++++----
 net/sched/act_csum.c         | 12 +++---------
 net/sched/act_ife.c          |  5 +----
 net/sched/act_mirred.c       | 19 ++++++++++++++-----
 net/sched/act_sample.c       |  4 +---
 net/sched/act_skbedit.c      | 10 +++-------
 net/sched/act_skbmod.c       | 21 +++++++++------------
 net/sched/act_tunnel_key.c   |  6 +-----
 net/sched/act_vlan.c         | 19 +++++++------------
 net/sched/cls_bpf.c          |  8 +++++---
 17 files changed, 100 insertions(+), 75 deletions(-)

-- 
2.17.1

             reply	other threads:[~2018-07-13 10:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13  9:54 Paolo Abeni [this message]
2018-07-13  9:54 ` [PATCH net-next 1/4] tc/act: user space can't use TC_ACT_REDIRECT directly Paolo Abeni
2018-07-13  9:55 ` [PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback Paolo Abeni
2018-07-13 14:08   ` Daniel Borkmann
2018-07-13 14:26     ` Paolo Abeni
2018-07-13 14:41       ` Daniel Borkmann
2018-07-13 15:00         ` Paolo Abeni
2018-07-13  9:55 ` [PATCH net-next 3/4] net/sched: refactor TC_ACT_REDIRECT handling Paolo Abeni
2018-07-13 14:13   ` Daniel Borkmann
2018-07-13 14:37     ` Paolo Abeni
2018-07-13 16:32       ` Daniel Borkmann
2018-07-13  9:55 ` [PATCH net-next 4/4] act_mirred: use ACT_REDIRECT when possible Paolo Abeni
2018-07-16 23:39   ` Cong Wang
2018-07-17  7:01     ` Eyal Birger
2018-07-17  9:15     ` Paolo Abeni
2018-07-17  9:38       ` Dave Taht
2018-07-17 17:24       ` Cong Wang
2018-07-18 10:05         ` Paolo Abeni
2018-07-19 17:56           ` Cong Wang
2018-07-20 10:16             ` Paolo Abeni
2018-07-19 17:16   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1531473946.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.