[PATCH 0/8] Assorted rhashtable fixes and cleanups

2018-05-03 Thread NeilBrown
This series contains some bugfixes, mostly minor though one is worthy of a stable backport I think - tagged with Fixes and Cc: stable. Then there are improvements to walking, which have been discussed to some degree already. Finally a code simplification which I think is correct... Thanks,

[PATCH 1/8] rhashtable: silence RCU warning in rhashtable_test.

2018-05-03 Thread NeilBrown
print_ht in rhashtable_test calls rht_dereference() with neither RCU protection or the mutex. This triggers an RCU warning. So take the mutex to silence the warning. Signed-off-by: NeilBrown --- lib/test_rhashtable.c |3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 2/8] rhashtable: remove nulls_base and related code.

2018-05-03 Thread NeilBrown
This "feature" is unused, undocumented, and untested and so doesn't really belong. If a use for the nulls marker is found, all this code would need to be reviewed to ensure it works as required. It would be just as easy to just add the code if/when it is needed instead. This patch actually

[PATCH 3/8] rhashtable: use cmpxchg() to protect ->future_tbl.

2018-05-03 Thread NeilBrown
Rather than borrowing one of the bucket locks to protect ->future_tbl updates, use cmpxchg(). This gives more freedom to change how bucket locking is implemented. Signed-off-by: NeilBrown --- lib/rhashtable.c | 17 ++--- 1 file changed, 6 insertions(+), 11

[PATCH 6/8] rhashtable: further improve stability of rhashtable_walk

2018-05-03 Thread NeilBrown
If the sequence: obj = rhashtable_walk_next(iter); rhashtable_walk_stop(iter); rhashtable_remove_fast(ht, >head, params); rhashtable_walk_start(iter); races with another thread inserting or removing an object on the same hash chain, a subsequent rhashtable_walk_next() is not

[PATCH 4/8] rhashtable: fix race in nested_table_alloc()

2018-05-03 Thread NeilBrown
If two threads run nested_table_alloc() at the same time they could both allocate a new table. Best case is that one of them will never be freed, leaking memory. Worst case is hat entry get stored there before it leaks, and the are lost from the table. So use cmpxchg to detect the race and free

[PATCH 7/8] rhashtable: add rhashtable_walk_prev()

2018-05-03 Thread NeilBrown
rhashtable_walk_prev() returns the object returned by the previous rhashtable_walk_next(), providing it is still in the table (or was during this grace period). This works even if rhashtable_walk_stop() and rhashtable_talk_start() have been called since the last rhashtable_walk_next(). If there

[PATCH 8/8] rhashtable: don't hold lock on first table throughout insertion.

2018-05-03 Thread NeilBrown
rhashtable_try_insert() currently hold a lock on the bucket in the first table, while also locking buckets in subsequent tables. This is unnecessary and looks like a hold-over from some earlier version of the implementation. As insert and remove always lock a bucket in each table in turn, and as

[PATCH 5/8] rhashtable: remove rhashtable_walk_peek()

2018-05-03 Thread NeilBrown
This function has a somewhat confused behavior that is not properly described by the documentation. Sometimes is returns the previous object, sometimes it returns the next one. Sometimes it changes the iterator, sometimes it doesn't. This function is not currently used and is not worth keeping,

Re: [net-next PATCH 3/5] udp: Add support for software checksum and GSO_PARTIAL with GSO offload

2018-05-03 Thread Eric Dumazet
On 05/03/2018 05:33 PM, Alexander Duyck wrote: > From: Alexander Duyck > > This patch adds support for a software provided checksum and GSO_PARTIAL > segmentation support. With this we can offload UDP segmentation on devices > that only have partial support for

Re: [PATCH RFC net-next] net: ipvs: Adjust gso_size for IPPROTO_TCP

2018-05-03 Thread David Ahern
On 5/3/18 1:01 AM, Martin KaFai Lau wrote: > On Wed, May 02, 2018 at 10:30:32PM +0300, Julian Anastasov wrote: >> >> Hello, >> >> On Wed, 2 May 2018, Martin KaFai Lau wrote: >> >>> On Wed, May 02, 2018 at 09:38:43AM +0300, Julian Anastasov wrote: - initial traffic for port 21 does

Re: possible deadlock in smc_close_non_accepted

2018-05-03 Thread Hangbin Liu
#syz fix: net/smc: simplify wait when closing listen socket

