[RFC PATCH] ptr_ring: linked list fallback

2018-02-15 Thread Michael S. Tsirkin
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 backed by a linked list. Once you run out of rin entries, instead of a drop you

[PATCH net] tg3: APE heartbeat changes

2018-02-15 Thread Satish Baddipadige
From: Prashant Sreedharan In ungraceful host shutdown or driver crash case BMC connectivity is lost. APE firmware is missing the driver state in this case to keep the BMC connectivity alive. This patch has below change to address this issue. Heartbeat mechanism

Re: [PATCH bpf] bpf: fix mlock precharge on arraymaps

2018-02-15 Thread Alexei Starovoitov
On 2/15/18 4:10 PM, Daniel Borkmann wrote: syzkaller recently triggered OOM during percpu map allocation; while there is work in progress by Dennis Zhou to add __GFP_NORETRY semantics for percpu allocator under pressure, there seems also a missing bpf_map_precharge_memlock() check in array map

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

2018-02-15 Thread Jason Wang
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. Function(1): receive_big() does not support XDP. Function(2):

[PATCH net] tg3: APE heartbeat changes

2018-02-15 Thread Satish Baddipadige
From: Prashant Sreedharan In ungraceful host shutdown or driver crash case BMC connectivity is lost. APE firmware is missing the driver state in this case to keep the BMC connectivity alive. This patch has below change to address this issue. Heartbeat mechanism

[PATCH net] tg3: APE heartbeat changes

2018-02-15 Thread Satish Baddipadige
From: Prashant Sreedharan In ungraceful host shutdown or driver crash case BMC connectivity is lost. APE firmware is missing the driver state in this case to keep the BMC connectivity alive. This patch has below change to address this issue. Heartbeat mechanism

[PATCH net-next 1/2] nfp: standardize FW header whitespace

2018-02-15 Thread Jakub Kicinski
From: Michael Rapson The nfp_net_ctrl.h file used spaces for indentation in the past but tabs have crept in. Host driver files use tabs for indentation by default, so let's convert to tabs for consistency across the file and our drivers. Signed-off-by: Michael

[PATCH net-next 2/2] nfp: flower: implement tcp flag match offload

2018-02-15 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Implement tcp flag match offloading. Current tcp flag match support include FIN, SYN, RST, PSH and URG flags, other flags are unsupported. The PSH and URG flags are only set in the hardware fast path when used in combination

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

2018-02-15 Thread Jakub Kicinski
Hi! Whitespace cleanup from Michael and flower offload support for matching on TCP flags from Pieter. Michael Rapson (1): nfp: standardize FW header whitespace Pieter Jansen van Vuuren (1): nfp: flower: implement tcp flag match offload drivers/net/ethernet/netronome/nfp/flower/cmsg.h |

Re: [RFC PATCH] net/ncsi: Add generic netlink family

2018-02-15 Thread Samuel Mendoza-Jonas
On Thu, 2018-02-15 at 14:50 +1030, Joel Stanley wrote: > Hey Sam, > > On Thu, Feb 15, 2018 at 2:00 PM, Samuel Mendoza-Jonas > wrote: > > Add a generic netlink family for NCSI. This supports two commands; > > NCSI_CMD_PKG_INFO which returns information on packages and their

Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-15 Thread Finn Thain
On Wed, 14 Feb 2018, David Miller wrote: > > Have you considered that implementing the ethtool hooks in the core > > driver might allow removal of all 8390 driver 'msg_enable' module > > parameters and msglevel ethtool hooks added by c45f812f0280, excepting > > those in the core driver? But

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

2018-02-15 Thread Cong Wang
On Tue, Feb 13, 2018 at 10:48 AM, Dmitry Vyukov wrote: > On Mon, Oct 30, 2017 at 7:41 PM, Cong Wang wrote: >> On Mon, Oct 30, 2017 at 8:34 AM, syzbot >> >> wrote: >>> Hello, >>>

[PATCH bpf] bpf: fix mlock precharge on arraymaps

2018-02-15 Thread Daniel Borkmann
syzkaller recently triggered OOM during percpu map allocation; while there is work in progress by Dennis Zhou to add __GFP_NORETRY semantics for percpu allocator under pressure, there seems also a missing bpf_map_precharge_memlock() check in array map allocation. Given today the actual

[PATCH net] rxrpc: Work around usercopy check

