[PATCH net-next 4/6] net: qualcomm: rmnet: Refactor the new rmnet dev creation

2017-09-02 Thread Subash Abhinov Kasiviswanathan
Data format can be directly set from rmnet_newlink() since the rmnet real dev info is already available. Since __rmnet_get_real_dev_info() is no longer used in rmnet_config.c after removal of those functions, move content to rmnet_get_real_dev_info(). __rmnet_set_endpoint_config() is collapsed

[PATCH net-next 3/6] net: qualcomm: rmnet: Move the device creation log

2017-09-02 Thread Subash Abhinov Kasiviswanathan
The current log is not very useful as it does not log the device name since it it is prior to registration - (unnamed net_device) (uninitialized): Setting up device Modify to log after the device registration - rmnet1: rmnet dev created Signed-off-by: Subash Abhinov Kasiviswanathan

[PATCH net-next 6/6] net: qualcomm: rmnet: Rename real_dev_info to port

2017-09-02 Thread Subash Abhinov Kasiviswanathan
Make it similar to drivers like ipvlan / macvlan so it is easier to read. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 65 +++---

[PATCH net-next 5/6] net: qualcomm: rmnet: Implement ndo_get_iflink

2017-09-02 Thread Subash Abhinov Kasiviswanathan
This makes it easier to find out the parent dev. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 +

[PATCH net-next 1/6] net: qualcomm: rmnet: Fix memory corruption if mux_id is greater than 32

2017-09-02 Thread Subash Abhinov Kasiviswanathan
rmnet_rtnl_validate() was checking for upto mux_id 254, however the rmnet_devices devices could hold upto 32 entries only. Fix this by increasing the size of the rmnet_devices. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov

[PATCH net-next 0/6] net: qualcomm: rmnet: Fix comments on initial patchset

2017-09-02 Thread Subash Abhinov Kasiviswanathan
This series fixes the comments from Dan on the first patch series. Fixes a memory corruption which could occur if mux_id was higher than 32. Remove the RMNET_LOCAL_LOGICAL_ENDPOINT which is no longer used. Make a log message more useful. Combine __rmnet_set_endpoint_config() with

[PATCH net-next 2/6] net: qualcomm: rmnet: Remove the unused endpoint -1

2017-09-02 Thread Subash Abhinov Kasiviswanathan
This was used only in the original patch series where the IOCTLs were present and is no longer in use. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams

[net-next 06/17] net/mlx5e: NAPI busy-poll when UMR post is in progress

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan If a UMR post is in progress, it means that there's a missing WQE in RQ, and that a completion will be shortly available in ICO SQ completion queue. Prefer busy-poll to handle it as soon as possible. Signed-off-by: Tariq Toukan

[net-next 07/17] net/mlx5e: Early-return on empty completion queues

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan NAPI context handles different kinds of completion queues (RX, TX, and others). Hence, upon a poll trial, some of them might be empty. Here we early-return upon empty completion queues, as well as full rx buffer, and save unnecessary logic and memory

[net-next 12/17] net/mlx5e: Remove unnecessary fields in ICO SQ

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan As of current design, in each NAPI, only a single UMR WQE completion could be available in the completion queue of the the internal control operations (ICO) send queue, in addition to nop operations that require no actions upon completion. This renders the

[net-next 02/17] net/mlx5e: Replace multiplication by stride size with a shift

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan In RX data-path, use shift operations instead of a regular multiplication by stride size, as it is a power of two. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed ---

[net-next 11/17] net/mlx5e: Type-specific optimizations for RX post WQEs function

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Separate the RX post WQEs function of the different RQ types. This enables RQ type-specific optimizations in data-path. Poll the ICOSQ completion queue only for Striding RQ, and only when a UMR post completion could be possibly available. Signed-off-by:

[net-next 08/17] net/mlx5e: Refactor data-path lro header function

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Refactor function mlx5e_lro_update_hdr() to reduce number of branches. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 45

[net-next 05/17] net/mlx5e: Small enhancements for RX MPWQE allocation and free

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan The dma offset of a MPWQE (Multi-Packet WQE) in memory region is fixed for all rounds. Calculate it once on creation time, instead of in runtime. This also obsoletes the wqe argument in the function. In addition, optimize dma_info iterator calculation.

