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

2018-10-08 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) sk_lookup_[tcp|udp] and sk_release helpers from Joe Stringer which allow BPF programs to perform lookups for sockets in a network namespace. This would allow programs to determine early

Re: [PATCH v2 ipsec] Clear secpath on loopback_xmit

2018-10-08 Thread Steffen Klassert
On Mon, Oct 08, 2018 at 11:13:36AM -0700, Benedict Wong wrote: > This patch clears the skb->sp when transmitted over loopback. This > ensures that the loopback-ed packet does not have any secpath > information from the outbound transforms. > > At present, this causes XFRM tunnel mode packets to

Re: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info

2018-10-08 Thread Mike Rapoport
On Mon, Oct 08, 2018 at 12:15:54PM -0600, David Ahern wrote: > On 10/8/18 6:06 AM, Mike Rapoport wrote: > > The fib6_info_alloc() function allocates percpu memory to hold per CPU > > pointers to rt6_info, but this memory is never freed. Fix it. > > > > Fixes: a64efe142f5e ("net/ipv6: introduce

[PATCH net] net/ipv6: stop leaking percpu memory in fib6 info

2018-10-08 Thread Mike Rapoport
The fib6_info_alloc() function allocates percpu memory to hold per CPU pointers to rt6_info, but this memory is never freed. Fix it. Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") Signed-off-by: Mike Rapoport Reviewed-by: David Ahern --- net/ipv6/ip6_fib.c | 2 ++ 1

[PATCH net-next v2] net: tun: remove useless codes of tun_automq_select_queue

2018-10-08 Thread Wang Li
Because the function __skb_get_hash_symmetric always returns non-zero. Signed-off-by: Zhang Yu Signed-off-by: Wang Li --- drivers/net/tun.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index

[PATCH net-next] rxrpc: Remove set but not used variable 'ioc'

2018-10-08 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: net/rxrpc/output.c: In function 'rxrpc_reject_packets': net/rxrpc/output.c:527:11: warning: variable 'ioc' set but not used [-Wunused-but-set-variable] It never used since introduction in commit ece64fec164f ("rxrpc: Emit BUSY packets when supposed

[PATCH net-next 3/3] nfp: flower: use host context count provided by firmware

2018-10-08 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Read the host context count symbols provided by firmware and use it to determine the number of allocated stats ids. Previously it won't be possible to offload more than 2^17 filter even if FW was able to do so. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by:

[PATCH net-next 2/3] nfp: flower: use stats array instead of storing stats per flow

2018-10-08 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Make use of an array stats instead of storing stats per flow which would require a hash lookup at critical times. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/flower/main.h | 6 +-

[PATCH net-next 1/3] nfp: flower: use rhashtable for flow caching

2018-10-08 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Make use of relativistic hash tables for tracking flows instead of fixed sized hash tables. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c | 5 --

[PATCH net-next 0/3] nfp: flower: speed up stats update loop

2018-10-08 Thread Jakub Kicinski
Hi! This set from Pieter improves performance of processing FW stats update notifications. The FW seems to send those at relatively high rate (roughly ten per second per flow), therefore if we want to approach the million flows mark we have to be very careful about our data structures. We tried

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread David Miller
From: Prashant Bhole Date: Tue, 9 Oct 2018 09:02:15 +0900 > Thanks. Is there any reason this series did not get posted on > netdev-list and can not be seen in the patchwork? Bad timing. I did something stupid on vger.kernel.org, it ran out of disk space while the postings were being processed,

Re: [PATCH bpf-next 1/6] bpf: rename stack trace map operations

2018-10-08 Thread Song Liu
Actually, does it make sense to implement a list_map that supports both pop_head() and pop_tail()? Maybe gate one of the pop operations with options? I am asking because mixing stack with stack trace is still confusing after this patch. Thanks, Song On Mon, Oct 8, 2018 at 12:11 PM Mauricio

Re: [PATCH bpf-next 4/6] bpf: add queue and stack maps

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 12:12 PM Mauricio Vasquez B wrote: > > Queue/stack maps implement a FIFO/LIFO data storage for ebpf programs. > These maps support peek, pop and push operations that are exposed to eBPF > programs through the new bpf_map[peek/pop/push] helpers. Those operations > are

Re: [PATCH bpf-next 3/6] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 12:12 PM Mauricio Vasquez B wrote: > > The following patch implements a bpf queue/stack maps that > provides the peek/pop/push functions. There is not a direct > relationship between those functions and the current maps > syscalls, hence a new MAP_LOOKUP_AND_DELETE_ELEM

[PATCH bpf-next 6/6] selftests/bpf: test_verifier, check bpf_map_lookup_elem access in bpf prog

2018-10-08 Thread Prashant Bhole
map_lookup_elem isn't supported by certain map types like: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH Let's add verfier tests to check whether verifier prevents bpf_map_lookup_elem call on above programs from bpf program.

[PATCH bpf-next 4/6] tools/bpf: bpftool, print strerror when map lookup error occurs

2018-10-08 Thread Prashant Bhole
Since map lookup error can be ENOENT or EOPNOTSUPP, let's print strerror() as error message in normal and JSON output. This patch adds helper function print_entry_error() to print entry from lookup error occurs Example: Following example dumps a map which does not support lookup. Output before:

[PATCH bpf-next 3/6] tools/bpf: bpftool, split the function do_dump()

2018-10-08 Thread Prashant Bhole
do_dump() function in bpftool/map.c has deep indentations. In order to reduce deep indent, let's move element printing code out of do_dump() into dump_map_elem() function. Signed-off-by: Prashant Bhole Acked-by: Jakub Kicinski Acked-by: Alexei Starovoitov --- tools/bpf/bpftool/map.c | 83

[PATCH bpf-next 2/6] bpf: return EOPNOTSUPP when map lookup isn't supported

2018-10-08 Thread Prashant Bhole
Return ERR_PTR(-EOPNOTSUPP) from map_lookup_elem() methods of below map types: - BPF_MAP_TYPE_PROG_ARRAY - BPF_MAP_TYPE_STACK_TRACE - BPF_MAP_TYPE_XSKMAP - BPF_MAP_TYPE_SOCKMAP/BPF_MAP_TYPE_SOCKHASH Signed-off-by: Prashant Bhole Acked-by: Alexei Starovoitov --- kernel/bpf/arraymap.c | 2 +-

[PATCH bpf-next 5/6] selftests/bpf: test_verifier, change names of fixup maps

2018-10-08 Thread Prashant Bhole
Currently fixup map are named like fixup_map1, fixup_map2, and so on. As suggested by Alexei let's change change map names such that we can identify map type by looking at the name. This patch is basically a find and replace change: fixup_map1 -> fixup_map_hash_8b fixup_map2 ->

[PATCH bpf-next 1/6] bpf: error handling when map_lookup_elem isn't supported

2018-10-08 Thread Prashant Bhole
The error value returned by map_lookup_elem doesn't differentiate whether lookup was failed because of invalid key or lookup is not supported. Lets add handling for -EOPNOTSUPP return value of map_lookup_elem() method of map, with expectation from map's implementation that it should return

[PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread Prashant Bhole
Currently when map a lookup fails, user space API can not make any distinction whether given key was not found or lookup is not supported by particular map. In this series we modify return value of maps which do not support lookup. Lookup on such map implementation will return -EOPNOTSUPP. bpf()

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread Alexei Starovoitov
On Tue, Oct 9, 2018 at 12:48 AM Prashant Bhole wrote: > > Shall I repost with the same version and Alexei's Acked-by for the series? yes. please repost as-is and add my Ack to all patches. Thanks!

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread Prashant Bhole
On 10/9/2018 9:43 AM, Daniel Borkmann wrote: On 10/09/2018 02:02 AM, Prashant Bhole wrote: On 10/6/2018 3:35 AM, Alexei Starovoitov wrote: On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote: Currently when map a lookup fails, user space API can not make any distinction whether

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread Daniel Borkmann
On 10/09/2018 02:02 AM, Prashant Bhole wrote: > On 10/6/2018 3:35 AM, Alexei Starovoitov wrote: >> On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote: >>> Currently when map a lookup fails, user space API can not make any >>> distinction whether given key was not found or lookup is not

Re: [PATCH bpf] xsk: do not call synchronize_net() under RCU read lock

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 10:41 AM Björn Töpel wrote: > > From: Björn Töpel > > The XSKMAP update and delete functions called synchronize_net(), which > can sleep. It is not allowed to sleep during an RCU read section. > > Instead we need to make sure that the sock sk_destruct (xsk_destruct) >

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-08 Thread Prashant Bhole
On 10/6/2018 3:35 AM, Alexei Starovoitov wrote: On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote: Currently when map a lookup fails, user space API can not make any distinction whether given key was not found or lookup is not supported by particular map. In this series we

Re: [PATCH v2 2/3] tools: sync linux/bpf.h

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 3:34 AM Lorenz Bauer wrote: > > Synchronize changes to linux/bpf.h from > commit 88db241b34bf ("bpf: allow zero-initializing hash map seed"). I guess we cannot keep this hash during git-am? We probably don't need this hash anyway, as the two patches will be applied back to

[PATCH net-next v3] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-10-08 Thread Justin.Lee1
The new command (NCSI_CMD_SEND_CMD) is added to allow user space application to send NC-SI command to the network card. Also, add a new attribute (NCSI_ATTR_DATA) for transferring request and response. The work flow is as below. Request: User space application -> Netlink interface

Re: [PATCH v2 3/3] tools: add selftest for BPF_F_ZERO_SEED

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 3:34 AM Lorenz Bauer wrote: > > Check that iterating two separate hash maps produces the same > order of keys if BPF_F_ZERO_SEED is used. > > Signed-off-by: Lorenz Bauer > --- > tools/testing/selftests/bpf/test_maps.c | 68 + > 1 file changed, 57

Re: [PATCH v2 1/3] bpf: allow zero-initializing hash map seed

2018-10-08 Thread Song Liu
On Mon, Oct 8, 2018 at 3:34 AM Lorenz Bauer wrote: > > Add a new flag BPF_F_ZERO_SEED, which forces a hash map > to initialize the seed to zero. This is useful when doing > performance analysis both on individual BPF programs, as > well as the kernel's hash table implementation. > >

[PATCH net-next] tcp: refactor DCTCP ECN ACK handling

2018-10-08 Thread Yuchung Cheng
DCTCP has two parts - a new ECN signalling mechanism and the response function to it. The first part can be used by other congestion control for DCTCP-ECN deployed networks. This patch moves that part into a separate tcp_dctcp.h to be used by other congestion control module (like how Yeah uses

Re: [PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread Sabrina Dubroca
2018-10-08, 11:18:49 -0600, David Ahern wrote: > On 10/8/18 6:36 AM, Sabrina Dubroca wrote: > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > > index c7861e4b402c..dc9d2668d9bb 100644 > > --- a/include/linux/netdevice.h > > +++ b/include/linux/netdevice.h > > @@ -2458,6

Re: [PATCH net-next] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Heiner Kallweit
On 08.10.2018 23:20, Stephen Hemminger wrote: > On Mon, 8 Oct 2018 22:00:51 +0200 > Heiner Kallweit wrote: > >> * >> + * @uc_promisc:Counter that indicates promiscuous mode >> + * has been enabled due to the need to listen to >> + * additional unicast

Re: [PATCH net-next] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Stephen Hemminger
On Mon, 8 Oct 2018 22:00:51 +0200 Heiner Kallweit wrote: > * > + * @uc_promisc:Counter that indicates promiscuous mode > + * has been enabled due to the need to listen to > + * additional unicast addresses in a device that > + * does

Re: [PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread kbuild test robot
Hi Sabrina, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Sabrina-Dubroca/net-ipv4-update-fnhe_pmtu-when-first-hop-s-MTU-changes/20181008-225709 reproduce: make htmldocs All warnings (new ones

[PATCH net-next] net/ipv6: Make ipv6_route_table_template static

2018-10-08 Thread David Ahern
From: David Ahern ipv6_route_table_template is exported but there are no users outside of route.c. Make it static. Signed-off-by: David Ahern --- include/net/ipv6.h | 2 -- net/ipv6/route.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/net/ipv6.h

[PATCH net-next] rtnetlink: Update comment in rtnl_stats_dump regarding strict data checking

2018-10-08 Thread David Ahern
From: David Ahern The NLM_F_DUMP_PROPER_HDR netlink flag was replaced by a setsockopt. Update the comment in rtnl_stats_dump. Fixes: 841891ec0c65 ("rtnetlink: Update rtnl_stats_dump for strict data checking") Reported-by: Christian Brauner Signed-off-by: David Ahern --- net/core/rtnetlink.c

[PATCH net-next] rtnetlink: Move ifm in valid_fdb_dump_legacy to closer to use

2018-10-08 Thread David Ahern
From: David Ahern Move setting of local variable ifm to after the message parsing in valid_fdb_dump_legacy. Avoid potential future use of unchecked variable. Fixes: 8dfbda19a21b ("rtnetlink: Move input checking for rtnl_fdb_dump to helper") Reported-by: Christian Brauner Signed-off-by: David

[PATCH iproute2-next] libnetlink: fix use-after-free of message buf

2018-10-08 Thread Vlad Buslov
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically allocated 'buf' that is used to store netlink messages. If netlink message is an error message, buf is deallocated before returning with error code. However, on return err->error code is checked one more time to generate

Re: [RFC PATCH v2 bpf-next 0/2] verifier liveness simplification

2018-10-08 Thread Jiong Wang
On 03/10/2018 17:53, Jiong Wang wrote: On 03/10/2018 16:59, Alexei Starovoitov wrote: On Wed, Oct 03, 2018 at 04:36:31PM +0100, Jiong Wang wrote: Now this hasn't happened. I am still debugging the root cause, but kind of feel "64-bit" attribute propagation is the issue, it seems to me it

[PATCH net-next v2] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Heiner Kallweit
bool is good as parameter type or function return type, but if used for struct members it consumes more memory than needed. Changing the bool members of struct net_device to bitfield members allows to decrease the memory footprint of this struct. Signed-off-by: Heiner Kallweit --- v2: - Change

Re: [PATCH net-next] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Heiner Kallweit
On 08.10.2018 22:07, Randy Dunlap wrote: > On 10/8/18 1:00 PM, Heiner Kallweit wrote: >> bool is good as parameter type or function return type, but if used >> for struct members it consumes more memory than needed. >> Changing the bool members of struct net_device to bitfield members >> allows to

Re: [PATCH net-next] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Randy Dunlap
On 10/8/18 1:00 PM, Heiner Kallweit wrote: > bool is good as parameter type or function return type, but if used > for struct members it consumes more memory than needed. > Changing the bool members of struct net_device to bitfield members > allows to decrease the memory footprint of this struct.

[PATCH net-next] net: core: change bool members of struct net_device to bitfield members

2018-10-08 Thread Heiner Kallweit
bool is good as parameter type or function return type, but if used for struct members it consumes more memory than needed. Changing the bool members of struct net_device to bitfield members allows to decrease the memory footprint of this struct. Signed-off-by: Heiner Kallweit ---

[PATCH bpf-next 6/6] selftests/bpf: add test cases for queue and stack maps

2018-10-08 Thread Mauricio Vasquez B
test_maps: Tests that queue/stack maps are behaving correctly even in corner cases test_progs: Tests new ebpf helpers Signed-off-by: Mauricio Vasquez B --- tools/lib/bpf/bpf.c| 12 ++ tools/lib/bpf/bpf.h|1

[PATCH bpf-next 5/6] Sync uapi/bpf.h to tools/include

2018-10-08 Thread Mauricio Vasquez B
Sync both files. Signed-off-by: Mauricio Vasquez B --- tools/include/uapi/linux/bpf.h | 36 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f9187b41dff6..bfa042273fad

[PATCH bpf-next 2/6] bpf/syscall: allow key to be null in map functions

2018-10-08 Thread Mauricio Vasquez B
This commit adds the required logic to allow key being NULL in case the key_size of the map is 0. A new __bpf_copy_key function helper only copies the key from userpsace when key_size != 0, otherwise it enforces that key must be null. Signed-off-by: Mauricio Vasquez B --- kernel/bpf/syscall.c

[PATCH bpf-next 3/6] bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall

2018-10-08 Thread Mauricio Vasquez B
The following patch implements a bpf queue/stack maps that provides the peek/pop/push functions. There is not a direct relationship between those functions and the current maps syscalls, hence a new MAP_LOOKUP_AND_DELETE_ELEM syscall is added, this is mapped to the pop operation in the

[PATCH bpf-next 4/6] bpf: add queue and stack maps

2018-10-08 Thread Mauricio Vasquez B
Queue/stack maps implement a FIFO/LIFO data storage for ebpf programs. These maps support peek, pop and push operations that are exposed to eBPF programs through the new bpf_map[peek/pop/push] helpers. Those operations are exposed to userspace applications through the already existing syscalls in

[PATCH bpf-next 0/6] Implement queue/stack maps

2018-10-08 Thread Mauricio Vasquez B
In some applications this is needed have a pool of free elements, for example the list of free L4 ports in a SNAT. None of the current maps allow to do it as it is not possible to get any element without having they key it is associated to, even if it were possible, the lack of locking mecanishms

[PATCH bpf-next 1/6] bpf: rename stack trace map operations

2018-10-08 Thread Mauricio Vasquez B
In the following patches queue and stack maps (FIFO and LIFO datastructures) will be implemented. In order to avoid confusion and a possible name clash rename stack_map_ops to stack_trace_map_ops Signed-off-by: Mauricio Vasquez B --- include/linux/bpf_types.h |2 +- kernel/bpf/stackmap.c

[PATCH net-next 0/3] mlxsw: selftests: Few small updates

2018-10-08 Thread Ido Schimmel
First patch fixes a typo in mlxsw. Second patch fixes a race in a recent test. Third patch makes a recent test executable. Nir Dotan (1): mlxsw: pci: Fix a typo Petr Machata (2): selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too selftests: mlxsw: qos_mc_aware:

[PATCH net-next 3/3] selftests: mlxsw: qos_mc_aware: Make executable

2018-10-08 Thread Ido Schimmel
From: Petr Machata This is a self-standing test and as such should be itself executable. Fixes: b5638d46c90a ("selftests: mlxsw: Add a test for UC behavior under MC flood") Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel ---

[PATCH net-next 1/3] mlxsw: pci: Fix a typo

2018-10-08 Thread Ido Schimmel
From: Nir Dotan Signed-off-by: Nir Dotan Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h index

[PATCH net-next 2/3] selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too

2018-10-08 Thread Ido Schimmel
From: Petr Machata Immediately after mlxsw module is probed and lldpad started, added APP entries are briefly in "unknown" state before becoming "pending". That's the state that lldpad_app_wait_set() typically sees, and since there are no pending entries at that time, it bails out. However the

RE: [Intel-wired-lan] [PATCH][-next] ixgbe: don't clear_bit on xdp_ring->state if xdp_ring is null

2018-10-08 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Colin King > Sent: Thursday, October 4, 2018 10:58 AM > To: Kirsher, Jeffrey T ; David S . Miller > ; intel-wired-...@lists.osuosl.org; > netdev@vger.kernel.org > Cc:

Re: skb length without fragments

2018-10-08 Thread Eric Dumazet
On 10/08/2018 11:02 AM, pradeep kumar nalla wrote: > Hi > > While testing my network driver with pktgen I could see an skb greater > than 16K without fragments in xmit function. This lead to a fix in my > driver that assumes when an SKB whose length is greater than 16K will > come with

Re: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info

2018-10-08 Thread David Ahern
On 10/8/18 6:06 AM, Mike Rapoport wrote: > The fib6_info_alloc() function allocates percpu memory to hold per CPU > pointers to rt6_info, but this memory is never freed. Fix it. > > Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") > > Signed-off-by: Mike Rapoport > Cc:

[PATCH v2 ipsec] Clear secpath on loopback_xmit

2018-10-08 Thread Benedict Wong
This patch clears the skb->sp when transmitted over loopback. This ensures that the loopback-ed packet does not have any secpath information from the outbound transforms. At present, this causes XFRM tunnel mode packets to be dropped with XFRMINNOPOLS, due to the outbound state being in the

Re: [PATCH net-next] dpaa2-eth: Don't account Tx confirmation frames on NAPI poll

2018-10-08 Thread David Miller
From: Ioana Ciocoi Radulescu Date: Mon, 8 Oct 2018 14:16:31 + > Until now, both Rx and Tx confirmation frames handled during > NAPI poll were counted toward the NAPI budget. However, Tx > confirmations are lighter to process than Rx frames, which can > skew the amount of work actually done

Re: [PATCH net-next] net: mscc: ocelot: remove set but not used variable 'phy_mode'

2018-10-08 Thread David Miller
From: YueHaibing Date: Mon, 8 Oct 2018 14:07:50 + > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe': > drivers/net/ethernet/mscc/ocelot_board.c:262:17: warning: > variable 'phy_mode' set but not used

Re: [PATCH v2 net-next 11/23] rtnetlink: Update rtnl_stats_dump for strict data checking

2018-10-08 Thread David Miller
From: David Ahern Date: Mon, 8 Oct 2018 07:25:34 -0600 > On 10/8/18 4:17 AM, Christian Brauner wrote: >>> @@ -4696,13 +4697,32 @@ static int rtnl_stats_dump(struct sk_buff *skb, >>> struct netlink_callback *cb) >>> >>> cb->seq = net->dev_base_seq; >>> >>> - if (nlmsg_len(cb->nlh) <

skb length without fragments

2018-10-08 Thread pradeep kumar nalla
Hi While testing my network driver with pktgen I could see an skb greater than 16K without fragments in xmit function. This lead to a fix in my driver that assumes when an SKB whose length is greater than 16K will come with fragments. Apart from pktgen what are the chances or possibilities of

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread David Miller
From: "Bshara, Nafea" Date: Mon, 8 Oct 2018 12:47:50 + > Ship it Anything but... see my feedback.

Re: [PATCH net-next 0/3] selftests: add more PMTU tests

2018-10-08 Thread David Miller
From: Sabrina Dubroca Date: Mon, 8 Oct 2018 14:37:02 +0200 > The current selftests for PMTU cover VTI tunnels, but there's nothing > about the generation and handling of PMTU exceptions by intermediate > routers. This series adds and improves existing helpers, then adds > IPv4 and IPv6

Re: [PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread David Miller
From: Sabrina Dubroca Date: Mon, 8 Oct 2018 14:36:38 +0200 > Since commit 5aad1de5ea2c ("ipv4: use separate genid for next hop > exceptions"), exceptions get deprecated separately from cached > routes. In particular, administrative changes don't clear PMTU anymore. > > As Stefano described in

Re: [PATCH V1 net 2/5] net: ena: fix warning in rmmod caused by double iounmap

2018-10-08 Thread David Miller
From: Date: Mon, 8 Oct 2018 15:28:41 +0300 > From: Arthur Kiyanovski > > Memory mapped with devm_ioremap is automatically freed when the driver > is disconnected from the device. Therefore there is no need to > explicitly call devm_iounmap. > > Signed-off-by: Arthur Kiyanovski > --- >

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread David Miller
From: Date: Mon, 8 Oct 2018 15:28:39 +0300 > From: Arthur Kiyanovski > > Arthur Kiyanovski (5): > net: ena: fix indentations in ena_defs for better readability > net: ena: fix warning in rmmod caused by double iounmap > net: ena: fix rare bug when failed restart/resume is followed by >

Re: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info

2018-10-08 Thread David Miller
From: Mike Rapoport Date: Mon, 8 Oct 2018 15:06:03 +0300 > The fib6_info_alloc() function allocates percpu memory to hold per CPU > pointers to rt6_info, but this memory is never freed. Fix it. > > Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") > Please do not put

[PATCH bpf] xsk: do not call synchronize_net() under RCU read lock

2018-10-08 Thread Björn Töpel
From: Björn Töpel The XSKMAP update and delete functions called synchronize_net(), which can sleep. It is not allowed to sleep during an RCU read section. Instead we need to make sure that the sock sk_destruct (xsk_destruct) function is asynchronously called after an RCU grace period. Setting

Re: [PATCH v2 net-next 00/23] rtnetlink: Add support for rigid checking of data in dump request

2018-10-08 Thread David Miller
From: Christian Brauner Date: Mon, 8 Oct 2018 13:04:13 +0200 > On Sun, Oct 07, 2018 at 08:16:21PM -0700, David Ahern wrote: >> From: David Ahern >> >> There are many use cases where a user wants to influence what is >> returned in a dump for some rtnetlink command: one is wanting data >> for a

Re: [PATCH net-next 3/3] selftests: pmtu: add basic IPv4 and IPv6 PMTU tests

2018-10-08 Thread David Ahern
On 10/8/18 6:37 AM, Sabrina Dubroca wrote: > Commit d1f1b9cbf34c ("selftests: net: Introduce first PMTU test") and > follow-ups introduced some PMTU tests, but they all rely on tunneling, > and, particularly, on VTI. > > These new tests use simple routing to exercise the generation and > update

Re: [PATCH net-next 1/3] selftests: pmtu: Introduce check_pmtu_value()

2018-10-08 Thread David Ahern
On 10/8/18 6:37 AM, Sabrina Dubroca wrote: > From: Stefano Brivio > > Introduce and use a function that checks PMTU values against > expected values and logs error messages, to remove some clutter. > > Signed-off-by: Stefano Brivio > Signed-off-by: Sabrina Dubroca > --- >

Re: [PATCH net-next 2/3] selftests: pmtu: extend MTU parsing helper to locked MTU

2018-10-08 Thread David Ahern
On 10/8/18 6:37 AM, Sabrina Dubroca wrote: > The mtu_parse helper introduced in commit f2c929feeccd ("selftests: > pmtu: Factor out MTU parsing helper") can only handle "mtu 1234", but > not "mtu lock 1234". Extend it, so that we can do IPv4 tests with PMTU > smaller than net.ipv4.route.min_pmtu >

Re: [PATCH net-next v2 00/12] net: sched: cls_u32 Various improvements

2018-10-08 Thread David Miller
From: Jamal Hadi Salim Date: Mon, 8 Oct 2018 06:22:32 -0400 > Various improvements from Al. > > Changes from version 1: Add missing commit Series applied.

Re: [PATCH net-next] netdev: remove useless codes of tun_automq_select_queue

2018-10-08 Thread David Miller
From: Wang Li Date: Mon, 8 Oct 2018 16:51:12 +0800 > @@ -1045,15 +1039,12 @@ static void tun_automq_xmit(struct tun_struct *tun, > struct sk_buff *skb) >* RPS hash and save it into the flow_table here. >*/ > __u32 rxhash; > + struct

Re: [PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread David Ahern
On 10/8/18 6:36 AM, Sabrina Dubroca wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index c7861e4b402c..dc9d2668d9bb 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -2458,6 +2458,13 @@ struct netdev_notifier_info { > struct

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 18:55 skrev Eric Dumazet : > [...] > > You might take a look at SOCK_RCU_FREE flag for sockets. > Ah, thanks! I'll use this instead.

Re: [PATCH net] rds: RDS (tcp) hangs on sendto() to unresponding address

2018-10-08 Thread Santosh Shilimkar
10/8/2018 9:17 AM, Ka-Cheong Poon wrote: In rds_send_mprds_hash(), if the calculated hash value is non-zero and the MPRDS connections are not yet up, it will wait. But it should not wait if the send is non-blocking. In this case, it should just use the base c_path for sending the message.

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Eric Dumazet
On 10/08/2018 09:05 AM, Björn Töpel wrote: > > Thanks for finding and pointing this out, Eric! > > I'll have look and get back with a patch. > > You might take a look at SOCK_RCU_FREE flag for sockets.

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 18:05 skrev Björn Töpel : > > Den mån 8 okt. 2018 kl 17:31 skrev Eric Dumazet : > > [...] > > So it is illegal to call synchronize_net(), since it is a reschedule point. > > > > Thanks for finding and pointing this out, Eric! > > I'll have look and get back with a patch. >

[PATCH net] rds: RDS (tcp) hangs on sendto() to unresponding address

2018-10-08 Thread Ka-Cheong Poon
In rds_send_mprds_hash(), if the calculated hash value is non-zero and the MPRDS connections are not yet up, it will wait. But it should not wait if the send is non-blocking. In this case, it should just use the base c_path for sending the message. Signed-off-by: Ka-Cheong Poon ---

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 17:31 skrev Eric Dumazet : > > On 05/02/2018 04:01 AM, Björn Töpel wrote: > > From: Björn Töpel > > > > The xskmap is yet another BPF map, very much inspired by > > dev/cpu/sockmap, and is a holder of AF_XDP sockets. A user application > > adds AF_XDP sockets into the map,

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Richard Cochran
On Mon, Oct 08, 2018 at 08:28:00AM -0700, Richard Cochran wrote: > Let's stick to phylib for now. We can cross the other bridge when we > come to it. Maybe the net_device->phylink will emerge for purposes > other that time stamping. Let's not guess about how it should look. In fact, it is

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Eric Dumazet
On 05/02/2018 04:01 AM, Björn Töpel wrote: > From: Björn Töpel > > The xskmap is yet another BPF map, very much inspired by > dev/cpu/sockmap, and is a holder of AF_XDP sockets. A user application > adds AF_XDP sockets into the map, and by using the bpf_redirect_map > helper, an XDP program

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Richard Cochran
On Mon, Oct 08, 2018 at 05:07:22PM +0200, Andrew Lunn wrote: > So as you said, the phylib API has not changed much, which is common > for mature code. I meant that phy-LINK hasn't changed much. > But i think long term, it will become less important. > It will share the space with phylink. And

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Shuah Khan
Hi Naresh, Please use sh...@kernel.org for faster responses. I updated MAINTAINERS entry a while back removing shua...@osg.samsung.com address due to IT infrastructure changes at Samsung. On 10/08/2018 08:55 AM, Naresh Kamboju wrote: > Daniel, > > On Mon, 8 Oct 2018 at 18:58, Daniel Borkmann

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 07:04:39PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote: > > Sure, but things have moved on since then. > > I was curious about this. Based on your uses cases, I guess that you > mean phylib? But not much has changed AFAICT.

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Naresh Kamboju
Daniel, On Mon, 8 Oct 2018 at 18:58, Daniel Borkmann wrote: > > On 10/08/2018 03:13 PM, Naresh Kamboju wrote: > > BPF test case test_kmod.sh hangs on all devices running linux next. > > > > + cd /opt/kselftests/default-in-kernel/bpf > > + ./test_kmod.sh > > sysctl: cannot stat

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread Machulsky, Zorik
Acked-by: Zorik Machulsky On 10/8/18, 5:28 AM, "akiy...@amazon.com" wrote: From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena: fix warning in rmmod caused by double

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread Machulsky, Zorik
Ship it On 10/8/18, 5:47 AM, "Bshara, Nafea" wrote: Ship it On 10/8/18, 5:28 AM, "akiy...@amazon.com" wrote: From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena:

Re: [PATCH v8 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-08 Thread Arnd Bergmann
On Mon, Oct 8, 2018 at 3:59 PM Sunil Kovvuri wrote: > On Mon, Oct 8, 2018 at 5:41 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 5:00 PM wrote: > > > > > > +/* Structure for requesting resource provisioning. > > > + * 'modify' flag to be used when either requesting more > > > + * or to

Re: [PATCH v8 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-08 Thread Arnd Bergmann
On Mon, Oct 8, 2018 at 3:50 PM Sunil Kovvuri wrote: > > On Mon, Oct 8, 2018 at 5:52 PM Arnd Bergmann wrote: > > > > On Sun, Oct 7, 2018 at 4:59 PM wrote: > > > > > --- /dev/null > > > +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig > > > @@ -0,0 +1,12 @@ > > > +# > > > +# Marvell OcteonTX2

[PATCH] qed: fix memory leak of pent on error exit paths

2018-10-08 Thread Colin King
From: Colin Ian King Currently, calls to qed_sp_init_request can leak pent on -EINVAL errors. Fix this by adding the allocated pent back to the p_hwfn free_pool on these error exits so it can be re-used later and hence fixes the leak. Detected by CoverityScan, CID#1411643 ("Resource leak")

[PATCH net-next] dpaa2-eth: Don't account Tx confirmation frames on NAPI poll

2018-10-08 Thread Ioana Ciocoi Radulescu
Until now, both Rx and Tx confirmation frames handled during NAPI poll were counted toward the NAPI budget. However, Tx confirmations are lighter to process than Rx frames, which can skew the amount of work actually done inside one NAPI cycle. Update the code to only count Rx frames toward the

Re: [PATCH v8 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-08 Thread Sunil Kovvuri
On Mon, Oct 8, 2018 at 5:41 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 5:00 PM wrote: > > > > +/* Structure for requesting resource provisioning. > > + * 'modify' flag to be used when either requesting more > > + * or to detach partial of a cetain resource type. > > + * Rest of the

[PATCH net-next] net: mscc: ocelot: remove set but not used variable 'phy_mode'

2018-10-08 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe': drivers/net/ethernet/mscc/ocelot_board.c:262:17: warning: variable 'phy_mode' set but not used [-Wunused-but-set-variable] enum phy_mode phy_mode; It never used since

Re: [PATCH v8 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-08 Thread Sunil Kovvuri
On Mon, Oct 8, 2018 at 5:52 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 4:59 PM wrote: > > > --- /dev/null > > +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig > > @@ -0,0 +1,12 @@ > > +# > > +# Marvell OcteonTX2 drivers configuration > > +# > > + > > +config OCTEONTX2_AF > > +

Re: [PATCH v2 net-next 17/23] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-08 Thread Christian Brauner
On Mon, Oct 08, 2018 at 07:28:33AM -0600, David Ahern wrote: > On 10/8/18 4:54 AM, Christian Brauner wrote: > > On Sun, Oct 07, 2018 at 08:16:38PM -0700, David Ahern wrote: > >> From: David Ahern > >> > >> Update rtnl_net_dumpid for strict data checking. If the flag is set, > >> the dump request

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Daniel Borkmann
On 10/08/2018 03:13 PM, Naresh Kamboju wrote: > BPF test case test_kmod.sh hangs on all devices running linux next. > > + cd /opt/kselftests/default-in-kernel/bpf > + ./test_kmod.sh > sysctl: cannot stat /proc/sys/net/core/bpf_jit_enable: No such file or > directory > sysctl: cannot stat

  1   2   >