[PATCH net-next v2] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
This version has some suggestions by Eric Dumazet: - Use a local variable for the mark in IPv6 instead of ctl_sk to avoid SMP races. - Use the more elegant "IP4_REPLY_MARK(net, skb->mark) ?: sk->sk_mark" statement. - Factorize code as sk_fullsock() check is not necessary. Aidan McGurn from Ope

Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-05-09 Thread Dmitry Vyukov
On Mon, Apr 16, 2018 at 9:42 PM, Dan Streetman wrote: > On Wed, Feb 21, 2018 at 3:53 PM, Tommi Rantala > wrote: >> On 20.02.2018 18:26, Neil Horman wrote: >>> >>> On Tue, Feb 20, 2018 at 09:14:41AM +0100, Dmitry Vyukov wrote: On Tue, Feb 20, 2018 at 8:56 AM,

[PATCH] net: ipv4: remove define INET_CSK_DEBUG and unnecessary EXPORT_SYMBOL

2018-05-09 Thread Joe Perches
INET_CSK_DEBUG is always set and only is used for 2 pr_debug calls. EXPORT_SYMBOL(inet_csk_timer_bug_msg) is only used by these 2 pr_debug calls and is also unnecessary as the exported string can be used directly by these calls. Signed-off-by: Joe Perches --- include/net/inet_connection_sock.h

Re: [PATCH net-next v1] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jonathan Maxwell
On Thu, May 10, 2018 at 3:45 PM, Eric Dumazet wrote: > > > On 05/09/2018 10:21 PM, Jon Maxwell wrote: > > ... > >> if (th->rst) >> @@ -723,11 +724,17 @@ static void tcp_v4_send_reset(const struct sock *sk, >> struct sk_buff *skb) >> arg.tos = ip_hdr(skb)->tos; >> arg.uid = sock_

Re: [PATCH 2/2] alx: add disable_wol paramenter

2018-05-09 Thread AceLan Kao
Hi Andrew, We have some machines using Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller, but none of them has the unintentional wake up issue. We're willing to fix it if we encountered the issue, but before we can do it, we need this feature is supported by the driver. Taking the feature

Re: [net-next][PATCH] inet: Use switch case instead of multiple condition checks

2018-05-09 Thread Joe Perches
On Thu, 2018-05-10 at 13:37 +0800, Li RongQing wrote: > inet_csk_reset_xmit_timer uses multiple equality condition checks, > so it is better to use switch case instead of them [] > diff --git a/include/net/inet_connection_sock.h > b/include/net/inet_connection_sock.h [] > @@ -239,22 +239,31 @@ sta

Re: [net-next][PATCH] inet: Use switch case instead of multiple condition checks

2018-05-09 Thread Eric Dumazet
On 05/09/2018 10:37 PM, Li RongQing wrote: > inet_csk_reset_xmit_timer uses multiple equality condition checks, > so it is better to use switch case instead of them > Why is it better ? I prefer the concise form, and compiler really should not care.

Re: [PATCH net-next v1] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Eric Dumazet
On 05/09/2018 10:21 PM, Jon Maxwell wrote: ... > if (th->rst) > @@ -723,11 +724,17 @@ static void tcp_v4_send_reset(const struct sock *sk, > struct sk_buff *skb) > arg.tos = ip_hdr(skb)->tos; > arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); > local_bh_d

Re: [PATCH ipsec-next] xfrm: Allow Output Mark to be Updated Using UPDSA

2018-05-09 Thread Eyal Birger
Hi Nathan, On Wed, 9 May 2018 13:46:26 -0700 Nathan Harold wrote: > Allow UPDSA to change output_mark to permit > policy separation of packet routing decisions from > SA keying in systems that use mark-based routing. > > In the output_mark, used as a routing and firewall > mark for outbound pa

[net-next][PATCH] inet: Use switch case instead of multiple condition checks

2018-05-09 Thread Li RongQing
inet_csk_reset_xmit_timer uses multiple equality condition checks, so it is better to use switch case instead of them after this patch, the increased image size is acceptable Before After size of net/ipv4/tcp_output.o: 721640 721648 size of vmlinux:

[PATCH net-next v1] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
This version has some suggestions by Eric Dumazet: - Use a local variable for the mark in IPv6 instead of ctl_sk to avoid SMP races. - Use the more elegant "IP4_REPLY_MARK(net, skb->mark) ?: sk->sk_mark" statement. Aidan McGurn from Openwave Mobility systems reported the following bug: "Marke

Re: [PATCH] can: hi311x: Work around TX complete interrupt erratum

2018-05-09 Thread Lukas Wunner
On Wed, May 09, 2018 at 02:43:43PM +0200, Lukas Wunner wrote: > When sending packets as fast as possible using "cangen -g 0 -i -x", the > HI-3110 occasionally latches the interrupt pin high on completion of a > packet, but doesn't set the TXCPLT bit in the INTF register. The INTF > register contai

Re: [PATCH net-next] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jonathan Maxwell
On Thu, May 10, 2018 at 1:32 PM, Eric Dumazet wrote: > > > On 05/09/2018 07:07 PM, Jon Maxwell wrote: >> Aidan McGurn from Openwave Mobility systems reported the following bug: >> >> "Marked routing is broken on customer deployment. Its effects are large >> increase in Uplink retransmissions cause

Re: [PATCH v1 iproute2-next 2/3] rdma: print driver resource attributes

2018-05-09 Thread David Ahern
On 5/7/18 9:53 AM, Steve Wise wrote: > @@ -152,7 +153,10 @@ int main(int argc, char **argv) > pretty_output = true; > break; > case 'd': > - show_details = true; > + if (show_details) > +

Re: [iproute2-next 1/1] tipc: fixed node and name table listings

2018-05-09 Thread David Ahern
On 5/7/18 10:32 AM, Jon Maloy wrote: > We make it easier for users to correlate between 128-bit node > identities and 32-bit node hash by extending the 'node list' > command to also show the hash value. > > We also improve the 'nametable show' command to show the node identity > instead of the nod

Re: [iproute-next v2] tipc: Add support to set and get MTU for UDP bearer

2018-05-09 Thread David Ahern
On 5/8/18 5:55 AM, GhantaKrishnamurthy MohanKrishna wrote: > In this commit we introduce the ability to set and get > MTU for UDP media and bearer. > > For set and get properties such as tolerance, window and priority, > we already do: > > $ tipc media set PPROPERTY media MEDIA > $ tipc m

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

2018-05-09 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 ++- 1 file changed, 31 in

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

2018-05-09 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. Signed-off-by

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

2018-05-09 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: David S. Miller ---

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

2018-05-09 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% fas

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

2018-05-09 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 + 2 files changed, 14 in

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

2018-05-09 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 Acked-by: David S. Miller --- include/net/ip6_fib.h | 6 +++--- net/ipv6/ip6_fib.c| 14 ++

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

2018-05-09 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 insertions(+), 15 deletions(-) diff --git a/i

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

2018-05-09 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 Acked-b

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

2018-05-09 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 forwarded,

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

2018-05-09 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 proc

Re: [PATCH net-next] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Eric Dumazet
On 05/09/2018 07:07 PM, Jon Maxwell wrote: > Aidan McGurn from Openwave Mobility systems reported the following bug: > > "Marked routing is broken on customer deployment. Its effects are large > increase in Uplink retransmissions caused by the client never receiving > the final ACK to their FI

[PATCH net-next] net/core: delete the no need variable description in devlink_resource_register() comment

2018-05-09 Thread Sun Lianwen
The variable "top_hierarchy" and "reload_required" is not existence in devlink_resource_register() Signed-off-by: Sun Lianwen --- net/core/devlink.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index ad1317376798..c9596ea1d016 100644 --- a/net/cor

[PATCH] bpf, doc: clarification for the meaning of 'id'

2018-05-09 Thread Wang YanQing
For me, as a reader whose mother language isn't English, the old words bring a little difficulty to catch the meaning, this patch rewords the subsection in a more clarificatory way. This patch also add blank lines as separator at two places to improve readability. Signed-off-by: Wang YanQing ---

[PATCH net-next] net/core: correct the variable name in dev_ioctl() comment

2018-05-09 Thread Sun Lianwen
The variable name is not "arg" but "ifr" in dev_ioctl() Signed-off-by: Sun Lianwen --- net/core/dev_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index a04e1e88bf3a..114e29053977 100644 --- a/net/core/dev_ioctl.c +++ b/net

Re: [PATCH net-next RFC 1/3] net: Add support to configure SR-IOV VF minimum and maximum queues.

2018-05-09 Thread Michael Chan
On Wed, May 9, 2018 at 6:10 PM, Jakub Kicinski wrote: > On Wed, 9 May 2018 17:22:50 -0700, Michael Chan wrote: >> On Wed, May 9, 2018 at 4:15 PM, Jakub Kicinski wrote: >> > On Wed, 9 May 2018 07:21:41 -0400, Michael Chan wrote: >> >> VF Queue resources are always limited and there is currently no

linux-next: manual merge of the net-next tree with the net tree

2018-05-09 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/realtek/r8169.c between commit: 3148dedfe79e ("r8169: fix powering up RTL8168h") from the net tree and commit: 4f447d296982 ("r8169: drop member pll_power_ops from struct rtl8169_private") fro

[PATCH net-next] tcp: Add mark for TIMEWAIT sockets

2018-05-09 Thread Jon Maxwell
Aidan McGurn from Openwave Mobility systems reported the following bug: "Marked routing is broken on customer deployment. Its effects are large increase in Uplink retransmissions caused by the client never receiving the final ACK to their FINACK - this ACK misses the mark and routes out of the

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

2018-05-09 Thread Finn Thain
On Thu, 3 May 2018, Geert Uytterhoeven wrote: > > Perhaps you can add a new helper > (platform_device_register_simple_dma()?) that takes the DMA mask, too? Would there be enough potential callers in future to justify that API? It seems that there haven't been many in the past. I found four user

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

2018-05-09 Thread Finn Thain
On Thu, 3 May 2018, 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 to kill the WARNING splat, this may

Re: [PATCH net-next RFC 1/3] net: Add support to configure SR-IOV VF minimum and maximum queues.

2018-05-09 Thread Jakub Kicinski
On Wed, 9 May 2018 17:22:50 -0700, Michael Chan wrote: > On Wed, May 9, 2018 at 4:15 PM, Jakub Kicinski wrote: > > On Wed, 9 May 2018 07:21:41 -0400, Michael Chan wrote: > >> VF Queue resources are always limited and there is currently no > >> infrastructure to allow the admin. on the host to ad

Proposal

2018-05-09 Thread Zeliha Omer Faruk
-- Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

Re: [PATCH net-next RFC 1/3] net: Add support to configure SR-IOV VF minimum and maximum queues.

2018-05-09 Thread Michael Chan
On Wed, May 9, 2018 at 4:15 PM, Jakub Kicinski wrote: > On Wed, 9 May 2018 07:21:41 -0400, Michael Chan wrote: >> VF Queue resources are always limited and there is currently no >> infrastructure to allow the admin. on the host to add or reduce queue >> resources for any particular VF. With ever

[PATCH net 2/2] bonding: send learning packets for vlans on slave

2018-05-09 Thread Debabrata Banerjee
There was a regression at some point from the intended functionality of commit f60c3704e87d ("bonding: Fix alb mode to only use first level vlans.") Given the return value vlan_get_encap_level() we need to store the nest level of the bond device, and then compare the vlan's encap level to this. Wi

Proposal

2018-05-09 Thread Zeliha Omer Faruk
-- Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

[PATCH net 1/2] bonding: do not allow rlb updates to invalid mac

2018-05-09 Thread Debabrata Banerjee
Make sure multicast, broadcast, and zero mac's cannot be the output of rlb updates, which should all be directed arps. Receive load balancing will be collapsed if any of these happen, as the switch will broadcast. Signed-off-by: Debabrata Banerjee --- drivers/net/bonding/bond_alb.c | 2 +- 1 fil

[PATCH net 0/2] bonding: bug fixes and regressions

2018-05-09 Thread Debabrata Banerjee
Fixes to bonding driver for balance-alb mode, suitable for stable. Debabrata Banerjee (2): bonding: do not allow rlb updates to invalid mac bonding: send learning packets for vlans on slave drivers/net/bonding/bond_alb.c | 15 +-- drivers/net/bonding/bond_main.c | 2 ++ include

Re: linux-next: Tree for May 9 (mlx5)

2018-05-09 Thread Saeed Mahameed
On Wed, 2018-05-09 at 08:31 -0700, Randy Dunlap wrote: > On 05/09/2018 04:21 AM, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20180508: > > > > on x86_64: > # CONFIG_SMP is not set > > In file included from > ../drivers/net/ethernet/mellanox/mlx5/core/main.c:43:0: > ../include/linu

Re: [PATCH] net/mlx5: Fix mlx5_get_vector_affinity function

2018-05-09 Thread Saeed Mahameed
On Wed, 2018-05-09 at 15:19 -0700, Guenter Roeck wrote: > On Sun, May 06, 2018 at 09:33:26AM +0200, Thomas Gleixner wrote: > > On Sat, 5 May 2018, Guenter Roeck wrote: > > > > > On Thu, Apr 12, 2018 at 09:49:11AM +, Israel Rukshin wrote: > > > > Adding the vector offset when calling to mlx5_ve

Re: [PATCH net-next RFC 1/3] net: Add support to configure SR-IOV VF minimum and maximum queues.