2018-02-15 Thread David Howells
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 message in the userspace control message buffer. A warning is

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

2018-02-15 Thread Eric Dumazet
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 required natural alignment, and the atomic operation

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

2018-02-15 Thread Jesper Dangaard Brouer
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. Function(1): receive_big() does not support XDP. Function(2): receive_small() support XDP fully and uses build_skb(). Function(3):

Re: [PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread Serhey Popovych
David Ahern wrote: > On 2/15/18 11:34 AM, Serhey Popovych wrote: >> Be consistent in handling of IFLA_IFNAME attribute in all places: if >> there is no attribute report bug to stderr and use ll_idx_n2a() as >> last measure to get name in "if%u" format instead of "". >> >> Use check_ifname() to

[PATCH iproute2-next v5 5/9] ipaddress: Simplify print_linkinfo_brief() and it's usage

2018-02-15 Thread Serhey Popovych
Simplify calling code in ipaddr_list_flush_or_save() by introducing intermediate variable of @struct nlmsghdr, drop duplicated code: print_linkinfo_brief() never returns values other than <= 0 so we can move print_selected_addrinfo() outside of each block. Signed-off-by: Serhey Popovych

[PATCH iproute2-next v5 1/9] ipaddress: Abstract IFA_LABEL matching code

2018-02-15 Thread Serhey Popovych
There at least two places in ip/ipaddress.c where we match IFA_LABEL against filter.label if that is given. Get rid of "common" if () statement for inet_addr_match_rta() and ifa_label_match_rta(): it is not common because first will check for filter.pfx.family != AF_UNSPEC inside and second for

[PATCH iproute2-next v5 4/9] ipaddress: Improve print_linkinfo()

2018-02-15 Thread Serhey Popovych
There are few places to improve: 1) return -1 when entry is filtered instead of zero, which means accept entry: ipaddress_list_flush_or_save() the only user of this 2) use ll_idx_n2a() as last resort to translate name to index for "should never happen" cases when cache shouldn't be

[PATCH iproute2-next v5 6/9] lib: Correct object file dependencies

2018-02-15 Thread Serhey Popovych
Neither internal libnetlink nor libgenl depends on ll_map.o: prepare for upcoming changes that brings much more cleaner dependency between utils.o and ll_map.o. However ll_map.o depends on libnetlink.o functions so we need to provide libnetlink.a after libutil.a in LIBNETLINK at global Makefile.

[PATCH iproute2-next v5 8/9] utils: Introduce and use print_name_and_link() to print name@link

2018-02-15 Thread Serhey Popovych
There is at least three places implementing same things: two in ipaddress.c print_linkinfo() & print_linkinfo_brief() and one in bridge/link.c. They are diverge from each other very little: bridge/link.c does not support JSON output at the moment and print_linkinfo_brief() does not handle

[PATCH iproute2-next v5 3/9] utils: Reimplement ll_idx_n2a() and introduce ll_idx_a2n()

2018-02-15 Thread Serhey Popovych
Now all users of ll_idx_n2a() replaced with ll_index_to_name() we can move it's functionality to ll_index_to_name() and implement index to name conversion using snprintf() and "if%u". Use %u specifier in "if%..." template consistently: network device indexes are always greather than zero. Also