Re: VRF: ICMPV6 Echo Reply failed to egress if ingress pkt Src is IPV6 Global and Dest is IPV6 Link Local.

2018-05-03 Thread David Ahern
On 4/30/18 6:58 AM, Sukumar Gopalakrishnan wrote: > VRF: ICMPV6 Echo Reply failed to egress if ingress pkt Src is IPV6 > Global and Dest is IPV6 Link Local. ... > if (fl6->flowi6_oif == dev->ifindex) { try adding ' && !rt6_need_strict(saddr)' to the above. If it works, add a comment above the

[PATCH bpf v3] x86/cpufeature: bpf hack for clang not supporting asm goto

2018-05-03 Thread Yonghong Song
Commit d0266046ad54 ("x86: Remove FAST_FEATURE_TESTS") removed X86_FAST_FEATURE_TESTS and make macro static_cpu_has() always use __always_inline function _static_cpu_has() funciton. The static_cpu_has() uses gcc feature asm goto construct, which is not supported by clang. Issues ==

[PATCH V3] net/netlink: make sure the headers line up actual value output

2018-05-03 Thread YU Bo
Making sure the headers line up properly with the actual value output of the command `cat /proc/net/netlink` Before the patch: sk Eth PidGroups Rmem Wmem Dump LocksDrops Inode 33203952 0 8970113 000 20

[PATCH V3] net/netlink: make sure the headers line up actual value output

2018-05-03 Thread YU Bo
Making sure the headers line up properly with the actual value output of the command `cat /proc/net/netlink` Before the patch: sk Eth PidGroups Rmem Wmem Dump LocksDrops Inode 33203952 0 8970113 000 20

[bpf-next v2 7/9] net/ipv6: Add fib lookup stubs for use in bpf helper

2018-05-03 Thread David Ahern
Add stubs to retrieve a handle to an IPv6 FIB table, fib6_get_table, a stub to do a lookup in a specific table, fib6_table_lookup, and a stub for a full route lookup. The stubs are needed for core bpf code to handle the case when the IPv6 module is not builtin. Signed-off-by: David Ahern

[bpf-next v2 1/9] net/ipv6: Rename fib6_lookup to fib6_node_lookup

2018-05-03 Thread David Ahern
Rename fib6_lookup to fib6_node_lookup to better reflect what it returns. The fib6_lookup name will be used in a later patch for an IPv6 equivalent to IPv4's fib_lookup. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 6 +++--- net/ipv6/ip6_fib.c| 14

[bpf-next v2 6/9] net/ipv6: Update fib6 tracepoint to take fib6_info

2018-05-03 Thread David Ahern
Similar to IPv4, IPv6 should use the FIB lookup result in the tracepoint. Signed-off-by: David Ahern Acked-by: David S. Miller --- include/trace/events/fib6.h | 14 +++--- net/ipv6/route.c| 14 ++ 2 files changed, 13

[bpf-next v2 3/9] net/ipv6: Extract table lookup from ip6_pol_route

2018-05-03 Thread David Ahern
ip6_pol_route is used for ingress and egress FIB lookups. Refactor it moving the table lookup into a separate fib6_table_lookup that can be invoked separately and export the new function. ip6_pol_route now calls fib6_table_lookup and uses the result to generate a dst based rt6_info.

[bpf-next v2 8/9] bpf: Provide helper to do forwarding lookups in kernel FIB table

2018-05-03 Thread David Ahern
Provide a helper for doing a FIB and neighbor lookup in the kernel tables from an XDP program. The helper provides a fastpath for forwarding packets. If the packet is a local delivery or for any reason is not a simple lookup and forward, the packet continues up the stack. If it is to be

[bpf-next v2 5/9] net/ipv6: Add fib6_lookup

2018-05-03 Thread David Ahern
Add IPv6 equivalent to fib_lookup. Does a fib lookup, including rules, but returns a FIB entry, fib6_info, rather than a dst based rt6_info. fib6_lookup is any where from 140% (MULTIPLE_TABLES config disabled) to 60% faster than any of the dst based lookup methods (without custom rules) and 25%

[bpf-next v2 4/9] net/ipv6: Refactor fib6_rule_action

2018-05-03 Thread David Ahern
Move source address lookup from fib6_rule_action to a helper. It will be used in a later patch by a second variant for fib6_rule_action. Signed-off-by: David Ahern Acked-by: David S. Miller --- net/ipv6/fib6_rules.c | 52

[bpf-next v2 2/9] net/ipv6: Rename rt6_multipath_select

2018-05-03 Thread David Ahern
Rename rt6_multipath_select to fib6_multipath_select and export it. A later patch wants access to it similar to IPv4's fib_select_path. Signed-off-by: David Ahern Acked-by: David S. Miller --- include/net/ip6_fib.h | 5 + net/ipv6/route.c | 17

[bpf-next v2 9/9] samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP

2018-05-03 Thread David Ahern
Simple example of fast-path forwarding. It has a serious flaw in not verifying the egress device index supports XDP forwarding. If the egress device does not packets are dropped. Take this only as a simple example of fast-path forwarding. Signed-off-by: David Ahern Acked-by:

[bpf-next v2 0/9] bpf: Add helper to do FIB lookups

2018-05-03 Thread David Ahern
Provide a helper for doing a FIB and neighbor lookup in the kernel tables from an XDP program. The helper provides a fastpath for forwarding packets. If the packet is a local delivery or for any reason is not a simple lookup and forward, the packet is expected to continue up the stack for full

Re: [PATCH bpf] bpf: use array_index_nospec in find_prog_type

2018-05-03 Thread Alexei Starovoitov
On Fri, May 04, 2018 at 02:13:57AM +0200, Daniel Borkmann wrote: > Commit 9ef09e35e521 ("bpf: fix possible spectre-v1 in find_and_alloc_map()") > converted find_and_alloc_map() over to use array_index_nospec() to sanitize > map type that user space passes on map creation, and this patch does an >

[PATCH net-next] liquidio: support use of ethtool to set link speed of CN23XX-225 cards

2018-05-03 Thread Felix Manlunas
From: Weilin Chang Support setting the link speed of CN23XX-225 cards (which can do 25Gbps or 10Gbps) via ethtool_ops.set_link_ksettings. Also fix the function assigned to ethtool_ops.get_link_ksettings to use the new link_ksettings api completely (instead of partially

Re: [PATCH net-next] net/mlx4_en: optimizes get_fixed_ipv6_csum()

2018-05-03 Thread Eric Dumazet
On 05/03/2018 06:52 PM, David Miller wrote: > From: Eric Dumazet > Date: Thu, 3 May 2018 17:05:06 -0700 > >> >> >> On 05/02/2018 07:18 AM, Tariq Toukan wrote: >>> >>> >>> On 27/04/2018 1:56 AM, Saeed Mahameed wrote: >> LGTM, Reviewed-by: Saeed Mahameed

RE: KMSAN: uninit-value in strcmp

2018-05-03 Thread Jon Maloy
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, May 03, 2018 15:22 > To: syzbot+df0257c92ffd4fcc5...@syzkaller.appspotmail.com > Cc: Jon Maloy ; linux-ker...@vger.kernel.org; > netdev@vger.kernel.org;

Re: [net-next PATCH 4/5] udp: Do not copy destructor if one is not present

2018-05-03 Thread Eric Dumazet
On 05/03/2018 05:33 PM, Alexander Duyck wrote: > From: Alexander Duyck > > This patch makes it so that if a destructor is not present we avoid trying > to update the skb socket or any reference counting that would be associated > with the NULL socket and/or

Re: [net-next PATCH 2/5] udp: Do not pass checksum or MSS as parameters

2018-05-03 Thread Eric Dumazet
On 05/03/2018 05:33 PM, Alexander Duyck wrote: > From: Alexander Duyck > > This patch is meant to be a start at cleaning up some of the UDP GSO > segmentation code. Specifically we were passing mss and a recomputed > checksum when we really didn't need to. The

Re: [PATCH net-next] net/mlx4_en: optimizes get_fixed_ipv6_csum()

2018-05-03 Thread David Miller
From: Eric Dumazet Date: Thu, 3 May 2018 17:05:06 -0700 > > > On 05/02/2018 07:18 AM, Tariq Toukan wrote: >> >> >> On 27/04/2018 1:56 AM, Saeed Mahameed wrote: > >>> LGTM, >>> >>> Reviewed-by: Saeed Mahameed >>> >> >> Acked-by: Tariq Toukan

Re: [net-next PATCH 1/5] udp: Record gso_segs when supporting UDP segmentation offload

2018-05-03 Thread Eric Dumazet
On 05/03/2018 05:33 PM, Alexander Duyck wrote: > From: Alexander Duyck > > We need to record the number of segments that will be generated when this > frame is segmented. The expectation is that if gso_size is set then > gso_segs is set as well. Without this some

[PATCH bpf-next 07/10] tools: bpftool: fold hex keyword in command help

2018-05-03 Thread Jakub Kicinski
Instead of spelling [hex] BYTES everywhere use DATA as keyword for generalized value. This will help us keep the messages concise when longer command are added in the future. It will also be useful once BTF support comes. We will only have to change the definition of DATA. Signed-off-by: Jakub

[PATCH bpf-next 04/10] bpf: replace map pointer loads before calling into offloads

2018-05-03 Thread Jakub Kicinski
Offloads may find host map pointers more useful than map fds. Map pointers can be used to identify the map, while fds are only valid within the context of loading process. Jump to skip_full_check on error in case verifier log overflow has to be handled (replace_map_fd_with_map_ptr() prints to the

[PATCH bpf-next 03/10] bpf: export bpf_event_output()

2018-05-03 Thread Jakub Kicinski
bpf_event_output() is useful for offloads to add events to BPF event rings, export it. Note that export is placed near the stub since tracing is optional and kernel/bpf/core.c is always going to be built. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet

[PATCH bpf-next 05/10] nfp: bpf: perf event output helpers support

2018-05-03 Thread Jakub Kicinski
Add support for the perf_event_output family of helpers. The implementation on the NFP will not match the host code exactly. The state of the host map and rings is unknown to the device, hence device can't return errors when rings are not installed. The device simply packs the data into a

[PATCH bpf-next 09/10] tools: bpftool: add simple perf event output reader

2018-05-03 Thread Jakub Kicinski
Users of BPF sooner or later discover perf_event_output() helpers and BPF_MAP_TYPE_PERF_EVENT_ARRAY. Dumping this array type is not possible, however, we can add simple reading of perf events. Create a new event_pipe subcommand for maps, this sub command will only work with

[PATCH bpf-next 06/10] nfp: bpf: rewrite map pointers with NFP TIDs

2018-05-03 Thread Jakub Kicinski
Kernel will now replace map fds with actual pointer before calling the offload prepare. We can identify those pointers and replace them with NFP table IDs instead of loading the table ID in code generated for CALL instruction. This allows us to support having the same CALL being used with

[PATCH bpf-next 01/10] bpf: offload: allow offloaded programs to use perf event arrays

2018-05-03 Thread Jakub Kicinski
BPF_MAP_TYPE_PERF_EVENT_ARRAY is special as far as offload goes. The map only holds glue to perf ring, not actual data. Allow non-offloaded perf event arrays to be used in offloaded programs. Offload driver can extract the events from HW and put them in the map for user space to retrieve.

[PATCH bpf-next 10/10] bpf: fix references to free_bpf_prog_info() in comments

2018-05-03 Thread Jakub Kicinski
Comments in the verifier refer to free_bpf_prog_info() which seems to have never existed in tree. Replace it with free_used_maps(). Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- kernel/bpf/verifier.c | 4 ++-- 1 file

[PATCH bpf-next 02/10] nfp: bpf: record offload neutral maps in the driver

2018-05-03 Thread Jakub Kicinski
For asynchronous events originating from the device, like perf event output, we need to be able to make sure that objects being referred to by the FW message are valid on the host. FW events can get queued and reordered. Even if we had a FW message "barrier" we should still protect ourselves

[PATCH bpf-next 00/10] bpf: support offload of bpf_event_output()

2018-05-03 Thread Jakub Kicinski
Hi! This series centres on NFP offload of bpf_event_output(). The first patch allows perf event arrays to be used by offloaded programs. Next patch makes the nfp driver keep track of such arrays to be able to filter FW events referring to maps. Perf event arrays are not device bound. Having

[PATCH bpf-next 08/10] tools: bpftool: move get_possible_cpus() to common code

2018-05-03 Thread Jakub Kicinski
Move the get_possible_cpus() function to shared code. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Reviewed-by: Jiong Wang --- tools/bpf/bpftool/common.c | 58

[PATCHv2] net/xfrm: Revert "[XFRM]: Do not add a state whose SPI is zero to the SPI hash."

2018-05-03 Thread Dmitry Safonov
This reverts commit 7b4dc3600e48 ("[XFRM]: Do not add a state whose SPI is zero to the SPI hash."). Zero SPI is legal and defined for IPcomp. We shouldn't omit adding the state to SPI hash because it'll not be possible to delete or lookup for it afterward: __xfrm_state_insert() obviously doesn't

Re: [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops

2018-05-03 Thread David Ahern
On 5/2/18 2:56 PM, David Ahern wrote: > On 5/2/18 2:48 PM, Thomas Winter wrote: >> Should I look at reworking this? It would be great to have these ECMP routes >> for other purposes. > > Looking at my IPv6 bug list this change is on it -- allowing ECMP routes > to have a device only hop. > >

Re: [PATCH net-next] net: stmmac: Add support for U32 TC filter using Flexible RX Parser

2018-05-03 Thread Jakub Kicinski
On Thu, 3 May 2018 13:45:30 +0100, Jose Abreu wrote: > + case TC_SETUP_CLSU32: > + if (!(priv->dev->hw_features & NETIF_F_HW_TC)) > + ret = -EOPNOTSUPP; > + else > + ret = stmmac_tc_setup_cls_u32(priv, priv, type_data); > +

Re: [bpf-next v1 8/9] bpf: Provide helper to do lookups in kernel FIB table

2018-05-03 Thread David Ahern
On 5/3/18 6:45 PM, Daniel Borkmann wrote: >> +.ret_type = RET_INTEGER, >> +.arg1_type = ARG_PTR_TO_CTX, >> +.arg2_type = ARG_PTR_TO_MEM, >> +.arg3_type = ARG_CONST_SIZE, >> +.arg4_type = ARG_ANYTHING, >> +}; >> + >> +BPF_CALL_4(bpf_skb_fib_lookup,

Re: [bpf-next v1 8/9] bpf: Provide helper to do lookups in kernel FIB table

2018-05-03 Thread Daniel Borkmann
On 05/03/2018 05:53 AM, David Ahern wrote: [...] > + > +BPF_CALL_4(bpf_xdp_fib_lookup, struct xdp_buff *, ctx, > +struct bpf_fib_lookup *, params, int, plen, u32, flags) > +{ > + if (plen < sizeof(*params)) > + return -EINVAL; > + > + switch (params->family) { > +#if

[RFC PATCH 2/2] ixgbevf: Add support for UDP segmentation offload

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck This patch adds support for UDP segmentation offload. Relatively few changes were needed to add this support as it functions much like the TCP segmentation offload. Signed-off-by: Alexander Duyck ---

[RFC PATCH 1/2] ixgbe: Add support for UDP segmentation offload

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck This patch adds support for UDP segmentation offload. Relatively few changes were needed to add this support as it functions much like the TCP segmentation offload. Signed-off-by: Alexander Duyck ---

[RFC PATCH 0/2] ixgbe/ixgbevf: Add support for UDP segmentation offload

2018-05-03 Thread Alexander Duyck
These patches are meant to be a follow-up to the following series: https://patchwork.ozlabs.org/project/netdev/list/?series=42476=both=* These patches enable driver support for the new UDP segmentation offload feature. For now I am pushing them as an RFC as they haven't been officially

[net-next PATCH 1/5] udp: Record gso_segs when supporting UDP segmentation offload

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck We need to record the number of segments that will be generated when this frame is segmented. The expectation is that if gso_size is set then gso_segs is set as well. Without this some drivers such as ixgbe get confused if they attempt to

[net-next PATCH 5/5] net: Add NETIF_F_GSO_UDP_L4 to list of GSO offloads with fallback

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck Enable UDP offload as a generic software offload since we can now handle it for multiple cases including if the checksum isn't present and via gso_partial in the case of tunnels. Signed-off-by: Alexander Duyck ---

[net-next PATCH 2/5] udp: Do not pass checksum or MSS as parameters

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to be a start at cleaning up some of the UDP GSO segmentation code. Specifically we were passing mss and a recomputed checksum when we really didn't need to. The function itself could derive that information based on the

[net-next PATCH 3/5] udp: Add support for software checksum and GSO_PARTIAL with GSO offload

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck This patch adds support for a software provided checksum and GSO_PARTIAL segmentation support. With this we can offload UDP segmentation on devices that only have partial support for tunnels. Since we are no longer needing the hardware checksum

[net-next PATCH 4/5] udp: Do not copy destructor if one is not present

2018-05-03 Thread Alexander Duyck
From: Alexander Duyck This patch makes it so that if a destructor is not present we avoid trying to update the skb socket or any reference counting that would be associated with the NULL socket and/or descriptor. By doing this we can support traffic coming from

[net-next PATCH 0/5] UDP GSO Segmentation clean-ups

2018-05-03 Thread Alexander Duyck
This patch set addresses a number of issues I found while sorting out enabling UDP GSO Segmentation support for ixgbe/ixgbevf. Specifically there were a number of issues related to the checksum and such that seemed to cause either minor irregularities or kernel panics in the case of the offload

Re: [PATCH] bpf: fix possible spectre-v1 in find_and_alloc_map()

2018-05-03 Thread Daniel Borkmann
On 05/03/2018 06:04 PM, Mark Rutland wrote: > It's possible for userspace to control attr->map_type. Sanitize it when > using it as an array index to prevent an out-of-bounds value being used > under speculation. > > Found by smatch. > > Signed-off-by: Mark Rutland > Cc:

[PATCH bpf] bpf: use array_index_nospec in find_prog_type

2018-05-03 Thread Daniel Borkmann
Commit 9ef09e35e521 ("bpf: fix possible spectre-v1 in find_and_alloc_map()") converted find_and_alloc_map() over to use array_index_nospec() to sanitize map type that user space passes on map creation, and this patch does an analogous conversion for progs in find_prog_type() as it's also passed

Re: [PATCH net-next] net/mlx4_en: optimizes get_fixed_ipv6_csum()

2018-05-03 Thread Eric Dumazet
On 05/02/2018 07:18 AM, Tariq Toukan wrote: > > > On 27/04/2018 1:56 AM, Saeed Mahameed wrote: >> LGTM, >> >> Reviewed-by: Saeed Mahameed >> > > Acked-by: Tariq Toukan > > Thanks Eric. Thanks guys. I see this patch (

[PATCH net] tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent().

2018-05-03 Thread Michael Chan
tg3_free_consistent() calls dma_free_coherent() to free tp->hw_stats under spinlock and can trigger BUG_ON() in vunmap() because vunmap() may sleep. Fix it by removing the spinlock and relying on the TG3_FLAG_INIT_COMPLETE flag to prevent race conditions between tg3_get_stats64() and

Re: [PATCH bpf-next v2 00/13] Move ld_abs/ld_ind to native BPF

2018-05-03 Thread Alexei Starovoitov
On Fri, May 04, 2018 at 01:08:11AM +0200, Daniel Borkmann wrote: > This set simplifies BPF JITs significantly by moving ld_abs/ld_ind > to native BPF, for details see individual patches. Main rationale > is in patch 'implement ld_abs/ld_ind in native bpf'. Thanks! > > v1 -> v2: > - Added

Re: [PATCH bpf-next v3 00/15] Introducing AF_XDP support

2018-05-03 Thread Alexei Starovoitov
On Fri, May 04, 2018 at 12:49:09AM +0200, Daniel Borkmann wrote: > On 05/02/2018 01:01 PM, Björn Töpel wrote: > > From: Björn Töpel > > > > This patch set introduces a new address family called AF_XDP that is > > optimized for high performance packet processing and, in

[PATCH bpf-next v2 04/13] bpf: add skb_load_bytes_relative helper

2018-05-03 Thread Daniel Borkmann
This adds a small BPF helper similar to bpf_skb_load_bytes() that is able to load relative to mac/net header offset from the skb's linear data. Compared to bpf_skb_load_bytes(), it takes a fifth argument namely start_header, which is either BPF_HDR_START_MAC or BPF_HDR_START_NET. This allows for a

[PATCH bpf-next v2 06/13] bpf, arm64: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from arm64 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 02/13] bpf: migrate ebpf ld_abs/ld_ind tests to test_verifier

2018-05-03 Thread Daniel Borkmann
Remove all eBPF tests involving LD_ABS/LD_IND from test_bpf.ko. Reason is that the eBPF tests from test_bpf module do not go via BPF verifier and therefore any instruction rewrites from verifier cannot take place. Therefore, move them into test_verifier which runs out of user space, so that

[PATCH bpf-next v2 03/13] bpf: implement ld_abs/ld_ind in native bpf

2018-05-03 Thread Daniel Borkmann
The main part of this work is to finally allow removal of LD_ABS and LD_IND from the BPF core by reimplementing them through native eBPF instead. Both LD_ABS/LD_IND were carried over from cBPF and keeping them around in native eBPF caused way more trouble than actually worth it. To just list some

[PATCH bpf-next v2 01/13] bpf: prefix cbpf internal helpers with bpf_

2018-05-03 Thread Daniel Borkmann
No change in functionality, just remove the '__' prefix and replace it with a 'bpf_' prefix instead. We later on add a couple of more helpers for cBPF and keeping the scheme with '__' is suboptimal there. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 13/13] bpf: sync tools bpf.h uapi header

2018-05-03 Thread Daniel Borkmann
Only sync the header from include/uapi/linux/bpf.h. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git

[PATCH bpf-next v2 10/13] bpf, ppc64: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from ppc64 JIT. Signed-off-by: Daniel Borkmann Acked-by: Naveen N. Rao

[PATCH bpf-next v2 05/13] bpf, x64: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from x64 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 00/13] Move ld_abs/ld_ind to native BPF

2018-05-03 Thread Daniel Borkmann
This set simplifies BPF JITs significantly by moving ld_abs/ld_ind to native BPF, for details see individual patches. Main rationale is in patch 'implement ld_abs/ld_ind in native bpf'. Thanks! v1 -> v2: - Added missing seen_lds_abs in LDX_MSH and use X = A initially due to being preserved

[PATCH bpf-next v2 11/13] bpf, s390x: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from s390x JIT. Tested on s390x instance on LinuxONE. Signed-off-by: Daniel Borkmann

[PATCH bpf-next v2 12/13] bpf, x32: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from x32 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 09/13] bpf, mips64: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from mips64 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 07/13] bpf, sparc64: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from sparc64 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf-next v2 08/13] bpf, arm32: remove ld_abs/ld_ind

2018-05-03 Thread Daniel Borkmann
Since LD_ABS/LD_IND instructions are now removed from the core and reimplemented through a combination of inlined BPF instructions and a slow-path helper, we can get rid of the complexity from arm32 JIT. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

Re: [PATCH bpf-next v3 00/15] Introducing AF_XDP support

2018-05-03 Thread Daniel Borkmann
On 05/02/2018 01:01 PM, Björn Töpel wrote: > From: Björn Töpel > > This patch set introduces a new address family called AF_XDP that is > optimized for high performance packet processing and, in upcoming > patch sets, zero-copy semantics. In this patch set, we have removed

Re: [PATCH rdma-next] MAINTAINERS: Remove bouncing @mellanox.com addresses

2018-05-03 Thread Doug Ledford
On 5/3/2018 5:11 PM, Or Gerlitz wrote: > On Thu, May 3, 2018 at 9:37 PM, LR wrote: > >> MELLANOX MLX5 core VPI driver >> M: Saeed Mahameed >> -M: Matan Barak > > Goodbye Matan! > > You were a long time developer, maintainer, hacker and a

[PATCH] net: ethernet: sun: niu set correct packet size in skb

2018-05-03 Thread Rob Taglang
Currently, skb->len and skb->data_len are set to the page size, not the packet size. This causes the frame check sequence to not be located at the "end" of the packet resulting in ethernet frame check errors. The driver does work currently, but stricter kernel facing networking solutions like

Re: [PATCH rdma-next] MAINTAINERS: Remove bouncing @mellanox.com addresses

2018-05-03 Thread Or Gerlitz
On Thu, May 3, 2018 at 9:37 PM, LR wrote: > MELLANOX MLX5 core VPI driver > M: Saeed Mahameed > -M: Matan Barak Goodbye Matan! You were a long time developer, maintainer, hacker and a very deeply thinking, pleasant, nice and open person in

Re: DSA switch

2018-05-03 Thread Andrew Lunn
> I am using kernel 2.6.37, but I think it is not kernel issue, but more > bad patches done on kernel. > It is based on TI's kernel, but with some custom modifications on > driver's switch, to make it work with TI's cpsw switch. > Seems like someone made some bad patch, I'll continue investigating

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 11:41 PM, Andrew Lunn wrote: > On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: >> On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >> > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> >> Hello, >> >> >> >> Is it

Re: [PATCH] net: ethernet: sun: niu set correct packet size in skb

2018-05-03 Thread David Miller
From: r...@taglang.io Date: Thu, 03 May 2018 16:38:04 -0400 > Ah, gotcha. Should I make a new thread? Yes, please do. Thank you.

Re: DSA switch

2018-05-03 Thread Andrew Lunn
On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: > On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: > >> Hello, > >> > >> Is it possible to use switch just like external real switch, > >> connecting all

Re: [PATCH] net: ethernet: sun: niu set correct packet size in skb

2018-05-03 Thread rob
Ah, gotcha. Should I make a new thread? Patch should be properly formatted below. Thanks, Rob Signed-off-by: Rob Taglang --- drivers/net/ethernet/sun/niu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sun/niu.c

[PATCH net] nsh: fix infinite loop

2018-05-03 Thread Eric Dumazet
syzbot caught an infinite recursion in nsh_gso_segment(). Problem here is that we need to make sure the NSH header is of reasonable length. BUG: MAX_LOCK_DEPTH too low! turning off the locking correctness validator. depth: 48 max: 48! 48 locks held by syz-executor0/10189: #0: (ptrval)

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> Hello, >> >> Is it possible to use switch just like external real switch, >> connecting all ports to the same subnet ? > > Yes. Just bridge all ports/interfaces

Re: [PATCH net-next 0/4] net/smc: splice implementation

2018-05-03 Thread David Miller
From: Ursula Braun Date: Thu, 3 May 2018 18:12:35 +0200 > From: Ursula Braun > > Dave, > > Stefan comes up with an smc implementation for splice(). The first > three patches are preparational patches, the 4th patch implements > splice().

RE: [PATCH v6 0/5] PCI: Improve PCIe link status reporting

2018-05-03 Thread Keller, Jacob E
> -Original Message- > This does change the dmesg reporting of link speeds, and in the ixgbe case, > it changes the reporting from KERN_WARN level to KERN_INFO. If that's an > issue, let's talk about it. I'm hoping the reduce code size, improved > functionality, and consistency across

Re: [PATCH net] macmace: Set platform device coherent_dma_mask

2018-05-03 Thread Michael Schmitz
Hi Christoph, On Thu, May 3, 2018 at 8:51 PM, Christoph Hellwig wrote: > On Thu, May 03, 2018 at 10:46:56AM +0200, Geert Uytterhoeven wrote: >> Perhaps you can add a new helper (platform_device_register_simple_dma()?) >> that takes the DMA mask, too? >> With people setting the mask

[GIT] Networking

2018-05-03 Thread David Miller
1) Various sockmap fixes from John Fastabend (pinned map handling, blocking in recvmsg, double page put, error handling during redirect failures, etc.) 2) Fix dead code handling in x86-64 JIT, from Gianluca Borello. 3) Missing device put in RDS IB code, from Dag Moxnes. 4) Don't process

