[PATCH net] sctp: use event->chunk when it's valid

2016-08-06 Thread Xin Long
Commit 52253db924d1 ("sctp: also point GSO head_skb to the sk when it's available") used event->chunk->head_skb to get the head_skb in sctp_ulpevent_set_owner(). But at that moment, the event->chunk was NULL, as it cloned the skb in sctp_ulpevent_make_rcvmsg(). Therefore, that patch didn't really

Re: [net-next 0/2] BPF, kprobes: Add current_in_cgroup helper

2016-08-06 Thread Sargun Dhillon
On Sat, Aug 06, 2016 at 09:32:05PM -0700, Alexei Starovoitov wrote: > On Sat, Aug 06, 2016 at 09:06:53PM -0700, Sargun Dhillon wrote: > > This patchset includes a helper and an example to determine whether the > > kprobe > > is currently executing in the context of a specific cgroup based on a cg

Re: [net-next 0/2] BPF, kprobes: Add current_in_cgroup helper

2016-08-06 Thread Alexei Starovoitov
On Sat, Aug 06, 2016 at 09:06:53PM -0700, Sargun Dhillon wrote: > This patchset includes a helper and an example to determine whether the > kprobe > is currently executing in the context of a specific cgroup based on a cgroup > bpf map / array. description is too short to understand how this ne

[net-next 2/2] samples/bpf: Add example using current_in_cgroup

2016-08-06 Thread Sargun Dhillon
This is a simple trace example that shows programs connecting, but only if they're in a chosen cgroup. Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov Cc: Daniel Borkmann --- samples/bpf/Makefile | 4 ++ samples/bpf/bpf_helpers.h | 2 + samples/bpf

[net-next 0/2] BPF, kprobes: Add current_in_cgroup helper

2016-08-06 Thread Sargun Dhillon
This patchset includes a helper and an example to determine whether the kprobe is currently executing in the context of a specific cgroup based on a cgroup bpf map / array. Sargun Dhillon (2): bpf: Add bpf_current_in_cgroup helper samples/bpf: Add example using current_in_cgroup include/li

[net-next 1/2] bpf: Add bpf_current_in_cgroup helper

2016-08-06 Thread Sargun Dhillon
This adds a kprobe helper that's similar to the skb_in_cgroup helper. It checks whether the probe is currently executing in the context of the cgroup at the given index a CGROUP_ARRAY. Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov Cc: Daniel Borkmann --- include/linux/bpf.h | 24 ++

[PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv

2016-08-06 Thread Ivan Khoronzhuk
There is no need to hold link to clk, it's used only once while probe. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 30e1ddb..7

[PATCH v2 01/14] net: ethernet: ti: cpsw: simplify submit routine

2016-08-06 Thread Ivan Khoronzhuk
As second net dev is created only in case of dual_emac mode, port number can be figured out in simpler way. Also no need to pass redundant ndev struct. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) dif

[PATCH v2 05/14] net: ethernet: ti: cpsw: don't check slave num in runtime

2016-08-06 Thread Ivan Khoronzhuk
No need to check const slave num in runtime for every packet, and ndev for slaves w/o ndev is anyway NULL. So remove redundant check. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/cp

[PATCH v2 13/14] net: ethernet: ti: cpsw: move napi struct to cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
The napi structs are common for both net devices in dual_emac mode, In order to not hold duplicate links to them, move to cpsw_common. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 50 +++--- 1 file changed, 22 insertions(+), 28 deletions

[PATCH v2 08/14] net: ethernet: ti: cpsw: move links on h/w registers to cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
The pointers on h/w registers are common for every cpsw_private instance, so no need to hold them for every ndev. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 97 +++--- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/dri

[PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll

2016-08-06 Thread Ivan Khoronzhuk
No need to check number of handled packets, when in most cases (> 99%) it's not 0. It can be 0 only in rare cases, even in this case it's not bad to print just 0. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff

[PATCH v2 00/14] net: ethernet: ti: cpsw: split driver data and per ndev data

2016-08-06 Thread Ivan Khoronzhuk
In dual_emac mode the driver can handle 2 network devices. Each of them can use its own private data and common data/resources. This patchset splits common driver data/resources and private per net device data. It leads to: - reduce memory usage - increase code readability - allows add a bunch of

[PATCH v2 10/14] net; ethernet: ti: cpsw: move irq stuff under cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
The irq data are common per net device. So no need to hold these data per net dev, move it under cpsw_common. Also delete irq_num var, as after optimization it's not needed. Correct number of irqs to 2, as anyway, driver is using only 2, at least for now. Signed-off-by: Ivan Khoronzhuk --- drive

[PATCH v2 03/14] net: ethernet: ti: cpsw: remove priv from cpsw_get_slave_port() parameters list

2016-08-06 Thread Ivan Khoronzhuk
There is no need in priv here. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 85ee9f5..30e1ddb 100644 --- a/drivers/net/ethernet

[PATCH v2 07/14] net: ethernet: ti: cpsw: replace pdev on dev

2016-08-06 Thread Ivan Khoronzhuk
No need to hold pdev link when only dev is needed. This allows to simplify a bunch of cpsw->pdev->dev now and farther. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 65 ++ 1 file changed, 34 insertions(+), 31 deletions(-) diff --git

Re: [PATCH net] bridge: Fix problems around fdb entries pointing to the bridge device

2016-08-06 Thread Stephen Hemminger
On Thu, 04 Aug 2016 11:27:25 -0700 Roopa Prabhu wrote: > On 8/4/16, 1:15 AM, Toshiaki Makita wrote: > > On 2016/08/04 16:24, Roopa Prabhu wrote: > >> On 8/3/16, 7:11 PM, Toshiaki Makita wrote: > >>> Adding fdb entries pointing to the bridge device uses fdb_insert(), > >>> which lacks various

Re: [PATCH iproute v2 2/5] ila: Support for configuring ila to use netfilter hook

2016-08-06 Thread Stephen Hemminger
I have no problem with this series in general and wanted to put it in before closing the lid on 4.7 version, BUT. This patch generates warnings when built on Debian Strech with gcc-5 ipila.c: In function ‘ila_parse_opt.constprop’: ipila.c:205:2: warning: ‘locator_match’ may be used uninitialized

Re: [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message

2016-08-06 Thread Joe Perches
On Sat, 2016-08-06 at 13:48 +0300, Ivan Khoronzhuk wrote: > While poll handlers there is no possibility to figure out > which network device is handling packets, as cpdma channels > are common for both network devices in dual_emac mode. Currently, > the messages are printed only for one device, in

[PATCH v2 09/14] net: ethernet: ti: cpsw: move cpdma resources to cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
Every net device private struct holds links to shared cpdma resources. No need to save and every time synchronize these resources per net dev. So, move it to common driver struct. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 97 +- 1

[PATCH v2 11/14] net: ethernet: ti: cpsw: move data platform data and slaves info to cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
These data are common per net dev. No need to hold it in every priv instance, so move them under cpsw_common. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 271 + 1 file changed, 140 insertions(+), 131 deletions(-) diff --git a/drive

[PATCH net 1/2] net: vxlan: lwt: Use source ip address during route lookup.

2016-08-06 Thread Pravin B Shelar
LWT user can specify destination as well as source ip address for given tunnel endpoint. But vxlan is ignoring given source ip address. Following patch uses both ip address to route the tunnel packet. This consistent with other LWT implementations, like GENEVE and GRE. Fixes: ee122c79d42 ("vxlan:

[PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message

2016-08-06 Thread Ivan Khoronzhuk
While poll handlers there is no possibility to figure out which network device is handling packets, as cpdma channels are common for both network devices in dual_emac mode. Currently, the messages are printed only for one device, in fact, there is two. So, better to print integrated num_tx value fo

[PATCH net 2/2] net: vxlan: lwt: Fix vxlan local traffic.

2016-08-06 Thread Pravin B Shelar
vxlan driver has bypass for local vxlan traffic, but that depends on information about all VNIs on local system in vxlan driver. This is not available in case of LWT. Therefore following patch disable encap bypass for LWT vxlan traffic. Fixes: ee122c79d42 ("vxlan: Flow based tunneling"). Reported-

[PATCH v2 06/14] net: ethernet: ti: cpsw: create common struct to hold shared driver data

2016-08-06 Thread Ivan Khoronzhuk
This patch simply create holder for common data and as a start moves pdev var to it. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 62 ++ 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b

[PATCH v2 14/14] net: ethernet: ti: cpsw: move ale, cpts and drivers params under cpsw_common

2016-08-06 Thread Ivan Khoronzhuk
The ale, cpts, version, limit, freq, interrupt pacing parameters are common per net device that uses the same h/w. So, move them to common driver structure. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 237 ++--- 1 file changed, 106 inse