[PATCH net] net: skb_segment() should not return NULL

2018-07-19 Thread Eric Dumazet
syzbot caught a NULL deref [1], caused by skb_segment() skb_segment() has many "goto err;" that assume the @err variable contains -ENOMEM. A successful call to __skb_linearize() should not clear @err, otherwise a subsequent memory allocation error could return NULL. While we are at it, we might

Re: [PATCH net] net: skb_segment() should not return NULL

2018-07-19 Thread Alexander Duyck
On Thu, Jul 19, 2018 at 4:04 PM, Eric Dumazet wrote: > syzbot caught a NULL deref [1], caused by skb_segment() > > skb_segment() has many "goto err;" that assume the @err variable > contains -ENOMEM. > > A successful call to __skb_linearize() should not clear @err, > otherwise a subsequent memory

Re: DNAT with VRF support in Linux Kernel

2018-07-19 Thread David Ahern
On 7/19/18 7:52 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing a VRF/Netfilter related issue on a system running a 4.14.52 > Linux kernel. > >   > > I have an eth interface enslaved to l3mdev mgmtvrf device. > >   > > After reviewing >

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-19 Thread Max Gurtovoy
[ 2032.194376] nvme nvme0: failed to connect queue: 9 ret=-18 queue 9 is not mapped (overlap). please try the bellow: This seems to work.  Here are three mapping cases:  each vector on its own cpu, each vector on 1 cpu within the local numa node, and each vector having all cpus in its numa

Re: [PATCH bpf 0/2] BPF fix and test case

2018-07-19 Thread Alexei Starovoitov
On Thu, Jul 19, 2018 at 06:18:34PM +0200, Daniel Borkmann wrote: > This set adds a ppc64 JIT fix for xadd as well as a missing test > case for verifying whether xadd messes with src/dst reg. Thanks! Applied, Thanks

[PATCH ipsec-next] xfrm: Allow xfrmi if_id to be updated by UPDSA

2018-07-19 Thread Nathan Harold
Allow attaching an SA to an xfrm interface id after the creation of the SA, so that tasks such as keying which must be done as the SA is created, can remain separate from the decision on how to route traffic from an SA. This permits SA creation to be decomposed in to three separate steps: 1)

Re: VRF with enslaved L3 enabled bridge

2018-07-19 Thread David Ahern
On 7/19/18 8:19 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing the following issue on a system running a 4.14.52 Linux kernel. > >   > > With an eth interface enslaved to a VRF device, pings sent out on the > VRF to an neighboring host are successful. But, with an eth interface >

[PATCH bpf] bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h

2018-07-19 Thread Martin KaFai Lau
This patch shrinks the BTF_INT_BITS() mask. The current btf_int_check_meta() ensures the nr_bits of an integer cannot exceed 64. Hence, it is mostly an uapi cleanup. The actual btf usage (i.e. seq_show()) is also modified to use u8 instead of u16. The verification (e.g. btf_int_check_meta())

[PATCH bpf] bpf: Use option "help" in the llvm-objcopy test

2018-07-19 Thread Martin KaFai Lau
I noticed the "--version" option of the llvm-objcopy command has recently disappeared from the master llvm branch. It is currently used as a BTF support test in tools/testing/selftests/bpf/Makefile. This patch replaces it with "--help" which should be less error prone in the future. Fixes:

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-19 Thread Andrew Lunn
> In both of your examples, only one bit is set, what will change is the > value being programmed to RXHCK_BRCM_TAG(i), which will be either 0, or > 1, but the value programmed to RXCHK_CONTROL as far as which filter is > enabled will be the same because we can use filter position 0. > > What the

