Netdev List
 help / color / mirror / Atom feed
From: Chris Mi <chrism@mellanox.com>
To: netdev@vger.kernel.org
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	davem@davemloft.net, mawilcox@microsoft.com
Subject: [patch net-next v2 0/3] net/sched: Improve getting objects by indexes
Date: Wed, 30 Aug 2017 02:31:56 -0400	[thread overview]
Message-ID: <1504074719-15147-1-git-send-email-chrism@mellanox.com> (raw)

Using current TC code, it is very slow to insert a lot of rules.

In order to improve the rules update rate in TC,
we introduced the following two changes:
        1) changed cls_flower to use IDR to manage the filters.
        2) changed all act_xxx modules to use IDR instead of
           a small hash table

But IDR has a limitation that it uses int. TC handle uses u32.
To make sure there is no regression, we add several new IDR APIs
to support unsigned long.

v2
==

Addressed Hannes's comment:
express idr_alloc in terms of idr_alloc_ext and most of the other functions

Chris Mi (3):
  idr: Add new APIs to support unsigned long
  net/sched: Change cls_flower to use IDR
  net/sched: Change act_api and act_xxx modules to use IDR

 include/linux/idr.h        |  69 ++++++++++++-
 include/linux/radix-tree.h |  21 +++-
 include/net/act_api.h      |  76 +++++---------
 lib/idr.c                  |  66 ++++++------
 lib/radix-tree.c           |   6 +-
 net/sched/act_api.c        | 251 ++++++++++++++++++++++-----------------------
 net/sched/act_bpf.c        |  17 ++-
 net/sched/act_connmark.c   |  16 ++-
 net/sched/act_csum.c       |  16 ++-
 net/sched/act_gact.c       |  16 ++-
 net/sched/act_ife.c        |  20 ++--
 net/sched/act_ipt.c        |  26 +++--
 net/sched/act_mirred.c     |  19 ++--
 net/sched/act_nat.c        |  16 ++-
 net/sched/act_pedit.c      |  18 ++--
 net/sched/act_police.c     |  18 ++--
 net/sched/act_sample.c     |  17 ++-
 net/sched/act_simple.c     |  20 ++--
 net/sched/act_skbedit.c    |  18 ++--
 net/sched/act_skbmod.c     |  18 ++--
 net/sched/act_tunnel_key.c |  20 ++--
 net/sched/act_vlan.c       |  22 ++--
 net/sched/cls_flower.c     |  55 +++++-----
 23 files changed, 427 insertions(+), 414 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2017-08-30  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  6:31 Chris Mi [this message]
2017-08-30  6:31 ` [patch net-next v2 1/3] idr: Add new APIs to support unsigned long Chris Mi
2017-08-30  6:31 ` [patch net-next v2 2/3] net/sched: Change cls_flower to use IDR Chris Mi
2017-08-30 12:09   ` Jamal Hadi Salim
2017-08-30  6:31 ` [patch net-next v2 3/3] net/sched: Change act_api and act_xxx modules " Chris Mi
2017-08-30 12:11   ` Jamal Hadi Salim
2017-08-31  1:05     ` Chris Mi
2017-08-30 21:39 ` [patch net-next v2 0/3] net/sched: Improve getting objects by indexes David Miller
2017-08-31  1:05   ` Chris Mi

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=1504074719-15147-1-git-send-email-chrism@mellanox.com \
    --to=chrism@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=mawilcox@microsoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox