Re: [PATCH] netlink: limit recursion depth in policy validation

2019-04-29 Thread Johannes Berg
On Mon, 2019-04-29 at 23:08 -0400, David Miller wrote: > From: Johannes Berg > Date: Fri, 26 Apr 2019 14:13:46 +0200 > > > From: Johannes Berg > > > > Now that we have nested policies, we can theoretically > > recurse forever parsing attributes if a (sub-)policy > > refers back to a higher leve

Re: [PATCH v3 net-next 2/3] ipv4: Pass fib_nh_common to rt_cache_route

2019-04-29 Thread Ido Schimmel
On Mon, Apr 29, 2019 at 09:16:18AM -0700, David Ahern wrote: > From: David Ahern > > Now that the cached routes are in fib_nh_common, pass it to > rt_cache_route and simplify its callers. For rt_set_nexthop, > the tclassid becomes the last user of fib_nh so move the > container of under the #ifde

Re: [PATCH 2/6] netlink: extend policy range validation

2019-04-29 Thread Johannes Berg
On Mon, 2019-04-29 at 22:49 -0400, David Miller wrote: > From: Johannes Berg > Date: Fri, 26 Apr 2019 14:13:02 +0200 > > > * NLA_POLICY_RANGE() macros. > > + *NLA_U8, > > + *NLA_U16, > > + *NLA_U32, > > + *NLA_U64 If the validation_type field

Re: [PATCH v3 net-next 1/3] ipv4: Move cached routes to fib_nh_common

2019-04-29 Thread Ido Schimmel
On Mon, Apr 29, 2019 at 09:16:17AM -0700, David Ahern wrote: > /* Release a nexthop info record */ > @@ -491,9 +491,15 @@ int fib_nh_common_init(struct fib_nh_common *nhc, struct > nlattr *encap, > u16 encap_type, void *cfg, gfp_t gfp_flags, > struct netl

[PATCH 08/18] xfrm: remove gso_segment indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal These functions are small and we only have versions for tunnel and transport mode for ipv4 and ipv6 respectively. Just place the 'transport or tunnel' conditional in the protocol specific function instead of using an indirection. Before: 3226 12 0 3238

[PATCH 01/18] xfrm: gso partial offload support

2019-04-29 Thread Steffen Klassert
From: Boris Pismenny This patch introduces support for gso partial ESP offload. Signed-off-by: Boris Pismenny Signed-off-by: Raed Salem Signed-off-by: Steffen Klassert --- net/ipv4/esp4_offload.c | 10 +++--- net/xfrm/xfrm_device.c | 3 +++ 2 files changed, 10 insertions(+), 3 deletion

pull request (net-next): ipsec-next 2019-04-30

2019-04-29 Thread Steffen Klassert
1) A lot of work to remove indirections from the xfrm code. From Florian Westphal. 2) Support ESP offload in combination with gso partial. From Boris Pismenny. 3) Remove some duplicated code from vti4. From Jeremy Sowden. Please note that there is merge conflict between commit: 8742dc

[PATCH 04/18] xfrm: prefer family stored in xfrm_mode struct

2019-04-29 Thread Steffen Klassert
From: Florian Westphal Now that we have the family available directly in the xfrm_mode struct, we can use that and avoid one extra dereference. Signed-off-by: Florian Westphal Reviewed-by: Sabrina Dubroca Signed-off-by: Steffen Klassert --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.

[PATCH 10/18] xfrm: remove output2 indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal similar to previous patch: no external module dependencies, so we can avoid the indirection by placing this in the core. This change removes the last indirection from xfrm_mode and the xfrm4|6_mode_{beet,tunnel}.c modules contain (almost) no code anymore. Before: text

[PATCH 06/18] xfrm: remove output indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal Same is input indirection. Only exception: we need to export xfrm_outer_mode_output for pktgen. Increases size of vmlinux by about 163 byte: Before: textdata bss dec filename 15730208 6936948 4046908 26714064 vmlinux After: 15730311 6937008 404690

[PATCH 16/18] xfrm: remove init_path indirection from afinfo_policy

2019-04-29 Thread Steffen Klassert
From: Florian Westphal handle this directly, its only used by ipv6. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 3 --- net/ipv4/xfrm4_policy.c | 7 --- net/ipv6/xfrm6_policy.c | 14 -- net/xfrm/xfrm_policy.c | 21 +++

[PATCH 15/18] xfrm: remove tos indirection from afinfo_policy