Re: [PATCH] net: ethernet: sun: niu set correct packet size in skb

2018-05-03 Thread David Miller
From: Rob Taglang Date: Thu, 03 May 2018 11:06:04 -0400 > Currently, skb->len and skb->data_len are set to the page size, not > the packet size. This causes the frame check sequence to not be > located at the "end" of the packet resulting in ethernet frame check > errors. The

[PATCH v6 5/5] PCI: Remove unused pcie_get_minimum_link()

2018-05-03 Thread Bjorn Helgaas
From: Bjorn Helgaas In some cases pcie_get_minimum_link() returned misleading information because it found the slowest link and the narrowest link without considering the total bandwidth of the link. For example, consider a path with these two links: - 16.0 GT/s x1 link

[PATCH v6 2/5] bnxt_en: Report PCIe link properties with pcie_print_link_status()

2018-05-03 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously the driver used pcie_get_minimum_link() to warn when the NIC is in a slot that can't supply as much bandwidth as the NIC could use. pcie_get_minimum_link() can be misleading because it finds the slowest link and the narrowest link (which may

[PATCH v6 0/5] PCI: Improve PCIe link status reporting

2018-05-03 Thread Bjorn Helgaas
This is based on Tal's recent work to unify the approach for reporting PCIe link speed/width and whether the device is being limited by a slower upstream link. The new pcie_print_link_status() interface appeared in v4.17-rc1; see 9e506a7b5147 ("PCI: Add pcie_print_link_status() to log link speed

[PATCH v6 3/5] cxgb4: Report PCIe link properties with pcie_print_link_status()

2018-05-03 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously the driver used pcie_get_minimum_link() to warn when the NIC is in a slot that can't supply as much bandwidth as the NIC could use. pcie_get_minimum_link() can be misleading because it finds the slowest link and the narrowest link (which may

[PATCH v6 1/5] bnx2x: Report PCIe link properties with pcie_print_link_status()

2018-05-03 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously the driver used pcie_get_minimum_link() to warn when the NIC is in a slot that can't supply as much bandwidth as the NIC could use. pcie_get_minimum_link() can be misleading because it finds the slowest link and the narrowest link (which may

  1   2   3   >