Re: pull-request: bpf-next 2018-07-20

2018-07-20 Thread David Miller
From: Daniel Borkmann Date: Sat, 21 Jul 2018 00:01:10 +0200 > The following pull-request contains BPF updates for your *net-next* tree. > > The main changes are: > > 1) Add sharing of BPF objects within one ASIC: this allows for reuse of >the same program on multiple ports of a device, and

Re: pull-request: bpf 2018-07-20

2018-07-20 Thread David Miller
From: Daniel Borkmann Date: Fri, 20 Jul 2018 23:24:43 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix in BPF Makefile to detect llvm-objcopy in a more robust way which is >needed for pahole's BTF converter and minor UAPI twea

[PATCH] net: Init backlog NAPI's gro_hash.

2018-07-20 Thread David Miller
Based upon a patch by Sean Tranchetti. Fixes: d4546c2509b1 ("net: Convert GRO SKB handling to list_head.") Signed-off-by: David S. Miller --- net/core/dev.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 4f8b92d81d1

Re: [PATCH net-next] net: gro: Initialize backlog NAPI's gro_list

2018-07-20 Thread David Miller
From: Sean Tranchetti Date: Fri, 20 Jul 2018 17:53:23 -0600 > @@ -9556,6 +9556,7 @@ static int __init net_dev_init(void) > > sd->backlog.poll = process_backlog; > sd->backlog.weight = weight_p; > + INIT_LIST_HEAD(&sd->backlog.gro_list); > } > >

[PATCH net-next 2/2] nfp: avoid buffer leak when FW communication fails

2018-07-20 Thread Jakub Kicinski
After device is stopped we reset the rings by moving all free buffers to positions [0, cnt - 2], and clear the position cnt - 1 in the ring. We then proceed to clear the read/write pointers. This means that if we try to reset the ring again the code will assume that the next to fill buffer is at p

[PATCH net-next 1/2] nfp: bring back support for offloading shared blocks

2018-07-20 Thread Jakub Kicinski
Now that we have offload replay infrastructure added by commit 326367427cc0 ("net: sched: call reoffload op on block callback reg") and flows are guaranteed to be removed correctly, we can revert commit 951a8ee6def3 ("nfp: reject binding to shared blocks"). Signed-off-by: Jakub Kicinski Reviewed-

[PATCH net] nfp: flower: ensure dead neighbour entries are not offloaded

2018-07-20 Thread Jakub Kicinski
From: John Hurley Previously only the neighbour state was checked to decide if an offloaded entry should be removed. However, there can be situations when the entry is dead but still marked as valid. This can lead to dead entries not being removed from fw tables or even incorrect data being added