2019-04-29 Thread Steffen Klassert
From: Florian Westphal Only used by ipv4, we can read the fl4 tos value directly instead. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 1 - net/ipv4/xfrm4_policy.c | 6 -- net/ipv6/xfrm6_policy.c | 6 -- net/xfrm/xfrm_policy.c | 14

[PATCH 09/18] xfrm: remove input2 indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal No external dependencies on any module, place this in the core. Increase is about 1800 byte for xfrm_input.o. The beet helpers get added to internal header, as they can be reused from xfrm_output.c in the next patch (kernel contains several copies of them in the xfrm{4,6}_

[PATCH 18/18] xfrm: remove unneeded export_symbols

2019-04-29 Thread Steffen Klassert
From: Florian Westphal None of them have any external callers, make them static. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h| 2 -- net/ipv4/xfrm4_protocol.c | 3 +-- net/ipv6/xfrm6_protocol.c | 3 +-- net/xfrm/xfrm_state.c | 5 ++--- 4 f

[PATCH 11/18] xfrm: remove afinfo pointer from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal Adds an EXPORT_SYMBOL for afinfo_get_rcu, as it will now be called from ipv6 in case of CONFIG_IPV6=m. This change has virtually no effect on vmlinux size, but it reduces afinfo size and allows followup patch to make xfrm modes const. v2: mark if (afinfo) tests as likely

[PATCH 05/18] xfrm: remove input indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal No need for any indirection or abstraction here, both functions are pretty much the same and quite small, they also have no external dependencies. xfrm_prepare_input can then be made static. With allmodconfig build, size increase of vmlinux is 25 byte: Before: text

[PATCH 02/18] vti4: eliminated some duplicate code.

2019-04-29 Thread Steffen Klassert
From: Jeremy Sowden The ipip tunnel introduced in commit dd9ee3444014 ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel") largely duplicated the existing vti_input and vti_recv functions. Refactored to deduplicate the common code. Signed-off-by: Jeremy Sowden Signed-off-by: S

[PATCH 14/18] xfrm: kconfig: make xfrm depend on inet

2019-04-29 Thread Steffen Klassert
From: Florian Westphal when CONFIG_INET is not enabled: net/xfrm/xfrm_output.c: In function ‘xfrm4_tunnel_encap_add’: net/xfrm/xfrm_output.c:234:2: error: implicit declaration of function ‘ip_select_ident’ [-Werror=implicit-function-declaration] ip_select_ident(dev_net(dst->dev), skb, NULL); XF

[PATCH 17/18] xfrm: remove decode_session indirection from afinfo_policy

2019-04-29 Thread Steffen Klassert
From: Florian Westphal No external dependencies, might as well handle this directly. xfrm_afinfo_policy is now 40 bytes on x86_64. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 3 - net/ipv4/xfrm4_policy.c | 114 net/ipv6/

[PATCH 07/18] xfrm: remove xmit indirection from xfrm_mode

2019-04-29 Thread Steffen Klassert
From: Florian Westphal There are only two versions (tunnel and transport). The ip/ipv6 versions are only differ in sizeof(iphdr) vs ipv6hdr. Place this in the core and use x->outer_mode->encap type to call the correct adjustment helper. Before: text databss dec filename 157303

[PATCH 03/18] xfrm: place af number into xfrm_mode struct

2019-04-29 Thread Steffen Klassert
From: Florian Westphal This will be useful to know if we're supposed to decode ipv4 or ipv6. While at it, make the unregister function return void, all module_exit functions did just BUG(); there is never a point in doing error checks if there is no way to handle such error. Signed-off-by: Flor

[PATCH 12/18] xfrm: make xfrm modes builtin

2019-04-29 Thread Steffen Klassert
From: Florian Westphal after previous changes, xfrm_mode contains no function pointers anymore and all modules defining such struct contain no code except an init/exit functions to register the xfrm_mode struct with the xfrm core. Just place the xfrm modes core and remove the modules, the run-ti

[PATCH 13/18] xfrm: store xfrm_mode directly, not its address

2019-04-29 Thread Steffen Klassert
From: Florian Westphal This structure is now only 4 bytes, so its more efficient to cache a copy rather than its address. No significant size difference in allmodconfig vmlinux. With non-modular kernel that has all XFRM options enabled, this series reduces vmlinux image size by ~11kb. All xfrm_

Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers

2019-04-29 Thread Ido Schimmel
On Tue, Apr 23, 2019 at 08:27:36PM -0600, David Ahern wrote: > 2 more columns fixes the current problem, what assurances are there that > the occupancy levels and max won't reach 100 million in the next few years? Yes, I thought about that as well, but while the size of the shared buffers is getti

[PATCH 04/12] xfrm6_tunnel: Fix potential panic when unloading xfrm6_tunnel module

2019-04-29 Thread Steffen Klassert
From: Su Yanjun When unloading xfrm6_tunnel module, xfrm6_tunnel_fini directly frees the xfrm6_tunnel_spi_kmem. Maybe someone has gotten the xfrm6_tunnel_spi, so need to wait it. Fixes: 91cc3bb0b04ff("xfrm6_tunnel: RCU conversion") Signed-off-by: Su Yanjun Acked-by: Herbert Xu Signed-off-by: S

[PATCH 01/12] xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink

2019-04-29 Thread Steffen Klassert
From: YueHaibing UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu

pull request (net): ipsec 2019-04-30

2019-04-29 Thread Steffen Klassert
1) Fix an out-of-bound array accesses in __xfrm_policy_unlink. From YueHaibing. 2) Reset the secpath on failure in the ESP GRO handlers to avoid dereferencing an invalid pointer on error. From Myungho Jung. 3) Add and revert a patch that tried to add rcu annotations to netns_xfrm. Fro

