Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

2016-09-16 Thread Vadim Kochan
On Fri, Sep 16, 2016 at 2:21 PM, Anton Aksola wrote: > Ok, I will post a new patch version. Should tests be posted in a separate > patch? > > 2016-09-16 12:44 GMT+03:00 Nicolas Dichtel : >> >> Le 16/09/2016 à 11:23, Vadim Kochan a écrit : >> [snip] >> > Would it be useful to add test for this case

[PATCH net-next RESEND] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-16 Thread Vitaly Kuznetsov
Small packet loss is reported on complex multi host network configurations including tunnels, NAT, ... My investigation led me to the following check in netback which drops packets: if (unlikely(txreq.size < ETH_HLEN)) { netdev_err(queue->vif->dev,

RE: [PATCH next] sctp: make use of WORD_TRUNC macro

2016-09-16 Thread David Laight
From: Marcelo Ricardo Leitner > Sent: 15 September 2016 19:13 > No functional change. Just to avoid the usage of '&~3'. ... > - max_data = (asoc->pathmtu - > - sctp_sk(asoc->base.sk)->pf->af->net_header_len - > - sizeof(struct sctphdr) - sizeof(struct sctp_data_chunk)) &

[PATCH] net: ipv6: Failure to disable forwarding per interface via sysctl

2016-09-16 Thread Mike Manning
Disabling forwarding per interface via sysctl continues to allow forwarding. This is contrary to the sysctl documentation stating that the forwarding sysctl is per interface, whereas currently it is only the sysctl for all interfaces that has an effect on forwarding. The solution is to drop any rec

[PATCH][V2] net: r6040: add in missing white space in error message text

2016-09-16 Thread Colin King
From: Colin Ian King A couple of dev_err messages span two lines and the literal string is missing a white space between words. Add the white space and join the two lines into one. Signed-off-by: Colin Ian King --- drivers/net/ethernet/rdc/r6040.c | 6 ++ 1 file changed, 2 insertions(+), 4

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

2016-09-16 Thread Nicolas Dichtel
Le 16/09/2016 à 11:23, Vadim Kochan a écrit : [snip] > Would it be useful to add test for this case into testsuite/ ? Yes, it's a good idea. Regards, Nicolas

[PATCHv5 net-next 11/15] nfp: bpf: allow offloaded filters to update stats

2016-09-16 Thread Jakub Kicinski
Periodically poll stats and call into offloaded actions to update them. Signed-off-by: Jakub Kicinski --- v3: - add missing hunk with ethtool stats. --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 19 +++ .../net/ethernet/netronome/nfp/nfp_net_common.c| 3 ++ .../net/ethernet/

[PATCHv5 net-next 10/15] net: cls_bpf: allow offloaded filters to update stats

2016-09-16 Thread Jakub Kicinski
Call into offloaded filters to update stats. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann --- include/net/pkt_cls.h | 1 + net/sched/cls_bpf.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 57af9f3032ff..5ccaa4

[PATCHv5 net-next 09/15] nfp: bpf: add hardware bpf offload

2016-09-16 Thread Jakub Kicinski
Add hardware bpf offload on our smart NICs. Detect if capable firmware is loaded and use it to load the code JITed with just added translator onto programmable engines. This commit only supports offloading cls_bpf in legacy mode (non-direct action). Signed-off-by: Jakub Kicinski --- drivers/ne

[PATCHv5 net-next 06/15] bpf: enable non-core use of the verfier

2016-09-16 Thread Jakub Kicinski
Advanced JIT compilers and translators may want to use eBPF verifier as a base for parsers or to perform custom checks and validations. Add ability for external users to invoke the verifier and provide callbacks to be invoked for every intruction checked. For now only add most basic callback for

[PATCH][V2] mwifiex: fix null pointer deference when adapter is null

2016-09-16 Thread Colin King
From: Colin Ian King If adapter is null the error exit path in mwifiex_shutdown_sw is to down the semaphore sem and print some debug via mwifiex_dbg. However, passing a NULL adapter to mwifiex_dbg causes a null pointer deference when accessing adapter->dev. This fix checks for a null adapter at

[PATCHv5 net-next 04/15] bpf: don't (ab)use instructions to store state

2016-09-16 Thread Jakub Kicinski
Storing state in reserved fields of instructions makes it impossible to run verifier on programs already marked as read-only. Allocate and use an array of per-instruction state instead. While touching the error path rename and move existing jump target. Suggested-by: Alexei Starovoitov Signed-of

[PATCHv5 net-next 13/15] net: act_mirred: allow statistic updates from offloaded actions

2016-09-16 Thread Jakub Kicinski
Implement .stats_update() callback. The implementation is generic and can be reused by other simple actions if needed. Signed-off-by: Jakub Kicinski --- net/sched/act_mirred.c | 8 1 file changed, 8 insertions(+) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 6038c

[PATCHv5 net-next 14/15] nfp: bpf: add support for legacy redirect action

2016-09-16 Thread Jakub Kicinski
Data path has redirect support so expressing redirect to the port frame came from is a trivial matter of setting the right result code. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 1 + drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c | 2 ++ drive

[PATCHv5 net-next 08/15] nfp: add BPF to NFP code translator

2016-09-16 Thread Jakub Kicinski
Add translator for JITing eBPF to operations which can be executed on NFP's programmable engines. Signed-off-by: Jakub Kicinski --- v4: - use bitfield.h directly. v3: - don't clone the program for the verifier (no longer needed); - temporarily add a local copy of macros from bitfield.h. --- d

[PATCHv5 net-next 15/15] nfp: bpf: add offload of TC direct action mode

2016-09-16 Thread Jakub Kicinski
Add offload of TC in direct action mode. We just need to provide appropriate checks in the verifier and a new outro block to translate the exit codes to what data path expects Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 1 + drivers/net/ethernet/netro

[PATCHv5 net-next 12/15] nfp: bpf: add packet marking support

2016-09-16 Thread Jakub Kicinski
Add missing ABI defines and eBPF instructions to allow mark to be passed on and extend prepend parsing on the RX path to pick it up from packet metadata. Signed-off-by: Jakub Kicinski --- v3: - change metadata format. --- drivers/net/ethernet/netronome/nfp/nfp_bpf.h | 2 + drivers/net/et

[PATCHv5 net-next 05/15] bpf: expose internal verfier structures

2016-09-16 Thread Jakub Kicinski
Move verifier's internal structures to a header file and prefix their names with bpf_ to avoid potential namespace conflicts. Those structures will soon be used by external analyzers. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov --- v5: - fix name of guard defines. v4: - separat

[PATCHv5 net-next 07/15] bpf: recognize 64bit immediate loads as consts

2016-09-16 Thread Jakub Kicinski
When running as parser interpret BPF_LD | BPF_IMM | BPF_DW instructions as loading CONST_IMM with the value stored in imm. The verifier will continue not recognizing those due to concerns about search space/program complexity increase. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov

[PATCHv5 net-next 01/15] net: cls_bpf: add hardware offload

2016-09-16 Thread Jakub Kicinski
This patch adds hardware offload capability to cls_bpf classifier, similar to what have been done with U32 and flower. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann --- v3: - s/filter/prog/ in struct tc_cls_bpf_offload. v2: - drop unnecessary WARN_ON; - reformat error handling a bit

[PATCHv5 net-next 03/15] net: cls_bpf: add support for marking filters as hardware-only

2016-09-16 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_SW flag. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann --- net/sched/cls_bpf.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index 46af423

[PATCHv5 net-next 02/15] net: cls_bpf: limit hardware offload by software-only flag

2016-09-16 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_HW flag. Unlike U32 and flower cls_bpf already has some netlink flags defined. Create a new attribute to be able to use the same flag values as the above. Unlike U32 and flower reject unknown flags. Signed-off-by: Jakub Kicinski Acked-by: Daniel Bo

[PATCHv5 net-next 00/15] BPF hardware offload (cls_bpf for now)

2016-09-16 Thread Jakub Kicinski
Hi! Dave, this set depends on bitfield.h which is sitting in the pull request from Kalle. Please pull wireless-drivers-next before applying. v5: - fix names of guard defines in bpf_verfier.h. v4: - rename parser -> analyzer; - reorganize the analyzer patches a bit; - use bitfield.h directly

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

2016-09-16 Thread Vadim Kochan
On Fri, Sep 16, 2016 at 12:13 PM, Nicolas Dichtel wrote: > Le 16/09/2016 à 09:22, Anton Aksola a écrit : >> The calling of netns_map_init() before command parsing introduced >> a performance issue with large number of namespaces. >> >> As commands such as add, del and exec do not need to iterate t

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

2016-09-16 Thread Nicolas Dichtel
Le 16/09/2016 à 09:22, Anton Aksola a écrit : > The calling of netns_map_init() before command parsing introduced > a performance issue with large number of namespaces. > > As commands such as add, del and exec do not need to iterate through > /var/run/netns it would be good not no build the cache

[PATCH (net.git)] stmmac: fix PWRDWN into the PMT register for global unicast.

2016-09-16 Thread Giuseppe Cavallaro
MAC devices use the RWKPKTEN and MGKPKTEN bits of the PMT Control/Status register to generate power management events. So this patch is to properly set the RWKPKTEN [BIT(2)] inside the PMT register (needed in case of global unicast). Reported-by: Aditi SHARMA Signed-off-by: Giuseppe Cavallaro Cc

Re: [PATCH V3 0/3] net-next: dsa: add QCA8K support

2016-09-16 Thread David Miller
From: John Crispin Date: Thu, 15 Sep 2016 16:26:38 +0200 > This series is based on the AR8xxx series posted by Matthieu Olivari in may > 2015. The following changes were made since then > > * fixed the nitpicks from the previous review > * updated to latest API > * turned it into an mdio device

Re: [PATCH net 0/7] 390: qeth patches

2016-09-16 Thread David Miller
From: Ursula Braun Date: Thu, 15 Sep 2016 14:39:20 +0200 > here are several fixes for the s390 qeth driver, built for net. Series applied.

[iproute PATCH] tc: don't accept qdisc 'handle' greater than ffff

2016-09-16 Thread Davide Caratti
since get_qdisc_handle() truncates the input value to 16 bit, return an error and prompt "invalid qdisc ID" in case input 'handle' parameter needs more than 16 bit to be stored. Signed-off-by: Davide Caratti --- tc/tc_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/

Re: [PATCH] nfp: fix error return code in nfp_net_netdev_open()

2016-09-16 Thread David Miller
From: Wei Yongjun Date: Thu, 15 Sep 2016 03:45:07 + > From: Wei Yongjun > > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 73725d9dfd99 ("nfp: allocate ring SW structs dynamically") > Signed-off-by: Wei Yongju

Re: [PATCH -next] net: dsa: b53: Remove unused including

2016-09-16 Thread David Miller
From: Wei Yongjun Date: Thu, 15 Sep 2016 02:24:37 + > From: Wei Yongjun > > Remove including that don't need it. > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH -next] net: emac: remove .owner field for driver

2016-09-16 Thread David Miller
From: Wei Yongjun Date: Thu, 15 Sep 2016 02:26:10 + > From: Wei Yongjun > > Remove .owner field if calls are used which set it automatically. > > Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH -next] net: emac: remove unnecessary dev_set_drvdata()

2016-09-16 Thread David Miller
From: Wei Yongjun Date: Thu, 15 Sep 2016 02:25:52 + > From: Wei Yongjun > > The driver core clears the driver data to NULL after device_release > or on probe failure. Thus, it is not needed to manually clear the > device driver data to NULL. > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH -next] net: dsa: bcm_sf2: Fix non static symbol warning