Re: [PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv

2018-07-19 Thread Andrew Lunn
On Thu, Jul 19, 2018 at 08:15:16AM +0200, Heiner Kallweit wrote: > The situation described in the comment can occur also with > PHY_IGNORE_INTERRUPT, therefore change the condition to include it. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

[PATCH net-next 04/11] s390/qeth: allocate netdevice early

2018-07-19 Thread Julian Wiedmann
Allocation of the netdevice is currently delayed until a qeth card first goes online. This complicates matters in several places, where we need to cache values instead of applying them straight to the netdevice. Improve on this by moving the allocation up to where the qeth card itself is created.

[PATCH net-next 10/11] s390/qeth: add support for constrained HW headers

2018-07-19 Thread Julian Wiedmann
Some transmit modes require that the HW header is located in the same page as the initial protocol headers in skb->data. Let callers specify the size of this contiguous header range, and enforce it when building the HW header. While at it, apply some gentle renaming to the relevant L2 code so

[PATCH net-next 00/11] s390/qeth: updates 2018-07-19

2018-07-19 Thread Julian Wiedmann
Hi Dave, please apply one more round of qeth patches to net-next. This brings additional performance improvements for the transmit code, and some refactoring to pave the way for using netdev_priv. Also, two minor fixes for rare corner cases. Thanks, Julian Julian Wiedmann (11): s390/qeth:

[PATCH net-next 11/11] s390/qeth: speed up L2 IQD xmit

2018-07-19 Thread Julian Wiedmann
Modify the L2 OSA xmit path so that it also supports L2 IQD devices (in particular, their HW header requirements). This allows IQD devices to advertise NETIF_F_SG support, and eliminates the allocation overhead for the HW header. Signed-off-by: Julian Wiedmann ---

[PATCH net-next 01/11] s390/qeth: fix race in used-buffer accounting

2018-07-19 Thread Julian Wiedmann
By updating q->used_buffers only _after_ do_QDIO() has completed, there is a potential race against the buffer's TX completion. In the unlikely case that the TX completion path wins, qeth_qdio_output_handler() would decrement the counter before qeth_flush_buffers() even incremented it.

[PATCH net-next 03/11] s390/qeth: remove redundant netif_carrier_ok() checks

2018-07-19 Thread Julian Wiedmann
netif_carrier_off() does its own checking. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 2 +- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

RE: [net-next v3 1/5] net/tls: Do not enable zero-copy prematurely

2018-07-19 Thread Vakul Garg
Thanks for the comment. I will take this patch out of the series. > -Original Message- > From: Boris Pismenny [mailto:bor...@mellanox.com] > Sent: Thursday, July 19, 2018 3:58 PM > To: Vakul Garg ; netdev@vger.kernel.org > Cc: avia...@mellanox.com; davejwat...@fb.com; da...@davemloft.net

[net-next v5 3/3] net/tls: Remove redundant array allocation.

2018-07-19 Thread Vakul Garg
In function decrypt_skb(), array allocation in case when sgout is NULL is unnecessary. Instead, local variable sgin_arr[] can be used. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 4 1 file changed, 4 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index

[PATCH net-next 3/4] net/tc: introduce TC_ACT_MIRRED.

2018-07-19 Thread Paolo Abeni
This is similar TC_ACT_REDIRECT, but with a slightly different semantic: - on ingress the mirred skbs are passed to the target device network stack without any additional check not scrubbing. - the rcu-protected stats provided via the tcf_result struct are updated on error conditions. v1 -> v2:

[PATCH net-next 4/4] act_mirred: use ACT_MIRRED when possible

2018-07-19 Thread Paolo Abeni
When mirred is invoked from the ingress path, and it wants to redirect the processed packet, it can now use the ACT_MIRRED action, filling the tcf_result accordingly, and avoiding a per packet skb_clone(). Overall this gives a ~10% improvement in forwarding performance for the TC S/W data path

[PATCH net-next 1/4] tc/act: user space can't use TC_ACT_REDIRECT directly

2018-07-19 Thread Paolo Abeni
Only cls_bpf and act_bpf can safely use such value. If a generic action is configured by user space to return TC_ACT_REDIRECT, the usually visible behavior is passing the skb up the stack - as for unknown action, but, with complex configuration, more random results can be obtained. This patch

[PATCH net-next 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-19 Thread Paolo Abeni
Each lockless action currently does its own RCU locking in ->act(). This is allows using plain RCU accessor, even if the context is really RCU BH. This change drops the per action RCU lock, replace the accessors with _bh variant, cleans up a bit the surronding code and documents the RCU status in

[PATCH net-next 0/4] TC: refactor act_mirred packets re-injection

2018-07-19 Thread Paolo Abeni
This series is aimed at improving the act_mirred redirect performances. Such action is used by OVS to represent TC S/W flows, and it's current largest bottle-neck is the need for a skb_clone() for each packet. The first 2 patches introduce some cleanup and safeguards to allow extending

[net-next v4 0/3] net/tls: Minor code cleanup patches

2018-07-19 Thread Vakul Garg
This patch series improves tls_sw.c code by: 1) Using correct socket callback for flagging data availability. 2) Removing redundant variable assignments and wakeup callbacks. 3) Removing redundant dynamic array allocation. The patches do not fix any functional bug. Hence "Fixes:" tag has not

[net-next v4 3/3] net/tls: Remove redundant array allocation.

2018-07-19 Thread Vakul Garg
In function decrypt_skb(), array allocation in case when sgout is NULL is unnecessary. Instead, local variable sgin_arr[] can be used. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 4 1 file changed, 4 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index

