Re: ANNOUNCE: Enhanced IP v1.4

2018-06-01 Thread Willy Tarreau
Hello Sam, On Fri, Jun 01, 2018 at 09:48:28PM -0400, Sam Patton wrote: > Hello! > > If you do not know what Enhanced IP is, read this post on netdev first: > > https://www.spinics.net/lists/netdev/msg327242.html > > > The Enhanced IP project presents: > > Enhanced IP v1.4 > >

pull-request: bpf 2018-06-02

2018-06-01 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) BPF uapi fix in struct bpf_prog_info and struct bpf_map_info in order to fix offsets on 32 bit archs. Please consider pulling these changes from:

Re: [PATCH rdma-next v3 05/14] IB/uverbs: Add create/destroy counters support

2018-06-01 Thread Leon Romanovsky
On Fri, Jun 01, 2018 at 02:54:36PM -0600, Jason Gunthorpe wrote: > > diff --git a/drivers/infiniband/core/uverbs_std_types_counters.c > > b/drivers/infiniband/core/uverbs_std_types_counters.c > > new file mode 100644 > > index ..a5bc50ceee13 > > +++

Re: [PATCH rdma-next v3 00/14] Verbs flow counters support

2018-06-01 Thread Leon Romanovsky
On Fri, Jun 01, 2018 at 03:11:49PM -0600, Jason Gunthorpe wrote: > On Thu, May 31, 2018 at 04:43:27PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog: > > v2->v3: > > * Change function mlx5_fc_query signature to hide the details of > >internal core driver struct

Re: [PATCH] samples/bpf: Add xdp_sample_pkts example

2018-06-01 Thread Daniel Borkmann
On 05/31/2018 11:44 AM, Toke Høiland-Jørgensen wrote: > Song Liu writes: > >> On Wed, May 30, 2018 at 9:45 AM, Toke Høiland-Jørgensen wrote: >>> This adds an example program showing how to sample packets from XDP using >>> the perf event buffer. The example userspace program just prints the >>>

Re: [PATCH bpf-next v4 0/5] fix test_sockmap

2018-06-01 Thread Daniel Borkmann
On 05/31/2018 06:42 AM, Prashant Bhole wrote: > test_sockmap was originally written only to exercise kernel code > paths, so there was no strict checking of errors. When the code was > modified to run as selftests, due to lack of error handling it was not > able to detect test failures. > > In

Re: [PATCH bpf] bpf: fix uapi hole for 32 bit compat applications

2018-06-01 Thread Alexei Starovoitov
On Sat, Jun 02, 2018 at 05:21:59AM +0200, Daniel Borkmann wrote: > In 64 bit, we have a 4 byte hole between ifindex and netns_dev in the > case of struct bpf_map_info but also struct bpf_prog_info. In net-next > commit b85fab0e67b ("bpf: Add gpl_compatible flag to struct bpf_prog_info") > added a

[PATCH bpf] bpf: fix uapi hole for 32 bit compat applications

2018-06-01 Thread Daniel Borkmann
In 64 bit, we have a 4 byte hole between ifindex and netns_dev in the case of struct bpf_map_info but also struct bpf_prog_info. In net-next commit b85fab0e67b ("bpf: Add gpl_compatible flag to struct bpf_prog_info") added a bitfield into it to expose some flags related to programs. Thus, add an

ANNOUNCE: Enhanced IP v1.4

2018-06-01 Thread Sam Patton
Hello! If you do not know what Enhanced IP is, read this post on netdev first: https://www.spinics.net/lists/netdev/msg327242.html The Enhanced IP project presents: Enhanced IP v1.4 The Enhanced IP (EnIP) code has been updated. It now builds with OpenWRT barrier breaker (for

[net-next:master 379/381] drivers/net/ethernet/marvell/mvpp2/mvpp2.h:553:2: warning: overflow in implicit constant conversion

2018-06-01 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 21ad1173589ef63a93f94e05c879393e2c27588c commit: db9d7d36eecc8926f03a8f2e46781887577b3353 [379/381] net: mvpp2: Split the PPv2 driver to a dedicated directory config: s390-allmodconfig (attached as .config)

[net-next 10/17] net/mlx5e: RX, Generalise function of SKB frag addition

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Rename it and pass truesize as an extra argument, as it will be used also in Legacy RQ in a downstream patch. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 16 1 file changed, 8

[net-next 11/17] net/mlx5e: RX, Dedicate a function for copying SKB header

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Get the logic of copying the packet header into the SKB linear part into a generic function. Function does copy length alignment and dma buffer sync. It is currently called only within the MPWQE flow. In a downstream patch, it will be called within the legacy RQ flow as well.