2016-09-16 Thread David Miller
From: Wei Yongjun Date: Thu, 15 Sep 2016 02:24:13 + > From: Wei Yongjun > > Fixes the following sparse warning: > > drivers/net/dsa/bcm_sf2.c:963:19: warning: > symbol 'bcm_sf2_io_ops' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH v2] net: VRF: Pass original iif to ip_route_input()

2016-09-16 Thread David Miller
From: Mark Tomlinson Date: Thu, 15 Sep 2016 11:40:05 +1200 > The function ip_rcv_finish() calls l3mdev_ip_rcv(). On any VRF except > the global VRF, this replaces skb->dev with the VRF master interface. > When calling ip_route_input_noref() from here, the checks for forwarding > look at this mast

Re: [PATCH 2/2] net/ibm/emac: add mutex to 'set multicast list'

2016-09-16 Thread David Miller
From: Ivan Mikhaylov Date: Wed, 14 Sep 2016 19:06:45 +0300 > for preventing race conditions within ioctl calls. > > Signed-off-by: Ivan Mikhaylov Applied.

Re: [PATCH 1/2] net/ibm/emac: add set mac addr callback

2016-09-16 Thread David Miller
From: Ivan Mikhaylov Date: Wed, 14 Sep 2016 19:06:44 +0300 > add realization for mac address set and remove dummy callback. > > Signed-off-by: Ivan Mikhaylov Applied.