[PATCH iproute2-next v5 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread Serhey Popovych
Be consistent in handling of IFLA_IFNAME attribute in all places: if there is no attribute report bug to stderr and use ll_idx_n2a() as last measure to get name in "if%u" format instead of "". Use check_ifname() to validate network device name: this catches both unexpected return from kernel and

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

2018-02-15 Thread Serhey Popovych
It shares lot of code with print_linkinfo(): drop duplicated part, change parameters list, make it static and call from print_linkinfo() after common path. While there move SPRINT_BUF() to the function scope from blocks to avoid duplication and use "%s" to print "\n" to help compiler optimize

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

2018-02-15 Thread Serhey Popovych
With this series I propose to make print_linkinfo_brief() static in favor of print_linkinfo() as single point for linkinfo printing. Changes presented with this series tested using following script: \#!/bin/bash iproute2_dir="$1" iface='eth0.2' pushd "$iproute2_dir" &>/dev/null for i in new

[PATCH iproute2-next v5 2/9] ipaddress: ll_map: Replace ll_idx_n2a() with ll_index_to_name()

2018-02-15 Thread Serhey Popovych
There is no reentrancy as well as deferred result usage for all cases where ll_idx_n2a() being used: it is safe to use ll_index_to_name() that internally calls ll_idx_n2a() with static buffer to hold result. While there print master network device name using correct color. Signed-off-by: Serhey

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

2018-02-15 Thread Andrew Lunn
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_

TCP and BBR: reproducibly low cwnd and bandwidth

2018-02-15 Thread Oleksandr Natalenko
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 mechanism. To verify my observations, I've set up 2 KVM VMs with the following parameters: 1) Linux v4.15.3 2) virtio NICs 3) 128 MiB of RAM 4) 2

Re: pull request: bluetooth-next 2018-02-15

2018-02-15 Thread David Miller
From: Johan Hedberg Date: Thu, 15 Feb 2018 10:33:59 +0200 > Here's the first bluetooth-next pull request targetting the 4.17 kernel > release. > > - Fixes & cleanups to Atheros and Marvell drivers > - Support for two new Realtek controllers > - Support for new Intel

Re: [PATCH v3 net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 1:49 PM, Sowmini Varadhan wrote: > Send a cookie with sendmsg() on PF_RDS sockets, and process the > returned batched cookies in do_recv_completion() > > Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn

Re: [PATCH v3 net-next 6/7] selftests/net: add support for PF_RDS sockets

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 1:49 PM, Sowmini Varadhan wrote: > Add support for basic PF_RDS client-server testing in msg_zerocopy > > Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn

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

2018-02-15 Thread David Ahern
On 2/15/18 1:46 AM, Stefano Brivio wrote: > 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 different realms >

Re: [PATCH net-next v2] selftests/net: fixes psock_fanout eBPF test case

2018-02-15 Thread David Miller
From: Prashant Bhole Date: Thu, 15 Feb 2018 09:19:26 +0900 > eBPF test fails due to verifier failure because log_buf is too small. > Fixed by increasing log_buf size > > Signed-off-by: Prashant Bhole > --- > v2: log_buf is

Re: [PATCH v3 net-next 4/7] rds: support for zcopy completion notification

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 2:46 PM, Santosh Shilimkar wrote: > On 2/15/2018 10:49 AM, Sowmini Varadhan wrote: >> >> RDS removes a datagram (rds_message) from the retransmit queue when >> an ACK is received. The ACK indicates that the receiver has queued >> the RDS

Re: [PATCH v3 net-next 5/7] rds: zerocopy Tx support.

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 2:47 PM, Santosh Shilimkar wrote: > On 2/15/2018 10:49 AM, Sowmini Varadhan wrote: >> >> If the MSG_ZEROCOPY flag is specified with rds_sendmsg(), and, >> if the SO_ZEROCOPY socket option has been set on the PF_RDS socket, >> application pages

Re: [PATCH v3 net-next 1/7] skbuff: export mm_[un]account_pinned_pages for other modules

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 1:49 PM, Sowmini Varadhan wrote: > RDS would like to use the helper functions for managing pinned pages > added by Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages") > > Signed-off-by: Sowmini Varadhan

Re: [PATCH v3 net-next 3/7] sock: permit SO_ZEROCOPY on PF_RDS socket

2018-02-15 Thread Willem de Bruijn
On Thu, Feb 15, 2018 at 1:49 PM, Sowmini Varadhan wrote: > allow the application to set SO_ZEROCOPY on the underlying sk > of a PF_RDS socket > > Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn

Re: [PATCH net-next] net/ipv4: Remove fib table id from rtable

2018-02-15 Thread David Miller
From: David Ahern Date: Wed, 14 Feb 2018 14:24:28 -0800 > Remove rt_table_id from rtable. It was added for getroute to return the > table id that was hit in the lookup. With the changes for fibmatch the > table id can be extracted from the fib_info returned in the fib_result >

Re: [PATCH net-next 0/7] tools: tc-testing: Plugin Architecture

2018-02-15 Thread David Miller
From: "Brenda J. Butler" Date: Wed, 14 Feb 2018 14:09:18 -0500 > To make tdc.py more general, we are introducing a plugin architecture. > > This patch set first organizes the command line parameters, then > introduces the plugin architecture and some example plugins. Series

Re: [PATCH net-next v2 0/3] Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device

2018-02-15 Thread David Miller
From: Kirill Tkhai Date: Wed, 14 Feb 2018 16:39:45 +0300 > Currently, it's not possible to get or check net namespace, > which was used to create tun socket. User may have two tun > devices with the same names in different nets, and there > is no way to differ them each

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

2018-02-15 Thread Sowmini Varadhan
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 incorrectly. Patch 5: - remove needless bzero of skb->cb[], consolidate err

Re: [PATCH net] xfrm: reuse uncached_list to track xdsts

2018-02-15 Thread David Miller
From: Xin Long Date: Wed, 14 Feb 2018 19:06:02 +0800 > In early time, when freeing a xdst, it would be inserted into > dst_garbage.list first. Then if it's refcnt was still held > somewhere, later it would be put into dst_busy_list in > dst_gc_task(). > > When one dev was

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

2018-02-15 Thread Andrew Lunn
> diff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.c > b/drivers/net/dsa/mv88e6xxx/hwtstamp.c > index b251d534b70d..758e35fa69ab 100644 > --- a/drivers/net/dsa/mv88e6xxx/hwtstamp.c > +++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.c > @@ -321,7 +321,7 @@ static void mv88e6xxx_get_rxts(struct

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

2018-02-15 Thread Joe Moriarty
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() for NULL. Added the check for NULL, which results in a value of 0 being

[PATCH v1 0/1] Parfait changes

2018-02-15 Thread Joe Moriarty
The following patch(s) are bugs found by the static compiler 'Parfait'. Care was taken to make sure false positive results were removed from this patchset. Parfait Overview https://labs.oracle.com/pls/apex/f?p=labs:49:P49_PROJECT_ID:13 v1: Initial release Joe Moriarty

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

2018-02-15 Thread Daniel Borkmann
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 some

Re: Potential deadlock BUG in drivers/net/wireless/st/cw1200/sta.c (Linux 4.9)

2018-02-15 Thread Solomon Peachy
On Tue, Feb 06, 2018 at 09:04:29PM +0100, Iago Abal wrote: > This still looks like a deadlock bug to me, could someone take a look > as well and confirm? I will help preparing a patch if needed. The short answer: yes, it deadlocks. I'll be glad to review patches (this code is pretty tricky, but

Re: [PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread David Ahern
On 2/15/18 11:34 AM, Serhey Popovych wrote: > Be consistent in handling of IFLA_IFNAME attribute in all places: if > there is no attribute report bug to stderr and use ll_idx_n2a() as > last measure to get name in "if%u" format instead of "". > > Use check_ifname() to validate network device

[PATCH] i40e: check that pointer vsi is not null before dereferencing it

2018-02-15 Thread Colin King
From: Colin Ian King Function i40e_find_vsi_from_id can potentially return null, hence vsi may be null, so defensively check it is non-null before dereferencing it to check the seid. Fixes: e284fc280473 ("i40e: Add and delete cloud filter") Signed-off-by: Colin Ian

Re: [PATCH v3 net-next 5/7] rds: zerocopy Tx support.

2018-02-15 Thread Santosh Shilimkar
On 2/15/2018 10:49 AM, Sowmini Varadhan wrote: If the MSG_ZEROCOPY flag is specified with rds_sendmsg(), and, if the SO_ZEROCOPY socket option has been set on the PF_RDS socket, application pages sent down with rds_sendmsg() are pinned. The pinning uses the accounting infrastructure added by

Re: [PATCH v3 net-next 4/7] rds: support for zcopy completion notification

2018-02-15 Thread Santosh Shilimkar
On 2/15/2018 10:49 AM, Sowmini Varadhan wrote: RDS removes a datagram (rds_message) from the retransmit queue when an ACK is received. The ACK indicates that the receiver has queued the RDS datagram, so that the sender can safely forget the datagram. When all references to the rds_message are

Re: [PATCH v3 net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock

2018-02-15 Thread Santosh Shilimkar
On 2/15/2018 10:49 AM, Sowmini Varadhan wrote: The existing model holds a reference from the rds_sock to the rds_message, but the rds_message does not itself hold a sock_put() on the rds_sock. Instead the m_rs field in the rds_message is assigned when the message is queued on the sock, and

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

2018-02-15 Thread Colin King
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. Detected by CoverityScan,

Re: ppp/pppoe, still panic 4.15.3 in ppp_push

2018-02-15 Thread Guillaume Nault
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 Fedoryshchenko wrote: > > > On 2018-02-15 17:55, Guillaume Nault wrote: > > > > On Thu, Feb 15, 2018 at 12:19:52PM +0200, Denys

Re: ppp/pppoe, still panic 4.15.3 in ppp_push

2018-02-15 Thread Denys Fedoryshchenko
On 2018-02-15 21:31, Guillaume Nault wrote: On Thu, Feb 15, 2018 at 06:01:16PM +0200, Denys Fedoryshchenko wrote: On 2018-02-15 17:55, Guillaume Nault wrote: > On Thu, Feb 15, 2018 at 12:19:52PM +0200, Denys Fedoryshchenko wrote: > > Here we go: > > > > [24558.921549] > >

Re: ppp/pppoe, still panic 4.15.3 in ppp_push

2018-02-15 Thread Guillaume Nault
On Thu, Feb 15, 2018 at 06:01:16PM +0200, Denys Fedoryshchenko wrote: > On 2018-02-15 17:55, Guillaume Nault wrote: > > On Thu, Feb 15, 2018 at 12:19:52PM +0200, Denys Fedoryshchenko wrote: > > > Here we go: > > > > > > [24558.921549] > > >

Re: [PATCH iproute2-next v4 8/9] utils: Introduce and use print_name_and_link() to print name@link

2018-02-15 Thread David Ahern
On 2/15/18 11:59 AM, Stephen Hemminger wrote: > On Thu, 15 Feb 2018 20:34:07 +0200 > Serhey Popovych wrote: > >> +fprintf(fp, "%d: ", ifi->ifi_index); >> + >> +print_name_and_link("%s: ", COLOR_NONE, name, tb); > > This should be COLOR_IFNAME but I am working

[PATCH] i40evf: pass struct virtchnl_filter by reference rather than by value

2018-02-15 Thread Colin King
From: Colin Ian King Passing struct virtchnl_filter f by value requires a 272 byte copy on x86_64, so instead pass it by reference is much more efficient. Also adjust some lines that are over 80 chars. Detected by CoverityScan, CID#1465285 ("Big parameter passed by

Hello Dear,

2018-02-15 Thread Musa
Hello Dear, I am Mr.Musa Ali I have a Geniue business transaction of (10.5Million Dollars) to do with You Hence You Co-operate with me I am assured you that within (7) seven banking working days, this said amount will enter your given Bank account with immediate alacrity. If you agree to my

Re: ppp/pppoe, still panic 4.15.3 in ppp_push

2018-02-15 Thread Guillaume Nault
On Wed, Feb 14, 2018 at 06:49:19PM +0200, Denys Fedoryshchenko wrote: > On 2018-02-14 18:47, Guillaume Nault wrote: > > On Wed, Feb 14, 2018 at 06:29:34PM +0200, Denys Fedoryshchenko wrote: > > > On 2018-02-14 18:07, Guillaume Nault wrote: > > > > On Wed, Feb 14, 2018 at 03:17:23PM +0200, Denys

[PATCH v3 net-next 5/7] rds: zerocopy Tx support.

2018-02-15 Thread Sowmini Varadhan
If the MSG_ZEROCOPY flag is specified with rds_sendmsg(), and, if the SO_ZEROCOPY socket option has been set on the PF_RDS socket, application pages sent down with rds_sendmsg() are pinned. The pinning uses the accounting infrastructure added by Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY

[PATCH v3 net-next 4/7] rds: support for zcopy completion notification

2018-02-15 Thread Sowmini Varadhan
RDS removes a datagram (rds_message) from the retransmit queue when an ACK is received. The ACK indicates that the receiver has queued the RDS datagram, so that the sender can safely forget the datagram. When all references to the rds_message are quiesced, rds_message_purge is called to release

[PATCH v3 net-next 6/7] selftests/net: add support for PF_RDS sockets

2018-02-15 Thread Sowmini Varadhan
Add support for basic PF_RDS client-server testing in msg_zerocopy Signed-off-by: Sowmini Varadhan --- tools/testing/selftests/net/msg_zerocopy.c | 65 +++- 1 files changed, 64 insertions(+), 1 deletions(-) diff --git

[PATCH v3 net-next 7/7] selftests/net: add zerocopy support for PF_RDS test case

2018-02-15 Thread Sowmini Varadhan
Send a cookie with sendmsg() on PF_RDS sockets, and process the returned batched cookies in do_recv_completion() Signed-off-by: Sowmini Varadhan --- v2: - restructured do_recv_completion to avoid excessive code re-indent - on-stack allocation of cmsghdr for

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

2018-02-15 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.

[PATCH v2] ss: prepare rth when killing inet sock

2018-02-15 Thread Masatake YAMATO
kill_inet_sock() expects rhn_handle instance is passed via inet_diag_arg argument. However on the following calling path: generic_show_sock => show_one_inet_sock => kill_inet_sock rth field of inet_diag_arg is not filled with the address of rhn_handle instance. As the result ss

[PATCH v3 net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock

2018-02-15 Thread Sowmini Varadhan
The existing model holds a reference from the rds_sock to the rds_message, but the rds_message does not itself hold a sock_put() on the rds_sock. Instead the m_rs field in the rds_message is assigned when the message is queued on the sock, and nulled when the message is dequeued from the sock. We

[PATCH v3 net-next 1/7] skbuff: export mm_[un]account_pinned_pages for other modules

2018-02-15 Thread Sowmini Varadhan
RDS would like to use the helper functions for managing pinned pages added by Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages") Signed-off-by: Sowmini Varadhan --- include/linux/skbuff.h |3 +++ net/core/skbuff.c |6 -- 2 files changed, 7

[PATCH v3 net-next 3/7] sock: permit SO_ZEROCOPY on PF_RDS socket

2018-02-15 Thread Sowmini Varadhan
allow the application to set SO_ZEROCOPY on the underlying sk of a PF_RDS socket Signed-off-by: Sowmini Varadhan --- net/core/sock.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/net/core/sock.c b/net/core/sock.c

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

2018-02-15 Thread Davide Caratti
On Thu, 2018-02-15 at 10:31 -0500, Jamal Hadi Salim wrote: > On 18-02-15 09:50 AM, Davide Caratti wrote: > > 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

Re: [PATCH] i40evf/i40evf_main: Fix variable assignment in i40evf_parse_cls_flower

2018-02-15 Thread Gustavo A. R. Silva
On 02/15/2018 12:11 PM, Jeff Kirsher wrote: On Thu, 2018-02-15 at 09:56 -0800, Ramamurthy, Harshitha wrote: On Thu, 2018-02-15 at 11:44 -0600, Gustavo A. R. Silva wrote: It seems this is a copy-paste error and that the proper variable to use in this particular case is _src_ instead of _dst_.

Re: [PATCH iproute2-next v4 8/9] utils: Introduce and use print_name_and_link() to print name@link

2018-02-15 Thread Stephen Hemminger
On Thu, 15 Feb 2018 20:34:07 +0200 Serhey Popovych wrote: > + fprintf(fp, "%d: ", ifi->ifi_index); > + > + print_name_and_link("%s: ", COLOR_NONE, name, tb); This should be COLOR_IFNAME but I am working on that.

Re: [PATCH iproute2-next] ip: Use single variable to represent -pretty

2018-02-15 Thread Stephen Hemminger
On Thu, 15 Feb 2018 20:31:33 +0200 Serhey Popovych wrote: > After commit a233caa0aaee ("json: make pretty printing optional") I get > following build failure: > > LINK rtmon > ../lib/libutil.a(json_print.o): In function `new_json_obj': >

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

2018-02-15 Thread Serhey Popovych
With this series I propose to make print_linkinfo_brief() static in favor of print_linkinfo() as single point for linkinfo printing. Changes presented with this series tested using following script: \#!/bin/bash iproute2_dir="$1" iface='eth0.2' pushd "$iproute2_dir" &>/dev/null for i in new

[PATCH iproute2-next v4 2/9] ipaddress: ll_map: Replace ll_idx_n2a() with ll_index_to_name()

2018-02-15 Thread Serhey Popovych
There is no reentrancy as well as deferred result usage for all cases where ll_idx_n2a() being used: it is safe to use ll_index_to_name() that internally calls ll_idx_n2a() with static buffer to hold result. While there print master network device name using correct color. Signed-off-by: Serhey

[PATCH iproute2-next v4 6/9] lib: Correct object file dependencies

2018-02-15 Thread Serhey Popovych
Neither internal libnetlink nor libgenl depends on ll_map.o: prepare for upcoming changes that brings much more cleaner dependency between utils.o and ll_map.o. Signed-off-by: Serhey Popovych --- lib/Makefile |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH iproute2-next v4 3/9] utils: Reimplement ll_idx_n2a() and introduce ll_idx_a2n()

2018-02-15 Thread Serhey Popovych
Now all users of ll_idx_n2a() replaced with ll_index_to_name() we can move it's functionality to ll_index_to_name() and implement index to name conversion using snprintf() and "if%u". Use %u specifier in "if%..." template consistently: network device indexes are always greather than zero. Also

[PATCH iproute2-next v4 5/9] ipaddress: Simplify print_linkinfo_brief() and it's usage

2018-02-15 Thread Serhey Popovych
Simplify calling code in ipaddr_list_flush_or_save() by introducing intermediate variable of @struct nlmsghdr, drop duplicated code: print_linkinfo_brief() never returns values other than <= 0 so we can move print_selected_addrinfo() outside of each block. Signed-off-by: Serhey Popovych

[PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread Serhey Popovych
Be consistent in handling of IFLA_IFNAME attribute in all places: if there is no attribute report bug to stderr and use ll_idx_n2a() as last measure to get name in "if%u" format instead of "". Use check_ifname() to validate network device name: this catches both unexpected return from kernel and

[PATCH iproute2-next v4 1/9] ipaddress: Abstract IFA_LABEL matching code

2018-02-15 Thread Serhey Popovych
There at least two places in ip/ipaddress.c where we match IFA_LABEL against filter.label if that is given. Get rid of "common" if () statement for inet_addr_match_rta() and ifa_label_match_rta(): it is not common because first will check for filter.pfx.family != AF_UNSPEC inside and second for

[PATCH iproute2-next v4 8/9] utils: Introduce and use print_name_and_link() to print name@link

2018-02-15 Thread Serhey Popovych
There is at least three places implementing same things: two in ipaddress.c print_linkinfo() & print_linkinfo_brief() and one in bridge/link.c. They are diverge from each other very little: bridge/link.c does not support JSON output at the moment and print_linkinfo_brief() does not handle

[PATCH iproute2-next v4 4/9] ipaddress: Improve print_linkinfo()

2018-02-15 Thread Serhey Popovych
There are few places to improve: 1) return -1 when entry is filtered instead of zero, which means accept entry: ipaddress_list_flush_or_save() the only user of this 2) use ll_idx_n2a() as last resort to translate name to index for "should never happen" cases when cache shouldn't be

[PATCH iproute2-next v4 9/9] ipaddress: Make print_linkinfo_brief() static

2018-02-15 Thread Serhey Popovych
It shares lot of code with print_linkinfo(): drop duplicated part, change parameters list, make it static and call from print_linkinfo() after common path. While there move SPRINT_BUF() to the function scope from blocks to avoid duplication and use "%s" to print "\n" to help compiler optimize

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

2018-02-15 Thread Gustavo A. R. Silva
_port_ is being used as index to array port_hwtstamp before verifying it is a non-negative number and a valid index at 209: if (port < 0 || port >= mv88e6xxx_num_ports(chip)) Fix this by checking _port_ before using it as index to array port_hwtstamp. Addresses-Coverity-ID: 1465287 ("Negative

[PATCH iproute2-next] ip: Use single variable to represent -pretty

2018-02-15 Thread Serhey Popovych
After commit a233caa0aaee ("json: make pretty printing optional") I get following build failure: LINK rtmon ../lib/libutil.a(json_print.o): In function `new_json_obj': json_print.c:(.text+0x35): undefined reference to `show_pretty' collect2: error: ld returned 1 exit status

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

2018-02-15 Thread Gustavo A. R. Silva
_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_ before using it as index to array port_hwtstamp. Addresses-Coverity-ID: 1465287

Re: [vhost:vhost 24/24] drivers/firmware/qemu_fw_cfg.c:499:22: error: storage size of 'files' isn't known

2018-02-15 Thread Michael S. Tsirkin
On Thu, Feb 15, 2018 at 10:46:50AM +0100, Marc-Andre Lureau wrote: > Hi > > On Wed, Feb 14, 2018 at 9:27 PM, kbuild test robot > wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost > > head: 5d457fe6aeaab9d0a1665eafc8af7139bc6b6f2e > >

Re: [PATCH iproute2 2/7] devlink: mnlg: Add support for extended ack

2018-02-15 Thread Stephen Hemminger
On Thu, 15 Feb 2018 13:57:18 +0200 Arkadi Sharshevsky wrote: > On 02/14/2018 05:12 PM, Stephen Hemminger wrote: > > On Wed, 14 Feb 2018 10:55:17 +0200 > > Arkadi Sharshevsky wrote: > > > >> +static mnl_cb_t mnlg_cb_array[NLMSG_MIN_TYPE] = { > >> +

Re: [PATCH] i40evf/i40evf_main: Fix variable assignment in i40evf_parse_cls_flower

2018-02-15 Thread Jeff Kirsher
On Thu, 2018-02-15 at 09:56 -0800, Ramamurthy, Harshitha wrote: > On Thu, 2018-02-15 at 11:44 -0600, Gustavo A. R. Silva wrote: > > It seems this is a copy-paste error and that the proper variable to > > use > > in this particular case is _src_ instead of _dst_. > > > > Addresses-Coverity-ID:

[PATCH] i40evf/i40evf_main: Fix variable assignment in i40evf_parse_cls_flower

2018-02-15 Thread Gustavo A. R. Silva
It seems this is a copy-paste error and that the proper variable to use in this particular case is _src_ instead of _dst_. Addresses-Coverity-ID: 1465282 ("Copy-paste error") Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters") Signed-off-by: Gustavo A. R. Silva

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Mark Rutland
On Thu, Feb 15, 2018 at 09:43:06AM -0800, Eric Dumazet wrote: > On Thu, 2018-02-15 at 09:24 -0800, Eric Dumazet wrote: > > > > I will send something more suited to original intent of these commits : > > > > 90e33d45940793def6f773b2d528e9f3c84ffdc7 tun: enable napi_gro_frags() > > for TUN/TAP

Re: [PATCH] i40evf/i40evf_main: Fix variable assignment in i40evf_parse_cls_flower

2018-02-15 Thread Ramamurthy, Harshitha
On Thu, 2018-02-15 at 11:44 -0600, Gustavo A. R. Silva wrote: > It seems this is a copy-paste error and that the proper variable to > use > in this particular case is _src_ instead of _dst_. > > Addresses-Coverity-ID: 1465282 ("Copy-paste error") > Fixes: 0075fa0fadd0 ("i40evf: Add support to

Re: [PATCH net-next 1/2] net: netfilter: export xt_policy match_policy_in() as xt_policy_match_policy_in()

2018-02-15 Thread Eyal Birger
Hi Pablo, On Wed, 14 Feb 2018 11:19:40 +0100 Pablo Neira Ayuso wrote: > On Wed, Feb 14, 2018 at 10:14:24AM +0200, Eyal Birger wrote: > > Hi Pablo, > > > > On Mon, 15 Jan 2018 13:48:41 +0200 > > Eyal Birger wrote: > > > > > On Mon, Jan 15, 2018 at

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

2018-02-15 Thread Jamal Hadi Salim
On 18-02-15 09:50 AM, Davide Caratti wrote: 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 this unbalance. Kind

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Eric Dumazet
On Thu, 2018-02-15 at 09:24 -0800, Eric Dumazet wrote: > > I will send something more suited to original intent of these commits : > > 90e33d45940793def6f773b2d528e9f3c84ffdc7 tun: enable napi_gro_frags() > for TUN/TAP driver > 943170998b200190f99d3fe7e771437e2c51f319 tun: enable NAPI for

[PATCH net-next,v3] net: sched: add em_ipt ematch for calling xtables matches

2018-02-15 Thread Eyal Birger
The commit a new tc ematch for using netfilter xtable matches. This allows early classification as well as mirroning/redirecting traffic based on logic implemented in netfilter extensions. Current supported use case is classification based on the incoming IPSec state used during decpsulation

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Mark Rutland
On Thu, Feb 15, 2018 at 09:24:36AM -0800, Eric Dumazet wrote: > On Thu, Feb 15, 2018 at 9:20 AM, Eric Dumazet wrote: > > > > Yes, it seems tun.c breaks the assumptions. > > > > If it really wants to provide arbitrary fragments and alignments, it > > should use a separate > >

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Eric Dumazet
On Thu, Feb 15, 2018 at 9:20 AM, Eric Dumazet wrote: > > Yes, it seems tun.c breaks the assumptions. > > If it really wants to provide arbitrary fragments and alignments, it > should use a separate Sorry, I have sent the message to soon. tun.c should use a private 'struct

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Eric Dumazet
On Thu, Feb 15, 2018 at 9:04 AM, Mark Rutland wrote: > Hi, > > 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 required natural

  1   2   >