[net-next v4 1/3] net/tls: Use socket data_ready callback on record availability

2018-07-19 Thread Vakul Garg
On receipt of a complete tls record, use socket's saved data_ready callback instead of state_change callback. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 7d194c0cd6cf..a58661c624ec

[net-next v4 2/3] net/tls: Remove redundant variable assignments and wakeup

2018-07-19 Thread Vakul Garg
In function decrypt_skb_update(), the assignment to tls receive context variable 'decrypted' is redundant as the same is being done in function tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as

[PATCH iproute2/next2/next 2/2] tc/flower: Add match on encapsulating tos/ttl

2018-07-19 Thread Or Gerlitz
Add matching on tos/ttl of the IP tunnel headers. For example, here's decap rule that matches on the tunnel tos: tc filter add dev vxlan_sys_4789 protocol ip parent : prio 10 flower \ enc_src_ip 192.168.10.2 enc_dst_ip 192.168.10.1 enc_key_id 100 enc_dst_port 4789 enc_tos 0x30 \

[PATCH iproute2/next 1/2] tc/act_tunnel_key: Enable setup of tos and ttl

2018-07-19 Thread Or Gerlitz
Allow to set tos and ttl for the tunnel. For example, here's encap rule that sets tos to the tunnel: tc filter add dev eth0_0 protocol ip parent : prio 10 flower \ src_mac e4:11:22:33:44:50 dst_mac e4:11:22:33:44:70 \ action tunnel_key set src_ip 192.168.10.1 dst_ip 192.168.10.2 id 100

[PATCH iproute2/next 0/2] set/match the tos/ttl fields of TC based IP tunnels

2018-07-19 Thread Or Gerlitz
Hi Dave, This series comes to address the case to set (encap) and match (decap) also the tos and ttl fields of TC based IP tunnels. Example command lines in the change log of each patch. The kernel bits are under review [1], sending this out in parallel. Or. [1]

[net-next v4 0/3] net/tls: Minor code cleanup patches

2018-07-19 Thread Vakul Garg
This patch series improves tls_sw.c code by: 1) Using correct socket callback for flagging data availability. 2) Removing redundant variable assignments and wakeup callbacks. 3) Removing redundant dynamic array allocation. The patches do not fix any functional bug. Hence "Fixes:" tag has not

[net-next v5 2/3] net/tls: Remove redundant variable assignments and wakeup

2018-07-19 Thread Vakul Garg
In function decrypt_skb_update(), the assignment to tls receive context variable 'decrypted' is redundant as the same is being done in function tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as

Re: [net 4/8] net/mlx5e: Don't allow aRFS for encapsulated packets

2018-07-19 Thread Or Gerlitz
On Thu, Jul 19, 2018 at 12:02 PM, Eran Ben Elisha wrote: > On Thu, Jul 19, 2018 at 10:50 AM, Or Gerlitz wrote: >> On Thu, Jul 19, 2018 at 9:55 AM, Eran Ben Elisha >> wrote: >>> On Thu, Jul 19, 2018 at 9:23 AM, Or Gerlitz wrote: On Thu, Jul 19, 2018 at 4:26 AM, Saeed Mahameed wrote:

[PATCH net-next 07/11] s390/qeth: use core MTU range checking

2018-07-19 Thread Julian Wiedmann
qeth's ndo_change_mtu() only applies some trivial bounds checking. Set up dev->min_mtu properly, so that dev_set_mtu() can do this for us. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 34 +-

[PATCH net-next 06/11] s390/qeth: simplify max MTU handling

2018-07-19 Thread Julian Wiedmann
When the MPC initialization code discovers the HW-specific max MTU, apply the resulting changes straight to the netdevice. If this is the device's first initialization, also set its MTU (HiperSockets: the max MTU; else: a layer-specific default value). Then cap the current MTU by the new max MTU.

[PATCH net-next 05/11] s390/qeth: don't cache HW port number

2018-07-19 Thread Julian Wiedmann
The netdevice is always available now, so get the portno from there. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 7 +++ drivers/s390/net/qeth_core_sys.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git

[PATCH net-next 02/11] s390/qeth: reset layer2 attribute on layer switch

2018-07-19 Thread Julian Wiedmann
After the subdriver's remove() routine has completed, the card's layer mode is undetermined again. Reflect this in the layer2 field. If qeth_dev_layer2_store() hits an error after remove() was called, the card _always_ requires a setup(), even if the previous layer mode is requested again. But

[PATCH net-next 08/11] s390/qeth: add statistics for consumed buffer elements