[PATCH 05/12] Revert "net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm"

2019-04-29 Thread Steffen Klassert
This reverts commit f10e0010fae8174dc20bdc872bcaa85baa925cb7. This commit was just wrong. It caused a lot of syzbot warnings, so just revert it. Signed-off-by: Steffen Klassert --- include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_user.c | 30 +++--- 2 files changed, 8

[PATCH 10/12] xfrm: Honor original L3 slave device in xfrmi policy lookup

2019-04-29 Thread Steffen Klassert
From: Martin Willi If an xfrmi is associated to a vrf layer 3 master device, xfrm_policy_check() fails after traffic decapsulation. The input interface is replaced by the layer 3 master device, and hence xfrmi_decode_session() can't match the xfrmi anymore to satisfy policy checking. Extend ingr

[PATCH 12/12] xfrm: update doc about xfrm[46]_gc_thresh

2019-04-29 Thread Steffen Klassert
From: Nicolas Dichtel Those entries are not used anymore. CC: Florian Westphal Fixes: 09c7570480f7 ("xfrm: remove flow cache") Signed-off-by: Nicolas Dichtel Signed-off-by: Steffen Klassert --- Documentation/networking/ip-sysctl.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docum

[PATCH 06/12] vti4: ipip tunnel deregistration fixes.