[net-next 04/17] net/mlx5e: Use memset to init skbs_frags array to zeros

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan In RX data-path, use memset() instead of loop assignment to init the whole skbs_frags array. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-

[pull request][net-next 00/17] Mellanox, mlx5 updates 2017-09-03

2017-09-02 Thread Saeed Mahameed
Hi Dave, This series from Tariq includes micro data path optimization for mlx5e netdevice driver. Sorry about the late submission but most of the patches are really small and trivial. For more details please see tag log message below. Please pull and let me know if there's any problem. Thanks,

[net-next 10/17] net/mlx5e: Non-atomic RQ state indicator for UMR WQE in progress

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan The indication for a UMR WQE in progress is needed only within the NAPI context, and hence no races possible and no need for the use of atomic operations. The only place the flag is read outside of NAPI context is in closure flow, after RQ is disabled flag

[net-next 14/17] net/mlx5e: Slightly increase RX page-cache size

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan In XDP_TX flow, we now get back quicker to each page in page-cache, and on some occasions refcount does not get back to 1 on time, causing some costly page allocations. Slightly increase the size of RX page-cache to significantly decrease the chances for

[net-next 15/17] net/mlx5e: Use kernel's mechanism to avoid missing NAPIs

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan We used a channel state bit MLX5E_CHANNEL_NAPI_SCHED to make sure no NAPI is missed when a channel's napi_schedule() is called for completion events of the different channel's resources/rings while NAPI is currently running. Now, as similar mechanism is

[net-next 16/17] net/mlx5e: Stop NAPI when irq balancer changes affinity

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan NAPI context keeps rescheduling on same CPU as long as it's busy. This doesn't give the oppurtunity for changes in irq affinities to take effect. Fix that by calling napi_complete_done() upon a change in affinity. This would stop the NAPI and reschedule it

[net-next 01/17] net/mlx5e: Reorganize struct mlx5e_rq

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Bring fast-path fields together, and combine RX WQE mutual exclusive fields into a union. Page-reuse and XDP are mutually exclusive and cannot be used at the same time. Use a union to combine their footprints. Signed-off-by: Tariq Toukan

[net-next 17/17] net/mlx5e: Distribute RSS table among all RX rings

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan In default, uniformly distribute the RSS indirection table entries among all RX rings, rather than restricting this only to the rings on the close NUMA node. irqbalancer would anyway dynamically override the default affinities set to the RX rings. This

[net-next 09/17] net/mlx5e: Non-atomic indicator for ring enabled state

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Rings enabled state change occurs in control path only, and is always followed by a napi_sychronize(), so that following NAPIs read the new value. This read does not need to be atomic. The RQ auto-moderation bit is not set/cleared in data-path. No need

[net-next 13/17] net/mlx5e: Don't recycle page if moved to far NUMA

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Avoid recycling an RX page if it moved to another NUMA node. Add an ethtool counter to count such events. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed ---

[net-next 03/17] net/mlx5e: Remove unnecessary wqe_sz field from RQ buffer

2017-09-02 Thread Saeed Mahameed
From: Tariq Toukan Field is used only locally within the RQ create function. The use of a local variable is sufficient. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-02 Thread Saeed Mahameed
On Sat, Sep 2, 2017 at 6:37 PM, Tom Herbert wrote: > On Sat, Sep 2, 2017 at 6:32 PM, Hannes Frederic Sowa > wrote: >> Hi Saeed, >> >> On Sun, Sep 3, 2017, at 01:01, Saeed Mahameed wrote: >>> On Thu, Aug 31, 2017 at 6:51 AM, Hannes Frederic Sowa

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-02 Thread Saeed Mahameed
On Sat, Sep 2, 2017 at 6:32 PM, Hannes Frederic Sowa wrote: > Hi Saeed, > > On Sun, Sep 3, 2017, at 01:01, Saeed Mahameed wrote: >> On Thu, Aug 31, 2017 at 6:51 AM, Hannes Frederic Sowa >> wrote: >> > Saeed Mahameed

Re: [PATCH net-next 2/2] net: convert (struct ubuf_info)->refcnt to refcount_t

