Re: eBPF - little-endian load instructions?

2017-04-12 Thread Johannes Berg
On Wed, 2017-04-12 at 20:08 -0700, Alexei Starovoitov wrote: > it's really llvm bug that i need fix. It's plain broken > to generate what effectively is nop insn for march=bpfeb > My only excuse that when that code was written llvm had only > march=bpfel. > bpfeb was added much later. So I'm

[Patch net-next v2] net_sched: move the empty tp check from ->destroy() to ->delete()

2017-04-12 Thread Cong Wang
Roi reported we could have a race condition where in ->classify() path we dereference tp->root and meanwhile a parallel ->destroy() makes it a NULL. This is possible because ->destroy() could be called when deleting a filter to check if we are the last one in tp, this tp is still linked and

Re: IMX6 FEC connection drops occasionally with 'MDIO read timeout'

2017-04-12 Thread Andy Duan
On 2017年04月13日 00:54, Tim Harvey wrote: > On Wed, Apr 12, 2017 at 9:26 AM, Fabio Estevam wrote: >> Hi Tim, >> >> On Wed, Apr 12, 2017 at 1:15 PM, Tim Harvey wrote: >>> Andrew, >>> >>> Thanks for the reply. Your talking about suspend/resume power >>>

Re: [PATCH net-next 4/8] net/ncsi: Add debugging infrastructurre

2017-04-12 Thread Gavin Shan
On Wed, Apr 12, 2017 at 09:28:26PM -0700, Joe Perches wrote: >On Thu, 2017-04-13 at 12:46 +1000, Gavin Shan wrote: >> This creates procfs directories as NCSI debugging infrastructure. >> With the patch applied, We will see below procfs directories. Every >> NCSI package and channel has one

[PATCH v2 6/9] ftgmac100: Allow configuration of phy interface via device-tree

2017-04-12 Thread Benjamin Herrenschmidt
This uses the standard phy-mode property Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 42 +--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH v2 9/9] ftgmac100: Document device-tree binding

2017-04-12 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- .../devicetree/bindings/net/ftgmac100.txt | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ftgmac100.txt diff --git

[PATCH v2 8/9] ftgmac100: Fix potential ordering issue in NAPI poll

2017-04-12 Thread Benjamin Herrenschmidt
We need to ensure the loads from the descriptor are done after the MMIO store clearing the interrupts has completed, otherwise we might still miss work. A read back from the MMIO register will "push" the posted store and ioread32 has a barrier on weakly aordered architectures that will order

[PATCH v2 3/9] ftgmac100: Add ndo_set_rx_mode() and support for multicast & promisc

2017-04-12 Thread Benjamin Herrenschmidt
This adds the ndo_set_rx_mode() callback to configure the multicast filters, promisc and allmulti options. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 52 1 file changed, 52 insertions(+) diff

[PATCH v2 5/9] ftgmac100: Add netpoll support

2017-04-12 Thread Benjamin Herrenschmidt
Just call the interrupt handler with interrupts locally disabled Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH v2 7/9] ftgmac100: Display the discovered PHY device info

2017-04-12 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 7c607eb..71763e4 100644 ---

[PATCH v2 4/9] ftgmac100: Add vlan HW offload

2017-04-12 Thread Benjamin Herrenschmidt
The chip supports HW vlan tag insertion and extraction. Add support for it. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 46 +++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git

[PATCH v2 2/9] ftgmac100: Add pause frames configuration and support

2017-04-12 Thread Benjamin Herrenschmidt
Hopefully my understanding of how the hardware works is correct, as the documentation isn't completely clear. So far I have seen no obvious issue. Pause seem to also work with NC-SI. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c |

[PATCH v2 0/9] ftgmac100: Rework batch 5 - Features

2017-04-12 Thread Benjamin Herrenschmidt
This is the second spin of the fifth and last batch of updates to the ftgmac100 driver. This contains a few additional "features" such as: - Support for ethtool n-way reset - Multicast filtering & promisc support - Vlan offload - netpoll And a couple of misc bits. This also adds the

[PATCH v2 1/9] ftgmac100: Add ethtool n-way reset call

2017-04-12 Thread Benjamin Herrenschmidt
A non-wired up implementation accidentally made its way in a previous patch (Make ring sizes configurable via ethtool). This removes it and wires up the generic phy_ethtool_nway_reset instead. Signed-off-by: Benjamin Herrenschmidt -- v2. - Use phy_ethtool_nway_reset()

Re: [PATCH net-next 4/8] net/ncsi: Add debugging infrastructurre

