Re: [PATCH net-next v2 4/9] nfp: extend flower add flow offload

2017-06-28 Thread Jakub Kicinski
On Thu, 29 Jun 2017 14:18:07 +0800, Yunsheng Lin wrote: > > + if (mask_basic->n_proto) { > cpu_to_be16(mask_basic->n_proto) > remove cpu_to_be16 in case. Thanks, but this is incorrect. Byte swapping constants is done at compilation time - therefore it's preferred.

Re: [PATCH net-next v2 4/9] nfp: extend flower add flow offload

2017-06-28 Thread Yunsheng Lin
> + > + if (mask_basic->n_proto) { cpu_to_be16(mask_basic->n_proto) remove cpu_to_be16 in case. > + /* Ethernet type is present in the key. */ > + switch (key_basic->n_proto) { > + case cpu_to_be16(ETH_P_IP): > + key_layer |= NFP_FLOWER_L

[PATCH v4 4/4] net: macb: Add hardware PTP support

2017-06-28 Thread Rafal Ozieblo
This patch is based on original Harini's patch and Andrei's patch, implemented in a separate file to ease the review/maintanance and integration with other platforms. This driver supports GEM-GXL: - Register ptp clock framework - Initialize PTP related registers - HW time stamp on the PTP Ethernet

[PATCH v4 2/4] net: macb: Add tsu_clk to device tree

2017-06-28 Thread Rafal Ozieblo
Signed-off-by: Rafal Ozieblo Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index 1506e94..27966ae 100644 --- a/Documenta

[PATCH v4 1/4] net: macb: Add support for PTP timestamps in DMA descriptors

2017-06-28 Thread Rafal Ozieblo
This patch adds support for PTP timestamps in DMA buffer descriptors. It checks capability at runtime and uses appropriate buffer descriptor. Signed-off-by: Rafal Ozieblo --- drivers/net/ethernet/cadence/Kconfig | 10 ++- drivers/net/ethernet/cadence/macb.c | 117 ++

[PATCH v4 0/4] PTP support for macb driver

2017-06-28 Thread Rafal Ozieblo
This patch series adds support for PTP synchronization protocol in Cadence GEM driver based on PHC. v2 changes: * removed alarm's support * removed external time stamp support * removed PTP event interrupt handling * removed ptp_hw_support flag * removed all extra sanity checks * removed unnecessa

[PATCH] net: freescale: gianfar : constify dev_pm_ops structures.

2017-06-28 Thread Arvind Yadav
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: textdata bss dec hex filename 19057 392 0 194494bf9 drivers/net/ethernet/f

[PATCH] net: smc91x: constify dev_pm_ops structures.

2017-06-28 Thread Arvind Yadav
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: textdata bss dec hex filename 18709 401 0 191104aa6 drivers/net/ethernet/s

Re: [PATCH v6 0/3] Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-06-28 Thread Ding Tianhong
ping On 2017/6/22 20:15, Ding Tianhong wrote: > Some devices have problems with Transaction Layer Packets with the Relaxed > Ordering Attribute set. This patch set adds a new PCIe Device Flag, > PCI_DEV_FLAGS_NO_RELAXED_ORDERING, a set of PCI Quirks to catch some known > devices with Relaxed Orde

[PATCH] net: ibm: ibmveth: constify dev_pm_ops structures.

2017-06-28 Thread Arvind Yadav
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by work with const dev_pm_ops. So mark the non-const structs as const. File size before: textdata bss dec hex filename 154261256 0 16682412a drivers/net/ethernet/i

Re: [PATCH net-next v2 3/9] nfp: provide infrastructure for offloading flower based TC filters

2017-06-28 Thread Simon Horman
On Wed, Jun 28, 2017 at 06:35:07PM -0700, Jakub Kicinski wrote: > On Wed, 28 Jun 2017 22:29:56 +0200, Simon Horman wrote: > > From: Pieter Jansen van Vuuren > > > > Adds a flower based TC offload handler for representor devices, this > > is in addition to the bpf based offload handler. The change

Re: [PATCH v3 net-next 03/12] nfp: change bpf verifier hooks to match new verifier data structures

2017-06-28 Thread Jakub Kicinski
On Tue, 27 Jun 2017 13:57:34 +0100, Edward Cree wrote: > Signed-off-by: Edward Cree Acked-by: Jakub Kicinski Sorry about the delay.

Re: [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW

2017-06-28 Thread Or Gerlitz
On Wed, Jun 28, 2017 at 11:10 PM, Arnd Bergmann wrote: > With the introduction of mlx5 firmware flash support, we get a link > error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y: > > drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function > `mlx5_firmware_flash': > fw.c:(.text+0x9d4): undefined r

Re: [PATCH net] bpf: prevent leaking pointer via xadd on unpriviledged

2017-06-28 Thread Alexei Starovoitov
On 6/28/17 6:04 PM, Daniel Borkmann wrote: Prevent this by checking xadd src reg for pointer types. Also add a couple of test cases related to this. Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs") Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Daniel Borkmann

Re: [PATCH net-next v2 8/9] nfp: add a stats handler for flower offloads

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 22:30:01 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Previously there was no way of updating flow rule stats after they > have been offloaded to hardware. This is solved by keeping track of > stats received from hardware and providing this to the TC handler

Re: [PATCH NET V5 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-28 Thread Yunsheng Lin
Hi, Andrew On 2017/6/29 4:28, Andrew Lunn wrote: >>> >From your description, it sounds like you can call phy_resume() on a >>> device which is not suspended. >> Do you mean after calling dev_close, the device is still not suspended? > > You only call dev_close() if the device is running. What if

Re: [PATCH net-next v2 7/9] nfp: add metadata to each flow offload

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 22:30:00 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Adds metadata describing the mask id of each flow and keeps track of > flows installed in hardware. Previously a flow could not be removed > from hardware as there was no way of knowing if that a specific

Re: [PATCH net-next v2 3/9] nfp: provide infrastructure for offloading flower based TC filters

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 22:29:56 +0200, Simon Horman wrote: > +/** > + * nfp_flower_del_offload() - Removes a flow from hardware. > + * @app: Pointer to the APP handle > + * @netdev: netdev structure. > + * @flow:   TC flower classifier offload structure Nit: there are spaces and tabs mixed h

[PATCH v3] datapath: Avoid using stack larger than 1024.

2017-06-28 Thread Tonghao Zhang
When compiling OvS-master on 4.4.0-81 kernel, there is a warning: CC [M] /root/ovs/datapath/linux/datapath.o /root/ovs/datapath/linux/datapath.c: In function 'ovs_flow_cmd_set': /root/ovs/datapath/linux/datapath.c:1221:1: warning: the frame size of 1040 bytes is larger than 10

Re: [PATCH NET V7 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-28 Thread Yunsheng Lin
Hi, Andrew On 2017/6/28 21:27, Andrew Lunn wrote: > On Wed, Jun 28, 2017 at 05:13:10PM +0800, Lin Yun Sheng wrote: >> This patch add set_loopback in phy_driver, which is used by MAC >> driver to enable or disable phy loopback. it also add a generic >> genphy_loopback function, which use BMCR loopb

Re: [PATCH net-next v2 3/9] nfp: provide infrastructure for offloading flower based TC filters

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 22:29:56 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Adds a flower based TC offload handler for representor devices, this > is in addition to the bpf based offload handler. The changes in this > patch will be used in a follow-up patch to add tc flower offlo

Re: [PATCH net-next v2 8/9] nfp: add a stats handler for flower offloads

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 22:30:01 +0200, Simon Horman wrote: > @@ -288,7 +292,21 @@ nfp_flower_del_offload(struct nfp_app *app, struct > net_device *netdev, > static int > nfp_flower_get_stats(struct nfp_app *app, struct tc_cls_flower_offload *flow) > { > - return -EOPNOTSUPP; > + struct nfp

[PATCH net] bpf: prevent leaking pointer via xadd on unpriviledged

2017-06-28 Thread Daniel Borkmann
Leaking kernel addresses on unpriviledged is generally disallowed, for example, verifier rejects the following: 0: (b7) r0 = 0 1: (18) r2 = 0x897e82304400 3: (7b) *(u64 *)(r1 +48) = r2 R2 leaks addr into ctx Doing pointer arithmetic on them is also forbidden, so that they don't turn i

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 14:47:51 -0700, Dustin Byford wrote: > Hi Andrew, > > On Wed Jun 28 15:41, Andrew Lunn wrote: > > On Tue, Jun 27, 2017 at 03:22:39AM -0700, Jakub Kicinski wrote: > > > On Sat, 24 Jun 2017 12:19:43 -0700, Roopa Prabhu wrote: > > > > Encoding: Types of encoding > > > > Off

[PATCH net-next] ibmvnic: Fix assignment of RX/TX IRQ's

2017-06-28 Thread Thomas Falcon
The driver currently creates RX/TX queues during device probe, but assigns IRQ's to them during device open. On reset, however, IRQ's are assigned when resetting the queues. If there is a reset while the device is closed and the device is later opened, the driver will request IRQ's twice, causing t

Re: ti: wl18xx: add checks on wl18xx_top_reg_write() return value

2017-06-28 Thread Gustavo A. R. Silva
Quoting Kalle Valo : "Gustavo A. R. Silva" wrote: Check return value from call to wl18xx_top_reg_write(), so in case of error jump to goto label out and return. Also, remove unnecessary value check before goto label out. Addresses-Coverity-ID: 1226938 Signed-off-by: Gustavo A. R. Silva

Re: [RFC 2/2] phy: bcm-ns-usb3: fix MDIO_BUS dependency

2017-06-28 Thread Florian Fainelli
On 06/21/2017 03:06 PM, Arnd Bergmann wrote: > The driver attempts to 'select MDIO_DEVICE', but the code > is actually a loadable module when PHYLIB=m: > > drivers/phy/broadcom/phy-bcm-ns-usb3.o: In function > `bcm_ns_usb3_mdiodev_phy_write': > phy-bcm-ns-usb3.c:(.text.bcm_ns_usb3_mdiodev_phy_wri

Re: [RFC 1/2] net: phy: rework Kconfig settings for MDIO_BUS

2017-06-28 Thread Florian Fainelli
On 06/21/2017 03:06 PM, Arnd Bergmann wrote: > I still see build errors in randconfig builds and have had this > patch for a while to locally work around it: > > drivers/built-in.o: In function `xgene_mdio_probe': > mux-core.c:(.text+0x352154): undefined reference to `of_mdiobus_register' > mux-co

CAN-FD Transceiver Limitations

2017-06-28 Thread Franklin S Cooper Jr
Hi All, The various CAN transceivers I've seen that support CAN-FD appear to be fairly limited in terms of their supported max speed. I've seen some transceivers that only support upto 2 Mbps while others support up to 5 Mbps. This is a problem when the SoC's CAN IP can support even higher values

Re: Adding nfc-next to linux-next

2017-06-28 Thread Stephen Rothwell
Hi Samuel, On Wed, 28 Jun 2017 09:25:31 +0200 Samuel Ortiz wrote: > > Could you please add the nfc-next tree to linux-next? > > It's here: > > https://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next.git/ > > and the branch is the master one. Added from today. Thanks for adding your su

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-28 Thread Dustin Byford
Hi Andrew, On Wed Jun 28 15:41, Andrew Lunn wrote: > On Tue, Jun 27, 2017 at 03:22:39AM -0700, Jakub Kicinski wrote: > > On Sat, 24 Jun 2017 12:19:43 -0700, Roopa Prabhu wrote: > > > Encoding: Types of encoding > > > Off: Turning off any encoding > > > RS : enforcing RS-FEC encoding on s

Re: [PATCH v3 net-next 00/12] bpf: rewrite value tracking in verifier

2017-06-28 Thread Alexei Starovoitov
On Wed, Jun 28, 2017 at 10:38:02PM +0200, Daniel Borkmann wrote: > On 06/28/2017 04:11 PM, Edward Cree wrote: > > On 28/06/17 14:50, Daniel Borkmann wrote: > > > Hi Edward, > > > > > > Did you also have a chance in the meantime to look at reducing complexity > > > along with your unification? I di

Re: [PATCH net-next 0/3] fix sw timestamping for non PTP packets

2017-06-28 Thread Grygorii Strashko
On 06/27/2017 08:58 AM, Ivan Khoronzhuk wrote: This series contains several corrections connected with timestamping for cpsw and netcp drivers based on same cpts module. Based on net/next Reviewed-by: Grygorii Strashko Ivan Khoronzhuk (3): net: ethernet: ti: cpsw: move skb timestamp t

Re: [PATCH v3 net-next 03/12] nfp: change bpf verifier hooks to match new verifier data structures

2017-06-28 Thread Daniel Borkmann
On 06/27/2017 02:57 PM, Edward Cree wrote: Signed-off-by: Edward Cree Acked-by: Daniel Borkmann

Re: [PATCH v3 net-next 00/12] bpf: rewrite value tracking in verifier

2017-06-28 Thread Daniel Borkmann
On 06/28/2017 04:11 PM, Edward Cree wrote: On 28/06/17 14:50, Daniel Borkmann wrote: Hi Edward, Did you also have a chance in the meantime to look at reducing complexity along with your unification? I did run the cilium test suite with your latest set from here and current # worst case processe

Re: [PATCH v2] datapath: Avoid using stack larger than 1024.

2017-06-28 Thread Pravin Shelar
On Tue, Jun 27, 2017 at 7:29 PM, Tonghao Zhang wrote: > When compiling OvS-master on 4.4.0-81 kernel, > there is a warning: > > CC [M] /root/ovs/datapath/linux/datapath.o > /root/ovs/datapath/linux/datapath.c: In function > ‘ovs_flow_cmd_set’: > /root/ovs/datapath/linux/datapath.c

[PATCH V2 0/1] Reduce cdc_ncm memory use when kernel memory low

2017-06-28 Thread Jim Baxter
Problem --- We are using an ARM embedded platform and require 16KiB NTB's to allow for fast data transfer. Unfortunately we have found that there are times after running the kernel for a while and transferring a lot of data over the CDC-NCM connection that it can become harder to find 16KiB pa

[PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-06-28 Thread Jim Baxter
The CDC-NCM driver can require large amounts of memory to create skb's and this can be a problem when the memory becomes fragmented. This especially affects embedded systems that have constrained resources but wish to maximise the throughput of CDC-NCM with 16KiB NTB's. The issue is after running

[PATCH net-next v2 0/9] introduce flower offload capabilities

2017-06-28 Thread Simon Horman
Hi, this series adds flower offload to the NFP driver. It builds on recent work to add representor and a skeleton flower app - now the app does what its name says. In general the approach taken is to allow some flows within the universe of possible flower matches and tc actions to be offloaded. I

[PATCH net-next v2 7/9] nfp: add metadata to each flow offload

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Adds metadata describing the mask id of each flow and keeps track of flows installed in hardware. Previously a flow could not be removed from hardware as there was no way of knowing if that a specific flow was installed. This is solved by storing the offloaded flows

[PATCH net-next v2 8/9] nfp: add a stats handler for flower offloads

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Previously there was no way of updating flow rule stats after they have been offloaded to hardware. This is solved by keeping track of stats received from hardware and providing this to the TC handler on request. Signed-off-by: Pieter Jansen van Vuuren Signed-off-

[PATCH net-next v2 6/9] nfp: add basic action capabilities to flower offloads

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Adds push vlan, pop vlan, output and drop action capabilities to flower offloads. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/Makefile| 1 + drivers/net/ethernet/netronome/nfp/flower/action

[PATCH net-next v2 4/9] nfp: extend flower add flow offload

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Extends the flower flow add function by calculating which match fields are present in the flower offload structure and allocating the appropriate space to describe these. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman --- drivers/net/etherne

[PATCH net-next v2 9/9] nfp: add control message passing capabilities to flower offloads

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Previously the flower offloads never sends messages to the hardware, and never registers a handler for receiving messages from hardware. This patch enables the flower offloads to send control messages to hardware when adding and removing flow rules. Additionally it

[PATCH net-next v2 5/9] nfp: extend flower matching capabilities

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Extends matching capabilities for flower offloads to include vlan, layer 2, layer 3 and layer 4 type matches. This includes both exact and wildcard matching. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Simon Horman --- drivers/net/ethernet/netronome/n

[PATCH net-next v2 2/9] nfp: add phys_switch_id support

2017-06-28 Thread Simon Horman
Add phys_switch_id support by allowing lookup of SWITCHDEV_ATTR_ID_PORT_PARENT_ID via the nfp_repr_port_attr_get switchdev operation. This is visible to user-space in the phys_switch_id attribute of a netdev. e.g. cd /sys/devices/pci:00/:00:01.0/:01:00.0 find . -name phys_switch_id |

[PATCH net-next v2 3/9] nfp: provide infrastructure for offloading flower based TC filters

2017-06-28 Thread Simon Horman
From: Pieter Jansen van Vuuren Adds a flower based TC offload handler for representor devices, this is in addition to the bpf based offload handler. The changes in this patch will be used in a follow-up patch to add tc flower offload to the NFP. The flower app enables tc offloads on representors

[PATCH net-next v2 1/9] net: switchdev: add SET_SWITCHDEV_OPS helper

2017-06-28 Thread Simon Horman
Add a helper to allow switchdev ops to be set if NET_SWITCHDEV is configured and do nothing otherwise. This allows for slightly cleaner code which uses switchdev but does not select NET_SWITCHDEV. Signed-off-by: Simon Horman --- include/net/switchdev.h | 4 1 file changed, 4 insertions(+)

Re: [PATCH NET V5 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-28 Thread Andrew Lunn
> >>From your description, it sounds like you can call phy_resume() on a > > device which is not suspended. > Do you mean after calling dev_close, the device is still not suspended? You only call dev_close() if the device is running. What if somebody runs the self test on an interface when it has

[PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW

2017-06-28 Thread Arnd Bergmann
With the introduction of mlx5 firmware flash support, we get a link error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y: drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function `mlx5_firmware_flash': fw.c:(.text+0x9d4): undefined reference to `mlxfw_firmware_flash' We could have a more elaborate m

Re: [PATCH net-next v4 01/16] bpf: BPF support for sock_ops

2017-06-28 Thread Alexei Starovoitov
On 6/28/17 10:31 AM, Lawrence Brakmo wrote: +#ifdef CONFIG_BPF +static inline int tcp_call_bpf(struct sock *sk, bool is_req_sock, int op) +{ + struct bpf_sock_ops_kern sock_ops; + int ret; + + if (!is_req_sock) + sock_owned_by_me(sk); + + memset(&sock_ops, 0,

Re: [PATCH v3 net-next 02/12] bpf/verifier: rework value tracking

2017-06-28 Thread Daniel Borkmann
On 06/28/2017 06:07 PM, Edward Cree wrote: On 28/06/17 16:15, Daniel Borkmann wrote: On 06/27/2017 02:56 PM, Edward Cree wrote: Tracks value alignment by means of tracking known & unknown bits. Tightens some min/max value checks and fixes a couple of bugs therein. You mean the one in relation

Re: [PATCH iproute2 3/5] rdma: Add device capability parsing

2017-06-28 Thread Leon Romanovsky
On Wed, Jun 28, 2017 at 10:11:12AM -0600, Jason Gunthorpe wrote: > On Tue, Jun 27, 2017 at 03:18:59PM -0700, Stephen Hemminger wrote: > > On Tue, 27 Jun 2017 20:46:15 +0300 > > Leon Romanovsky wrote: > > > > > On Tue, Jun 27, 2017 at 11:37:35AM -0600, Jason Gunthorpe wrote: > > > > On Tue, Jun 27,

Re: mwifiex: fix spelling mistake: "secuirty" -> "security"

2017-06-28 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in mwifiex_dbg message > > Signed-off-by: Colin Ian King Patch applied to wireless-drivers-next.git, thanks. 3334c28ec56c mwifiex: fix spelling mistake: "secuirty" -> "security" -- https://patchwork.kernel.or

[PATCH net-next v1 13/14] amd-xgbe: Simplify the burst length settings

2017-06-28 Thread Tom Lendacky
Currently the driver hardcodes the PBLx8 setting. Remove the need for specifying the PBLx8 setting and automatically calculate based on the specified PBL value. Since the PBLx8 setting applies to both Tx and Rx use the same PBL value for both of them. Also, the driver currently uses a bit field t

[PATCH net-next v1 14/14] amd-xgbe: Adjust register settings to improve performance

2017-06-28 Thread Tom Lendacky
Add support to change some general performance settings and to provide some performance settings based on the device that is probed. This includes: - Setting the maximum read/write outstanding request limit - Reducing the AXI interface burst length size - Selectively setting the Tx and Rx descrip

[PATCH net-next v1 11/14] amd-xgbe: Add NUMA affinity support for IRQ hints

2017-06-28 Thread Tom Lendacky
For IRQ affinity, set the affinity hints for the IRQs to be (initially) on the processors corresponding to the NUMA node of the device. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 18 +++--- drivers/net/ethernet/amd/xgbe/xgbe.h |2 ++ 2 files

[PATCH net-next v1 12/14] amd-xgbe: Prepare for more fine grained cache coherency controls

2017-06-28 Thread Tom Lendacky
In prep for setting fine grained read and write DMA cache coherency controls, allow specific values to be used to set the cache coherency registers. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 28 - drivers/net/ethernet/amd/xgbe/xgbe-

[PATCH net-next v1 10/14] amd-xgbe: Add NUMA affinity support for memory allocations

2017-06-28 Thread Tom Lendacky
Add support to perform memory allocations on the node of the device. The original allocation or the ring structure and Tx/Rx queues allocated all of the memory at once and then carved it up for each channel and queue. To best ensure that we get as much memory from the NUMA node as we can, break the

[PATCH net-next v1 09/14] amd-xgbe: Re-issue interrupt if interrupt status not cleared

2017-06-28 Thread Tom Lendacky
Some of the device interrupts should function as level interrupts. For some hardware configurations this requires setting some control bits so that if the interrupt status has not been cleared the interrupt should be reissued. Additionally, when using MSI or MSI-X interrupts, run the interrupt ser

[PATCH net-next v1 04/14] amd-xgbe: Add a check for an skb in the timestamp path

2017-06-28 Thread Tom Lendacky
Spurious Tx timestamp interrupts can cause an oops in the Tx timestamp processing function if a Tx timestamp skb is NULL. Add a check to insure a Tx timestamp skb is present before attempting to use it. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c |7 ++- 1 fi

[PATCH net-next v1 08/14] amd-xgbe: Limit the I2C error messages that are output

2017-06-28 Thread Tom Lendacky
When I2C communication fails, it tends to always fail. Rather than continuously issue an error message (once per second in most cases), change the message to be issued just once. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |9 ++--- 1 file changed, 6 inser

[PATCH net-next v1 07/14] amd-xgbe: Fixes for working with PHYs that support 2.5GbE

2017-06-28 Thread Tom Lendacky
The driver has some missing functionality when operating in the mode that supports 2.5GbE. Fix the driver to fully recognize and support this speed. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/

[PATCH net-next v1 06/14] amd-xgbe: Handle return code from software reset function

2017-06-28 Thread Tom Lendacky
Currently the function that performs a software reset of the hardware provides a return code. During driver probe check this return code and exit with an error if the software reset fails. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-main.c |6 +- 1 file changed, 5

[PATCH net-next v1 05/14] amd-xgbe: Prevent looping forever if timestamp update fails

2017-06-28 Thread Tom Lendacky
Just to be on the safe side, should the update of the timestamp registers not complete, issue a warning rather than looping forever waiting for the update to complete. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 15 +-- 1 file changed, 13 insertions(+

[PATCH net-next v1 01/14] amd-xgbe: Simplify mailbox interface rate change code

2017-06-28 Thread Tom Lendacky
Simplify and centralize the mailbox command rate change interface by having a single function perform the writes to the mailbox registers to issue the request. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 155 +-- 1 file changed, 29 inser

[PATCH net-next v1 02/14] amd-xgbe: Fix SFP PHY supported/advertised settings

2017-06-28 Thread Tom Lendacky
When using SFPs, the supported and advertised settings should be initially based on the SFP that has been detected. The code currently indicates the overall support of the device as opposed to what the SFP is capable of. Update the code to change the supported link modes, auto-negotiation, etc. to

[PATCH net-next v1 03/14] amd-xgbe: Use the proper register during PTP initialization

2017-06-28 Thread Tom Lendacky
During PTP initialization, the Timestamp Control register should be cleared and not the Tx Configuration register. While this typo causes the wrong register to be cleared, the default value of each register and and the fact that the Tx Configuration register is programmed afterwards doesn't result

[PATCH net-next v1 00/14] amd-xgbe: AMD XGBE driver updates 2016-06-28

2017-06-28 Thread Tom Lendacky
The following updates and fixes are included in this driver update series: - Simplify mailbox interface code - Fix SFP supported and advertising settings - Fix PTP initialization register usage - Insure there is timestamp skb present before using it - Add a timeout to timestamp register updates -

Re: [PATCH v3 net-next 02/12] bpf/verifier: rework value tracking

2017-06-28 Thread Edward Cree
On 28/06/17 18:09, Daniel Borkmann wrote: > Could you elaborate on this one? If I understand it correctly, then > the scalar += pointer case would mean the following: given I have one > of the allowed pointer types in adjust_ptr_min_max_vals() then the > prior scalar type inherits the ptr type/id.

Re: wl18xx: add checks on wl18xx_top_reg_write() return value

2017-06-28 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > Check return value from call to wl18xx_top_reg_write(), > so in case of error jump to goto label out and return. > > Also, remove unnecessary value check before goto label out. > > Addresses-Coverity-ID: 1226938 > Signed-off-by: Gustavo A. R. Silva Patch applied

Re: cw1200: add const to hwbus_ops structures

2017-06-28 Thread Kalle Valo
Bhumika Goyal wrote: > Declare hwbus_ops structures as const as they are only passed as an > argument to the function cw1200_core_probe. This argument is of type > const. So, make these structures const. > > Signed-off-by: Bhumika Goyal Patch applied to wireless-drivers-next.git, thanks. 3ac2

Re: [PATCH] net: ipmr: Add ipmr_rtm_getroute

2017-06-28 Thread Nikolay Aleksandrov
On 28/06/17 20:58, Donald Sharp wrote: > Add to RTNL_FAMILY_IPMR, RTM_GETROUTE the ability > to retrieve one S,G mroute from a specified table. > > *,G will return mroute information for just that > particular mroute if it exists. This is because > it is entirely possible to have more S's then >

[PATCH] net: ipmr: Add ipmr_rtm_getroute

2017-06-28 Thread Donald Sharp
Add to RTNL_FAMILY_IPMR, RTM_GETROUTE the ability to retrieve one S,G mroute from a specified table. *,G will return mroute information for just that particular mroute if it exists. This is because it is entirely possible to have more S's then can fit in one skb to return to the requesting proces

Re: rsi: add in missing RSI_FSM_STATES into array fsm_state

2017-06-28 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED > and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state > was not updated to match. This can lead to an array overrun when > accessing the latter two states in

Re: [net-next] qtnfmac: fix uninitialized return code in ret

2017-06-28 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > The return value ret is unitialized and garbage is being returned > for the three different error conditions when setting up the PCIe > BARs. Fix this by initializing ret to -ENOMEM to indicate that > the BARs failed to be setup correctly. > >

Re: [PATCH net-next v3 01/15] bpf: BPF support for sock_ops

2017-06-28 Thread Lawrence Brakmo
On 6/23/17, 2:15 PM, "Daniel Borkmann" wrote: On 06/23/2017 01:57 AM, Lawrence Brakmo wrote: > On 6/22/17, 4:19 PM, "netdev-ow...@vger.kernel.org on behalf of Daniel Borkmann" wrote: > > On 06/23/2017 12:58 AM, Lawrence Brakmo wrote: > [...] > > Daniel, I

[PATCH net-next] bpf: Fix out-of-bound access on interpreters[]

2017-06-28 Thread Martin KaFai Lau
The index is off-by-one when fp->aux->stack_depth has already been rounded up to 32. In particular, if stack_depth is 512, the index will be 16. The fix is to round_up and then takes -1 instead of round_down. [ 22.318680] == [

[PATCH net-next v4 16/16] bpf: update tools/include/uapi/linux/bpf.h

2017-06-28 Thread Lawrence Brakmo
Update tools/include/uapi/linux/bpf.h to include changes related to new bpf sock_ops program type. Signed-off-by: Lawrence Brakmo --- tools/include/uapi/linux/bpf.h | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/l

[PATCH net-next v4 13/16] bpf: Sample BPF program to set initial cwnd

2017-06-28 Thread Lawrence Brakmo
Sample BPF program that assumes hosts are far away (i.e. large RTTs) and sets initial cwnd and initial receive window to 40 packets, send and receive buffers to 1.5MB. In practice there would be a test to insure the hosts are actually far enough away. Signed-off-by: Lawrence Brakmo --- samples/

[PATCH net-next v4 15/16] bpf: Sample bpf program to set sndcwnd clamp

2017-06-28 Thread Lawrence Brakmo
Sample BPF program, tcp_clamp_kern.c, to demostrate the use of setting the sndcwnd clamp. This program assumes that if the first 5.5 bytes of the host's IPv6 addresses are the same, then the hosts are in the same datacenter and sets sndcwnd clamp to 100 packets, SYN and SYN-ACK RTOs to 10ms and sen

[PATCH net-next v4 12/16] bpf: Adds support for setting initial cwnd

2017-06-28 Thread Lawrence Brakmo
Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_IW, which sets the initial congestion window. This can be used when the hosts are far apart (large RTTs) and it is safe to start with a large inital cwnd. Signed-off-by: Lawrence Brakmo --- include/uapi/linux/bpf.h | 2 ++ net/core/filter.c

[PATCH net-next v4 14/16] bpf: Adds support for setting sndcwnd clamp

2017-06-28 Thread Lawrence Brakmo
Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_SNDCWND_CLAMP, which sets the initial congestion window. It is useful to limit the sndcwnd when the host are close to each other (small RTT). Signed-off-by: Lawrence Brakmo --- include/uapi/linux/bpf.h | 1 + net/core/filter.c| 7 +++

[PATCH net-next v4 08/16] bpf: Add TCP connection BPF callbacks

2017-06-28 Thread Lawrence Brakmo
Added callbacks to BPF SOCK_OPS type program before an active connection is intialized and after a passive or active connection is established. The following patch demostrates how they can be used to set send and receive buffer sizes. Signed-off-by: Lawrence Brakmo --- include/uapi/linux/bpf.h

[PATCH net-next v4 07/16] bpf: Add setsockopt helper function to bpf

2017-06-28 Thread Lawrence Brakmo
Added support for calling a subset of socket setsockopts from BPF_PROG_TYPE_SOCK_OPS programs. The code was duplicated rather than making the changes to call the socket setsockopt function because the changes required would have been larger. The ops supported are: SO_RCVBUF SO_SNDBUF SO_MAX_

[PATCH net-next v4 09/16] bpf: Sample BPF program to set buffer sizes

2017-06-28 Thread Lawrence Brakmo
This patch contains a BPF program to set initial receive window to 40 packets and send and receive buffers to 1.5MB. This would usually be done after doing appropriate checks that indicate the hosts are far enough away (i.e. large RTT). Signed-off-by: Lawrence Brakmo --- samples/bpf/Makefile

[PATCH net-next v4 02/16] bpf: program to load and attach sock_ops BPF progs

2017-06-28 Thread Lawrence Brakmo
The program load_sock_ops can be used to load sock_ops bpf programs and to attach it to an existing (v2) cgroup. It can also be used to detach sock_ops programs. Examples: load_sock_ops [-l] Load and attaches a sock_ops program at the specified cgroup. If "-l" is used, the pr

[PATCH net-next v4 05/16] bpf: Support for setting initial receive window

2017-06-28 Thread Lawrence Brakmo
This patch adds suppport for setting the initial advertized window from within a BPF_SOCK_OPS program. This can be used to support larger initial cwnd values in environments where it is known to be safe. Signed-off-by: Lawrence Brakmo --- include/net/tcp.h| 10 ++ include/uapi/li

[PATCH net-next v4 04/16] bpf: Sample bpf program to set SYN/SYN-ACK RTOs

2017-06-28 Thread Lawrence Brakmo
The sample BPF program, tcp_synrto_kern.c, sets the SYN and SYN-ACK RTOs to 10ms when both hosts are within the same datacenter (i.e. small RTTs) in an environment where common IPv6 prefixes indicate both hosts are in the same data center. Signed-off-by: Lawrence Brakmo --- samples/bpf/Makefile

[PATCH net-next v4 10/16] bpf: Add support for changing congestion control

2017-06-28 Thread Lawrence Brakmo
Added support for changing congestion control for SOCK_OPS bpf programs through the setsockopt bpf helper function. It also adds a new SOCK_OPS op, BPF_SOCK_OPS_NEEDS_ECN, that is needed for congestion controls, like dctcp, that need to enable ECN in the SYN packets. Signed-off-by: Lawrence Brakmo

[PATCH net-next v4 11/16] bpf: Sample BPF program to set congestion control

2017-06-28 Thread Lawrence Brakmo
Sample BPF program that sets congestion control to dctcp when both hosts are within the same datacenter. In this example that is assumed to be when they have the first 5.5 bytes of their IPv6 address are the same. Signed-off-by: Lawrence Brakmo --- samples/bpf/Makefile| 1 + samples/bpf

[PATCH net-next v4 03/16] bpf: Support for per connection SYN/SYN-ACK RTOs

2017-06-28 Thread Lawrence Brakmo
This patch adds support for setting a per connection SYN and SYN_ACK RTOs from within a BPF_SOCK_OPS program. For example, to set small RTOs when it is known both hosts are within a datacenter. Signed-off-by: Lawrence Brakmo --- include/net/tcp.h| 11 +++ include/uapi/linux/bpf.h

[PATCH net-next v4 01/16] bpf: BPF support for sock_ops

2017-06-28 Thread Lawrence Brakmo
Created a new BPF program type, BPF_PROG_TYPE_SOCK_OPS, and a corresponding struct that allows BPF programs of this type to access some of the socket's fields (such as IP addresses, ports, etc.). It uses the existing bpf cgroups infrastructure so the programs can be attached per cgroup with full in

[PATCH net-next v4 06/16] bpf: Sample bpf program to set initial window

2017-06-28 Thread Lawrence Brakmo
The sample bpf program, tcp_rwnd_kern.c, sets the initial advertized window to 40 packets in an environment where distinct IPv6 prefixes indicate that both hosts are not in the same data center. Signed-off-by: Lawrence Brakmo --- samples/bpf/Makefile| 1 + samples/bpf/tcp_rwnd_kern.c |

[PATCH net-next v4 00/16] bpf: BPF cgroup support for sock_ops

2017-06-28 Thread Lawrence Brakmo
Created a new BPF program type, BPF_PROG_TYPE_SOCK_OPS, and a corresponding struct that allows BPF programs of this type to access some of the socket's fields (such as IP addresses, ports, etc.) and setting connection parameters such as buffer sizes, initial window, SYN/SYN-ACK RTOs, etc. Unlike c

Re: [PATCH net-next 2/2] vxlan: add back error messages to vxlan_config_validate() as extended netlink acks

2017-06-28 Thread Jiri Benc
On Tue, 27 Jun 2017 22:47:58 +0200, Matthias Schiffer wrote: > if ((conf->flags & ~VXLAN_F_ALLOWED_GPE) || > !(conf->flags & VXLAN_F_COLLECT_METADATA)) { > + NL_SET_ERR_MSG(extack, > +"unsupported combination of

Re: [PATCH net-next 1/2] vxlan: change vxlan_validate() to use netlink_ext_ack for error reporting

2017-06-28 Thread Jiri Benc
On Tue, 27 Jun 2017 22:47:57 +0200, Matthias Schiffer wrote: > if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) { > - pr_debug("invalid all zero ethernet address\n"); > + NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_ADDRESS], > +

Re: [PATCH v3 net-next 02/12] bpf/verifier: rework value tracking

2017-06-28 Thread Daniel Borkmann
On 06/27/2017 02:56 PM, Edward Cree wrote: Tracks value alignment by means of tracking known & unknown bits. Tightens some min/max value checks and fixes a couple of bugs therein. If pointer leaks are allowed, and adjust_ptr_min_max_vals returns -EACCES, treat the pointer as an unknown scalar a

[PATCH iproute2 1/1] tc: updated ife man page.

2017-06-28 Thread Roman Mashak
Explain when skbmark encoding may fail. Signed-off-by: Roman Mashak --- man/man8/tc-ife.8 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-ife.8 b/man/man8/tc-ife.8 index a8f1f28..1499a3f 100644 --- a/man/man8/tc-ife.8 +++ b/man/man8/tc-ife.8 @@ -59,7 +59,10 @@

Re: ath9k: remove useless variable assignment in ath_mci_intr()

2017-06-28 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > Value assigned to variable offset at line 551 is overwritten at line 562, > before it can be used. This makes such variable assignment useless. > > Addresses-Coverity-ID: 1226941 > Signed-off-by: Gustavo A. R. Silva > Signed-off-by: Kalle Valo Patch applied to a

  1   2   >