[RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Douglas Anderson
In general when you've got a flag communicating that "something needs to be done" you want to clear that flag _before_ doing the task. If you clear the flag _after_ doing the task you end up with the risk that this will happen: 1. Requester sets flag saying task A needs to be done. 2. Worker come

[PATCH V2 net 7/7] net: hns3: Fixes the premature exit of loop when matching clients

2017-09-19 Thread Salil Mehta
From: Lipeng When register/unregister ae_dev, ae_dev should match all client in the client_list. Enet and roce can co-exists together so we should continue checking for enet and roce presence together. So break should not be there. Above caused problems in loading and unloading of modules. Fixe

[PATCH V2 net 6/7] net: hns3: Fixes the default VLAN-id of PF

2017-09-19 Thread Salil Mehta
From: Lipeng When there is no vlan id in the packets, hardware will treat the vlan id as 0 and look for the mac_vlan table. This patch set the default vlan id of PF as 0. Without this config, it will fail when look for mac_vlan table, and hardware will drop packets. Fixes: 6427264ef330 ("net: hn

[PATCH V2 net 4/7] net: hns3: Fixes the initialization of MAC address in hardware

2017-09-19 Thread Salil Mehta
From: Lipeng This patch fixes the initialization of MAC address, fetched from HNS3 firmware i.e. when it is not randomly generated, to the HNS3 hardware. Fixes: ca60906d2795 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Lipeng Signed-off-by: Salil Mehta --- d

[PATCH V2 net 3/7] net: hns3: Fixes ring-to-vector map-and-unmap command

2017-09-19 Thread Salil Mehta
From: Lipeng This patch fixes the vector-to-ring map and unmap command and adds INT_GL(for, Gap Limiting Interrupts) and VF id to it as required by the hardware interface. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng Signed-

[PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API

2017-09-19 Thread Salil Mehta
This patch replaces the ethernet address copy instance with more appropriate ether_addr_copy() function. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1

[PATCH V2 net 2/7] net: hns3: Fixes the command used to unmap ring from vector

2017-09-19 Thread Salil Mehta
From: Lipeng This patch fixes the IMP command being used to unmap the vector from the corresponding ring. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lipeng Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3

[PATCH V2 net 0/7] Bug fixes for the HNS3 Ethernet Driver for Hip08 SoC

2017-09-19 Thread Salil Mehta
This patch set presents some bug fixes for the HNS3 Ethernet driver identified during internal testing & stabilization efforts. Change Log: Patch V2: Resolved comments from Leon Romanovsky Patch V1: Initial Submit Lipeng (6): net: hns3: Fixes initialization of phy address from firmware net: h

[PATCH V2 net 1/7] net: hns3: Fixes initialization of phy address from firmware

2017-09-19 Thread Salil Mehta
From: Lipeng Default phy address of every port is 0. Therefore, phy address for each port need to be fetched from firmware and device initialized with fetched non-default phy address. Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Lip

Re: [PATCH net v2] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-19 Thread Guillaume Nault
On Tue, Sep 19, 2017 at 03:40:40PM +0200, Sabrina Dubroca wrote: > If we try to delete the same tunnel twice, the first delete operation > does a lookup (l2tp_tunnel_get), finds the tunnel, calls > l2tp_tunnel_delete, which queues it for deletion by > l2tp_tunnel_del_work. > > The second delete op

Re: [RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Guenter Roeck
On Tue, Sep 19, 2017 at 9:15 AM, Douglas Anderson wrote: > Every once in a while when my system is under a bit of stress I see > some spammy messages show up in my logs that say: > > kevent X may have been dropped > > As far as I can tell these messages aren't terribly useful. The > comments ar

Re: [PATCH RFC V1 net-next 0/6] Time based packet transmission

2017-09-19 Thread Richard Cochran
On Tue, Sep 19, 2017 at 04:43:02PM +0200, Miroslav Lichvar wrote: > If I understand it correctly, this also allows us to make a PTP/NTP > "one-step" clock with HW that doesn't support it directly. Cool, yeah, I hadn't thought of that, but it would work... Thanks, Richard

[PATCH net] tcp: fastopen: fix on syn-data transmit failure

2017-09-19 Thread Eric Dumazet
From: Eric Dumazet Our recent change exposed a bug in TCP Fastopen Client that syzkaller found right away [1] When we prepare skb with SYN+DATA, we attempt to transmit it, and we update socket state as if the transmit was a success. In socket RTX queue we have two skbs, one with the SYN alone,

[PATCH net-next 1/4] qed: Add iWARP enablement support

2017-09-19 Thread Michal Kalderon
This patch is the last of the initial iWARP patch series. It adds the possiblity to actually detect iWARP from the device and enable it in the critical locations which basically make iWARP available. It wasn't submitted until now as iWARP hadn't been accepted into the rdma tree. Signed-off-by: Mi

[PATCH net-next 2/4] qed: Add iWARP out of order support

2017-09-19 Thread Michal Kalderon
iWARP requires OOO support which is already provided by the ll2 interface (until now was used only for iSCSI offload). The changes mostly include opening a ll2 dedicated connection for OOO and notifiying the FW about the handle id. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- d

[PATCH net-next 0/4] qed: iWARP fixes and enhancements

2017-09-19 Thread Michal Kalderon
This patch series includes several fixes and enhancements related to iWARP. Patch #1 is actually the last of the initial iWARP submission. It has been delayed until now as I wanted to make sure that qedr supports iWARP prior to enabling iWARP device detection. iWARP changes in RDMA tree have been

[PATCH] net: compat: assert the size of cmsg copied in is as expected

2017-09-19 Thread Meng Xu
The actual length of cmsg fetched in during the second loop (i.e., kcmsg - kcmsg_base) could be different from what we get from the first loop (i.e., kcmlen). The main reason is that the two get_user() calls in the two loops (i.e., get_user(ucmlen, &ucmsg->cmsg_len) and __get_user(ucmlen, &ucmsg->

[PATCH net-next 4/4] qed: iWARP - Add check for errors on a SYN packet

2017-09-19 Thread Michal Kalderon
A SYN packet which arrives with errors from FW should be dropped. This required adding an additional field to the ll2 rx completion data. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 8 drivers/net/ethernet/qlogic/qed/qed_l

[PATCH net-next 3/4] qed: Fix maximum number of CQs for iWARP

2017-09-19 Thread Michal Kalderon
The maximum number of CQs supported is bound to the number of connections supported, which differs between RoCE and iWARP. This fixes a crash that occurred in iWARP when running 1000 sessions using perftest. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlo

[PATCH] net: emac: Fix napi poll list corruption

2017-09-19 Thread Christian Lamparter
This patch is pretty much a carbon copy of commit 3079c652141f ("caif: Fix napi poll list corruption") with "caif" replaced by "emac". The commit d75b1ade567f ("net: less interrupt masking in NAPI") breaks emac. It is now required that if the entire budget is consumed when poll returns, the napi

Re: [PATCH net] bpf: do not disable/enable BH in bpf_map_free_id()

2017-09-19 Thread Martin KaFai Lau
On Tue, Sep 19, 2017 at 04:15:59PM +, Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller reported following splat [1] > > Since hard irq are disabled by the caller, bpf_map_free_id() > should not try to enable/disable BH. > > Another solution would be to change htab_map_delete_elem() to

Re: [PATCH] VSOCK: fix uapi/linux/vm_sockets.h incomplete types

2017-09-19 Thread David Miller
From: Stefan Hajnoczi Date: Mon, 18 Sep 2017 16:21:00 +0100 > On Fri, Sep 15, 2017 at 02:14:32PM -0700, David Miller wrote: >> > diff --git a/include/uapi/linux/vm_sockets.h >> > b/include/uapi/linux/vm_sockets.h >> > index b4ed5d895699..4ae5c625ac56 100644 >> > --- a/include/uapi/linux/vm_socke

Re: [PATCH net] MAINTAINERS: Remove Yuval Mintz from maintainers list

2017-09-19 Thread David Miller
From: Date: Tue, 19 Sep 2017 12:54:34 +0300 > From: Ariel Elior > > Remove Yuval from maintaining the bnx2x & qed* modules as he is no longer > working for the company. Thanks Yuval for your huge contributions and > tireless efforts over the many years and various companies. > > Ariel > Signed

Re: [RFC PATCH 3/3] usbnet: Fix memory leak when rx_submit() fails

2017-09-19 Thread Bjørn Mork
Douglas Anderson writes: > If rx_submit() returns an error code then nobody calls usb_free_urb(). > That means it's leaked. Nope. rx_submit() will call usb_free_urb() before returning an error: static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) .. if (!skb) {

Re: [PATCH net-next 07/14] gtp: Support encapsulation of IPv6 packets

2017-09-19 Thread David Miller
From: Harald Welte Date: Tue, 19 Sep 2017 20:12:45 +0800 > Hi Dave, > > On Mon, Sep 18, 2017 at 09:19:08PM -0700, David Miller wrote: > >> > +static inline u32 ipv6_hashfn(const struct in6_addr *a) >> > +{ >> > + return __ipv6_addr_jhash(a, gtp_h_initval); >> > +} >> >> I know you are just fo

Re: [PATCH net-next 03/14] gtp: Call common functions to get tunnel routes and add dst_cache

2017-09-19 Thread David Miller
From: Harald Welte Date: Tue, 19 Sep 2017 20:09:42 +0800 > So I guess you're asking us to document that rationale as form of a > source code comment ? Yes that would make ignoring the potential changing of the non-const 'saddr' argument at least be documented.

Re: [PATCH net-next 2/4] qed: Add iWARP out of order support

2017-09-19 Thread Leon Romanovsky
On Tue, Sep 19, 2017 at 08:26:17PM +0300, Michal Kalderon wrote: > iWARP requires OOO support which is already provided by the ll2 > interface (until now was used only for iSCSI offload). > The changes mostly include opening a ll2 dedicated connection for > OOO and notifiying the FW about the handl

Re: [PATCH net-next 3/4] qed: Fix maximum number of CQs for iWARP

2017-09-19 Thread Leon Romanovsky
On Tue, Sep 19, 2017 at 08:26:18PM +0300, Michal Kalderon wrote: > The maximum number of CQs supported is bound to the number > of connections supported, which differs between RoCE and iWARP. > > This fixes a crash that occurred in iWARP when running 1000 sessions > using perftest. > > Signed-off-b

[PATCH net] net: change skb->mac_header when Generic XDP calls adjust_head

2017-09-19 Thread Edward Cree
Since XDP's view of the packet includes the MAC header, moving the start- of-packet with bpf_xdp_adjust_head needs to also update the offset of the MAC header (which is relative to skb->head, not to the skb->data that was changed). Without this, tcpdump sees packets starting from the old MAC hea

Re: [RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Bjørn Mork
Douglas Anderson writes: > Every once in a while when my system is under a bit of stress I see > some spammy messages show up in my logs that say: > > kevent X may have been dropped > > As far as I can tell these messages aren't terribly useful. I agree, FWIW. These messages just confuse users

[PATCH net-next v3 06/12] net: dsa: b53: Move Broadcom header setup to b53

2017-09-19 Thread Florian Fainelli
The code to enable Broadcom tags/headers is largely switch independent, and in preparation for enabling it for multiple devices with b53, move the code we have in bcm_sf2.c to b53_common.c Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 47

[PATCH net-next v3 00/12] net: dsa: b53/bcm_sf2 cleanups

2017-09-19 Thread Florian Fainelli
Hi all, This patch series is a first pass set of clean-ups to reduce the number of LOCs between b53 and bcm_sf2 and sharing as many functions as possible. There is a number of additional cleanups queued up locally that require more thorough testing. Thanks! Changes in v3: - remove one extra ar

[PATCH net-next v3 07/12] net: dsa: b53: Define EEE register page

2017-09-19 Thread Florian Fainelli
In preparation for migrating the EEE code from bcm_sf2 to b53, define the full EEE register page and offsets within that page. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_regs.h | 41 + 1 file changed, 41 insert

[PATCH net-next v3 08/12] net: dsa: b53: Move EEE functions to b53

2017-09-19 Thread Florian Fainelli
Move the bcm_sf2 EEE-related functions to the b53 driver because this is shared code amongst Gigabit capable switch, only 5325 and 5365 are too old to support that. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 63

[PATCH net-next v3 12/12] net: dsa: bcm_sf2: Utilize b53_{enable,disable}_port

2017-09-19 Thread Florian Fainelli
Export b53_{enable,disable}_port and use these two functions in bcm_sf2_port_setup and bcm_sf2_port_disable. The generic functions cannot be used without wrapping because we need to manage additional switch integration details (PHY, Broadcom tag etc.). Reviewed-by: Vivien Didelot Signed-off-by: F

[PATCH net-next v3 03/12] net: dsa: b53: Defer port enabling to calling port_enable

2017-09-19 Thread Florian Fainelli
There is no need to configure the enabled ports once in b53_setup() and then a second time around when dsa_switch_ops::port_enable is called, just do it when port_enable is called which is better in terms of power consumption and correctness. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fai

[PATCH net-next v3 09/12] net: dsa: b53: Wire-up EEE

2017-09-19 Thread Florian Fainelli
Add support for enabling and disabling EEE, as well as re-negotiating it in .adjust_link() and in .port_enable(). Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/dsa/b53/

[PATCH net-next v3 11/12] net: dsa: bcm_sf2: Use SF2_NUM_EGRESS_QUEUES for CFP

2017-09-19 Thread Florian Fainelli
The magic number 8 in 3 locations in bcm_sf2_cfp.c actually designates the number of switch port egress queues, so use that define instead of open-coding it. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH net-next v3 10/12] net: dsa: b53: Export b53_imp_vlan_setup()

2017-09-19 Thread Florian Fainelli
bcm_sf2 and b53 do exactly the same thing, so share that piece. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 3 ++- drivers/net/dsa/b53/b53_priv.h | 1 + drivers/net/dsa/bcm_sf2.c| 23 +-- 3 files changed, 4 i

[PATCH net-next v3 04/12] net: dsa: bcm_sf2: Defer port enabling to calling port_enable

2017-09-19 Thread Florian Fainelli
There is no need to configure the enabled ports once in bcm_sf2_sw_setup() and then a second time around when dsa_switch_ops::port_enable is called, just do it when port_enable is called which is better in terms of power consumption and correctness. Reviewed-by: Vivien Didelot Signed-off-by: Flor

[PATCH net-next v3 05/12] net: dsa: b53: Use a macro to define I/O operations

2017-09-19 Thread Florian Fainelli
Instead of repeating the same pattern: acquire mutex, read/write, release mutex, define a macro: b53_build_op() which takes the type (read|write), I/O size, and value (scalar or pointer). This helps with fixing bugs that could exist (e.g: missing barrier, lock etc.). Reviewed-by: Vivien Didelot S

[PATCH net-next v3 01/12] net: dsa: b53: Remove is_cpu_port()

2017-09-19 Thread Florian Fainelli
This is not used anywhere, so remove it. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_priv.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index 01bd8cbe9a3f..7528b22aeb03 100644

[PATCH net-next v3 02/12] net: dsa: b53: Make b53_enable_cpu_port() take a port argument

2017-09-19 Thread Florian Fainelli
In preparation for future changes allowing the configuring of multiple CPU ports, make b53_enable_cpu_port() take a port argument. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

Re: [PATCH net-next 2/4] net: dsa: setup master ethtool unconditionally

2017-09-19 Thread Florian Fainelli
On 09/19/2017 08:56 AM, Vivien Didelot wrote: > When a DSA switch tree is meant to be applied, it already has a CPU > port. Thus remove the condition of dst->cpu_dp. > > Moreover, the next lines access dst->cpu_dp unconditionally. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli

Re: [PATCH net-next 3/4] net: dsa: setup master ethtool after dsa_ptr

2017-09-19 Thread Florian Fainelli
On 09/19/2017 08:56 AM, Vivien Didelot wrote: > DSA overrides the master's ethtool ops so that we can inject its CPU > port's statistics. Because of that, we need to setup the ethtool ops > after the master's dsa_ptr pointer has been assigned, not before. Yes, good point, technically this is a bug

Re: pull-request: mac80211 2017-11-19

2017-09-19 Thread David Miller
From: Johannes Berg Date: Tue, 19 Sep 2017 09:20:47 +0200 > Here's a new set of two small changes to prevent null pointer > dereferences on malformed netlink messages. > > Please pull and let me know if there's any problem. Pulled, thank you.

Re: [PATCH net-next 05/14] gtp: Remove special mtu handling

2017-09-19 Thread Tom Herbert
On Tue, Sep 19, 2017 at 4:42 AM, Harald Welte wrote: > Hi Tom, > > On Mon, Sep 18, 2017 at 05:38:55PM -0700, Tom Herbert wrote: >> Removes MTU handling in gtp_build_skb_ip4. This is non standard relative >> to how other tunneling protocols handle MTU. The model espoused is that >> the inner interf

Re: [PATCH 2/3] selftests: actually run the various net selftests

2017-09-19 Thread Willem de Bruijn
On Tue, Sep 19, 2017 at 9:34 AM, Josef Bacik wrote: > On Mon, Sep 18, 2017 at 04:14:41PM -0600, Shuah Khan wrote: >> On 09/18/2017 11:32 AM, jo...@toxicpanda.com wrote: >> > From: Josef Bacik >> > >> > These self tests are just self contained binaries, they are not run by >> > any of the scripts

Re: [REGRESSION] Warning in tcp_fastretrans_alert() of net/ipv4/tcp_input.c

2017-09-19 Thread Yuchung Cheng
On Tue, Sep 19, 2017 at 4:04 AM, Oleksandr Natalenko wrote: > Hi. > > 18.09.2017 23:40, Yuchung Cheng wrote: >> >> I assume this kernel does not have the patch that Neal proposed in his >> first reply? > > > Correct. > >> The main warning needs to be triggered by another peculiar SACK that >> kick

Re: [PATCH v2 net-next] net: sk_buff rbnode reorg

2017-09-19 Thread Soheil Hassas Yeganeh
On Tue, Sep 19, 2017 at 8:14 AM, Eric Dumazet wrote: > From: Eric Dumazet > > skb->rbnode shares space with skb->next, skb->prev and skb->tstamp > > Current uses (TCP receive ofo queue and netem) need to save/restore > tstamp, while skb->dev is either NULL (TCP) or a constant for a given > queue

[patch net-next] team: fall back to hash if table entry is empty

2017-09-19 Thread Jim Hanko
If the hash to port mapping table does not have a valid port (i.e. when a port goes down), fall back to the simple hashing mechanism to avoid dropping packets. Signed-off-by: Jim Hanko Acked-by: Jiri Pirko --- drivers/net/team/team_mode_loadbalance.c | 8 +++- 1 file changed, 7 insertions(+

[PATCH] isdn/i4l: check the message proto does not change across fetches

2017-09-19 Thread Meng Xu
In isdn_ppp_write(), the header (i.e., protobuf) of the buffer is fetched twice from userspace. The first fetch is used to peek at the protocol of the message and reset the huptimer if necessary; while the second fetch copies in the whole buffer. However, given that buf resides in userspace memory,

Re: [5/5] e1000e: Avoid receiver overrun interrupt bursts

2017-09-19 Thread Philip Prindeville
Hi. We’ve been running this patchset (all 5) for about as long as they’ve been under review… about 2 months. And in a burn-in lab with heavy traffic. We’ve not seen a single link-flap in hundreds of ours of saturated traffic. Would love to see some resolution soon on this as we don’t want to s

Re: [5/5] e1000e: Avoid receiver overrun interrupt bursts

2017-09-19 Thread Benjamin Poirier
On 2017/09/19 12:38, Philip Prindeville wrote: > Hi. > > We’ve been running this patchset (all 5) for about as long as they’ve been > under review… about 2 months. And in a burn-in lab with heavy traffic. > > We’ve not seen a single link-flap in hundreds of ours of saturated traffic. > > Would

Re: [PATCH net-next 1/4] net: dsa: remove copy of master ethtool_ops

2017-09-19 Thread Florian Fainelli
On 09/19/2017 08:56 AM, Vivien Didelot wrote: > There is no need to store a copy of the master ethtool ops, storing the > original pointer in DSA and the new one in the master netdev itself is > enough. > > In the meantime, set orig_ethtool_ops to NULL when restoring the master > ethtool ops and c

Re: [PATCH net-next 4/4] net: dsa: move master ethtool code

2017-09-19 Thread Florian Fainelli
On 09/19/2017 08:57 AM, Vivien Didelot wrote: > DSA overrides the master device ethtool ops, so that it can inject stats > from its dedicated switch CPU port as well. > > The related code is currently split in dsa.c and slave.c, but it only > scopes the master net device. Move it to a new master.c

Re: [PATCH net-next 1/3] bpf: Implement map_delete_elem for BPF_MAP_TYPE_LPM_TRIE

2017-09-19 Thread Daniel Mack
Hi, Thanks for working on this, Craig! On 09/19/2017 06:12 PM, Daniel Borkmann wrote: > On 09/19/2017 05:08 PM, Craig Gallek wrote: >> On Mon, Sep 18, 2017 at 6:53 PM, Alexei Starovoitov wrote: >>> On 9/18/17 12:30 PM, Craig Gallek wrote: > [...] + + next_bit = extract_bi

Re: [PATCH 2/3] selftests: actually run the various net selftests

2017-09-19 Thread Shuah Khan
On 09/19/2017 12:14 PM, Willem de Bruijn wrote: > On Tue, Sep 19, 2017 at 9:34 AM, Josef Bacik wrote: >> On Mon, Sep 18, 2017 at 04:14:41PM -0600, Shuah Khan wrote: >>> On 09/18/2017 11:32 AM, jo...@toxicpanda.com wrote: From: Josef Bacik These self tests are just self contained bi

Re: [PATCH net-next 0/4] net: dsa: move master ethtool code

2017-09-19 Thread Florian Fainelli
On 09/19/2017 08:56 AM, Vivien Didelot wrote: > The DSA core overrides the master device's ethtool_ops structure so that > it can inject statistics and such of its dedicated switch CPU port. > > This ethtool code is currently called on unnecessary conditions or > before the master interface and it

[PATCH net-next] net_sched: no need to free qdisc in RCU callback

2017-09-19 Thread Cong Wang
gen estimator has been rewritten in commit 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators"), the caller no longer needs to wait for a grace period. So this patch gets rid of it. Cc: Jamal Hadi Salim Cc: Eric Dumazet Signed-off-by: Cong Wang --- include/net/sch_gen

Re: [PATCH net-next v4 1/4] bpf: add helper bpf_perf_event_read_value for perf event array map

2017-09-19 Thread Daniel Borkmann
On 09/19/2017 09:04 AM, Yonghong Song wrote: [...] Just some minor things, but a bit scattered. diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 43ab5c4..2c68b9e 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -582,6 +582,14 @@ union bpf_attr { *

Re: [RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Oliver Neukum
Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > > ALSO NOTE: If somehow some of the types of work need to be repeated if > usbnet_defer_kevent() is called multiple times then that should be > quite easy to accomplish without dropping any work on the floor.  We > can just keep

[PATCH] ath9k: make const array reg_hole_list static, reduces object code size

2017-09-19 Thread Colin King
From: Colin Ian King Don't populate the read-only array reg_hole_list on the stack, instead make it static. Makes the object code smaller by over 200 bytes: Before: textdata bss dec hex filename 57518 15248 0 72766 11c3e debug.o After: textdata bss

Re: [PATCH net-next v4 3/4] bpf: add helper bpf_perf_prog_read_value

2017-09-19 Thread Daniel Borkmann
On 09/19/2017 09:04 AM, Yonghong Song wrote: [...] #ifdef CONFIG_CGROUP_PERF diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 2c68b9e..ba77022 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -590,6 +590,13 @@ union bpf_attr { * @buf: buf to f

Re: cross namespace interface notification for tun devices

2017-09-19 Thread Cong Wang
On Mon, Sep 18, 2017 at 11:47 AM, Jason A. Donenfeld wrote: > Hey guys, > > It's possible to create a tun device in a process in namespace A and > then move that interface to namespace B. The controlling process in A > needs to receive notifications on when the interface is brought up or > down. I

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Oliver Neukum
Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > In general when you've got a flag communicating that "something needs > to be done" you want to clear that flag _before_ doing the task. If > you clear the flag _after_ doing the task you end up with the risk > that this will hap

Re: [PATCH net-next] net: mvpp2: remove useless goto

2017-09-19 Thread David Miller
From: Antoine Tenart Date: Mon, 18 Sep 2017 15:36:51 +0200 > Remove a goto in the PPv2 tx function which jumps to the next line > anyway. This is a cosmetic commit. > > Signed-off-by: Antoine Tenart Applied, thanks.

Re: [PATCH 0/3] fix reuseaddr regression

2017-09-19 Thread David Miller
From: jo...@toxicpanda.com Date: Mon, 18 Sep 2017 12:28:54 -0400 > I introduced a regression when reworking the fastreuse port stuff that allows > bind conflicts to occur once a reuseaddr socket successfully opens on an > existing tb. The root cause is I reversed an if statement which caused us t

Re: [PATCH net] bpf: do not disable/enable BH in bpf_map_free_id()

2017-09-19 Thread Daniel Borkmann
On 09/19/2017 06:15 PM, Eric Dumazet wrote: From: Eric Dumazet syzkaller reported following splat [1] Since hard irq are disabled by the caller, bpf_map_free_id() should not try to enable/disable BH. Another solution would be to change htab_map_delete_elem() to defer the free_htab_elem() call

Re: [PATCH] vsock: vmci: Remove unneeded linux/miscdevice.h include

2017-09-19 Thread David Miller
From: Corentin Labbe Date: Mon, 18 Sep 2017 20:18:55 +0200 > net/vmw_vsock/vmci_transport.c does not use any miscdevice so this patch > remove this unnecessary inclusion. > > Signed-off-by: Corentin Labbe Applied, thank you.

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Guenter Roeck
On Tue, Sep 19, 2017 at 1:37 PM, Oliver Neukum wrote: > Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: >> In general when you've got a flag communicating that "something needs >> to be done" you want to clear that flag _before_ doing the task. If >> you clear the flag _after_

Re: [PATCH net-next 2/7] kobject: copy env blob in one go

2017-09-19 Thread Cong Wang
On Mon, Sep 18, 2017 at 12:07 PM, Eric Dumazet wrote: > + scratch = skb_put(skb, env->buflen); > + memcpy(scratch, env->buf, env->buflen); skb_put_data()

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Doug Anderson
Hi, On Tue, Sep 19, 2017 at 1:37 PM, Oliver Neukum wrote: > Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: >> In general when you've got a flag communicating that "something needs >> to be done" you want to clear that flag _before_ doing the task. If >> you clear the flag _af

Re: [PATCH net] net: phy: Kconfig: Fix PHY infrastructure menu in menuconfig

2017-09-19 Thread David Miller
From: Jerome Brunet Date: Mon, 18 Sep 2017 14:59:20 +0200 > Since the integration of PHYLINK, the configuration option which > used to be under the PHY infrastructure menu in menuconfig ended > up one level up (the network device driver section) > > By placing PHYLINK option right after PHYLIB e

Re: [PATCH net-next 0/3] Implement delete for BPF LPM trie

2017-09-19 Thread David Miller
From: Craig Gallek Date: Mon, 18 Sep 2017 15:30:54 -0400 > This was previously left as a TODO. Add the implementation and > extend the test to cover it. Series applied, thanks.

Re: cross namespace interface notification for tun devices

2017-09-19 Thread Jason A. Donenfeld
On Tue, Sep 19, 2017 at 10:40 PM, Cong Wang wrote: > By "notification" I assume you mean netlink notification. Yes, netlink notification. > The question is why does the process in A still care about > the device sitting in B? > > Also, the process should be able to receive a last notification >

Re: [PATCH] tcp: avoid bogus warning in tcp_clean_rtx_queue

2017-09-19 Thread David Miller
From: Arnd Bergmann Date: Mon, 18 Sep 2017 22:48:47 +0200 > gcc-4.9 warns that it cannot trace the state of the 'last_ackt' > variable since the change to the TCP timestamping code, when > CONFIG_PROFILE_ANNOTATED_BRANCHES is set: > > net/ipv4/tcp_input.c: In function 'tcp_clean_rtx_queue': > in

Re: [PATCH net-next 0/4] test_rhashtable: add test case for rhl table

2017-09-19 Thread David Miller
From: Florian Westphal Date: Mon, 18 Sep 2017 23:07:07 +0200 > Add a test case for the rhlist interface. > > While at it, cleanup current rhashtable test a bit and add a check > for max_size support. The kbuild test robot complained about a very large on-stack allocation added by these changes,

[PATCH] mwifiex: make const array tos_to_ac static, reduces object code size

2017-09-19 Thread Colin King
From: Colin Ian King Don't populate the read-only const array tos_to_ac on the stack, instead make it static. Makes the object code smaller by 250 bytes: Before: textdata bss dec hex filename 261042720 128 289527118 wmm.o After: textdata bss dec

Re: [PATCH net-next 0/3] Implement delete for BPF LPM trie

2017-09-19 Thread Daniel Mack
On 09/19/2017 10:55 PM, David Miller wrote: > From: Craig Gallek > Date: Mon, 18 Sep 2017 15:30:54 -0400 > >> This was previously left as a TODO. Add the implementation and >> extend the test to cover it. > > Series applied, thanks. > Hmm, I think these patches need some more discussion regar

Re: [PATCH net-next 0/3] Implement delete for BPF LPM trie

2017-09-19 Thread Craig Gallek
On Tue, Sep 19, 2017 at 5:13 PM, Daniel Mack wrote: > On 09/19/2017 10:55 PM, David Miller wrote: >> From: Craig Gallek >> Date: Mon, 18 Sep 2017 15:30:54 -0400 >> >>> This was previously left as a TODO. Add the implementation and >>> extend the test to cover it. >> >> Series applied, thanks. >>

Re: [patch net-next 00/13] mlxsw: Prepare for multicast router offload

2017-09-19 Thread David Miller
From: Jiri Pirko Date: Tue, 19 Sep 2017 10:00:07 +0200 > From: Jiri Pirko > > Yotam says: > > This patch-set makes various preparations needed for the multicast router > offloading, which include: > - Add the needed registers. > - Add needed ACL actions. > - Add new traps and trap groups. >

Re: [PATCH net-next] net_sched: no need to free qdisc in RCU callback

2017-09-19 Thread Eric Dumazet
On Tue, 2017-09-19 at 13:15 -0700, Cong Wang wrote: > gen estimator has been rewritten in commit 1c0d32fde5bd > ("net_sched: gen_estimator: complete rewrite of rate estimators"), > the caller no longer needs to wait for a grace period. So this > patch gets rid of it. > > Cc: Jamal Hadi Salim > Cc

Re: [PATCH net-next 0/3] Implement delete for BPF LPM trie

2017-09-19 Thread David Miller
From: Craig Gallek Date: Tue, 19 Sep 2017 17:16:13 -0400 > On Tue, Sep 19, 2017 at 5:13 PM, Daniel Mack wrote: >> On 09/19/2017 10:55 PM, David Miller wrote: >>> From: Craig Gallek >>> Date: Mon, 18 Sep 2017 15:30:54 -0400 >>> This was previously left as a TODO. Add the implementation and

Re: [PATCH 1/3][v2] selftest: add a reuseaddr test

2017-09-19 Thread Shuah Khan
On 09/19/2017 07:51 AM, jo...@toxicpanda.com wrote: > From: Josef Bacik > > This is to test for a regression introduced by > > b9470c27607b ("inet: kill smallest_size and smallest_port") > > which introduced a problem with reuseaddr and bind conflicts. > > Signed-off-by: Josef Bacik I usuall

Re: [PATCH 2/3][v2] selftests: actually run the various net selftests

2017-09-19 Thread Shuah Khan
On 09/19/2017 07:51 AM, jo...@toxicpanda.com wrote: > From: Josef Bacik > > These self tests are just self contained binaries, they are not run by > any of the scripts in the directory. This means they need to be marked > with TEST_GEN_PROGS to actually be run, not TEST_GEN_FILES. > > Signed-of

Re: [PATCH net-next 0/3] Implement delete for BPF LPM trie

2017-09-19 Thread Daniel Mack
On 09/19/2017 11:29 PM, David Miller wrote: > From: Craig Gallek > Date: Tue, 19 Sep 2017 17:16:13 -0400 > >> On Tue, Sep 19, 2017 at 5:13 PM, Daniel Mack wrote: >>> On 09/19/2017 10:55 PM, David Miller wrote: From: Craig Gallek Date: Mon, 18 Sep 2017 15:30:54 -0400 > This wa

Re: [PATCH 3/3][v2] selftests: silence test output by default

2017-09-19 Thread Shuah Khan
On 09/19/2017 07:51 AM, jo...@toxicpanda.com wrote: > From: Josef Bacik > > Some of the networking tests are very noisy and make it impossible to > see if we actually passed the tests as they run. Default to suppressing > the output from any tests run in order to make it easier to track what > f

Re: [PATCH] tcp: avoid bogus warning in tcp_clean_rtx_queue

2017-09-19 Thread Arnd Bergmann
On Tue, Sep 19, 2017 at 11:02 PM, David Miller wrote: > From: Arnd Bergmann > Date: Mon, 18 Sep 2017 22:48:47 +0200 > >> gcc-4.9 warns that it cannot trace the state of the 'last_ackt' >> variable since the change to the TCP timestamping code, when >> CONFIG_PROFILE_ANNOTATED_BRANCHES is set: >>

Reply

2017-09-19 Thread a
Are you free for discussion?

Re: [PATCH] tcp: avoid bogus warning in tcp_clean_rtx_queue

2017-09-19 Thread David Miller
From: Arnd Bergmann Date: Tue, 19 Sep 2017 23:32:33 +0200 > On Tue, Sep 19, 2017 at 11:02 PM, David Miller wrote: >> What cpu did you test the object code generation upon and does that >> cpu have branch prediction hints in the target you are building for? > > This was a randconfig build target

Reporting transceiver with ethtool_link_ksettings

2017-09-19 Thread Florian Fainelli
Hi, After tracking down why all network interfaces using PHYLIB and using phy_ethtool_link_ksettings_get would report "Transceiver: internal" it became clear that's because ethtool_link_ksettings deprecated that field... We could have deprecated setting the transceiver which makes sense, but not

Re: [PATCH] rhashtable: Documentation tweak

2017-09-19 Thread David Miller
From: Andreas Gruenbacher Date: Tue, 19 Sep 2017 12:41:37 +0200 > Clarify that rhashtable_walk_{stop,start} will not reset the iterator to > the beginning of the hash table. Confusion between rhashtable_walk_enter > and rhashtable_walk_start has already lead to a bug. > > Signed-off-by: Andreas

Re: [PATCH v2 net-next] net: sk_buff rbnode reorg

2017-09-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Sep 2017 05:14:24 -0700 > From: Eric Dumazet > > skb->rbnode shares space with skb->next, skb->prev and skb->tstamp > > Current uses (TCP receive ofo queue and netem) need to save/restore > tstamp, while skb->dev is either NULL (TCP) or a constant for a given >

Re: [PATCH net] tcp: fastopen: fix on syn-data transmit failure

2017-09-19 Thread Yuchung Cheng
On Tue, Sep 19, 2017 at 10:05 AM, Eric Dumazet wrote: > From: Eric Dumazet > > Our recent change exposed a bug in TCP Fastopen Client that syzkaller > found right away [1] > > When we prepare skb with SYN+DATA, we attempt to transmit it, > and we update socket state as if the transmit was a succe

Re: [PATCH net-next] selftests: rtnetlink.sh: add test case for device ifalias

2017-09-19 Thread David Miller
From: Florian Westphal Date: Tue, 19 Sep 2017 14:42:17 +0200 > Signed-off-by: Florian Westphal Applied, thanks Florian.

Re: [PATCH] ipv6_skip_exthdr: use ipv6_authlen for AH hdrlen

2017-09-19 Thread David Miller
From: Xiang Gao Date: Tue, 19 Sep 2017 08:59:50 -0400 > In ipv6_skip_exthdr, the lengh of AH header is computed manually > as (hp->hdrlen+2)<<2. However, in include/linux/ipv6.h, a macro > named ipv6_authlen is already defined for exactly the same job. This > commit replaces the manual computatio

Latest net-next from GIT panic

2017-09-19 Thread Paweł Staszewski
Just tried latest net-next git and found kernel panic. Below link to bugzilla. https://bugzilla.kernel.org/attachment.cgi?id=258499

Re: [PATCH net] bpf: do not disable/enable BH in bpf_map_free_id()

2017-09-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Sep 2017 09:15:59 -0700 > From: Eric Dumazet > > syzkaller reported following splat [1] > > Since hard irq are disabled by the caller, bpf_map_free_id() > should not try to enable/disable BH. > > Another solution would be to change htab_map_delete_elem() to >

[PATCH net v2] bpf: fix ri->map_owner pointer on bpf_prog_realloc

2017-09-19 Thread Daniel Borkmann
Commit 109980b894e9 ("bpf: don't select potentially stale ri->map from buggy xdp progs") passed the pointer to the prog itself to be loaded into r4 prior on bpf_redirect_map() helper call, so that we can store the owner into ri->map_owner out of the helper. Issue with that is that the actual addre

  1   2   3   >