2017-09-02 Thread Willem de Bruijn
On Sat, Sep 2, 2017 at 5:58 PM, kbuild test robot wrote: > Hi Eric, > > [auto build test WARNING on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-ubuf_info-refcnt-conversion/20170903-043506 > config: i386-randconfig-i1-201736 (attached

[net-next:master 428/478] drivers/net//ethernet/ti/netcp_core.c:1349:21: error: 'DMA_MEM_TO_DEV' undeclared

2017-09-02 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 32d9b70a053a835b4dfb33158fc03795ea103e44 commit: 0dd5759dbb1c9a862e7d90c09d6cf398c45f1100 [428/478] net: remove dmaengine.h inclusion from netdevice.h config: arm-allmodconfig (attached as .config)

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-02 Thread Tom Herbert
On Sat, Sep 2, 2017 at 6:32 PM, Hannes Frederic Sowa wrote: > Hi Saeed, > > On Sun, Sep 3, 2017, at 01:01, Saeed Mahameed wrote: >> On Thu, Aug 31, 2017 at 6:51 AM, Hannes Frederic Sowa >> wrote: >> > Saeed Mahameed

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-02 Thread Hannes Frederic Sowa
Hi Saeed, On Sun, Sep 3, 2017, at 01:01, Saeed Mahameed wrote: > On Thu, Aug 31, 2017 at 6:51 AM, Hannes Frederic Sowa > wrote: > > Saeed Mahameed writes: > > > >> The first patch from Gal and Ariel provides the mlx5 driver support for > >>

[PATCH net-next 2/6] nfp: flower: base lifetime of representors on existence of lower vNIC

2017-09-02 Thread Jakub Kicinski
Create representors after lower vNIC is registered and destroy them before it is destroyed. Move the code out of start/stop callbacks directly into vnic_init/clean callbacks. Make sure SR-IOV callbacks don't try to create representors when lower device does not exist. Signed-off-by: Jakub

[PATCH net-next 4/6] nfp: be drop monitor friendly

2017-09-02 Thread Jakub Kicinski
Use dev_consume_skb_any() in place of dev_kfree_skb_any() when control frame has been successfully processed in flower and on the driver's main TX completion path. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman ---

[PATCH net-next 6/6] nfp: flower: restore RTNL locking around representor updates

2017-09-02 Thread Jakub Kicinski
When we moved to updating representors from a workqueue grabbing the RTNL somehow got lost in the process. Restore it, and make sure RCU lock is not held while we are grabbing the RTNL. RCU protects the representor table, so since we will be under RTNL we can drop RCU lock as soon as we find the

[PATCH net-next 5/6] nfp: build the flower offload by default

2017-09-02 Thread Jakub Kicinski
It's reasonable to assume that if user selects to build the NFP driver all offload capabilities will be enabled by default. Change the CONFIG_NFP_APP_FLOWER to default to enabled. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman

[PATCH net-next 0/6] nfp: refactor app init, and minor flower fixes

2017-09-02 Thread Jakub Kicinski
Hi! This series is a part 2 to what went into net as a simpler fix. In net we simply moved when existing callbacks are invoked to ensure flower app does not still use representors when lower netdev has already been destroyed. In this series we add a callback to notify apps when vNIC netdevs are

[PATCH net-next 1/6] nfp: separate app vNIC init/clean from alloc/free

2017-09-02 Thread Jakub Kicinski
We currently only have one app callback for vNIC creation and destruction. This is insufficient, because some actions have to be taken before netdev is registered, after it's registered and after it's unregistered. Old callbacks were really corresponding to alloc/free actions. Rename them and

[PATCH net-next 3/6] nfp: move the start/stop app callbacks back

2017-09-02 Thread Jakub Kicinski
Since representors are now created with a separate callback start/stop app callbacks can be moved again to their original location. They are intended to app-specific init/clean up over the control channel. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman

[net-next:master 428/478] include/linux/soc/ti/knav_dma.h:129:30: error: field 'direction' has incomplete type

2017-09-02 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 32d9b70a053a835b4dfb33158fc03795ea103e44 commit: 0dd5759dbb1c9a862e7d90c09d6cf398c45f1100 [428/478] net: remove dmaengine.h inclusion from netdevice.h config: arm-keystone_defconfig (attached as .config)

Re: [PATCH] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG

2017-09-02 Thread kbuild test robot
Hi Andreas, [auto build test ERROR on staging/staging-testing] [cannot apply to v4.13-rc7 next-20170901] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[no subject]

2017-09-02 Thread netgalley
16.doc Description: MS-Word document

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-02 Thread Saeed Mahameed
On Thu, Aug 31, 2017 at 6:51 AM, Hannes Frederic Sowa wrote: > Saeed Mahameed writes: > >> The first patch from Gal and Ariel provides the mlx5 driver support for >> ConnectX capability to perform IP version identification and matching in >> order

Re: [PATCH net-next 2/2] net: convert (struct ubuf_info)->refcnt to refcount_t

2017-09-02 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-ubuf_info-refcnt-conversion/20170903-043506 config: i386-randconfig-i1-201736 (attached as .config) compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce: # save the

Re: [PATCH net-next 2/2] net: convert (struct ubuf_info)->refcnt to refcount_t

2017-09-02 Thread kbuild test robot
Hi Eric, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-ubuf_info-refcnt-conversion/20170903-043506 config: x86_64-acpi-redef (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the

[patch net-next v2 02/21] mlxsw: reg: Update RATR to support IP-in-IP tunnels

2017-09-02 Thread Jiri Pirko
From: Petr Machata So far, adjacencies have always been of type Ethernet (with value of 0), and thus there was no need to explicitly support RATR type. However to support IP-in-IP adjacencies, this type and a suite of IP-in-IP-specific attributes need to be added.

[patch net-next v2 05/21] mlxsw: reg: Add Routing Tunnel Decap Properties Register

2017-09-02 Thread Jiri Pirko
From: Petr Machata The RTDP register is used for configuring the tunnel decap properties of NVE and IPinIP. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next v2 03/21] mlxsw: reg: Move enum mlxsw_reg_ratr_trap_id

2017-09-02 Thread Jiri Pirko
From: Petr Machata This enum is used with reg_ratr_trap_id, so move it next to the register definition. While at it, drop the enumerator initializers. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko

[patch net-next v2 06/21] mlxsw: reg: Extract mlxsw_reg_ritr_mac_pack()

2017-09-02 Thread Jiri Pirko
From: Petr Machata Unlike other interface types, loopback RIFs do not have MAC address. So drop the corresponding argument from mlxsw_reg_ritr_pack() and move it to a new function. Call that from callers of mlxsw_reg_ritr_pack. Signed-off-by: Petr Machata

[patch net-next v2 14/21] mlxsw: spectrum_router: Make nexthops typed

2017-09-02 Thread Jiri Pirko
From: Petr Machata In the router, some next hops may reference an encapsulating netdevice, such as GRE or IPIP. To properly offload these next hops, mlxsw needs to keep track of whether a given next hop is a regular Ethernet entry, or an IP-in-IP tunneling entry. To

[patch net-next v2 11/21] mlxsw: spectrum_router: Introduce loopback RIFs

2017-09-02 Thread Jiri Pirko
From: Petr Machata When offloading L3 tunnels, an adjacency entry is created that loops the packet back into the underlay router. Loopback interfaces then hold the corresponding information and are created for IP-in-IP netdevices. Signed-off-by: Petr Machata

[patch net-next v2 08/21] mlxsw: spectrum_router: Publish mlxsw_sp_l3proto

2017-09-02 Thread Jiri Pirko
From: Petr Machata The spectrum_ipip module that will be introduced in the follow-up patches needs to know the data type. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next v2 13/21] mlxsw: spectrum_router: Extract mlxsw_sp_rt6_is_gateway()

2017-09-02 Thread Jiri Pirko
From: Petr Machata IPv6 counterpart of the previous patch: introduce a function to determine whether a given route is a gateway route. The new function takes a mlxsw_sp argument which follow-up patches will use. Thus mlxsw_sp_fib6_entry_type_set() got that argument as well.

[patch net-next v2 16/21] mlxsw: spectrum_router: Support IPv6 overlay encap

2017-09-02 Thread Jiri Pirko
From: Petr Machata Add the missing bits to recognize IPv6 next hops as IPIP ones to enable offloading of IPv6 overlay encapsulation. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko

[patch net-next v2 12/21] mlxsw: spectrum_router: Extract mlxsw_sp_fi_is_gateway()

2017-09-02 Thread Jiri Pirko
From: Petr Machata For IPv4 IP-in-IP offload, routes that direct traffic to IP-in-IP devices need to be considered gateway routes as well. That involves a bit more logic, so extract the current test to a separate function, where the logic can be later added. Signed-off-by:

[patch net-next v2 09/21] mlxsw: spectrum_router: Add mlxsw_sp_ipip_ops

2017-09-02 Thread Jiri Pirko
From: Petr Machata Details of individual tunnel types are kept in an array of mlxsw_sp_ipip_ops objects. Follow-up patches will use the list to determine whether a constructed RIF should be a loopback, and to decide whether a next hop references a tunnel. The list is

[patch net-next v2 17/21] mlxsw: spectrum_router: Support IPv4 underlay decap

2017-09-02 Thread Jiri Pirko
From: Petr Machata Unlike encapsulation, which is represented by a next hop forwarding to an IPIP tunnel, decapsulation is a type of local route. It is created for local routes whose prefix corresponds to the local address of one of offloaded IPIP tunnels. When the tunnel is

[patch net-next v2 04/21] mlxsw: reg: Add mlxsw_reg_ralue_act_ip2me_tun_pack()

2017-09-02 Thread Jiri Pirko
From: Petr Machata To implement IP-in-IP decapsulation, Spectrum uses LPM entries of type IP2ME with tunnel validity bit and tunnel pointer set. The necessary register fields are already available, so add a function to pack the RALUE as appropriate. Signed-off-by: Petr

[patch net-next v2 19/21] mlxsw: spectrum: Register for IPIP_DECAP_ERROR trap

2017-09-02 Thread Jiri Pirko
From: Petr Machata These traps are generated for packets that fail checks for source IP, encapsulation type, or GRE key. Trap these packets to CPU for follow-up handling by the kernel, which will send ICMP destination unreachable responses. Signed-off-by: Petr Machata

[patch net-next v2 01/21] mlxsw: reg: Update RITR to support loopback device

2017-09-02 Thread Jiri Pirko
From: Petr Machata Update the register so that loopback RIFs can be created and loopback properties specified. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next v2 18/21] mlxsw: spectrum_router: Use existing decap route

