Re: [PATCH bpf-next 1/3] bpf: support cloning sk storage on accept()

2019-08-08 Thread Martin Lau
On Wed, Aug 07, 2019 at 05:05:33PM -0700, Stanislav Fomichev wrote: [ ... ] > > > +int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) > > > +{ > > > + struct bpf_sk_storage *new_sk_storage = NULL; > > > + struct bpf_sk_storage *sk_storage; > > > + struct bpf_sk_storage_elem *selem;

Re: [v3,1/4] tools: bpftool: add net attach command to attach XDP on interface

2019-08-08 Thread Daniel T. Lee
On Thu, Aug 8, 2019 at 5:42 AM Jakub Kicinski wrote: > > On Wed, 7 Aug 2019 11:25:06 +0900, Daniel T. Lee wrote: > > By this commit, using `bpftool net attach`, user can attach XDP prog on > > interface. New type of enum 'net_attach_type' has been made, as stated at > > cover-letter, the meaning

RE: Clause 73 and USXGMII

2019-08-08 Thread Jose Abreu
++ PHY Experts From: Jose Abreu Date: Aug/07/2019, 16:46:23 (UTC+00:00) > Hello, > > I've some sample code for Clause 73 support using Synopsys based XPCS > but I would like to clarify some things that I noticed. > > I'm using USXGMII as interface and a single SERDES that operates at 10G > r

Re: Clause 73 and USXGMII

2019-08-08 Thread Russell King - ARM Linux admin
Hi, Have you tried enabling debug mode in phylink (add #define DEBUG at the top of the file) ? Thanks. On Thu, Aug 08, 2019 at 08:17:29AM +, Jose Abreu wrote: > ++ PHY Experts > > From: Jose Abreu > Date: Aug/07/2019, 16:46:23 (UTC+00:00) > > > Hello, > > > > I've some sample code for Cl

Re: net: micrel: confusion about phyids used in driver

2019-08-08 Thread Uwe Kleine-König
Hello, On Tue, Jul 02, 2019 at 08:55:07PM +, yuiko.osh...@microchip.com wrote: > >On Fri, May 10, 2019 at 09:22:43AM +0200, Uwe Kleine-König wrote: > >> On Thu, May 09, 2019 at 11:07:45PM +0200, Andrew Lunn wrote: > >> > On Thu, May 09, 2019 at 10:55:29PM +0200, Heiner Kallweit wrote: > >> > >

[PATCH mlx5-next 1/4] net/mlx5: Use debug message instead of warn

2019-08-08 Thread Leon Romanovsky
From: Yishai Hadas As QP may be created by DEVX, it may be valid to not find the rsn in mlx5 core tree, change the level to be debug. Signed-off-by: Yishai Hadas Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 +- 1 file changed

[PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface

2019-08-08 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This small series extends DEVX interface with SRQ and XRQ legacy commands. Thanks Yishai Hadas (4): net/mlx5: Use debug message instead of warn net/mlx5: Add XRQ legacy commands opcodes IB/mlx5: Add legacy events to DEVX list IB/mlx5: Expose XRQ legacy command

[PATCH mlx5-next 2/4] net/mlx5: Add XRQ legacy commands opcodes

2019-08-08 Thread Leon Romanovsky
From: Yishai Hadas Add XRQ legacy commands opcodes, will be used via the DEVX interface. Signed-off-by: Yishai Hadas Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 include/linux/mlx5/mlx5_ifc.h | 2 ++ 2

[PATCH mlx5-next 3/4] IB/mlx5: Add legacy events to DEVX list

2019-08-08 Thread Leon Romanovsky
From: Yishai Hadas Add two events that were defined in the device specification but were not exposed in the driver list. Post this patch those events can be read over the DEVX events interface once be reported by the firmware. Signed-off-by: Yishai Hadas Reviewed-by: Edward Srouji Signed-off-

[PATCH rdma-next 4/4] IB/mlx5: Expose XRQ legacy commands over the DEVX interface

2019-08-08 Thread Leon Romanovsky
From: Yishai Hadas Expose missing XRQ legacy commands over the DEVX interface. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/ml

RE: Clause 73 and USXGMII

2019-08-08 Thread Jose Abreu
From: Russell King - ARM Linux admin Date: Aug/08/2019, 09:26:26 (UTC+00:00) > Hi, > > Have you tried enabling debug mode in phylink (add #define DEBUG at the > top of the file) ? Yes: [ With > 2.5G modes removed ] # dmesg | grep -i phy libphy: stmmac: probed stmmaceth :04:00.0 enp4s0: PHY

Re: Clause 73 and USXGMII

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 09:02:57AM +, Jose Abreu wrote: > From: Russell King - ARM Linux admin > Date: Aug/08/2019, 09:26:26 (UTC+00:00) > > > Hi, > > > > Have you tried enabling debug mode in phylink (add #define DEBUG at the > > top of the file) ? > > Yes: > > [ With > 2.5G modes removed

Re: [bpf-next PATCH 0/3] bpf: improvements to xdp_fwd sample

2019-08-08 Thread Jesper Dangaard Brouer
On Wed, 7 Aug 2019 15:09:09 -0700 Zvi Effron wrote: > On Wed, Aug 7, 2019 at 6:00 AM Jesper Dangaard Brouer > wrote: > > > > Toke's devmap lookup improvement is first avail in kernel v5.3. > > Thus, not part of XDP-tutorial yet. > > > I probably missed this in an earlier email, but what are T

[PATCH] pcan_usb_fd: zero out the common command buffer

2019-08-08 Thread Oliver Neukum
Lest we leak kernel memory to a device we better zero out buffers. Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum --- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/us

[PATCH] zd1211rw: remove false assertion from zd_mac_clear()

2019-08-08 Thread Oliver Neukum
The function is called before the lock which is asserted was ever used. Just remove it. Reported-by: syzbot+74c65761783d66a9c...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum --- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/

[PATCH net 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Daniel Borkmann
Generating and retrieving socket cookies are a useful feature that is exposed to BPF for various program types through bpf_get_socket_cookie() helper. The fact that the cookie counter is per netns is quite a limitation for BPF in practice in particular for programs in host namespace that use socke

[PATCH net 2/2] bpf: sync bpf.h to tools infrastructure

2019-08-08 Thread Daniel Borkmann
Pull in updates in BPF helper function description. Signed-off-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 4e455018da65..a5aa7d3ac6a1 1

[PATCH net 0/2] Fix collisions in socket cookie generation

2019-08-08 Thread Daniel Borkmann
This change makes the socket cookie generator as a global counter instead of per netns in order to fix cookie collisions for BPF use cases we ran into. See main patch #1 for more details. Given the change is small/trivial and fixes an issue we're seeing my preference would be net tree (though it c

Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface

2019-08-08 Thread Leon Romanovsky
On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > This small series extends DEVX interface with SRQ and XRQ legacy commands. Sorry for typo in cover letter, there is no SRQ here. Thanks > > Thanks > > Yishai Hadas (4): > net/mlx5: Use debug m

Re: [PATCH net 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Eric Dumazet
On Thu, Aug 8, 2019 at 11:50 AM Daniel Borkmann wrote: > > Socket cookie consumers must assume the value as opqaue in any case. > The cookie does not guarantee an always unique identifier since it > could wrap in fabricated corner cases where two sockets could end up > holding the same cookie, W

Re: [PATCH bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Jiri Olsa
On Wed, Aug 07, 2019 at 11:38:21AM -0700, Andrii Nakryiko wrote: > Make .BTF section allocated and expose its contents through sysfs. > > /sys/kernel/btf directory is created to contain all the BTFs present > inside kernel. Currently there is only kernel's main BTF, represented as > /sys/kernel/bt

Re: [PATCH bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Jiri Olsa
On Thu, Aug 08, 2019 at 12:56:01PM +0200, Jiri Olsa wrote: > On Wed, Aug 07, 2019 at 11:38:21AM -0700, Andrii Nakryiko wrote: > > Make .BTF section allocated and expose its contents through sysfs. > > > > /sys/kernel/btf directory is created to contain all the BTFs present > > inside kernel. Curre

Re: [PATCH net 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Daniel Borkmann
On 8/8/19 12:45 PM, Eric Dumazet wrote: On Thu, Aug 8, 2019 at 11:50 AM Daniel Borkmann wrote: Socket cookie consumers must assume the value as opqaue in any case. The cookie does not guarantee an always unique identifier since it could wrap in fabricated corner cases where two sockets could e

Re: [PATCH net-next v1 1/8] netfilter: inlined four headers files into another one.

2019-08-08 Thread Pablo Neira Ayuso
Hi Jeremy, Thanks for working on this. Cc'ing Jozsef. On Wed, Aug 07, 2019 at 03:16:58PM +0100, Jeremy Sowden wrote: [...] > +/* Called from uadd only, protected by the set spinlock. > + * The kadt functions don't use the comment extensions in any way. > + */ > +static inline void > +ip_set_init

Re: [PATCH net 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Eric Dumazet
On Thu, Aug 8, 2019 at 1:09 PM Daniel Borkmann wrote: > > On 8/8/19 12:45 PM, Eric Dumazet wrote: > > On Thu, Aug 8, 2019 at 11:50 AM Daniel Borkmann > > wrote: > > > >> Socket cookie consumers must assume the value as opqaue in any case. > >> The cookie does not guarantee an always unique ident

Re: [PATCH net 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Daniel Borkmann
On 8/8/19 1:37 PM, Eric Dumazet wrote: On Thu, Aug 8, 2019 at 1:09 PM Daniel Borkmann wrote: On 8/8/19 12:45 PM, Eric Dumazet wrote: On Thu, Aug 8, 2019 at 11:50 AM Daniel Borkmann wrote: Socket cookie consumers must assume the value as opqaue in any case. The cookie does not guarantee an a

RE: Clause 73 and USXGMII

2019-08-08 Thread Jose Abreu
From: Russell King - ARM Linux admin Date: Aug/08/2019, 10:23:13 (UTC+00:00) > On Thu, Aug 08, 2019 at 09:02:57AM +, Jose Abreu wrote: > > From: Russell King - ARM Linux admin > > Date: Aug/08/2019, 09:26:26 (UTC+00:00) > > > > > Hi, > > > > > > Have you tried enabling debug mode in phylin

[PATCH net v2 1/2] sock: make cookie generation global instead of per netns

2019-08-08 Thread Daniel Borkmann
Generating and retrieving socket cookies are a useful feature that is exposed to BPF for various program types through bpf_get_socket_cookie() helper. The fact that the cookie counter is per netns is quite a limitation for BPF in practice in particular for programs in host namespace that use socke

[PATCH net v2 0/2] Fix collisions in socket cookie generation

2019-08-08 Thread Daniel Borkmann
This change makes the socket cookie generator as a global counter instead of per netns in order to fix cookie collisions for BPF use cases we ran into. See main patch #1 for more details. Given the change is small/trivial and fixes an issue we're seeing my preference would be net tree (though it c

Re: [PATCH v2 2/2] tcp: Update TCP_BASE_MSS comment

2019-08-08 Thread Neal Cardwell
On Thu, Aug 8, 2019 at 2:13 AM Eric Dumazet wrote: > On 8/8/19 1:52 AM, Josh Hunt wrote: > > TCP_BASE_MSS is used as the default initial MSS value when MTU probing is > > enabled. Update the comment to reflect this. > > > > Suggested-by: Neal Cardwell > > Signed-off-by: Josh Hunt > > --- > > Sig

Re: [PATCH v2 1/2] tcp: add new tcp_mtu_probe_floor sysctl

2019-08-08 Thread Neal Cardwell
On Wed, Aug 7, 2019 at 7:55 PM Josh Hunt wrote: > > The current implementation of TCP MTU probing can considerably > underestimate the MTU on lossy connections allowing the MSS to get down to > 48. We have found that in almost all of these cases on our networks these > paths can handle much larger

Re: Clause 73 and USXGMII

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 11:45:29AM +, Jose Abreu wrote: > From: Russell King - ARM Linux admin > Date: Aug/08/2019, 10:23:13 (UTC+00:00) > > > On Thu, Aug 08, 2019 at 09:02:57AM +, Jose Abreu wrote: > > > From: Russell King - ARM Linux admin > > > Date: Aug/08/2019, 09:26:26 (UTC+00:00)

[PATCH net v2 2/2] bpf: sync bpf.h to tools infrastructure

2019-08-08 Thread Daniel Borkmann
Pull in updates in BPF helper function description. Signed-off-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 4e455018da65..a5aa7d3ac6a1 1

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-08 Thread Holger Hoffstätte
Hello Heiner - On 7/28/19 11:25 AM, Heiner Kallweit wrote: There was a previous attempt to use xmit_more, but the change had to be reverted because under load sometimes a transmit timeout occurred [0]. Maybe this was caused by a missing memory barrier, the new attempt keeps the memory barrier

Re: [PATCH v2 1/2] tcp: add new tcp_mtu_probe_floor sysctl

2019-08-08 Thread Josh Hunt
On 8/7/19 11:12 PM, Eric Dumazet wrote: On 8/8/19 1:52 AM, Josh Hunt wrote: The current implementation of TCP MTU probing can considerably underestimate the MTU on lossy connections allowing the MSS to get down to 48. We have found that in almost all of these cases on our networks these paths

Re: [PATCH bpf-next 1/3] bpf: support cloning sk storage on accept()

2019-08-08 Thread Stanislav Fomichev
On 08/08, Martin Lau wrote: > On Wed, Aug 07, 2019 at 08:47:18AM -0700, Stanislav Fomichev wrote: > > Add new helper bpf_sk_storage_clone which optionally clones sk storage > > and call it from bpf_sk_storage_clone. Reuse the gap in > > bpf_sk_storage_elem to store clone/non-clone flag. > > > > Cc

[bpf-next v2 PATCH 3/3] samples/bpf: xdp_fwd explain bpf_fib_lookup return codes

2019-08-08 Thread Jesper Dangaard Brouer
Make it clear that this XDP program depend on the network stack to do the ARP resolution. This is connected with the BPF_FIB_LKUP_RET_NO_NEIGH return code from bpf_fib_lookup(). Another common mistake (seen via XDP-tutorial) is that users don't realize that sysctl net.ipv{4,6}.conf.all.forwarding

[bpf-next v2 PATCH 2/3] samples/bpf: make xdp_fwd more practically usable via devmap lookup

2019-08-08 Thread Jesper Dangaard Brouer
This address the TODO in samples/bpf/xdp_fwd_kern.c, which points out that the chosen egress index should be checked for existence in the devmap. This can now be done via taking advantage of Toke's work in commit 0cdbb4b09a06 ("devmap: Allow map lookups from eBPF"). This change makes xdp_fwd more

[bpf-next v2 PATCH 0/3] bpf: improvements to xdp_fwd sample

2019-08-08 Thread Jesper Dangaard Brouer
V2: Addressed issues point out by Yonghong Song - Please ACK patch 2/3 again - Added ACKs and reviewed-by to other patches This patchset is focused on improvements for XDP forwarding sample named xdp_fwd, which leverage the existing FIB routing tables as described in LPC2018[1] talk by David Ahe

[bpf-next v2 PATCH 1/3] samples/bpf: xdp_fwd rename devmap name to be xdp_tx_ports

2019-08-08 Thread Jesper Dangaard Brouer
The devmap name 'tx_port' came from a copy-paste from xdp_redirect_map which only have a single TX port. Change name to xdp_tx_ports to make it more descriptive. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: David Ahern Acked-by: Yonghong Song --- samples/bpf/xdp_fwd_kern.c |5 +++--

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-08 Thread Holger Hoffstätte
On 8/8/19 4:37 PM, Holger Hoffstätte wrote: Hello Heiner - On 7/28/19 11:25 AM, Heiner Kallweit wrote: There was a previous attempt to use xmit_more, but the change had to be reverted because under load sometimes a transmit timeout occurred [0]. Maybe this was caused by a missing memory barrie

Re: [bpf-next v2 PATCH 2/3] samples/bpf: make xdp_fwd more practically usable via devmap lookup

2019-08-08 Thread Jesper Dangaard Brouer
On Thu, 08 Aug 2019 17:46:46 +0200 Jesper Dangaard Brouer wrote: > @@ -103,8 +112,17 @@ int main(int argc, char **argv) > return 1; > } > > - if (bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)) > + err = bpf_prog_load_xattr(&prog

Re: [PATCH net v3] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-08-08 Thread Willem de Bruijn
On Wed, Aug 7, 2019 at 8:04 PM Jakub Kicinski wrote: > > sk_validate_xmit_skb() and drivers depend on the sk member of > struct sk_buff to identify segments requiring encryption. > Any operation which removes or does not preserve the original TLS > socket such as skb_orphan() or skb_clone() will c

[bpf-next v3 PATCH 0/3] bpf: improvements to xdp_fwd sample

2019-08-08 Thread Jesper Dangaard Brouer
V3: Hopefully fixed all issues point out by Yonghong Song V2: Addressed issues point out by Yonghong Song - Please ACK patch 2/3 again - Added ACKs and reviewed-by to other patches This patchset is focused on improvements for XDP forwarding sample named xdp_fwd, which leverage the existing FIB

[bpf-next v3 PATCH 3/3] samples/bpf: xdp_fwd explain bpf_fib_lookup return codes

2019-08-08 Thread Jesper Dangaard Brouer
Make it clear that this XDP program depend on the network stack to do the ARP resolution. This is connected with the BPF_FIB_LKUP_RET_NO_NEIGH return code from bpf_fib_lookup(). Another common mistake (seen via XDP-tutorial) is that users don't realize that sysctl net.ipv{4,6}.conf.all.forwarding

[bpf-next v3 PATCH 1/3] samples/bpf: xdp_fwd rename devmap name to be xdp_tx_ports

2019-08-08 Thread Jesper Dangaard Brouer
The devmap name 'tx_port' came from a copy-paste from xdp_redirect_map which only have a single TX port. Change name to xdp_tx_ports to make it more descriptive. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: David Ahern Acked-by: Yonghong Song --- samples/bpf/xdp_fwd_kern.c |5 +++--

[bpf-next v3 PATCH 2/3] samples/bpf: make xdp_fwd more practically usable via devmap lookup

2019-08-08 Thread Jesper Dangaard Brouer
This address the TODO in samples/bpf/xdp_fwd_kern.c, which points out that the chosen egress index should be checked for existence in the devmap. This can now be done via taking advantage of Toke's work in commit 0cdbb4b09a06 ("devmap: Allow map lookups from eBPF"). This change makes xdp_fwd more

Re: [net] ixgbe: fix possible deadlock in ixgbe_service_task()

2019-08-08 Thread Jeff Kirsher
On Wed, 2019-08-07 at 15:08 +0900, Taehee Yoo wrote: > On Wed, 7 Aug 2019 at 08:36, David Miller > wrote: > > Hi David > Thank you for the review! > > > From: Jeff Kirsher > > Date: Mon, 5 Aug 2019 13:04:03 -0700 > > > > > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > > > b/dri

[net v2] ixgbe: fix possible deadlock in ixgbe_service_task()

2019-08-08 Thread Jeff Kirsher
From: Taehee Yoo ixgbe_service_task() calls unregister_netdev() under rtnl_lock(). But unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: 59dd45d550c5 ("ixgbe: firmware recovery mode") Signed-off-by: Taehee Yoo Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher

Re: [v3,3/4] tools: bpftool: add bash-completion for net attach/detach

2019-08-08 Thread Quentin Monnet
2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee > This commit adds bash-completion for new "net attach/detach" > subcommand for attaching XDP program on interface. > > Signed-off-by: Daniel T. Lee > --- > tools/bpf/bpftool/bash-completion/bpftool | 64 +++ > 1 file changed, 55 ins

Re: [v3,4/4] tools: bpftool: add documentation for net attach/detach

2019-08-08 Thread Quentin Monnet
2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee > Since, new sub-command 'net attach/detach' has been added for > attaching XDP program on interface, > this commit documents usage and sample output of `net attach/detach`. > > Signed-off-by: Daniel T. Lee > --- > .../bpf/bpftool/Documentation/bpftool-

Re: [bpf-next PATCH 0/3] bpf: improvements to xdp_fwd sample

2019-08-08 Thread Zvi Effron
On Thu, Aug 8, 2019 at 4:30 AM Jesper Dangaard Brouer wrote: > > Another improvement from Toke, is that the bpf_redirect_map() helper, > now also check if the redirect index is valid in the map. If not, then > it returns another value than XDP_REDIRECT. You can choose the > alternative return va

Re: [PATCH net v3] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2019 11:59:18 -0400, Willem de Bruijn wrote: > > diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c > > index 7c0b2b778703..43922d86e510 100644 > > --- a/net/tls/tls_device.c > > +++ b/net/tls/tls_device.c > > @@ -373,9 +373,9 @@ static int tls_push_data(struct sock *sk, > >

Re: [PATCH v2 bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Andrii Nakryiko
On Wed, Aug 7, 2019 at 9:24 PM Yonghong Song wrote: > > > > On 8/7/19 5:32 PM, Andrii Nakryiko wrote: > > Make .BTF section allocated and expose its contents through sysfs. > > > > /sys/kernel/btf directory is created to contain all the BTFs present > > inside kernel. Currently there is only kerne

Re: [PATCH v5 bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2019-08-08 Thread Carlos Antonio Neira Bustos
Yonghong, I have modified the patch following your feedback. Let me know if I'm missing something. Bests >From 70f8d5584700c9cfc82c006901d8ee9595c53f15 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 7 Aug 2019 20:04:30 -0400 Subject: [PATCH] [PATCH v6 bpf-next] BPF: New helper to obtain name

Re: [v3,1/4] tools: bpftool: add net attach command to attach XDP on interface

2019-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2019 07:15:22 +0900, Daniel T. Lee wrote: > > > + return -EINVAL; > > > + } > > > + > > > + NEXT_ARG(); > > > > nit: the new line should be before NEXT_ARG(), IOV NEXT_ARG() belongs > > to the code which consumed the argument > > > > I'm not sure I'm following

Re: [PATCH v2 bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Andrii Nakryiko
On Wed, Aug 7, 2019 at 11:08 PM Greg KH wrote: > > On Thu, Aug 08, 2019 at 04:24:25AM +, Yonghong Song wrote: > > > > > > On 8/7/19 5:32 PM, Andrii Nakryiko wrote: > > > Make .BTF section allocated and expose its contents through sysfs. > > Was this original patch not on bpf@vger? I can't fin

Re: [PATCH] pcan_usb_fd: zero out the common command buffer

2019-08-08 Thread David Miller
From: Oliver Neukum Date: Thu, 8 Aug 2019 11:28:25 +0200 > Lest we leak kernel memory to a device we better zero out buffers. > > Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com > Signed-off-by: Oliver Neukum Please CC: the CAN subsystem maintainers, as this is clearly list

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-08 Thread Jonathan Lemon
On 6 Aug 2019, at 12:06, Andrew Lunn wrote: On Tue, Aug 06, 2019 at 11:54:49AM -0700, Jakub Kicinski wrote: On Tue, 6 Aug 2019 20:38:41 +0200, Jiri Pirko wrote: So the proposal is to have some new device, say "kernelnet", that would implicitly create per-namespace devlink instance. This de

Re: [PATCH v2 bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 10:53:44AM -0700, Andrii Nakryiko wrote: > On Wed, Aug 7, 2019 at 11:08 PM Greg KH wrote: > > > > On Thu, Aug 08, 2019 at 04:24:25AM +, Yonghong Song wrote: > > > > > > > > > On 8/7/19 5:32 PM, Andrii Nakryiko wrote: > > > > Make .BTF section allocated and expose its co

Re: [PATCH net v3] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-08-08 Thread Willem de Bruijn
On Thu, Aug 8, 2019 at 1:32 PM Jakub Kicinski wrote: > > On Thu, 8 Aug 2019 11:59:18 -0400, Willem de Bruijn wrote: > > > diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c > > > index 7c0b2b778703..43922d86e510 100644 > > > --- a/net/tls/tls_device.c > > > +++ b/net/tls/tls_device.c > > > @

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-08 Thread Heiner Kallweit
On 08.08.2019 17:53, Holger Hoffstätte wrote: > On 8/8/19 4:37 PM, Holger Hoffstätte wrote: >> >> Hello Heiner - >> >> On 7/28/19 11:25 AM, Heiner Kallweit wrote: >>> There was a previous attempt to use xmit_more, but the change had to be >>> reverted because under load sometimes a transmit timeout

Re: [PATCH bpf-next 1/3] bpf: support cloning sk storage on accept()

2019-08-08 Thread Martin Lau
On Thu, Aug 08, 2019 at 08:28:30AM -0700, Stanislav Fomichev wrote: > On 08/08, Martin Lau wrote: > > On Wed, Aug 07, 2019 at 08:47:18AM -0700, Stanislav Fomichev wrote: > > > Add new helper bpf_sk_storage_clone which optionally clones sk storage > > > and call it from bpf_sk_storage_clone. Reuse t

Re: [PATCH 1/1] bpf: introduce new helper udp_flow_src_port

2019-08-08 Thread Andrii Nakryiko
On Mon, Aug 5, 2019 at 5:11 PM Jakub Kicinski wrote: > > On Sat, 3 Aug 2019 23:52:16 -0700, Y Song wrote: > > > include/uapi/linux/bpf.h | 21 +++-- > > > net/core/filter.c | 20 > > > tools/include/uapi/linux/bpf.h| 21

Re: [PATCH net-next v1 1/8] netfilter: inlined four headers files into another one.

2019-08-08 Thread Jozsef Kadlecsik
Hi Jeremy, On Wed, 7 Aug 2019, Jeremy Sowden wrote: > linux/netfilter/ipset/ip_set.h included four other header files: > > include/linux/netfilter/ipset/ip_set_comment.h > include/linux/netfilter/ipset/ip_set_counter.h > include/linux/netfilter/ipset/ip_set_skbinfo.h > include/linux/netf

Re: [PATCH] liquidio: Use pcie_flr() instead of reimplementing it

2019-08-08 Thread Bjorn Helgaas
On Thu, Aug 08, 2019 at 07:57:53AM +0300, Denis Efremov wrote: > octeon_mbox_process_cmd() directly writes the PCI_EXP_DEVCTL_BCR_FLR > bit, which bypasses timing requirements imposed by the PCIe spec. > This patch fixes the function to use the pcie_flr() interface instead. > > Signed-off-by: Deni

Re: [PATCH bpf 2/2] tools: bpftool: add error message on pin failure

2019-08-08 Thread Andrii Nakryiko
On Tue, Aug 6, 2019 at 5:21 PM Jakub Kicinski wrote: > > No error message is currently printed if the pin syscall > itself fails. It got lost in the loadall refactoring. > > Fixes: 77380998d91d ("bpftool: add loadall command") > Reported-by: Andy Lutomirski > Signed-off-by: Jakub Kicinski > Revi

[PATCH net-next 0/3] net: phy: realtek: add support for integrated 2.5Gbps PHY in RTL8125

2019-08-08 Thread Heiner Kallweit
This series adds support for the integrated 2.5Gbps PHY in RTL8125. First two patches add necessary functionality to phylib. Heiner Kallweit (3): net: phy: prepare phylib to deal with PHY's extending Clause 22 net: phy: add phy_modify_paged_changed net: phy: realtek: add support for the 2.5G

[PATCH net-next 3/3] net: phy: realtek: add support for the 2.5Gbps PHY in RTL8125

2019-08-08 Thread Heiner Kallweit
This adds support for the integrated 2.5Gbps PHY in Realtek RTL8125. Advertisement of 2.5Gbps mode is done via a vendor-specific register. Same applies to reading NBase-T link partner advertisement. Unfortunately this 2.5Gbps PHY shares the PHY ID with the integrated 1Gbps PHY's in other Realtek ne

[PATCH net-next 2/3] net: phy: add phy_modify_paged_changed

2019-08-08 Thread Heiner Kallweit
Add helper function phy_modify_paged_changed, behavior is the same as for phy_modify_changed. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-core.c | 29 - include/linux/phy.h| 2 ++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/driv

[PATCH net-next 1/3] net: phy: prepare phylib to deal with PHY's extending Clause 22

2019-08-08 Thread Heiner Kallweit
The integrated PHY in 2.5Gbps chip RTL8125 is the first (known to me) PHY that uses standard Clause 22 for all modes up to 1Gbps and adds 2.5Gbps control using vendor-specific registers. To use phylib for the standard part little extensions are needed: - Move most of genphy_config_aneg to a new fun

Re: [bpf-next v3 PATCH 1/3] samples/bpf: xdp_fwd rename devmap name to be xdp_tx_ports

2019-08-08 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > The devmap name 'tx_port' came from a copy-paste from xdp_redirect_map > which only have a single TX port. Change name to xdp_tx_ports > to make it more descriptive. > > Signed-off-by: Jesper Dangaard Brouer > Reviewed-by: David Ahern > Acked-by: Yonghong Song

Re: [bpf-next v3 PATCH 2/3] samples/bpf: make xdp_fwd more practically usable via devmap lookup

2019-08-08 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > This address the TODO in samples/bpf/xdp_fwd_kern.c, which points out > that the chosen egress index should be checked for existence in the > devmap. This can now be done via taking advantage of Toke's work in > commit 0cdbb4b09a06 ("devmap: Allow map lookups from

Re: [bpf-next v3 PATCH 3/3] samples/bpf: xdp_fwd explain bpf_fib_lookup return codes

2019-08-08 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > Make it clear that this XDP program depend on the network > stack to do the ARP resolution. This is connected with the > BPF_FIB_LKUP_RET_NO_NEIGH return code from bpf_fib_lookup(). > > Another common mistake (seen via XDP-tutorial) is that users > don't realize

Re: [PATCH net v3] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-08-08 Thread Boris Pismenny
On 08/08/2019 3:03, Jakub Kicinski wrote: > sk_validate_xmit_skb() and drivers depend on the sk member of > struct sk_buff to identify segments requiring encryption. > Any operation which removes or does not preserve the original TLS > socket such as skb_orphan() or skb_clone() will cause clear t

Re: [v3,1/4] tools: bpftool: add net attach command to attach XDP on interface

2019-08-08 Thread Daniel T. Lee
On Fri, Aug 9, 2019 at 2:50 AM Jakub Kicinski wrote: > > On Thu, 8 Aug 2019 07:15:22 +0900, Daniel T. Lee wrote: > > > > + return -EINVAL; > > > > + } > > > > + > > > > + NEXT_ARG(); > > > > > > nit: the new line should be before NEXT_ARG(), IOV NEXT_ARG() belongs > > > to the

Re: [v3,3/4] tools: bpftool: add bash-completion for net attach/detach

2019-08-08 Thread Daniel T. Lee
On Fri, Aug 9, 2019 at 1:48 AM Quentin Monnet wrote: > > 2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee > > This commit adds bash-completion for new "net attach/detach" > > subcommand for attaching XDP program on interface. > > > > Signed-off-by: Daniel T. Lee > > --- > > tools/bpf/bpftool/bash-comp

Re: [PATCH bpf-next v5 0/6] xdp: Add devmap_hash map type

2019-08-08 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen > wrote: >> >> This series adds a new map type, devmap_hash, that works like the existing >> devmap type, but using a hash-based indexing scheme. This is useful for the >> use >> case where a devmap is indexed

Re: [PATCH net-next 1/3] net: phy: prepare phylib to deal with PHY's extending Clause 22

2019-08-08 Thread Andrew Lunn
On Thu, Aug 08, 2019 at 09:03:42PM +0200, Heiner Kallweit wrote: > The integrated PHY in 2.5Gbps chip RTL8125 is the first (known to me) > PHY that uses standard Clause 22 for all modes up to 1Gbps and adds > 2.5Gbps control using vendor-specific registers. To use phylib for > the standard part lit

Re: [PATCH net-next 3/3] net: phy: realtek: add support for the 2.5Gbps PHY in RTL8125

2019-08-08 Thread Andrew Lunn
On Thu, Aug 08, 2019 at 09:05:54PM +0200, Heiner Kallweit wrote: > This adds support for the integrated 2.5Gbps PHY in Realtek RTL8125. > Advertisement of 2.5Gbps mode is done via a vendor-specific register. > Same applies to reading NBase-T link partner advertisement. > Unfortunately this 2.5Gbps

Re: [PATCH v5 bpf-next] BPF: helpers: New helper to obtain namespace data from current task

2019-08-08 Thread Y Song
On Thu, Aug 8, 2019 at 10:52 AM Carlos Antonio Neira Bustos wrote: > > Yonghong, > > I have modified the patch following your feedback. > Let me know if I'm missing something. Yes, I have some other requests about formating. https://lore.kernel.org/netdev/20190808174848.poybtaagg5ctle7t@dev00/T/#

Re: [bpf-next v3 PATCH 2/3] samples/bpf: make xdp_fwd more practically usable via devmap lookup

2019-08-08 Thread Y Song
On Thu, Aug 8, 2019 at 9:17 AM Jesper Dangaard Brouer wrote: > > This address the TODO in samples/bpf/xdp_fwd_kern.c, which points out > that the chosen egress index should be checked for existence in the > devmap. This can now be done via taking advantage of Toke's work in > commit 0cdbb4b09a06 (

Re: [PATCH net-next 3/3] net: phy: realtek: add support for the 2.5Gbps PHY in RTL8125

2019-08-08 Thread Heiner Kallweit
On 08.08.2019 21:37, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 09:05:54PM +0200, Heiner Kallweit wrote: >> This adds support for the integrated 2.5Gbps PHY in Realtek RTL8125. >> Advertisement of 2.5Gbps mode is done via a vendor-specific register. >> Same applies to reading NBase-T link partner

Re: [PATCH] pcan_usb_fd: zero out the common command buffer

2019-08-08 Thread Marc Kleine-Budde
On 8/8/19 8:03 PM, David Miller wrote: > From: Oliver Neukum > Date: Thu, 8 Aug 2019 11:28:25 +0200 > >> Lest we leak kernel memory to a device we better zero out buffers. >> >> Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com >> Signed-off-by: Oliver Neukum > > Please CC: th

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-08 Thread Holger Hoffstätte
On 8/8/19 8:17 PM, Heiner Kallweit wrote: On 08.08.2019 17:53, Holger Hoffstätte wrote: On 8/8/19 4:37 PM, Holger Hoffstätte wrote: Hello Heiner - On 7/28/19 11:25 AM, Heiner Kallweit wrote: There was a previous attempt to use xmit_more, but the change had to be reverted because under load s

Re: [v3,2/4] tools: bpftool: add net detach command to detach XDP on interface

2019-08-08 Thread Y Song
On Wed, Aug 7, 2019 at 1:40 PM Maciej Fijalkowski wrote: > > On Wed, 7 Aug 2019 13:12:17 -0700 > Y Song wrote: > > > On Wed, Aug 7, 2019 at 11:30 AM Maciej Fijalkowski > > wrote: > > > > > > On Wed, 7 Aug 2019 10:02:04 -0700 > > > Y Song wrote: > > > > > > > On Tue, Aug 6, 2019 at 7:25 PM Danie

Re: [PATCH bpf-next v5 0/6] xdp: Add devmap_hash map type

2019-08-08 Thread Y Song
On Thu, Aug 8, 2019 at 12:43 PM Toke Høiland-Jørgensen wrote: > > Alexei Starovoitov writes: > > > On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen > > wrote: > >> > >> This series adds a new map type, devmap_hash, that works like the existing > >> devmap type, but using a hash-based inde

Re: [PATCH bpf-next v5 0/6] xdp: Add devmap_hash map type

2019-08-08 Thread Jesper Dangaard Brouer
On Thu, 8 Aug 2019 12:57:05 -0700 Y Song wrote: > On Thu, Aug 8, 2019 at 12:43 PM Toke Høiland-Jørgensen > wrote: > > > > Alexei Starovoitov writes: > > > > > On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen > > > wrote: > > >> > > >> This series adds a new map type, devmap_hash, t

Re: [PATCH net-next] r8169: make use of xmit_more

2019-08-08 Thread Heiner Kallweit
On 08.08.2019 21:52, Holger Hoffstätte wrote: > On 8/8/19 8:17 PM, Heiner Kallweit wrote: >> On 08.08.2019 17:53, Holger Hoffstätte wrote: >>> On 8/8/19 4:37 PM, Holger Hoffstätte wrote: Hello Heiner - On 7/28/19 11:25 AM, Heiner Kallweit wrote: > There was a previous attemp

Re: [PATCH net-next 1/3] net: phy: prepare phylib to deal with PHY's extending Clause 22

2019-08-08 Thread Heiner Kallweit
On 08.08.2019 21:32, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 09:03:42PM +0200, Heiner Kallweit wrote: >> The integrated PHY in 2.5Gbps chip RTL8125 is the first (known to me) >> PHY that uses standard Clause 22 for all modes up to 1Gbps and adds >> 2.5Gbps control using vendor-specific registe

Re: [PATCH net-next v1 1/8] netfilter: inlined four headers files into another one.

2019-08-08 Thread Jeremy Sowden
On 2019-08-08, at 13:23:55 +0200, Pablo Neira Ayuso wrote: > On Wed, Aug 07, 2019 at 03:16:58PM +0100, Jeremy Sowden wrote: > [...] > > +/* Called from uadd only, protected by the set spinlock. > > + * The kadt functions don't use the comment extensions in any way. > > + */ > > +static inline void

Re: [PATCH net-next 3/3] net: phy: realtek: add support for the 2.5Gbps PHY in RTL8125

2019-08-08 Thread Andrew Lunn
> I have a contact in Realtek who provided the information about > the vendor-specific registers used in the patch. I also asked for > a method to auto-detect 2.5Gbps support but have no feedback so far. > What may contribute to the problem is that also the integrated 1Gbps > PHY's (all with the sa

[pull request][net 00/12] Mellanox, mlx5 fixes 2019-08-08

2019-08-08 Thread Saeed Mahameed
level = inner_match_level; + flow->esw_attr->outer_match_level = outer_match_level; ++>>>>>>> (net) To resolve, use hunks from net (2nd) and replace: if (flow->flags & MLX5E_TC_FLOW_ESWITCH) with if (is_eswitch_flow) Thanks, Saeed. --- The follow

[net 01/12] net/mlx5e: Use flow keys dissector to parse packets for ARFS

2019-08-08 Thread Saeed Mahameed
From: Maxim Mikityanskiy The current ARFS code relies on certain fields to be set in the SKB (e.g. transport_header) and extracts IP addresses and ports by custom code that parses the packet. The necessary SKB fields, however, are not always set at that point, which leads to an out-of-bounds acce

[net 02/12] net/mlx5: Support inner header match criteria for non decap flow action

2019-08-08 Thread Saeed Mahameed
From: Huy Nguyen We have an issue that OVS application creates an offloaded drop rule that drops VXLAN traffic with both inner and outer header match criteria. mlx5_core driver detects correctly the inner and outer header match criteria but does not enable the inner header match criteria due to a

Re: [PATCH v2 bpf-next] btf: expose BTF info through sysfs

2019-08-08 Thread Yonghong Song
On 8/8/19 10:47 AM, Andrii Nakryiko wrote: > On Wed, Aug 7, 2019 at 9:24 PM Yonghong Song wrote: >> >> >> >> On 8/7/19 5:32 PM, Andrii Nakryiko wrote: >>> Make .BTF section allocated and expose its contents through sysfs. >>> >>> /sys/kernel/btf directory is created to contain all the BTFs prese

[net 03/12] net/mlx5e: Only support tx/rx pause setting for port owner

2019-08-08 Thread Saeed Mahameed
From: Huy Nguyen Only support changing tx/rx pause frame setting if the net device is the vport group manager. Fixes: 3c2d18ef22df ("net/mlx5e: Support ethtool get/set_pauseparam") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mell

[net 05/12] net/mlx5: crypto, Fix wrong offset in encryption key command

2019-08-08 Thread Saeed Mahameed
From: Tariq Toukan Fix the 128b key offset in key encryption key creation command, per the HW specification. Fixes: 45d3b55dc665 ("net/mlx5: Add crypto library to support create/destroy encryption key") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellan

[net 07/12] net/mlx5e: kTLS, Fix progress params context WQE layout

2019-08-08 Thread Saeed Mahameed
From: Tariq Toukan The TLS progress params context WQE should not include an Eth segment, drop it. In addition, align the tls_progress_params layout with the HW specification document: - fix the tisn field name. - remove the valid bit. Fixes: a12ff35e0fb7 ("net/mlx5: Introduce TLS TX offload har

[net 04/12] net/mlx5e: ethtool, Avoid setting speed to 56GBASE when autoneg off

2019-08-08 Thread Saeed Mahameed
From: Mohamad Heib Setting speed to 56GBASE is allowed only with auto-negotiation enabled. This patch prevent setting speed to 56GBASE when auto-negotiation disabled. Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Mohamad Heib Si

  1   2   >