[net-next 09/17] net/mlx5e: RX, Generalise name of non-linear SKB head size

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Make name more generic by dropping MPWRQ from it, as it will be used also in Legacy RQ in a downstream patch. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +-

[net-next 07/17] net/mlx5: FPGA, Handle QP error event

2018-06-01 Thread Saeed Mahameed
From: Ilan Tayari Add handlers for this event to perform graceful teardown of the device. Signed-off-by: Ilan Tayari Signed-off-by: Adi Nissim Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/fpga/core.c | 28 --- 1 file changed, 24 insertions(+), 4

[net-next 08/17] net/mlx5e: TX, Obsolete maintaining local copies of skb->len/data

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Instead of maintaining a local copy of skb->len/data and updating it upon every copy to the WQE inline part, just calculate it once when needed, using the ihs. This obsoletes the function mlx5e_tx_skb_pull_inline. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed

[net-next 13/17] net/mlx5e: RX, Split WQ objects for different RQ types

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Replace the common RQ WQ object with two separate ones for the different RQ types. This is in preparation for switching to using a cyclic WQ type in Legacy RQ. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4

[net-next 14/17] net/mlx5e: RX, Use cyclic WQ in legacy RQ

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Now that LRO is not supported for Legacy RQ, there is no source of out-of-order completions in the WQ, and we can use a cyclic one. This has multiple advantages: - reduces the WQE size (smaller PCI transactions). - lower overhead in datapath (no handling of 'next' pointers). -

[net-next 02/17] net/mlx5e: IPOIB, Add a missing skb_pull

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan A call to mlx5e_tx_skb_pull_inline was mistakenly dropped in the cited patch. Get it back. Fixes: 043dc78ecf07 ("net/mlx5e: TX, Use actual WQE size for SQ edge fill") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed ---

[net-next 03/17] net/mlx5e: Present SW stats when state is not opened

2018-06-01 Thread Saeed Mahameed
From: Eran Ben Elisha The driver can present all SW stats even when the state not opened. Fixed get strings, count and stats to support it. In addition, fix tc2txq to hold a static mapping which doesn't depend on the amount of open channels, and cannot have the same value on two different cells

[net-next 06/17] net/mlx5e: Support configurable MTU for vport representors

2018-06-01 Thread Saeed Mahameed
From: Adi Nissim The representor MTU was hard coded to 1500 bytes. Allow setting arbitrary MTU values up to the max supported by the FW. Signed-off-by: Adi Nissim Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4

[net-next 16/17] net/mlx5e: RX, Always prefer Linear SKB configuration

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Prefer the linear SKB configuration of Legacy RQ over the non-linear one of Striding RQ. This implies that ConnectX-4 LX now uses legacy RQ by default, as it does not support the linear configuration of Striding RQ. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed

[net-next 17/17] net/mlx5e: TX, Separate cachelines of xmit and completion stats

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Avoid false sharing of cachelines by separating the cachelines of TX stats that are dertied in xmit flow and in completion flow. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 8

[net-next 15/17] net/mlx5e: RX, Enhance legacy Receive Queue memory scheme

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Enhance the memory scheme of the legacy RQ, such that only order-0 pages are used. Whenever possible, prefer using a linear SKB, and build it wrapping the WQE buffer. Otherwise (for example, jumbo frames on x86), use non-linear SKB, with as many frags as needed. In this

[net-next 12/17] net/mlx5e: RX, Remove HW LRO support in legacy RQ

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan Current LRO implementation in Legacy RQ uses high-order pages. In downstream patches of this series we complete the transition to using only order-0 pages in RX datapath (which was already done in Striding RQ). Unlike the more advanced Striding RQ, Legacy RQ does not make

[net-next 04/17] net/mlx5e: Remove redundant active_channels indication

2018-06-01 Thread Saeed Mahameed
From: Eran Ben Elisha Now, when all channels stats are saved regardless of the channel's state {open, closed}, we can safely remove this indication and the stats spin lock which protects it. Fixes: 76c3810bade3 ("net/mlx5e: Avoid reset netdev stats on configuration changes") Signed-off-by:

[PATCH 05/20] netfilter: nf_tables: remove synchronize_rcu in commit phase

