[PATCH v2 net-next 1/5] drop_monitor: import netnamespace framework

2017-07-25 Thread martinbj2008
From: martin Zhang Part1: requirement: dropwatch need work well under docekr instance. With the docker be widely accepted, there are several net ns on a single physical host. some of them may have same IP address. A docker instance is used as a physical host a few years ago. the owner of a

[PATCH v2 net-next 3/5] drop_monitor: let hw_stats_list support net ns

2017-07-25 Thread martinbj2008
From: martin Zhang hw_stats_list is used to record NAPI state for net device. Every net device belongs to one net ns. so every net ns has a list head to record them. Signed-off-by: martin Zhang --- net/core/drop_monitor.c | 54 ++--- 1 file changed,

[PATCH v2 net-next 4/5] drop_monitor: let drop stat support net ns

2017-07-25 Thread martinbj2008
From: martin Zhang move the detail drop stat to per net ns. A net ns has its per cpu stat. keep the work under per cpu to send netlink alter message. all the net ns share a work under a CPU, the work will be scheduled by any ns, and will send message in all the ns. Signed-off-by: martin Zhang

[PATCH v2 net-next 5/5] drop_monitor: increase version when ns support is ready

2017-07-25 Thread martinbj2008
From: martin Zhang 1. increase DM netlink version from 2 to 3, as it now support net ns. 2. netns ok become ture. Signed-off-by: martin Zhang --- net/core/drop_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c inde

[PATCH v2 net-next 2/5] drop_monitor: let dm trace state support ns

2017-07-25 Thread martinbj2008
From: martin Zhang Every net ns has its own trace_state, and use a ref to control trace state of whole kernel. trace_state in struct per_ns_dm_cb: Just like the previous trace state, record the trace state for every net ns. Possible values are ON/OFF. dm_trace_ref: record how many net namespace

[PATCH v1 net-next 4/5] drop_monitor: let drop stat support net ns

2017-07-12 Thread martinbj2008
From: martin Zhang move the detail drop stat to per net ns. A net ns has its per cpu stat. keep the work under per cpu to send netlink alter message. all the net ns share a work under a CPU, the work will be scheduled by any ns, and will send message in all the ns. Signed-off-by: martin Zhang

[PATCH v1 net-next 3/5] drop_monitor: let hw_stats_list support net ns

2017-07-12 Thread martinbj2008
From: martin Zhang hw_stats_list is used to record NAPI state for net device. Every net device belongs to one net ns. so every net ns has a list head to record them. Signed-off-by: martin Zhang --- net/core/drop_monitor.c | 54 ++--- 1 file changed,

[PATCH v1 net-next 1/5] drop_monitor: import netnamespace framework

2017-07-12 Thread martinbj2008
From: martin Zhang This is a serial patch for drop monitor, in order to support net namespace. Import two struct to support net ns: 1. struct per_ns_dm_cb: Just like its name, it is used in per net ns. In this patch it is empty, but in following patch, these field will be added. a. trace

[PATCH v1 net-next 2/5] drop_monitor: let dm trace state support ns

2017-07-12 Thread martinbj2008
From: martin Zhang Every net ns has its own trace_state, and use a ref to control trace state of whole kernel. trace_state in struct per_ns_dm_cb: Just like the previous trace state, record the trace state for every net ns. Possible values are ON/OFF. dm_trace_ref: record how many net namespace

[PATCH v1 net-next 5/5] drop_monitor: increase version when ns support is ready

2017-07-12 Thread martinbj2008
From: martin Zhang 1. increase DM netlink version from 2 to 3, as it now support net ns. 2. netns ok become ture. Signed-off-by: martin Zhang --- net/core/drop_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c inde

[PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread martinbj2008
From: Martin Zhang 1. new skb only need dst and ip address(v4 or v6). 2. skb_copy may need high order pages, which is very rare on long running server. Signed-off-by: Junwei Zhang Signed-off-by: Martin Zhang --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH V2 net-next] net: only check perm protocol when register proto

2015-09-17 Thread martinbj2008
From: Junwei Zhang The permanent protocol nodes are at the head of the list, So only need check all these nodes. No matter the new node is permanent or not, insert the new node after the last permanent protocol node, If the new node conflicts with existing permanent node, return error. Signed-

[PATCH V1 net-next] net: only check perm protocol when register proto

2015-09-14 Thread martinbj2008
From: Junwei Zhang the permanent protocol nodes are at the head of the list. So only need check all these nodes. and insert the new node after the last permanent protocol node, no matter new node is permanent or not. If the inserted proto conflicts with existing permanent protocol, then goto ou