2018-07-19 Thread Julian Wiedmann
Nowadays an skb fragment typically spans over multiple pages. So replace the obsolete, SG-only 'fragments' counter with one that tracks the consumed buffer elements. This is what actually matters for performance. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 2 +-

[PATCH net-next 09/11] s390/qeth: merge linearize-check into HW header construction

2018-07-19 Thread Julian Wiedmann
When checking whether an skb needs to be linearized to fit into an IO buffer, it's desirable to consider the skb's final size and layout (ie. after the HW header was added). But a subsequent linearization can then cause the re-positioned HW header to violate its alignment restrictions. Dealing

[net-next v5 3/3] net/tls: Remove redundant array allocation.

2018-07-19 Thread Vakul Garg
In function decrypt_skb(), array allocation in case when sgout is NULL is unnecessary. Instead, local variable sgin_arr[] can be used. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 4 1 file changed, 4 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index

[net-next v5 1/3] net/tls: Use socket data_ready callback on record availability

2018-07-19 Thread Vakul Garg
On receipt of a complete tls record, use socket's saved data_ready callback instead of state_change callback. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 7d194c0cd6cf..a58661c624ec

Re: [PATCH iproute2/next 1/2] tc/act_tunnel_key: Enable setup of tos and ttl

2018-07-19 Thread Roman Mashak
Or Gerlitz writes: > Allow to set tos and ttl for the tunnel. > > For example, here's encap rule that sets tos to the tunnel: > > tc filter add dev eth0_0 protocol ip parent : prio 10 flower \ >src_mac e4:11:22:33:44:50 dst_mac e4:11:22:33:44:70 \ >action tunnel_key set src_ip

Re: [net-next v3 1/5] net/tls: Do not enable zero-copy prematurely

2018-07-19 Thread Boris Pismenny
Hi Vakul, On 7/19/2018 7:16 AM, Vakul Garg wrote: Zero-copy mode was left enabled even when zerocopy_from_iter() failed. Set the zero-copy mode only when zerocopy_from_iter() succeeds. This leads to removal of argument 'zc' of function decrypt_skb_update(). Function decrypt_skb_update() does

[net-next v5 0/3] net/tls: Minor code cleanup patches

2018-07-19 Thread Vakul Garg
This patch series improves tls_sw.c code by: 1) Using correct socket callback for flagging data availability. 2) Removing redundant variable assignments and wakeup callbacks. 3) Removing redundant dynamic array allocation. The patches do not fix any functional bug. Hence "Fixes:" tag has not

[net-next v5 1/3] net/tls: Use socket data_ready callback on record availability

2018-07-19 Thread Vakul Garg
On receipt of a complete tls record, use socket's saved data_ready callback instead of state_change callback. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 7d194c0cd6cf..a58661c624ec

[net-next v5 2/3] net/tls: Remove redundant variable assignments and wakeup

2018-07-19 Thread Vakul Garg
In function decrypt_skb_update(), the assignment to tls receive context variable 'decrypted' is redundant as the same is being done in function tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as

[PATCH net] net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv

2018-07-19 Thread Heiner Kallweit
The situation described in the comment can occur also with PHY_IGNORE_INTERRUPT, therefore change the condition to include it. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c

Re: [RFC PATCH 3/3] net: macb: add support for padding and fcs computation