2018-05-09 Thread Jakub Kicinski
On Wed, 9 May 2018 07:21:41 -0400, Michael Chan wrote: > VF Queue resources are always limited and there is currently no > infrastructure to allow the admin. on the host to add or reduce queue > resources for any particular VF. With ever increasing number of VFs > being supported, it is desirable

Proposal

2018-05-09 Thread Zeliha Omer Faruk
-- Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-09 Thread Kees Cook
On Wed, May 9, 2018 at 1:55 PM, Luis R. Rodriguez wrote: > On Tue, May 08, 2018 at 03:42:33PM -0700, Kees Cook wrote: >> On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: >> > + This used to be the default firmware loading facility, and udev >> > used >> > + to listen for

Re: [PATCH bpf-next] bpf: sync tools bpf.h uapi header

2018-05-09 Thread Daniel Borkmann
On 05/09/2018 04:04 AM, Prashant Bhole wrote: > sync the header from include/uapi/linux/bpf.h which was updated to add > fib lookup helper function. This fixes selftests/bpf build failure > > Signed-off-by: Prashant Bhole > --- > tools/include/uapi/linux/bpf.h | 84 > +++

Re: [PATCH v4 0/2] selftests/bpf

2018-05-09 Thread Daniel Borkmann
On 05/08/2018 03:35 PM, Sirio Balmelli wrote: > Review of v3 patch much appreciated. > > Respun the series to omit the Makefile include, will work on > a separate patch for that; > replied to the v3 thread with queries specific to the include issue. > > best, > > Sirio > > Sirio Balmelli (2): >

Re: [PATCH bpf-next v5 3/4] bpf: selftest additions for SOCKHASH

2018-05-09 Thread Daniel Borkmann
Hi John, On 05/06/2018 01:25 AM, John Fastabend wrote: > This runs existing SOCKMAP tests with SOCKHASH map type. To do this > we push programs into include file and build two BPF programs. One > for SOCKHASH and one for SOCKMAP. > > We then run the entire test suite with each type. > > Signed-o

Re: libbpf backward compatibility (was: [PATCH bpf-next v5 09/10] bpf: btf: Add BTF support to libbpf)

2018-05-09 Thread Jakub Kicinski
On Wed, 9 May 2018 15:17:12 -0700, Jakub Kicinski wrote: > On Wed, 18 Apr 2018 15:56:05 -0700, Martin KaFai Lau wrote: > > diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h > > index 39f6a0d64a3b..01bda076310f 100644 > > --- a/tools/lib/bpf/bpf.h > > +++ b/tools/lib/bpf/bpf.h > > @@ -26,6 +26,

Re: [PATCH] net/mlx5: Fix mlx5_get_vector_affinity function

2018-05-09 Thread Guenter Roeck
On Sun, May 06, 2018 at 09:33:26AM +0200, Thomas Gleixner wrote: > On Sat, 5 May 2018, Guenter Roeck wrote: > > > On Thu, Apr 12, 2018 at 09:49:11AM +, Israel Rukshin wrote: > > > Adding the vector offset when calling to mlx5_vector2eqn() is wrong. > > > This is because mlx5_vector2eqn() check

libbpf backward compatibility (was: [PATCH bpf-next v5 09/10] bpf: btf: Add BTF support to libbpf)

2018-05-09 Thread Jakub Kicinski
On Wed, 18 Apr 2018 15:56:05 -0700, Martin KaFai Lau wrote: > diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h > index 39f6a0d64a3b..01bda076310f 100644 > --- a/tools/lib/bpf/bpf.h > +++ b/tools/lib/bpf/bpf.h > @@ -26,6 +26,20 @@ > #include > #include > > +struct bpf_create_map_attr { >

Re: [PATCH] selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()

2018-05-09 Thread Paul Moore
On Wed, May 9, 2018 at 11:34 AM, Paul Moore wrote: > On Wed, May 9, 2018 at 11:11 AM, Stephen Smalley wrote: >> On 05/09/2018 11:01 AM, Paul Moore wrote: >>> On Wed, May 9, 2018 at 8:37 AM, Stephen Smalley wrote: On 05/08/2018 08:25 PM, Paul Moore wrote: > On Tue, May 8, 2018 at 2:40 PM

Re: [PATCH net] tc-testing: fix tdc tests for 'bpf' action

2018-05-09 Thread Lucas Bates
On Wed, May 9, 2018 at 12:45 PM, Davide Caratti wrote: > - correct a typo in the value of 'matchPattern' of test 282d, potentially > causing false negative > - allow errors when 'teardown' executes '$TC action flush action bpf' in > test 282d, to fix false positive when it is run with act_bpf un

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

