[PATCH] samples/bpf: Fix cross compiler error with bpf sample

2017-08-03 Thread Joel Fernandes
When cross-compiling the bpf sample map_perf_test for aarch64, I find that __NR_getpgrp is undefined. This causes build errors. Fix it by allowing the deprecated syscall in the sample. Signed-off-by: Joel Fernandes --- samples/bpf/map_perf_test_user.c | 2 ++ 1 file changed,

Re: [PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Eric Dumazet
On Thu, 2017-08-03 at 21:33 -0700, Florian Fainelli wrote: > During testing with a background iperf pushing 1Gbit/sec worth of > traffic and having both ifconfig and ethtool collect statistics, we > could see quite frequent deadlocks. Convert the often accessed DSA slave > network devices

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-08-03 Thread Jiri Pirko
Fri, Aug 04, 2017 at 12:39:02AM CEST, arka...@mellanox.com wrote: > >[...] > >>> Now we have the "offload" read only flag, which is good to inform about >>> a successfully programmed hardware, but adds another level of complexity >>> to understand the interaction with the hardware. >>> >>> I think

[net-next PATCH] net: comment fixes against BPF devmap helper calls

2017-08-03 Thread John Fastabend
Update BPF comments to accurately reflect XDP usage. Fixes: 97f91a7cf04ff ("bpf: add bpf_redirect_map helper routine") Reported-by: Alexei Starovoitov Signed-off-by: John Fastabend --- include/uapi/linux/bpf.h | 16 +++- 1 file changed,

Re: [RFC PATCH 4/6] net: sockmap with sk redirect support

2017-08-03 Thread John Fastabend
On 08/03/2017 09:22 PM, Tom Herbert wrote: > On Thu, Aug 3, 2017 at 4:37 PM, John Fastabend > wrote: >> Recently we added a new map type called dev map used to forward XDP >> packets between ports (6093ec2dc313). This patches introduces a >> similar notion for sockets.

Re: [RFC PATCH 4/6] net: sockmap with sk redirect support

2017-08-03 Thread John Fastabend
On 08/03/2017 09:22 PM, Tom Herbert wrote: > On Thu, Aug 3, 2017 at 4:37 PM, John Fastabend > wrote: >> Recently we added a new map type called dev map used to forward XDP >> packets between ports (6093ec2dc313). This patches introduces a >> similar notion for sockets.

Re: [PATCH net-next v4 0/9] socket sendmsg MSG_ZEROCOPY

2017-08-03 Thread David Miller
From: Willem de Bruijn Date: Thu, 3 Aug 2017 16:29:36 -0400 > Introduce zerocopy socket send flag MSG_ZEROCOPY. This extends the > shared page support (SKBTX_SHARED_FRAG) from sendpage to sendmsg. > Implement the feature for TCP initially, as large writes

[PATCH net-next] net: dsa: User per-cpu 64-bit statistics

2017-08-03 Thread Florian Fainelli
During testing with a background iperf pushing 1Gbit/sec worth of traffic and having both ifconfig and ethtool collect statistics, we could see quite frequent deadlocks. Convert the often accessed DSA slave network devices statistics to per-cpu 64-bit statistics to remove these deadlocks and

Re: [RFC PATCH 4/6] net: sockmap with sk redirect support

2017-08-03 Thread Tom Herbert
On Thu, Aug 3, 2017 at 4:37 PM, John Fastabend wrote: > Recently we added a new map type called dev map used to forward XDP > packets between ports (6093ec2dc313). This patches introduces a > similar notion for sockets. > > A sockmap allows users to add participating

RE: [PATCH V6 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver

2017-08-03 Thread Salil Mehta
Thanks a ton, Dave! > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, August 03, 2017 11:10 PM > To: Salil Mehta > Cc: Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org;

[PATCH 2/2 v2 net-next] tcp: consolidate congestion control undo functions

2017-08-03 Thread Yuchung Cheng
Most TCP congestion controls are using identical logic to undo cwnd except BBR. This patch consolidates these similar functions to the one used currently by Reno and others. Suggested-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Neal

[PATCH 1/2 v2 net-next] tcp: fix cwnd undo in Reno and HTCP congestion controls

2017-08-03 Thread Yuchung Cheng
Using ssthresh to revert cwnd is less reliable when ssthresh is bounded to 2 packets. This patch uses an existing variable in TCP "prior_cwnd" that snapshots the cwnd right before entering fast recovery and RTO recovery in Reno. This fixes the issue discussed in netdev thread: "A buggy behavior

[PATCH 0/2 v2 net-next] tcp cwnd undo refactor

2017-08-03 Thread Yuchung Cheng
This patch series consolidate similar cwnd undo functions implemented by various congestion control by using existing tcp socket state variable. The first patch fixes a corner case in of cwnd undo in Reno and HTCP. Since the bug has existed for many years and is very minor, we consider this patch

Re: [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-03 Thread Y Song
On Thu, Aug 3, 2017 at 7:08 PM, Alexei Starovoitov wrote: > On 8/3/17 6:29 AM, Yonghong Song wrote: >> >> @@ -578,8 +596,9 @@ static void perf_syscall_enter(void *ignore, struct >> pt_regs *regs, long id) >> if (!sys_data) >> return; >> >> + prog =

Re: Gift-

2017-08-03 Thread Mayrhofer Family
Good Day, My wife and I have awarded you with a donation of $ 1,000,000.00 Dollars from part of our Jackpot Lottery of 50 Million Dollars, respond with your details for claims. We await your earliest response and God Bless you. Friedrich And Annand Mayrhofer. --- This email has been checked

Re: [PATCH net-next v3 1/2] bpf: add support for sys_enter_* and sys_exit_* tracepoints

2017-08-03 Thread Alexei Starovoitov
On 8/3/17 6:29 AM, Yonghong Song wrote: @@ -578,8 +596,9 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id) if (!sys_data) return; + prog = READ_ONCE(sys_data->enter_event->prog); head =

Re: [PATCH 2/2 net-next] tcp: consolidate congestion control undo functions

2017-08-03 Thread kbuild test robot
Hi Yuchung, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Yuchung-Cheng/tcp-fix-cwnd-undo-in-Reno-and-HTCP-congestion-controls/20170804-085255 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce:

[PATCH 1/2 net-next] tcp: fix cwnd undo in Reno and HTCP congestion controls

2017-08-03 Thread Yuchung Cheng
Using ssthresh to revert cwnd is less reliable when ssthresh is bounded to 2 packets. This patch uses an existing variable in TCP "prior_cwnd" that snapshots the cwnd right before entering fast recovery and RTO recovery in Reno. This fixes the issue discussed in netdev thread: "A buggy behavior

[PATCH 2/2 net-next] tcp: consolidate congestion control undo functions

2017-08-03 Thread Yuchung Cheng
Most TCP congestion controls are using identical logic to undo cwnd except BBR. This patch consolidates these similar functions to the one used currently by Reno and others. Suggested-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Neal

[PATCH net 0/1] netvsc: race on sub channel open

2017-08-03 Thread Stephen Hemminger
Found this while testing mtu, queue and buffer size changes in 4.13, but the problem goes back much further. The addition of NAPI makes the race into a crash. Before that there was just a risk of sending on an uninitialized channel. Stephen Hemminger (1): netvsc: fix race on sub channel

[PATCH net 1/1] netvsc: fix race on sub channel creation

2017-08-03 Thread Stephen Hemminger
The existing sub channel code did not wait for all the sub-channels to completely initialize. This could lead to race causing crash in napi_netif_del() from bad list. The existing code would send an init message, then wait only for the initial response that the init message was received. It

[PATCH] MIPS: Add missing file for eBPF JIT.

2017-08-03 Thread David Daney
Inexplicably, commit f381bf6d82f0 ("MIPS: Add support for eBPF JIT.") lost a file somewhere on its path to Linus' tree. Add back the missing ebpf_jit.c so that we can build with CONFIG_BPF_JIT selected. This version of ebpf_jit.c is identical to the original except for two minor change need to

Re: [PATCH v7 net-next] net: systemport: Support 64bit statistics

2017-08-03 Thread David Miller
From: Florian Fainelli Date: Thu, 3 Aug 2017 16:20:04 -0700 > On 08/03/2017 04:16 PM, Stephen Hemminger wrote: >> On Fri, 4 Aug 2017 00:07:45 +0100 >> "Jianming.qiao" wrote: >> >>> static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] =

Re: [PATCH v3 net-next 4/4] ulp: Documention for ULP infrastructure

2017-08-03 Thread Mat Martineau
On Thu, 3 Aug 2017, Tom Herbert wrote: Add a doc in Documentation/networking Signed-off-by: Tom Herbert --- Documentation/networking/ulp.txt | 82 1 file changed, 82 insertions(+) create mode 100644 Documentation/networking/ulp.txt

Re: Gift-

2017-08-03 Thread Mayrhofer Family
Good Day, My wife and I have awarded you with a donation of $ 1,000,000.00 Dollars from part of our Jackpot Lottery of 50 Million Dollars, respond with your details for claims. We await your earliest response and God Bless you. Friedrich And Annand Mayrhofer. --- This email has been checked

[RFC PATCH 6/6] net: sockmap sample program

2017-08-03 Thread John Fastabend
This program binds a program to a cgroup and then matches hard coded IP addresses and adds these to a sockmap. This will receive messages from the backend and send them to the client. client:X <---> frontend:1 client:X <---> backend:80 To keep things simple this is only designed for

[RFC PATCH 3/6] net: fixes for skb_send_sock

2017-08-03 Thread John Fastabend
A couple fixes to new skb_send_sock infrastructure. However, no users currently exist for this code (adding user in next handful of patches) so it should not be possible to trigger a panic with in-kernel code. Fixes: 306b13eb3cf9 ("proto_ops: Add locked held versions of sendmsg and sendpage")

[RFC PATCH 5/6] net: bpf, add skb to sk lookup routines

2017-08-03 Thread John Fastabend
Add some useful skb to sk routines to fine ports on a connected socket. This is for testing, we may prefer to put sk in bpf sk_buff representation and access these fields directly. Similar to sock ops ctx access. Signed-off-by: John Fastabend ---

[RFC PATCH 4/6] net: sockmap with sk redirect support

2017-08-03 Thread John Fastabend
Recently we added a new map type called dev map used to forward XDP packets between ports (6093ec2dc313). This patches introduces a similar notion for sockets. A sockmap allows users to add participating sockets to a map. When sockets are added to the map enough context is stored with the map

[RFC PATCH 2/6] net: add sendmsg_locked and sendpage_locked to af_inet6

2017-08-03 Thread John Fastabend
To complete the sendmsg_locked and sendpage_locked implementation add the hooks for af_inet6 as well. Signed-off-by: John Fastabend --- net/ipv6/af_inet6.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index

[RFC PATCH 1/6] net: early init support for strparser

2017-08-03 Thread John Fastabend
It is useful to allow strparser to init sockets before the read_sock callback has been established. Signed-off-by: John Fastabend --- net/strparser/strparser.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/strparser/strparser.c

[RFC PATCH 0/6] BPF socket redirect

2017-08-03 Thread John Fastabend
This series implements socket redirect for BPF using XDP redirect as a model. The user flow and internals are similar in many ways. First we add a new map type called, sockmap. A sockmap holds references to sock structs. Next a bpf helper call is added to support redirect between sockets,

Re: [PATCH 3/5] net: stmmac: Add Adaptrum Anarion GMAC glue layer

2017-08-03 Thread Rob Herring
On Fri, Jul 28, 2017 at 03:07:03PM -0700, Alexandru Gagniuc wrote: > Before the GMAC on the Anarion chip can be used, the PHY interface > selection must be configured with the DWMAC block in reset. > > This layer covers a block containing only two registers. Although it > is possible to model

Re: [PATCH v3 net-next 2/4] sock: ULP infrastructure

2017-08-03 Thread Mat Martineau
On Thu, 3 Aug 2017, Tom Herbert wrote: Generalize the TCP ULP infrastructure recently introduced to support kTLS. This adds a SO_ULP socket option and creates new fields in sock structure for ULP ops and ULP data. Also, the interface allows additional per ULP parameters to be set so that a ULP

Re: [PATCH 3/5] net: stmmac: Add Adaptrum Anarion GMAC glue layer

2017-08-03 Thread Rob Herring
On Mon, Jul 31, 2017 at 08:11:00AM -0700, Alex wrote: > Hi David, > > On 07/28/2017 07:01 PM, David Miller wrote: > > From: Alexandru Gagniuc > > Date: Fri, 28 Jul 2017 15:07:03 -0700 > > > > > Before the GMAC on the Anarion chip can be used, the PHY interface > > >

Re: [PATCH v7 net-next] net: systemport: Support 64bit statistics

2017-08-03 Thread Florian Fainelli
On 08/03/2017 04:16 PM, Stephen Hemminger wrote: > On Fri, 4 Aug 2017 00:07:45 +0100 > "Jianming.qiao" wrote: > >> static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = { >> /* general stats */ >> -STAT_NETDEV(rx_packets), >> -

Re: [PATCH v7 net-next] net: systemport: Support 64bit statistics

2017-08-03 Thread Stephen Hemminger
On Fri, 4 Aug 2017 00:07:45 +0100 "Jianming.qiao" wrote: > static const struct bcm_sysport_stats bcm_sysport_gstrings_stats[] = { > /* general stats */ > - STAT_NETDEV(rx_packets), > - STAT_NETDEV(tx_packets), > - STAT_NETDEV(rx_bytes), > -

[PATCH v7 net-next] net: systemport: Support 64bit statistics

2017-08-03 Thread Jianming.qiao
When using Broadcom Systemport device in 32bit Platform, ifconfig can only report up to 4G tx,rx status, which will be wrapped to 0 when the number of incoming or outgoing packets exceeds 4G, only taking around 2 hours in busy network environment (such as streaming). Therefore, it makes hard for

Re: [PATCH iproute2] netns: make /var/run/netns bind-mount recursive

2017-08-03 Thread Stephen Hemminger
On Tue, 1 Aug 2017 17:46:09 +0200 Casey Callendrello wrote: > When ip netns {add|delete} is first run, it bind-mounts /var/run/netns > on top of itself, then marks it as shared. However, if there are already > bind-mounts in the directory from other tools, these

Re: [iproute PATCH] tc-simple: Fix documentation

2017-08-03 Thread Stephen Hemminger
On Thu, 3 Aug 2017 17:00:51 +0200 Phil Sutter wrote: > - CONTROL has to come last, otherwise 'index' applies to gact and not > simple itself. > - Man page wasn't updated to reflect syntax changes. > > Signed-off-by: Phil Sutter Applid, thanks Phil

Re: [iproute PATCH] Really fix get_addr() and get_prefix() error messages

2017-08-03 Thread Stephen Hemminger
On Tue, 1 Aug 2017 18:36:11 +0200 Phil Sutter wrote: > Both functions take the desired address family as a parameter. So using > that to notify the user what address family was expected is correct, > unlike using dst->family which will tell the user only what address > family was

Re: [iproute PATCH] bpf: Make bytecode-file reading a little more robust

2017-08-03 Thread Stephen Hemminger
On Wed, 2 Aug 2017 14:57:56 +0200 Phil Sutter wrote: > bpf_parse_string() will now correctly handle: > > - Extraneous whitespace, > - OPs on multiple lines and > - overlong file names. > > The added feature of allowing to have OPs on multiple lines (like e.g. > tcpdump prints

Re: [patch net-next 00/21] mlxsw: Support for IPv6 UC router

2017-08-03 Thread David Ahern
On 8/3/17 4:41 PM, David Miller wrote: > But unlike the percpu flag, don't we want to somehow propagate offload > state to the user? It's a per nexthop flag. For IPv4 it is tracked in fib_nh.nh_flags. Perhaps it is time for rt6_info to have nh_flags as well. > > I'm sure whatever we decide Jiri

Re: [PATCH v4] ss: Enclose IPv6 address in brackets

2017-08-03 Thread Stephen Hemminger
On Tue, 1 Aug 2017 18:54:33 +0200 Florian Lehner wrote: > - if (a->family == AF_INET) { > - if (a->data[0] == 0) { > + if (a->data[0] == 0) { > buf[0] = '*'; > buf[1] = 0; This won't work right with IPv6 you need

Re: [iproute PATCH] iplink: Notify user if EEXIST error might be spurious

2017-08-03 Thread Stephen Hemminger
On Tue, 1 Aug 2017 19:27:47 +0200 Phil Sutter wrote: > Back in the days when RTM_NEWLINK wasn't yet implemented, people had to > rely upon kernel modules to create (virtual) interfaces for them. The > number of those was usually defined via module parameter, and a sane > default

Re: [patch net-next 00/21] mlxsw: Support for IPv6 UC router

2017-08-03 Thread David Miller
From: David Ahern Date: Thu, 3 Aug 2017 16:39:54 -0600 > On 8/3/17 4:36 PM, David Miller wrote: >> From: Jiri Pirko >> Date: Thu, 3 Aug 2017 13:28:10 +0200 >> >>> This set adds support for IPv6 unicast routes offload. >> >> Series applied, thanks. >> >

Re: [patch net-next 00/21] mlxsw: Support for IPv6 UC router

2017-08-03 Thread David Ahern
On 8/3/17 4:36 PM, David Miller wrote: > From: Jiri Pirko > Date: Thu, 3 Aug 2017 13:28:10 +0200 > >> This set adds support for IPv6 unicast routes offload. > > Series applied, thanks. > I take it you disagree with my comment on patch 10 about the RTF_OFFLOAD flag? that is

Re: [PATCH net-next v2 00/13] Change DSA's FDB API and perform switchdev cleanup

2017-08-03 Thread Arkadi Sharshevsky
[...] >> Now we have the "offload" read only flag, which is good to inform about >> a successfully programmed hardware, but adds another level of complexity >> to understand the interaction with the hardware. >> >> I think iproute2 is getting more and more confusing. From what I >> understood,

Re: [PATCH v2 net 0/3] tcp: fix xmit timer rearming to avoid stalls

2017-08-03 Thread David Miller
From: Neal Cardwell Date: Thu, 3 Aug 2017 09:19:51 -0400 > This patch series is a bug fix for a TCP loss recovery performance bug > reported independently in recent netdev threads: > > (i) July 26, 2017: netdev thread "TCP fast retransmit issues" > (ii) July 26,

Re: [patch net-next 00/21] mlxsw: Support for IPv6 UC router

2017-08-03 Thread David Miller
From: Jiri Pirko Date: Thu, 3 Aug 2017 13:28:10 +0200 > This set adds support for IPv6 unicast routes offload. Series applied, thanks.

Re: [PATCH V3 net-next 03/21] net-next/hinic: Initialize api cmd resources

2017-08-03 Thread David Miller
From: Aviad Krawczyk Date: Thu, 3 Aug 2017 17:54:09 +0800 > +static int alloc_cmd_buf(struct hinic_api_cmd_chain *chain, > + struct hinic_api_cmd_cell *cell, int cell_idx) > +{ > + struct hinic_hwif *hwif = chain->hwif; > + struct pci_dev

Re: [PATCH V3 net-next 02/21] net-next/hinic: Initialize hw device components

2017-08-03 Thread David Miller
From: Aviad Krawczyk Date: Thu, 3 Aug 2017 17:54:08 +0800 > +static int get_capability(struct hinic_hwdev *hwdev, > + struct hinic_dev_cap *dev_cap) > +{ > + struct hinic_hwif *hwif = hwdev->hwif; > + struct hinic_cap *nic_cap = >nic_cap;

Re: [PATCH net-next v2 0/7] net: mvpp2: add TX interrupts support

2017-08-03 Thread David Miller
From: Thomas Petazzoni Date: Thu, 3 Aug 2017 10:41:54 +0200 > So far, the mvpp2 driver was using an hrtimer to handle TX > completion. This patch series adds support for using TX interrupts > (for each CPU) on PPv2.2, the variant of the IP used on Marvell

Re: [PATCH] PCI: Update ACS quirk for more Intel 10G NICs

2017-08-03 Thread Alex Williamson
On Thu, 3 Aug 2017 16:49:11 -0500 Bjorn Helgaas wrote: > On Thu, Jul 20, 2017 at 02:41:01PM -0700, Roland Dreier wrote: > > From: Roland Dreier > > > > Add one more variant of the 82599 plus the device IDs for X540 and X550 > > variants. Intel has

Re: [PATCH] net: arc_emac: Add support for ndo_do_ioctl net_device_ops operation

2017-08-03 Thread David Miller
From: Romain Perier Date: Thu, 3 Aug 2017 09:49:03 +0200 > This operation is required for handling ioctl commands like SIOCGMIIREG, > when debugging MDIO registers from userspace. > > This commit adds support for this operation. > > Signed-off-by: Romain Perier

Re: [PATCH net] ipv6: set rt6i_protocol properly in the route when it is installed

2017-08-03 Thread David Miller
From: Xin Long Date: Thu, 3 Aug 2017 14:13:46 +0800 > After commit c2ed1880fd61 ("net: ipv6: check route protocol when > deleting routes"), ipv6 route checks rt protocol when trying to > remove a rt entry. > > It introduced a side effect causing 'ip -6 route flush cache'

Re: [PATCH V6 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver

2017-08-03 Thread David Miller
From: Salil Mehta Date: Wed, 2 Aug 2017 16:59:44 +0100 > This patch-set contains the support of the HNS3 (Hisilicon Network Subsystem > 3) > Ethernet driver for hip08 family of SoCs and future upcoming SoCs. ... Series applied, thanks.

[PATCH net-next] liquidio: moved console_bitmask module param to lio_main.c

2017-08-03 Thread Felix Manlunas
From: Intiyaz Basha Moving PF module param console_bitmask to lio_main.c for consistency. Signed-off-by: Intiyaz Basha Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 15

Re: [PATCH] PCI: Update ACS quirk for more Intel 10G NICs

2017-08-03 Thread Bjorn Helgaas
On Thu, Jul 20, 2017 at 02:41:01PM -0700, Roland Dreier wrote: > From: Roland Dreier > > Add one more variant of the 82599 plus the device IDs for X540 and X550 > variants. Intel has confirmed that none of these devices does peer-to-peer > between functions. The X540

Re: [PATCH net-next 1/3] proto_ops: Add locked held versions of sendmsg and sendpage

2017-08-03 Thread Tom Herbert
On Thu, Aug 3, 2017 at 1:21 PM, John Fastabend wrote: > On 07/28/2017 04:22 PM, Tom Herbert wrote: >> Add new proto_ops sendmsg_locked and sendpage_locked that can be >> called when the socket lock is already held. Correspondingly, add >> kernel_sendmsg_locked and

[PATCH net v2] net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets

2017-08-03 Thread Davide Caratti
if the NIC fails to validate the checksum on TCP/UDP, and validation of IP checksum is successful, the driver subtracts the pseudo-header checksum from the value obtained by the hardware and sets CHECKSUM_COMPLETE. Don't do that if protocol is IPPROTO_SCTP, otherwise CRC32c validation fails. V2:

[PATCH net-next v4 0/9] socket sendmsg MSG_ZEROCOPY

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Introduce zerocopy socket send flag MSG_ZEROCOPY. This extends the shared page support (SKBTX_SHARED_FRAG) from sendpage to sendmsg. Implement the feature for TCP initially, as large writes benefit most. On a send call with MSG_ZEROCOPY, the kernel

[PATCH net-next v4 3/9] sock: add MSG_ZEROCOPY

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn The kernel supports zerocopy sendmsg in virtio and tap. Expand the infrastructure to support other socket types. Introduce a completion notification channel over the socket error queue. Notifications are returned with ee_origin SO_EE_ORIGIN_ZEROCOPY.

[PATCH net-next v4 4/9] sock: add SOCK_ZEROCOPY sockopt

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn The send call ignores unknown flags. Legacy applications may already unwittingly pass MSG_ZEROCOPY. Continue to ignore this flag unless a socket opts in to zerocopy. Introduce socket option SO_ZEROCOPY to enable MSG_ZEROCOPY processing. Processes can

[PATCH net-next v4 1/9] sock: allocate skbs from optmem

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Add sock_omalloc and sock_ofree to be able to allocate control skbs, for instance for looping errors onto sk_error_queue. The transmit budget (sk_wmem_alloc) is involved in transmit skb shaping, most notably in TCP Small Queues. Using this budget for

[PATCH net-next v4 8/9] tcp: enable MSG_ZEROCOPY

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Enable support for MSG_ZEROCOPY to the TCP stack. TSO and GSO are both supported. Only data sent to remote destinations is sent without copying. Packets looped onto a local destination have their payload copied to avoid unbounded latency. Tested: A

[PATCH net-next v4 9/9] test: add msg_zerocopy test

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Introduce regression test for msg_zerocopy feature. Send traffic from one process to another with and without zerocopy. Evaluate tcp, udp, raw and packet sockets, including variants - udp: corking and corking with mixed copy/zerocopy calls - raw: with

[PATCH net-next v4 2/9] sock: skb_copy_ubufs support for compound pages

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Refine skb_copy_ubufs to support compound pages. With upcoming TCP zerocopy sendmsg, such fragments may appear. The existing code replaces each page one for one. Splitting each compound page into an independent number of regular pages can result in

[PATCH net-next v4 7/9] sock: ulimit on MSG_ZEROCOPY pages

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Bound the number of pages that a user may pin. Follow the lead of perf tools to maintain a per-user bound on memory locked pages commit 789f90fcf6b0 ("perf_counter: per user mlock gift") Signed-off-by: Willem de Bruijn ---

[PATCH net-next v4 5/9] sock: enable MSG_ZEROCOPY

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn Prepare the datapath for refcounted ubuf_info. Clone ubuf_info with skb_zerocopy_clone() wherever needed due to skb split, merge, resize or clone. Split skb_orphan_frags into two variants. The split, merge, .. paths support reference counted zerocopy

[PATCH net-next v4 6/9] sock: MSG_ZEROCOPY notification coalescing

2017-08-03 Thread Willem de Bruijn
From: Willem de Bruijn In the simple case, each sendmsg() call generates data and eventually a zerocopy ready notification N, where N indicates the Nth successful invocation of sendmsg() with the MSG_ZEROCOPY flag on this socket. TCP and corked sockets can cause send() calls

Re: [RFC] iproute: Add support for extended ack to rtnl_talk

2017-08-03 Thread David Ahern
On 5/18/17 10:24 PM, David Ahern wrote: > On 5/18/17 3:02 AM, Daniel Borkmann wrote: >> So effectively this means libmnl has to be used for new stuff, noone >> has time to do the work to convert the existing tooling over (which >> by itself might be a challenge in testing everything to make sure

Re: [PATCH v3 net-next 5/5] net: dsa: lan9303: refactor lan9303_get_ethtool_stats

2017-08-03 Thread Egil Hjelmeland
Den 03. aug. 2017 20:04, skrev Florian Fainelli: On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: In lan9303_get_ethtool_stats: Get rid of 0x400 constant magic by using new lan9303_read_switch_reg() inside loop. Reduced scope of two variables. Signed-off-by: Egil Hjelmeland

Re: [PATCH net-next 1/3] proto_ops: Add locked held versions of sendmsg and sendpage

2017-08-03 Thread John Fastabend
On 07/28/2017 04:22 PM, Tom Herbert wrote: > Add new proto_ops sendmsg_locked and sendpage_locked that can be > called when the socket lock is already held. Correspondingly, add > kernel_sendmsg_locked and kernel_sendpage_locked as front end > functions. > > These functions will be used in zero

Re: [PATCH v3 net-next 3/5] net: dsa: lan9303: Simplify lan9303_xxx_packet_processing() usage

2017-08-03 Thread Egil Hjelmeland
Den 03. aug. 2017 20:06, skrev Florian Fainelli: On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: Simplify usage of lan9303_enable_packet_processing, lan9303_disable_packet_processing() Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli

[PATCH net-next] liquidio: add missing strings in oct_dev_state_str array

2017-08-03 Thread Felix Manlunas
From: Intiyaz Basha There's supposed to be a one-to-one correspondence between the 18 macros that #define the OCT_DEV states (in octeon_device.h) and the strings in the oct_dev_state_str array, but there are only 14 strings in the array. Add the missing strings (so

Re: [PATCH net-next 2/3] skbuff: Function to send an skbuf on a socket

2017-08-03 Thread John Fastabend
On 07/28/2017 04:22 PM, Tom Herbert wrote: > Add skb_send_sock to send an skbuff on a socket within the kernel. > Arguments include an offset so that an skbuf might be sent in mulitple > calls (e.g. send buffer limit is hit). > > Signed-off-by: Tom Herbert > --- [...] >

Re: [PATCH net-next 1/3] proto_ops: Add locked held versions of sendmsg and sendpage

2017-08-03 Thread John Fastabend
On 07/28/2017 04:22 PM, Tom Herbert wrote: > Add new proto_ops sendmsg_locked and sendpage_locked that can be > called when the socket lock is already held. Correspondingly, add > kernel_sendmsg_locked and kernel_sendpage_locked as front end > functions. > > These functions will be used in zero

Re: [PATCH net-next] net: dsa: Add support for 64-bit statistics

2017-08-03 Thread Florian Fainelli
On 08/03/2017 11:11 AM, Andrew Lunn wrote: > On Thu, Aug 03, 2017 at 10:30:56AM -0700, Florian Fainelli wrote: >> On 08/02/2017 04:49 PM, David Miller wrote: >>> From: Florian Fainelli >>> Date: Tue, 1 Aug 2017 15:00:36 -0700 >>> DSA slave network devices maintain a

[PATCH v3 net-next 2/4] sock: ULP infrastructure

2017-08-03 Thread Tom Herbert
Generalize the TCP ULP infrastructure recently introduced to support kTLS. This adds a SO_ULP socket option and creates new fields in sock structure for ULP ops and ULP data. Also, the interface allows additional per ULP parameters to be set so that a ULP can be pushed and operations started in

[PATCH v3 net-next 4/4] ulp: Documention for ULP infrastructure

2017-08-03 Thread Tom Herbert
Add a doc in Documentation/networking Signed-off-by: Tom Herbert --- Documentation/networking/ulp.txt | 82 1 file changed, 82 insertions(+) create mode 100644 Documentation/networking/ulp.txt diff --git

[PATCH v3 net-next 1/4] inet: include net/sock.h in inet_common.h

2017-08-03 Thread Tom Herbert
inet_common.h has a dependency on sock.h so it should include that. Signed-off-by: Tom Herbert --- include/net/inet_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/inet_common.h b/include/net/inet_common.h index f39ae697347f..df0119a317aa 100644

[PATCH v3 net-next 3/4] tcp: Adjust TCP ULP to defer to sockets ULP

2017-08-03 Thread Tom Herbert
Fix TCP and TLS to use the newer ULP infrastructure in sockets. Tested-by: Dave Watson Signed-off-by: Tom Herbert --- Documentation/networking/tls.txt | 6 +- include/net/inet_connection_sock.h | 4 -- include/net/tcp.h | 25

[PATCH v3 net-next 0/4] ulp: Generalize ULP infrastructure

2017-08-03 Thread Tom Herbert
Generalize the ULP infrastructure that was recently introduced to support kTLS. This adds a SO_ULP socket option and creates new fields in sock structure for ULP ops and ULP data. Also, the interface allows additional per ULP parameters to be set so that a ULP can be pushed and operations started

Re: [PATCH 00/27] ip: add -json support to 'ip link show'

2017-08-03 Thread Julien Fortin
On Thu, Aug 3, 2017 at 7:08 PM, Oliver Hartkopp wrote: > Hi Julien, > > On 08/03/2017 05:54 PM, Julien Fortin wrote: >> >> From: Julien Fortin > > > what about > > link_veth.c > iplink_vcan.c > iplink_vxcan.c > > ?? Hello Oliver, None of

Re: [PATCH net-next] net: dsa: Add support for 64-bit statistics

2017-08-03 Thread Andrew Lunn
On Thu, Aug 03, 2017 at 10:30:56AM -0700, Florian Fainelli wrote: > On 08/02/2017 04:49 PM, David Miller wrote: > > From: Florian Fainelli > > Date: Tue, 1 Aug 2017 15:00:36 -0700 > > > >> DSA slave network devices maintain a pair of bytes and packets counters > >> for

Re: [PATCH RFC 00/13] phylink and sfp support

2017-08-03 Thread Florian Fainelli
On 08/01/2017 07:39 AM, Andrew Lunn wrote: > On Tue, Jul 25, 2017 at 03:01:39PM +0100, Russell King - ARM Linux wrote: >> Hi, >> >> This patch series introduces generic support for SFP sockets found on >> various Marvell based platforms. The idea here is to provide common >> SFP socket support

Re: [PATCH v3 net-next 1/5] net: dsa: lan9303: Change lan9303_xxx_packet_processing() port param.

2017-08-03 Thread Florian Fainelli
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: > lan9303_enable_packet_processing, lan9303_disable_packet_processing() > Pass port number (0,1,2) as parameter instead of port offset. > Because other functions in the module pass port numbers. > And to enable simplifications in following patch. > >

Re: [PATCH v3 net-next 4/5] net: dsa: lan9303: Rename lan9303_xxx_packet_processing()

2017-08-03 Thread Florian Fainelli
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: > The lan9303_enable_packet_processing, lan9303_disable_packet_processing > functions operate on port, so the names should reflect that. > And to align with lan9303_disable_processing(), rename: > > lan9303_enable_packet_processing ->

STABLE: net: cdc_mbim: apply "NDP to end" quirk to HP lt4132

2017-08-03 Thread Aurimas FiĊĦeras
Please backport the upstream patch to the stable trees 4.4.x and 4.9.y: a68491f895a937778bb25b0795830797239de31f net: cdc_mbim: apply "NDP to end" quirk to HP lt4132 Without this patch HP lt4132 LTE/HSPA+ 4G Module (03f0:a31d) is useless. Ubuntu bug report:

Re: [PATCH v3 net-next 3/5] net: dsa: lan9303: Simplify lan9303_xxx_packet_processing() usage

2017-08-03 Thread Florian Fainelli
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: > Simplify usage of lan9303_enable_packet_processing, > lan9303_disable_packet_processing() > > Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli took a little while to figure out that

Re: [PATCH v3 net-next 5/5] net: dsa: lan9303: refactor lan9303_get_ethtool_stats

2017-08-03 Thread Florian Fainelli
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: > In lan9303_get_ethtool_stats: Get rid of 0x400 constant magic > by using new lan9303_read_switch_reg() inside loop. > Reduced scope of two variables. > > Signed-off-by: Egil Hjelmeland > --- >

Re: [PATCH v3 net-next 2/5] net: dsa: lan9303: define LAN9303_NUM_PORTS 3

2017-08-03 Thread Florian Fainelli
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote: > Will be used instead of '3' in upcomming patches. > > Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next] net: dsa: Add support for 64-bit statistics

2017-08-03 Thread Florian Fainelli
On 08/02/2017 04:49 PM, David Miller wrote: > From: Florian Fainelli > Date: Tue, 1 Aug 2017 15:00:36 -0700 > >> DSA slave network devices maintain a pair of bytes and packets counters >> for each directions, but these are not 64-bit capable. Re-use >> pcpu_sw_netstats

Re: [PATCH net-next v3 2/2] bpf: add a test case for syscalls/sys_{enter|exit}_* tracepoints

2017-08-03 Thread Daniel Borkmann
On 08/03/2017 06:29 PM, Yonghong Song wrote: Signed-off-by: Yonghong Song Acked-by: Daniel Borkmann

Re: [PATCH 00/27] ip: add -json support to 'ip link show'

2017-08-03 Thread Oliver Hartkopp
Hi Julien, On 08/03/2017 05:54 PM, Julien Fortin wrote: From: Julien Fortin what about link_veth.c iplink_vcan.c iplink_vxcan.c ?? Regards, Oliver This patch series adds json support to 'ip [-details] link show [dev DEV]' Each patch describes the json schema

Re: [PATCH v2 3/4] can: m_can: Update documentation to mention new fixed transceiver binding

2017-08-03 Thread Rob Herring
On Mon, Jul 24, 2017 at 06:05:20PM -0500, Franklin S Cooper Jr wrote: > Add information regarding fixed transceiver binding. This is especially > important for MCAN since the IP allows CAN FD mode to run significantly > faster than what most transceivers are capable of. > > Signed-off-by:

Re: [PATCH net-next 00/14] sctp: remove typedefs from structures part 4

2017-08-03 Thread David Miller
From: Xin Long Date: Thu, 3 Aug 2017 15:42:08 +0800 > As we know, typedef is suggested not to use in kernel, even checkpatch.pl > also gives warnings about it. Now sctp is using it for many structures. > > All this kind of typedef's using should be removed. This patchset

Re: [patch net-next 10/21] ipv6: fib: Add offload indication to routes

2017-08-03 Thread David Ahern
On 8/3/17 5:28 AM, Jiri Pirko wrote: > diff --git a/include/uapi/linux/ipv6_route.h b/include/uapi/linux/ipv6_route.h > index d496c02..33e2a57 100644 > --- a/include/uapi/linux/ipv6_route.h > +++ b/include/uapi/linux/ipv6_route.h > @@ -35,6 +35,7 @@ > #define RTF_PREF(pref) ((pref) << 27) >

Re: [PATCH v3 2/4] dt-bindings: can: fixed-transceiver: Add new CAN fixed transceiver bindings

2017-08-03 Thread Franklin S Cooper Jr
On 08/03/2017 07:22 AM, Sergei Shtylyov wrote: > On 08/03/2017 12:48 PM, Franklin S Cooper Jr wrote: > Add documentation to describe usage of the new fixed transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document.

  1   2   3   4   >