[PATCH bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-20 Thread Martin KaFai Lau
This patch introduces BPF_ANNOTATE_KV_PAIR to signal the bpf loader about the btf key_type and value_type of a bpf map. Please refer to the changes in test_btf_haskv.c for its usage. Both iproute2 and libbpf loader will then have the same convention to find out the map's btf_key_type_id and btf_val

[PATCH bpf 2/3] bpf: Replace [u]int32_t and [u]int64_t in libbpf

2018-07-20 Thread Martin KaFai Lau
This patch replaces [u]int32_t and [u]int64_t usage with __[su]32 and __[su]64. The same change goes for [u]int16_t and [u]int8_t. Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf") Signed-off-by: Martin KaFai Lau --- tools/lib/bpf/btf.c| 28 +--- tools/lib/

[PATCH bpf 1/3] bpf: btf: Sync uapi btf.h to tools

2018-07-20 Thread Martin KaFai Lau
This patch sync the uapi btf.h to tools/ Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/btf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/

[PATCH bpf 0/3] Introduce BPF_ANNOTATE_KV_PAIR

2018-07-20 Thread Martin KaFai Lau
The series allows the BPF loader to figure out the btf_key_id and btf_value_id from a map's name by using BPF_ANNOTATE_KV_PAIR. It also removes the old 'typedef' way which requires two separate typedefs (one for the key and one for the value). By doing this, iproute2 and libbpf have one consisten

[PATCH bpf] bpf: btf: Ensure the member->offset is in the right order

2018-07-20 Thread Martin KaFai Lau
This patch ensures the member->offset of a struct is in the correct order (i.e the later member's offset cannot go backward). The current "pahole -J" BTF encoder does not generate something like this. However, checking this can ensure future encoder will not violate this. Fixes: 69b693f0aefa ("b

[PATCH net-next] net: gro: Initialize backlog NAPI's gro_list

2018-07-20 Thread Sean Tranchetti
When using RPS, the target CPU uses the backlog NAPI struct. This NAPI struct needs the list initialized explicitly as normally the list is initialized from netif_napi_add() on the netdevice. Unable to handle kernel NULL pointer dereference at virtual address 0008 Kernel BUG at ff980890931

Re: [PATCH net 0/4] vxlan: fix default fdb entry user-space notify ordering/race

2018-07-20 Thread Roopa Prabhu
On Fri, Jul 20, 2018 at 1:21 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > Problem: > In vxlan_newlink, a default fdb entry is added before register_netdev. > The default fdb creation function notifies user-space of the > fdb entry on the vxlan device which user-space does not know about yet.

Re: [**EXTERNAL**] Re: DNAT with VRF support in Linux Kernel

2018-07-20 Thread D'Souza, Nelson
Hi David, Assuming your setup is as follows: eth (ingress interface) --> br0 (bridge) --> mgmt (vrf) is it possible that the DNAT rule matches on the eth ingress interface and not the mgmt. vrf device? If the LOG rule does not match with dev == mgmt, it seems like the DNAT rule with dev ==mgm

pull-request: bpf-next 2018-07-20

2018-07-20 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add sharing of BPF objects within one ASIC: this allows for reuse of the same program on multiple ports of a device, and therefore gains better code store utilization. On top of tha

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-20 Thread D'Souza, Nelson
The Linux kernel has kernel patches applied beyond 4.14.52 but aside from that it has no custom changes. Currently don't have perf on the linux system, so will have to get back to you with the perf traces. Meanwhile, here's the ip outputs you requested. root@x10sdv-4c-tln4f:~# ip rule ls 0:

Re: [PATCH net] tls: check RCV_SHUTDOWN in tls_wait_data

2018-07-20 Thread David Miller
From: Doron Roberts-Kedes Date: Wed, 18 Jul 2018 16:22:27 -0700 > The current code does not check sk->sk_shutdown & RCV_SHUTDOWN. > tls_sw_recvmsg may return a positive value in the case where bytes have > already been copied when the socket is shutdown. sk->sk_err has been > cleared, causing the

Re: [PATCH net 0/3] fix DCTCP ECE Ack series

2018-07-20 Thread David Miller
From: Yuchung Cheng Date: Wed, 18 Jul 2018 13:56:33 -0700 > This patch set address that the existing DCTCP implementation does not > fully implement the ACK policy specified in the RFC. This improves > the responsiveness of CE status change particularly on flows with > small inflight. Series app

pull-request: bpf 2018-07-20

2018-07-20 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix in BPF Makefile to detect llvm-objcopy in a more robust way which is needed for pahole's BTF converter and minor UAPI tweaks in BTF_INT_BITS() to shrink the mask before eventual UAPI

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

2018-07-20 Thread Heiner Kallweit
On 20.07.2018 11:36, Florian Fainelli wrote: > > > On 07/18/2018 11:15 PM, Heiner Kallweit wrote: >> The situation described in the comment can occur also with >> PHY_IGNORE_INTERRUPT, therefore change the condition to include it. > > Yes indeed! You might want to locate the offending commit to

[PATCH net 2/4] vxlan: add new fdb alloc and create helpers

2018-07-20 Thread Roopa Prabhu
From: Roopa Prabhu - Add new vxlan_fdb_alloc helper - rename existing vxlan_fdb_create into vxlan_fdb_update: because it really creates or updates an existing fdb entry - move new fdb creation into a separate vxlan_fdb_create Main motivation for this change is to introduce the ab

[PATCH net 4/4] vxlan: fix default fdb entry netlink notify ordering during netdev create

2018-07-20 Thread Roopa Prabhu
From: Roopa Prabhu Problem: In vxlan_newlink, a default fdb entry is added before register_netdev. The default fdb creation function also notifies user-space of the fdb entry on the vxlan device which user-space does not know about yet. (RTM_NEWNEIGH goes before RTM_NEWLINK for the same ifindex).

[PATCH net 1/4] rtnetlink: add rtnl_link_state check in rtnl_configure_link

2018-07-20 Thread Roopa Prabhu
From: Roopa Prabhu rtnl_configure_link sets dev->rtnl_link_state to RTNL_LINK_INITIALIZED and unconditionally calls __dev_notify_flags to notify user-space of dev flags. current call sequence for rtnl_configure_link rtnetlink_newlink rtnl_link_ops->newlink rtnl_configure_link (unconditio

[PATCH net 3/4] vxlan: make netlink notify in vxlan_fdb_destroy optional

2018-07-20 Thread Roopa Prabhu
From: Roopa Prabhu Add a new option do_notify to vxlan_fdb_destroy to make sending netlink notify optional. Used by a later patch. Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/vxlan.c b/driver

[PATCH net 0/4] vxlan: fix default fdb entry user-space notify ordering/race

2018-07-20 Thread Roopa Prabhu
From: Roopa Prabhu Problem: In vxlan_newlink, a default fdb entry is added before register_netdev. The default fdb creation function notifies user-space of the fdb entry on the vxlan device which user-space does not know about yet. (RTM_NEWNEIGH goes before RTM_NEWLINK for the same ifindex). Thi

Re: [PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-20 Thread Jakub Kicinski
On Fri, 20 Jul 2018 10:18:21 -0700, Martin KaFai Lau wrote: > On Sat, Jul 21, 2018 at 01:04:45AM +0900, Taehee Yoo wrote: > > rhashtable_lookup() can return NULL. so that NULL pointer > > check routine should be added. > > > > Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") > > Signed-off-by:

Re: [PATCH net 0/2] openvswitch tests for nla_nest_start

2018-07-20 Thread David Miller
From: David Miller Date: Fri, 20 Jul 2018 12:15:36 -0700 (PDT) > From: Stephen Hemminger > Date: Wed, 18 Jul 2018 09:12:14 -0700 > >> Coverity is looking for bugs here, and a couple of new bugzilla >> reports showed up where nla_nest_start return is not checked >> for NULL. > > Series applied

Re: [PATCH net 0/2] openvswitch tests for nla_nest_start

2018-07-20 Thread David Miller
From: Stephen Hemminger Date: Wed, 18 Jul 2018 09:12:14 -0700 > Coverity is looking for bugs here, and a couple of new bugzilla > reports showed up where nla_nest_start return is not checked > for NULL. Series applied and patch #2 queued up for -stable, thanks Stephen.

Re: VRF with enslaved L3 enabled bridge

2018-07-20 Thread David Ahern
On 7/20/18 1:03 PM, D'Souza, Nelson wrote: > Hi Dave, > > It is good to know that this works in your case. However, I'm not able to > pinpoint what the issue is and looking for a way to narrow down to the root > cause. > Do you know if this has been an issue in the past and resolved in Linux >

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

2018-07-20 Thread David Miller
From: Daniel Borkmann Date: Fri, 20 Jul 2018 19:28:23 +0200 > This might be fine as new ndo depending on the use case this will have (?), > but fwiw the term 'flow' or 'rule' would be misleading for what tc offload > would be doing today (e.g. to name one, there's no notion of 'flow' in BPF > off

Deck of Mr. Reyan Roger.

2018-07-20 Thread Mr Ryan Roger
Attention: Beneficiary, Due to the Federal Government new Policy to fight corruption. I want to bring to your Notice that the President of the Federal Republic of Nigeria, Muhammadu Buhari, has Mandated that all the Overdue Foreign Payment should be Paid to the Beneficiary. We are very sorry fo

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-20 Thread D'Souza, Nelson
Hi Dave, It is good to know that this works in your case. However, I'm not able to pinpoint what the issue is and looking for a way to narrow down to the root cause. Do you know if this has been an issue in the past and resolved in Linux kernel versions after 4.14.52? I have the same setup as

[PATCH net-next] tls: Skip zerocopy path for ITER_KVEC

2018-07-20 Thread Doron Roberts-Kedes
The zerocopy path ultimately calls iov_iter_get_pages, which defines the step function for ITER_KVECs as simply, return -EFAULT. Taking the non-zerocopy path for ITER_KVECs avoids the unnecessary fallback. See https://lore.kernel.org/lkml/20150401023311.gl29...@zeniv.linux.org.uk/T/#u for a discu

Re: [PATCH net] atl1c: reserve min skb headroom

2018-07-20 Thread Eric Dumazet
On 07/20/2018 10:30 AM, Florian Westphal wrote: > Got crash report with following backtrace: > BUG: unable to handle kernel paging request at 8801869daffe > RIP: 0010:[] [] > ip6_finish_output2+0x394/0x4c0 > RSP: 0018:880186c83a98 EFLAGS: 00010283 > RAX: 8801869db00e ... > [] ip

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-20 Thread Eric Dumazet
On Fri, Jul 20, 2018 at 10:32 AM Paolo Abeni wrote: > Thank you for the feedback. I must admit this quite in the opposite > direction of what I have attempted so far. I'll try that. > Thanks. > Still for ipv6 it will require a litte more work inside fq_codel. IPv6 packets would use nf_ct_frag6_g

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-20 Thread Paolo Abeni
On Fri, 2018-07-20 at 08:58 -0700, Eric Dumazet wrote: > On Fri, Jul 20, 2018 at 7:48 AM Paolo Abeni wrote: > > > > Hi, > > > > On Mon, 2018-07-09 at 05:50 -0700, Eric Dumazet wrote: > > > On 07/09/2018 04:39 AM, Eric Dumazet wrote: > > > > > > > Alternatively, you could try to patch fq_codel t

[PATCH net] atl1c: reserve min skb headroom

2018-07-20 Thread Florian Westphal
Got crash report with following backtrace: BUG: unable to handle kernel paging request at 8801869daffe RIP: 0010:[] [] ip6_finish_output2+0x394/0x4c0 RSP: 0018:880186c83a98 EFLAGS: 00010283 RAX: 8801869db00e ... [] ip6_finish_output+0x8c/0xf0 [] ip6_output+0x57/0x100 [] ip6_for

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

2018-07-20 Thread Daniel Borkmann
On 07/20/2018 04:37 PM, Roopa Prabhu 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 was brought up again durin

Re: [PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-20 Thread Martin KaFai Lau
On Sat, Jul 21, 2018 at 01:04:45AM +0900, Taehee Yoo wrote: > rhashtable_lookup() can return NULL. so that NULL pointer > check routine should be added. > > Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") > Signed-off-by: Taehee Yoo > --- > net/core/xdp.c | 3 ++- > 1 file changed, 2 inserti

[PATCH iproute2] devlink: CTRL_ATTR_FAMILY_ID is a u16

2018-07-20 Thread dsahern
From: David Ahern CTRL_ATTR_FAMILY_ID is a u16, not a u32. Update devlink accordingly. Fixes: a3c4b484a1edd ("add devlink tool") Signed-off-by: David Ahern --- devlink/mnlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlink/mnlg.c b/devlink/mnlg.c index c33c90be4414.

[PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-20 Thread Taehee Yoo
rhashtable_lookup() can return NULL. so that NULL pointer check routine should be added. Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") Signed-off-by: Taehee Yoo --- net/core/xdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/xdp.c b/net/core/xdp.c index 9d

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

2018-07-20 Thread David Ahern
On 7/19/18 5:02 AM, Or Gerlitz wrote: > 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

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-20 Thread Eric Dumazet
On Fri, Jul 20, 2018 at 7:48 AM Paolo Abeni wrote: > > Hi, > > On Mon, 2018-07-09 at 05:50 -0700, Eric Dumazet wrote: > > On 07/09/2018 04:39 AM, Eric Dumazet wrote: > > > > > Alternatively, you could try to patch fq_codel to drop all frags of one > > > UDP datagram > > > instead of few of them.

Re: [RFC PATCH] ip: re-introduce fragments cache worker

2018-07-20 Thread Paolo Abeni
Hi, On Mon, 2018-07-09 at 05:50 -0700, Eric Dumazet wrote: > On 07/09/2018 04:39 AM, Eric Dumazet wrote: > > > Alternatively, you could try to patch fq_codel to drop all frags of one UDP > > datagram > > instead of few of them. > > A first step would be to make sure fq_codel_hash() (using skb_g

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

2018-07-20 Thread Alexander Duyck
On Fri, Jul 20, 2018 at 3:09 AM, Pablo Neira Ayuso wrote: > On Thu, Jul 19, 2018 at 02:04:16PM -0700, Alexander Duyck wrote: >> 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

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

2018-07-20 Thread Roopa Prabhu
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 net-next,v2] net: rename ndo_setup_tc to ndo_setup_offload

2018-07-20 Thread Florian Fainelli
On 07/18/2018 05: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 ndo_se

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

2018-07-20 Thread Paolo Abeni
On Thu, 2018-07-19 at 10:56 -0700, Cong Wang wrote: > 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_a

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

2018-07-20 Thread Pablo Neira Ayuso
On Thu, Jul 19, 2018 at 02:04:16PM -0700, Alexander Duyck wrote: > 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 com

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

2018-07-20 Thread Paolo Abeni
Hi, Jiri, Cong, thank you for the feedback. Please allow me to give a single reply to both of you, as you rised similar concers. On Thu, 2018-07-19 at 11:07 -0700, Cong Wang wrote: > On Thu, Jul 19, 2018 at 6:03 AM Paolo Abeni wrote: > > > > This is similar TC_ACT_REDIRECT, but with a slightly

[PATCH] net: dsa: mv88e6xxx: fix races between lock and irq freeing

2018-07-20 Thread Uwe Kleine-König
free_irq() waits until all handlers for this IRQ have completed. As the relevant handler (mv88e6xxx_g1_irq_thread_fn()) takes the chip's reg_lock it might never return if the thread calling free_irq() holds this lock. For the same reason kthread_cancel_delayed_work_sync() in the polling case must

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

2018-07-20 Thread Florian Fainelli
On 07/18/2018 11:15 PM, Heiner Kallweit wrote: > The situation described in the comment can occur also with > PHY_IGNORE_INTERRUPT, therefore change the condition to include it. Yes indeed! You might want to locate the offending commit to provide a fixes tag so this could be backported to stabl

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

2018-07-20 Thread Florian Fainelli
On 07/19/2018 03:25 PM, Andrew Lunn wrote: >> 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 be

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

2018-07-20 Thread Daniel Borkmann
On 07/20/2018 07:14 AM, Martin KaFai Lau wrote: > 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 inst

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

2018-07-20 Thread Daniel Borkmann
On 07/20/2018 07:34 AM, Martin KaFai Lau wrote: > 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" whi