2018-05-09 Thread Alexei Starovoitov
On Wed, May 09, 2018 at 03:39:52PM -0600, David Ahern wrote: > On 5/9/18 3:29 PM, David Ahern wrote: > > On 5/9/18 2:44 PM, Daniel Borkmann wrote: > >> Generally, no objection. However, could we get rid of the two extra > >> includes altogether > >> to avoid running into any such dependency issue?

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

2018-05-09 Thread Daniel Borkmann
On 05/09/2018 11:39 PM, David Ahern wrote: > On 5/9/18 3:29 PM, David Ahern wrote: >> On 5/9/18 2:44 PM, Daniel Borkmann wrote: >>> Generally, no objection. However, could we get rid of the two extra >>> includes altogether >>> to avoid running into any such dependency issue? Right now the only >

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

2018-05-09 Thread David Ahern
On 5/9/18 3:29 PM, David Ahern wrote: > On 5/9/18 2:44 PM, Daniel Borkmann wrote: >> Generally, no objection. However, could we get rid of the two extra includes >> altogether >> to avoid running into any such dependency issue? Right now the only includes >> we have in >> the bpf uapi header is l

Re: pull-request: mac80211-next 2018-05-09

2018-05-09 Thread Johannes Berg
Hi, Sorry, scratch that. I forgot that this commit: > Toke Høiland-Jørgensen (3): > cfg80211: Expose TXQ stats and parameters to userspace caused a bunch of "too much stack" warnings - I should put in at least the non-driver fix for that first, and then coordinate with Kalle to send the

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

