RE: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova

2017-06-05 Thread Ilan Tayari
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova > > On Sun, Jun 04, 2017 at 07:51:24AM +, Ilan Tayari wrote: > > > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.

Re: [PATCH] cxgb4: implement ndo_set_vf_rate()

2017-06-05 Thread Ganesh Goudar
On Monday, June 06/05/17, 2017 at 14:03:14 +, Mintz, Yuval wrote: > > + pktsize = be16_to_cpu(port_rpl.u.info.mtu); > > + /* subtract ethhdr size and 4 bytes crc since, f/w appends it */ > > + pktsize = pktsize - sizeof(struct ethhdr) - 4; > > + /* subtract ipv4 hdr size, tcp hdr size t

Re: [PATCH v2 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-06-05 Thread Ding Tianhong
On 2017/6/6 8:28, Alexander Duyck wrote: > On Mon, Jun 5, 2017 at 6:33 AM, Ding Tianhong wrote: >> >> >> On 2017/6/4 2:19, Alexander Duyck wrote: >>> On Fri, Jun 2, 2017 at 9:04 PM, Ding Tianhong >>> wrote: The PCIe Device Control Register use the bit 4 to indicate that whether the d

Re: [PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-05 Thread Jiri Pirko
Tue, Jun 06, 2017 at 02:01:41AM CEST, jakub.kicin...@netronome.com wrote: >Hi! > >This series adds the ability to use one vNIC as a control channel >for passing messages to and from the application firmware. The >implementation restructures the existing netdev vNIC code to be able >to deal with nf

[PATCH net-next] tun: use symmetric hash

2017-06-05 Thread Jason Wang
Tun actually expects a symmetric hash for queue selecting to work correctly, otherwise packets belongs to a single flow may be redirected to the wrong queue. So this patch switch to use __skb_get_hash_symmetric(). Signed-off-by: Jason Wang --- drivers/net/tun.c | 6 +++--- 1 file changed, 3 inse

Re: [PATCH] net: ethoc: enable NAPI before poll may be scheduled

2017-06-05 Thread Tobias Klauser
On 2017-06-06 at 03:31:16 +0200, Max Filippov wrote: > ethoc_reset enables device interrupts, ethoc_interrupt may schedule a > NAPI poll before NAPI is enabled in the ethoc_open, which results in > device being unable to send or receive anything until it's closed and > reopened. In case the device

Re: [PATCH 2/2] xfrm: add UDP encapsulation port in migrate message

2017-06-05 Thread kbuild test robot
Hi Antony, [auto build test WARNING on ipsec-next/master] [also build test WARNING on v4.12-rc4 next-20170605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Antony-Antony/add-udp-encapsulation

Re: Stmmac: fix for hw timestamp of GMAC 3 unit

2017-06-05 Thread Giuseppe CAVALLARO
Hi Mario thanks for your tests, and, at first glance, your patches seem to be sensible so, please, send the changes as patches for net.git kernel. Regards Peppe On 6/6/2017 12:11 AM, Mario Molitor wrote: Dear stmmac maintainer group, I have found an problem in stmmac driver of linux kernel

Re: [PATCH net] net: bridge: fix a null pointer dereference in br_afspec

2017-06-05 Thread Roopa Prabhu
On Mon, Jun 5, 2017 at 3:26 PM, Nikolay Aleksandrov wrote: > We might call br_afspec() with p == NULL which is a valid use case if > the action is on the bridge device itself, but the bridge tunnel code > dereferences the p pointer without checking, so check if p is null > first. > > Reported-by:

Re: [PATCH net 3/3] netvsc: fix RCU warning from set_multicast

2017-06-05 Thread kbuild test robot
Hi Stephen, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Stephen-Hemminger/netvsc-bug-fixes/20170606-120730 config: x86_64-randconfig-x007-201723 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attach

Re: [PATCH net 3/3] netvsc: fix RCU warning from set_multicast

2017-06-05 Thread kbuild test robot
Hi Stephen, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Stephen-Hemminger/netvsc-bug-fixes/20170606-120730 config: x86_64-allyesdebian (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config t

Re: [PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread kbuild test robot
Hi Christian, [auto build test ERROR on net-next/master] [also build test ERROR on v4.12-rc4 next-20170605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christian-Lamparter/net-emac-fix-reset

Re: [PATCH 2/2] xfrm: add UDP encapsulation port in migrate message

2017-06-05 Thread kbuild test robot
Hi Antony, [auto build test ERROR on ipsec-next/master] [also build test ERROR on v4.12-rc4 next-20170605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Antony-Antony/add-udp-encapsulation

Re: [RFC PATCH v2 00/17] latest qdisc patch series

2017-06-05 Thread Michael S. Tsirkin
On Tue, May 02, 2017 at 08:36:03AM -0700, John Fastabend wrote: > I am not going to be able to work on this for a few days so I figured > it might be worth getting some feedback if there is any. Any thoughts > on how to squeeze a few extra pps out of this would be very useful. Batch dequeue into a

Re: [PATCH] net: bridge: fix potential NULL pointer dereference

2017-06-05 Thread Gustavo A. R. Silva
Hi Nikolay, Quoting Nikolay Aleksandrov : On 06/06/17 00:30, Gustavo A. R. Silva wrote: Add NULL check before dereferencing pointer _p_ inside br_afspec(). Addresses-Coverity-ID: 1401872 Signed-off-by: Gustavo A. R. Silva --- net/bridge/br_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [RFC PATCH v2 14/17] net: skb_array: expose peek API

2017-06-05 Thread Michael S. Tsirkin
On Tue, May 02, 2017 at 08:40:32AM -0700, John Fastabend wrote: > This adds a peek routine to skb_array.h for use with qdisc. > > Signed-off-by: John Fastabend > --- > include/linux/skb_array.h |5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/skb_array.h b/include/

linux-next: manual merge of the net-next tree with the net tree

2017-06-05 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/dsa/dsa2.c between commit: b07ac9894644 ("net: dsa: Fix stale cpu_switch reference after unbind then bind") from the net tree and commits: 8b0d3ea55587 ("net: dsa: store CPU port pointer in the tree") 937c7d

[PATCH] net: ethoc: enable NAPI before poll may be scheduled

2017-06-05 Thread Max Filippov
ethoc_reset enables device interrupts, ethoc_interrupt may schedule a NAPI poll before NAPI is enabled in the ethoc_open, which results in device being unable to send or receive anything until it's closed and reopened. In case the device is flooded with ingress packets it may be unable to recover a

Re: [PATCH v2 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-06-05 Thread Alexander Duyck
On Mon, Jun 5, 2017 at 6:33 AM, Ding Tianhong wrote: > > > On 2017/6/4 2:19, Alexander Duyck wrote: >> On Fri, Jun 2, 2017 at 9:04 PM, Ding Tianhong >> wrote: >>> The PCIe Device Control Register use the bit 4 to indicate that >>> whether the device is permitted to enable relaxed ordering or not

Re: [PATCH 2/2] xfrm: add UDP encapsulation port in migrate message

2017-06-05 Thread Richard Guy Briggs
On 2017-06-05 23:56, Antony Antony wrote: > Add XFRMA_ENCAP, UDP encapsulation port, to km_migrate announcement > to userland. Only add if XFRMA_ENCAP was in user migrate request. > > Signed-off-by: Antony Antony Looks reasonable to me. Reviewed-by: Richard Guy Briggs > --- > include/net/xfrm

Re: [PATCH 1/2] xfrm: extend MIGRATE with UDP encapsulation port

2017-06-05 Thread Richard Guy Briggs
On 2017-06-05 23:56, Antony Antony wrote: > Add UDP encapsulation port to XFRM_MSG_MIGRATE using an optional > netlink attribute XFRMA_ENCAP. > > The devices that support IKE MOBIKE extension (RFC-4555 Section 3.8) > could go to sleep for a few minutes and wake up. When it wake up the > NAT mappin

[PATCH net-next 03/16] nfp: reuse ring free code on close

2017-06-05 Thread Jakub Kicinski
On the close path reuse the ring free helpers introduced for runtime reconfiguration. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_n

[PATCH net-next 02/16] nfp: split out the allocation part of open

2017-06-05 Thread Jakub Kicinski
Our open/close implementations have 3 stages: - allocation/freeing of ring resources, irqs etc., - device config, - device/stack enable (can't fail). Right now all of those stages are placed in separate functions, apart from allocation during open. Fix that. It will make it easier for us to a

[PATCH net-next 01/16] nfp: reorder open and close functions

2017-06-05 Thread Jakub Kicinski
We will soon reuse parts of .ndo_stop() for clean up after errors in .ndo_open(). Reorder the associated functions to make that possible. No functional changes. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 140 ++--- 1 file changed, 70

[PATCH net-next 06/16] nfp: make sure debug accesses don't depend on netdevs

2017-06-05 Thread Jakub Kicinski
We want to be able to inspect the state of descriptor rings of the control vNIC, so it will use the same interface as data vNICs. Make sure the code doesn't use netdevs to determine state of the rings and names things appropriately. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netrono

[PATCH net-next 07/16] nfp: allow allocation and initialization of netdev-less vNICs

2017-06-05 Thread Jakub Kicinski
vNICs used for sending and receiving control messages shouldn't really have a netdev. Add the ability to initialize vNICs for netdev-less operation. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH net-next 11/16] nfp: map all queue controllers at once

2017-06-05 Thread Jakub Kicinski
RX and TX queue controllers are interleaved. Instead of creating two mappings which map the same area at slightly different offset, create only one mapping. Always map all queue controllers to simplify the code and allow reusing the mapping for non-data vNICs. Signed-off-by: Jakub Kicinski ---

[PATCH net-next 13/16] nfp: slice the netdev spawning function

2017-06-05 Thread Jakub Kicinski
We want to be able to create a special vNIC for control messages. This vNIC should be created before any netdev is registered to allow nfp_app logic to exchange messages with the FW app before any netdev is visible to user space. Unfortunately we can't enable IRQs until we know how many vNICs we w

[PATCH net-next 14/16] nfp: allow non-equal distribution of IRQs

2017-06-05 Thread Jakub Kicinski
Thus far the code assumed all vNICs will request similar number of IRQs. This will be no longer true with control vNICs (where 1 IRQ will suffice). Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[PATCH net-next 10/16] nfp: make vNIC ctrl memory mapping function reusable

2017-06-05 Thread Jakub Kicinski
We will soon need to map control vNIC PCI memory as well as data vNIC memory. Make the function for mapping areas pointed to by an RTsym reusable. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 55 --- 1 file changed, 28 insertions(+),

[PATCH net-next 16/16] nfp: advertise support for NFD ABI 0.5

2017-06-05 Thread Jakub Kicinski
NFD ABI 0.5 is equivalent to NFD ABI 3.0 but requires that the driver checks the APP id symbol and makes sure it can support given app. Most advanced apps will likely require control vNIC (ability to exchange control messages between the driver and app FW). Detailed app version checking and capab

[PATCH net-next 15/16] nfp: create control vNICs and wire up rx/tx

2017-06-05 Thread Jakub Kicinski
When driver encounters an nfp_app which has a control message handler defined, allocate a control vNIC. This control channel will be used to exchange data with the application FW such as flow table programming, statistics and global datapath control. Signed-off-by: Jakub Kicinski --- drivers/ne

[PATCH net-next 09/16] nfp: add control vNIC datapath

2017-06-05 Thread Jakub Kicinski
Since control vNICs don't have a netdev, they can't use napi and queuing stack provides. Add simple tasklet-based data receive and send of control messages with queuing on a skb_list. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_app.h | 11 + drivers/net/ether

[PATCH net-next 04/16] nfp: move nfp_net_vecs_init()

2017-06-05 Thread Jakub Kicinski
Move nfp_net_vecs_init() after all datapath functions. We will need to init poll() callbacks from this function soon. No functional changes. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 54 +++--- 1 file changed, 27 insertions(+), 27 de

[PATCH net-next 08/16] nfp: prepare config and enable for working without netdevs

2017-06-05 Thread Jakub Kicinski
Out of the three stages of ifup/ifdown (allocate, configure, start) - this commit prepares the configuration stage for working with control vNICs. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) dif

[PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-05 Thread Jakub Kicinski
Hi! This series adds the ability to use one vNIC as a control channel for passing messages to and from the application firmware. The implementation restructures the existing netdev vNIC code to be able to deal with nfp_nets with netdev pointer set to NULL. Control vNICs are not visible to usersp

[PATCH net-next 12/16] nfp: don't clutter init code passing fw_ver around

2017-06-05 Thread Jakub Kicinski
Reading fw version from the BAR is trivial. Don't pass it around through layers of init functions, simply read it again where needed. This commit has the side effect of each vNIC having the exact NFD version from its own control memory, rather than all data vNICs assuming the version of the first

[PATCH net-next 05/16] nfp: prepare print macros for use without netdev

2017-06-05 Thread Jakub Kicinski
To be able to reuse print macros easily with control vNICs make the macros check if netdev pointer is populated and use dev_* print functions otherwise. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 33 +--- 1 file changed, 25 insertions

Re: BUG: KASAN: use-after-free in free_old_xmit_skbs

2017-06-05 Thread Michael S. Tsirkin
On Mon, Jun 05, 2017 at 05:08:25AM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 05, 2017 at 12:48:53AM +0200, Jean-Philippe Menil wrote: > > Hi, > > > > while playing with xdp and ebpf, i'm hitting the following: > > > > [ 309.993136] > > ===

[PATCH] net: ethernet: ti: cpdma: do not enable host error misc irq

2017-06-05 Thread Grygorii Strashko
CPSW driver does not handle this interrupt, so there are no reasons to enable it in hardware. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_cpdma.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/ne

[PATCH] cpsw: cpts: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter

2017-06-05 Thread Grygorii Strashko
CPSW driver supports PTP v1 messages, but for unknown reasons this filter is not advertised. As result, ./tools/testing/selftests/networking/timestamping/timestamping utility can't be used for testing of CPSW RX timestamping with option SOF_TIMESTAMPING_RX_HARDWARE, because it uses HWTSTAMP_FILTER_

[PATCH 1/2] hsr: fix coding style issues

2017-06-05 Thread Murali Karicheri
This fix coding style issues detected by running checkpatch.pl -f option on files under net/hsr. Signed-off-by: Murali Karicheri --- Logs at http://pastebin.ubuntu.com/24787763/ net/hsr/hsr_device.c | 55 ++-- net/hsr/hsr_forward.c | 72 ++-

[PATCH 2/2] hsr: fix incorrect warning

2017-06-05 Thread Murali Karicheri
When HSR interface is setup using ip link command, an annoying warning appears with the trace as below:- [ 203.019828] hsr_get_node: Non-HSR frame [ 203.019833] Modules linked in: [ 203.019848] CPU: 0 PID: 158 Comm: sd-resolve Tainted: GW 4.12.0-rc3-00052-g9fa6bf70 #2 [ 203.0198

[PATCH net] net: bridge: fix a null pointer dereference in br_afspec

2017-06-05 Thread Nikolay Aleksandrov
We might call br_afspec() with p == NULL which is a valid use case if the action is on the bridge device itself, but the bridge tunnel code dereferences the p pointer without checking, so check if p is null first. Reported-by: Gustavo A. R. Silva Fixes: efa5356b0d97 ("bridge: per vlan dst_metadat

Re: [PATCH v1 2/2] net: emac: fix and unify emac_mdio functions

2017-06-05 Thread Christian Lamparter
On Monday, June 5, 2017 11:43:33 PM CEST Andrew Lunn wrote: > On Mon, Jun 05, 2017 at 10:49:40PM +0200, Christian Lamparter wrote: > > emac_mdio_read_link() was not copying the requested phy settings > > back into the emac driver's own phy api. This has caused a link > > speed mismatch issue for th

[PATCH net-next] net: dsa: mv88e6xxx: fix 6085 frame mode masking

2017-06-05 Thread Vivien Didelot
The register bits used for the frame mode were masked with DSA (0x1) instead of the mask value (0x3) in the 6085 implementation of port_set_frame_mode. Fix this. Fixes: 56995cbc3540 ("net: dsa: mv88e6xxx: Refactor CPU and DSA port setup") Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6x

[PATCH] ravb: Fix use-after-free on `ifconfig eth0 down`

2017-06-05 Thread Eugeniu Rosca
Commit a47b70ea86bd ("ravb: unmap descriptors when freeing rings") has introduced the issue seen in [1] reproduced on H3ULCB board. Fix this by relocating the RX skb ringbuffer free operation, so that swiotlb page unmapping can be done first. Freeing of aligned TX buffers is not relevant to the is

Stmmac: fix for hw timestamp of GMAC 3 unit

2017-06-05 Thread Mario Molitor
Dear stmmac maintainer group, I have found an problem in stmmac driver of linux kernel and I hope for a fix in the mainline kernel. At the moment I have two patch files which fix this problem for me. The problem seems created with the commit d2042052a0aa6a54f01a0c9e14243ec040b100e2 and ba1ffd74

Re: [PATCH 6/6] net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support

2017-06-05 Thread Russell King - ARM Linux
On Mon, Jun 05, 2017 at 08:21:57PM +0200, Andrew Lunn wrote: > On Mon, Jun 05, 2017 at 12:23:16PM +0100, Russell King wrote: > > Add phylib support for the Marvell Alaska X 10 Gigabit PHY (MV88X3310). > > This phy is able to operate at 10G, 1G, 100M and 10M speeds, and only > > supports Clause 45 a

Re: [PATCH] net: bridge: fix potential NULL pointer dereference

2017-06-05 Thread Nikolay Aleksandrov
On 06/06/17 00:30, Gustavo A. R. Silva wrote: > Add NULL check before dereferencing pointer _p_ inside br_afspec(). > > Addresses-Coverity-ID: 1401872 > Signed-off-by: Gustavo A. R. Silva > --- > net/bridge/br_netlink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ne

[PATCH 2/2] xfrm: add UDP encapsulation port in migrate message

2017-06-05 Thread Antony Antony
Add XFRMA_ENCAP, UDP encapsulation port, to km_migrate announcement to userland. Only add if XFRMA_ENCAP was in user migrate request. Signed-off-by: Antony Antony --- include/net/xfrm.h | 5 +++-- net/key/af_key.c | 3 ++- net/xfrm/xfrm_policy.c | 2 +- net/xfrm/xfrm_state.c | 5 +

[PATCH 0/2] add udp encapsulation port to xfrm_do_migrate

2017-06-05 Thread Antony Antony
Currently xfrm_do_migrate only support migrating IP address. This patches add UDP encapsulation port to xfrm_do_migrate. The use case is for devices such as phones that support IKE MOBIKE. Often when the device move from one network to the another or wake up from sleep external NAT gateway IP addr

[PATCH 1/2] xfrm: extend MIGRATE with UDP encapsulation port

2017-06-05 Thread Antony Antony
Add UDP encapsulation port to XFRM_MSG_MIGRATE using an optional netlink attribute XFRMA_ENCAP. The devices that support IKE MOBIKE extension (RFC-4555 Section 3.8) could go to sleep for a few minutes and wake up. When it wake up the NAT mapping could have expired, the device send a MOBIKE UPDATE_

Re: [PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread David Miller
From: Andrew Lunn Date: Mon, 5 Jun 2017 23:48:57 +0200 > On Mon, Jun 05, 2017 at 11:44:46PM +0200, Christian Lamparter wrote: >> On Monday, June 5, 2017 11:26:17 PM CEST Andrew Lunn wrote: >> > > In order to stay compatible with existing configurations, the >> > > driver will try the normal reset

Re: [PATCH v2 0/6] Add phylib support for MV88X3310 10G phy

2017-06-05 Thread David Miller
From: Russell King - ARM Linux Date: Mon, 5 Jun 2017 12:22:03 +0100 > This patch series adds support for the Marvell 88x3310 PHY found on > the SolidRun Macchiatobin board. Series applied, thanks.

Re: [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set

2017-06-05 Thread Saeed Mahameed
On Mon, Jun 5, 2017 at 11:51 PM, Jes Sorensen wrote: > On 06/03/2017 03:37 PM, Or Gerlitz wrote: >> >> On Fri, Jun 2, 2017 at 11:22 PM, Jes Sorensen wrote: >>> >>> On 05/28/2017 02:03 AM, Or Gerlitz wrote: On Sun, May 28, 2017 at 5:23 AM, Jes Sorensen wrote: > > >

[PATCH] net: bridge: fix potential NULL pointer dereference

2017-06-05 Thread Gustavo A. R. Silva
Add NULL check before dereferencing pointer _p_ inside br_afspec(). Addresses-Coverity-ID: 1401872 Signed-off-by: Gustavo A. R. Silva --- net/bridge/br_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 1e63ec4..a

Re: [PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 11:44:46PM +0200, Christian Lamparter wrote: > On Monday, June 5, 2017 11:26:17 PM CEST Andrew Lunn wrote: > > > In order to stay compatible with existing configurations, the > > > driver will try the normal reset first and only falls back to > > > to the internal clock, aft

Re: [PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread Christian Lamparter
On Monday, June 5, 2017 11:26:17 PM CEST Andrew Lunn wrote: > > In order to stay compatible with existing configurations, the > > driver will try the normal reset first and only falls back to > > to the internal clock, after the first reset fails. If the > > second reset fails as well, it will give

Re: [PATCH v1 2/2] net: emac: fix and unify emac_mdio functions

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 10:49:40PM +0200, Christian Lamparter wrote: > emac_mdio_read_link() was not copying the requested phy settings > back into the emac driver's own phy api. This has caused a link > speed mismatch issue for the AR8035 as the emac driver kept > trying to connect with 10/100MBps

Re: [PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread Andrew Lunn
> In order to stay compatible with existing configurations, the > driver will try the normal reset first and only falls back to > to the internal clock, after the first reset fails. If the > second reset fails as well, it will give up as before. Hi Christian This gets things probed correctly. But

[PATCH net 3/3] netvsc: fix RCU warning from set_multicast

2017-06-05 Thread Stephen Hemminger
do_set_multicast runs in a work queue and therefore is not holding RCU read lock. This causes: WARNING: suspicious RCU usage 4.12.0-rc2-net-00284-ge23454766d55-dirty #2 Not tainted - drivers/net/hyperv/netvsc_drv.c:65 suspicious rcu_dereference_check() usage! Fix by ac

[PATCH net 0/3] netvsc bug fixes

2017-06-05 Thread Stephen Hemminger
These are non-critical bug fixes to the 4.12 version of netvsc network driver. Two fix RCU splat warnings, and the other fixes long standing issue with net poll. I don't think anyone has run into the net poll issue before, so not worth incorporating into stable. Stephen Hemminger (3): netvsc: fi

[PATCH net 2/3] netvsc: fix net poll mode

2017-06-05 Thread Stephen Hemminger
The ndo_poll_controller function needs to schedule NAPI to pick up arriving packets and send completions. Otherwise no data will ever be received. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff

[PATCH net 1/3] netvsc: fix rcu dereference warning from ethtool

2017-06-05 Thread Stephen Hemminger
The ethtool info command calls the netvsc get_sset_count with RTNL but not with RCU. Which causes warning: drivers/net/hyperv/netvsc_drv.c:1010 suspicious rcu_dereference_check() usage! Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 1/1] mlx5: Allow TC support to be disabled in the build

2017-06-05 Thread Jes Sorensen
This provides the option for TC offload support to be disabled in the driver. Signed-off-by: Jes Sorensen --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 10 ++ drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 39 ++--

[PATCH 0/1] Allow TC support to be disabled

2017-06-05 Thread Jes Sorensen
Hi, Here is the follow-on patch which allows for TC support to be compiled out. It builds on top of my patch set from last week. Jes Jes Sorensen (1): mlx5: Allow TC support to be disabled in the build drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 10 ++ drivers/net/ethernet/mell

Re: [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set

2017-06-05 Thread Jes Sorensen
On 06/03/2017 03:37 PM, Or Gerlitz wrote: On Fri, Jun 2, 2017 at 11:22 PM, Jes Sorensen wrote: On 05/28/2017 02:03 AM, Or Gerlitz wrote: On Sun, May 28, 2017 at 5:23 AM, Jes Sorensen wrote: On 05/27/2017 05:02 PM, Or Gerlitz wrote: On Sat, May 27, 2017 at 12:16 AM, Jes Sorensen wrote:

[PATCH v1 1/2] net: emac: fix reset timeout with AR8035 phy

2017-06-05 Thread Christian Lamparter
This patch fixes a problem where the AR8035 PHY can't be detected on an Cisco Meraki MR24, if the ethernet cable is not connected on boot. Russell Senior provided steps to reproduce the issue: |Disconnect ethernet cable, apply power, wait until device has booted, |plug in ethernet, check for inter

[PATCH v1 2/2] net: emac: fix and unify emac_mdio functions

2017-06-05 Thread Christian Lamparter
emac_mdio_read_link() was not copying the requested phy settings back into the emac driver's own phy api. This has caused a link speed mismatch issue for the AR8035 as the emac driver kept trying to connect with 10/100MBps on a 1GBit/s link. This patch also unifies shared code between emac_setup_a

Re: [patch net-next 1/6] net: sched: introduce a TRAP control action

2017-06-05 Thread Jiri Pirko
Mon, Jun 05, 2017 at 09:56:32PM CEST, and...@lunn.ch wrote: >> On Mon, Jun 05, 2017 at 04:38:27PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> There is need to instruct the HW offloaded path to push certain matched >> packets to cpu/kernel for further analysis. So this patch introduces a >>

Re: [patch net-next 1/6] net: sched: introduce a TRAP control action

2017-06-05 Thread Andrew Lunn
> On Mon, Jun 05, 2017 at 04:38:27PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > There is need to instruct the HW offloaded path to push certain matched > packets to cpu/kernel for further analysis. So this patch introduces a > new TRAP control action to TC. > > For kernel datapath, this act

Re: [patch net-next 0/6] introduce trap control action to tc and offload it

2017-06-05 Thread Jiri Pirko
Mon, Jun 05, 2017 at 09:43:17PM CEST, j...@resnulli.us wrote: >Mon, Jun 05, 2017 at 05:46:51PM CEST, and...@lunn.ch wrote: >>On Mon, Jun 05, 2017 at 04:38:26PM +0200, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> This patchset introduces a control action dedicated to indicate >>> to trap the mat

Re: [patch net-next 0/6] introduce trap control action to tc and offload it

2017-06-05 Thread Jiri Pirko
Mon, Jun 05, 2017 at 05:46:51PM CEST, and...@lunn.ch wrote: >On Mon, Jun 05, 2017 at 04:38:26PM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This patchset introduces a control action dedicated to indicate >> to trap the matched packet to CPU. This is specific action for >> HW offloads. Also

Re: [PATCH V7 net-next iproute] ip: Add IFLA_EVENT output to ip monitor

2017-06-05 Thread Stephen Hemminger
On Thu, 1 Jun 2017 11:01:16 -0400 Vladislav Yasevich wrote: > Add IFLA_EVENT output so that event types can be viewed with > 'monitor' command. This gives a little more information for why > a given message was received. > > Signed-off-by: Vladislav Yasevich Applied to net-next.

Re: [PATCH] virtio_net: lower limit on buffer size

2017-06-05 Thread J. Bruce Fields
On Sat, Jun 03, 2017 at 11:17:30PM +0300, Sergei Shtylyov wrote: > On 06/02/2017 11:25 PM, J. Bruce Fields wrote: > > >>>commit d85b758f72b0 "virtio_net: fix support for small rings" > >> > >> Commit d85b758f72b0 ("virtio_net: fix support for small rings") > >> > >>>was supposed to increase the

Re: [PATCH iproute2] iproute: extend route get to return matching fib route

2017-06-05 Thread Stephen Hemminger
On Thu, 1 Jun 2017 21:53:28 -0700 Roopa Prabhu wrote: > From: Roopa Prabhu > > Uses newly introduced RTM_GETROUTE flag RTM_F_FIB_MATCH > to return a matching fib route. Introduces 'fibmatch' > keyword to ip route get. > > ipv4: > > $ip route show > default via 192.168.0.2 dev eth0 > 10.0

Re: [PATCH iproute2 V2] iplink: Update usage in help message

2017-06-05 Thread Stephen Hemminger
On Sun, 4 Jun 2017 15:36:48 +0300 Tariq Toukan wrote: > From: Eli Cohen > > Add to usage message a description of how to configure Infiniband node > and port GUIDs. Also modify the man page to emphasize the GUIDs are > configured for Infiniband VFs. > > Fixes: d91fb3f4c7e4 ("Add support for c

Re: [PATCH] ip: link add vxcan support

2017-06-05 Thread Stephen Hemminger
On Fri, 2 Jun 2017 19:04:47 +0200 Oliver Hartkopp wrote: > Since commit a8f820a380a2a06 ('can: add Virtual CAN Tunnel driver (vxcan)') > for Linux 4.12 a virtual CAN tunnel driver analogue to veth is available in > Linux. > > This patch adds the ability to create vxcan device pairs. > > Signed

[PATCH v3 net-next 1/8] bpf: Introduce bpf_prog ID

2017-06-05 Thread Martin KaFai Lau
This patch generates an unique ID for each BPF_PROG_LOAD-ed prog. It is worth to note that each BPF_PROG_LOAD-ed prog will have a different ID even they have the same bpf instructions. The ID is generated by the existing idr_alloc_cyclic(). The ID is ranged from [1, INT_MAX). It is allocated in c

[PATCH v3 net-next 6/8] bpf: Add jited_len to struct bpf_prog

2017-06-05 Thread Martin KaFai Lau
Add jited_len to struct bpf_prog. It will be useful for the struct bpf_prog_info which will be added in the later patch. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- arch/arm64/net/bpf_jit_comp.c | 1 + arch/powerpc/net/bpf_jit_comp64.c | 1 +

[PATCH v3 net-next 7/8] bpf: Add BPF_OBJ_GET_INFO_BY_FD

2017-06-05 Thread Martin KaFai Lau
A single BPF_OBJ_GET_INFO_BY_FD cmd is used to obtain the info for both bpf_prog and bpf_map. The kernel can figure out the fd is associated with a bpf_prog or bpf_map. The suggested struct bpf_prog_info and struct bpf_map_info are not meant to be a complete list and it is not the goal of this pa

[PATCH v3 net-next 3/8] bpf: Add BPF_(PROG|MAP)_GET_NEXT_ID command

2017-06-05 Thread Martin KaFai Lau
This patch adds BPF_PROG_GET_NEXT_ID and BPF_MAP_GET_NEXT_ID to allow userspace to iterate all bpf_prog IDs and bpf_map IDs. The API is trying to be consistent with the existing BPF_MAP_GET_NEXT_KEY. It is currently limited to CAP_SYS_ADMIN which we can consider to lift it in followup patches. S

[PATCH v3 net-next 2/8] bpf: Introduce bpf_map ID

2017-06-05 Thread Martin KaFai Lau
This patch generates an unique ID for each created bpf_map. The approach is similar to the earlier patch for bpf_prog ID. It is worth to note that the bpf_map's ID and bpf_prog's ID are in two independent ID spaces and both have the same valid range: [1, INT_MAX). Signed-off-by: Martin KaFai Lau

[PATCH v3 net-next 5/8] bpf: Add BPF_MAP_GET_FD_BY_ID

2017-06-05 Thread Martin KaFai Lau
Add BPF_MAP_GET_FD_BY_ID command to allow user to get a fd from a bpf_map's ID. bpf_map_inc_not_zero() is added and is called with map_idr_lock held. __bpf_map_put() is also added which has the 'bool do_idr_lock' param to decide if the map_idr_lock should be acquired when freeing the map->id. In

[PATCH v3 net-next 8/8] bpf: Test for bpf ID

2017-06-05 Thread Martin KaFai Lau
Add test to exercise the bpf_prog/map id generation, bpf_(prog|map)_get_next_id(), bpf_(prog|map)_get_fd_by_id() and bpf_get_obj_info_by_fd(). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h| 41 +++ too

[PATCH v3 net-next 0/8] Introduce bpf ID

2017-06-05 Thread Martin KaFai Lau
This patch series: 1) Introduce ID for both bpf_prog and bpf_map. 2) Add bpf commands to iterate the prog IDs and map IDs of the system. 3) Add bpf commands to get a prog/map fd from an ID 4) Add bpf command to get prog/map info from a fd. The prog/map info is a jump start in this patchset

[PATCH v3 net-next 4/8] bpf: Add BPF_PROG_GET_FD_BY_ID

2017-06-05 Thread Martin KaFai Lau
Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd from a bpf_prog's ID. bpf_prog_inc_not_zero() is added and is called with prog_idr_lock held. __bpf_prog_put() is also added which has the 'bool do_idr_lock' param to decide if the prog_idr_lock should be acquired when freeing the prog->

Re: [PATCH v4 2/7] net: pch_gbe: Pull PHY GPIO handling out of Minnow code

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 10:31:31AM -0700, Paul Burton wrote: > The MIPS Boston development board uses the Intel EG20T Platform > Controller Hub, including its gigabit ethernet controller, and requires > that its RTL8211E PHY be reset much like the Minnow platform. Pull the > PHY reset GPIO handling

Re: [PATCH v4 4/7] net: pch_gbe: Add device tree support

2017-06-05 Thread Andrew Lunn
> +static struct pch_gbe_privdata * > +pch_gbe_get_priv(struct pci_dev *pdev, const struct pci_device_id *pci_id) > +{ > + struct pch_gbe_privdata *pdata; > + struct gpio_desc *gpio; > + > + if (!IS_ENABLED(CONFIG_OF)) > + return (struct pch_gbe_privdata *)pci_id->driver_dat

Re: More BPF verifier questions

2017-06-05 Thread Josef Bacik
On Mon, Jun 05, 2017 at 11:11:05AM -0700, Alexei Starovoitov wrote: > On 6/2/17 7:42 AM, Edward Cree wrote: > >Also, I feel I haven't fully understood the semantics of {min,max}_value and > > signed vs. unsigned comparisons. It seems that currently reg_set_min_max > > [_inv] assumes that any given

Re: [PATCH v4 3/7] dt-bindings: net: Document Intel pch_gbe binding

2017-06-05 Thread Sergei Shtylyov
Hello! On 06/05/2017 08:31 PM, Paul Burton wrote: Introduce documentation for a device tree binding for the Intel Platform Controller Hub (PCH) GigaBit Ethernet (GBE) device. Although this is a PCIe device & thus largely auto-detectable, this binding will be used to provide the driver with the

Re: [PATCH v3 2/7] net: pch_gbe: Pull PHY GPIO handling out of Minnow code

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 10:21:50AM -0700, Paul Burton wrote: > Hi Andrew, > > On Saturday, 3 June 2017 10:52:00 PDT Andrew Lunn wrote: > > > diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > > > b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index > > > d38198718005..cb9b

Re: [PATCH 6/6] net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 12:23:16PM +0100, Russell King wrote: > Add phylib support for the Marvell Alaska X 10 Gigabit PHY (MV88X3310). > This phy is able to operate at 10G, 1G, 100M and 10M speeds, and only > supports Clause 45 accesses. > > The PHY appears (based on the vendor IDs) to be two dif

Re: [PATCH 6/6] net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support

2017-06-05 Thread Florian Fainelli
On 06/05/2017 04:23 AM, Russell King wrote: > Add phylib support for the Marvell Alaska X 10 Gigabit PHY (MV88X3310). > This phy is able to operate at 10G, 1G, 100M and 10M speeds, and only > supports Clause 45 accesses. > > The PHY appears (based on the vendor IDs) to be two different vendors > I

Re: [PATCH 6/6] net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support

2017-06-05 Thread Andrew Lunn
On Mon, Jun 05, 2017 at 12:23:16PM +0100, Russell King wrote: > Add phylib support for the Marvell Alaska X 10 Gigabit PHY (MV88X3310). > This phy is able to operate at 10G, 1G, 100M and 10M speeds, and only > supports Clause 45 accesses. > > The PHY appears (based on the vendor IDs) to be two dif

Re: More BPF verifier questions

2017-06-05 Thread Alexei Starovoitov
On 6/2/17 7:42 AM, Edward Cree wrote: Also, I feel I haven't fully understood the semantics of {min,max}_value and signed vs. unsigned comparisons. It seems that currently reg_set_min_max [_inv] assumes that any given register-value will either only be used as signed, or only be used as unsig

[PATCH][netdev-next] mdio: mux: fix an incorrect less than zero error check using a u32

2017-06-05 Thread Colin King
From: Colin Ian King The u32 variable v is being checked to see if an error return is less than zero and this check has no effect because it is unsigned. Fix this by making v and int (this also matches the type of cb->bus_number which is assigned to the value in v). Detected by CoverityScan, CID

re: phy: cpcap-usb: Add CPCAP PMIC USB support

2017-06-05 Thread Colin Ian King
Hi Tony, While running static analysis on linux-next, CoverityScan picked up a NULL pointer deference on ddata->pins when calling pinctrl_lookup_state: 466ddata->pins = devm_pinctrl_get(ddata->dev); 1. Condition IS_ERR(ddata->pins), taking true branch. 467if (IS_ERR(ddata->pi

Re: [PATCH v1] net: phy: Delete unused function phy_ethtool_gset

2017-06-05 Thread Florian Fainelli
On 06/05/2017 12:18 AM, Yuval Shaia wrote: > It's unused, so remove it. > > Signed-off-by: Yuval Shaia Reviewed-by: Florian Fainelli -- Florian

  1   2   >