Re: [PATCH net] net: ethernet: mediatek: fix module loading automatically based on MODULE_DEVICE_TABLE

2016-09-16 Thread David Miller
From: Date: Wed, 14 Sep 2016 21:29:34 +0800 > From: Sean Wang > > The device table is required to load modules based on > modaliases. After adding MODULE_DEVICE_TABLE, below entries > for example will be added to modules.alias: > alias of:N*T*Cmediatek,mt7623-ethC* mtk_eth_soc > > Signed-off-b

Re: [PATCH 0/2] pull request for net: batman-adv 2016-09-14

2016-09-16 Thread David Miller
From: Simon Wunderlich Date: Wed, 14 Sep 2016 14:37:33 +0200 > here are some more bugfix patches which we would like to have integrated > into net. > > Please pull or let me know of any problem! Pulled, thanks.

Re: [PATCH] net/mlx4_en: fix off by one in error handling

2016-09-16 Thread David Miller
From: Sebastian Ott Date: Wed, 14 Sep 2016 13:09:24 +0200 (CEST) > If an error occurs in mlx4_init_eq_table the index used in the > err_out_unmap label is one too big which results in a panic in > mlx4_free_eq. This patch fixes the index in the error path. > > Signed-off-by: Sebastian Ott Appl

Re: [PATCH net-next] tcp: fix a stale ooo_last_skb after a replace