2017-04-12 Thread Joe Perches
On Thu, 2017-04-13 at 12:46 +1000, Gavin Shan wrote: > This creates procfs directories as NCSI debugging infrastructure. > With the patch applied, We will see below procfs directories. Every > NCSI package and channel has one corresponding directory. Other than > presenting the NCSI topology, No

Re: [PATCH linux 2/2] net sched actions: fix refcount decrement on error

2017-04-12 Thread Cong Wang
On Wed, Apr 12, 2017 at 7:21 AM, Wolfgang Bumiller wrote: > If memory allocation for nla_memdup_cookie() fails > module_put has to be guarded by the same condition as it was > before the TCA_ACT_COOKIE has been added as stated in the > comment afterwards: > > /* module

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread Alexei Starovoitov
On Wed, Apr 12, 2017 at 02:54:15PM -0400, David Miller wrote: > > This provides a generic SKB based non-optimized XDP path which is used > if either the driver lacks a specific XDP implementation, or the user > requests it via a new IFLA_XDP_FLAGS value named XDP_FLAGS_SKB_MODE. > > It is

Re: [PATCH v2 0/3] of: Make of_match_node() an inline stub for CONFIG_OF=n

2017-04-12 Thread Frank Rowand
On 04/11/17 21:41, Florian Fainelli wrote: > Hi all, > > This patch series makes of_match_node() an inline stub for CONFIG_OF=n. kbuild > reported two build errors which are fixed as preriquisite patches. > > This is based on Linus' master, not sure which tree would merge this, Frank's? It

[PATCH net-next 09/16] net/mlx5e: IPoIB, Basic netdev ndos open/close

2017-04-12 Thread Saeed Mahameed
Implement open/close of IPoIB netdevice ndos using mlx5e's channels API to manage data path resources (RQs/SQs/CQs). Set IPoIB netdev address on dev_init ndo. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit ---

[PATCH net-next 07/16] net/mlx5e: IPoIB, RSS flow steering tables

2017-04-12 Thread Saeed Mahameed
Like the mlx5e ethernet mode, on IPoIB mode we need to create RX steering tables, but IPoIB do not require MAC and VLAN steering tables so the only tables we create in here are: 1. TTC Table (Traffic Type Classifier table for RSS steering) 2. ARFS Table (for accelerated RFS support) Creation of

[PATCH net-next 04/16] net/mlx5e: More generic netdev management API

2017-04-12 Thread Saeed Mahameed
In preparation for mlx5e RDMA net_device support, here we generalize mlx5e_attach/detach in a way that those functions will be agnostic to link type. For that we move ethernet specific NIC net device logic out of those functions into {nic,rep}_{enable/disable} mlx5e NIC and representor profiles

[PATCH net-next 02/16] net/mlx5: Refactor create flow table method to accept underlay QP

2017-04-12 Thread Saeed Mahameed
From: Erez Shitrit IB flow tables need the underlay qp to perform flow steering. Here we change the API of the flow tables creation to accept the underlay QP number as a parameter in order to support IB (IPoIB) flow steering. Signed-off-by: Erez Shitrit

[PATCH net-next 00/16] Mellanox, mlx5 RDMA net device support

2017-04-12 Thread Saeed Mahameed
Hi Dave and Doug. This series provides the lower level mlx5 support of RDMA netdevice creation API [1] suggested and introduced by Intel's HFI OPA VNIC netdevice driver [2], to enable IPoIB mlx5 RDMA netdevice creation. mlx5 IPoIB RDMA netdev will serve as an acceleration netdevice for the

[PATCH net-next 03/16] net/mlx5: Enable flow-steering for IB link

2017-04-12 Thread Saeed Mahameed
From: Erez Shitrit Get the relevant capabilities if supports ipoib_enhanced_offloads and init the flow steering table accordingly. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed ---

[PATCH net-next 4/8] net/ncsi: Add debugging infrastructurre

2017-04-12 Thread Gavin Shan
This creates procfs directories as NCSI debugging infrastructure. With the patch applied, We will see below procfs directories. Every NCSI package and channel has one corresponding directory. Other than presenting the NCSI topology, No real function has been achieved through these procfs

[PATCH net-next 01/16] net/mlx5: Add IPoIB enhanced offloads bits to mlx5_ifc

2017-04-12 Thread Saeed Mahameed
From: Erez Shitrit New capability bit: ipoib_enhanced_offloads, indicates new ability for UD QP to do RSS and enhanced IPoIB offloads and acceleration. Add underlay_qpn to the TIS and flow_table objects In order to support SET_ROOT command, to connect between IPoIB QPs and

[PATCH net-next 05/16] net/mlx5e: IPoIB, Add netdevice profile skeleton

2017-04-12 Thread Saeed Mahameed
Create mlx5e IPoIB netdevice profile skeleton in the new ipoib.c file with empty implementation. Downstream patches will provide the full mlx5 rdma netdevice acceleration support for IPoIB into this new file, by using the mlx5e netdevice profile and new mlx5_channels APIs and infrastructures.

[PATCH net-next 10/16] net/mlx5e: IPoIB, Underlay QP

2017-04-12 Thread Saeed Mahameed
Create IPoIB underlay QP needed by the IPoIB netdevice profile for RSS and TX HW context to perform on IPoIB traffic. Reset the underlay QP on dev_uninit ndo to stop IPoIB traffic going through this QP when the ULP IPoIB decides to cleanup. Implement attach/detach mcast RDMA netdev callbacks for

[PATCH net-next 06/16] net/mlx5e: IPoIB, RX steering RSS RQTs and TIRs

2017-04-12 Thread Saeed Mahameed
Implement IPoIB RX RSS (RQTs and TIRs) HW objects creation, All we do here is simply reuse the mlx5e implementation to create direct and indirect (RSS) steering HW objects. For that we just expose mlx5e_{create,destroy}_{direct,indirect}_{rqt,tir} functions into en.h and call them from ipoib.c in

[PATCH net-next 12/16] net/mlx5e: IPoIB, Xmit flow

2017-04-12 Thread Saeed Mahameed
Implement mlx5e's IPoIB SKB transmit using the helper functions provided by mlx5e ethernet tx flow, the only difference in the code between mlx5e_xmit and mlx5i_xmit is that IPoIB has some extra fields to fill (UD datagram segment) in the TX descriptor (WQE) and it doesn't need to have any vlan

[PATCH net-next 15/16] net/mlx5e: E-switch vport manager is valid for ethernet only

2017-04-12 Thread Saeed Mahameed
Currently the driver support only ethernet eswitch, and we want to protect downstream IPoIB netdev from trying to access it in IB link. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10

[PATCH net-next 14/16] net/mlx5e: IPoIB, RX handler

2017-04-12 Thread Saeed Mahameed
Implement IPoIB RX SKB handler. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 78 + drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 2 +

[PATCH net-next 08/16] net/mlx5e: IPoIB, TX TIS creation

2017-04-12 Thread Saeed Mahameed
Modify mlx5e tis creation function to accept underlay qp number, which will be needed by IPoIB. Implement mlx5i (IPoIB) tx init/cleanup netdevice profile flows to create one TIS with the IPoIB underlay qp, for IPoIB TX SQs. Signed-off-by: Saeed Mahameed Reviewed-by: Erez

[PATCH net-next 13/16] net/mlx5e: RX handlers per netdev profile

2017-04-12 Thread Saeed Mahameed
In order to have different RX handler per profile, fix and refactor the current code to take the rx handler directly from the netdevice profile rather than computing it on runtime as it was done with the switchdev mode representor rx handler. This will also remove the current wrong assumption in

[PATCH net-next 16/16] hw/mlx5: Add New bit to check over QP creation

2017-04-12 Thread Saeed Mahameed
From: Erez Shitrit Add check for bit IB_QP_CREATE_NETIF_QP while creating QP. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/qp.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net-next 11/16] net/mlx5e: Xmit flow break down

2017-04-12 Thread Saeed Mahameed
Break current mlx5e xmit flow into smaller blocks (helper functions) in order to reuse them for IPoIB SKB transmission. Signed-off-by: Saeed Mahameed Reviewed-by: Erez Shitrit --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +-

[PATCH rdma-next v2 12/12] IB/hfi1: VNIC SDMA support

2017-04-12 Thread Vishwanathapura, Niranjana
HFI1 VNIC SDMA support enables transmission of VNIC packets over SDMA. Map VNIC queues to SDMA engines and support halting and wakeup of the VNIC queues. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana

[PATCH rdma-next v2 05/12] IB/opa-vnic: VNIC Ethernet Management (EM) structure definitions

2017-04-12 Thread Vishwanathapura, Niranjana
Define VNIC EM MAD structures and the associated macros. These structures are used for information exchange between VNIC EM agent (EMA) on the host and the Ethernet manager. These include the virtual ethernet switch (vesw) port information, vesw port mac table, summay and error counters, vesw port

[PATCH rdma-next v2 06/12] IB/opa-vnic: VNIC statistics support

2017-04-12 Thread Vishwanathapura, Niranjana
OPA VNIC driver statistics support maintains various counters including standard netdev counters and the Ethernet manager defined counters. Add the Ethtool hook to read the counters. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny

[PATCH rdma-next v2 02/12] IB/opa-vnic: RDMA NETDEV interface

2017-04-12 Thread Vishwanathapura, Niranjana
Add rdma netdev interface to ib device structure allowing rdma netdev devices to be allocated by ib clients. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura

[PATCH rdma-next v2 04/12] IB/opa-vnic: Virtual Network Interface Controller (VNIC) netdev

2017-04-12 Thread Vishwanathapura, Niranjana
OPA VNIC netdev function supports Ethernet functionality over Omni-Path fabric by encapsulating Ethernet packets inside Omni-Path packet header. It allocates a rdma netdev device and interfaces with the network stack to provide standard Ethernet network interfaces. It overrides HFI1 device's

[PATCH rdma-next v2 10/12] IB/hfi1: OPA_VNIC RDMA netdev support

2017-04-12 Thread Vishwanathapura, Niranjana
Add support to create and free OPA_VNIC rdma netdev devices. Implement netstack interface functionality including xmit_skb, receive side NAPI etc. Also implement rdma netdev control functions. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny

[PATCH rdma-next v2 07/12] IB/opa-vnic: VNIC MAC table support

2017-04-12 Thread Vishwanathapura, Niranjana
OPA VNIC MAC table contains the MAC address to DLID mappings provided by the Ethernet manager. During transmission, the MAC table provides the MAC address to DLID translation. Implement MAC table using simple hash list. Also provide support to update/query the MAC table by Ethernet manager.

[PATCH rdma-next v2 11/12] IB/hfi1: Virtual Network Interface Controller (VNIC) HW support

2017-04-12 Thread Vishwanathapura, Niranjana
HFI1 HW specific support for VNIC functionality. Dynamically allocate a set of contexts for VNIC when the first vnic port is instantiated. Allocate VNIC contexts from user contexts pool and return them back to the same pool while freeing up. Set aside enough MSI-X interrupts for VNIC contexts and

[PATCH rdma-next v2 08/12] IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) interface

2017-04-12 Thread Vishwanathapura, Niranjana
OPA VNIC EMA interface functions are the management interfaces to the OPA VNIC netdev. Add support to add and remove VNIC ports. Implement the required GET/SET management interface functions and processing of new management information. Add support to send trap notifications upon various events

[PATCH rdma-next v2 09/12] IB/opa-vnic: VNIC Ethernet Management Agent (VEMA) function

2017-04-12 Thread Vishwanathapura, Niranjana
OPA VEMA function interfaces with the Infiniband MAD stack to exchange the management information packets with the Ethernet Manager (EM). It interfaces with the OPA VNIC netdev function to SET/GET the management information. The information exchanged with the EM includes class port details,

[PATCH rdma-next v2 01/12] IB/opa-vnic: Virtual Network Interface Controller (VNIC) documentation

2017-04-12 Thread Vishwanathapura, Niranjana
Add OPA VNIC design document explaining the VNIC architecture and the driver design. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura ---

[PATCH rdma-next v2 00/12] Omni-Path Virtual Network Interface Controller (VNIC)

2017-04-12 Thread Vishwanathapura, Niranjana
ChangeLog: = v1 => v2: a) Change error code for unsupported rdma netdev type b) Remove some debug messages v1: posted @ https://www.spinics.net/lists/linux-rdma/msg48518.html v0 => v1: a) changes as required by new kernel base (for-4.12) b) moved rdma netdev interface into a separate

[PATCH rdma-next v2 03/12] IB/opa-vnic: Virtual Network Interface Controller (VNIC) interface

2017-04-12 Thread Vishwanathapura, Niranjana
Define OPA VNIC interface between hardware independent VNIC functionality and the hardware dependent VNIC functionality. Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Signed-off-by: Niranjana Vishwanathapura

Re: eBPF - little-endian load instructions?

2017-04-12 Thread Alexei Starovoitov
On Wed, Apr 12, 2017 at 09:38:39PM +0200, Johannes Berg wrote: > On Wed, 2017-04-12 at 09:58 -0700, Alexei Starovoitov wrote: > > > > > Are these hooked up to llvm intrinsics or so? If not, can I do that > > > through some kind of inline asm statement? > > > > llvm doesn't support bpf inline asm

[PATCH net-next 2/8] net/ncsi: Properly track channel monitor timer state

2017-04-12 Thread Gavin Shan
The field @monitor.enabled in the NCSI channel descriptor is used to track the state of channel monitor timer. It indicates the timer's state (pending or not). We could not start the timer again in its handler. In that case, We missed to update @monitor.enabled to false. It leads to below warning

[PATCH net-next 3/8] net/ncsi: Enforce failover on link monitor timeout

2017-04-12 Thread Gavin Shan
The NCSI channel has been configured to provide service if its link monitor timer is enabled, regardless of its state (inactive or active). So the timeout event on the link monitor indicates the out-of-service on that channel, for which a failover is needed. This sets NCSI_DEV_RESHUFFLE flag to

[PATCH net-next 1/8] net/ncsi: Disable HWA mode when no channels are found

2017-04-12 Thread Gavin Shan
When there are no NCSI channels probed, HWA (Hardware Arbitration) mode is enabled. It's not correct because HWA depends on the fact: NCSI channels exist and all of them support HWA mode. This disables HWA when no channels are probed. Signed-off-by: Gavin Shan ---

[PATCH net-next 0/8] net/ncsi: Add debugging functionality

2017-04-12 Thread Gavin Shan
This series supports NCSI debugging infrastructure by adding several procfs files. It was inspired by the reported issues: No available package and channel are probed successfully. Obviously, we don't have a debugging infrastructure for NCSI stack yet. The first 3 patches, fixing some issues,

[PATCH net-next 6/8] net/ncsi: Support NCSI packet generation

2017-04-12 Thread Gavin Shan
This introduces /proc/ncsi/eth0/pkt. The procfs entry can accept parameters to produce NCSI command packet. The received NCSI response packet is dumped on read. Below is an example to send CIS command and dump its response. # echo CIS,0,0 > /proc/ncsi/eth0/pkt # cat /proc/ncsi/eth0/pkt

[PATCH net-next 5/8] net/ncsi: Dump NCSI packet statistics

2017-04-12 Thread Gavin Shan
This creates /proc/ncsi//stats to dump the NCSI packets sent and received over all packages and channels. It's useful to diagnose NCSI problems, especially when NCSI packages and channels aren't probed properly. The statistics can be gained from procfs file as below: # cat /proc/ncsi/eth0/stats

[PATCH net-next 7/8] net/ncsi: No error report on DP response to non-existing package

2017-04-12 Thread Gavin Shan
The issue was found from /proc/ncsi/eth0/stats. The first step in NCSI package/channel enumeration is deselect all packages by sending DP (Deselect Package) commands. The remote NIC replies with response while the corresponding package isn't populated yet and it is treated as an error wrongly. #

[PATCH net-next 8/8] net/ncsi: Fix length of GVI response packet

2017-04-12 Thread Gavin Shan
The length of GVI (GetVersionInfo) response packet should be 40 instead of 36. This issue was found from /proc/ncsi/eth0/stats. # cat /proc/ncsi/eth0/stats : RSP OK TIMEOUT ERROR === GVI 002 With this applied, no

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread David Ahern
On 4/12/17 8:08 PM, David Miller wrote: > From: David Ahern > Date: Wed, 12 Apr 2017 13:54:20 -0600 > >> packet passed to xdp seems to be messed up > Ok, the problem is that skb->mac_len isn't set properly at this point. > That doesn't happen until

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread David Miller
From: David Ahern Date: Wed, 12 Apr 2017 13:54:20 -0600 > packet passed to xdp seems to be messed up Ok, the problem is that skb->mac_len isn't set properly at this point. That doesn't happen until __netif_receive_skb_core(). I'm also not setting xdp.data_hard_start

Re: [PATCH net-next v2] net: allow configuring default qdisc

2017-04-12 Thread David Miller
From: Stephen Hemminger Date: Wed, 12 Apr 2017 15:59:25 -0700 > The most recent example was in the block layer. Linus complained about this, loudly.

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread David Miller
From: Stephen Hemminger Date: Wed, 12 Apr 2017 14:30:37 -0700 > On Wed, 12 Apr 2017 14:54:15 -0400 (EDT) > David Miller wrote: > >> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >> index b0aa089..071a58b 100644 >> ---

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread David Miller
From: Eric Dumazet Date: Wed, 12 Apr 2017 14:49:53 -0700 > On Wed, 2017-04-12 at 14:30 -0700, Stephen Hemminger wrote: >> On Wed, 12 Apr 2017 14:54:15 -0400 (EDT) >> David Miller wrote: >> >> > diff --git a/include/linux/netdevice.h

[PATCH iproute2] ip vrf: Add command name next to pid

2017-04-12 Thread David Ahern
'ip vrf pids' is used to list processes bound to a vrf, but it only shows the pid leaving a lot of work for the user. Add the command name to the output. With this patch you get the more user friendly: $ ip vrf pids mgmt 1121 ntpd 1418 gdm-session-wor 1488 gnome-session

[PATCH net-next] l2tp: device MTU setup, tunnel socket needs a lock

2017-04-12 Thread R. Parameswaran
The MTU overhead calculation in L2TP device set-up merged via commit b784e7ebfce8cfb16c6f95e14e8532d0768ab7ff needs to be adjusted to lock the tunnel socket while referencing the sub-data structures to derive the socket's IP overhead. Reported-by: Guillaume Nault

Re: [RFC PATCH linux 0/2] net sched actions: access to uninitialized data and error handling

2017-04-12 Thread Cong Wang
On Wed, Apr 12, 2017 at 7:21 AM, Wolfgang Bumiller wrote: > Commit 1045ba77a ("net sched actions: Add support for user cookies") > added code to net/sched/act_api.c's tcf_action_init_1 using the `tb` > nlattr array unconditionally, while it was otherwise used as well as >

Re: [PATCH 1/8] ftgmac100: Add ethtool n-way reset call

2017-04-12 Thread Benjamin Herrenschmidt
On Wed, 2017-04-12 at 17:00 -0700, Florian Fainelli wrote: > > -static int ftgmac100_nway_reset(struct net_device *ndev) > > +static int ftgmac100_nway_reset(struct net_device *netdev) > >   { > > - if (!ndev->phydev) > > + if (!netdev->phydev) > >    return -ENXIO; > > - 

Re: ney/key: slab-out-of-bounds in parse_ipsecrequests

2017-04-12 Thread Cong Wang
On Wed, Apr 12, 2017 at 8:02 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). > > A reproducer and .config are attached. > > When subtracting

Re: [PATCH 1/8] ftgmac100: Add ethtool n-way reset call

2017-04-12 Thread Florian Fainelli
On 04/12/2017 03:44 PM, Benjamin Herrenschmidt wrote: > Signed-off-by: Benjamin Herrenschmidt > --- > drivers/net/ethernet/faraday/ftgmac100.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c >

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Florian Fainelli
On 04/12/2017 03:10 PM, Andrew Lunn wrote: > To give some more background and rational for this change. > > On a platform where we have a parent MDIO bus, backed by the > mdio-bcm-unimac.c driver, we also register a slave MII bus (through > net/dsa/dsa2.c) which is parented to

Re: [patch iproute2/net-next repost] devlink: Add support for pipeline debug (dpipe)

2017-04-12 Thread Stephen Hemminger
On Tue, 28 Mar 2017 17:26:54 +0200 Jiri Pirko wrote: > > #define pr_err(args...) fprintf(stderr, ##args) > -#define pr_out(args...) fprintf(stdout, ##args) > +#define pr_out(args...) \ > + do {

Re: net/ipv4: use-after-free in ipv4_datagram_support_cmsg

2017-04-12 Thread Willem de Bruijn
On Wed, Apr 12, 2017 at 6:25 PM, Willem de Bruijn wrote: > On Wed, Apr 12, 2017 at 4:47 PM, Eric Dumazet wrote: >> On Wed, 2017-04-12 at 13:07 -0700, Cong Wang wrote: >>> On Wed, Apr 12, 2017 at 8:39 AM, Willem de Bruijn >>>

[PATCH net] net-timestamp: avoid use-after-free in ip_recv_error

2017-04-12 Thread Willem de Bruijn
From: Willem de Bruijn Syzkaller reported a use-after-free in ip_recv_error at line info->ipi_ifindex = skb->dev->ifindex; This function is called on dequeue from the error queue, at which point the device pointer may no longer be valid. Save ifindex on enqueue in

Re: [PATCH net-next v2] net: allow configuring default qdisc

2017-04-12 Thread Stephen Hemminger
On Tue, 11 Apr 2017 22:09:59 -0400 (EDT) David Miller wrote: > From: Stephen Hemminger > Date: Sat, 8 Apr 2017 15:39:46 -0400 > > > Since 3.12 it has been possible to configure the default queuing > > discipline via sysctl. This patch adds

[PATCH v2] net: phy: micrel: fix crash when statistic requested for KSZ9031 phy

2017-04-12 Thread Grygorii Strashko
Now the command: ethtool --phy-statistics eth0 will cause system crash with meassage "Unable to handle kernel NULL pointer dereference at virtual address 0010" from: (kszphy_get_stats) from [] (ethtool_get_phy_stats+0xd8/0x210) (ethtool_get_phy_stats) from []

Re: [PATCH nf-next] ip_vs_sync: change comparison on sync_refresh_period

2017-04-12 Thread Simon Horman
On Wed, Apr 12, 2017 at 04:38:12PM -0400, Aaron Conole wrote: > The sync_refresh_period variable is unsigned, so it can never be < 0. > > Signed-off-by: Aaron Conole Thanks Aaron, I have applied this to ipvs-next after updating the prefix to "ipvs:".

[PATCH 8/8] ftgmac100: Document device-tree binding

2017-04-12 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- .../devicetree/bindings/net/ftgmac100.txt | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ftgmac100.txt diff --git

[PATCH 5/8] ftgmac100: Add netpoll support

2017-04-12 Thread Benjamin Herrenschmidt
Just call the interrupt handler with interrupts locally disabled Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH 6/8] ftgmac100: Allow configuration of phy interface via device-tree

2017-04-12 Thread Benjamin Herrenschmidt
This uses the standard phy-mode property Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 42 +--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH 4/8] ftgmac100: Add vlan HW offload

2017-04-12 Thread Benjamin Herrenschmidt
The chip supports HW vlan tag insertion and extraction. Add support for it. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 46 +++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git

[PATCH 7/8] ftgmac100: Display the discovered PHY device info

2017-04-12 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index c1afda8..d04ad31 100644 ---

[PATCH 2/8] ftgmac100: Add pause frames configuration and support

2017-04-12 Thread Benjamin Herrenschmidt
Hopefully my understanding of how the hardware works is correct, as the documentation isn't completely clear. So far I have seen no obvious issue. Pause seem to also work with NC-SI. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c |

[PATCH 3/8] ftgmac100: Add ndo_set_rx_mode() and support for multicast & promisc

2017-04-12 Thread Benjamin Herrenschmidt
This adds the ndo_set_rx_mode() callback to configure the multicast filters, promisc and allmulti options. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 52 1 file changed, 52 insertions(+) diff

[PATCH 1/8] ftgmac100: Add ethtool n-way reset call

2017-04-12 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 796b37e..bbeb8e7

[PATCH 0/8] ftgmac100: Rework batch 5 - Features

2017-04-12 Thread Benjamin Herrenschmidt
This is fifth and last batch of updates to the ftgmac100 driver. This contains a few additional "features" such as: - Support for ethtool n-way reset - Multicast filtering & promisc support - Vlan offload - netpoll And a couple of misc bits. This also adds the device-tree binding

Re: [PATCH] netpoll: Check for skb->queue_mapping

2017-04-12 Thread tndave
On 04/06/2017 12:14 PM, Eric Dumazet wrote: On Thu, 2017-04-06 at 12:07 -0700, tndave wrote: + q_index = q_index % dev->real_num_tx_queues; cpu interrupted here and dev->real_num_tx_queues has reduced! + skb_set_queue_mapping(skb, q_index); +

Re: net/ipv4: use-after-free in ipv4_datagram_support_cmsg

2017-04-12 Thread Willem de Bruijn
On Wed, Apr 12, 2017 at 4:47 PM, Eric Dumazet wrote: > On Wed, 2017-04-12 at 13:07 -0700, Cong Wang wrote: >> On Wed, Apr 12, 2017 at 8:39 AM, Willem de Bruijn >> wrote: >> > === >> >> BUG: KASAN: use-after-free in

RE: [PATCH net 1/1] net: tcp: Increase TCPABORTONLINGER when send RST by linger2 in keepalive timer

2017-04-12 Thread Gao Feng
Hi David, > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, April 13, 2017 1:21 AM > To: gfree.w...@foxmail.com > Cc: kuz...@ms2.inr.ac.ru; jmor...@namei.org; ka...@trash.net; > ncardw...@google.com; netdev@vger.kernel.org; f...@ikuai8.com > Subject:

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Andrew Lunn
> >>> To give some more background and rational for this change. > >>> > >>> On a platform where we have a parent MDIO bus, backed by the > >>> mdio-bcm-unimac.c driver, we also register a slave MII bus (through > >>> net/dsa/dsa2.c) which is parented to this UniMAC MDIO bus through an > >>>

RE: [PATCH v3] smsc95xx: Add comments to the registers definition

2017-04-12 Thread Woojung.Huh
> I based my comments on the datasheet. For the LED_GPIO_CFG register, the > datasheet says: > > This register configures the external GPIO[2:0] pins. > > QFN package description also indicates GPIOs 0, 1 & 2. > As an example for the LAN9514, pin 22 of the QFN indicates: > > nSPD_LED/GPIO2 > >

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread Eric Dumazet
On Wed, 2017-04-12 at 14:30 -0700, Stephen Hemminger wrote: > On Wed, 12 Apr 2017 14:54:15 -0400 (EDT) > David Miller wrote: > > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > > index b0aa089..071a58b 100644 > > --- a/include/linux/netdevice.h > > +++

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Florian Fainelli
On 04/11/2017 04:23 PM, Florian Fainelli wrote: > On 04/11/2017 04:14 PM, Andrew Lunn wrote: >>> To give some more background and rational for this change. >>> >>> On a platform where we have a parent MDIO bus, backed by the >>> mdio-bcm-unimac.c driver, we also register a slave MII bus (through

Re: [PATCH v2 00/10] ftgmac100: Rework batch 4 - Misc

2017-04-12 Thread Benjamin Herrenschmidt
On Wed, 2017-04-12 at 10:19 -0400, David Miller wrote: > > > v2 Fixes patch 1/10 (NETIF_F_HW_CSUM conversion) > >  > > The next (and last) batch will add a few more "features" such > > as netpoll, multicast/promist, vlan offload... > >  > > Series applied, thanks Benjamin. > > I really like how

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-12 Thread Stephen Hemminger
On Wed, 12 Apr 2017 14:54:15 -0400 (EDT) David Miller wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index b0aa089..071a58b 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -1891,9 +1891,17 @@ struct net_device {

[Patch] nsfs: mark dentry with DCACHE_RCUACCESS

2017-04-12 Thread Cong Wang
Andrey reported a use-after-free in __ns_get_path(): spin_lock include/linux/spinlock.h:299 [inline] lockref_get_not_dead+0x19/0x80 lib/lockref.c:179 __ns_get_path+0x197/0x860 fs/nsfs.c:66 open_related_ns+0xda/0x200 fs/nsfs.c:143 sock_ioctl+0x39d/0x440 net/socket.c:1001 vfs_ioctl

Re: [PATCH v2 2/3] net: macb: Remove CONFIG_OF around DT match table

2017-04-12 Thread Rob Herring
On Tue, Apr 11, 2017 at 11:41 PM, Florian Fainelli wrote: > A subsequent patch is going to make of_match_node() an inline stub when > CONFIG_OF is disabled, which will let the compiler eliminate unused variables. > In order not to clutter the code more, remove the CONFIG_OF

Re: net/ipv4: use-after-free in ipv4_datagram_support_cmsg

2017-04-12 Thread Eric Dumazet
On Wed, 2017-04-12 at 13:07 -0700, Cong Wang wrote: > On Wed, Apr 12, 2017 at 8:39 AM, Willem de Bruijn > wrote: > > === > >> BUG: KASAN: use-after-free in ipv4_datagram_support_cmsg > >> net/ipv4/ip_sockglue.c:500 [inline] at addr 880059be0128

Re: [PATCH net-next v1 1/1] L2TP device MTU setup - tunnel socket needs a lock

2017-04-12 Thread R Parameswaran
Hi Guillaume, Please see inline: On Wed, Apr 12, 2017 at 12:53 AM, Guillaume Nault wrote: > On Tue, Apr 11, 2017 at 08:14:37PM -0700, R. Parameswaran wrote: >> >> The MTU overhead calculation in L2TP device set-up >> merged via commit

Re: [PATCH net-next v1 1/1] L2TP device MTU setup - tunnel socket needs a lock

2017-04-12 Thread R Parameswaran
Hi Dave, Please see inline: On Wed, Apr 12, 2017 at 7:13 AM, David Miller wrote: > From: "R. Parameswaran" > Date: Tue, 11 Apr 2017 20:14:37 -0700 (PDT) > >> >> The MTU overhead calculation in L2TP device set-up >> merged via commit

[PATCH nf-next] ip_vs_sync: change comparison on sync_refresh_period

2017-04-12 Thread Aaron Conole
The sync_refresh_period variable is unsigned, so it can never be < 0. Signed-off-by: Aaron Conole --- net/netfilter/ipvs/ip_vs_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index

  1   2   3   4   >