2019-04-29 Thread Steffen Klassert
From: Jeremy Sowden If tunnel registration failed during module initialization, the module would fail to deregister the IPPROTO_COMP protocol and would attempt to deregister the tunnel. The tunnel was not deregistered during module-exit. Fixes: dd9ee3444014e ("vti4: Fix a ipip packet processing

[PATCH 08/12] xfrm: clean up xfrm protocol checks

2019-04-29 Thread Steffen Klassert
From: Cong Wang In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only

[PATCH 11/12] xfrm4: Fix uninitialized memory read in _decode_session4

2019-04-29 Thread Steffen Klassert
We currently don't reload pointers pointing into skb header after doing pskb_may_pull() in _decode_session4(). So in case pskb_may_pull() changed the pointers, we read from random memory. Fix this by putting all the needed infos on the stack, so that we don't need to access the header pointers afte

[PATCH 09/12] esp4: add length check for UDP encapsulation

2019-04-29 Thread Steffen Klassert
From: Sabrina Dubroca esp_output_udp_encap can produce a length that doesn't fit in the 16 bits of a UDP header's length field. In that case, we'll send a fragmented packet whose length is larger than IP_MAX_MTU (resulting in "Oversized IP packet" warnings on receive) and with a bogus UDP length.

[PATCH 03/12] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

2019-04-29 Thread Steffen Klassert
From: Su Yanjun For rcu protected pointers, we'd better add '__rcu' for them. Once added '__rcu' tag for rcu protected pointer, the sparse tool reports warnings. net/xfrm/xfrm_user.c:1198:39: sparse:expected struct sock *sk net/xfrm/xfrm_user.c:1198:39: sparse:got struct sock [noderef]

[PATCH 07/12] vti4: removed duplicate log message.

2019-04-29 Thread Steffen Klassert
From: Jeremy Sowden Removed info log-message if ipip tunnel registration fails during module-initialization: it adds nothing to the error message that is written on all failures. Fixes: dd9ee3444014e ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel") Signed-off-by: Jeremy Sow

[PATCH 02/12] xfrm: Reset secpath in xfrm failure

2019-04-29 Thread Steffen Klassert
From: Myungho Jung In esp4_gro_receive() and esp6_gro_receive(), secpath can be allocated without adding xfrm state to xvec. Then, sp->xvec[sp->len - 1] would fail and result in dereferencing invalid pointer in esp4_gso_segment() and esp6_gso_segment(). Reset secpath if xfrm function returns erro

Re: [PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-04-29 Thread Heiner Kallweit
On 29.04.2019 23:52, Andrew Lunn wrote: >> @@ -2078,6 +2089,11 @@ EXPORT_SYMBOL(phy_set_sym_pause); >> void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) >> { >> __ETHTOOL_DECLARE_LINK_MODE_MASK(oldadv); >> +bool asym_pause_supported; >> + >> +asym_pause_supported =

Re: [PATCH net,v3] vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach

2019-04-29 Thread David Miller
From: Stephen Suryaputra Date: Sat, 27 Apr 2019 09:14:33 -0400 > When there is no route to an IPv6 dest addr, skb_dst(skb) points > to loopback dev in the case of that the IP6CB(skb)->iif is > enslaved to a vrf. This causes Ip6InNoRoutes to be incremented on the > loopback dev. This also causes t

Re: [PATCH net] tcp: add sanity tests in tcp_add_backlog()

2019-04-29 Thread David Miller
From: Eric Dumazet Date: Fri, 26 Apr 2019 10:10:05 -0700 > Richard and Bruno both reported that my commit added a bug, > and Bruno was able to determine the problem came when a segment > wih a FIN packet was coalesced to a prior one in tcp backlog queue. > > It turns out the header prediction in

Re: [PATCH] netlink: limit recursion depth in policy validation

2019-04-29 Thread David Miller
From: Johannes Berg Date: Fri, 26 Apr 2019 14:13:46 +0200 > From: Johannes Berg > > Now that we have nested policies, we can theoretically > recurse forever parsing attributes if a (sub-)policy > refers back to a higher level one. This is a situation > that has happened in nl80211, and we've av

Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled

2019-04-29 Thread Richard Cochran
On Tue, Apr 30, 2019 at 11:17:32AM +1000, Stephen Mallon wrote: > > I've found that SOF_TIMESTAMPING_OPT_ID already works with hardware timestamps > for TCP just not datagram sockets and so I though this was a fix. Right, so if HW time stamping worked for TCP but not for UDP, then I would call it

Re: [PATCH 2/6] netlink: extend policy range validation

2019-04-29 Thread David Miller
From: Johannes Berg Date: Fri, 26 Apr 2019 14:13:02 +0200 > * NLA_POLICY_RANGE() macros. > + *NLA_U8, > + *NLA_U16, > + *NLA_U32, > + *NLA_U64 If the validation_type field instead is set to > + * NLA_VALIDATE_RANGE_PTR

[PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed

2019-04-29 Thread Hangbin Liu
Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests") Signed-off-by: Hangbin Liu --- tools/testing/selftests/net/fib_rule_tests.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/net/fib_rule_tests.sh b/tools/testing/selftests/net/fib_rule_tests.sh inde

Re: [PATCH net] selftests: fib_rule_tests: Fix icmp proto with ipv6

2019-04-29 Thread Hangbin Liu
On Mon, Apr 29, 2019 at 10:30:09AM -0700, David Ahern wrote: > From: David Ahern > > A recent commit returns an error if icmp is used as the ip-proto for > IPv6 fib rules. Update fib_rule_tests to send ipv6-icmp instead of icmp. > > Fixes: 5e1a99eae8499 ("ipv4: Add ICMPv6 support when parse rout

[PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread YueHaibing
Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe, The proper pointer to use is clk instead of mode. This issue was detected with the help of Coccinelle. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing Reviewed-by: Andr

Re: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-04-29 Thread YueHaibing
On 2019/4/30 0:30, Julia Lawall wrote: > > > On Mon, 29 Apr 2019, YueHaibing wrote: > >> Change the call to PTR_ERR to access the value just tested by IS_ERR. > > I assume you didn't find the problem just looking through the code by > hand. If you used a tool, it would be really good to acknow

Re: [PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled

2019-04-29 Thread Stephen Mallon
On Mon, Apr 29, 2019 at 11:32:08AM -0400, Willem de Bruijn wrote: > On Mon, Apr 29, 2019 at 11:02 AM Richard Cochran > wrote: > > > > On Sun, Apr 28, 2019 at 10:57:57PM -0400, Willem de Bruijn wrote: > > > It is debatable whether this is a fix or a new feature. It extends > > > SOF_TIMESTAMPING_OP

Re: [PATCH] of_net: add mtd-mac-address support to of_get_mac_address()

2019-04-29 Thread Frank Rowand
On 4/29/19 5:48 PM, Rob Herring wrote: > On Tue, Apr 16, 2019 at 08:01:56PM -0700, Frank Rowand wrote: >> Hi Rob, >> >> On 4/16/19 5:29 PM, Florian Fainelli wrote: >>> >>> >>> On 16/04/2019 13:05, Petr Štetiar wrote: From: John Crispin Many embedded devices have information such as

Re: [net-next 12/12] i40e: Introduce recovery mode support

2019-04-29 Thread Jakub Kicinski
On Mon, 29 Apr 2019 12:16:28 -0700, Jeff Kirsher wrote: > From: Alice Michael > > This patch introduces "recovery mode" to the i40e driver. It is > part of a new Any2Any idea of upgrading the firmware. In this > approach, it is required for the driver to have support for > "transition firmware",

Re: [PATCH net-next RFC] Dump SW SQ context as part of tx reporter

2019-04-29 Thread Jakub Kicinski
On Mon, 29 Apr 2019 17:17:39 +0300, Aya Levin wrote: > In order to offline translate the raw memory into a human readable > format, the user can use some out-of-kernel scripts which receives as an > input the following: > - Object raw memory > - Driver object compiled with debug info (can be taken/

Re: [PATCH] of_net: add mtd-mac-address support to of_get_mac_address()

2019-04-29 Thread Rob Herring
On Tue, Apr 16, 2019 at 08:01:56PM -0700, Frank Rowand wrote: > Hi Rob, > > On 4/16/19 5:29 PM, Florian Fainelli wrote: > > > > > > On 16/04/2019 13:05, Petr Štetiar wrote: > >> From: John Crispin > >> > >> Many embedded devices have information such as MAC addresses stored > >> inside MTD devi

Re: [PATCH net-next 3/5] net/sched: taprio: fix build without 64bit div

2019-04-29 Thread Leandro Dorileo
Hi, Jakub Kicinski writes: > Recent changes to taprio did not use the correct div64 helpers, > leading to: > > net/sched/sch_taprio.o: In function `taprio_dequeue': > sch_taprio.c:(.text+0x34a): undefined reference to `__divdi3' > net/sched/sch_taprio.o: In function `advance_sched': > sch_tapr

[PATCH bpf-next] selftests/bpf: set RLIMIT_MEMLOCK properly for test_libbpf_open.c

2019-04-29 Thread Yonghong Song
Test test_libbpf.sh failed on my development server with failure -bash-4.4$ sudo ./test_libbpf.sh [0] libbpf: Error in bpf_object__probe_name():Operation not permitted(1). Couldn't load basic 'r0 = 0' BPF program. test_libbpf: failed at file test_l4lb.o selftests: test_libbpf [FAILED]

Re: [PATCH V2 mlx5-next 00/11] Mellanox, mlx5-next updates 2019-04-25

2019-04-29 Thread Saeed Mahameed
On Mon, 2019-04-29 at 18:13 +, Saeed Mahameed wrote: > Hi, > > This series provides misc low level updates to mlx5 core driver, to > be > shared between rdma and net-next trees. > > 1) From Aya: Enable general events on all physical link types and > restrict general event handling of subtype

[net-next][PATCH v2 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-04-29 Thread Santosh Shilimkar
RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. A sysctl is added to indicate whether RDMA requiring ODP is supported. Reviewed-by: Håkon Bugge Reviewed-tested-by: Zhu Yanjun Signed-off-by: Hans Westgaard Ry Signed-off-by: Santosh Shilimk

[net-next][PATCH v2 0/2] rds: handle unsupported rdma request to fs dax memory

2019-04-29 Thread Santosh Shilimkar
RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA over such memories and since it doesn't report any failure, it can lead to unexpected issues like memory corruption when a couple of out of s

[net-next][PATCH v2 1/2] rds: handle unsupported rdma request to fs dax memory

2019-04-29 Thread Santosh Shilimkar
From: Hans Westgaard Ry RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA over such memories and since it doesn't report any failure, it can lead to unexpected issues like memory corruption

Re: [PATCH bpf-next 1/6] tools: bpftool: add --log-libbpf option to get debug info from libbpf

2019-04-29 Thread Y Song
On Mon, Apr 29, 2019 at 2:53 AM Quentin Monnet wrote: > > libbpf has three levels of priority for output: warn, info, debug. By > default, debug output is not printed to stderr. > > Add a new "--log-libbpf LOG_LEVEL" option to bpftool to provide more > flexibility on the log level for libbpf. LOG_

[PATCH v9 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-29 Thread Tom Herbert
Validate Destination and Hop-by-Hop options. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an extension header. There are two levels of validation that can be performed: simple checks and deep checks. Simple c

[PATCH v9 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-29 Thread Tom Herbert
Create a single TLV parameter table that holds meta information for IPv6 Hop-by-Hop and Destination TLVs. The data structure is composed of a 256 element array of u8's (one entry for each TLV type to allow O(1) lookup). Each entry provides an offset into an array of TLV proc data structures which f

[PATCH v9 net-next 2/6] exthdrs: Move generic EH functions to exthdrs_common.c

2019-04-29 Thread Tom Herbert
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Signed-off-by: Tom Herb

[PATCH v9 net-next 5/6] ip6tlvs: Add netlink interface

2019-04-29 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31 + n

[PATCH v9 net-next 4/6] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c |

[PATCH v9 net-next 1/6] exthdrs: Create exthdrs_options.c

2019-04-29 Thread Tom Herbert
Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 15 net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c

[PATCH v9 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
Extension headers are the mechanism of extensibility for the IPv6 protocol, however to date they have only seen limited deployment. The reasons for that are because intermediate devices don't handle them well, and there haven't really be any useful extension headers defined. In particular, Destinat

[PATCH v9 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
Extension headers are the mechanism of extensibility for the IPv6 protocol, however to date they have only seen limited deployment. The reasons for that are because intermediate devices don't handle them well, and there haven't really be any useful extension headers defined. In particular, Destinat

[PATCH v8 net-next 6/8] ipv6tlvs: opt_update function

2019-04-29 Thread Tom Herbert
Add a utility function to replace socket's options with a new set. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 2 ++ net/ipv6/ipv6_sockglue.c | 16 2 files changed, 18 insertions(+) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 8c19c6f..a8c1e6c 10064

[PATCH v8 net-next 5/8] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-29 Thread Tom Herbert
Validate Destination and Hop-by-Hop options. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an extension header. There are two levels of validation that can be performed: simple checks and deep checks. Simple c

[PATCH v8 net-next 1/8] exthdrs: Move generic EH functions to exthdrs_common.c

2019-04-29 Thread Tom Herbert
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Signed-off-by: Tom Herb

[PATCH v8 net-next 7/8] ipv6tlvs: Infrastructure for manipulating individual TLVs

2019-04-29 Thread Tom Herbert
Add utility functions in exthdrs_common.c to manipulate individual TVLs in Hop-by-Hop or Destination Options. This includes functions to find, insert, and delete in singleton TLV from on IPv6 options header. This code is based in part on the TLV option handling in calipso.c. Signed-off-by: Tom He

[PATCH v8 net-next 8/8] ipv6tlvs: API for manipuateling TLVs on a connect socket

2019-04-29 Thread Tom Herbert
This patch provides an interface for adding a deleting individual Hop-by-Hop or Destination Options on a socket. The following IPv6 socket options are created: IPV6_HOPOPTS_TLV IPV6_RTHDRDSTOPTS_TLV IPV6_DSTOPTS_TLV IPV6_HOPOPTS_DEL_TLV IPV6_RTHDRDSTOPTS_DEL

[PATCH v8 net-next 0/8] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
Extension headers are the mechanism of extensibility for the IPv6 protocol, however to date they have only seen limited deployment. The reasons for that are because intermediate devices don't handle them well, and there haven't really be any useful extension headers defined. In particular, Destinat

[PATCH v8 net-next 3/8] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c |

[PATCH v8 net-next 2/8] exthdrs: Registration of TLV handlers and parameters

2019-04-29 Thread Tom Herbert
Create a single TLV parameter table that holds meta information for IPv6 Hop-by-Hop and Destination TLVs. The data structure is composed of a 256 element array of u8's (one entry for each TLV type to allow O(1) lookup). Each entry provides an offset into an array of TLV proc data structures which f

[PATCH v8 net-next 4/8] ip6tlvs: Add netlink interface

2019-04-29 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31 + n

[PATCH iproute2 net-next v1 1/3] Update headers with taprio changes [DO NOT MERGE]

2019-04-29 Thread Vinicius Costa Gomes
This will be updated when the kernel headers are updated. Signed-off-by: Vinicius Costa Gomes --- include/uapi/linux/pkt_sched.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 7ee74c34..ac9f7eab 100644

[PATCH iproute2 net-next v1 2/3] taprio: Add support for changing schedules

2019-04-29 Thread Vinicius Costa Gomes
This allows for a new schedule to be specified during runtime, without removing the current one. For that, the semantics of the 'tc qdisc change' operation in the context of taprio is that if "change" is called and there is a running schedule, a new schedule is created and the base-time (let's cal

[PATCH iproute2 net-next v1 3/3] taprio: Add support for cycle_time and cycle_time_extension

2019-04-29 Thread Vinicius Costa Gomes
This allows a cycle-time and a cycle-time-extension to be specified. Specifying a cycle-time will truncate that cycle, so when that instant is reached, the cycle will start from its beginning. A cycle-time-extension may cause the last entry of a cycle, just before the start of a new schedule (the

[PATCH net-next v1 0/4] net/sched: taprio change schedules

2019-04-29 Thread Vinicius Costa Gomes
Hi, Changes from RFC: - Removed the patches for taprio offloading, because of the lack of in-tree users; - Updated the links to point to the PATCH version of this series; Original cover letter: Overview This RFC has two objectives, it adds support for changing the running schedu

[PATCH net-next v1 2/4] taprio: Add support adding an admin schedule

2019-04-29 Thread Vinicius Costa Gomes
The IEEE 802.1Q-2018 defines two "types" of schedules, the "Oper" (from operational?) and "Admin" ones. Up until now, 'taprio' only had support for the "Oper" one, added when the qdisc is created. This adds support for the "Admin" one, which allows the .change() operation to be supported. Just for

[PATCH net-next v1 4/4] taprio: Add support for cycle-time-extension

2019-04-29 Thread Vinicius Costa Gomes
IEEE 802.1Q-2018 defines the concept of a cycle-time-extension, so the last entry of a schedule before the start of a new schedule can be extended, so "too-short" entries can be avoided. Signed-off-by: Vinicius Costa Gomes --- include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c

[PATCH net-next v1 3/4] taprio: Add support for setting the cycle-time manually

2019-04-29 Thread Vinicius Costa Gomes
IEEE 802.1Q-2018 defines that a the cycle-time of a schedule may be overridden, so the schedule is truncated to a determined "width". Signed-off-by: Vinicius Costa Gomes --- include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c | 59 +- 2 files cha

[PATCH net-next v1 1/4] taprio: Fix potencial use of invalid memory during dequeue()

2019-04-29 Thread Vinicius Costa Gomes
Right now, this isn't a problem, but the next commit allows schedules to be added during runtime. When a new schedule transitions from the inactive to the active state ("admin" -> "oper") the previous one can be freed, if it's freed just after the RCU read lock is released, we may access an invalid

[PATCH net-next 4/8] tcp: undo init congestion window on false SYNACK timeout

2019-04-29 Thread Yuchung Cheng
Linux implements RFC6298 and use an initial congestion window of 1 upon establishing the connection if the SYNACK packet is retransmitted 2 or more times. In cellular networks SYNACK timeouts are often spurious if the wireless radio was dormant or idle. Also some network path is longer than the def

[PATCH net-next 6/8] tcp: undo cwnd on Fast Open spurious SYNACK retransmit

2019-04-29 Thread Yuchung Cheng
This patch makes passive Fast Open reverts the cwnd to default initial cwnd (10 packets) if the SYNACK timeout is spurious. Passive Fast Open uses a full socket during handshake so it can use the existing undo logic to detect spurious retransmission by recording the first SYNACK timeout in key sta

[PATCH net-next 7/8] tcp: refactor to consolidate TFO passive open code

2019-04-29 Thread Yuchung Cheng
Use a helper to consolidate two identical code block for passive TFO. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet --- net/ipv4/tcp_input.c | 52 +--- 1 file changed, 25 inser

[PATCH net-next 2/8] tcp: undo initial congestion window on false SYN timeout

2019-04-29 Thread Yuchung Cheng
Linux implements RFC6298 and use an initial congestion window of 1 upon establishing the connection if the SYN packet is retransmitted 2 or more times. In cellular networks SYN timeouts are often spurious if the wireless radio was dormant or idle. Also some network path is longer than the default S

[PATCH net-next 5/8] tcp: lower congestion window on Fast Open SYNACK timeout

2019-04-29 Thread Yuchung Cheng
TCP sender would use congestion window of 1 packet on the second SYN and SYNACK timeout except passive TCP Fast Open. This makes passive TFO too aggressive and unfair during congestion at handshake. This patch fixes this issue so TCP (fast open or not, passive or active) always conforms to the RFC6

[PATCH net-next 8/8] tcp: refactor setting the initial congestion window

2019-04-29 Thread Yuchung Cheng
Relocate the congestion window initialization from tcp_init_metrics() to tcp_init_transfer() to improve code readability. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet --- net/ipv4/tcp.c | 12 ne

[PATCH net-next 0/8] undo congestion window on spurious SYN or SYNACK timeout

2019-04-29 Thread Yuchung Cheng
Linux TCP currently uses the initial congestion window of 1 packet if multiple SYN or SYNACK timeouts per RFC6298. However such timeouts are often spurious on wireless or cellular networks that experience high delay variances (e.g. ramping up dormant radios or local link retransmission). Another ca

[PATCH net-next 1/8] tcp: avoid unconditional congestion window undo on SYN retransmit

2019-04-29 Thread Yuchung Cheng
Previously if an active TCP open has SYN timeout, it always undo the cwnd upon receiving the SYNACK. This is because tcp_clean_rtx_queue would reset tp->retrans_stamp when SYN is acked, which fools then tcp_try_undo_loss and tcp_packet_delayed. Addressing this issue is required to properly support

[PATCH net-next 3/8] tcp: better SYNACK sent timestamp

2019-04-29 Thread Yuchung Cheng
Detecting spurious SYNACK timeout using timestamp option requires recording the exact SYNACK skb timestamp. Previously the SYNACK sent timestamp was stamped slightly earlier before the skb was transmitted. This patch uses the SYNACK skb transmission timestamp directly. Signed-off-by: Yuchung Cheng

RE: [PATCH V2 mlx5-next 09/11] net/mlx5: Eswitch, enable RoCE loopback traffic

2019-04-29 Thread Parav Pandit
Hi Mark, > -Original Message- > From: Mark Bloch > Sent: Monday, April 29, 2019 5:31 PM > To: Parav Pandit ; Leon Romanovsky > ; Saeed Mahameed > Cc: Jason Gunthorpe ; netdev@vger.kernel.org; linux- > r...@vger.kernel.org; Maor Gottlieb > Subject: Re: [PATCH V2 mlx5-next 09/11] net/mlx5:

Re: [PATCH V2 mlx5-next 09/11] net/mlx5: Eswitch, enable RoCE loopback traffic

2019-04-29 Thread Mark Bloch
On 4/29/19 11:45 AM, Parav Pandit wrote: > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org On >> Behalf Of Leon Romanovsky >> Sent: Monday, April 29, 2019 1:41 PM >> To: Saeed Mahameed >> Cc: Jason Gunthorpe ; netdev@vger.kernel.org; linux- >> r...@vger.kernel.org; Maor

Re: [net-next][PATCH 1/2] rds: handle unsupported rdma request to fs dax memory

2019-04-29 Thread santosh.shilim...@oracle.com
On 4/29/19 3:25 PM, David Miller wrote: From: Santosh Shilimkar Date: Thu, 25 Apr 2019 17:44:29 -0700 @@ -158,8 +158,9 @@ static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages, { int ret; - ret = get_user_pages_fast(user_addr, nr_pages, write, pages); - +

Re: [net-next][PATCH 1/2] rds: handle unsupported rdma request to fs dax memory

2019-04-29 Thread David Miller
From: Santosh Shilimkar Date: Thu, 25 Apr 2019 17:44:29 -0700 > @@ -158,8 +158,9 @@ static int rds_pin_pages(unsigned long user_addr, > unsigned int nr_pages, > { > int ret; > > - ret = get_user_pages_fast(user_addr, nr_pages, write, pages); > - > + /* get_user_pages return -EO

Re: [PATCH net] ipv6: invert flowlabel sharing check in process and user mode

2019-04-29 Thread David Miller
From: Willem de Bruijn Date: Thu, 25 Apr 2019 12:06:54 -0400 > From: Willem de Bruijn > > A request for a flowlabel fails in process or user exclusive mode must > fail if the caller pid or uid does not match. Invert the test. > > Previously, the test was unsafe wrt PID recycling, but indeed te

Re: pull-request: ieee802154 for net 2019-04-25

2019-04-29 Thread David Miller
From: Stefan Schmidt Date: Thu, 25 Apr 2019 18:03:11 +0200 > An update from ieee802154 for your *net* tree. > > Another fix from Kangjie Lu to ensure better checking regmap updates in the > mcr20a driver. Nothing else I have pending for the final release. > > If there are any problems let me kn

Re: [PATCH v4 net-next 08/15] net: aquantia: use macros for better visibility

2019-04-29 Thread Andrew Lunn
On Mon, Apr 29, 2019 at 10:04:52AM +, Igor Russkikh wrote: > Improve for better readability > > Signed-off-by: Nikita Danilov > Signed-off-by: Igor Russkikh Hi Igor https://www.spinics.net/lists/netdev/msg567238.html Please remember to add any reviewed-by you get. Andrew

  1   2   3   >