2018-05-09 Thread David Ahern
On 5/9/18 2:44 PM, Daniel Borkmann wrote: > Generally, no objection. However, could we get rid of the two extra includes > altogether > to avoid running into any such dependency issue? Right now the only includes > we have in > the bpf uapi header is linux/types.h and linux/bpf_common.h (latter h

[PATCH net-next 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing

2018-05-09 Thread Roman Mashak
When application fails to pass flags in netlink TLV for a new skbedit action, the kernel results in the following oops: [8.307732] BUG: unable to handle kernel paging request at 00021130 [8.309167] PGD 8000193d1067 P4D 8000193d1067 PUD 180e0067 PMD 0 [8.310595] Oops: 0

[PATCH net] hv_netvsc: set master device

2018-05-09 Thread Stephen Hemminger
The hyper-v transparent bonding should have used master_dev_link. The netvsc device should look like a master bond device not like the upper side of a tunnel. This makes the semantics the same so that userspace applications looking at network devices see the correct master relationshipship. Fixes

[RFC bpf-next 03/11] bpf: Generalize ptr_or_null regs check

2018-05-09 Thread Joe Stringer
This check will be reused by an upcoming commit for conditional jump checks for sockets. Refactor it a bit to simplify the later commit. Signed-off-by: Joe Stringer --- kernel/bpf/verifier.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff

[RFC bpf-next 00/11] Add socket lookup support

2018-05-09 Thread Joe Stringer
This series proposes a new helper for the BPF API which allows BPF programs to perform lookups for sockets in a network namespace. This would allow programs to determine early on in processing whether the stack is expecting to receive the packet, and perform some action (eg drop, forward somewhere)

[RFC bpf-next 01/11] bpf: Add iterator for spilled registers

2018-05-09 Thread Joe Stringer
Add this iterator for spilled registers, it concentrates the details of how to get the current frame's spilled registers into a single macro while clarifying the intention of the code which is calling the macro. Signed-off-by: Joe Stringer --- include/linux/bpf_verifier.h | 11 +++ kerne

[RFC bpf-next 05/11] bpf: Macrofy stack state copy

2018-05-09 Thread Joe Stringer
An upcoming commit will need very similar copy/realloc boilerplate, so refactor the existing stack copy/realloc functions into macros to simplify it. Signed-off-by: Joe Stringer --- kernel/bpf/verifier.c | 104 -- 1 file changed, 59 insertions(+),

[RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-09 Thread Joe Stringer
This patch adds a new BPF helper function, sk_lookup() which allows BPF programs to find out if there is a socket listening on this host, and returns a socket pointer which the BPF program can then access to determine, for instance, whether to forward or drop traffic. sk_lookup() takes a reference

[RFC bpf-next 11/11] Documentation: Describe bpf reference tracking

2018-05-09 Thread Joe Stringer
Signed-off-by: Joe Stringer --- Documentation/networking/filter.txt | 64 + 1 file changed, 64 insertions(+) diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index 5032e1263bc9..77be17977bc5 100644 --- a/Documentation/net

[RFC bpf-next 06/11] bpf: Add reference tracking to verifier

2018-05-09 Thread Joe Stringer
Allow helper functions to acquire a reference and return it into a register. Specific pointer types such as the PTR_TO_SOCKET will implicitly represent such a reference. The verifier must ensure that these references are released exactly once in each path through the program. To achieve this, this

[RFC bpf-next 10/11] selftests/bpf: Add C tests for reference tracking

2018-05-09 Thread Joe Stringer
Signed-off-by: Joe Stringer --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_progs.c | 38 +++ tools/testing/selftests/bpf/test_sk_lookup_kern.c | 127 ++ 3 files changed, 166 insertions(+), 1 deletion(-) create mo

[RFC bpf-next 08/11] selftests/bpf: Add tests for reference tracking

2018-05-09 Thread Joe Stringer
reference tracking: leak potential reference reference tracking: leak potential reference on stack reference tracking: leak potential reference on stack 2 reference tracking: zero potential reference reference tracking: copy and zero potential references reference tracking: release reference withou

[RFC bpf-next 09/11] libbpf: Support loading individual progs

2018-05-09 Thread Joe Stringer
Allow the individual program load to be invoked. This will help with testing, where a single ELF may contain several sections, some of which denote subprograms that are expected to fail verification, along with some which are expected to pass verification. By allowing programs to be iterated and in

[RFC bpf-next 04/11] bpf: Add PTR_TO_SOCKET verifier type

2018-05-09 Thread Joe Stringer
Teach the verifier a little bit about a new type of pointer, a PTR_TO_SOCKET. This pointer type is accessed from BPF through the 'struct bpf_sock' structure. Signed-off-by: Joe Stringer --- include/linux/bpf.h | 19 +- include/linux/bpf_verifier.h | 2 ++ kernel/bpf/verifier.c

[RFC bpf-next 02/11] bpf: Simplify ptr_min_max_vals adjustment

2018-05-09 Thread Joe Stringer
An upcoming commit will add another two pointer types that need very similar behaviour, so generalise this function now. Signed-off-by: Joe Stringer --- kernel/bpf/verifier.c | 22 ++ tools/testing/selftests/bpf/test_verifier.c | 14 +++--- 2 fil

Re: KASAN: use-after-free Read in __dev_queue_xmit

2018-05-09 Thread Willem de Bruijn
On Wed, May 9, 2018 at 3:36 PM, Eric Dumazet wrote: > > > On 05/09/2018 12:21 PM, Willem de Bruijn wrote: > >> Indeed. The skb shared info struct is zeroed by dev_validate_header >> as a result of dev->hard_header_len exceeding skb->end - skb->data. >> >> Not exactly sure yet how this can happen.

[PATCH iproute2] ss: remove non-functional slabinfo

2018-05-09 Thread Stephen Hemminger
Ss was using slabinfo to try and intuit TCP statistics. The slabinfo changed several times since 2.4 and all these statistics are broken by renames and slab merging. Plus slabinfo does not exist at all if kernel is compiled with SLUB option. This has been broken for many years and is not worth fix

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-09 Thread Luis R. Rodriguez
On Tue, May 08, 2018 at 03:42:33PM -0700, Kees Cook wrote: > On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: > > + This used to be the default firmware loading facility, and udev > > used > > + to listen for uvents to load firmware for the kernel. The firmware > > +

Re: Performance regression between 4.13 and 4.14

2018-05-09 Thread Ben Greear
On 05/09/2018 12:02 PM, Ben Greear wrote: On 05/09/2018 11:48 AM, Eric Dumazet wrote: On 05/09/2018 11:43 AM, Ben Greear wrote: On 05/08/2018 10:10 AM, Eric Dumazet wrote: On 05/08/2018 09:44 AM, Ben Greear wrote: Hello, I am trying to track down a performance regression that appears to

Re: [net-next PATCH 1/3] net: Refactor XPS for CPUs and Rx queues

2018-05-09 Thread Nambiar, Amritha
On 5/9/2018 1:31 PM, Tom Herbert wrote: > On Thu, Apr 19, 2018 at 6:04 PM, Amritha Nambiar > wrote: >> Refactor XPS code to support Tx queue selection based on >> CPU map or Rx queue map. >> >> Signed-off-by: Amritha Nambiar >> --- >> include/linux/netdevice.h | 82 +- >> net/c

[PATCH ipsec-next] xfrm: Allow Output Mark to be Updated Using UPDSA

2018-05-09 Thread Nathan Harold
Allow UPDSA to change output_mark to permit policy separation of packet routing decisions from SA keying in systems that use mark-based routing. In the output_mark, used as a routing and firewall mark for outbound packets, is made update-able which allows routing decisions to be handled independen

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

2018-05-09 Thread Daniel Borkmann
On 05/09/2018 06:05 PM, David Ahern wrote: > On 5/9/18 2:15 AM, Daniel Borkmann wrote: >> >> Ohh well, this is causing allmodconfig build warnings (e.g. on x86) as >> reported today: > > lovely. > >> In file included from include/linux/dma-mapping.h:5:0, >> from include/linux/sk

Re: [PATCH v3 next-next] drivers: net: davinci_mdio: prevent spurious timeout

2018-05-09 Thread Grygorii Strashko
On 05/09/2018 10:45 AM, Sekhar Nori wrote: A well timed kernel preemption in the time_after() loop in wait_for_idle() can result in a spurious timeout error to be returned. Fix it by using readl_poll_timeout() which takes care of this issue. Reviewed-by: Andrew Lunn Signed-off-by: Sekhar Nor

Re: RTL8723BE performance regression

2018-05-09 Thread João Paulo Rechi Vita
On Tue, May 8, 2018 at 1:37 AM, Pkshih wrote: > On Mon, 2018-05-07 at 14:49 -0700, João Paulo Rechi Vita wrote: >> On Tue, May 1, 2018 at 10:58 PM, Pkshih wrote: >> > On Wed, 2018-05-02 at 05:44 +, Pkshih wrote: >> >> >> >> > -Original Message- >> >> > From: João Paulo Rechi Vita [mai

Re: [net-next PATCH 1/3] net: Refactor XPS for CPUs and Rx queues

2018-05-09 Thread Tom Herbert
On Thu, Apr 19, 2018 at 6:04 PM, Amritha Nambiar wrote: > Refactor XPS code to support Tx queue selection based on > CPU map or Rx queue map. > > Signed-off-by: Amritha Nambiar > --- > include/linux/netdevice.h | 82 +- > net/core/dev.c| 206 >

Re: [PATCH v6 12/13] Documentation: remove stale firmware API reference

2018-05-09 Thread Luis R. Rodriguez
On Wed, May 09, 2018 at 12:12:09PM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 8 May 2018 11:12:46 -0700 > "Luis R. Rodriguez" escreveu: > > > It refers to a pending patch, but this was merged eons ago. > > Didn't know that such patch was already merged. Great! > > Regards, > Mauro > > > >

pull-request: mac80211-next 2018-05-09

2018-05-09 Thread Johannes Berg
Hi Dave, Nothing major here either. I'm still waiting for the HE/802.11ax stuff, but even when we do get that it'll just add rates and not be very exciting at this point :-) Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 415787d7799f4fc

Re: KASAN: use-after-free Read in __dev_queue_xmit

2018-05-09 Thread Eric Dumazet
On 05/09/2018 12:21 PM, Willem de Bruijn wrote: > Indeed. The skb shared info struct is zeroed by dev_validate_header > as a result of dev->hard_header_len exceeding skb->end - skb->data. > > Not exactly sure yet how this can happen. The hard header length space > is accounted for during alloca

pull-request: mac80211 2018-05-09

2018-05-09 Thread Johannes Berg
Hi Dave, We just have a few fixes this time around. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 64e86fec54069266ba32be551d7b7f75e88ab60c: net: qualcomm: rmnet: Fix warning seen with fill_info (2018-04-18 21:23:06 -0400) are avai

Re: [PATCH net-next v3 0/2] socket statistics for ss

2018-05-09 Thread Stephen Hemminger
On Wed, 9 May 2018 11:53:50 -0700 Eric Dumazet wrote: > On 05/09/2018 11:44 AM, Stephen Hemminger wrote: > > On Wed, 9 May 2018 10:53:58 -0700 > > Eric Dumazet wrote: > > > >> On 05/09/2018 10:31 AM, Stephen Hemminger wrote: > >>> On Wed, 9 May 2018 10:18:23 -0700 > >>> Eric Dumazet wrote:

Re: [PATCH net-next v10 3/4] netdev: octeon-ethernet: Add Cavium Octeon III support.

2018-05-09 Thread Steven J. Hill
On 05/08/2018 09:28 PM, David Miller wrote: > > That's all I have the stomache for at the moment. > > This thing is really large, making it nearly impossible to review > as one huge patch #3. Perhaps you can find a way to split it up > logically somehow? > Hey David. This code was inherited by

Re: [PATCH net-next 3/3] net/mlx4_core: Use msi_x module param to limit num of MSI-X irqs

2018-05-09 Thread Ajaykumar Hotchandani
Thanks Tariq. Reviewed-by: Ajaykumar Hotchandani On 05/09/2018 08:29 AM, Tariq Toukan wrote: Extend the boolean interpretation of msi_x module parameter to numerical, as follows: 0 - Don't use MSI-X. 1 - Use MSI-X, driver decides the num of MSI-X irqs. =2 - Use MSI-X, limit number of MSI

Re: KASAN: use-after-free Read in __dev_queue_xmit

2018-05-09 Thread Willem de Bruijn
On Wed, May 9, 2018 at 12:38 PM, Willem de Bruijn wrote: >>> But a crash with the same signature is still occurring, so it should >>> eventually >>> get reported again. C reproducer is here, it works on Linus' tree (commit >>> 036db8bd963): https://syzkaller.appspot.com/text?tag=ReproC&x=105b1ae

Re: [PATCH bpf-next v4 0/6] ipv6: sr: introduce seg6local End.BPF action

2018-05-09 Thread Mathieu Xhonneux
@Alexei: I created the CONFIG_IPV6_SEG6_BPF symbol, fearing that using ipv6_bpf_stub would be detrimental for the bpf_lwt_seg6_action helper, since all the calls to seg6_* are in the critical path. 2018-05-09 22:16 GMT+01:00 Mathieu Xhonneux : > As of Linux 4.14, it is possible to define advanced

[PATCH bpf-next v4 6/6] selftests/bpf: test for seg6local End.BPF action

2018-05-09 Thread Mathieu Xhonneux
Add a new test for the seg6local End.BPF action. The following helpers are also tested : - bpf_lwt_push_encap within the LWT BPF IN hook - bpf_lwt_seg6_action - bpf_lwt_seg6_adjust_srh - bpf_lwt_seg6_store_bytes A chain of End.BPF actions is built. The SRH is injected through a LWT BPF IN hook be

[PATCH bpf-next v4 5/6] ipv6: sr: Add seg6local action End.BPF

2018-05-09 Thread Mathieu Xhonneux
This patch adds the End.BPF action to the LWT seg6local infrastructure. This action works like any other seg6local End action, meaning that an IPv6 header with SRH is needed, whose DA has to be equal to the SID of the action. It will also advance the SRH to the next segment, the BPF program does no

[PATCH bpf-next v4 1/6] ipv6: sr: make seg6.h includable without IPv6

2018-05-09 Thread Mathieu Xhonneux
include/net/seg6.h cannot be included in a source file if CONFIG_IPV6 is not enabled: include/net/seg6.h: In function 'seg6_pernet': >> include/net/seg6.h:52:14: error: 'struct net' has no member named 'ipv6'; did you mean 'ipv4'? return net->ipv6.seg

[PATCH bpf-next v4 2/6] ipv6: sr: export function lookup_nexthop

2018-05-09 Thread Mathieu Xhonneux
The function lookup_nexthop is essential to implement most of the seg6local actions. As we want to provide a BPF helper allowing to apply some of these actions on the packet being processed, the helper should be able to call this function, hence the need to make it public. Moreover, if one argumen

[PATCH bpf-next v4 3/6] bpf: Add IPv6 Segment Routing helpers

2018-05-09 Thread Mathieu Xhonneux
The BPF seg6local hook should be powerful enough to enable users to implement most of the use-cases one could think of. After some thinking, we figured out that the following actions should be possible on a SRv6 packet, requiring 3 specific helpers : - bpf_lwt_seg6_store_bytes: Modify non-sensi

[PATCH bpf-next v4 4/6] bpf: Split lwt inout verifier structures

2018-05-09 Thread Mathieu Xhonneux
The new bpf_lwt_push_encap helper should only be accessible within the LWT BPF IN hook, and not the OUT one, as this may lead to a skb under panic. At the moment, both LWT BPF IN and OUT share the same list of helpers, whose calls are authorized by the verifier. This patch separates the verifier o

[PATCH bpf-next v4 0/6] ipv6: sr: introduce seg6local End.BPF action

2018-05-09 Thread Mathieu Xhonneux
As of Linux 4.14, it is possible to define advanced local processing for IPv6 packets with a Segment Routing Header through the seg6local LWT infrastructure. This LWT implements the network programming principles defined in the IETF “SRv6 Network Programming” draft. The implemented operations are

  1   2   3   >