Re: [PATCH lora-next 01/10] net: lora: sx1301: add register, bit-fields, and helpers for regmap

2018-08-10 Thread Andreas Färber
Am 09.08.2018 um 15:23 schrieb Ben Whitten: >> BTW we'll need this regmap conversion for the picoGW_hal, >> so once we >> have a working SPI regmap driver, we'll need to split out the >> SPI bits, >> similar to sx125x. > > I am unfamiliar with the picoGW_hal, do they expose the sx1301 > as a

Re: [Query]: DSA Understanding

2018-08-10 Thread Lad, Prabhakar
Hi Andrew, On Thu, Aug 9, 2018 at 6:23 PM Andrew Lunn wrote: > > > Its coming from the switch lan4 I have attached the png, where > > C4:F3:12:08:FE:7F is > > the mac of lan4, which is broadcast to ff:ff:ff:ff:ff:ff, which is > > causing rx counter on > > PC to go up. > > So, big packets are

[PATCH net-next 5/8] l2tp: remove pppol2tp_tunnel_ioctl()

2018-08-10 Thread Guillaume Nault
Handle PPPIOCGL2TPSTATS in pppol2tp_ioctl() if the socket represents a tunnel. This one is a bit special because the caller may use the tunnel socket to retrieve statistics of one of its sessions. If the session_id is set, the corresponding session's statistics are returned, instead of those of

[PATCH net-next 3/8] l2tp: simplify pppol2tp_ioctl()

2018-08-10 Thread Guillaume Nault
* Drop test on 'sk': sock->sk cannot be NULL, or pppox_ioctl() could not have called us. * Drop test on 'SOCK_DEAD' state: if this flag was set, the socket would be in the process of being released and no ioctl could be running anymore. * Drop test on 'PPPOX_*' state: we depend

[PATCH net-next 8/8] l2tp: let pppol2tp_ioctl() fallback to dev_ioctl()

2018-08-10 Thread Guillaume Nault
Return -ENOIOCTLCMD for unknown ioctl commands. This lets dev_ioctl() handle generic socket ioctls like SIOCGIFNAME or SIOCGIFINDEX. PF_PPPOX/PX_PROTO_OL2TP was one of the few socket types not honouring this mechanism. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ppp.c | 2 +- 1 file

[PATCH net-next 1/8] l2tp: define l2tp_tunnel_uses_xfrm()

2018-08-10 Thread Guillaume Nault
Use helper function to figure out if a tunnel is using ipsec. Also, avoid accessing ->sk_policy directly since it's RCU protected. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_core.h| 19 +++ net/l2tp/l2tp_netlink.c | 7 +-- net/l2tp/l2tp_ppp.c | 5 + 3

[PATCH net-next 0/8] l2tp: rework pppol2tp ioctl handling

2018-08-10 Thread Guillaume Nault
The current ioctl() handling code can be simplified. It tests for non-relevant conditions and uselessly holds sockets. Once useless code is removed, it becomes even simpler to let pppol2tp_ioctl() handle commands directly, rather than dispatch them to pppol2tp_tunnel_ioctl() or

[PATCH net-next 7/8] l2tp: zero out stats in pppol2tp_copy_stats()

2018-08-10 Thread Guillaume Nault
Integrate memset(0) in pppol2tp_copy_stats() to avoid calling it manually every time. While there, constify 'stats'. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_ppp.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index

[PATCH net-next 2/8] l2tp: split l2tp_session_get()

2018-08-10 Thread Guillaume Nault
l2tp_session_get() is used for two different purposes. If 'tunnel' is NULL, the session is searched globally in the supplied network namespace. Otherwise it is searched exclusively in the tunnel context. Callers always know the context in which they need to search the session. But some of them do

[PATCH net-next 6/8] l2tp: remove pppol2tp_session_ioctl()

2018-08-10 Thread Guillaume Nault
pppol2tp_ioctl() has everything in place for handling PPPIOCGL2TPSTATS on session sockets. We just need to copy the stats and set ->session_id. As a side effect of sharing session and tunnel code, ->using_ipsec is properly set even when the request was made using a session socket. Signed-off-by:

[PATCH net-next 4/8] l2tp: handle PPPIOC[GS]MRU and PPPIOC[GS]FLAGS in pppol2tp_ioctl()

