[net-next v2 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-16 Thread Sargun Dhillon
This introduces the BPF_PROG_TYPE_SECCOMP bpf program type. It is meant to be used for seccomp filters as an alternative to cBPF filters. The program type has relatively limited capabilities in terms of helpers, but that can be extended later on. The eBPF code loading is separated from attachment

[net-next v2 0/2] eBPF Seccomp filters

2018-02-16 Thread Sargun Dhillon
This patchset enables seccomp filters to be written in eBPF. Although, this patchset doesn't introduce much of the functionality enabled by eBPF, it lays the ground work for it. Currently, you have to disable CHECKPOINT_RESTORE support in order to utilize eBPF seccomp filters, as eBPF filters canno

[net-next v2 2/2] bpf: Add eBPF seccomp sample programs

2018-02-16 Thread Sargun Dhillon
This adds a sample program that uses seccomp-eBPF, called seccomp1. It shows the simple ability to code seccomp filters in C. Signed-off-by: Sargun Dhillon --- samples/bpf/Makefile| 5 + samples/bpf/bpf_load.c | 9 +++-- samples/bpf/seccomp1_kern.c | 43 +++

[PATCH net] xfrm: do not call rcu_read_unlock when afinfo is NULL in xfrm_get_tos

2018-02-16 Thread Xin Long
When xfrm_policy_get_afinfo returns NULL, it will not hold rcu read lock. In this case, rcu_read_unlock should not be called in xfrm_get_tos, just like other places where it's calling xfrm_policy_get_afinfo. Fixes: f5e2bb4f5b22 ("xfrm: policy: xfrm_get_tos cannot fail") Signed-off-by: Xin Long --

Re: [PATCH net-next 1/3] bpf, seccomp: Add eBPF filter capabilities

2018-02-16 Thread Sargun Dhillon
On Tue, Feb 13, 2018 at 12:34 PM, Kees Cook wrote: > On Tue, Feb 13, 2018 at 7:42 AM, Sargun Dhillon wrote: >> From: Sargun Dhillon >> >> This introduces the BPF_PROG_TYPE_SECCOMP bpf program type. It is meant >> to be used for seccomp filters as an alternative to cBPF filters. The >> program ty

Re: [PATCH V6 2/4] sctp: Add ip option support

2018-02-16 Thread Neil Horman
On Fri, Feb 16, 2018 at 07:51:02PM -0200, Marcelo Ricardo Leitner wrote: > On Fri, Feb 16, 2018 at 03:14:35PM -0500, Neil Horman wrote: > > On Fri, Feb 16, 2018 at 10:56:07AM -0200, Marcelo Ricardo Leitner wrote: > > > On Thu, Feb 15, 2018 at 09:15:40AM -0500, Neil Horman wrote: > > > > On Tue, Feb

[PATCH nf] netfilter: IDLETIMER: be syzkaller friendly

2018-02-16 Thread Eric Dumazet
From: Eric Dumazet We had one report from syzkaller [1] First issue is that INIT_WORK() should be done before mod_timer() or we risk timer being fired too soon, even with a 1 second timer. Second issue is that we need to reject too big info->timeout to avoid overflows in msecs_to_jiffies(info->

Re: [RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available

2018-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2018 10:11:21 -0800, Sridhar Samudrala wrote: > This patch enables virtio_net to switch over to a VF datapath when a VF > netdev is present with the same MAC address. It allows live migration > of a VM with a direct attached VF without the need to setup a bond/team > between a VF and

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2018 10:11:19 -0800, Sridhar Samudrala wrote: > Ppatch 2 is in response to the community request for a 3 netdev > solution. However, it creates some issues we'll get into in a moment. > It extends virtio_net to use alternate datapath when available and > registered. When BACKUP feat

[patch net] mlxsw: spectrum_router: Do not unconditionally clear route offload indication

2018-02-16 Thread Jiri Pirko
From: Ido Schimmel When mlxsw replaces (or deletes) a route it removes the offload indication from the replaced route. This is problematic for IPv4 routes, as the offload indication is stored in the fib_info which is usually shared between multiple routes. Instead of unconditionally clearing the

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
On pátek 16. února 2018 23:50:35 CET Eric Dumazet wrote: > /* snip */ > If you use > > tcptrace -R test_s2c.pcap > xplot.org d2c_rtt.xpl > > Then you'll see plenty of suspect 40ms rtt samples. That's odd. Even the way how they look uniformly. > It looks like receiver misses wakeups for some rea

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
On Fri, Feb 16, 2018 at 2:50 PM, Oleksandr Natalenko wrote: > Hi. > > On pátek 16. února 2018 21:54:05 CET Eric Dumazet wrote: >> /* snip */ >> Something fishy really : >> /* snip */ >> Not only the receiver suddenly adds a 25 ms delay, but also note that >> it acknowledges all prior segments (ack

[PATCH net 3/3] net: qualcomm: rmnet: Fix possible null dereference in command processing

2018-02-16 Thread Subash Abhinov Kasiviswanathan
If a command packet with invalid mux id is received, the packet would not have a valid endpoint. This invalid endpoint maybe dereferenced leading to a crash. Identified by manual code inspection. Fixes: 3352e6c45760 ("net: qualcomm: rmnet: Convert the muxed endpoint to hlist") Signed-off-by: Suba

[PATCH net 1/3] net: qualcomm: rmnet: Fix crash on real dev unregistration

2018-02-16 Thread Subash Abhinov Kasiviswanathan
With CONFIG_DEBUG_PREEMPT enabled, a crash with the following call stack was observed when removing a real dev which had rmnet devices attached to it. To fix this, remove the netdev_upper link APIs and instead use the existing information in rmnet_port and rmnet_priv to get the association between

[PATCH net 2/3] net: qualcomm: rmnet: Fix warning seen with 64 bit stats

2018-02-16 Thread Subash Abhinov Kasiviswanathan
With CONFIG_DEBUG_PREEMPT enabled, a warning was seen on device creation. This occurs due to the incorrect cpu API usage in ndo_get_stats64 handler. BUG: using smp_processor_id() in preemptible [] code: rmnetcli/5743 caller is debug_smp_processor_id+0x1c/0x24 Call trace: [] dump_backtrace+

[PATCH net 0/3] net: qualcomm: rmnet: Fix issues with CONFIG_DEBUG_PREEMPT enabled

2018-02-16 Thread Subash Abhinov Kasiviswanathan
Patch 1 and 2 fixes issues identified when CONFIG_DEBUG_PREEMPT was enabled. These involve APIs which were called in invalid contexts. Patch 3 is a null derefence fix identified by code inspection. Subash Abhinov Kasiviswanathan (3): net: qualcomm: rmnet: Fix crash on real dev unregistration

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi. On pátek 16. února 2018 21:54:05 CET Eric Dumazet wrote: > /* snip */ > Something fishy really : > /* snip */ > Not only the receiver suddenly adds a 25 ms delay, but also note that > it acknowledges all prior segments (ack 112949), but with a wrong ecr > value ( 2327043753 ) > instead of 2327

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
On Fri, 2018-02-16 at 12:54 -0800, Eric Dumazet wrote: > On Fri, Feb 16, 2018 at 9:25 AM, Oleksandr Natalenko > wrote: > > Hi. > > > > On pátek 16. února 2018 17:33:48 CET Neal Cardwell wrote: > > > Thanks for the detailed report! Yes, this sounds like an issue in BBR. We > > > have not run into

Re: [PATCH] tun: fix mismatch in mutex lock-unlock in tun_get_user()

2018-02-16 Thread Eric Dumazet
On Fri, Feb 16, 2018 at 2:11 PM, Alexey Khoroshilov wrote: > There is a single error path where tfile->napi_mutex is left unlocked. > It can lead to a deadlock. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > --- > drivers/net/tun.c | 4

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-16 Thread David Miller
From: Florian Westphal Date: Fri, 16 Feb 2018 17:14:08 +0100 > Any particular reason why translating iptables rather than nftables > (it should be possible to monitor the nftables changes that are > announced by kernel and act on those)? As Daniel said, iptables is by far the most deployed of t

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-16 Thread David Miller
From: Florian Westphal Date: Fri, 16 Feb 2018 15:57:27 +0100 > 4. Do you plan to reimplement connection tracking in userspace? > If no, how will the bpf program interact with it? The natural way to handle this, as with anything BPF related, is with appropriate BPF helpers which would be added fo

[PATCH] tun: fix mismatch in mutex lock-unlock in tun_get_user()

2018-02-16 Thread Alexey Khoroshilov
There is a single error path where tfile->napi_mutex is left unlocked. It can lead to a deadlock. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/tun.c b/dr

Re: [PATCH net-next] net: Only honor ifindex in IP_PKTINFO if non-0

2018-02-16 Thread David Ahern
On 2/16/18 2:43 PM, David Miller wrote: > From: David Ahern > Date: Fri, 16 Feb 2018 11:03:03 -0800 > >> Only allow ifindex from IP_PKTINFO to override SO_BINDTODEVICE settings >> if the index is actually set in the message. >> >> Signed-off-by: David Ahern > > Ok, this behavior meets reasonabl

Re: [PATCH net-next] tun: export flags, uid, gid, queue information over netlink

2018-02-16 Thread David Miller
From: Sabrina Dubroca Date: Fri, 16 Feb 2018 11:03:07 +0100 > Signed-off-by: Sabrina Dubroca > Reviewed-by: Stefano Brivio Looks good, applied, thanks Sabrina.

Re: [PATCH V6 2/4] sctp: Add ip option support

2018-02-16 Thread Marcelo Ricardo Leitner
On Fri, Feb 16, 2018 at 03:14:35PM -0500, Neil Horman wrote: > On Fri, Feb 16, 2018 at 10:56:07AM -0200, Marcelo Ricardo Leitner wrote: > > On Thu, Feb 15, 2018 at 09:15:40AM -0500, Neil Horman wrote: > > > On Tue, Feb 13, 2018 at 08:54:44PM +, Richard Haines wrote: > > > > Add ip option suppor

Re: [PATCH net-next] net: Only honor ifindex in IP_PKTINFO if non-0

2018-02-16 Thread David Miller
From: David Ahern Date: Fri, 16 Feb 2018 11:03:03 -0800 > Only allow ifindex from IP_PKTINFO to override SO_BINDTODEVICE settings > if the index is actually set in the message. > > Signed-off-by: David Ahern Ok, this behavior meets reasonable expectations, applied, thanks. None of the documat

Re: [PATCH][V2] net: dsa: mv88e6xxx: avoid unintended sign extension on a 16 bit shift

2018-02-16 Thread David Miller
From: Colin King Date: Fri, 16 Feb 2018 16:55:05 + > From: Colin Ian King > > The shifting of timehi by 16 bits to the left will be promoted to > a 32 bit signed int and then sign-extended to an u64. If the top bit > of timehi is set then all then all the upper bits of ns end up as also > b

Re: [PATCH v2] ravb: add support for changing MTU

2018-02-16 Thread David Miller
From: Niklas Söderlund Date: Fri, 16 Feb 2018 17:10:08 +0100 > Allow for changing the MTU within the limit of the maximum size of a > descriptor (2048 bytes). Add the callback to change MTU from user-space > and take the configurable MTU into account when configuring the > hardware. > > Signed-o

Re: [RFC PATCH] ptr_ring: linked list fallback

2018-02-16 Thread David Miller
From: "Michael S. Tsirkin" Date: Fri, 16 Feb 2018 09:40:54 +0200 > So pointer rings work fine, but they have a problem: > make them too small and not enough entries fit. > Make them too large and you start flushing your cache > and running out of memory. > > This is a new idea of mine: a ring ba

Re: [PATCH net] sctp: remove the left unnecessary check for chunk in sctp_renege_events

2018-02-16 Thread David Miller
From: Xin Long Date: Fri, 16 Feb 2018 17:18:33 +0800 > Commit fb23403536ea ("sctp: remove the useless check in > sctp_renege_events") forgot to remove another check for > chunk in sctp_renege_events. > > Dan found this when doing a static check. > > This patch is to remove that check, and also

Re: [PATCH net] tg3: APE heartbeat changes

2018-02-16 Thread David Miller
From: Satish Baddipadige Date: Fri, 16 Feb 2018 10:01:29 +0530 > @@ -990,6 +984,18 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, > int kind) > tg3_ape_send_event(tp, event); > } > > +static inline void tg3_send_ape_heartbeat(struct tg3 *tp, Inline functions are not appropr

Re: [PATCH net-next 0/2] nfp: whitespace sync and flower TCP flags

2018-02-16 Thread David Miller
From: Jakub Kicinski Date: Thu, 15 Feb 2018 20:19:07 -0800 > Whitespace cleanup from Michael and flower offload support for matching > on TCP flags from Pieter. Series applied, thanks Jakub.

Re: [PATCH net] rxrpc: Work around usercopy check

2018-02-16 Thread David Miller
From: David Howells Date: Thu, 15 Feb 2018 22:59:00 + > Due to a check recently added to copy_to_user(), it's now not permitted to > copy from slab-held data to userspace unless the slab is whitelisted. This > affects rxrpc_recvmsg() when it attempts to place an RXRPC_USER_CALL_ID > control

Re: [PATCH net] tun: fix tun_napi_alloc_frags() frag allocator

2018-02-16 Thread David Miller
From: Eric Dumazet Date: Thu, 15 Feb 2018 14:47:15 -0800 > From: Eric Dumazet > > > While fuzzing arm64 v4.16-rc1 with Syzkaller, I've been hitting a > misaligned atomic in __skb_clone: > > atomic_inc(&(skb_shinfo(skb)->dataref)); > >where dataref doesn't have the require

Re: [PATCH v3 net-next 0/7] RDS: zerocopy support

2018-02-16 Thread David Miller
From: Sowmini Varadhan Date: Thu, 15 Feb 2018 10:49:31 -0800 > This is version 3 of the series, following up on review comments for > http://patchwork.ozlabs.org/project/netdev/list/?series=28530 > > Review comments addressed > Patch 4 > - fix fragile use of skb->cb[], do not set ee_code inco

Re: [PATCH v1 1/1] drivers: isdn: NULL pointer dereference [null-pointer-deref] (CWE 476) problem

2018-02-16 Thread David Miller
From: Joe Moriarty Date: Thu, 15 Feb 2018 15:27:00 -0500 > The Parfait (version 2.1.0) static code analysis tool found the > following NULL pointer dereference problem. > > - drivers/isdn/mISDN/core.c > function channelmap_show() does not check the returned mdev > variable from dev_to_mISDN() fo

Re: [PATCH net] udplite: fix partial checksum initialization

2018-02-16 Thread David Miller
From: Alexey Kodanev Date: Thu, 15 Feb 2018 20:18:43 +0300 > Since UDP-Lite is always using checksum, the following path is > triggered when calculating pseudo header for it: > > udp4_csum_init() or udp6_csum_init() > skb_checksum_init_zero_check() > __skb_checksum_validate_complete(

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
On Fri, Feb 16, 2018 at 9:25 AM, Oleksandr Natalenko wrote: > Hi. > > On pátek 16. února 2018 17:33:48 CET Neal Cardwell wrote: >> Thanks for the detailed report! Yes, this sounds like an issue in BBR. We >> have not run into this one in our team, but we will try to work with you to >> fix this. >

[PATCH] skbuff: Fix comment mis-spelling.

2018-02-16 Thread David Miller
'peform' --> 'perform' Signed-off-by: David S. Miller --- include/linux/skbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 5ebc0f869720..c1e66bdcf583 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h

Re: [PATCH net] dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock

2018-02-16 Thread David Miller
From: Paolo Abeni Date: Thu, 15 Feb 2018 16:59:49 +0100 > After commit 3f34cfae1238 ("netfilter: on sockopt() acquire sock lock > only in the required scope"), the caller of nf_{get/set}sockopt() must > not hold any lock, but, in such changeset, I forgot to cope with DECnet. > > This commit addr

Re: [PATCHv3 net-next 0/8] net: sched: act: add extack support

2018-02-16 Thread David Miller
From: Alexander Aring Date: Thu, 15 Feb 2018 10:54:52 -0500 > this patch series adds extack support for the TC action subsystem. > As example I for the extack support in a TC action I choosed mirred > action. > > - Alex > > Cc: David Ahern > > changes since v3: > - adapt recommended changes f

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-16 Thread Daniel Borkmann
Hi Florian, On 02/16/2018 05:14 PM, Florian Westphal wrote: > Florian Westphal wrote: >> Daniel Borkmann wrote: >> Several questions spinning at the moment, I will probably come up with >> more: > > ... and here there are some more ... > > One of the many pain points of xtables design is the a

Re: [PATCH net] net: sched: fix unbalance in the error path of tca_action_flush()

2018-02-16 Thread David Miller
From: Davide Caratti Date: Thu, 15 Feb 2018 15:50:57 +0100 > When tca_action_flush() calls the action walk() and gets an error, > a successful call to nla_nest_start() is not followed by a call to > nla_nest_cancel(). It's harmless, as the skb is freed in the error > path - but it's worth to fix

Re: [PATCH] PCI/cxgb4: Extend T3 PCI quirk to T4+ devices

2018-02-16 Thread David Miller
From: Ganesh Goudar Date: Thu, 15 Feb 2018 20:03:18 +0530 > From: Casey Leedom > > We've run into a problem where our device is attached > to a Virtual Machine and the use of the new pci_set_vpd_size() > API doesn't help. The VM kernel has been informed that > the accesses are okay, but all of

Re: [PATCH 0/3] Remove IPVlan module dependencies on IPv6 and Netfilter

2018-02-16 Thread David Miller
From: Matteo Croce Date: Thu, 15 Feb 2018 15:04:52 +0100 > What about the other two, removing IPv6 and change the Kconfig? > Other devices like VXLan, Geneve and VRF uses the same architecture > to allow conditional compilation of the IPv6 module, I think that > IPVlan should do the same. Ok, th

Re: [PATCH net-next] cxgb4: append firmware dump to vmcore in kernel panic

2018-02-16 Thread David Miller
From: Rahul Lakkireddy Date: Thu, 15 Feb 2018 19:24:42 +0530 > Register callback to panic_notifier_list. Invoke dump collect routine > to append dump to vmcore. > > Signed-off-by: Rahul Lakkireddy > Signed-off-by: Ganesh Goudar There is absolutely no precedence for a networking driver dumpin

Re: [PATCH net-next 0/2] net: dsa: mv88e6xxx: Improve PTP access latency

2018-02-16 Thread David Miller
From: Andrew Lunn Date: Thu, 15 Feb 2018 14:38:33 +0100 > PTP needs to retrieve the hardware timestamps from the switch device > in a low latency manor. However ethtool -S and bridge fdb show can > hold the switch register access mutex for a long time. These patches > changes the reading the stat

Re: [net-next v2 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-16 Thread David Miller
From: Jon Maloy Date: Thu, 15 Feb 2018 14:14:37 +0100 > A received sk buffer may contain dozens of smaller 'bundled' messages > which after extraction go each in their own direction. > > Unfortunately, when we extract those messages using skb_clone() each > of the extracted buffers inherit the t

Re: [PATCH net] cxgb4: fix trailing zero in CIM LA dump

2018-02-16 Thread David Miller
From: Rahul Lakkireddy Date: Thu, 15 Feb 2018 18:20:01 +0530 > Set correct size of the CIM LA dump for T6. > > Fixes: 27887bc7cb7f ("cxgb4: collect hardware LA dumps") > Signed-off-by: Rahul Lakkireddy > Signed-off-by: Ganesh Goudar Applied and queued up for -stable, thanks.

Re: [PATCH net] cxgb4: free up resources of pf 0-3

2018-02-16 Thread David Miller
From: Ganesh Goudar Date: Thu, 15 Feb 2018 18:16:57 +0530 > free pf 0-3 resources, commit baf5086840ab ("cxgb4: > restructure VF mgmt code") erroneously removed the > code which frees the pf 0-3 resources, causing the > probe of pf 0-3 to fail in case of driver reload. > > Fixes: baf5086840ab ("

Re: [net-next 00/10] tipc: de-generealize topology server

2018-02-16 Thread David Miller
From: Jon Maloy Date: Thu, 15 Feb 2018 10:40:41 +0100 > The topology server is partially based on a template that is much > more generic than what we need. This results in a code that is > unnecessarily hard to follow and keeping bug free. > > We now take the consequence of the fact that we only

Re: [net-next 1/1] tipc: avoid unnecessary copying of bundled messages

2018-02-16 Thread David Miller
From: Jon Maloy Date: Thu, 15 Feb 2018 08:57:14 + > The buffers we are cloning are linearized 1 MTU incoming > buffers. There are no fragments. Each clone normally points to only > a tiny fraction of the data area of the base buffer. I don't claim > that copying always is bad, but in this c

Re: [PATCH net v2] fib_semantics: Don't match route with mismatching tclassid

2018-02-16 Thread David Miller
From: Stefano Brivio Date: Thu, 15 Feb 2018 09:46:03 +0100 > In fib_nh_match(), if output interface or gateway are passed in > the FIB configuration, we don't have to check next hops of > multipath routes to conclude whether we have a match or not. > > However, we might still have routes with di

Re: [PATCH V6 2/4] sctp: Add ip option support

2018-02-16 Thread Neil Horman
On Fri, Feb 16, 2018 at 10:56:07AM -0200, Marcelo Ricardo Leitner wrote: > On Thu, Feb 15, 2018 at 09:15:40AM -0500, Neil Horman wrote: > > On Tue, Feb 13, 2018 at 08:54:44PM +, Richard Haines wrote: > > > Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 > > > and CALIP

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi. On pátek 16. února 2018 18:56:12 CET Holger Hoffstätte wrote: > There is simply no reason why you shouldn't get approx. line rate > (~920+-ish) Mbit over wired 1GBit Ethernet; even my broken 10-year old > Core2Duo laptop can do that. Can you boot with spectre_v2=off and try "the > simplest cas

Re: [PATCH v2] ravb: add support for changing MTU

2018-02-16 Thread Florian Fainelli
On 02/16/2018 11:43 AM, Sergei Shtylyov wrote: > Hello! > > On 02/16/2018 10:42 PM, Florian Fainelli wrote: > >>> Allow for changing the MTU within the limit of the maximum size of a >>> descriptor (2048 bytes). Add the callback to change MTU from user-space >>> and take the configurable MTU into

Re: [PATCH v2] ravb: add support for changing MTU

2018-02-16 Thread Sergei Shtylyov
Hello! On 02/16/2018 10:42 PM, Florian Fainelli wrote: >> Allow for changing the MTU within the limit of the maximum size of a >> descriptor (2048 bytes). Add the callback to change MTU from user-space >> and take the configurable MTU into account when configuring the >> hardware. >> >> Signed-of

Re: [PATCH v2] ravb: add support for changing MTU

2018-02-16 Thread Florian Fainelli
On 02/16/2018 08:10 AM, Niklas Söderlund wrote: > Allow for changing the MTU within the limit of the maximum size of a > descriptor (2048 bytes). Add the callback to change MTU from user-space > and take the configurable MTU into account when configuring the > hardware. > > Signed-off-by: Niklas S

[PATCH net-next] net: Only honor ifindex in IP_PKTINFO if non-0

2018-02-16 Thread David Ahern
Only allow ifindex from IP_PKTINFO to override SO_BINDTODEVICE settings if the index is actually set in the message. Signed-off-by: David Ahern --- net/ipv4/ip_sockglue.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c ind

Re: ppp/pppoe, still panic 4.15.3 in ppp_push

2018-02-16 Thread Guillaume Nault
On Fri, Feb 16, 2018 at 01:13:18PM +0200, Denys Fedoryshchenko wrote: > On 2018-02-15 21:42, Guillaume Nault wrote: > > On Thu, Feb 15, 2018 at 09:34:42PM +0200, Denys Fedoryshchenko wrote: > > > On 2018-02-15 21:31, Guillaume Nault wrote: > > > > On Thu, Feb 15, 2018 at 06:01:16PM +0200, Denys Fed

Re: [PATCH net-next 0/3] eBPF Seccomp filters

2018-02-16 Thread Sargun Dhillon
On Wed, Feb 14, 2018 at 8:30 PM, Alexei Starovoitov wrote: > On Wed, Feb 14, 2018 at 10:32:22AM -0700, Tycho Andersen wrote: >> > > >> > > What's the reason for adding eBPF support? seccomp shouldn't need it, >> > > and it only makes the code more complex. I'd rather stick with cBPF >> > > until w

Re: [PATCH v3 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2018-02-16 Thread Andrew Lunn
On Fri, Feb 16, 2018 at 09:00:33AM -0800, Moritz Fischer wrote: > +#define NIXGE_MDIO_CLAUSE45 BIT(12) > +#define NIXGE_MDIO_CLAUSE22 0 > +#define NIXGE_MDIO_OP(n) (((n) & 0x3) << 10) > +#define NIXGE_MDIO_OP_ADDRESS0 > +#define NIXGE_MDIO_OP_WRITE BIT(0) > +#define NIXGE_MDIO_OP_REA

[RFC PATCH v3 3/3] virtio_net: Enable alternate datapath without creating an additional netdev

2018-02-16 Thread Sridhar Samudrala
This patch addresses the issues that were seen with the 3 netdev model by avoiding the creation of an additional netdev. Instead the bypass state information is tracked in the original netdev and a different set of ndo_ops and ethtool_ops are used when BACKUP feature is enabled. Signed-off-by: Sri

[RFC PATCH v3 1/3] virtio_net: Introduce VIRTIO_NET_F_BACKUP feature bit

2018-02-16 Thread Sridhar Samudrala
This feature bit can be used by hypervisor to indicate virtio_net device to act as a backup for another device with the same MAC address. VIRTIO_NET_F_BACKUP is defined as bit 62 as it is a device feature bit. Signed-off-by: Sridhar Samudrala --- drivers/net/virtio_net.c| 2 +- include/

[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available

2018-02-16 Thread Sridhar Samudrala
This patch enables virtio_net to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to enable only

[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-16 Thread Sridhar Samudrala
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some iss

[PATCH] net: dsa: mv88e6xxx: hwtstamp: remove unnecessary range checking tests

2018-02-16 Thread Gustavo A. R. Silva
_port_ is already known to be a valid index in the callers [1]. So these checks are unnecessary. [1] https://lkml.org/lkml/2018/2/16/469 Addresses-Coverity-ID: 1465287 Addresses-Coverity-ID: 1465291 Suggested-by: Richard Cochran Signed-off-by: Gustavo A. R. Silva --- drivers/net/dsa/mv88e6xxx/

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Holger Hoffstätte
On 02/16/18 18:25, Oleksandr Natalenko wrote: > So, going on with two real HW hosts. They are both running latest stock Arch > Linux kernel (4.15.3-1-ARCH, CONFIG_PREEMPT=y, CONFIG_HZ=1000) and are > interconnected with 1 Gbps link (via switch if that matters). Using iperf3, > running each test

Re: [PATCH v2] net: dsa: mv88e6xxx: hwtstamp: fix potential negative array index read

2018-02-16 Thread Gustavo A. R. Silva
On 02/16/2018 09:56 AM, Richard Cochran wrote: On Fri, Feb 16, 2018 at 07:48:46AM -0800, Richard Cochran wrote: On Thu, Feb 15, 2018 at 12:31:39PM -0600, Gustavo A. R. Silva wrote: _port_ is being used as index to array port_hwtstamp before verifying it is a non-negative number and a valid in

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi. On pátek 16. února 2018 17:25:58 CET Eric Dumazet wrote: > The way TCP pacing works, it defaults to internal pacing using a hint > stored in the socket. > > If you change the qdisc while flow is alive, result could be unexpected. I don't change a qdisc while flow is alive. Either the VM is c

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi. On pátek 16. února 2018 17:26:11 CET Holger Hoffstätte wrote: > These are very odd configurations. :) > Non-preempt/100 might well be too slow, whereas PREEMPT/1000 might simply > have too much overhead. Since the pacing is based on hrtimers, should HZ matter at all? Even if so, poor 1 Gbps

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi. On pátek 16. února 2018 17:33:48 CET Neal Cardwell wrote: > Thanks for the detailed report! Yes, this sounds like an issue in BBR. We > have not run into this one in our team, but we will try to work with you to > fix this. > > Would you be able to take a sender-side tcpdump trace of the slow

Re: [RFC net PATCH] virtio_net: disable XDP_REDIRECT in receive_mergeable() case

2018-02-16 Thread John Fastabend
On 02/16/2018 07:41 AM, Jesper Dangaard Brouer wrote: > On Fri, 16 Feb 2018 13:31:37 +0800 > Jason Wang wrote: > >> On 2018年02月16日 06:43, Jesper Dangaard Brouer wrote: >>> The virtio_net code have three different RX code-paths in receive_buf(). >>> Two of these code paths can handle XDP, but one

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Holger Hoffstätte
On 02/16/18 17:56, Neal Cardwell wrote: > On Fri, Feb 16, 2018 at 11:26 AM, Holger Hoffstätte > wrote: >> >> BBR in general will run with lower cwnd than e.g. Cubic or others. >> That's a feature and necessary for WAN transfers. > > Please note that there's no general rule about whether BBR will

[PATCH v3 1/2] dt-bindings: net: Add bindings for National Instruments XGE netdev

2018-02-16 Thread Moritz Fischer
This adds bindings for the NI XGE 1G/10G network device. Signed-off-by: Moritz Fischer --- Changes from v2: - Addressed Rob's comments w.r.t to IRQ names and typo Changes from v1: - Corrected from nixge -> nixge.txt --- Documentation/devicetree/bindings/net/nixge.txt | 32

[PATCH v3 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2018-02-16 Thread Moritz Fischer
Add support for the National Instruments XGE 1/10G network device. It uses the EEPROM on the board via NVMEM. Signed-off-by: Moritz Fischer --- Changes from v2: - Implement recv side NAPI - Improved error handling - Implemented C45 writes - Added ethtool callbacks & blink functionality - Improv

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi! On pátek 16. února 2018 17:45:56 CET Neal Cardwell wrote: > Eric raises a good question: bare metal vs VMs. > > Oleksandr, your first email mentioned KVM VMs and virtio NICs. Your > second e-mail did not seem to mention if those results were for bare > metal or a VM scenario: can you please c

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Neal Cardwell
On Fri, Feb 16, 2018 at 11:26 AM, Holger Hoffstätte wrote: > > BBR in general will run with lower cwnd than e.g. Cubic or others. > That's a feature and necessary for WAN transfers. Please note that there's no general rule about whether BBR will run with a lower or higher cwnd than CUBIC, Reno, o

Re: [PATCH iproute2-next v5 0/9] ipaddress: Make print_linkinfo_brief() static

2018-02-16 Thread Serhey Popovych
David Ahern wrote: > On 2/15/18 2:23 PM, Serhey Popovych wrote: >> With this series I propose to make print_linkinfo_brief() static in >> favor of print_linkinfo() as single point for linkinfo printing. >> > > ... > >> >> Thanks, >> Serhii >> >> Serhey Popovych (9): >> ipaddress: Abstract IFA_L

[PATCH][V2] net: dsa: mv88e6xxx: avoid unintended sign extension on a 16 bit shift

2018-02-16 Thread Colin King
From: Colin Ian King The shifting of timehi by 16 bits to the left will be promoted to a 32 bit signed int and then sign-extended to an u64. If the top bit of timehi is set then all then all the upper bits of ns end up as also being set because of the sign-extension. Fix this by making timehi and

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Colin Ian King
On 16/02/18 16:51, Andy Shevchenko wrote: > On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: >> From: Colin Ian King >> >> The checks to see if key->dst.s6_addr and key->src.s6_addr are null >> pointers are redundant because these are constant size arrays and >> so the checks always return true

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-16 Thread Daniel Borkmann
Hi Florian, thanks for your feedback! More inline: On 02/16/2018 03:57 PM, Florian Westphal wrote: > Daniel Borkmann wrote: >> This is a very rough and early proof of concept that implements bpfilter. > > [..] > >> Also, as a benefit from such design, we get BPF JIT compilation on x86_64, >> a

Re: [PATCH] i40evf: remove redundant array comparisons to 0 checks

2018-02-16 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 9:42 PM, Colin King wrote: > From: Colin Ian King > > The checks to see if key->dst.s6_addr and key->src.s6_addr are null > pointers are redundant because these are constant size arrays and > so the checks always return true. Fix this by removing the redundant > checks.

Re: Serious performance degradation in Linux 4.15

2018-02-16 Thread Peter Zijlstra
On Fri, Feb 16, 2018 at 02:38:39PM +, Matt Fleming wrote: > On Wed, 14 Feb, at 10:46:20PM, Matt Fleming wrote: > > Here's some more numbers. This is with RETPOLINE=y but you'll see it > > doesn't make much of a difference. Oh, this is also with powersave > > cpufreq governor. > > Feh, I was w

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Neal Cardwell
On Fri, Feb 16, 2018 at 11:43 AM, Eric Dumazet wrote: > > On Fri, Feb 16, 2018 at 8:33 AM, Neal Cardwell wrote: > > Oleksandr, > > > > Thanks for the detailed report! Yes, this sounds like an issue in BBR. We > > have not run into this one in our team, but we will try to work with you to > > fix

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
On Fri, Feb 16, 2018 at 8:33 AM, Neal Cardwell wrote: > Oleksandr, > > Thanks for the detailed report! Yes, this sounds like an issue in BBR. We > have not run into this one in our team, but we will try to work with you to > fix this. > > Would you be able to take a sender-side tcpdump trace of th

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Holger Hoffstätte
On 02/16/18 16:15, Oleksandr Natalenko wrote: > Hi, David, Eric, Neal et al. > > On čtvrtek 15. února 2018 21:42:26 CET Oleksandr Natalenko wrote: >> I've faced an issue with a limited TCP bandwidth between my laptop and a >> server in my 1 Gbps LAN while using BBR as a congestion control mechanis

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
On Fri, Feb 16, 2018 at 7:15 AM, Oleksandr Natalenko wrote: > Hi, David, Eric, Neal et al. > > On čtvrtek 15. února 2018 21:42:26 CET Oleksandr Natalenko wrote: >> I've faced an issue with a limited TCP bandwidth between my laptop and a >> server in my 1 Gbps LAN while using BBR as a congestion co

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Eric Dumazet
Lets CC BBR folks at Google, and remove the ones that probably have no idea. On Thu, 2018-02-15 at 21:42 +0100, Oleksandr Natalenko wrote: > Hello. > > I've faced an issue with a limited TCP bandwidth between my laptop and a > server in my 1 Gbps LAN while using BBR as a congestion control mec

Re: [PATCH iproute2-next v5 0/9] ipaddress: Make print_linkinfo_brief() static

2018-02-16 Thread David Ahern
On 2/15/18 2:23 PM, Serhey Popovych wrote: > With this series I propose to make print_linkinfo_brief() static in > favor of print_linkinfo() as single point for linkinfo printing. > ... > > Thanks, > Serhii > > Serhey Popovych (9): > ipaddress: Abstract IFA_LABEL matching code > ipaddress:

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-16 Thread Florian Westphal
Florian Westphal wrote: > Daniel Borkmann wrote: > Several questions spinning at the moment, I will probably come up with > more: ... and here there are some more ... One of the many pain points of xtables design is the assumption of 'used only by sysadmin'. This has not been true for a very l

[PATCH v2] ravb: add support for changing MTU

2018-02-16 Thread Niklas Söderlund
Allow for changing the MTU within the limit of the maximum size of a descriptor (2048 bytes). Add the callback to change MTU from user-space and take the configurable MTU into account when configuring the hardware. Signed-off-by: Niklas Söderlund --- drivers/net/ethernet/renesas/ravb.h | 1

Re: [PATCH v2] net: dsa: mv88e6xxx: hwtstamp: fix potential negative array index read

2018-02-16 Thread Richard Cochran
On Fri, Feb 16, 2018 at 07:48:46AM -0800, Richard Cochran wrote: > On Thu, Feb 15, 2018 at 12:31:39PM -0600, Gustavo A. R. Silva wrote: > > _port_ is being used as index to array port_hwtstamp before verifying > > it is a non-negative number and a valid index at line 209 and 258: > > > > if (port

Re: [PATCH v2] net: dsa: mv88e6xxx: hwtstamp: fix potential negative array index read

2018-02-16 Thread Andrew Lunn
On Fri, Feb 16, 2018 at 07:48:46AM -0800, Richard Cochran wrote: > On Thu, Feb 15, 2018 at 12:31:39PM -0600, Gustavo A. R. Silva wrote: > > _port_ is being used as index to array port_hwtstamp before verifying > > it is a non-negative number and a valid index at line 209 and 258: > > > > if (port

Re: [PATCH][next] net: dsa: mv88e6xxx: avoid unintended sign extension on a 16 bit shift

2018-02-16 Thread Richard Cochran
On Thu, Feb 15, 2018 at 09:27:57PM +0100, Andrew Lunn wrote: > Do you prefer this, or making timehi and timelo a u64? The latter. While you are at it, please move the definition of 'ns' to the start of the function. Thanks, Richard

Re: [RFC][PATCH bpf v2 1/2] bpf: allow 64-bit offsets for bpf function calls

2018-02-16 Thread Naveen N. Rao
Daniel Borkmann wrote: On 02/15/2018 05:25 PM, Daniel Borkmann wrote: On 02/13/2018 05:05 AM, Sandipan Das wrote: The imm field of a bpf_insn is a signed 32-bit integer. For JIT-ed bpf-to-bpf function calls, it stores the offset from __bpf_call_base to the start of the callee function. For som

Re: [PATCH v2] net: dsa: mv88e6xxx: hwtstamp: fix potential negative array index read

2018-02-16 Thread Richard Cochran
On Thu, Feb 15, 2018 at 12:31:39PM -0600, Gustavo A. R. Silva wrote: > _port_ is being used as index to array port_hwtstamp before verifying > it is a non-negative number and a valid index at line 209 and 258: > > if (port < 0 || port >= mv88e6xxx_num_ports(chip)) > > Fix this by checking _port_

Re: [PATCH] inet: don't call skb_orphan if tproxy happens in layer 2

2018-02-16 Thread Gregory Vander Schueren
Hi Florian & Pablo, Thank your very much for your quick feedback. On 02/16/2018 12:28 PM, Pablo Neira Ayuso wrote: On Fri, Feb 16, 2018 at 12:07:06PM +0100, Florian Westphal wrote: Gregory Vander Schueren wrote: [ cc netdev ] If sysctl bridge-nf-call-iptables is enabled, iptables chains ar

Re: [RFC net PATCH] virtio_net: disable XDP_REDIRECT in receive_mergeable() case

2018-02-16 Thread Jesper Dangaard Brouer
On Fri, 16 Feb 2018 13:31:37 +0800 Jason Wang wrote: > On 2018年02月16日 06:43, Jesper Dangaard Brouer wrote: > > The virtio_net code have three different RX code-paths in receive_buf(). > > Two of these code paths can handle XDP, but one of them is broken for > > at least XDP_REDIRECT. > > > > Func

Re: TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-16 Thread Oleksandr Natalenko
Hi, David, Eric, Neal et al. On čtvrtek 15. února 2018 21:42:26 CET Oleksandr Natalenko wrote: > I've faced an issue with a limited TCP bandwidth between my laptop and a > server in my 1 Gbps LAN while using BBR as a congestion control mechanism. > To verify my observations, I've set up 2 KVM VMs

  1   2   >