2018-06-01 Thread Pablo Neira Ayuso
From: Florian Westphal synchronize_rcu() is expensive. The commit phase currently enforces an unconditional synchronize_rcu() after incrementing the generation counter. This is to make sure that a packet always sees a consistent chain, either nft_do_chain is still using old generation (it will

[net-next 05/17] net/mlx5e: Increase aRFS flow tables size

2018-06-01 Thread Saeed Mahameed
From: Maor Gottlieb Increase the aRFS flow table size to 64k so it could contain up to 64k different streams. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[pull request][net-next 00/17] Mellanox, mlx5e updates 2018-06-01

2018-06-01 Thread Saeed Mahameed
Hi dave, Sorry for the extra 2 patches in this series, but mostly the series contains small patches and some fixes to previous patches in this submission window, with one main patch from Tariq to improve legacy RQ buffer management, for more information please refer to that tag log below. Please

[net-next 01/17] net/mlx5e: IPOIB, Fix overflowing SQ WQE memset

2018-06-01 Thread Saeed Mahameed
From: Tariq Toukan IPoIB WQE size is larger than a single WQEBB. Must not fetch the WQE, and surely not memset it, until it is guaranteed that there are enough WQEBBs available before getting to SQ/frag edge. Fixes: 043dc78ecf07 ("net/mlx5e: TX, Use actual WQE size for SQ edge fill")

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Saeed Mahameed
On Fri, 2018-06-01 at 17:13 -0700, sae...@mellanox.com wrote: > On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > > From: Saeed Mahameed > > Date: Wed, 30 May 2018 10:59:48 -0700 > > > > > The following series is for mlx5-next tree [1], it adds the > > > support > > > of two > > > new

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Saeed Mahameed
On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > From: Saeed Mahameed > Date: Wed, 30 May 2018 10:59:48 -0700 > > > The following series is for mlx5-next tree [1], it adds the support > > of two > > new device events, from Ilan Tayari: > > > > 1. High temperature warnings. > > 2. FPGA

Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

2018-06-01 Thread Kees Cook
On Fri, Jun 1, 2018 at 1:26 AM, Eric Dumazet wrote: > On Fri, Jun 1, 2018 at 4:18 AM Prashant Bhole > wrote: >> >> In rtnl_newlink(), NULL check is performed on m_ops however member of >> ops is accessed. Fixed by accessing member of m_ops instead of ops. >> >> [ 345.432629] BUG: KASAN:

Re: suspicius csum initialization in vmxnet3_rx_csum

2018-06-01 Thread Neil Horman
On Fri, Jun 01, 2018 at 11:10:01AM -0700, Ronak Doshi wrote: > > > On Thu, 31 May 2018, Neil Horman wrote: > > > On Thu, May 31, 2018 at 11:02:34AM -0700, Ronak Doshi wrote: > > > > > > On Wed, 30 May 2018, Paolo Abeni wrote: > > > > > > > Hi, > > > > > > > > On Thu, 2018-05-24 at 21:48

Re: [net-next:master 375/376] net/core/rtnetlink.c:3099:1: warning: the frame size of 1280 bytes is larger than 1024 bytes

2018-06-01 Thread Kees Cook
On Thu, May 31, 2018 at 10:07 PM, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git > master > head: 4b8e6ac41a594ea67ded6af6af5935f03221ea4c > commit: ccf8dbcd062a930e64741c939ca784d15316aa0c [375/376] rtnetlink: Remove > VLA usage >

Re: [PATCH 4/4] cpsw: add switchdev support

2018-06-01 Thread Florian Fainelli
On 05/24/2018 09:56 PM, Ilias Apalodimas wrote: > On Thu, May 24, 2018 at 06:39:04PM +0200, Andrew Lunn wrote: >> On Thu, May 24, 2018 at 04:32:34PM +0300, Ilias Apalodimas wrote: >>> On Thu, May 24, 2018 at 03:12:29PM +0200, Andrew Lunn wrote: Device tree is supposed to describe the

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-06-01 Thread Grygorii Strashko
Hi Ilias, On 05/24/2018 01:56 AM, Ilias Apalodimas wrote: > Hello, > > This is adding a new mode on the cpsw driver based around switchdev. > In order to enable this you need to enable CONFIG_NET_SWITCHDEV, > CONFIG_BRIDGE_VLAN_FILTERING, CONFIG_TI_CPSW_SWITCHDEV > and add to udev config: > >

Re: [PATCH rdma-next v3 00/14] Verbs flow counters support

2018-06-01 Thread Jason Gunthorpe
On Thu, May 31, 2018 at 04:43:27PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v2->v3: > * Change function mlx5_fc_query signature to hide the details of >internal core driver struct mlx5_fc > * Add commen to data[] field at struct mlx5_ib_flow_counters_data >

Re: [PATCH rdma-next v3 05/14] IB/uverbs: Add create/destroy counters support

2018-06-01 Thread Jason Gunthorpe
> diff --git a/drivers/infiniband/core/uverbs_std_types_counters.c > b/drivers/infiniband/core/uverbs_std_types_counters.c > new file mode 100644 > index ..a5bc50ceee13 > +++ b/drivers/infiniband/core/uverbs_std_types_counters.c > @@ -0,0 +1,100 @@ > +/* SPDX-License-Identifier:

Re: [PATCH] iproute2: fix 'ip xfrm monitor all' command

2018-06-01 Thread Stephen Hemminger
On Wed, 30 May 2018 12:11:32 -0700 Nathan Harold wrote: > Currently, calling 'ip xfrm monitor all' will > actually invoke the 'all-nsid' command because the > soft-match for 'all-nsid' occurs before the precise > match for 'all'. This patch rearranges the checks > so that the 'all' command,

Re: [PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-06-01 Thread Stephen Hemminger
On Fri, 1 Jun 2018 17:02:18 +0200 Nicolas Dichtel wrote: > Le 31/05/2018 à 17:51, Nicolas Dichtel a écrit : > > Le 31/05/2018 à 17:46, Stephen Hemminger a écrit : > >> On Thu, 31 May 2018 16:28:48 +0200 > > [snip] > >> This makes sense. All of linkinfo that is present should be displayed.

Re: [PATCH v2 iproute2-next] ip route: print RTA_CACHEINFO if it exists

2018-06-01 Thread Stephen Hemminger
On Wed, 30 May 2018 08:30:09 -0700 dsah...@kernel.org wrote: > From: David Ahern > > RTA_CACHEINFO can be sent for non-cloned routes. If the attribute is > present print it. Allows route dumps to print expires times for example > which can exist on FIB entries. > > Signed-off-by: David Ahern

Re: [bpf PATCH v2] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-01 Thread Eric Dumazet
On 06/01/2018 03:46 PM, John Fastabend wrote: > This fixes a crash where we assign tcp_prot to IPv6 sockets instead > of tcpv6_prot. ... > + /* ULPs are currently supported only for TCP sockets in ESTABLISHED > + * state. Supporting sockets in LISTEN state will require us to > +

Re: [PATCH iproute2 v2] ipaddress: strengthen check on 'label' input

2018-06-01 Thread Stephen Hemminger
On Tue, 29 May 2018 16:57:07 +0200 Patrick Talbert wrote: > As mentioned in the ip-address man page, an address label must > be equal to the device name or prefixed by the device name > followed by a colon. Currently the only check on this input is > to see if the device name appears at the

[bpf PATCH v2] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-01 Thread John Fastabend
This fixes a crash where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot. Previously we overwrote the sk->prot field with tcp_prot even in the AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot are used. Further, only allow ESTABLISHED connections to join the map per

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Leon Romanovsky
On Fri, Jun 01, 2018 at 01:08:18PM -0400, David Miller wrote: > From: Leon Romanovsky > Date: Fri, 1 Jun 2018 19:21:26 +0300 > > > Of course, it is harmless for both of you to pull, but it looks like > > extra work which is not needed for you. > > Just put net-next or rdma-next in the subject

Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash

2018-06-01 Thread John Fastabend
On 06/01/2018 12:56 AM, John Fastabend wrote: > On 05/31/2018 06:00 PM, Eric Dumazet wrote: >> On Thu, May 31, 2018 at 7:32 PM John Fastabend >> wrote: >>> >>> >>> Hi Wei, >>> >>> Thanks for the report and fix. It would be better to fix the >>> root cause so that IPv6 works as intended. >>> >>>

Re: [PATCH net-next 0/9] Test mirror-to-gretap with bridge in UL

2018-06-01 Thread David Miller
From: Petr Machata Date: Thu, 31 May 2018 19:51:56 +0200 > This patchset adds more tests to the mirror-to-gretap suite where bridge > is present in the underlay. Specifically it adds tests for bridge VLAN > handling, FDB, and bridge port STP status. > > In patches #1-#3, the codebase is

Re: suspicius csum initialization in vmxnet3_rx_csum

2018-06-01 Thread Ronak Doshi
On Thu, 31 May 2018, Neil Horman wrote: > On Thu, May 31, 2018 at 11:02:34AM -0700, Ronak Doshi wrote: > > > > On Wed, 30 May 2018, Paolo Abeni wrote: > > > > > Hi, > > > > > > On Thu, 2018-05-24 at 21:48 +, Guolin Yang wrote: > > > > Yes, that code is not correct, we should fix that

Re: [PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations

2018-06-01 Thread David Miller
From: Nicolas Dichtel Date: Thu, 31 May 2018 10:59:31 +0200 > The first patch restores the possibility to bind an ip4 tunnel to an > interface whith a large mtu. > The second patch was spotted after the first fix. I also target it to net > because it fixes the max mtu value that can be used for

Re: [PATCH] net: core: improve the tx_hash calculating

2018-06-01 Thread David Miller
From: Tonghao Zhang Date: Thu, 31 May 2018 03:14:01 -0700 > Use the % instead of while, and it may simple code and improve > the calculating. The real_num_tx_queues has been checked when > allocating and setting it. > > Signed-off-by: Tonghao Zhang The loop is there to avoid the expensive

Re: pull request (net): ipsec 2018-05-31

2018-06-01 Thread David Miller
From: Steffen Klassert Date: Thu, 31 May 2018 12:23:24 +0200 > 1) Avoid possible overflow of the offset variable >in _decode_session6(), this fixes an infinite >lookp there. From Eric Dumazet. > > 2) We may use an error pointer in the error path of >xfrm_bundle_create(). Fix this

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread David Miller
From: Leon Romanovsky Date: Fri, 1 Jun 2018 19:21:26 +0300 > Of course, it is harmless for both of you to pull, but it looks like > extra work which is not needed for you. Just put net-next or rdma-next in the subject line(s) and that will make it very clear what it expected to happen.

Re: [PATCH iproute2] iplink_vrf: Save device index from response for return code

2018-06-01 Thread Phil Sutter
On Fri, Jun 01, 2018 at 08:50:16AM -0700, dsah...@kernel.org wrote: > From: David Ahern > > A recent commit changed rtnl_talk_* to return the response message in > allocated memory so callers need to free it. The change to name_is_vrf > did not save the device index which is pointing to a struct

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Doug Ledford
On Fri, 2018-06-01 at 11:45 -0400, David Miller wrote: > From: Doug Ledford > Date: Fri, 01 Jun 2018 11:08:24 -0400 > > > On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > >> From: Saeed Mahameed > >> Date: Wed, 30 May 2018 10:59:48 -0700 > >> > >> > The following series is for

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Doug Ledford
On Fri, 2018-06-01 at 19:21 +0300, Leon Romanovsky wrote: > On Fri, Jun 01, 2018 at 11:45:58AM -0400, David Miller wrote: > > From: Doug Ledford > > Date: Fri, 01 Jun 2018 11:08:24 -0400 > > > > > On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > > > > From: Saeed Mahameed > > > > Date:

[PATCH net] net/packet: refine check for priv area size

2018-06-01 Thread Eric Dumazet
syzbot was able to trick af_packet again [1] Various commits tried to address the problem in the past, but failed to take into account V3 header size. [1] tpacket_rcv: packet too big, clamped from 72 to 4294967224. macoff=96 BUG: KASAN: use-after-free in prb_run_all_ft_ops

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Leon Romanovsky
On Fri, Jun 01, 2018 at 11:45:58AM -0400, David Miller wrote: > From: Doug Ledford > Date: Fri, 01 Jun 2018 11:08:24 -0400 > > > On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > >> From: Saeed Mahameed > >> Date: Wed, 30 May 2018 10:59:48 -0700 > >> > >> > The following series is for

ndo_star_xmit() - resevered head and tailroom

2018-06-01 Thread Alexander Aring
Hi netdev community, I am again on bug fixing in 6lowpan branch and thought that my needed_headroom and needed_tailroom of net_device are available inside my ndo_start_xmit() callback. In case of a UDP socket, it was not the case. I send a fix now to use skb_expand_copy() to make sure this space

[PATCH iproute2] iplink_vrf: Save device index from response for return code

2018-06-01 Thread dsahern
From: David Ahern A recent commit changed rtnl_talk_* to return the response message in allocated memory so callers need to free it. The change to name_is_vrf did not save the device index which is pointing to a struct inside the now allocated and freed memory resulting in garbage getting

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread David Miller
From: Doug Ledford Date: Fri, 01 Jun 2018 11:08:24 -0400 > On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: >> From: Saeed Mahameed >> Date: Wed, 30 May 2018 10:59:48 -0700 >> >> > The following series is for mlx5-next tree [1], it adds the support of two >> > new device events, from

Re: [PATCH iproute2 net-next] iproute: ip route get support for sport, dport and ipproto match

2018-06-01 Thread David Ahern
On 5/30/18 11:06 AM, Roopa Prabhu wrote: > From: Roopa Prabhu > > Signed-off-by: Roopa Prabhu > --- > ip/iproute.c | 26 +- > man/man8/ip-route.8.in | 20 +++- > 2 files changed, 44 insertions(+), 2 deletions(-) applied to iproute2-next.

[PATCH net] vrf: check the original netdevice for generating redirect

2018-06-01 Thread Stephen Suryaputra
Use the right device to determine if redirect should be sent especially when using vrf. Same as well as when sending the redirect. Signed-off-by: Stephen Suryaputra --- net/ipv6/ip6_output.c | 3 ++- net/ipv6/ndisc.c | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH net-next v5 04/11] net: sched: always take reference to action

2018-06-01 Thread Vlad Buslov
Without rtnl lock protection it is no longer safe to use pointer to tc action without holding reference to it. (it can be destroyed concurrently) Remove unsafe action idr lookup function. Instead of it, implement safe tcf idr check function that atomically looks up action in idr and increments

[PATCH net-next v5 03/11] net: sched: implement unlocked action init API

2018-06-01 Thread Vlad Buslov
Add additional 'rtnl_held' argument to act API init functions. It is required to implement actions that need to release rtnl lock before loading kernel module and reacquire if afterwards. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- Changes from

[PATCH net-next v5 02/11] net: sched: change type of reference and bind counters

2018-06-01 Thread Vlad Buslov
Change type of action reference counter to refcount_t. Change type of action bind counter to atomic_t. This type is used to allow decrementing bind counter without testing for 0 result. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko ---

[PATCH net-next v5 11/11] net: sched: change action API to use array of pointers to actions

2018-06-01 Thread Vlad Buslov
Act API used linked list to pass set of actions to functions. It is intrusive data structure that stores list nodes inside action structure itself, which means it is not safe to modify such list concurrently. However, action API doesn't use any linked list specific operations on this set of

[PATCH net-next v5 09/11] net: sched: use reference counting action init

2018-06-01 Thread Vlad Buslov
Change action API to assume that action init function always takes reference to action, even when overwriting existing action. This is necessary because action API continues to use action pointer after init function is done. At this point action becomes accessible for concurrent modifications, so

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

2018-06-01 Thread Vlad Buslov
Implement function that atomically checks if action exists and either takes reference to it, or allocates idr slot for action index to prevent concurrent allocations of actions with same index. Use EBUSY error pointer to indicate that idr slot is reserved. Implement cleanup helper function that

[PATCH net-next v5 08/11] net: sched: don't release reference on action overwrite

2018-06-01 Thread Vlad Buslov
Return from action init function with reference to action taken, even when overwriting existing action. Action init API initializes its fourth argument (pointer to pointer to tc action) to either existing action with same index or newly created action. In case of existing index(and bind argument

[PATCH net-next v5 07/11] net: sched: implement reference counted action release

2018-06-01 Thread Vlad Buslov
Implement helper delete function that uses new action ops 'delete', instead of destroying action directly. This is required so act API could delete actions by index, without holding any references to action that is being deleted. Implement function __tcf_action_put() that releases reference to

[PATCH net-next v5 01/11] net: sched: use rcu for action cookie update

2018-06-01 Thread Vlad Buslov
Implement functions to atomically update and free action cookie using rcu mechanism. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- include/net/act_api.h | 2 +- include/net/pkt_cls.h | 1 + net/sched/act_api.c | 44

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

2018-06-01 Thread Vlad Buslov
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 delete actions without holding rtnl lock. Use action API function that atomically deletes action only if it is still in

[PATCH net-next v5 00/11] Modify action API for implementing lockless actions

2018-06-01 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a first step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag

[PATCH net-next v5 05/11] net: sched: implement action API that deletes action by index

2018-06-01 Thread Vlad Buslov
Implement new action API function that atomically finds and deletes action from idr by index. Intended to be used by lockless actions that do not rely on rtnl lock. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- Changes from V1 to V2: - Rename

Re: [PATCH net-next v4 00/11] Modify action API for implementing lockless actions

2018-06-01 Thread Vlad Buslov
On Fri 01 Jun 2018 at 12:24, Jamal Hadi Salim wrote: > On 31/05/18 08:38 AM, Vlad Buslov wrote: > >> Hi Jamal, >> >> On current net-next I still have action with single reference after last >> step: >> ~$ sudo $TC -s actions ls action skbedit >> total acts 1 >>

Re: [PATCH v2] net: dsa: b53: Add BCM5389 support

2018-06-01 Thread David Miller
From: Damien Thébault Date: Thu, 31 May 2018 07:04:01 + > This patch adds support for the BCM5389 switch connected through MDIO. > > Signed-off-by: Damien Thébault Applied, thank you.

Re: [PATCH net-next v2] net: sched: split tc_ctl_tfilter into three handlers

2018-06-01 Thread David Miller
From: Vlad Buslov Date: Thu, 31 May 2018 09:52:53 +0300 > tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER, > RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function > involves a lot of branching on specific message type because most of the > code is

Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events

2018-06-01 Thread Doug Ledford
On Thu, 2018-05-31 at 15:36 -0400, David Miller wrote: > From: Saeed Mahameed > Date: Wed, 30 May 2018 10:59:48 -0700 > > > The following series is for mlx5-next tree [1], it adds the support of two > > new device events, from Ilan Tayari: > > > > 1. High temperature warnings. > > 2. FPGA QP

Re: [PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-06-01 Thread Nicolas Dichtel
Le 31/05/2018 à 17:51, Nicolas Dichtel a écrit : > Le 31/05/2018 à 17:46, Stephen Hemminger a écrit : >> On Thu, 31 May 2018 16:28:48 +0200 > [snip] >> This makes sense. All of linkinfo that is present should be displayed. >> >> Both netns and ifindex are really unsigned values. Use __u32 and

[PATCH net-next 1/1] net/smc: remove duplicate check in smc_setsockopt

2018-06-01 Thread Ursula Braun
From: Ursula Braun smc_setsockopt contains a check for the length specified on the setsockopt socket call. If checked, it is supposed to return with EINVAL. But the equivalent check is already contained in the preceding setsockopt call on the internal TCP socket. That means, the extra check can

Re: [PATCH iproute2] devlink: don't enforce NETLINK_{CAP,EXT}_ACK sock opts

2018-06-01 Thread Jiri Pirko
Fri, Jun 01, 2018 at 10:18:49AM CEST, ivec...@redhat.com wrote: >Since commit 049c58539f5d ("devlink: mnlg: Add support for extended ack") >devlink requires NETLINK_{CAP,EXT}_ACK. This prevents devlink from >working with older kernels that don't support these features. > >host # ./devlink/devlink

Re: [PATCH net] ipv4: igmp: hold wakelock to prevent delayed reports

2018-06-01 Thread Florian Fainelli
On 06/01/2018 07:05 AM, Tejaswi Tanikella wrote: > On receiving a IGMPv2/v3 query, based on max_delay set in the header a > timer is started to send out a response after a random time within > max_delay. If the system then moves into suspend state, Report is > delayed until system wakes up. >

Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

2018-06-01 Thread David Miller
From: Prashant Bhole Date: Fri, 1 Jun 2018 17:16:58 +0900 > In rtnl_newlink(), NULL check is performed on m_ops however member of > ops is accessed. Fixed by accessing member of m_ops instead of ops. > > [ 345.432629] BUG: KASAN: null-ptr-deref in rtnl_newlink+0x400/0x1110 > [ 345.432629]

Re: [PATCH bpf-next v4 3/5] selftests/bpf: test_sockmap, timing improvements

2018-06-01 Thread John Fastabend
On 05/30/2018 09:42 PM, Prashant Bhole wrote: > Currently 10us delay is too low for many tests to succeed. It needs to > be increased. Also, many corked tests are expected to hit rx timeout > irrespective of timeout value. > > - This patch sets 1000usec timeout value for corked tests because less

[PATCH net] ipv4: igmp: hold wakelock to prevent delayed reports

2018-06-01 Thread Tejaswi Tanikella
On receiving a IGMPv2/v3 query, based on max_delay set in the header a timer is started to send out a response after a random time within max_delay. If the system then moves into suspend state, Report is delayed until system wakes up. In one reported scenario, on arm64 devices, max_delay was set

Re: [PATCH bpf-next v4 1/5] selftests/bpf: test_sockmap, check test failure

2018-06-01 Thread John Fastabend
On 05/30/2018 09:42 PM, Prashant Bhole wrote: > Test failures are not identified because exit code of RX/TX threads > is not checked. Also threads are not returning correct exit code. > > - Return exit code from threads depending on test execution status > - In main thread, check the exit code of

Re: [PATCH bpf v3 3/5] selftests/bpf: test_sockmap, fix test timeout

2018-06-01 Thread John Fastabend
On 05/30/2018 09:13 PM, Prashant Bhole wrote: > > > On 5/31/2018 4:59 AM, John Fastabend wrote: >> On 05/30/2018 12:29 PM, Alexei Starovoitov wrote: >>> On Wed, May 30, 2018 at 02:56:09PM +0900, Prashant Bhole wrote: In order to reduce runtime of tests, recently timout for select() call

Re: [PATCH net-next] rtnetlink: Fix null-ptr-deref in rtnl_newlink

2018-06-01 Thread Ido Schimmel
On Fri, Jun 01, 2018 at 05:16:58PM +0900, Prashant Bhole wrote: > In rtnl_newlink(), NULL check is performed on m_ops however member of > ops is accessed. Fixed by accessing member of m_ops instead of ops. > > [ 345.432629] BUG: KASAN: null-ptr-deref in rtnl_newlink+0x400/0x1110 > [ 345.432629]

Re: [PATCH net-next v4 00/11] Modify action API for implementing lockless actions

2018-06-01 Thread Jamal Hadi Salim
On 31/05/18 08:38 AM, Vlad Buslov wrote: Hi Jamal, On current net-next I still have action with single reference after last step: ~$ sudo $TC -s actions ls action skbedit total acts 1 action order 0: skbedit mark 1 pipe

[net-next][PATCH] tcp: probe timer MUST not less than 5 minuter for tcp PMTU

2018-06-01 Thread Li RongQing
RFC4821 say: The value for this timer MUST NOT be less than 5 minutes and is recommended to be 10 minutes, per RFC 1981. Signed-off-by: Li RongQing --- net/ipv4/sysctl_net_ipv4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ipv4/sysctl_net_ipv4.c

Re: [PATCH v2 net] mlx4_core: restore optimal ICM memory allocation

2018-06-01 Thread Eric Dumazet
On 05/31/2018 09:51 PM, Qing Huang wrote: > > It would be great if you could share the test case that triggered the KASAN > report in your > environment. Our QA has been running intensive tests using 8KB or 4KB chunk > size configuration > for some time, no one has reported memory

Re: [PATCH] net: core: improve the tx_hash calculating

2018-06-01 Thread Eric Dumazet
On 05/31/2018 06:14 AM, Tonghao Zhang wrote: > Use the % instead of while, and it may simple code and improve > the calculating. The real_num_tx_queues has been checked when > allocating and setting it. > > Signed-off-by: Tonghao Zhang > --- > net/core/dev.c | 8 +++- > 1 file changed, 3

[RFC PATCH 16/16] bpf: tools: dbg patch to turn on debugging and add primitive examples

2018-06-01 Thread John Fastabend
While developing this I found it useful to always have the log output when dealing with bpftool. This is a quick hack to enable it but we should add a '-v' option shortly. Then add a set of good and bad loop examples to test with. These are all very basic at the moment but will get better soon.

[RFC PATCH 15/16] bpf: verifier, simple loop examples

2018-06-01 Thread John Fastabend
Add some simple loop examples. For now I just load these using bpftool but eventually they should have a loader simliar to test_verifier except for C snippets. We want to use C files here instead of BPF because most users will be using C clang/llvm and want to test how well this works with the

[RFC PATCH 14/16] bpf: verifier, add initial support to allow bounded loops

2018-06-01 Thread John Fastabend
Allow bounded loops if we can become convinced they will in fact terminate. At a high level this is done in steps the first two steps are done outside of the do_check routine which "runs" the instructions. 1. Use dom tree to find loops. 2. Find loop induction variable in the loop. (I use loop

[RFC PATCH 12/16] bpf: cfg: pretty print CFG and DOM

2018-06-01 Thread John Fastabend
Add functions to pretty print the CFG and DOM table. We can also add contrib scripts to print this dot format so tools can visualize them. I at least found this helpful. Will add scripts in tools/bpf follow up patch. For development we are always printing these but should put these noisy routines

[RFC PATCH 11/16] bpf: cfg: detect irreducible loop using Eric Stoltz algorithm

2018-06-01 Thread John Fastabend
From: Jiong Wang We don't want to do any further loop bounds analysis for irreducible loop, so just reject programs containing it. The current DOM based loop detection can't detect irreducible loop. We'd use the algorithm given by Eric Stoltz to detect it. The algorithm requires DOM info.

[RFC PATCH 13/16] bpf: verifier, can ptr range be calculated with scalar ALU op

2018-06-01 Thread John Fastabend
At the moment any BPF_ADD or BPF_NEG with a pointer type will create a new pointer and destroy the register range. Then any memory access after this will fail because it looks like no bounds checking has been done, even if it was previously done on the other pointer. So patterns like this fail,

[RFC PATCH 07/16] bpf: cfg: build call graph and detect unreachable/recursive call

2018-06-01 Thread John Fastabend
From: Jiong Wang This patch build call graph during insn scan inside check_subprogs. Then do recursive and unreachable subprog detection using call graph. Signed-off-by: Jiong Wang Signed-off-by: John Fastabend --- include/linux/bpf_verifier.h |1 kernel/bpf/cfg.c | 133

[RFC PATCH 09/16] bpf: cfg: reduce k*alloc/free call by using memory pool for allocating nodes

2018-06-01 Thread John Fastabend
From: Jiong Wang During building control flow graph, we need to build basic block nodes and edge nodes etc. These nodes needs to allocated dynamically as we don't have pre-scan pass to know how many nodes we need accurately. It is better to manage their allocation using memory pool which could

  1   2   >