Re: [PATCH v2 net] nfp: cast sizeof() to int when comparing with error code

2018-06-26 Thread David Miller
From: Chengguang Xu Date: Tue, 26 Jun 2018 09:16:31 +0800 > sizeof() will return unsigned value so in the error check > negative error code will be always larger than sizeof(). > > Fixes: a0d8e02c35ff ("nfp: add support for reading nffw info") > > Signed-off-by: Chengguang Xu > Acked-by: Jakub

Re: [PATCH net-next] neighbour: force neigh_invalidate when NUD_FAILED update is from admin

2018-06-26 Thread David Miller
From: Roopa Prabhu Date: Mon, 25 Jun 2018 20:32:53 -0700 > From: Roopa Prabhu > > In systems where neigh gc thresh holds are set to high values, > admin deleted neigh entries (eg ip neigh flush or ip neigh del) can > linger around in NUD_FAILED state for a long time until periodic gc kicks > in

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-26 Thread Samudrala, Sridhar
On 6/26/2018 11:05 PM, Jiri Pirko wrote: Wed, Jun 27, 2018 at 02:04:31AM CEST, xiyou.wangc...@gmail.com wrote: On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: Create dummy device with clsact first: # ip link add type dummy # tc qdisc add dev dummy0 clsact There is no template assigned by

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-26 Thread Jiri Pirko
Wed, Jun 27, 2018 at 02:04:31AM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: >> Create dummy device with clsact first: >> # ip link add type dummy >> # tc qdisc add dev dummy0 clsact >> >> There is no template assigned by default: >> # tc filter template

Re: [PATCH mlx5-next 05/12] net/mlx5: Rate limit errors in command interface

2018-06-26 Thread Leon Romanovsky
On Sun, Jun 24, 2018 at 11:23:46AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Any error status returned by FW will trigger similar > to the following error message in the dmesg. > > [ 55.884355] mlx5_core :00:04.0: mlx5_cmd_check:712:(pid 555): > ALLOC_UAR(0x802) op_mod(0x0) f

Re: [PATCH rdma-next 00/12] RDMA fixes 2018-06-24

2018-06-26 Thread Leon Romanovsky
On Tue, Jun 26, 2018 at 02:39:21PM -0600, Jason Gunthorpe wrote: > On Tue, Jun 26, 2018 at 07:21:26AM +0300, Leon Romanovsky wrote: > > On Mon, Jun 25, 2018 at 03:34:38PM -0600, Jason Gunthorpe wrote: > > > On Sun, Jun 24, 2018 at 11:23:41AM +0300, Leon Romanovsky wrote: > > > > From: Leon Romanovs

Re: [PATCH v2] fib_rules: match rules based on suppress_* properties too

2018-06-26 Thread Roopa Prabhu
On Tue, Jun 26, 2018 at 6:34 PM, David Miller wrote: > From: "Jason A. Donenfeld" > Date: Tue, 26 Jun 2018 01:39:32 +0200 > >> Two rules with different values of suppress_prefix or suppress_ifgroup >> are not the same. This fixes an -EEXIST when running: >> >>$ ip -4 rule add table main suppr

[PATCH net-next v2 1/4] net/sched: act_tunnel_key: disambiguate metadata dst error cases

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Metadata may be NULL for one of two reasons: * Missing user input * Failure to allocate the metadata dst Disambiguate these case by returning -EINVAL for the former and -ENOMEM for the latter rather than -EINVAL for both cases. This is in preparation for using extended ack to

[PATCH net-next v2 0/4] net: Geneve options support for TC act_tunnel_key

2018-06-26 Thread Jakub Kicinski
Hi, Simon & Pieter say: This set adds Geneve Options support to the TC tunnel key action. It provides the plumbing required to configure Geneve variable length options. The options can be configured in the form CLASS:TYPE:DATA, where CLASS is represented as a 16bit hexadecimal value, TYPE as an

[PATCH net-next v2 2/4] net/sched: act_tunnel_key: add extended ack support

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Add extended ack support for the tunnel key action by using NL_SET_ERR_MSG during validation of user input. Cc: Alexander Aring Signed-off-by: Simon Horman Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: David Ahern --- net/sched/act_tunn

[PATCH net-next v2 4/4] net/sched: add tunnel option support to act_tunnel_key

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Allow setting tunnel options using the act_tunnel_key action. Options are expressed as class:type:data and multiple options may be listed using a comma delimiter. # ip link add name geneve0 type geneve dstport 0 external # tc qdisc add dev eth0 ingress # tc filter add dev

[PATCH net-next v2 3/4] net: check tunnel option type in tunnel flags

2018-06-26 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Check the tunnel option type stored in tunnel flags when creating options for tunnels. Thereby ensuring we do not set geneve, vxlan or erspan tunnel options on interfaces that are not associated with them. Make sure all users of the infrastructure set correct flags