2018-08-10 Thread Guillaume Nault
Let pppol2tp_ioctl() handle ioctl commands directly. It still relies on pppol2tp_{session,tunnel}_ioctl() for PPPIOCGL2TPSTATS. Signed-off-by: Guillaume Nault --- Checkpatch does not like the -ENOSYS return value, which should only be used for non-existing syscalls. I have kept them so that

Re: [PATCH bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2018-08-10 Thread Jesper Dangaard Brouer
On Thu, 9 Aug 2018 12:07:00 -0400 Carlos Neira wrote: > Jesper, > Here is the updated patch. > > From 92633f6819423093932e8d04aa3dc99a5913f6fd Mon Sep 17 00:00:00 2001 > From: Carlos Neira > Date: Thu, 9 Aug 2018 09:55:32 -0400 > Subject: [PATCH bpf-next] BPF: helpers: New helper to obtain

Re: [PATCH net-next v6 10/11] net: sched: atomically check-allocate action

2018-08-10 Thread Vlad Buslov
On Thu 09 Aug 2018 at 23:43, Cong Wang wrote: > On Wed, Aug 8, 2018 at 5:06 AM Vlad Buslov wrote: >> >> >> On Wed 08 Aug 2018 at 01:20, Cong Wang wrote: >> > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: >> >> >> >> Implement function that atomically checks if action exists and either

Re: [PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Jesper Dangaard Brouer
On Fri, 10 Aug 2018 11:28:02 +0200 Björn Töpel wrote: > From: Björn Töpel > > This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. > > The reverted commit adds a WARN to check against NULL entries in the > mem_id_ht rhashtable. Any kernel path implementing the XDP (generic or >

Re: [PATCH 4.9-stable] tcp: add tcp_ooo_try_coalesce() helper

2018-08-10 Thread maowenan
On 2018/8/10 14:26, maowenan wrote: > > > On 2018/8/9 20:52, David Woodhouse wrote: >> On Thu, 2018-08-09 at 14:47 +0200, Greg KH wrote: >>> On Thu, Aug 09, 2018 at 08:37:13PM +0800, maowenan wrote: There are two patches in stable branch linux-4.4, but I have tested with below

RE: [PATCH net-next v2 1/1] net/tls: Combined memory allocation for decryption request

2018-08-10 Thread Vakul Garg
> -Original Message- > From: Dave Watson [mailto:davejwat...@fb.com] > Sent: Thursday, August 9, 2018 9:56 PM > To: Vakul Garg > Cc: netdev@vger.kernel.org; bor...@mellanox.com; > avia...@mellanox.com; da...@davemloft.net > Subject: Re: [PATCH net-next v2 1/1] net/tls: Combined memory

[PATCH][net-next] packet: switch kvzalloc to allocate memory

2018-08-10 Thread Li RongQing
Use modern kvzalloc()/kvfree() instead of custom allocations. And remove order argument for free_pg_vec and alloc_pg_vec, this argument is useless to kvfree, or can get from req. Signed-off-by: Zhang Yu Signed-off-by: Li RongQing --- net/packet/af_packet.c | 40

Re: Error running AF_XDP sample application

2018-08-10 Thread Konrad Djimeli
On 2018-08-10 03:51, Jakub Kicinski wrote: > On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote: >> Hello, >> >> I have been trying to test a sample AF_XDP program, but I have been >> experiencing some issues. >> After building the sample code >>

[PATCH net-next v3 1/1] net/tls: Combined memory allocation for decryption request

2018-08-10 Thread Vakul Garg
For preparing decryption request, several memory chunks are required (aead_req, sgin, sgout, iv, aad). For submitting the decrypt request to an accelerator, it is required that the buffers which are read by the accelerator must be dma-able and not come from stack. The buffers for aad and iv can be

[PATCH net-next v3 0/1] net/tls: Combined memory allocation for decryption request

2018-08-10 Thread Vakul Garg
This patch does a combined memory allocation from heap for scatterlists, aead_request, aad and iv for the tls record decryption path. In present code, aead_request is allocated from heap, scatterlists on a conditional basis are allocated on heap or on stack. This is inefficient as it may requires

Re: [Patch net-next] net_sched: fix a potential out-of-bound access

2018-08-10 Thread Vlad Buslov
On Thu 09 Aug 2018 at 21:43, Cong Wang wrote: > On Thu, Aug 9, 2018 at 12:32 AM Vlad Buslov wrote: >> >> Before version V5 of my action API patchset this functionality was >> implemented in exactly the same way as in your patch. Unfortunately, it >> has a double-free bug. The problem is that

Re: [PATCH net-next v6 06/11] net: sched: add 'delete' function to action ops

2018-08-10 Thread Vlad Buslov
On Thu 09 Aug 2018 at 19:38, Cong Wang wrote: > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: >> >> Extend action ops with 'delete' function. Each action type to implements >> its own delete function that doesn't depend on rtnl lock. >> >> Implement delete function that is required to

[PATCH bpf] Revert "xdp: add NULL pointer check in __xdp_return()"

2018-08-10 Thread Björn Töpel
From: Björn Töpel This reverts commit 36e0f12bbfd3016f495904b35e41c5711707509f. The reverted commit adds a WARN to check against NULL entries in the mem_id_ht rhashtable. Any kernel path implementing the XDP (generic or driver) fast path is required to make a paired

[PATCH net-next] cxgb4: add support to display DCB info

2018-08-10 Thread Ganesh Goudar
display Data Center bridging information in debug fs. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 193

Re: [PATCH bpf-next] bpf: enable btf for use in all maps

2018-08-10 Thread Daniel Borkmann
On 08/10/2018 04:13 AM, Alexei Starovoitov wrote: > On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote: >> On 08/09/2018 11:44 PM, Alexei Starovoitov wrote: >>> On Thu, Aug 09, 2018 at 11:30:52PM +0200, Daniel Borkmann wrote: On 08/09/2018 11:14 PM, Alexei Starovoitov wrote:

[query] about recent mvneta patches

2018-08-10 Thread Jisheng Zhang
Hi, Today I have a look at recent mvneta patches in net-next, I worried two patches: 1. commit 562e2f467e71 ("net: mvneta: Improve the buffer allocation method for SWBM") sets rx_offset_correction as 0 for SW BM, but IIRC, the offset is introduced to support 64bit platforms. So in theory the

Re: [PATCH 4.9-stable] tcp: add tcp_ooo_try_coalesce() helper

2018-08-10 Thread maowenan
On 2018/8/9 20:52, David Woodhouse wrote: > On Thu, 2018-08-09 at 14:47 +0200, Greg KH wrote: >> On Thu, Aug 09, 2018 at 08:37:13PM +0800, maowenan wrote: >>> There are two patches in stable branch linux-4.4, but I have tested with >>> below patches, and found that the cpu usage was very high.

Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-10 Thread Anssi Hannula
On 9.8.2018 18:14, Andrew Lunn wrote: > Hi Anssi Hi! >> macb_reset_hw() is called in init path too, though, so maybe clearing >> all bits is intentional / wanted to get the controller to a known state, >> even though the comment only mentions TX/RX? > You need to be careful here. Once

Re: pull-request: bpf 2018-08-10

2018-08-10 Thread David Miller
From: Daniel Borkmann Date: Fri, 10 Aug 2018 01:21:49 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: ... > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git Pulled, thanks

[net-next, PATCH 1/2 v2] net: socionext: Use descriptor info instead of MMIO reads on Rx

2018-08-10 Thread Ilias Apalodimas
MMIO reads for remaining packets in queue occur (at least)twice per invocation of netsec_process_rx(). We can use the packet descriptor to identify if it's owned by the hardware and break out, avoiding the more expensive MMIO read operations. This has a ~2% increase on the pps of the Rx path when

[net-next, PATCH 0/2 v2] netsec driver improvements

2018-08-10 Thread Ilias Apalodimas
This patchset introduces some improvements on socionext netsec driver. - patch 1/2, avoids unneeded MMIO reads on the Rx path - patch 2/2, is adjusting the numbers of descriptors used Changes since v1: - Move dma_rmb() to protect descriptor accesses until the device has updated the

[net-next, PATCH 2/2 v2] net: socionext: Increase descriptors to 256

2018-08-10 Thread Ilias Apalodimas
Increasing descriptors to 256 from 128 and adjusting the NAPI weight to 64 increases performace on Rx by ~20% on 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

<    1   2