Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Steve Douthit
On 11/30/18 11:34 AM, Andrew Lunn wrote: >> Yep, registering multiple interfaces is wrong. The first board I tested >> against only had a single MAC enabled (they can be disabled/hidden via >> straps) so it just happened to work. > > Hi Steve > > Can you hide any/all via straps, or is 00.0

[PATCH] net: tcp: add correct check for tcp_retransmit_skb()

2018-11-30 Thread Sharath Chandra Vurukala
when the tcp_retranmission_timer expires and tcp_retranmsit_skb is called if the retranmsission fails due to local congestion, backoff should not incremented. tcp_retransmit_skb() returns non-zero negative value in some cases of failure but the caller tcp_retransmission_timer() has a check for

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Eric Dumazet
On Fri, Nov 30, 2018 at 8:10 AM Dmitry Vyukov wrote: > > On Fri, Nov 30, 2018 at 4:02 PM, Ido Schimmel wrote: > > On Fri, Nov 30, 2018 at 08:59:09AM -0700, David Ahern wrote: > >> This does not repro for me: > >> # ./a.out > >> Invalid address length 6 - must be 4 bytes > >> RTNETLINK answers:

Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-30 Thread Neil Horman
On Fri, Nov 30, 2018 at 10:48:10PM +0900, Xin Long wrote: > On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote: > > > > On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin Long wrote: > > > On Thu, Nov 29, 2018 at 11:39 PM Neil Horman > > > wrote: > > > > > > > > On Thu, Nov 29, 2018 at 02:42:56PM

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Eric Dumazet
On Fri, Nov 30, 2018 at 7:36 AM David Ahern wrote: > > On 11/30/18 7:58 AM, Ido Schimmel wrote: > > Can you please share the reproducer (assuming it exists)? I don't really > > understand the fix. None of the functions you patched are in the trace. > > Also, looking at IPv4 GRE code, while GRE

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Eric Dumazet
On Fri, Nov 30, 2018 at 6:58 AM Ido Schimmel wrote: > > On Fri, Nov 30, 2018 at 05:35:01AM -0800, 'Eric Dumazet' via syzkaller wrote: > > Commit da71577545a5 ("rtnetlink: Disallow FDB configuration > > for non-Ethernet device") added a test against dev->type. > > > > kmsan was still able to

Re: [PATCH net-next 3/3] vxlan: move flag sets to use a helper func vxlan_nl2conf

2018-11-30 Thread kbuild test robot
Hi Roopa, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Roopa-Prabhu/vxlan-support-changelink-for-a-few-more-attributes/20181130-030315 config: x86_64-allmodconfig (attached as .config) compiler: gcc-7

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread David Ahern
On 11/30/18 7:58 AM, Ido Schimmel wrote: > Can you please share the reproducer (assuming it exists)? I don't really > understand the fix. None of the functions you patched are in the trace. > Also, looking at IPv4 GRE code, while GRE device has dev->addr_len set > to 4, dev->type is set to

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread David Ahern
On 11/30/18 8:14 AM, Eric Dumazet wrote: > > // autogenerated by syzkaller (https://github.com/google/syzkaller) > > #define _GNU_SOURCE > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Andrew Lunn
> Yep, registering multiple interfaces is wrong. The first board I tested > against only had a single MAC enabled (they can be disabled/hidden via > straps) so it just happened to work. Hi Steve Can you hide any/all via straps, or is 00.0 always guaranteed to exist? > The Intel C3xxx family

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Ido Schimmel
On Fri, Nov 30, 2018 at 08:17:04AM -0800, Eric Dumazet wrote: > On Fri, Nov 30, 2018 at 8:10 AM Dmitry Vyukov wrote: > > > > On Fri, Nov 30, 2018 at 4:02 PM, Ido Schimmel wrote: > > > On Fri, Nov 30, 2018 at 08:59:09AM -0700, David Ahern wrote: > > >> This does not repro for me: > > >> # ./a.out

[PATCH net] sctp: kfree_rcu asoc

2018-11-30 Thread Xin Long
In sctp_hash_transport/sctp_epaddr_lookup_transport, it dereferences a transport's asoc under rcu_read_lock while asoc is freed not after a grace period, which leads to a use-after-free panic. This patch fixes it by calling kfree_rcu to make asoc be freed after a grace period. Note that only the