2017-09-02 Thread Jiri Pirko
From: Petr Machata The local route that points at IPIP's underlay device (decap route) can be present long before the GRE device. Thus when an encap route is added, it's necessary to look inside the underlay FIB if the decap route is already present. If so, the current trap

[patch net-next v2 00/21] mlxsw: Offloading GRE tunnels

2017-09-02 Thread Jiri Pirko
From: Jiri Pirko Petr says: This patch series introduces to mlxsw driver support for offloading IP-in-IP tunnels in general, and for (subset of) GRE in particular. This patchset supports two ways of configuring GRE: - So called "hierarchical configuration", where the GRE

[patch net-next v2 15/21] mlxsw: spectrum_router: Support IPv4 overlay encap

2017-09-02 Thread Jiri Pirko
From: Petr Machata This introduces some common code for tracking of offloaded IP-in-IP tunnels, and support for offloading IPv4 overlay encapsulating routes in particular. A follow-up patch will introduce IPv6 overlay as well. Offloaded tunnels are kept in a linked list of

[patch net-next v2 07/21] mlxsw: reg: Give mlxsw_reg_ratr_pack a type parameter

2017-09-02 Thread Jiri Pirko
From: Petr Machata To support IPIP, the driver needs to be able to construct an IPIP adjacency. Change mlxsw_reg_ratr_pack to take an adjacency type as an argument. Adjust the one existing caller. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel

[patch net-next v2 10/21] mlxsw: spectrum_router: Support FID-less RIFs

2017-09-02 Thread Jiri Pirko
From: Petr Machata Loopback RIFs, which will be introduced in a follow-up patch, differ from other RIFs in that they do not have a FID associated with them. To support this, demote FID allocation from mlxsw_sp_rif_create to configure op of the existing RIF types, and

[patch net-next v2 20/21] mlxsw: spectrum_router: Add loopback accessors

2017-09-02 Thread Jiri Pirko
From: Petr Machata struct mlxsw_sp_rif is a router-private structure, and therefore everything related to it is as well: parameters, and derived RIF types including loopbacks. IPIP module needs access to some details of loopback interfaces, but exporting all the RIF shebang

[patch net-next v2 21/21] mlxsw: spectrum_router: Support GRE tunnels

2017-09-02 Thread Jiri Pirko
From: Petr Machata This patch introduces callbacks and tunnel type to offload GRE tunnels. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

Re: [RFC PATCH v1 0/5] TCP Wave

2017-09-02 Thread Natale Patriciello
Hello all, first of all, we would like to thank everyone that commented our patches; we are working to include all the suggestions (we are at a good point). However, we have two questions: 1) How to retrieve information about each connection? Right now we used debug messages, but we understand