2018-07-19 Thread Claudiu Beznea
On 18.07.2018 20:54, David Miller wrote: > From: Claudiu Beznea > Date: Wed, 18 Jul 2018 15:58:09 +0300 > >> >> +static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev) >> +{ >> +struct sk_buff *nskb; >> +int padlen = ETH_ZLEN - (*skb)->len; >> +int headroom =

Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink

2018-07-19 Thread Jiri Pirko
Thu, Jul 19, 2018 at 03:01:01AM CEST, sae...@mellanox.com wrote: >From: Eran Ben Elisha > >Add support for two driver parameters via devlink params interface: >- Congestion action > HW mechanism in the PCIe buffer which monitors the amount of > consumed PCIe buffer per host. This

Re: [net 4/8] net/mlx5e: Don't allow aRFS for encapsulated packets

2018-07-19 Thread Or Gerlitz
On Thu, Jul 19, 2018 at 4:26 AM, Saeed Mahameed wrote: > From: Eran Ben Elisha > > Driver is yet to support aRFS for encapsulated packets, return early > error in such case. Eran, Isn't that something which is done wrong by the arfs stack code? If the kernel has an SKB which has encap set

Re: [net 4/8] net/mlx5e: Don't allow aRFS for encapsulated packets

2018-07-19 Thread Eran Ben Elisha
On Thu, Jul 19, 2018 at 9:23 AM, Or Gerlitz wrote: > On Thu, Jul 19, 2018 at 4:26 AM, Saeed Mahameed wrote: >> From: Eran Ben Elisha >> >> Driver is yet to support aRFS for encapsulated packets, return early >> error in such case. > > > Eran, > > Isn't that something which is done wrong by the

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

2018-07-19 Thread Peter Zijlstra
On Wed, Jul 18, 2018 at 11:22:36AM -0700, Andrei Vagin wrote: > > > [1.085679] lock(cpu_hotplug_lock.rw_sem); > > > [1.085753] lock(cpu_hotplug_lock.rw_sem); > > > [1.085828] > > > [1.085828] *** DEADLOCK *** > Peter and Ingo, maybe you could explain why it isn't safe to

Re: [PATCH net 2/2] openvswitch: check for null return for nla_nest_start in datapath

2018-07-19 Thread Pravin Shelar
On Wed, Jul 18, 2018 at 9:12 AM, Stephen Hemminger wrote: > The call to nla_nest_start when forming packet messages can lead to a NULL > return so it's possible for attr to become NULL and we can potentially > get a NULL pointer dereference on attr. Fix this by checking for > a NULL return. > >

Re: [PATCH net 1/2] openvswitch: check for null return for nla_nest_start

2018-07-19 Thread Pravin Shelar
On Wed, Jul 18, 2018 at 9:12 AM, Stephen Hemminger wrote: > The call to nla_nest_start in conntrack can lead to a NULL > return so it's possible for attr to become NULL and we can potentially > get a NULL pointer dereference on attr. Fix this by checking for > a NULL return. > > Bugzilla:

Re: [net 4/8] net/mlx5e: Don't allow aRFS for encapsulated packets

2018-07-19 Thread Eran Ben Elisha
On Thu, Jul 19, 2018 at 10:50 AM, Or Gerlitz wrote: > On Thu, Jul 19, 2018 at 9:55 AM, Eran Ben Elisha > wrote: >> On Thu, Jul 19, 2018 at 9:23 AM, Or Gerlitz wrote: >>> On Thu, Jul 19, 2018 at 4:26 AM, Saeed Mahameed wrote: From: Eran Ben Elisha Driver is yet to support aRFS

Re: [net 4/8] net/mlx5e: Don't allow aRFS for encapsulated packets

2018-07-19 Thread Or Gerlitz
On Thu, Jul 19, 2018 at 9:55 AM, Eran Ben Elisha wrote: > On Thu, Jul 19, 2018 at 9:23 AM, Or Gerlitz wrote: >> On Thu, Jul 19, 2018 at 4:26 AM, Saeed Mahameed wrote: >>> From: Eran Ben Elisha >>> >>> Driver is yet to support aRFS for encapsulated packets, return early >>> error in such case.

Re: [PATCH net-next,v2] net: rename ndo_setup_tc to ndo_setup_offload

2018-07-19 Thread Martin Habets
On 19/07/18 01:11, Pablo Neira Ayuso wrote: > One of the recurring complaints is that we do not have, as a driver > writer, a central location from which we would be fed offloading rules > into a NIC. This was brought up again during Netconf'18 in Boston. > > This patch just renames ndo_setup_tc

Re: [RFC ipsec-next] xfrm: Remove xfrmi interface ID from flowi

2018-07-19 Thread Steffen Klassert
On Tue, Jul 17, 2018 at 02:40:04PM -0700, Benedict Wong wrote: > @@ -2301,6 +2322,13 @@ int __xfrm_policy_check(struct sock *sk, int dir, > struct sk_buff *skb, > int reverse; > struct flowi fl; > int xerr_idx = -1; > + const struct xfrm_if_cb *ifcb; > + struct xfrm_if

Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink

2018-07-19 Thread Eran Ben Elisha
> > This should not be num. It should be a string. Same for "mode". will fix for v2, thanks. > >

Re: [PATCH iproute2-next v4] net:sched: add action inheritdsfield to skbedit

2018-07-19 Thread David Ahern
On 7/19/18 10:07 AM, Qiaobin Fu wrote: > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->priority. This enables > later classification of packets based on the DS field. > > v4: > * Make tc use netlink helper functions > > v3: > * Make flag represented in

Re: [PATCH iproute2 net-next] devlink: Add support for devlink-region access

2018-07-19 Thread David Ahern
On 7/17/18 2:34 AM, Alex Vesker wrote: > Devlink region allows access to driver defined address regions. > Each device can create its supported address regions and register > them. A device which exposes a region will allow access to it > using devlink. > > This support allows reading and dumping

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-19 Thread Martin KaFai Lau
On Thu, Jul 19, 2018 at 05:43:11PM +0200, Daniel Borkmann wrote: > On 07/19/2018 02:11 AM, Martin KaFai Lau wrote: > > On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote: > >> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: > >>> On 07/18/2018 10:42 AM, Daniel Borkmann

Re: [PATCH net-next 4/4] act_mirred: use ACT_REDIRECT when possible

2018-07-19 Thread kbuild test robot
Hi Paolo, 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/Paolo-Abeni/TC-refactor-TC_ACT_REDIRECT-action/20180716-011055 reproduce: # apt-get install sparse make ARCH=x86_64

Re: [PATCH net] net: rollback orig value on failure of dev_qdisc_change_tx_queue_len

2018-07-19 Thread Cong Wang
On Thu, Jul 19, 2018 at 7:34 AM Tariq Toukan wrote: > > Fix dev_change_tx_queue_len so it rolls back original value > upon a failure in dev_qdisc_change_tx_queue_len. > This is already done for notifirers' failures, share the code. > > The revert of changes in dev_qdisc_change_tx_queue_len > in

[PATCH ipsec-next] xfrm: Remove xfrmi interface ID from flowi

2018-07-19 Thread Benedict Wong
In order to remove performance impact of having the extra u32 in every single flowi, this change removes the flowi_xfrm struct, prefering to take the if_id as a method parameter where needed. In the inbound direction, if_id is only needed during the __xfrm_check_policy() function, and the if_id

Re: [PATCH net-next 4/4] act_mirred: use ACT_REDIRECT when possible

2018-07-19 Thread Cong Wang
On Wed, Jul 18, 2018 at 3:05 AM Paolo Abeni wrote: > > Hi, > > On Tue, 2018-07-17 at 10:24 -0700, Cong Wang wrote: > > If you goal is to get rid of skb_clone(), why not just do the following? > > > > if (tcf_mirred_is_act_redirect(m_eaction)) { > > skb2 = skb; > >

Re: [PATCH net-next] net: phy: add GBit master / slave error detection

2018-07-19 Thread Andrew Lunn
> > AFAIR there was a patch a while ago from Mellanox guys that was possibly > > extending the link notification with an error cause, this sounds like > > something that could be useful to report to user space somehow to help > > troubleshoot link down events. > > > Do you by chance have a

Re: [PATCH net v2] bonding: pass link-local packets to bonding master also.

2018-07-19 Thread Michal Soltys
On 07/19/2018 01:41 AM, Mahesh Bandewar wrote: From: Mahesh Bandewar Commit b89f04c61efe ("bonding: deliver link-local packets with skb->dev set to link that packets arrived on") changed the behavior of how link-local-multicast packets are processed. The change in the behavior broke some

Re: [PATCH net-next] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

2018-07-19 Thread Cong Wang
On Thu, Jul 19, 2018 at 7:50 AM Tariq Toukan wrote: > --- a/net/core/dev_ioctl.c > +++ b/net/core/dev_ioctl.c > @@ -282,14 +282,7 @@ static int dev_ifsioc(struct net *net, struct ifreq > *ifr, unsigned int cmd) > return dev_mc_del_global(dev, ifr->ifr_hwaddr.sa_data); > >

Re: [PATCH RFC bpf-next] bpf: per-register parent pointers

2018-07-19 Thread Edward Cree
On 18/07/18 04:54, Alexei Starovoitov wrote: > I'd like to apply it, but I see the difference in insn_processed. > Several cilium tests show favorable difference towards new liveness approach. > selftests/bpf/test_xdp_noinline.o also shows the difference. > I'm struggling to see why this patch

[PATCH net-next] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

2018-07-19 Thread Tariq Toukan
The cited patch added a call to dev_change_tx_queue_len in SIOCSIFTXQLEN case. This obsoletes the checks done before the function call. Remove them here. Fixes: 3f76df198288 ("net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN") Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Cc:

Re: [PATCH bpf-next] bpf: show in bpftool map overview whether btf is available

2018-07-19 Thread Daniel Borkmann
On 07/18/2018 08:08 PM, Jakub Kicinski wrote: > On Wed, 18 Jul 2018 11:19:42 +0200, Daniel Borkmann wrote: >> For a quick overview in 'bpftool map' display 'btf' if it's >> available for the dump for a specific map: >> >> # bpftool map list >> 11: array flags 0x0 btf >> key 4B

Re: [PATCH net-next,v2] net: rename ndo_setup_tc to ndo_setup_offload

2018-07-19 Thread Alexander Duyck
On Wed, Jul 18, 2018 at 5:11 PM, Pablo Neira Ayuso wrote: > One of the recurring complaints is that we do not have, as a driver > writer, a central location from which we would be fed offloading rules > into a NIC. This was brought up again during Netconf'18 in Boston. > > This patch just renames

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-19 Thread Daniel Borkmann
On 07/19/2018 02:11 AM, Martin KaFai Lau wrote: > On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote: >> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote: >>> On 07/18/2018 10:42 AM, Daniel Borkmann wrote: On 07/18/2018 02:27 AM, Jakub Kicinski wrote: > On Wed, 18

[PATCH net] net: rollback orig value on failure of dev_qdisc_change_tx_queue_len

2018-07-19 Thread Tariq Toukan
Fix dev_change_tx_queue_len so it rolls back original value upon a failure in dev_qdisc_change_tx_queue_len. This is already done for notifirers' failures, share the code. The revert of changes in dev_qdisc_change_tx_queue_len in such case is needed but missing (marked as TODO), yet it is still

[PATCH iproute2-next v4] net:sched: add action inheritdsfield to skbedit

2018-07-19 Thread Qiaobin Fu
The new action inheritdsfield copies the field DS of IPv4 and IPv6 packets into skb->priority. This enables later classification of packets based on the DS field. v4: * Make tc use netlink helper functions v3: * Make flag represented in JSON output as a null value v2: * Align the output syntax

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-19 Thread Max Gurtovoy
On 7/18/2018 10:29 PM, Steve Wise wrote: On 7/18/2018 2:38 PM, Sagi Grimberg wrote: IMO we must fulfil the user wish to connect to N queues and not reduce it because of affinity overlaps. So in order to push Leon's patch we must also fix the blk_mq_rdma_map_queues to do a best effort

[PATCH bpf 0/2] BPF fix and test case

2018-07-19 Thread Daniel Borkmann
This set adds a ppc64 JIT fix for xadd as well as a missing test case for verifying whether xadd messes with src/dst reg. Thanks! Daniel Borkmann (2): bpf, ppc64: fix unexpected r0=0 exit path inside bpf_xadd bpf: test case to check whether src/dst regs got mangled by xadd

[PATCH bpf 1/2] bpf, ppc64: fix unexpected r0=0 exit path inside bpf_xadd

2018-07-19 Thread Daniel Borkmann
None of the JITs is allowed to implement exit paths from the BPF insn mappings other than BPF_JMP | BPF_EXIT. In the BPF core code we have a couple of rewrites in eBPF (e.g. LD_ABS / LD_IND) and in eBPF to cBPF translation to retain old existing behavior where exceptions may occur; they are also

[PATCH bpf 2/2] bpf: test case to check whether src/dst regs got mangled by xadd

2018-07-19 Thread Daniel Borkmann
We currently do not have such a test case in test_verifier selftests but it's important to test under bpf_jit_enable=1 to make sure JIT implementations do not mistakenly mess with src/dst reg for xadd/{w,dw}. Signed-off-by: Daniel Borkmann --- tools/testing/selftests/bpf/test_verifier.c | 40

Re: [PATCH net-next 3/4] net/tc: introduce TC_ACT_MIRRED.

2018-07-19 Thread Cong Wang
On Thu, Jul 19, 2018 at 6:03 AM Paolo Abeni wrote: > > This is similar TC_ACT_REDIRECT, but with a slightly different > semantic: > - on ingress the mirred skbs are passed to the target device > network stack without any additional check not scrubbing. > - the rcu-protected stats provided via the

[PATCH v4 net-next] net/sched: add skbprio scheduler

2018-07-19 Thread Nishanth Devarajan
net/sched: add skbprio scheduer Skbprio (SKB Priority Queue) is a queueing discipline that prioritizes packets according to their skb->priority field. Under congestion, already-enqueued lower priority packets will be dropped to make space available for higher priority packets. Skbprio was

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-19 Thread Cong Wang
(Sorry for missing this email, it is lost in other discussions.) On Wed, Jul 11, 2018 at 8:25 AM Michel Machado wrote: > > On 07/10/2018 10:57 PM, Cong Wang wrote: > > The dev->tx_queue_len is fundamentally non-sense since now > > almost every real NIC is multi-queue and qdisc has a completely >

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-19 Thread Steve Wise
On 7/19/2018 9:50 AM, Max Gurtovoy wrote: > > > On 7/18/2018 10:29 PM, Steve Wise wrote: >> >>> >>> On 7/18/2018 2:38 PM, Sagi Grimberg wrote: >> IMO we must fulfil the user wish to connect to N queues and not >> reduce >> it because of affinity overlaps. So in order to push

Re: [PATCH net-next 3/4] net/tc: introduce TC_ACT_MIRRED.

2018-07-19 Thread Jiri Pirko
Thu, Jul 19, 2018 at 03:02:28PM CEST, pab...@redhat.com wrote: >This is similar TC_ACT_REDIRECT, but with a slightly different >semantic: >- on ingress the mirred skbs are passed to the target device >network stack without any additional check not scrubbing. >- the rcu-protected stats provided via

Re: [PATCH v4 net-next] net/sched: add skbprio scheduler

2018-07-19 Thread Cong Wang
On Thu, Jul 19, 2018 at 11:23 AM Nishanth Devarajan wrote: > +static int skbprio_change(struct Qdisc *sch, struct nlattr *opt, > + struct netlink_ext_ack *extack) > +{ > + struct skbprio_sched_data *q = qdisc_priv(sch); > + struct tc_skbprio_qopt *ctl =

[PATCH net] net/ipv6: Fix linklocal to global address with VRF

2018-07-19 Thread dsahern
From: David Ahern Example setup: host: ip -6 addr add dev eth1 2001:db8:104::4 where eth1 is enslaved to a VRF switch: ip -6 ro add 2001:db8:104::4/128 dev br1 where br1 only has an LLA ping6 2001:db8:104::4 ssh 2001:db8:104::4 (NOTE: UDP

Re: [PATCH iproute2/next 1/2] tc/act_tunnel_key: Enable setup of tos and ttl

2018-07-19 Thread Or Gerlitz
On Thu, Jul 19, 2018 at 2:48 PM, Roman Mashak wrote: > Or Gerlitz writes: > >> Allow to set tos and ttl for the tunnel. >> >> For example, here's encap rule that sets tos to the tunnel: >> >> tc filter add dev eth0_0 protocol ip parent : prio 10 flower \ >>src_mac e4:11:22:33:44:50

Re: [PATCH net-next,v2] net: rename ndo_setup_tc to ndo_setup_offload

2018-07-19 Thread Pablo Neira Ayuso
On Thu, Jul 19, 2018 at 08:18:20AM -0700, Alexander Duyck wrote: > On Wed, Jul 18, 2018 at 5:11 PM, Pablo Neira Ayuso > wrote: > > One of the recurring complaints is that we do not have, as a driver > > writer, a central location from which we would be fed offloading rules > > into a NIC. This

Re: [PATCH net-next,v2] net: rename ndo_setup_tc to ndo_setup_offload

2018-07-19 Thread Alexander Duyck
On Thu, Jul 19, 2018 at 1:52 PM, Pablo Neira Ayuso wrote: > On Thu, Jul 19, 2018 at 08:18:20AM -0700, Alexander Duyck wrote: >> On Wed, Jul 18, 2018 at 5:11 PM, Pablo Neira Ayuso >> wrote: >> > One of the recurring complaints is that we do not have, as a driver >> > writer, a central location

Re: [PATCH net-next] net: phy: add GBit master / slave error detection

2018-07-19 Thread Heiner Kallweit
On 19.07.2018 16:46, Andrew Lunn wrote: >>> AFAIR there was a patch a while ago from Mellanox guys that was possibly >>> extending the link notification with an error cause, this sounds like >>> something that could be useful to report to user space somehow to help >>> troubleshoot link down

Re: [PATCH net] net/xdp: Fix suspicious RCU usage warning

2018-07-19 Thread Alexei Starovoitov
On Wed, Jul 18, 2018 at 05:13:54PM +0300, Tariq Toukan wrote: > > > On 17/07/2018 10:27 PM, Daniel Borkmann wrote: > > On 07/17/2018 06:47 PM, Alexei Starovoitov wrote: > > > On Tue, Jul 17, 2018 at 06:10:38PM +0300, Tariq Toukan wrote: > > > > Fix the warning below by calling rhashtable_lookup

Re: [PATCH net-next] net: phy: add GBit master / slave error detection

2018-07-19 Thread Andrew Lunn
On Thu, Jul 19, 2018 at 11:11:53PM +0200, Heiner Kallweit wrote: > On 19.07.2018 16:46, Andrew Lunn wrote: > >>> AFAIR there was a patch a while ago from Mellanox guys that was possibly > >>> extending the link notification with an error cause, this sounds like > >>> something that could be useful