Re: [PATCHv2 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Joe Stringer
On Thu, 29 Nov 2018 at 16:30, Joe Stringer wrote: > > David Ahern and Nicolas Dichtel report that the handling of the netns id > 0 is incorrect for the BPF socket lookup helpers: rather than finding > the netns with id 0, it is resolving to the current netns. This renders > the netns_id 0

Re: [PATCH iproute2] stats output

2018-11-30 Thread Roopa Prabhu
On Fri, Nov 30, 2018 at 10:12 AM Stephen Hemminger wrote: > > On Fri, 30 Nov 2018 14:33:49 +0100 > Alexis Vachette wrote: > > > When using: > > > > - ip -s link > > > > I think it should be better to print errors stats without adding -s > > option twice. > > > > This option print stats for each

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Dmitry Vyukov
On Fri, Nov 30, 2018 at 4:02 PM, Ido Schimmel wrote: > On Fri, Nov 30, 2018 at 08:59:09AM -0700, David Ahern wrote: >> This does not repro for me: >> # ./a.out >> Invalid address length 6 - must be 4 bytes >> RTNETLINK answers: No buffer space available >> RTNETLINK answers: Operation not

Re: [iproute PATCH] man: ip-route.8: Fix ENCAP references in synopsis

2018-11-30 Thread Phil Sutter
Hi Simon, On Fri, Nov 30, 2018 at 03:39:05PM +0100, Simon Horman wrote: > On Wed, Nov 28, 2018 at 12:12:32PM +0100, Phil Sutter wrote: > > The different encapsulation types are described in ENCAP_* > > non-terminals, but ENCAP definition lists them without the ENCAP_ > > prefix. Fix this for

Re: [PATCH 2/2] arm64: dts: clearfog-gt-8k: 1G eth PHY reset signal

2018-11-30 Thread Gregory CLEMENT
Hi Baruch, On mar., oct. 16 2018, Baruch Siach wrote: > This reset signal controls the Marvell 1512 1G PHY. > > Note that current implementation queries the PHY over the MDIO bus > (get_phy_device() call from of_mdiobus_register_phy()) before reset > signal deassert. If the PHY reset signal

Re: [PATCH 1/2] arm64: dts: clearfog-gt-8k: fix USB regulator gpio polarity

2018-11-30 Thread Gregory CLEMENT
Hi Baruch, On mar., oct. 16 2018, Baruch Siach wrote: > The fixed regulator driver ignores the gpio flags, so this change has > no practical effect in the current implementation. Fix it anyway to > correct the hardware description. > Applied on mvebu/dt64 Thanks, Gregory > Signed-off-by:

Re: [PATCH] net: tcp: add correct check for tcp_retransmit_skb()

2018-11-30 Thread Yuchung Cheng
On Fri, Nov 30, 2018 at 10:28 AM Sharath Chandra Vurukala wrote: > > when the tcp_retranmission_timer expires and tcp_retranmsit_skb is > called if the retranmsission fails due to local congestion, > backoff should not incremented. > > tcp_retransmit_skb() returns non-zero negative value in some

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Ido Schimmel
On Fri, Nov 30, 2018 at 08:59:09AM -0700, David Ahern wrote: > This does not repro for me: > # ./a.out > Invalid address length 6 - must be 4 bytes > RTNETLINK answers: No buffer space available > RTNETLINK answers: Operation not supported > Invalid address length 6 - must be 4 bytes > Invalid

[PATCH bpf-next 5/5] tools: bpftool: add owner_prog_type and owner_jited to bpftool output

2018-11-30 Thread Quentin Monnet
For prog array maps, the type of the owner program, and the JIT-ed state of that program, are available from the file descriptor information under /proc. Add them to "bpftool map show" output. Example output: # bpftool map show 158225: prog_array name jmp_table flags 0x0 key 4B

[PATCH bpf-next 4/5] tools: bpftool: mark offloaded programs more explicitly in plain output

2018-11-30 Thread Quentin Monnet
In bpftool (plain) output for "bpftool prog show" or "bpftool map show", an offloaded BPF object is simply denoted with "dev ifname", which is not really explicit. Change it with something that clearly shows the program is offloaded. While at it also add an additional space, as done between other

[PATCH bpf-next 2/5] tools: bpftool: fix bash completion for bpftool prog (attach|detach)

2018-11-30 Thread Quentin Monnet
Fix bash completion for "bpftool prog (attach|detach) PROG TYPE MAP" so that the list of indices proposed for MAP are map indices, and not PROG indices. Also use variables for map and prog reference types ("id", "pinned", and "tag" for programs). Fixes: b7d3826c2ed6 ("bpf: bpftool, add support

Re: [PATCH 3/3] dt-bindings: net: dsa: add new bindings MT7530

2018-11-30 Thread Florian Fainelli
Hi Greg, On 11/29/2018 11:57 PM, g...@kernel.org wrote: > From: Greg Ungerer > > Add descriptive entries for the new bindings introduced to support the > MT7530 implementation in the MediaTek MT7621 SoC. > > New bindings added for: > > mediatek,no-clock-regulator >

[PATCH 0/3] net: macb: DMA race condition fixes

2018-11-30 Thread Anssi Hannula
Hi all, Here are a couple of race condition fixes for the macb driver. The first two are issues observed on real HW. Anssi Hannula (3): net: macb: fix random memory corruption on RX with 64-bit DMA net: macb: fix dropped RX frames due to a race net: macb: add missing barriers

[PATCH 2/3] net: macb: fix dropped RX frames due to a race

2018-11-30 Thread Anssi Hannula
Bit RX_USED set to 0 in the address field allows the controller to write data to the receive buffer descriptor. The driver does not ensure the ctrl field is ready (cleared) when the controller sees the RX_USED=0 written by the driver. The ctrl field might only be cleared after the controller has

[PATCH 1/3] net: macb: fix random memory corruption on RX with 64-bit DMA

2018-11-30 Thread Anssi Hannula
64-bit DMA addresses are split in upper and lower halves that are written in separate fields on GEM. For RX, bit 0 of the address is used as the ownership bit (RX_USED). When the RX_USED bit is unset the controller is allowed to write data to the buffer. The driver does not guarantee that the

[PATCH 3/3] net: macb: add missing barriers when reading buffers

2018-11-30 Thread Anssi Hannula
When reading buffer descriptors on RX or on TX completion, an RX_USED/TX_USED bit is checked first to ensure that the descriptor has been populated. However, there are no memory barriers to ensure that the data protected by the RX_USED/TX_USED bit is up-to-date with respect to that bit. Fix that

Re: [iproute PATCH] ssfilter: Fix for inverted last expression

2018-11-30 Thread Eric Dumazet
On 11/29/2018 04:20 AM, Phil Sutter wrote: > When fixing for shift/reduce conflicts, possibility to invert the last > expression by prefixing with '!' or 'not' was accidentally removed. > > Fix this by allowing for expr to be an inverted expr so that any > reference to it in exprlist accepts

Re: [PATCH] net: tcp: add correct check for tcp_retransmit_skb()

2018-11-30 Thread Eric Dumazet
On 11/30/2018 10:28 AM, Sharath Chandra Vurukala wrote: > when the tcp_retranmission_timer expires and tcp_retranmsit_skb is > called if the retranmsission fails due to local congestion, > backoff should not incremented. > > tcp_retransmit_skb() returns non-zero negative value in some cases of

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Eric Dumazet
On Fri, Nov 30, 2018 at 7:46 AM Eric Dumazet wrote: > > On Fri, Nov 30, 2018 at 7:40 AM Eric Dumazet wrote: > > > > On Fri, Nov 30, 2018 at 7:36 AM David Ahern wrote: > > > > > > On 11/30/18 7:58 AM, Ido Schimmel wrote: > > > > Can you please share the reproducer (assuming it exists)? I don't

Re: [PATCH iproute2] stats output

2018-11-30 Thread David Ahern
On 11/30/18 11:12 AM, Stephen Hemminger wrote: > I can understand why you would want this, but it is changing the > behavior of an existing command that might be used in scripts. +1

[PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev

2018-11-30 Thread Anssi Hannula
When a PHY_HALTED phydev is resumed by phy_start(), it is set to PHY_RESUMING to wait for the link to come up. However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before autonegotiation was ever started by phy_state_machine(), autonegotiation remains unconfigured, i.e.

[PATCH 0/2] net: phy: fixes to PHY_HALTED handling

2018-11-30 Thread Anssi Hannula
Hi all, Here are a couple of fixes for PHY_HALTED/PHY_RESUMING handling. On a related note, it feels a bit strange that AFAICS phydevs will only be put to powerdown state (via PHY_HALTED) after the network interface has been brought up and down once. If the ethernet interface is never brought

[PATCH 1/2] net: phy: suspend phydev on PHY_HALTED even if there is no link

2018-11-30 Thread Anssi Hannula
When the phydev is put to PHY_HALTED (by e.g. phy_stop()) the state machine suspends the phydev to save power. However, this is wrongly inside a phydev->link check, causing the phydev not to be suspended if there was no link at the time of stopping it. Fix that by setting do_suspend regardless

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Steve Douthit
On 11/30/18 8:21 AM, Andrew Lunn wrote: > Hi Steve > > Cool to see another interface being made DSA capable. > >> +/** >> + * ixgbe_msca - Write the command register and poll for completion/timeout >> + * @hw: pointer to hardware structure >> + * @cmd: command register value to write >> + **/

Re: [PATCH net] sctp: kfree_rcu asoc

2018-11-30 Thread Marcelo Ricardo Leitner
On Sat, Dec 01, 2018 at 01:36:59AM +0800, Xin Long wrote: > In sctp_hash_transport/sctp_epaddr_lookup_transport, it dereferences > a transport's asoc under rcu_read_lock while asoc is freed not after > a grace period, which leads to a use-after-free panic. > > This patch fixes it by calling

WISHES A UNIQUE DAY.

2018-11-30 Thread Benjamin Haga
My dear I contacted you few days ago but couldn’t get your response; I like to share very vital information with you so do get back to me for details.

Re: [PATCH iproute2] stats output

2018-11-30 Thread Stephen Hemminger
On Fri, 30 Nov 2018 14:33:49 +0100 Alexis Vachette wrote: > When using: > > - ip -s link > > I think it should be better to print errors stats without adding -s > option twice. > > This option print stats for each network interfaces and we want to see > if something is off and especially

Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-30 Thread Xin Long
On Sat, Dec 1, 2018 at 12:23 AM Neil Horman wrote: > > On Fri, Nov 30, 2018 at 10:48:10PM +0900, Xin Long wrote: > > On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote: > > > > > > On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin Long wrote: > > > > On Thu, Nov 29, 2018 at 11:39 PM Neil Horman > >

Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-30 Thread Neil Horman
On Sat, Dec 01, 2018 at 03:53:26AM +0900, Xin Long wrote: > On Sat, Dec 1, 2018 at 12:23 AM Neil Horman wrote: > > > > On Fri, Nov 30, 2018 at 10:48:10PM +0900, Xin Long wrote: > > > On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote: > > > > > > > > On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin

Re: [PATCH iproute2] stats output

2018-11-30 Thread Stephen Hemminger
On Fri, 30 Nov 2018 20:22:35 +0100 Alexis Vachette wrote: > Hi Stephen, > > Thanks for your kind reply. > > It's sad to hear that, I am aware of your concern too. > > But it's not the best behavior for a network engineer. > > Is it possible to add a new option or everything is stone graved ?

[PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Willem de Bruijn
From: Petar Penkov The pkt_len field in qdisc_skb_cb stores the skb length as it will appear on the wire after segmentation. For byte accounting, this value is more accurate than skb->len. It is computed on entry to the TC layer, so only valid there. Allow read access to this field from BPF tc

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-30 Thread David Ahern
On 11/28/18 6:34 PM, Peter Oskolkov wrote: > On Wed, Nov 28, 2018 at 4:47 PM David Ahern wrote: >> >> On 11/28/18 5:22 PM, Peter Oskolkov wrote: >>> diff --git a/net/core/filter.c b/net/core/filter.c >>> index bd0df75dc7b6..17f3c37218e5 100644 >>> --- a/net/core/filter.c >>> +++

Re: consistency for statistics with XDP mode

2018-11-30 Thread David Ahern
On 11/30/18 1:30 PM, Michael S. Tsirkin wrote: I would like to see basic packets, bytes, and dropped counters tracked for Rx and Tx via the standard netdev counters for all devices. >> >> The problem of reporting XDP_DROP in the netedev drop counter is that >> they don't fit this

Re: [PATCH v3] ipv4: make DSCP values works with ip rules

2018-11-30 Thread David Miller
From: Pavel Balaev Date: Tue, 27 Nov 2018 13:07:10 +0300 > -#define IPTOS_RT_MASK(IPTOS_TOS_MASK & ~3) > +#define IPTOS_RT_MASK(IPTOS_DSCP_MASK & ~3) I was hoping my original feedback would have you actually go investigate why IPTOS_RT_MASK is defined the way that it is. I will

Re: [PATCHv2 net] sctp: update frag_point when stream_interleave is set

2018-11-30 Thread David Miller
From: Xin Long Date: Tue, 27 Nov 2018 19:11:50 +0800 > sctp_assoc_update_frag_point() should be called whenever asoc->pathmtu > changes, but we missed one place in sctp_association_init(). It would > cause frag_point is zero when sending data. > > As says in Jakub's reproducer, if sp->pathmtu

Re: [next] bonding: pass link-local packets to bonding master also.

2018-11-30 Thread Vincent Bernat
❦ 15 juillet 2018 19:12 -0700, Mahesh Bandewar : > Commit b89f04c61efe ("bonding: deliver link-local packets with > skb->dev set to link that packets arrived on") changed the behavior > of how link-local-multicast packets are processed. The change in > the behavior broke some legacy use cases

Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread David Miller
From: Alexei Starovoitov Date: Fri, 30 Nov 2018 13:58:20 -0800 > On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: >> +/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the >> + * verifier will allow any alignment whatsoever. This bypasses >> + * what

Re: [PATCHv2 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Alexei Starovoitov
On Thu, Nov 29, 2018 at 04:29:33PM -0800, Joe Stringer wrote: > David Ahern and Nicolas Dichtel report that the handling of the netns id > 0 is incorrect for the BPF socket lookup helpers: rather than finding > the netns with id 0, it is resolving to the current netns. This renders > the netns_id

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Eric Dumazet
On Fri, Nov 30, 2018 at 7:40 AM Eric Dumazet wrote: > > On Fri, Nov 30, 2018 at 7:36 AM David Ahern wrote: > > > > On 11/30/18 7:58 AM, Ido Schimmel wrote: > > > Can you please share the reproducer (assuming it exists)? I don't really > > > understand the fix. None of the functions you patched

Re: [PATCH net] rtnetlink: Refine sanity checks in rtnl_fdb_{add|del}

2018-11-30 Thread Ido Schimmel
On Fri, Nov 30, 2018 at 07:51:34AM -0800, Eric Dumazet wrote: > On Fri, Nov 30, 2018 at 7:46 AM Eric Dumazet wrote: > > > > On Fri, Nov 30, 2018 at 7:40 AM Eric Dumazet wrote: > > > > > > On Fri, Nov 30, 2018 at 7:36 AM David Ahern wrote: > > > > > > > > On 11/30/18 7:58 AM, Ido Schimmel wrote:

[PATCH bpf-next 0/5] tools: bpftool: fixes and small improvements

2018-11-30 Thread Quentin Monnet
Hi, Several items for bpftool are included in this set: the first three patches are fixes for bpftool itself and bash completion, while the last two slightly improve the information obtained when dumping programs or maps, on Daniel's suggestion. Please refer to individual commit logs for more

[PATCH bpf-next 1/5] tools: bpftool: use "/proc/self/" i.o. crafting links with getpid()

2018-11-30 Thread Quentin Monnet
The getpid() function is called in a couple of places in bpftool to craft links of the shape "/proc//...". Instead, it is possible to use the "/proc/self/" shortcut, which makes things a bit easier, in particular in jit_disasm.c. Do the replacement, and remove the includes of from the relevant

[PATCH bpf-next 3/5] tools: bpftool: fix bash completion for new map types (queue and stack)

2018-11-30 Thread Quentin Monnet
Commit 197c2dac74e4 ("bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to bpftool-map") added support for queue and stack eBPF map types in bpftool map handling. Let's update the bash completion accordingly. Fixes: 197c2dac74e4 ("bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to

[PATCH net] net/ibmvnic: Fix RTNL deadlock during device reset

2018-11-30 Thread Thomas Falcon
Commit a5681e20b541 ("net/ibmnvic: Fix deadlock problem in reset") made the change to hold the RTNL lock during driver reset but still calls netdev_notify_peers, which results in a deadlock. Instead, use call_netdevice_notifiers, which is functionally the same except that it does not take the RTNL

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Florian Fainelli
On 11/30/2018 9:34 AM, Steve Douthit wrote: > On 11/30/18 11:34 AM, Andrew Lunn wrote: >>> Yep, registering multiple interfaces is wrong. The first board I tested >>> against only had a single MAC enabled (they can be disabled/hidden via >>> straps) so it just happened to work. >> >> Hi Steve

Re: [PATCH net] sctp: kfree_rcu asoc

2018-11-30 Thread Neil Horman
On Sat, Dec 01, 2018 at 01:36:59AM +0800, Xin Long wrote: > In sctp_hash_transport/sctp_epaddr_lookup_transport, it dereferences > a transport's asoc under rcu_read_lock while asoc is freed not after > a grace period, which leads to a use-after-free panic. > > This patch fixes it by calling

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Steve Douthit
On 11/30/18 12:43 PM, Florian Fainelli wrote: > > > On 11/30/2018 9:34 AM, Steve Douthit wrote: >> On 11/30/18 11:34 AM, Andrew Lunn wrote: Yep, registering multiple interfaces is wrong. The first board I tested against only had a single MAC enabled (they can be disabled/hidden via

Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-30 Thread Neil Horman
On Sat, Dec 01, 2018 at 03:53:26AM +0900, Xin Long wrote: > On Sat, Dec 1, 2018 at 12:23 AM Neil Horman wrote: > > > > On Fri, Nov 30, 2018 at 10:48:10PM +0900, Xin Long wrote: > > > On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote: > > > > > > > > On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin

Re: [PATCH iproute2] ss: add support for bytes_sent, bytes_retrans, dsack_dups and reord_seen

2018-11-30 Thread Stefano Brivio
Hi David, On Thu, 29 Nov 2018 11:51:48 -0700 David Ahern wrote: > On 11/29/18 11:50 AM, Stephen Hemminger wrote: > > PS: ss still doesn't support JSON output, given the volume of output it > > would be good. > > I thought Stefano was investigating it as an alternative to the 'display >

Re: [PATCH v2 net-next] cxgb4: number of VFs supported is not always 16

2018-11-30 Thread David Miller
From: Ganesh Goudar Date: Tue, 27 Nov 2018 14:59:06 +0530 > Total number of VFs supported by PF is used to determine the last > byte of VF's mac address. Number of VFs supported is not always > 16, use the variable nvfs to get the number of VFs supported > rather than hard coding it to 16. > >

Re: [PATCH net-next 00/11] nfp: update TX path to enable repr offloads

2018-11-30 Thread David Miller
From: Jakub Kicinski Date: Tue, 27 Nov 2018 22:24:47 -0800 > This set starts with three micro optimizations to the TX path. > The improvement is measurable, but below 1% of CPU utilization. > > Patches 4 - 9 add basic TX offloads to representor devices, like > checksum offload or TSO, and

Re: [PATCH net-next 0/2] rtnetlink: avoid a warning in rtnl_newlink()

2018-11-30 Thread David Miller
From: Jakub Kicinski Date: Tue, 27 Nov 2018 22:32:29 -0800 > I've been hoping for some time that someone more competent would fix > the stack frame size warning in rtnl_newlink(), but looks like I'll > have to take a stab at it myself :) That's the only warning I see > in most of my builds. >

Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread Alexei Starovoitov
On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: > > Often we want to write tests cases that check things like bad context > offset accesses. And one way to do this is to use an odd offset on, > for example, a 32-bit load. > > This unfortunately triggers the alignment checks first

Re: [PATCH bpf-next 0/5] tools: bpftool: fixes and small improvements

2018-11-30 Thread Alexei Starovoitov
On Fri, Nov 30, 2018 at 04:25:43PM +, Quentin Monnet wrote: > Hi, > Several items for bpftool are included in this set: the first three patches > are fixes for bpftool itself and bash completion, while the last two > slightly improve the information obtained when dumping programs or maps, on >

Re: [PATCH net-next 1/2] ixgbe: register a mdiobus

2018-11-30 Thread Andrew Lunn
> 'cards_found' doesn't exist for the ixgbe driver. Agh, sorry, i was looking at ixgb, not ixgbe. Andrew

Re: [PATCH net] net: aquantia: fix rx checksum offload bits

2018-11-30 Thread David Miller
From: Igor Russkikh Date: Tue, 27 Nov 2018 14:51:17 + > From: Dmitry Bogdanov > > The last set of csum offload fixes had a leak: > > Checksum enabled status bits from rx descriptor were incorrectly > interpreted. Consequently all the other valid logic worked on zero bits. > That caused rx

Re: [PATCH bpf] bpf: Fix verifier log string check for bad alignment.

2018-11-30 Thread Alexei Starovoitov
On Wed, Nov 28, 2018 at 10:33:53PM -0800, David Miller wrote: > > The message got changed a lot time ago. > > This was responsible for 36 test case failures on sparc64. > > Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") > Signed-off-by: David S. Miller Applied to bpf tree.

[PATCH net-next v4 0/3] udp msg_zerocopy

2018-11-30 Thread Willem de Bruijn
From: Willem de Bruijn Enable MSG_ZEROCOPY for udp sockets Patch 1/3 is the main patch, a rework of RFC patch http://patchwork.ozlabs.org/patch/899630/ more details in the patch commit message Patch 2/3 is an optimization to remove a branch from the UDP hot path and

[PATCH net-next v4 1/3] udp: msg_zerocopy

2018-11-30 Thread Willem de Bruijn
From: Willem de Bruijn Extend zerocopy to udp sockets. Allow setting sockopt SO_ZEROCOPY and interpret flag MSG_ZEROCOPY. This patch was previously part of the zerocopy RFC patchsets. Zerocopy is not effective at small MTU. With segmentation offload building larger datagrams, the benefit of

[PATCH net-next v4 3/3] selftests: extend zerocopy tests to udp

2018-11-30 Thread Willem de Bruijn
From: Willem de Bruijn Both msg_zerocopy and udpgso_bench have udp zerocopy variants. Exercise these as part of the standard kselftest run. With udp, msg_zerocopy has no control channel. Ensure that the receiver exits after the sender by accounting for the initial delay in starting them (in

[PATCH net-next v4 2/3] udp: elide zerocopy operation in hot path

2018-11-30 Thread Willem de Bruijn
From: Willem de Bruijn With MSG_ZEROCOPY, each skb holds a reference to a struct ubuf_info. Release of its last reference triggers a completion notification. The TCP stack in tcp_sendmsg_locked holds an extra ref independent of the skbs, because it can build, send and free skbs within its loop,

Re: consistency for statistics with XDP mode

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 08:10:58PM +, Saeed Mahameed wrote: > On Thu, 2018-11-22 at 18:00 +0100, Toke Høiland-Jørgensen wrote: > > David Ahern writes: > > > > > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: > > > > Saeed Mahameed writes: > > > > > > > > > > > I'd say it sounds

Re: [PATCH net 2/2] nfp: flower: prevent offload if rhashtable insert fails

2018-11-30 Thread David Miller
From: Jakub Kicinski Date: Tue, 27 Nov 2018 14:04:12 -0800 > From: John Hurley > > For flow offload adds, if the rhash insert code fails, the flow will still > have been offloaded but the reference to it in the driver freed. > > Re-order the offload setup calls to ensure that a flow will only

Re: [PATCH net 1/2] nfp: flower: release metadata on offload failure

2018-11-30 Thread David Miller
From: Jakub Kicinski Date: Tue, 27 Nov 2018 14:04:11 -0800 > From: John Hurley > > Calling nfp_compile_flow_metadata both assigns a stats context and > increments a ref counter on (or allocates) a mask id table entry. These > are released by the nfp_modify_flow_metadata call on flow deletion,

Re: [PATCH v4] net: Add trace events for all receive exit points

2018-11-30 Thread David Miller
From: Geneviève Bastien Date: Tue, 27 Nov 2018 12:52:39 -0500 > Trace events are already present for the receive entry points, to indicate > how the reception entered the stack. > > This patch adds the corresponding exit trace events that will bound the > reception such that all events

Re: [PATCH 2/2] net: phy: ensure autoneg is configured when resuming a phydev

2018-11-30 Thread Heiner Kallweit
On 30.11.2018 19:45, Anssi Hannula wrote: > When a PHY_HALTED phydev is resumed by phy_start(), it is set to > PHY_RESUMING to wait for the link to come up. > > However, if the phydev was put to PHY_HALTED (by e.g. phy_stop()) before > autonegotiation was ever started by phy_state_machine(),

Re: consistency for statistics with XDP mode

2018-11-30 Thread Saeed Mahameed
On Thu, 2018-11-22 at 18:00 +0100, Toke Høiland-Jørgensen wrote: > David Ahern writes: > > > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: > > > Saeed Mahameed writes: > > > > > > > > > I'd say it sounds reasonable to include XDP in the normal > > > > > > traffic > > > > > > counters, but

Re: [Patch net-next 2/2] net: dump whole skb data in netdev_rx_csum_fault()

2018-11-30 Thread Saeed Mahameed
On Thu, 2018-11-22 at 17:45 -0800, Cong Wang wrote: > On Wed, Nov 21, 2018 at 11:33 AM Saeed Mahameed > wrote: > > On Wed, 2018-11-21 at 10:26 -0800, Eric Dumazet wrote: > > > On Wed, Nov 21, 2018 at 10:17 AM Cong Wang < > > > xiyou.wangc...@gmail.com> > > > wrote: > > > > On Wed, Nov 21, 2018 at

Re: [PATCH net-next] net/flow_dissector: correct comments on enum flow_dissector_key_id

2018-11-30 Thread David Miller
From: Edward Cree Date: Tue, 27 Nov 2018 15:40:59 + > There are no such structs flow_dissector_key_flow_vlan or > flow_dissector_key_flow_tags, the actual structs used are struct > flow_dissector_key_vlan and struct flow_dissector_key_tags. So correct the > comments against

Re: [PATCH v4 3/4] libbpf: add bpf_prog_test_run_xattr

2018-11-30 Thread Alexei Starovoitov
On Wed, Nov 28, 2018 at 04:53:11PM +, Lorenz Bauer wrote: > Add a new function, which encourages safe usage of the test interface. > bpf_prog_test_run continues to work as before, but should be considered > unsafe. > > Signed-off-by: Lorenz Bauer .. > + > +LIBBPF_API int

Re: [PATCH v2 net] bonding: fix 802.3ad state sent to partner when unbinding slave

2018-11-30 Thread David Miller
From: Toni Peltonen Date: Tue, 27 Nov 2018 16:56:57 +0200 > Previously when unbinding a slave the 802.3ad implementation only told > partner that the port is not suitable for aggregation by setting the port > aggregation state from aggregatable to individual. This is not enough. If the >

Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Song Liu
On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn wrote: > > From: Petar Penkov > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > appear on the wire after segmentation. For byte accounting, this value > is more accurate than skb->len. It is computed on entry to the TC >

Re: [PATCH net] bpf: uninitialized variables in test code

2018-11-30 Thread Song Liu
On Thu, Nov 29, 2018 at 2:28 AM Dan Carpenter wrote: > > Smatch complains that if bpf_test_run() fails with -ENOMEM at the > begining then the "duration" is uninitialized. We then copy the > unintialized variables to the user inside the bpf_test_finish() > function. The functions require

Re: [PATCHv2 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Joe Stringer
On Fri, 30 Nov 2018 at 15:27, Alexei Starovoitov wrote: > > On Fri, Nov 30, 2018 at 03:18:25PM -0800, Joe Stringer wrote: > > On Fri, 30 Nov 2018 at 14:42, Alexei Starovoitov > > wrote: > > > > > > On Thu, Nov 29, 2018 at 04:29:33PM -0800, Joe Stringer wrote: > > > > David Ahern and Nicolas

Re: [PATCHv2 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Alexei Starovoitov
On Fri, Nov 30, 2018 at 03:18:25PM -0800, Joe Stringer wrote: > On Fri, 30 Nov 2018 at 14:42, Alexei Starovoitov > wrote: > > > > On Thu, Nov 29, 2018 at 04:29:33PM -0800, Joe Stringer wrote: > > > David Ahern and Nicolas Dichtel report that the handling of the netns id > > > 0 is incorrect for

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-30 Thread Peter Oskolkov
Thanks, David! This is for egress only, so I'll add an appropriate check. I'll also address your other comments/concerns in a v2 version of this patchset. On Fri, Nov 30, 2018 at 12:08 PM David Ahern wrote: > > On 11/28/18 6:34 PM, Peter Oskolkov wrote: > > On Wed, Nov 28, 2018 at 4:47 PM David

Re: [PATCH bpf-next] bpf: allow BPF read access to qdisc pkt_len

2018-11-30 Thread Willem de Bruijn
On Fri, Nov 30, 2018 at 5:48 PM Song Liu wrote: > > On Fri, Nov 30, 2018 at 12:09 PM Willem de Bruijn > wrote: > > > > From: Petar Penkov > > > > The pkt_len field in qdisc_skb_cb stores the skb length as it will > > appear on the wire after segmentation. For byte accounting, this value > > is

Re: consistency for statistics with XDP mode

2018-11-30 Thread Saeed Mahameed
On Fri, 2018-11-30 at 15:30 -0500, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 08:10:58PM +, Saeed Mahameed wrote: > > On Thu, 2018-11-22 at 18:00 +0100, Toke Høiland-Jørgensen wrote: > > > David Ahern writes: > > > > > > > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: > > > > >

Re: [PATCH net-next] net: reorder flowi_common fields to avoid holes

2018-11-30 Thread David Miller
From: Paolo Abeni Date: Wed, 28 Nov 2018 17:37:53 +0100 > the flowi* structures are used and memsetted by server functions > in critical path. Currently flowi_common has a couple of holes that > we can eliminate reordering the struct fields. As a side effect, > both flowi4 and flowi6 shrink by 8

Re: [PATCHv3 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Joey Pabalinas
On Fri, Nov 30, 2018 at 02:36:57PM -1000, Joey Pabalinas wrote: > On Fri, Nov 30, 2018 at 03:32:20PM -0800, Joe Stringer wrote: > > + * the netns associated with the *ctx*. *netns* values beyond the > > + * range of 32-bit integers are reserved for future use. > > Would adding a

Re: [Patch net] mlx5: fix get_ip_proto()

2018-11-30 Thread David Miller
From: Cong Wang Date: Wed, 28 Nov 2018 15:04:05 -0800 > IP header is not necessarily located right after struct ethhdr, > there could be multiple 802.1Q headers in between, this is why > we call __vlan_get_protocol(). > > Fixes: fe1dc069990c ("net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP

Re: [PATCH net] tun: forbid iface creation with rtnl ops

2018-11-30 Thread David Miller
From: Nicolas Dichtel Date: Thu, 29 Nov 2018 14:45:39 +0100 > It's not supported right now (the goal of the initial patch was to support > 'ip link del' only). > > Before the patch: > $ ip link add foo type tun > [ 239.632660] BUG: unable to handle kernel NULL pointer dereference at >

[PATCHv3 bpf 1/2] bpf: Support sk lookup in netns with id 0

2018-11-30 Thread Joe Stringer
David Ahern and Nicolas Dichtel report that the handling of the netns id 0 is incorrect for the BPF socket lookup helpers: rather than finding the netns with id 0, it is resolving to the current netns. This renders the netns_id 0 inaccessible. To fix this, adjust the API for the netns to treat

[PATCHv3 bpf 2/2] bpf: Improve socket lookup reuseport documentation

2018-11-30 Thread Joe Stringer
Improve the wording around socket lookup for reuseport sockets, and ensure that both bpf.h headers are in sync. Signed-off-by: Joe Stringer --- include/uapi/linux/bpf.h | 4 tools/include/uapi/linux/bpf.h | 8 2 files changed, 8 insertions(+), 4 deletions(-) diff --git

Re: BPF uapi structures and 32-bit

2018-11-30 Thread Daniel Borkmann
On 12/01/2018 12:33 AM, Alexei Starovoitov wrote: > On Wed, Nov 28, 2018 at 11:02:00AM -0800, David Miller wrote: >> From: Daniel Borkmann >> Date: Wed, 28 Nov 2018 11:34:55 +0100 >> >>> Yeah fully agree. Thinking diff below should address it, do you >>> have a chance to give this a spin for

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-30 Thread Peter Oskolkov
On Fri, Nov 30, 2018 at 3:52 PM David Ahern wrote: > > On 11/30/18 4:35 PM, Peter Oskolkov wrote: > > Thanks, David! This is for egress only, so I'll add an appropriate > > check. I'll also address your other comments/concerns in a v2 version > > of this patchset. > > Why are you limiting this to

Re: [PATCH net-next] tun: implement carrier change

2018-11-30 Thread David Miller
From: Nicolas Dichtel Date: Wed, 28 Nov 2018 19:12:56 +0100 > The userspace may need to control the carrier state. > > Signed-off-by: Nicolas Dichtel > Signed-off-by: Didier Pallard Applied.

Re: [PATCH net 0/3] fixes in timeout and retransmission accounting

2018-11-30 Thread David Miller
From: Yuchung Cheng Date: Wed, 28 Nov 2018 16:06:42 -0800 > This patch set has assorted fixes of minor accounting issues in > timeout, window probe, and retransmission stats. Looks good, series applied.

  1   2   >