[PATCH net-next v2 2/4] net: dsa: tag_brcm: Set output queue from skb queue mapping

2017-09-02 Thread Florian Fainelli
We originally used skb->priority but that was not quite correct as this bitfield needs to contain the egress switch queue we intend to send this SKB to. Signed-off-by: Florian Fainelli --- net/dsa/tag_brcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH net-next v2 3/4] net: dsa: bcm_sf2: Advertise number of egress queues

2017-09-02 Thread Florian Fainelli
The switch supports 8 egress queues per port, so indicate that such that net/dsa/slave.c::dsa_slave_create can allocate the right number of TX queues. While at it use SF2_NUM_EGRESS_QUEUE as a define for the number of queues we support. Signed-off-by: Florian Fainelli ---

[PATCH net-next v2 4/4] net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping

2017-09-02 Thread Florian Fainelli
Even though TC2QOS mapping is for switch egress queues, we need to configure it correclty in order for the Broadcom tag ingress (CPU -> switch) queue selection to work correctly since there is a 1:1 mapping between switch egress queues and ingress queues. Signed-off-by: Florian Fainelli

[PATCH net-next v2 0/4] net: dsa: Allow switch drivers to indicate number of TX queues

2017-09-02 Thread Florian Fainelli
Hi all, This patch series extracts the parts of the patch set that are likely not to be controversial and actually bringing multi-queue support to DSA-created network devices. With these patches, we can now use sch_multiq as documented under Documentation/networking/multique.txt and let

[PATCH net-next v2 1/4] net: dsa: Allow switch drivers to indicate number of TX queues

2017-09-02 Thread Florian Fainelli
Let switch drivers indicate how many TX queues they support. Some switches, such as Broadcom Starfighter 2 are designed with 8 egress queues. Future changes will allow us to leverage the queue mapping and direct the transmission towards a particular queue. Signed-off-by: Florian Fainelli

Re: [PATCH net-next 4/4] net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping

2017-09-02 Thread Florian Fainelli
On 09/02/2017 10:47 AM, Andrew Lunn wrote: > On Sat, Sep 02, 2017 at 09:32:08AM -0700, Florian Fainelli wrote: >> >> >> On 09/02/2017 09:30 AM, Andrew Lunn wrote: @@ -129,6 +130,14 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port) reg |= MII_DUMB_FWDG_EN;

Re: [PATCH net-next 4/4] net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping

2017-09-02 Thread Andrew Lunn
On Sat, Sep 02, 2017 at 09:32:08AM -0700, Florian Fainelli wrote: > > > On 09/02/2017 09:30 AM, Andrew Lunn wrote: > >> @@ -129,6 +130,14 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, > >> int port) > >>reg |= MII_DUMB_FWDG_EN; > >>core_writel(priv, reg, CORE_SWITCH_CTRL); >

Re: [PATCH] Fix build on fedora-14 (and other older systems)

2017-09-02 Thread Michal Kubecek
On Sat, Sep 02, 2017 at 07:15:02AM -0700, gree...@candelatech.com wrote: > From: Ben Greear > > Seems Fedora-20 and below fail, hopefully this fixes > them. > > Signed-off-by: Ben Greear > --- > include/linux/sysinfo.h | 8 >

Re: [PATCH net-next 0/4] net: dsa: add master interface

2017-09-02 Thread Florian Fainelli
Hi Vivien, On 08/31/2017 11:37 AM, Vivien Didelot wrote: > Currently the SoC network interface (called master) to which a switch > fabric hangs, has its dsa_ptr pointing to a dsa_switch_tree instance. > > This is not quite correct, because this interface is physically wired to > one of the

Re: [PATCH net-next 4/4] net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping

2017-09-02 Thread Florian Fainelli
On 09/02/2017 09:30 AM, Andrew Lunn wrote: >> @@ -129,6 +130,14 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, >> int port) >> reg |= MII_DUMB_FWDG_EN; >> core_writel(priv, reg, CORE_SWITCH_CTRL); >> >> +/* Configure Traffic Class to QoS mapping, allow each priority to

Re: [PATCH net-next 4/4] net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping

2017-09-02 Thread Andrew Lunn
> @@ -129,6 +130,14 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int > port) > reg |= MII_DUMB_FWDG_EN; > core_writel(priv, reg, CORE_SWITCH_CTRL); > > + /* Configure Traffic Class to QoS mapping, allow each priority to map > + * to a different queue number > +

Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports

2017-09-02 Thread Florian Fainelli
On 09/02/2017 08:34 AM, Andrew Lunn wrote: > On Thu, Aug 31, 2017 at 02:37:46PM -0400, Vivien Didelot wrote: >> Because each DSA slave port may use a different DSA master port, add a >> pointer to a master in the slave structure. This is a preparatory patch >> for multiple CPU ports. >> >>

Re: [PATCH net] net: dsa: loop: Do not unregister invalid fixed PHY

2017-09-02 Thread Andrew Lunn
On Sat, Sep 02, 2017 at 08:56:45AM -0700, Florian Fainelli wrote: > During error injection it was possible to crash in dsa_loop_exit() because of > an attempt to unregister an invalid PHY. We actually want to the driver > probing > in dsa_loop_init() even though fixed_phy_register() may return an

[PATCH net] net: dsa: loop: Do not unregister invalid fixed PHY

2017-09-02 Thread Florian Fainelli
During error injection it was possible to crash in dsa_loop_exit() because of an attempt to unregister an invalid PHY. We actually want to the driver probing in dsa_loop_init() even though fixed_phy_register() may return an error to exercise how DSA deals with such cases, but we should not be

Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-02 Thread Pavel Machek
Hi! > Section 4.8 of the datasheet says: > > All the registers defined in this section can be also accessed > via the SPI interface. > > Meaning all PHY registers can be access via the SPI interface. So you > should be able to make a standard Linux MDIO bus

Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports

2017-09-02 Thread Andrew Lunn
On Thu, Aug 31, 2017 at 02:37:46PM -0400, Vivien Didelot wrote: > Because each DSA slave port may use a different DSA master port, add a > pointer to a master in the slave structure. This is a preparatory patch > for multiple CPU ports. > > Signed-off-by: Vivien Didelot

Re: [PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master

2017-09-02 Thread Andrew Lunn
Hi Vivien > diff --git a/include/net/dsa.h b/include/net/dsa.h > index f4a5afc4255b..d5b24cd10f79 100644 > --- a/include/net/dsa.h > +++ b/include/net/dsa.h > @@ -130,11 +130,6 @@ struct dsa_switch_tree { >*/ > struct dsa_platform_data*pd; > > - /* Copy of

[patch net-next 04/21] mlxsw: reg: Add mlxsw_reg_ralue_act_ip2me_tun_pack()

2017-09-02 Thread Jiri Pirko
From: Petr Machata To implement IP-in-IP decapsulation, Spectrum uses LPM entries of type IP2ME with tunnel validity bit and tunnel pointer set. The necessary register fields are already available, so add a function to pack the RALUE as appropriate. Signed-off-by: Petr

[patch net-next 06/21] mlxsw: reg: Give mlxsw_reg_ratr_pack a type parameter

2017-09-02 Thread Jiri Pirko
From: Petr Machata To support IPIP, the driver needs to be able to construct an IPIP adjacency. Change mlxsw_reg_ratr_pack to take an adjacency type as an argument. Adjust the one existing caller. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel

[patch net-next 03/21] mlxsw: reg: Move enum mlxsw_reg_ratr_trap_id

2017-09-02 Thread Jiri Pirko
From: Petr Machata This enum is used with reg_ratr_trap_id, so move it next to the register definition. While at it, drop the enumerator initializers. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko

[patch net-next 15/21] mlxsw: spectrum_router: Support IPv6 overlay encap

2017-09-02 Thread Jiri Pirko
From: Petr Machata Add the missing bits to recognize IPv6 next hops as IPIP ones to enable offloading of IPv6 overlay encapsulation. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko

[patch net-next 17/21] mlxsw: spectrum_router: Use existing decap route

2017-09-02 Thread Jiri Pirko
From: Petr Machata The local route that points at IPIP's underlay device (decap route) can be present long before the GRE device. Thus when an encap route is added, it's necessary to look inside the underlay FIB if the decap route is already present. If so, the current trap

[patch net-next 10/21] mlxsw: spectrum_router: Introduce loopback RIFs

2017-09-02 Thread Jiri Pirko
From: Petr Machata When offloading L3 tunnels, an adjacency entry is created that loops the packet back into the underlay router. Loopback interfaces then hold the corresponding information and are created for IP-in-IP netdevices. Signed-off-by: Petr Machata

[patch net-next 18/21] mlxsw: spectrum: Register for IPIP_DECAP_ERROR trap

2017-09-02 Thread Jiri Pirko
From: Petr Machata These traps are generated for packets that fail checks for source IP, encapsulation type, or GRE key. Trap these packets to CPU for follow-up handling by the kernel, which will send ICMP destination unreachable responses. Signed-off-by: Petr Machata

[patch net-next 21/21] mlxsw: reg: Add Routing Tunnel Decap Properties Register

2017-09-02 Thread Jiri Pirko
From: Petr Machata The RTDP register is used for configuring the tunnel decap properties of NVE and IPinIP. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next 16/21] mlxsw: spectrum_router: Support IPv4 underlay decap

2017-09-02 Thread Jiri Pirko
From: Petr Machata Unlike encapsulation, which is represented by a next hop forwarding to an IPIP tunnel, decapsulation is a type of local route. It is created for local routes whose prefix corresponds to the local address of one of offloaded IPIP tunnels. When the tunnel is

[patch net-next 19/21] mlxsw: spectrum_router: Add loopback accessors

2017-09-02 Thread Jiri Pirko
From: Petr Machata struct mlxsw_sp_rif is a router-private structure, and therefore everything related to it is as well: parameters, and derived RIF types including loopbacks. IPIP module needs access to some details of loopback interfaces, but exporting all the RIF shebang

[patch net-next 11/21] mlxsw: spectrum_router: Extract mlxsw_sp_fi_is_gateway()

2017-09-02 Thread Jiri Pirko
From: Petr Machata For IPv4 IP-in-IP offload, routes that direct traffic to IP-in-IP devices need to be considered gateway routes as well. That involves a bit more logic, so extract the current test to a separate function, where the logic can be later added. Signed-off-by:

[patch net-next 20/21] mlxsw: spectrum_router: Support GRE tunnels

2017-09-02 Thread Jiri Pirko
From: Petr Machata This patch introduces callbacks and tunnel type to offload GRE tunnels. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

[patch net-next 13/21] mlxsw: spectrum_router: Make nexthops typed

2017-09-02 Thread Jiri Pirko
From: Petr Machata In the router, some next hops may reference an encapsulating netdevice, such as GRE or IPIP. To properly offload these next hops, mlxsw needs to keep track of whether a given next hop is a regular Ethernet entry, or an IP-in-IP tunneling entry. To

[patch net-next 08/21] mlxsw: spectrum_router: Add mlxsw_sp_ipip_ops

2017-09-02 Thread Jiri Pirko
From: Petr Machata Details of individual tunnel types are kept in an array of mlxsw_sp_ipip_ops objects. Follow-up patches will use the list to determine whether a constructed RIF should be a loopback, and to decide whether a next hop references a tunnel. The list is

[patch net-next 14/21] mlxsw: spectrum_router: Support IPv4 overlay encap

2017-09-02 Thread Jiri Pirko
From: Petr Machata This introduces some common code for tracking of offloaded IP-in-IP tunnels, and support for offloading IPv4 overlay encapsulating routes in particular. A follow-up patch will introduce IPv6 overlay as well. Offloaded tunnels are kept in a linked list of

[patch net-next 07/21] mlxsw: spectrum_router: Publish mlxsw_sp_l3proto

2017-09-02 Thread Jiri Pirko
From: Petr Machata The spectrum_ipip module that will be introduced in the follow-up patches needs to know the data type. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko ---

  1   2   >