2016-09-16 Thread David Miller
From: Eric Dumazet Date: Tue, 13 Sep 2016 22:55:05 -0700 > From: Eric Dumazet > > When skb replaces another one in ooo queue, I forgot to also > update tp->ooo_last_skb as well, if the replaced skb was the last one > in the queue. > > To fix this, we simply can re-use the code that runs after

Re: [patch net-next v9 2/3] net: core: Add offload stats to if_stats_msg

2016-09-16 Thread Jiri Pirko
Fri, Sep 16, 2016 at 10:00:46AM CEST, niko...@cumulusnetworks.com wrote: > >> On Sep 14, 2016, at 12:28 PM, Jiri Pirko wrote: >> >> From: Nogah Frankel >> >> Add a nested attribute of offload stats to if_stats_msg >> named IFLA_STATS_LINK_OFFLOAD_XSTATS. >> Under it, add SW stats, meaning stats

Re: [patch net-next v9 2/3] net: core: Add offload stats to if_stats_msg

2016-09-16 Thread Nikolay Aleksandrov
> On Sep 14, 2016, at 12:28 PM, Jiri Pirko wrote: > > From: Nogah Frankel > > Add a nested attribute of offload stats to if_stats_msg > named IFLA_STATS_LINK_OFFLOAD_XSTATS. > Under it, add SW stats, meaning stats only per packets that went via > slowpath to the cpu, named IFLA_OFFLOAD_XSTATS_

Re: [PATCH net-next 0/5] mlx4 misc fixes and improvements

2016-09-16 Thread Or Gerlitz
On Fri, Sep 16, 2016 at 2:21 AM, David Miller wrote: > From: Tariq Toukan > Date: Mon, 12 Sep 2016 16:20:11 +0300 > >> This patchset contains some bug fixes, a cleanup, and small improvements >> from the team to the mlx4 Eth and core drivers. >> >> Series generated against net-next commit: >> 021

Hello

2016-09-16 Thread Hasher Al Maktoum
Dear Friend, Your contact details came to me by recommendation, I am interested in investing in your country and I believe you have the capabilities of providing the needed assistance, solutions and advise in actualizing this, Let me know if you are willing to understake this task for me so we

[PATCH v2] iproute2: build nsid-name cache only for commands that need it

2016-09-16 Thread Anton Aksola
The calling of netns_map_init() before command parsing introduced a performance issue with large number of namespaces. As commands such as add, del and exec do not need to iterate through /var/run/netns it would be good not no build the cache before executing these commands. Example: unpatched: t

Re: [PATCH net-next 3/4] samples/bpf: extend test_tunnel_bpf.sh with IPIP test

2016-09-16 Thread Daniel Borkmann
Hi William, On 09/16/2016 07:16 AM, William Tu wrote: Hi Alexei, Is there a corresponding patch for iproute2? I tested this patch but fails at: + ip link add dev ipip11 type ipip external because my ip command does not support "external". Yes, like any other collect metadata backends you need

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > Try to be selective in the -K , do not kill tcp sockets ? > > I am running >ss -aKw 'dev == red' > > to kill raw sockets bound to device named 'red'. Thanks David, Eric! I'll play with this option today and report the resu

<    1   2