Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Andrii Nakryiko
On Tue, Jul 30, 2019 at 10:19 PM Song Liu wrote: > > > > > On Jul 30, 2019, at 6:00 PM, Andrii Nakryiko > > wrote: > > > > On Tue, Jul 30, 2019 at 5:39 PM Song Liu wrote: > >> > >> > >> > >>> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > >>> > >>> This patch implements the core logic

[PATCH net] drop_monitor: Add missing uAPI file to MAINTAINERS file

2019-07-30 Thread Ido Schimmel
From: Ido Schimmel Fixes: 6e43650cee64 ("add maintainer for network drop monitor kernel service") Signed-off-by: Ido Schimmel --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9f5b8bd4faf9..b540794cbd91 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()

2019-07-30 Thread Ido Schimmel
From: Jiri Pirko In case of sp2 pci driver registration fail, fix the error path to start with sp1 pci driver unregister. Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC") Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/sp

[PATCH net 0/2] mlxsw: Two small fixes

2019-07-30 Thread Ido Schimmel
From: Ido Schimmel Patch #1 from Jiri fixes the error path of the module initialization function. Found during manual code inspection. Patch #2 from Petr further reduces the default shared buffer pool sizes in order to work around a problem that was originally described in commit e891ce1dd2a5 ("

[PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2

2019-07-30 Thread Ido Schimmel
From: Petr Machata In commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2"), pool size was reduced to mitigate a problem in port buffer usage of ports split four ways. It turns out that this work around does not solve the issue, and a further reduction is required. Thus

[PATCH] can: flexcan: add LPSR mode support for i.MX7D

2019-07-30 Thread Joakim Zhang
For i.MX7D LPSR mode, the controller will lost power and got the configuration state lost after system resume back. (coming i.MX8QM/QXP will also completely power off the domain, the controller state will be lost and needs restore). So we need to set pinctrl state again and re-start chip to do re-c

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 6:00 PM, Andrii Nakryiko > wrote: > > On Tue, Jul 30, 2019 at 5:39 PM Song Liu wrote: >> >> >> >>> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: >>> >>> This patch implements the core logic for BPF CO-RE offsets relocations. >>> Every instruction that needs

Re: [PATCH bpf-next v2] tools: bpftool: add support for reporting the effective cgroup progs

2019-07-30 Thread Alexei Starovoitov
On Tue, Jul 30, 2019 at 3:01 PM Takshak Chahande wrote: > > Jakub Kicinski wrote on Tue [2019-Jul-30 > 14:03:00 -0700]: > > Takshak said in the original submission: > > > > With different bpf attach_flags available to attach bpf programs specially > > with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MU

Re: [PATCH v2 bpf-next] selftests/bpf: fix clearing buffered output between tests/subtests

2019-07-30 Thread Alexei Starovoitov
On Tue, Jul 30, 2019 at 11:17 AM Andrii Nakryiko wrote: > > Clear buffered output once test or subtests finishes even if test was > successful. Not doing this leads to accumulation of output from previous > tests and on first failed tests lots of irrelevant output will be > dumped, greatly confusi

Re: [bpf-next,v2 0/6] Introduce a BPF helper to generate SYN cookies

2019-07-30 Thread Alexei Starovoitov
On Mon, Jul 29, 2019 at 4:46 PM Petar Penkov wrote: >> > > What is cpu utilization at this rate? > > Is it cpu or nic limited if you crank up the syn flood? > > Original 7M with all cores or single core? > My receiver was configured with 16rx queues and 16 cores. 7M all cores > are at 100% so I be

Dear Friend,

2019-07-30 Thread Aisha Gaddafi
Dear Friend, I came across your e-mail contact prior a private search while in need of your assistance. My name is Aisha Gaddafi a single Mother and a Widow with three Children. I am the only biological Daughter of late Libyan President (Late Colonel Muammar Gaddafi). I have investment funds

Fwd: net: ipv6: Fix a bug in ndisc_send_ns when netdev only has a global address

2019-07-30 Thread Mark Smith
Re-sending in text format due to Gmail preserving the HTML email I received and vger (quite reasonably) rejecting my response. -- Forwarded message - From: Mark Smith Date: Wed, 31 Jul 2019 at 12:23 Subject: Re: net: ipv6: Fix a bug in ndisc_send_ns when netdev only has a global

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Alexei Starovoitov
On Tue, Jul 30, 2019 at 06:21:44PM -0700, Jakub Kicinski wrote: > > > Duplicating the same features in bpftool will only diminish the > > > incentive for moving iproute2 to libbpf. > > > > not at all. why do you think so? > > Because iproute2's BPF has fallen behind so the simplest thing is to

[PATCH bpf 1/2] bpf: fix x64 JIT code generation for jmp to 1st insn

2019-07-30 Thread Alexei Starovoitov
Introduction of bounded loops exposed old bug in x64 JIT. JIT maintains the array of offsets to the end of all instructions to compute jmp offsets. addrs[0] - offset of the end of the 1st insn (that includes prologue). addrs[1] - offset of the end of the 2nd insn. JIT didn't keep the offset of the

[PATCH bpf 2/2] selftests/bpf: tests for jmp to 1st insn

2019-07-30 Thread Alexei Starovoitov
Add 2 tests that check JIT code generation to jumps to 1st insn. 1st test is similar to syzbot reproducer. The backwards branch is never taken at runtime. 2nd test has branch to 1st insn that executes. The test is written as two bpf functions, since it's not possible to construct valid single bpf p

[PATCH bpf 0/2] bpf: fix bug in x64 JIT

2019-07-30 Thread Alexei Starovoitov
Fix bug in computation of the jump offset to 1st instruction in BPF JIT and add 2 tests. Alexei Starovoitov (2): bpf: fix x64 JIT code generation for jmp to 1st insn selftests/bpf: tests for jmp to 1st insn arch/x86/net/bpf_jit_comp.c | 7 +++-- tools/testing/selftests/bpf

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 17:23:39 -0700, Alexei Starovoitov wrote: > On Tue, Jul 30, 2019 at 05:07:25PM -0700, Jakub Kicinski wrote: > > Nothing meaning you disagree it's duplicated effort and unnecessary > > LoC the community has to maintain, review, test..? > > I don't see duplicated effort. Coul

Re: [PATCH v4 net-next 15/19] ionic: Add netdev-event handling

2019-07-30 Thread Shannon Nelson
On 7/30/19 4:39 PM, Stephen Hemminger wrote: On Mon, 22 Jul 2019 14:40:19 -0700 Shannon Nelson wrote: + +static void ionic_lif_set_netdev_info(struct lif *lif) +{ + struct ionic_admin_ctx ctx = { + .work = COMPLETION_INITIALIZER_ONSTACK(ctx.work), + .cmd.lif_s

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Andrii Nakryiko
On Tue, Jul 30, 2019 at 5:39 PM Song Liu wrote: > > > > > On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > > > This patch implements the core logic for BPF CO-RE offsets relocations. > > Every instruction that needs to be relocated has corresponding > > bpf_offset_reloc as part of BTF.ext

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > This patch implements the core logic for BPF CO-RE offsets relocations. > Every instruction that needs to be relocated has corresponding > bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying > to match recorded "lo

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Alexei Starovoitov
On Tue, Jul 30, 2019 at 05:07:25PM -0700, Jakub Kicinski wrote: > On Tue, 30 Jul 2019 16:17:56 -0700, Alexei Starovoitov wrote: > > On Tue, Jul 30, 2019 at 03:59:15PM -0700, Jakub Kicinski wrote: > > > On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote: > > > > Currently, bpftool net only su

Re: [PATCH nf] netfilter: nf_tables: map basechain priority to hardware priority

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 12:54:17 +0200, Pablo Neira Ayuso wrote: > This patch maps basechain netfilter priorities from -8192 to 8191 to > hardware priority 0xC000 + 1. tcf_auto_prio() uses 0xC000 if the user > specifies no priority, then it subtract 1 for each new tcf_proto object. > This patch uses th

RES: PROPOSAL.

2019-07-30 Thread José Luiz Fabris
De: José Luiz Fabris Enviado: terça-feira, 30 de julho de 2019 18:37 Para: José Luiz Fabris Assunto: PROPOSAL. Good Day, I am Mrs.Margaret Ko May-Yee Leung Deputy Managing Director and Executive Director of Chong Hing Bank Limited. I write briefly to

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 4:55 PM, Andrii Nakryiko > wrote: > > On Tue, Jul 30, 2019 at 4:44 PM Song Liu wrote: >> >> >> >>> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: >>> >>> This patch implements the core logic for BPF CO-RE offsets relocations. >>> Every instruction that needs

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 16:17:56 -0700, Alexei Starovoitov wrote: > On Tue, Jul 30, 2019 at 03:59:15PM -0700, Jakub Kicinski wrote: > > On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote: > > > Currently, bpftool net only supports dumping progs loaded on the > > > interface. To load XDP prog on

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Andrii Nakryiko
On Tue, Jul 30, 2019 at 4:44 PM Song Liu wrote: > > > > > On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > > > This patch implements the core logic for BPF CO-RE offsets relocations. > > Every instruction that needs to be relocated has corresponding > > bpf_offset_reloc as part of BTF.ext

Re: [PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > This patch implements the core logic for BPF CO-RE offsets relocations. > Every instruction that needs to be relocated has corresponding > bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying > to match recorded "lo

Re: [PATCH v4 net-next 15/19] ionic: Add netdev-event handling

2019-07-30 Thread Stephen Hemminger
On Mon, 22 Jul 2019 14:40:19 -0700 Shannon Nelson wrote: > + > +static void ionic_lif_set_netdev_info(struct lif *lif) > +{ > + struct ionic_admin_ctx ctx = { > + .work = COMPLETION_INITIALIZER_ONSTACK(ctx.work), > + .cmd.lif_setattr = { > + .opcode

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Alexei Starovoitov
On Tue, Jul 30, 2019 at 03:59:15PM -0700, Jakub Kicinski wrote: > On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote: > > Currently, bpftool net only supports dumping progs loaded on the > > interface. To load XDP prog on interface, user must use other tool > > (eg. iproute2). By this patch, w

Re: [PATCH bpf-next] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 15:24:47 -0700, Takshak Chahande wrote: > Having static variable `cpus` in libbpf_num_possible_cpus function without > guarding it with mutex makes this function thread-unsafe. > > If multiple threads accessing this function, in the current form; it > leads to incrementing the

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Jakub Kicinski
On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote: > Currently, bpftool net only supports dumping progs loaded on the > interface. To load XDP prog on interface, user must use other tool > (eg. iproute2). By this patch, with `bpftool net (un)load`, user can > (un)load XDP prog on interface.

Re: [PATCH v4 net-next 15/19] ionic: Add netdev-event handling

2019-07-30 Thread Shannon Nelson
On 7/25/19 4:55 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: When the netdev gets a new name from userland, pass that name down to the NIC for internal tracking. Just out of curiosity, why your NIC internal device/firmware need to keep tracking of the netd

Re: [patch net-next v2 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 10:57:34 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > When user does create new netdevsim instance using sysfs bus file, > create the devlink instance and related netdev instance in the namespace > of the caller. > > Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 10:57:32 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > All devlink instances are created in init_net and stay there for a > lifetime. Allow user to be able to move devlink instances into > namespaces. > > Signed-off-by: Jiri Pirko I'm no namespace expert, but seems reason

Re: [patch net-next v2 2/3] net: devlink: export devlink net set/get helpers

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 10:57:33 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Allow drivers to set/get net struct for devlink instance. Set is only > allowed for newly allocated devlink instance. > > Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski

[PATCH bpf-next] libbpf : make libbpf_num_possible_cpus function thread safe

2019-07-30 Thread Takshak Chahande
Having static variable `cpus` in libbpf_num_possible_cpus function without guarding it with mutex makes this function thread-unsafe. If multiple threads accessing this function, in the current form; it leads to incrementing the static variable value `cpus` in the multiple of total available CPUs.

[RFC PATCH v2 net-next 3/3] net: use listified RX for handling GRO_NORMAL skbs

2019-07-30 Thread Edward Cree
When GRO decides not to coalesce a packet, in napi_frags_finish(), instead of passing it to the stack immediately, place it on a list in the napi struct. Then, at flush time (napi_complete_done(), napi_poll(), or napi_busy_loop()), call netif_receive_skb_list_internal() on the list. We'd like t

[RFC PATCH v2 net-next 2/3] sfc: falcon: don't score irq moderation points for GRO

2019-07-30 Thread Edward Cree
Same rationale as for sfc, except that this wasn't performance-tested. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/falcon/rx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/sfc/falcon/rx.c b/drivers/net/ethernet/sfc/falcon/rx.c index fd

[RFC PATCH v2 net-next 1/3] sfc: don't score irq moderation points for GRO

2019-07-30 Thread Edward Cree
We already scored points when handling the RX event, no-one else does this, and looking at the history it appears this was originally meant to only score on merges, not on GRO_NORMAL. Moreover, it gets in the way of changing GRO to not immediately pass GRO_NORMAL skbs to the stack. Performance

[RFC PATCH v2 net-next 0/3] net: batched receive in GRO path

2019-07-30 Thread Edward Cree
This series listifies part of GRO processing, in a manner which allows those packets which are not GROed (i.e. for which dev_gro_receive returns GRO_NORMAL) to be passed on to the listified regular receive path. dev_gro_receive() itself is not listified, nor the per-protocol GRO callback, since

Re: [PATCH V4 0/3] net: dsa: ksz: Add Microchip KSZ87xx support

2019-07-30 Thread David Miller
From: Marek Vasut Date: Mon, 29 Jul 2019 19:49:44 +0200 > This series adds support for Microchip KSZ87xx switches, which are > slightly simpler compared to KSZ9xxx . > > Signed-off-by: Marek Vasut Series applied to net-next, thank you.

Re: [PATCH v3] net: dsa: qca8k: enable port flow control

2019-07-30 Thread David Miller
From: xiaofeis Date: Sun, 28 Jul 2019 08:57:50 +0800 > Set phy device advertising to enable MAC flow control. > > Signed-off-by: Xiaofei Shen I've read the discussion over a few times and if internal PHY is the only thing supported, and the specific setup this driver supports uses internal sig

Re: [PATCH bpf-next v2] tools: bpftool: add support for reporting the effective cgroup progs

2019-07-30 Thread Takshak Chahande
Jakub Kicinski wrote on Tue [2019-Jul-30 14:03:00 -0700]: > Takshak said in the original submission: > > With different bpf attach_flags available to attach bpf programs specially > with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI, the list of effective > bpf-programs available to any sub-cgroups

Re: [PATCH v4 net-next 13/19] ionic: Add initial ethtool support

2019-07-30 Thread Shannon Nelson
On 7/25/19 6:35 AM, Andrew Lunn wrote: +static int ionic_get_module_eeprom(struct net_device *netdev, + struct ethtool_eeprom *ee, + u8 *data) +{ + struct lif *lif = netdev_priv(netdev); + struct ionic_dev *idev = &lif-

Re: [net 1/1] tipc: fix unitilized skb list crash

2019-07-30 Thread David Miller
From: Jon Maloy Date: Tue, 30 Jul 2019 20:19:10 +0200 > Our test suite somtimes provokes the following crash: > > Description of problem: ... > The reason is that the skb list tipc_socket::mc_method.deferredq only > is initialized for connectionless sockets, while nothing stops arriving > multi

Re: [net-next 01/13] net/mlx5e: Print a warning when LRO feature is dropped or not allowed

2019-07-30 Thread Willem de Bruijn
On Tue, Jul 30, 2019 at 4:08 PM Saeed Mahameed wrote: > > On Tue, 2019-07-30 at 11:52 -0400, Willem de Bruijn wrote: > > On Mon, Jul 29, 2019 at 7:50 PM Saeed Mahameed > > wrote: > > > From: Huy Nguyen > > > > > > When user enables LRO via ethtool and if the RQ mode is legacy, > > > mlx5e_fix_fe

Re: [PATCH v2 bpf-next 03/12] selftests/bpf: add BPF_CORE_READ relocatable read macro

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 2:26 PM, Andrii Nakryiko > wrote: > > On Tue, Jul 30, 2019 at 2:24 PM Song Liu wrote: >> >> >> >>> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: >>> >>> Add BPF_CORE_READ macro used in tests to do bpf_core_read(), which >>> automatically captures offset relo

Re: [PATCH v2 0/3 net-next] Finish conversion of skb_frag_t to bio_vec

2019-07-30 Thread Jens Axboe
On 7/30/19 3:22 PM, David Miller wrote: > From: Jens Axboe > Date: Tue, 30 Jul 2019 20:49:09 + > >> Pretty appalled to see this abomination: >> >> net: Convert skb_frag_t to bio_vec >> >> There are a lot of users of frag->page_offset, so use a union >> to avoid converting those users today. >

Re: [PATCH v2 bpf-next 03/12] selftests/bpf: add BPF_CORE_READ relocatable read macro

2019-07-30 Thread Andrii Nakryiko
On Tue, Jul 30, 2019 at 2:24 PM Song Liu wrote: > > > > > On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > > > Add BPF_CORE_READ macro used in tests to do bpf_core_read(), which > > automatically captures offset relocation. > > > > Signed-off-by: Andrii Nakryiko > > --- > > tools/testing

Re: [PATCH v2 bpf-next 03/12] selftests/bpf: add BPF_CORE_READ relocatable read macro

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > Add BPF_CORE_READ macro used in tests to do bpf_core_read(), which > automatically captures offset relocation. > > Signed-off-by: Andrii Nakryiko > --- > tools/testing/selftests/bpf/bpf_helpers.h | 19 +++ > 1 file cha

Re: [PATCH v6 51/57] net: Remove dev_err() usage after platform_get_irq()

2019-07-30 Thread David Miller
From: Stephen Boyd Date: Tue, 30 Jul 2019 11:15:51 -0700 > We don't need dev_err() messages when platform_get_irq() fails now that > platform_get_irq() prints an error message itself when something goes > wrong. Let's remove these prints with a simple semantic patch. ... > While we're here, remo

Re: [PATCH v2 0/3 net-next] Finish conversion of skb_frag_t to bio_vec

2019-07-30 Thread David Miller
From: Jens Axboe Date: Tue, 30 Jul 2019 20:49:09 + > Pretty appalled to see this abomination: > > net: Convert skb_frag_t to bio_vec > > There are a lot of users of frag->page_offset, so use a union > to avoid converting those users today. > > Signed-off-by: Matthew Wilcox (Oracle) > Sign

Re: [PATCH v2 0/3 net-next] Finish conversion of skb_frag_t to bio_vec

2019-07-30 Thread David Miller
From: Jonathan Lemon Date: Tue, 30 Jul 2019 07:40:31 -0700 > The recent conversion of skb_frag_t to bio_vec did not include > skb_frag's page_offset. Add accessor functions for this field, > utilize them, and remove the union, restoring the original structure. > > v2: > - rename accessors >

Re: [PATCH v2 bpf-next 01/12] libbpf: add .BTF.ext offset relocation section loading

2019-07-30 Thread Song Liu
> On Jul 30, 2019, at 12:53 PM, Andrii Nakryiko wrote: > > Add support for BPF CO-RE offset relocations. Add section/record > iteration macros for .BTF.ext. These macro are useful for iterating over > each .BTF.ext record, either for dumping out contents or later for BPF > CO-RE relocation han

Re: [PATCHv2 net-next 0/5] sctp: clean up __sctp_connect function

2019-07-30 Thread David Miller
From: Marcelo Ricardo Leitner Date: Tue, 30 Jul 2019 16:42:31 -0300 > On Tue, Jul 30, 2019 at 08:38:18PM +0800, Xin Long wrote: >> This patchset is to factor out some common code for >> sctp_sendmsg_new_asoc() and __sctp_connect() into 2 >> new functioins. >> >> v1->v2: >> - add the patch 1/5

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

2019-07-30 Thread Jakub Kicinski
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 text leaks. Make the TCP socket underlying an offloa

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-07-30 Thread David Miller
From: Denis Kirjanov Date: Tue, 30 Jul 2019 21:19:46 +0300 > On Tuesday, July 30, 2019, David Miller wrote: > >> From: Denis Kirjanov >> Date: Tue, 30 Jul 2019 15:13:57 +0200 >> >> > get_registers() may fail with -ENOMEM and in this >> > case we can read a garbage from the status variable tmp.

Re: [patch net-next 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-30 Thread Jiri Pirko
Tue, Jul 30, 2019 at 07:14:11PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 30 Jul 2019 08:06:55 +0200, Jiri Pirko wrote: >> >> diff --git a/drivers/net/netdevsim/netdevsim.h >> >> b/drivers/net/netdevsim/netdevsim.h >> >> index 79c05af2a7c0..cdf53d0e0c49 100644 >> >> --- a/drivers/net/netd

[PATCH bpf-next v2] tools: bpftool: add support for reporting the effective cgroup progs

2019-07-30 Thread Jakub Kicinski
Takshak said in the original submission: With different bpf attach_flags available to attach bpf programs specially with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI, the list of effective bpf-programs available to any sub-cgroups really needs to be available for easy debugging. Using BPF_F_QUERY_E

Re: [PATCH bpf-next] tools: bpftool: add support for reporting the effective cgroup progs

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 18:04:53 +, Takshak Chahande wrote: > Jakub Kicinski wrote on Mon [2019-Jul-29 > 14:35:38 -0700]: > > @@ -158,20 +161,30 @@ static int show_attached_bpf_progs(int cgroup_fd, > > enum bpf_attach_type type, > > static int do_show(int argc, char **argv) > > { > > enum

Re: [PATCH v2 0/3 net-next] Finish conversion of skb_frag_t to bio_vec

2019-07-30 Thread Jens Axboe
On 7/30/19 8:40 AM, Jonathan Lemon wrote: > The recent conversion of skb_frag_t to bio_vec did not include > skb_frag's page_offset. Add accessor functions for this field, > utilize them, and remove the union, restoring the original structure. You can add: Reviewed-by: Jens Axboe Pretty appall

Re: [PATCH v2 0/3 net-next] Finish conversion of skb_frag_t to bio_vec

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 07:40:31 -0700, Jonathan Lemon wrote: > The recent conversion of skb_frag_t to bio_vec did not include > skb_frag's page_offset. Add accessor functions for this field, > utilize them, and remove the union, restoring the original structure. Reviewed-by: Jakub Kicinski Thanks!

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-30 Thread Andy Lutomirski
On Mon, Jul 29, 2019 at 10:07 PM Song Liu wrote: > > Hi Andy, > > > On Jul 27, 2019, at 11:20 AM, Song Liu wrote: > > > > Hi Andy, > > > > > > Well, yes. sys_bpf() is pretty powerful. > > The goal of /dev/bpf is to enable special users to call sys_bpf(). In > the mean

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-30 Thread Andy Lutomirski
On Sat, Jul 27, 2019 at 11:20 AM Song Liu wrote: > > Hi Andy, > > > >>> > >>> Well, yes. sys_bpf() is pretty powerful. > >>> > >>> The goal of /dev/bpf is to enable special users to call sys_bpf(). In > >>> the meanwhile, such users should not take down the whole system easily > >>> by accide

Re: [net-next 08/13] net/mlx5e: Protect tc flows hashtable with rcu

2019-07-30 Thread Saeed Mahameed
On Tue, 2019-07-30 at 12:37 -0400, Willem de Bruijn wrote: > On Tue, Jul 30, 2019 at 12:16 PM Willem de Bruijn > wrote: > > On Mon, Jul 29, 2019 at 7:50 PM Saeed Mahameed > > wrote: > > > From: Vlad Buslov > > > > > > In order to remove dependency on rtnl lock, access to tc flows > > > hashtabl

Re: [net-next 01/13] net/mlx5e: Print a warning when LRO feature is dropped or not allowed

2019-07-30 Thread Saeed Mahameed
On Tue, 2019-07-30 at 11:52 -0400, Willem de Bruijn wrote: > On Mon, Jul 29, 2019 at 7:50 PM Saeed Mahameed > wrote: > > From: Huy Nguyen > > > > When user enables LRO via ethtool and if the RQ mode is legacy, > > mlx5e_fix_features drops the request without any explanation. > > Add netdev_warn

Re: [PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Andrii Nakryiko
On Tue, Jul 30, 2019 at 11:48 AM Daniel T. Lee wrote: > > Currently, bpftool net only supports dumping progs loaded on the > interface. To load XDP prog on interface, user must use other tool > (eg. iproute2). By this patch, with `bpftool net (un)load`, user can > (un)load XDP prog on interface. >

Re: [RFC PATCH net-next 0/3] net: batched receive in GRO path

2019-07-30 Thread Edward Cree
On 24/07/2019 22:49, Edward Cree wrote: > One thing that's causing me some uncertainty: busy_poll_stop() does a >  napi->poll(), which can potentially gro_normal_one() something.  But >  when I tried to put a gro_normal_list() just after that, I ran into >  list corruption because it could race aga

[PATCH v2 bpf-next 11/12] selftests/bpf: add CO-RE relocs ints tests

2019-07-30 Thread Andrii Nakryiko
Add various tests validating handling compatible/incompatible integer types. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 40 +++ .../bpf/progs/btf__core_reloc_ints.c | 3 + .../bpf/progs/btf__core_reloc_ints___bool.c |

[PATCH v2 bpf-next 03/12] selftests/bpf: add BPF_CORE_READ relocatable read macro

2019-07-30 Thread Andrii Nakryiko
Add BPF_CORE_READ macro used in tests to do bpf_core_read(), which automatically captures offset relocation. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/bpf_helpers.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_helpe

[PATCH v2 bpf-next 09/12] selftests/bpf: add CO-RE relocs modifiers/typedef tests

2019-07-30 Thread Andrii Nakryiko
Add tests validating correct handling of various combinations of typedefs and const/volatile/restrict modifiers. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 27 +++ .../bpf/progs/btf__core_reloc_mods.c | 3 + .../progs/btf_

[PATCH v2 bpf-next 12/12] selftests/bpf: add CO-RE relocs misc tests

2019-07-30 Thread Andrii Nakryiko
Add tests validating few edge-cases of capturing offset relocations. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 19 ++ .../bpf/progs/btf__core_reloc_misc.c | 4 ++ .../selftests/bpf/progs/core_reloc_types.h| 25 .../bpf/progs/tes

[PATCH v2 bpf-next 04/12] selftests/bpf: add CO-RE relocs testing setup

2019-07-30 Thread Andrii Nakryiko
Add CO-RE relocation test runner. Add one simple test validating that libbpf's logic for searching for kernel image and loading BTF out of it works. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 125 ++ .../bpf/progs/test_c

[PATCH v2 bpf-next 01/12] libbpf: add .BTF.ext offset relocation section loading

2019-07-30 Thread Andrii Nakryiko
Add support for BPF CO-RE offset relocations. Add section/record iteration macros for .BTF.ext. These macro are useful for iterating over each .BTF.ext record, either for dumping out contents or later for BPF CO-RE relocation handling. To enable other parts of libbpf to work with .BTF.ext contents

[PATCH v2 bpf-next 06/12] selftests/bpf: add CO-RE relocs nesting tests

2019-07-30 Thread Andrii Nakryiko
Add a bunch of test validating correct handling of nested structs/unions. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 39 +++ .../bpf/progs/btf__core_reloc_nesting.c | 3 + .../btf__core_reloc_nesting___anon_embed.c| 3 +

[PATCH v2 bpf-next 00/12] CO-RE offset relocations

2019-07-30 Thread Andrii Nakryiko
This patch set implements central part of CO-RE (Compile Once - Run Everywhere, see [0] and [1] for slides and video): relocating fields offsets. Most of the details are written down as comments to corresponding parts of the code. Patch #1 adds loading of .BTF.ext offset relocations section and ma

[PATCH v2 bpf-next 08/12] selftests/bpf: add CO-RE relocs enum/ptr/func_proto tests

2019-07-30 Thread Andrii Nakryiko
Test CO-RE relocation handling of ints, enums, pointers, func protos, etc. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 36 ++ .../bpf/progs/btf__core_reloc_primitives.c| 3 + ...f__core_reloc_primitives___diff_enum_def.c |

[PATCH v2 bpf-next 07/12] selftests/bpf: add CO-RE relocs array tests

2019-07-30 Thread Andrii Nakryiko
Add tests for various array handling/relocation scenarios. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 41 ++ .../bpf/progs/btf__core_reloc_arrays.c| 3 + .../btf__core_reloc_arrays___diff_arr_dim.c | 3 + ...btf__cor

[PATCH v2 bpf-next 10/12] selftests/bpf: add CO-RE relocs ptr-as-array tests

2019-07-30 Thread Andrii Nakryiko
Add test validating correct relocation handling for cases where pointer to something is used as an array. E.g.: int *ptr = ...; int x = ptr[42]; Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 20 + .../bpf/progs/btf__core_r

[PATCH v2 bpf-next 05/12] selftests/bpf: add CO-RE relocs struct flavors tests

2019-07-30 Thread Andrii Nakryiko
Add tests verifying that BPF program can use various struct/union "flavors" to extract data from the same target struct/union. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/core_reloc.c | 34 ++ .../bpf/progs/btf__core_reloc_flavors.c | 3

[PATCH v2 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-07-30 Thread Andrii Nakryiko
This patch implements the core logic for BPF CO-RE offsets relocations. Every instruction that needs to be relocated has corresponding bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying to match recorded "local" relocation spec against potentially many compatible "target" type

Re: [PATCHv2 net-next 0/5] sctp: clean up __sctp_connect function

2019-07-30 Thread Marcelo Ricardo Leitner
On Tue, Jul 30, 2019 at 08:38:18PM +0800, Xin Long wrote: > This patchset is to factor out some common code for > sctp_sendmsg_new_asoc() and __sctp_connect() into 2 > new functioins. > > v1->v2: > - add the patch 1/5 to avoid a slab-out-of-bounds warning. > - add some code comment for the che

Re: [PATCH net v2] ipvs: Improve robustness to the ipvs sysctl

2019-07-30 Thread Julian Anastasov
Hello, On Tue, 30 Jul 2019, hujunwei wrote: > From: Junwei Hu > > The ipvs module parse the user buffer and save it to sysctl, > then check if the value is valid. invalid value occurs > over a period of time. > Here, I add a variable, struct ctl_table tmp, used to read > the value fro

Re: [PATCHv2 net-next 1/5] sctp: only copy the available addr data in sctp_transport_init

2019-07-30 Thread Marcelo Ricardo Leitner
On Tue, Jul 30, 2019 at 08:38:19PM +0800, Xin Long wrote: > 'addr' passed to sctp_transport_init is not always a whole size > of union sctp_addr, like the path: > > sctp_sendmsg() -> > sctp_sendmsg_new_asoc() -> > sctp_assoc_add_peer() -> > sctp_transport_new() -> sctp_transport_init() >

Re: [PATCH nf] netfilter: nf_tables: map basechain priority to hardware priority

2019-07-30 Thread Marcelo Ricardo Leitner
On Tue, Jul 30, 2019 at 12:54:17PM +0200, Pablo Neira Ayuso wrote: > This patch maps basechain netfilter priorities from -8192 to 8191 to > hardware priority 0xC000 + 1. tcf_auto_prio() uses 0xC000 if the user > specifies no priority, then it subtract 1 for each new tcf_proto object. > This patch u

Re: [net 1/1] tipc: fix unitilized skb list crash

2019-07-30 Thread Xin Long
- Original Message - > Our test suite somtimes provokes the following crash: > > Description of problem: > [ 1092.597234] BUG: unable to handle kernel NULL pointer dereference at > 00e8 > [ 1092.605072] PGD 0 P4D 0 > [ 1092.607620] Oops: [#1] SMP PTI > [ 1092.68] CP

Re: [PATCH v4 net-next 13/19] ionic: Add initial ethtool support

2019-07-30 Thread Shannon Nelson
On 7/24/19 5:17 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: Add in the basic ethtool callbacks for device information and control. Signed-off-by: Shannon Nelson --- + + while (test_and_set_bit(LIF_QUEUE_RESET, lif->state)) + usleep_

[PATCH 2/2] tools: bpftool: add net unload command to unload XDP on interface

2019-07-30 Thread Daniel T. Lee
By this commit, using `bpftool net unload`, the loaded XDP prog can be unloaded. Unloading the BPF prog will be done through libbpf 'bpf_set_link_xdp_fd' with the progfd set to -1. Signed-off-by: Daniel T. Lee --- tools/bpf/bpftool/net.c | 55 - 1 file cha

[PATCH 1/2] tools: bpftool: add net load command to load XDP on interface

2019-07-30 Thread Daniel T. Lee
By this commit, using `bpftool net load`, user can load XDP prog on interface. New type of enum 'net_load_type' has been made, as stated at cover-letter, the meaning of 'load' is, prog will be loaded on interface. BPF prog will be loaded through libbpf 'bpf_set_link_xdp_fd'. Signed-off-by: Daniel

[PATCH 0/2] tools: bpftool: add net (un)load command to load XDP

2019-07-30 Thread Daniel T. Lee
Currently, bpftool net only supports dumping progs loaded on the interface. To load XDP prog on interface, user must use other tool (eg. iproute2). By this patch, with `bpftool net (un)load`, user can (un)load XDP prog on interface. $ ./bpftool prog ... 208: xdp name xdp_prog1 tag ad

Re: [PATCH v4 net-next 09/19] ionic: Add the basic NDO callbacks for netdev support

2019-07-30 Thread Shannon Nelson
On 7/24/19 4:45 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on the device, but no traffic yet. Signed-off-by: Shanno

Re: [PATCH v4 net-next 12/19] ionic: Add async link status check and basic stats

2019-07-30 Thread Shannon Nelson
On 7/24/19 5:04 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: Add code to handle the link status event, and wire up the basic netdev hardware stats. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 116 ++

Re: [PATCH v4 net-next 08/19] ionic: Add notifyq support

2019-07-30 Thread Shannon Nelson
On 7/24/19 4:21 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: The AdminQ is fine for sending messages and requests to the NIC, but we also need to have events published from the NIC to the driver. The NotifyQ handles this for us, using the same interrupt as

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-07-30 Thread Denis Kirjanov
On 7/30/19, David Miller wrote: > From: Denis Kirjanov > Date: Tue, 30 Jul 2019 15:13:57 +0200 > >> get_registers() may fail with -ENOMEM and in this >> case we can read a garbage from the status variable tmp. >> >> Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com >> Signed-off-

[net 1/1] tipc: fix unitilized skb list crash

2019-07-30 Thread Jon Maloy
Our test suite somtimes provokes the following crash: Description of problem: [ 1092.597234] BUG: unable to handle kernel NULL pointer dereference at 00e8 [ 1092.605072] PGD 0 P4D 0 [ 1092.607620] Oops: [#1] SMP PTI [ 1092.68] CPU: 37 PID: 0 Comm: swapper/37 Kdump: loaded Not

[PATCH v2 bpf-next] selftests/bpf: fix clearing buffered output between tests/subtests

2019-07-30 Thread Andrii Nakryiko
Clear buffered output once test or subtests finishes even if test was successful. Not doing this leads to accumulation of output from previous tests and on first failed tests lots of irrelevant output will be dumped, greatly confusing things. v1->v2: fix Fixes tag, add more context to patch Fixes

Re: [PATCH bpf-next] tools: bpftool: add support for reporting the effective cgroup progs

2019-07-30 Thread Takshak Chahande
Jakub Kicinski wrote on Mon [2019-Jul-29 14:35:38 -0700]: > Takshak said in the original submission: > > With different bpf attach_flags available to attach bpf programs specially > with BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI, the list of effective > bpf-programs available to any sub-cgroups

[PATCH bpf-next] selftests/bpf: fix clearing buffered output between tests/subtests

2019-07-30 Thread Andrii Nakryiko
Clear buffered output once test or subtests finishes even if test was successful. Not doing this leads to accumulation of output from previous tests and on first failed tests lots of irrelevant output will be dumped, greatly confusing things. Fixed: 3a516a0a3a7b ("selftests/bpf: add sub-tests supp

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-07-30 Thread David Miller
From: Denis Kirjanov Date: Tue, 30 Jul 2019 15:13:57 +0200 > get_registers() may fail with -ENOMEM and in this > case we can read a garbage from the status variable tmp. > > Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com > Signed-off-by: Denis Kirjanov Why did you post this

Re: [patch net-next 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-30 Thread Jakub Kicinski
On Tue, 30 Jul 2019 08:06:55 +0200, Jiri Pirko wrote: > >> diff --git a/drivers/net/netdevsim/netdevsim.h > >> b/drivers/net/netdevsim/netdevsim.h > >> index 79c05af2a7c0..cdf53d0e0c49 100644 > >> --- a/drivers/net/netdevsim/netdevsim.h > >> +++ b/drivers/net/netdevsim/netdevsim.h > >> @@ -19,6 +1

  1   2   >