From: Daniel Borkmann <daniel@iogearbox•net>
To: Cong Wang <xiyou.wangcong@gmail•com>
Cc: netdev@vger•kernel.org, Jamal Hadi Salim <jhs@mojatatu•com>
Subject: Re: [Patch net-next] net_sched: add network namespace support for tc actions
Date: Sat, 20 Feb 2016 19:36:14 +0100 [thread overview]
Message-ID: <56C8B21E.7070307@iogearbox.net> (raw)
In-Reply-To: <1455928994-9726-1-git-send-email-xiyou.wangcong@gmail.com>
On 02/20/2016 01:43 AM, Cong Wang wrote:
> Currently tc actions are stored in a per-module hashtable,
> therefore are visible to all network namespaces. This is
> probably the last part of the tc subsystem which is not
> aware of netns now. This patch makes them per-netns,
> several tc action API's need to be adjusted for this.
>
> The tc action API code is ugly due to historical reasons,
> we need to refactor that code in the future.
>
> Also this patch is on top of my other patch
> "net_sched: fix memory leaks when rmmod tc action modules",
> therefore should be applied after -net is merged into
> net-next.
>
> Cc: Jamal Hadi Salim <jhs@mojatatu•com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail•com>
> ---
> include/net/act_api.h | 28 +++++---
> net/sched/act_api.c | 88 ++++++++++-------------
> net/sched/act_bpf.c | 71 +++++++++++++++++--
> net/sched/act_connmark.c | 73 +++++++++++++++++--
> net/sched/act_csum.c | 78 +++++++++++++++++++--
> net/sched/act_gact.c | 74 ++++++++++++++++++--
> net/sched/act_ipt.c | 178 +++++++++++++++++++++++++++++++++++++++++++----
> net/sched/act_mirred.c | 75 ++++++++++++++++++--
> net/sched/act_nat.c | 73 +++++++++++++++++--
> net/sched/act_pedit.c | 73 +++++++++++++++++--
> net/sched/act_police.c | 69 ++++++++++++++++--
> net/sched/act_simple.c | 76 ++++++++++++++++++--
> net/sched/act_skbedit.c | 73 +++++++++++++++++--
> net/sched/act_vlan.c | 73 +++++++++++++++++--
> 14 files changed, 969 insertions(+), 133 deletions(-)
Thanks for working on this!
Do you see a way to reduce the code duplication needed across all
the action modules? I.e. that each of them now needs to register
a new per netns subsystem, etc. In other words, is there a way the
action API could be reworked to handle most of this in the tc core
framework instead?
Cheers,
Daniel
next prev parent reply other threads:[~2016-02-20 18:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 0:43 [Patch net-next] net_sched: add network namespace support for tc actions Cong Wang
2016-02-20 18:36 ` Daniel Borkmann [this message]
2016-02-21 0:46 ` Cong Wang
2016-02-22 13:42 ` Jamal Hadi Salim
2016-02-22 23:51 ` Cong Wang
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=56C8B21E.7070307@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=jhs@mojatatu$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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