Re: [PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-26 Thread kbuild test robot
Hi Lawrence, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Lawrence-Brakmo/tcp-force-cwnd-at-least-2-in-tcp_cwnd_reduction/20180627-095533 reproduce: # apt-get install sparse m

[PATCH net] bpfilter: include bpfilter_umh in assembly instead of using objcopy

2018-06-26 Thread Alexei Starovoitov
From: Masahiro Yamada What we want here is to embed a user-space program into the kernel. Instead of the complex ELF magic, let's simply wrap it in the assembly with the '.incbin' directive. Signed-off-by: Masahiro Yamada Signed-off-by: Alexei Starovoitov --- I think this patch should 'fix' bp

Re: [PATCH net-next 3/4] net: check tunnel option type in tunnel flags

2018-06-26 Thread kbuild test robot
Hi Pieter, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/net-Geneve-options-support-for-TC-act_tunnel_key/20180627-030036 reproduce: # apt-get install sparse mak

[PATCH bpf-next] nfp: bpf: allow source ptr type be map ptr in memcpy optimization

2018-06-26 Thread Jakub Kicinski
From: Jiong Wang Map read has been supported on NFP, this patch enables optimization for memcpy from map to packet. This patch also fixed one latent bug which will cause copying from unexpected address once memcpy for map pointer enabled. The fixed code path was not exercised before. Reported-

[RFC bpf-next 4/6] net/mlx5e: Pass CQE to RX handlers

2018-06-26 Thread Saeed Mahameed
CQE has all the meta data information from HW. Make it available to the driver xdp handlers. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h| 9 ++--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 15 +-- 2 files changed, 15 insertions(+),

[RFC bpf-next 5/6] net/mlx5e: Add XDP RX meta data support

2018-06-26 Thread Saeed Mahameed
Implement XDP meta data hash and vlan support. 1. on xdp setup ndo: add support for XDP_QUERY_META_FLAGS and return the two supported flags 2. use xdp_data_meta_set_hash and xdp_data_meta_set_vlan helpers to fill in the meta data fileds. Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellan

[RFC bpf-next 3/6] net/mlx5e: Store xdp flags and meta data info

2018-06-26 Thread Saeed Mahameed
Make xdp flags and meta data info avaiable to RQs data path, to enable xdp meta data offloads in next two patches. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 +++- .../net/ethernet/mellanox/mlx5/core/en_main.c | 52 +++ .../net/ethernet/m

[RFC bpf-next 1/6] net: xdp: Add support for meta data flags requests

2018-06-26 Thread Saeed Mahameed
A user space application can request to enable a specific set of meta data to be reported in every xdp buffer provided to the xdp program. When meta_data flags are required, XDP devices must respond to XDP_QUERY_META_FLAGS command with all the meta data flags the device actually supports, and the

[RFC bpf-next 6/6] samples/bpf: Add meta data hash example to xdp_redirect_cpu

2018-06-26 Thread Saeed Mahameed
Add a new program (prog_num = 4) that will not parse packets and will use the meta data hash to spread/redirect traffic into different cpus. For the new program we set on bpf_set_link_xdp_fd: xdp_flags |= XDP_FLAGS_META_HASH | XDP_FLAGS_META_VLAN; On mlx5 it will succeed since mlx5 alread

[RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-06-26 Thread Saeed Mahameed
The idea from this patch is to define a well known structure for XDP meta data fields format and offset placement inside the xdp data meta buffer. For that driver will need some static information to know what to provide and where, enters struct xdp_md_info and xdp_md_info_arr: struct xdp_md_info

[RFC bpf-next 0/6] XDP RX device meta data acceleration (WIP)

2018-06-26 Thread Saeed Mahameed
Hello, Although it is far from being close to completion, this series provides the means and infrastructure to enable device drivers to share packets meta data information and accelerations with XDP programs, such as hash, stripped vlan, checksum, flow mark, packet header types, etc .. The serie

[PATCH net-next v2] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-26 Thread Lawrence Brakmo
When using dctcp and doing RPCs, if the last packet of a request is ECN marked as having seen congestion (CE), the sender can decrease its cwnd to 1. As a result, it will only send one packet when a new request is sent. In some instances this results in high tail latencies. For example, in one set

[PATCH net-next] net: qmi_wwan: Add pass through mode

2018-06-26 Thread Subash Abhinov Kasiviswanathan
Pass through mode is to allow packets in MAP format to be passed on to the stack. rmnet driver can be used to process and demultiplex these packets. Note that pass through mode can be enabled when the device is in raw ip mode only. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/us

Re: [PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-26 Thread kbuild test robot
Hi Lawrence, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Lawrence-Brakmo/tcp-force-cwnd-at-least-2-in-tcp_cwnd_reduction/20180627-095533 config: x86_64-randconfig-x003-201825 (attached as .c

[PATCH net-next] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-26 Thread Lawrence Brakmo
When using dctcp and doing RPCs, if the last packet of a request is ECN marked as having seen congestion (CE), the sender can decrease its cwnd to 1. As a result, it will only send one packet when a new request is sent. In some instances this results in high tail latencies. For example, in one set

Re: [PATCH net v2 0/2] nfp: MPLS and shared blocks TC offload fixes

2018-06-26 Thread David Miller
From: Jakub Kicinski Date: Mon, 25 Jun 2018 20:36:26 -0700 > This series brings two fixes to TC filter/action offload code. > Pieter fixes matching MPLS packets when the match is purely on > the MPLS ethertype and none of the MPLS fields are used. > John provides a fix for offload of shared block

Re: [PATCH net-next 0/6] Multipath tests for tunnel devices

2018-06-26 Thread David Miller
From: Petr Machata Date: Tue, 26 Jun 2018 02:05:51 +0200 > This patchset adds a test for ECMP and weighted ECMP between two GRE > tunnels. > > In patches #1 and #2, the function multipath_eval() is first moved from > router_multipath.sh to lib.sh for ease of reuse, and then fixed up. > > In pat

[PATCH net] strparser: Remove early eaten to fix full tcp receive buffer stall

2018-06-26 Thread Doron Roberts-Kedes
On receving an incomplete message, the existing code stores the remaining length of the cloned skb in the early_eaten field instead of incrementing the value returned by __strp_recv. This defers invocation of sock_rfree for the current skb until the next invocation of __strp_recv, which returns ear

Re: [PATCH v2] fib_rules: match rules based on suppress_* properties too

2018-06-26 Thread David Miller
From: "Jason A. Donenfeld" Date: Tue, 26 Jun 2018 01:39:32 +0200 > Two rules with different values of suppress_prefix or suppress_ifgroup > are not the same. This fixes an -EEXIST when running: > >$ ip -4 rule add table main suppress_prefixlength 0 > > Signed-off-by: Jason A. Donenfeld > F

Re: [rds-devel] [PATCH net-next] rds: clean up loopback rds_connections on netns deletion

2018-06-26 Thread David Miller
From: Sowmini Varadhan Date: Tue, 26 Jun 2018 12:28:22 -0400 > On (06/26/18 10:53), Sowmini Varadhan wrote: >> Date: Tue, 26 Jun 2018 10:53:23 -0400 >> From: Sowmini Varadhan >> To: David Miller >> Cc: netdev@vger.kernel.org, rds-de...@oss.oracle.com >> Subject: Re: [rds-devel] [PATCH net-next]

Re: [net-next PATCH v4 5/7] net: Enable Tx queue selection based on Rx queues

2018-06-26 Thread Nambiar, Amritha
On 6/26/2018 4:04 AM, Willem de Bruijn wrote: > On Mon, Jun 25, 2018 at 7:06 PM Amritha Nambiar > wrote: >> >> This patch adds support to pick Tx queue based on the Rx queue(s) map >> configuration set by the admin through the sysfs attribute >> for each Tx queue. If the user configuration for rec

[pull request][net 0/9] Mellanox, mlx5 fixes 2018-06-26

2018-06-26 Thread Saeed Mahameed
Hi Dave, This pull request includes fixes for mlx5 netdev and core driver, for more information please see the tag log below and for. Please pull and let me know if there's any issue. For -stable: For -stable v4.0 net/mlx5: Fix incorrect raw command length parsing For -stable v4.6 net/

[net 4/9] IB/mlx5: Avoid dealing with vport representors if not being e-switch manager

2018-06-26 Thread Saeed Mahameed
From: Or Gerlitz In smartnic env, the host (PF) driver might not be an e-switch manager, hence the switchdev mode representors are running on the embedded cpu (EC) and not at the host. As such, we should avoid dealing with vport representors if not being esw manager. Fixes: b5ca15ad7e61 ('IB/ml

[net 7/9] net/mlx5: Fix wrong size allocation for QoS ETC TC regitster

2018-06-26 Thread Saeed Mahameed
From: Shay Agroskin The driver allocates wrong size (due to wrong struct name) when issuing a query/set request to NIC's register. Fixes: d8880795dabf ("net/mlx5e: Implement DCBNL IEEE max rate") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5

[net 5/9] net/mlx5: E-Switch, Disallow vlan/spoofcheck setup if not being esw manager

2018-06-26 Thread Saeed Mahameed
From: Eli Cohen In smartnic env, if the host (PF) driver is not an e-switch manager, we are not allowed to apply eswitch ports setups such as vlan (VST), spoof-checks, min/max rate or state. Make sure we are eswitch manager when coming to issue these callbacks and err otherwise. Also fix the de

[net 8/9] net/mlx5: Fix incorrect raw command length parsing

2018-06-26 Thread Saeed Mahameed
From: Alex Vesker The NULL character was not set correctly for the string containing the command length, this caused failures reading the output of the command due to a random length. The fix is to initialize the output length string. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-I

[net 9/9] net/mlx5: Fix command interface race in polling mode

2018-06-26 Thread Saeed Mahameed
From: Alex Vesker The command interface can work in two modes: Events and Polling. In the general case, each time we invoke a command, a work is queued to handle it. When working in events, the interrupt handler completes the command execution. On the other hand, when working in polling mode, th

[net 2/9] net/mlx5: E-Switch, Avoid setup attempt if not being e-switch manager

2018-06-26 Thread Saeed Mahameed
From: Or Gerlitz In smartnic env, the host (PF) driver might not be an e-switch manager, hence the FW will err on driver attempts to deal with setting/unsetting the eswitch and as a result the overall setup of sriov will fail. Fix that by avoiding the operation if e-switch management is not allo

[net 1/9] net/mlx5e: Don't attempt to dereference the ppriv struct if not being eswitch manager

2018-06-26 Thread Saeed Mahameed
From: Or Gerlitz The check for cpu hit statistics was not returning immediate false for any non vport rep netdev and hence we crashed (say on mlx5 probed VFs) if user-space tool was calling into any possible netdev in the system. Fix that by doing a proper check before dereferencing. Fixes: 1d4

[net 6/9] net/mlx5: Fix required capability for manipulating MPFS

2018-06-26 Thread Saeed Mahameed
From: Eli Cohen Manipulating of the MPFS requires eswitch manager capabilities. Fixes: eeb66cdb6826 ('net/mlx5: Separate between E-Switch and MPFS') Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c | 9 +

[net 3/9] net/mlx5e: Avoid dealing with vport representors if not being e-switch manager

2018-06-26 Thread Saeed Mahameed
From: Or Gerlitz In smartnic env, the host (PF) driver might not be an e-switch manager, hence the switchdev mode representors are running on the embedded cpu (EC) and not at the host. As such, we should avoid dealing with vport representors if not being esw manager. While here, make sure to di

Re: [net-next PATCH v4 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue

2018-06-26 Thread Nambiar, Amritha
On 6/26/2018 3:55 AM, Willem de Bruijn wrote: > On Mon, Jun 25, 2018 at 7:06 PM Amritha Nambiar > wrote: >> >> Extend transmit queue sysfs attribute to configure Rx queue(s) map >> per Tx queue. By default no receive queues are configured for the >> Tx queue. >> >> - /sys/class/net/eth0/queues/tx-

Re: [bpf-next PATCH 2/2] samples/bpf: xdp_rxq_info action XDP_TX must adjust MAC-addrs

2018-06-26 Thread Song Liu
On Mon, Jun 25, 2018 at 7:27 AM, Jesper Dangaard Brouer wrote: > XDP_TX requires also changing the MAC-addrs, else some hardware > may drop the TX packet before reaching the wire. This was > observed with driver mlx5. > > If xdp_rxq_info select --action XDP_TX the swapmac functionality > is activ

[PATCH v7 01/11] net: pch_gbe: Remove unused struct pch_gbe_adapter fields

2018-06-26 Thread Paul Burton
Remove a bunch of unused fields from struct pch_gbe_adapter. Among these polling_netdev, config_space & led_status are entirely unused. ethtool_lock is initialized but we never attempt to acquire the lock, so that is effectively unused too. A msg_enable field was documented but missing, so drop tha

Re: [RFC PATCH v2 net-next 01/12] net: core: trivial netif_receive_skb_list() entry point

2018-06-26 Thread Eric Dumazet
On 06/26/2018 11:17 AM, Edward Cree wrote: > Just calls netif_receive_skb() in a loop. ... > +void netif_receive_skb_list(struct sk_buff_head *list) Please use a standard list_head and standard list operators. (In all your patches) 1) We do not want to carry a spinlock_t + count per list..

[PATCH v7 11/11] net: pch_gbe: Allow build on MIPS platforms

2018-06-26 Thread Paul Burton
Allow the pch_gbe driver to be built on MIPS platforms, allowing its use on the MIPS Boston development board. Signed-off-by: Paul Burton Cc: Andrew Lunn Cc: David S. Miller Cc: netdev@vger.kernel.org --- Changes in v7: None drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | 2 +- 1 file chang

[PATCH v7 04/11] net: pch_gbe: Remove irq_sem

2018-06-26 Thread Paul Burton
The pch_gbe driver uses an irq_sem variable to implement a sempahore that seems to inconsistently count the number of times we enable or disable interrupts, and only write to the interrupt enable register when this count hits 0. This makes absolutely no sense to me, both from the perspective of how

[PATCH v7 09/11] net: pch_gbe: Convert to mdiobus and phylib

2018-06-26 Thread Paul Burton
From: Andrew Lunn Convert this driver to use the mdio bus and phylib infrastructure. It will then use the common AT803X PHY driver, rather than use its own code. Have the shared code also handle the GPIO used to reset the PHY. Over all, these changes should make it easier to use other PHYs with

[PATCH v7 07/11] net: pch_gbe: Remove AR8031 PHY hibernation disable

2018-06-26 Thread Paul Burton
We should now be able to cope with the PHY entering hibernation, ie. ceasing to provide the RX clock, whilst the ethernet link is down. Remove the code responsible for disabling the AR8031 PHY's hibernation feature, allowing the PHY to enter its low power hibernation state. Signed-off-by: Paul Bu

[PATCH v7 10/11] ptp: pch: Allow build on MIPS platforms

2018-06-26 Thread Paul Burton
Allow the ptp_pch driver to be built on MIPS platforms in preparation for use on the MIPS Boston board. Signed-off-by: Paul Burton Acked-by: Richard Cochran Cc: Andrew Lunn Cc: David S. Miller Cc: netdev@vger.kernel.org --- Changes in v7: None drivers/ptp/Kconfig | 2 +- 1 file changed, 1 i

[PATCH v7 03/11] net: pch_gbe: Probe PHY ID & initialize only once

2018-06-26 Thread Paul Burton
The pch_gbe driver currently probes for the PHY ID & configures the PHY every time the MAC is reset, even though we know that the PHY won't have changed since the last MAC reset [1]. This patch moves the PHY probe to instead happen only once when the driver is probed, saving time & moving us close

[PATCH v7 08/11] net: pch_gbe: Clean up resets

2018-06-26 Thread Paul Burton
Currently pch_gbe_reset() performs a number of tasks: 1) Calls pch_gbe_reset_hw(), which: 1a) Reads the MAC address from the hardware, even though we already did that in pch_gbe_open() & it should not have changed. 1b) Writes to the RESET register to reset the MAC. 1c)

[PATCH v7 06/11] net: pch_gbe: Only enable MAC when PHY link is active

2018-06-26 Thread Paul Burton
When using a PHY connected via RGMII, as the pch_gbe driver presumes is the case, the RX clock is provided by the PHY to the MAC. Various PHYs, including both the AR8031 used by the Minnowboard & the RTL8211E used by the MIPS Boston development board, will stop generating the RX clock when the ethe

[PATCH v7 02/11] net: pch_gbe: Mask spare MAC addresses all at once

2018-06-26 Thread Paul Burton
pch_gbe_set_multi() loops through each unused MAC address register, masking them one by one & waiting for a bit to clear indicating that the change has taken effect before zeroing out the MAC register. This is needlessly inefficient. We can instead set all the desired mask bits with a single write

[PATCH v7 05/11] net: pch_gbe: Move pch_gbe_watchdog lower in pch_gbe_main.c

2018-06-26 Thread Paul Burton
This patch moves the pch_gbe_watchdog() function lower in pch_gbe_main.c in order to allow use of other functions in the next patch, without requiring lots of forward declarations. Doing this as a separate patch makes it clearer what actually changed in the next patch. The function is unmodified e

[PATCH v7 00/11] net: pch_gbe: Fixes, conversion to phylib, enable for MIPS

2018-06-26 Thread Paul Burton
This series cleans up & reworks the pch_gbe driver such that it no longer contains PHY-specific code, converts it to phylib & enables it to be built on MIPS systems for use with the MIPS Boston development board. Unfortunately I don't have access to a Minnowboard, which the driver contains some pl

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-26 Thread Cong Wang
On Tue, Jun 26, 2018 at 1:01 AM Jiri Pirko wrote: > Create dummy device with clsact first: > # ip link add type dummy > # tc qdisc add dev dummy0 clsact > > There is no template assigned by default: > # tc filter template show dev dummy0 ingress > > Add a template of type flower allowing to insert

Re: [net-next PATCH v4 3/7] net: sock: Change tx_queue_mapping in sock_common to unsigned short

2018-06-26 Thread Nambiar, Amritha
On 6/26/2018 3:58 AM, Willem de Bruijn wrote: > On Mon, Jun 25, 2018 at 7:06 PM Amritha Nambiar > wrote: >> >> Change 'skc_tx_queue_mapping' field in sock_common structure from >> 'int' to 'unsigned short' type with 0 indicating unset and >> a positive queue value being set. This way it is consist

Re: [net-next PATCH v4 3/7] net: sock: Change tx_queue_mapping in sock_common to unsigned short

2018-06-26 Thread Nambiar, Amritha
On 6/25/2018 8:25 PM, Alexander Duyck wrote: > On Mon, Jun 25, 2018 at 6:34 PM, Tom Herbert wrote: >> >> >> On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar >> wrote: >>> >>> Change 'skc_tx_queue_mapping' field in sock_common structure from >>> 'int' to 'unsigned short' type with 0 indicating un

Re: [bpf-next PATCH 1/2] samples/bpf: extend xdp_rxq_info to read packet payload

2018-06-26 Thread Song Liu
On Mon, Jun 25, 2018 at 7:27 AM, Jesper Dangaard Brouer wrote: > There is a cost associated with reading the packet data payload > that this test ignored. Add option --read to allow enabling > reading part of the payload. > > This sample/tool helps us analyse an issue observed with a NIC > mlx5 (

[PATCH v3 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-26 Thread dsahern
From: David Ahern For ACLs implemented using either FIB rules or FIB entries, the BPF program needs the FIB lookup status to be able to drop the packet. Since the bpf_fib_lookup API has not reached a released kernel yet, change the return code to contain an encoding of the FIB lookup result and r

Re: [net-next PATCH v4 7/7] Documentation: Add explanation for XPS using Rx-queue(s) map

2018-06-26 Thread Tom Herbert
On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar wrote: > Signed-off-by: Amritha Nambiar Acked-by: Tom Herbert > --- > Documentation/ABI/testing/sysfs-class-net-queues | 11 > Documentation/networking/scaling.txt | 57 > ++ > 2 files changed, 58 inse

Re: [net-next PATCH v4 2/7] net: Use static_key for XPS maps

2018-06-26 Thread Tom Herbert
On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar wrote: > Use static_key for XPS maps to reduce the cost of extra map checks, > similar to how it is used for RPS and RFS. This includes static_key > 'xps_needed' for XPS and another for 'xps_rxqs_needed' for XPS using > Rx queues map. > Acked-by:

Re: [net-next PATCH v4 1/7] net: Refactor XPS for CPUs and Rx queues

2018-06-26 Thread Tom Herbert
On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar wrote: > Refactor XPS code to support Tx queue selection based on > CPU(s) map or Rx queue(s) map. > > Signed-off-by: Amritha Nambiar > --- > include/linux/cpumask.h | 11 ++ > include/linux/netdevice.h | 100 + > net/cor

Re: [PATCH RESEND bpf-next v6 2/2] samples/bpf: Add xdp_sample_pkts example

2018-06-26 Thread Song Liu
On Mon, Jun 25, 2018 at 5:25 AM, Toke Høiland-Jørgensen wrote: > Add an example program showing how to sample packets from XDP using the > perf event buffer. The example userspace program just prints the ethernet > header for every packet sampled. > > Reviewed-by: Jakub Kicinski > Signed-off-by:

Re: [PATCH RESEND bpf-next v6 1/2] trace_helpers.c: Add helpers to poll multiple perf FDs for events

2018-06-26 Thread Song Liu
On Mon, Jun 25, 2018 at 5:25 AM, Toke Høiland-Jørgensen wrote: > Add two new helper functions to trace_helpers that supports polling > multiple perf file descriptors for events. These are used to the XDP > perf_event_output example, which needs to work with one perf fd per CPU. > > Reviewed-by: Ja

Re: [PATCH 0/6] offload Linux LAG devices to the TC datapath

2018-06-26 Thread Jakub Kicinski
On Tue, 26 Jun 2018 17:57:08 +0300, Or Gerlitz wrote: > > Forwarded Message > > Subject: [PATCH 0/6] offload Linux LAG devices to the TC datapath > > Date: Thu, 21 Jun 2018 14:35:55 +0100 > > From: John Hurley > > To: d...@openvswitch.org, r...@mellanox.com, g...@mellanox.com, >

Re: [PATCH bpf-next 6/7] nfp: bpf: support u32 divide using reciprocal_div.h

2018-06-26 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > NFP doesn't have integer divide instruction, this patch use reciprocal > algorithm (the basic one, reciprocal_div) to emulate it. > > For each u32 divide, we would need 11 instructions to finish the operation. > > 7 (

Re: [PATCH bpf-next 5/7] nfp: bpf: support u16 and u32 multiplications

2018-06-26 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > NFP supports u16 and u32 multiplication. Multiplication is done 8-bits per > step, therefore we need 2 steps for u16 and 4 steps for u32. > > We also need one start instruction to initialize the sequence and one or > tw

[PATCH bpf-next] selftests/bpf: Test sys_connect BPF hooks with TFO

2018-06-26 Thread Andrey Ignatov
TCP Fast Open is triggered by sys_sendmsg with MSG_FASTOPEN flag for SOCK_STREAM socket. Even though it's sys_sendmsg, it eventually calls __inet_stream_connect the same way sys_connect does for TCP. __inet_stream_connect, in turn, already has BPF hooks for sys_connect. That means TFO is already

Re: [PATCH v3 net-next 3/4] netdevsim: add ipsec offload testing

2018-06-26 Thread Jakub Kicinski
On Tue, 26 Jun 2018 10:07:54 -0700, Shannon Nelson wrote: > Implement the IPsec/XFRM offload API for testing. > > Signed-off-by: Shannon Nelson > --- > V2 - addressed formatting comments from Jakub Kicinski > V3 - a couple more little xmas tree nits Thank you! :) Reviewed-by: Jakub Kicinski

[PATCH ipsec-next 1/1] xfrm: don't check offload_handle for nonzero

2018-06-26 Thread Shannon Nelson
The offload_handle should be an opaque data cookie for the driver to use, much like the data cookie for a timer or alarm callback. Thus, the XFRM stack should not be checking for non-zero, because the driver might use that to store an array reference, which could be zero, or some other zero but mea

Re: [patch net-next 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-26 Thread Jakub Kicinski
On Tue, 26 Jun 2018 09:12:17 +0200, Jiri Pirko wrote: > Tue, Jun 26, 2018 at 09:00:45AM CEST, jakub.kicin...@netronome.com wrote: > >On Mon, Jun 25, 2018 at 11:43 PM, Jiri Pirko wrote: > >> Tue, Jun 26, 2018 at 06:58:50AM CEST, jakub.kicin...@netronome.com wrote: > >>>On Mon, 25 Jun 2018 23:01

Re: [PATCH bpf-next 7/7] nfp: bpf: migrate to advanced reciprocal divide in reciprocal_div.h

2018-06-26 Thread Jakub Kicinski
On Sun, 24 Jun 2018 20:54:21 -0700, Jakub Kicinski wrote: > + * NOTE: because we are using "reciprocal_value_adv" which doesn't > + * support dividend with MSB set, so we need to JIT separate NFP > + * sequence to handle such case. It could be a simple sequence if there > + * is

Re: [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned

2018-06-26 Thread Jakub Kicinski
On Mon, 25 Jun 2018 23:21:10 -0700, Song Liu wrote: > > +struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec) > > +{ > > + struct reciprocal_value_adv R; > > + u32 l, post_shift; > > + u64 mhigh, mlow; > > + > > + l = fls(d - 1); > > + post_shift = l; > > +

Re: [RFC PATCH v2 net-next 00/12] Handle multiple received packets at each stage

2018-06-26 Thread Tom Herbert
On Tue, Jun 26, 2018 at 11:15 AM, Edward Cree wrote: > > This patch series adds the capability for the network stack to receive a > list of packets and process them as a unit, rather than handling each > packet singly in sequence. This is done by factoring out the existing > datapath code at e

Re: [PATCH rdma-next 00/12] RDMA fixes 2018-06-24

2018-06-26 Thread Jason Gunthorpe
On Tue, Jun 26, 2018 at 07:21:26AM +0300, Leon Romanovsky wrote: > On Mon, Jun 25, 2018 at 03:34:38PM -0600, Jason Gunthorpe wrote: > > On Sun, Jun 24, 2018 at 11:23:41AM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Hi, > > > > > > This is bunch of patches trigged by runni

Re: [PATCH net-next 2/4] net/sched: act_tunnel_key: add extended ack support

2018-06-26 Thread David Ahern
On 6/26/18 12:53 PM, Jakub Kicinski wrote: > From: Simon Horman > > Add extended ack support for the tunnel key action by using NL_SET_ERR_MSG > during validation of user input. > > Cc: David Ahern > Cc: Alexander Aring > Signed-off-by: Simon Horman > Signed-off-by: Pieter Jansen van Vuuren

[PATCH net-next] netlink: Return extack message if attribute validation fails

2018-06-26 Thread dsahern
From: David Ahern Have one extack message for parsing and validating. Signed-off-by: David Ahern --- lib/nlattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nlattr.c b/lib/nlattr.c index dfa55c873c13..e335bcafa9e4 100644 --- a/lib/nlattr.c +++ b/lib/nlattr.c @@

Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading

2018-06-26 Thread Andrew Lunn
On Tue, Jun 26, 2018 at 07:01:32PM +, Vadim Pasternak wrote: > > > > -Original Message- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Tuesday, June 26, 2018 9:18 PM > > To: Vadim Pasternak > > Cc: Guenter Roeck ; linux...@vger.kernel.org; > > netdev@vger.kernel.org; rui.zh.

RE: [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading

2018-06-26 Thread Vadim Pasternak
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Tuesday, June 26, 2018 9:18 PM > To: Vadim Pasternak > Cc: Guenter Roeck ; linux...@vger.kernel.org; > netdev@vger.kernel.org; rui.zh...@intel.com; edubez...@gmail.com; > j...@resnulli.us > Subject: Re: [patch net-

[PATCH net-next 3/4] net: check tunnel option type in tunnel flags

2018-06-26 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Check the tunnel option type stored in tunnel flags when creating options for tunnels. Thereby ensuring we do not set geneve, vxlan or erspan tunnel options on interfaces that are not associated with them. Make sure all users of the infrastructure set correct flags

[PATCH net-next 0/4] net: Geneve options support for TC act_tunnel_key

2018-06-26 Thread Jakub Kicinski
Hi, Simon & Pieter say: This set adds Geneve Options support to the TC tunnel key action. It provides the plumbing required to configure Geneve variable length options. The options can be configured in the form CLASS:TYPE:DATA, where CLASS is represented as a 16bit hexadecimal value, TYPE as an

[PATCH net-next 2/4] net/sched: act_tunnel_key: add extended ack support

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Add extended ack support for the tunnel key action by using NL_SET_ERR_MSG during validation of user input. Cc: David Ahern Cc: Alexander Aring Signed-off-by: Simon Horman Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- net/sched/act_tunnel_key.c

[PATCH net-next 4/4] net/sched: add tunnel option support to act_tunnel_key

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Allow setting tunnel options using the act_tunnel_key action. Options are expressed as class:type:data and multiple options may be listed using a comma delimiter. # ip link add name geneve0 type geneve dstport 0 external # tc qdisc add dev eth0 ingress # tc filter add dev

[PATCH net-next 1/4] net/sched: act_tunnel_key: disambiguate metadata dst error cases

2018-06-26 Thread Jakub Kicinski
From: Simon Horman Metadata may be NULL for one of two reasons: * Missing user input * Failure to allocate the metadata dst Disambiguate these case by returning -EINVAL for the former and -ENOMEM for the latter rather than -EINVAL for both cases. This is in preparation for using extended ack to

Re: [patch net-next RFC 11/12] mlxsw: core: Extend hwmon interface with FAN fault attribute

2018-06-26 Thread Guenter Roeck
On Tue, Jun 26, 2018 at 04:47:05PM +, Vadim Pasternak wrote: > > > > -Original Message- > > From: Guenter Roeck [mailto:li...@roeck-us.net] > > Sent: Tuesday, June 26, 2018 7:33 PM > > To: Vadim Pasternak > > Cc: Andrew Lunn ; da...@davemloft.net; > > netdev@vger.kernel.org; rui.zh..

[RFC PATCH v2 net-next 12/12] net: listify jited Generic XDP processing on x86_64

2018-06-26 Thread Edward Cree
When JITing an eBPF program on x86_64, also JIT a list_func that calls the bpf_func in a loop. Since this is a direct call, it should perform better than indirect-calling bpf_func in a loop. Since getting the percpu 'redirect_info' variable is ugly and magic, pass a pointer into the list_func a

[RFC PATCH v2 net-next 10/12] net: listify Generic XDP processing, part 1

2018-06-26 Thread Edward Cree
Deals with all the pre- and post-amble to the BPF program itself, which is still called one packet at a time. Involves some fiddly percpu variables to cope with XDP_REDIRECT handling. Signed-off-by: Edward Cree --- include/linux/filter.h | 10 +++ net/core/dev.c | 165 +

[RFC PATCH v2 net-next 11/12] net: listify Generic XDP processing, part 2

2018-06-26 Thread Edward Cree
Adds listified versions of the eBPF interpreter functions, and uses them when the single func is not JITed. If the single func is JITed (and the list func is not, which currently it never is), then use the single func since the cost of interpreting is probably much worse than the cost of the ex

[RFC PATCH v2 net-next 09/12] net: don't bother calling list RX functions on empty lists

2018-06-26 Thread Edward Cree
Generally the check should be very cheap, as the sk_buff_head is in cache. Signed-off-by: Edward Cree --- net/core/dev.c | 8 ++-- net/ipv4/ip_input.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index f0eb00e9fb57..11f80d4502b9

[RFC PATCH v2 net-next 08/12] net: ipv4: listify ip_rcv_finish

2018-06-26 Thread Edward Cree
ip_rcv_finish_core(), if it does not drop, sets skb->dst by either early demux or route lookup. The last step, calling dst_input(skb), is left to the caller; in the listified case, we split to form sublists with a common dst, but then ip_sublist_rcv_finish() just calls dst_input(skb) in a loop.

[RFC PATCH v2 net-next 07/12] net: ipv4: listified version of ip_rcv

2018-06-26 Thread Edward Cree
Also involved adding a way to run a netfilter hook over a list of packets. Rather than attempting to make netfilter know about lists (which would be a major project in itself) we just let it call the regular okfn (in this case ip_rcv_finish()) for any packets it steals, and have it give us back

[RFC PATCH v2 net-next 06/12] net: core: propagate SKB lists through packet_type lookup

2018-06-26 Thread Edward Cree
__netif_receive_skb_taps() does a depressingly large amount of per-packet work that can't easily be listified, because the another_round looping makes it nontrivial to slice up into smaller functions. Fortunately, most of that work disappears in the fast path: * Hardware devices generally don't

[RFC PATCH v2 net-next 04/12] net: core: Another step of skb receive list processing

2018-06-26 Thread Edward Cree
netif_receive_skb_list_internal() now processes a list and hands it on to the next function. Signed-off-by: Edward Cree --- net/core/dev.c | 73 ++ 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/net/core/dev.c b/net/core/de

[RFC PATCH v2 net-next 05/12] net: core: another layer of lists, around PF_MEMALLOC skb handling

2018-06-26 Thread Edward Cree
First example of a layer splitting the list (rather than merely taking individual packets off it). Signed-off-by: Edward Cree --- net/core/dev.c | 46 ++ 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c in

[RFC PATCH v2 net-next 03/12] net: core: unwrap skb list receive slightly further

2018-06-26 Thread Edward Cree
Adds iterator skb_queue_for_each() to run over a list without modifying it. Signed-off-by: Edward Cree --- include/linux/skbuff.h | 16 include/trace/events/net.h | 7 +++ net/core/dev.c | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git

Re: [patch net-next RFC 03/12] mlxsw: core: Add core environment module for port temperature reading

2018-06-26 Thread Andrew Lunn
> However, I have some concerns on this matter. > Our hardware provides bulk reading of the modules temperature, means > I can get all inputs by one hardware request, which is important optimization. > Reading each module individually will be resulted in huge overhead and will > require maybe some

  1   2   3   >