[PATCH] ss: in --numeric mode, print raw numbers for data rates

2019-07-01 Thread Tomasz Torcz
ss by default shows data rates in human-readable form - as Mbps/Gbps etc. Enhance --numeric mode to show raw values in bps, without conversion. Signed-of-by: Tomasz Torcz --- man/man8/ss.8 | 2 +- misc/ss.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/man/man

[iproute2] Can't create ip6 tunnel device

2019-07-01 Thread Ji Jianwen
Hello there, I got error when creating ip6 tunnel device on a rhel-8.0.0 system. Here are the steps to reproduce the issue. # # uname -r 4.18.0-80.el8.x86_64 # dnf install -y libcap-devel bison flex git gcc # git clone git://git.kernel.org/pub/scm/network/iproute2/iproute2.git # cd iproute2 &&

Re: [for-next V2 10/10] RDMA/core: Provide RDMA DIM support for ULPs

2019-07-01 Thread Leon Romanovsky
On Mon, Jul 01, 2019 at 10:36:41PM -0700, Sagi Grimberg wrote: > Hey Idan, > > > " Please don't. This is a bad choice to opt it in by default." > > > > I disagree here. I'd prefer Linux to have good out of the box experience > > (e.g. reach 100G in 4K NVMeOF on Intel servers) with the default > >

[PATCH net-next] r8169: add random MAC address fallback

2019-07-01 Thread Heiner Kallweit
>From 1c8bacf724f1450e5256c68fbff407305faf9cbd Mon Sep 17 00:00:00 2001 Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 40 +++ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/driver

Re: [PATCH bpf-next] libbpf: fix GCC8 warning for strncpy

2019-07-01 Thread Y Song
On Mon, Jul 1, 2019 at 10:47 PM Andrii Nakryiko wrote: > > GCC8 started emitting warning about using strncpy with number of bytes > exactly equal destination size, which is generally unsafe, as can lead > to non-zero terminated string being copied. Use IFNAMSIZ - 1 as number > of bytes to ensure n

[PATCH net-next] Revert "r8169: improve handling VLAN tag"

2019-07-01 Thread Heiner Kallweit
This reverts commit 759d095741721888b6ee51afa74e0a66ce65e974. The patch was based on a misunderstanding. As Al Viro pointed out [0] it's simply wrong on big endian. So let's revert it. [0] https://marc.info/?t=15620097564&r=1&w=2 Reported-by: Al Viro Signed-off-by: Heiner Kallweit --- dri

[PATCH bpf-next] libbpf: fix GCC8 warning for strncpy

2019-07-01 Thread Andrii Nakryiko
GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size, which is generally unsafe, as can lead to non-zero terminated string being copied. Use IFNAMSIZ - 1 as number of bytes to ensure name is always zero-terminated. Cc: Magnus Karlsson Signed-off-by

Re: [for-next V2 10/10] RDMA/core: Provide RDMA DIM support for ULPs

2019-07-01 Thread Sagi Grimberg
Hey Idan, " Please don't. This is a bad choice to opt it in by default." I disagree here. I'd prefer Linux to have good out of the box experience (e.g. reach 100G in 4K NVMeOF on Intel servers) with the default parameters. Especially since Yamin have shown it is beneficial / not hurting in te

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Alexander Aring
Hi Matteo, On Sun, Jun 30, 2019 at 09:29:33PM +0200, Matteo Croce wrote: > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the >

Re: [PATCH bpf-next v2] virtio_net: add XDP meta data support

2019-07-01 Thread Yuya Kusakabe
On 7/2/19 12:59 PM, Jason Wang wrote: > > On 2019/7/2 上午11:15, Yuya Kusakabe wrote: >> This adds XDP meta data support to both receive_small() and >> receive_mergeable(). >> >> Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") >> Signed-off-by: Yuya Kusakabe >> --- >> v2: >>   - kee

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 19.28, santosh.shilim...@oracle.com wrote: >> > Below. All command timeouts are 60 seconds. > > enum { >     MLX4_CMD_TIME_CLASS_A   = 6, >     MLX4_CMD_TIME_CLASS_B   = 6, >     MLX4_CMD_TIME_CLASS_C   = 6, > }; > Thank you for the pointer. >

Re: [PATCH net-next 3/3] macsec: add brackets and indentation after calling macsec_decrypt

2019-07-01 Thread Andreas Steinmetz
Ouch, I missed that when Andreas sent me that patch before. No, it is > actually intended. If we skip macsec_decrypt(), we should still > account for that packet in the InPktsUnchecked/InPktsDelayed > counters. That's in Figure 10-5 in the standard. > > Thanks for catching this, Willem. That patch

RE: [PATCH net-next 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-01 Thread Parav Pandit
Hi Jakub, > -Original Message- > From: Jakub Kicinski > Sent: Tuesday, July 2, 2019 4:57 AM > To: Jiri Pirko > Cc: Parav Pandit ; netdev@vger.kernel.org; Saeed > Mahameed > Subject: Re: [PATCH net-next 1/3] devlink: Introduce PCI PF port flavour and > port attribute > > On Mon, 1 Jul

Re: [PATCH net 2/2] macsec: fix checksumming after decryption

2019-07-01 Thread Andreas Steinmetz
On Sun, 2019-06-30 at 21:47 -0400, Willem de Bruijn wrote: > On Sun, Jun 30, 2019 at 4:48 PM Andreas Steinmetz > wrote: > > Fix checksumming after decryption. > > > > Signed-off-by: Andreas Steinmetz > > > > --- a/drivers/net/macsec.c 2019-06-30 22:14:10.250285314 +0200 > > +++ b/drivers/n

Re: [PATCH bpf-next v2] virtio_net: add XDP meta data support

2019-07-01 Thread Jason Wang
On 2019/7/2 上午11:15, Yuya Kusakabe wrote: This adds XDP meta data support to both receive_small() and receive_mergeable(). Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed-off-by: Yuya Kusakabe --- v2: - keep copy untouched in page_to_skb(). - preserve the vnet heade

[Patch net] bonding: validate ip header before check IPPROTO_IGMP

2019-07-01 Thread Cong Wang
bond_xmit_roundrobin() checks for IGMP packets but it parses the IP header even before checking skb->protocol. We should validate the IP header with pskb_may_pull() before using iph->protocol. Reported-and-tested-by: syzbot+e5be16aa39ad6e755...@syzkaller.appspotmail.com Fixes: a2fd940f4cff ("bond

Re: [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support

2019-07-01 Thread Ilias Apalodimas
Hi David [...] > > Series applied, thanks. > > I realize from the discussion on patch #3 there will be follow-ups to this. Yea, small cosmetic changes. I'll send them shortly Thanks /Ilias

[PATCH bpf-next v2] virtio_net: add XDP meta data support

2019-07-01 Thread Yuya Kusakabe
This adds XDP meta data support to both receive_small() and receive_mergeable(). Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed-off-by: Yuya Kusakabe --- v2: - keep copy untouched in page_to_skb(). - preserve the vnet header in receive_small(). - fix indentation. --- d

Re: [Patch net 0/3] idr: fix overflow cases on 32-bit CPU

2019-07-01 Thread Cong Wang
On Mon, Jul 1, 2019 at 7:37 PM Matthew Wilcox wrote: > > On Mon, Jul 01, 2019 at 07:16:00PM -0700, David Miller wrote: > > From: Cong Wang > > Date: Fri, 28 Jun 2019 11:03:40 -0700 > > > > > idr_get_next_ul() is problematic by design, it can't handle > > > the following overflow case well on 32-b

Re: [PATCH net-next v4 1/4] gve: Add basic driver framework for Compute Engine Virtual NIC

2019-07-01 Thread Jakub Kicinski
On Mon, 1 Jul 2019 15:57:52 -0700, Catherine Sullivan wrote: > Add a driver framework for the Compute Engine Virtual NIC that will be > available in the future. > > At this point the only functionality is loading the driver. > > Signed-off-by: Catherine Sullivan > Signed-off-by: Sagi Shahar >

Re: [Patch net 0/3] idr: fix overflow cases on 32-bit CPU

2019-07-01 Thread David Miller
From: Matthew Wilcox Date: Mon, 1 Jul 2019 19:37:30 -0700 > On Mon, Jul 01, 2019 at 07:16:00PM -0700, David Miller wrote: >> From: Cong Wang >> Date: Fri, 28 Jun 2019 11:03:40 -0700 >> >> > idr_get_next_ul() is problematic by design, it can't handle >> > the following overflow case well on 32-b

Re: [Patch net 0/3] idr: fix overflow cases on 32-bit CPU

2019-07-01 Thread Matthew Wilcox
On Mon, Jul 01, 2019 at 07:16:00PM -0700, David Miller wrote: > From: Cong Wang > Date: Fri, 28 Jun 2019 11:03:40 -0700 > > > idr_get_next_ul() is problematic by design, it can't handle > > the following overflow case well on 32-bit CPU: > > > > u32 id = UINT_MAX; > > idr_alloc_u32(&id); > > whi

Re: [PATCH net-next v4 0/4] Add gve driver

2019-07-01 Thread David Miller
From: Catherine Sullivan Date: Mon, 1 Jul 2019 15:57:51 -0700 > This patch series adds the gve driver which will support the > Compute Engine Virtual NIC that will be available in the future. ... Series applied to net-next, thanks.

Re: [PATCHv3 next 0/3] blackhole device to invalidate dst

2019-07-01 Thread David Miller
From: Mahesh Bandewar Date: Mon, 1 Jul 2019 14:38:43 -0700 ... > The idea here is to not alter the data-path with additional > locks or smb()/rmb() barriers to avoid racy assignments but > to create a new device that has really low MTU that has > .ndo_start_xmit essentially a kfree_skb(). Make

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread santosh . shilimkar
On 7/1/19 2:06 PM, Gerd Rausch wrote: Hi Santosh, On 01/07/2019 14.00, santosh.shilim...@oracle.com wrote: Look for command timeout in CX3 sources. 60 second is upper bound in CX3. Its not standard in specs(at least not that I know) though and may vary from vendor to vendor. I am not se

Re: [PATCH 0/3, net-next, v2] net: netsec: Add XDP Support

2019-07-01 Thread David Miller
From: Ilias Apalodimas Date: Sat, 29 Jun 2019 08:23:22 +0300 > This is a respin of https://www.spinics.net/lists/netdev/msg526066.html > Since page_pool API fixes are merged into net-next we can now safely use > it's DMA mapping capabilities. > > First patch changes the buffer allocation from

Re: [PATCH net] net/tls: make sure offload also gets the keys wiped

2019-07-01 Thread David Miller
From: Jakub Kicinski Date: Fri, 28 Jun 2019 16:11:39 -0700 > Commit 86029d10af18 ("tls: zero the crypto information from tls_context > before freeing") added memzero_explicit() calls to clear the key material > before freeing struct tls_context, but it missed tls_device.c has its > own way of fre

Re: [PATCH net] net/tls: reject offload of TLS 1.3

2019-07-01 Thread David Miller
From: Jakub Kicinski Date: Fri, 28 Jun 2019 16:07:59 -0700 > Neither drivers nor the tls offload code currently supports TLS > version 1.3. Check the TLS version when installing connection > state. TLS 1.3 will just fallback to the kernel crypto for now. > > Fixes: 130b392c6cd6 ("net: tls: Add t

Re: [PATCH net-next 1/1] tc-testing: added tdc tests for prio qdisc

2019-07-01 Thread David Miller
From: Roman Mashak Date: Fri, 28 Jun 2019 17:32:01 -0400 > Signed-off-by: Roman Mashak Applied.

Re: [PATCH net-next 0/2] Fix batched event generation for mirred action

2019-07-01 Thread David Miller
From: Roman Mashak Date: Fri, 28 Jun 2019 14:30:16 -0400 > When adding or deleting a batch of entries, the kernel sends upto > TCA_ACT_MAX_PRIO entries in an event to user space. However it does not > consider that the action sizes may vary and require different skb sizes. > > For example : > >

Re: [Patch net 0/3] idr: fix overflow cases on 32-bit CPU

2019-07-01 Thread David Miller
From: Cong Wang Date: Fri, 28 Jun 2019 11:03:40 -0700 > idr_get_next_ul() is problematic by design, it can't handle > the following overflow case well on 32-bit CPU: > > u32 id = UINT_MAX; > idr_alloc_u32(&id); > while (idr_get_next_ul(&id) != NULL) > id++; > > when 'id' overflows and becomes

Re: [net-next 1/1] tipc: embed jiffies in macro TIPC_BC_RETR_LIM

2019-07-01 Thread David Miller
From: Jon Maloy Date: Fri, 28 Jun 2019 17:06:20 +0200 > The macro TIPC_BC_RETR_LIM is always used in combination with 'jiffies', > so we can just as well perform the addition in the macro itself. This > way, we get a few shorter code lines and one less line break. > > Signed-off-by: Jon Maloy

Re: [PATCH net v3] vxlan: do not destroy fdb if register_netdevice() is failed

2019-07-01 Thread David Miller
From: Taehee Yoo Date: Fri, 28 Jun 2019 14:07:25 +0900 > __vxlan_dev_create() destroys FDB using specific pointer which indicates > a fdb when error occurs. > But that pointer should not be used when register_netdevice() fails because > register_netdevice() internally destroys fdb when error occu

Re: [PATCH net] sctp: fix error handling on stream scheduler initialization

2019-07-01 Thread David Miller
From: Marcelo Ricardo Leitner Date: Thu, 27 Jun 2019 19:48:10 -0300 > It allocates the extended area for outbound streams only on sendmsg > calls, if they are not yet allocated. When using the priority > stream scheduler, this initialization may imply into a subsequent > allocation, which may fa

Re: [Patch net] netrom: fix a memory leak in nr_rx_frame()

2019-07-01 Thread David Miller
From: Cong Wang Date: Thu, 27 Jun 2019 14:30:58 -0700 > When the skb is associated with a new sock, just assigning > it to skb->sk is not sufficient, we have to set its destructor > to free the sock properly too. > > Reported-by: syzbot+d6636a36d3c34bd88...@syzkaller.appspotmail.com > Signed-off

Re: [PATCH net-next v2 00/16] mlxsw: PTP timestamping support

2019-07-01 Thread David Miller
From: Ido Schimmel Date: Sun, 30 Jun 2019 09:04:44 +0300 > This is the second patchset adding PTP support in mlxsw. Next patchset > will add PTP shapers which are required to maintain accuracy under rates > lower than 40Gb/s, while subsequent patchsets will add tracepoints and > selftests. ...

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

2019-07-01 Thread Andy Lutomirski
On Mon, Jul 1, 2019 at 2:03 AM Song Liu wrote: > > Hi Andy, > > Thanks for these detailed analysis. > > > On Jun 30, 2019, at 8:12 AM, Andy Lutomirski wrote: > > > > On Fri, Jun 28, 2019 at 12:05 PM Song Liu wrote: > >> > >> Hi Andy, > >> > >>> On Jun 27, 2019, at 4:40 PM, Andy Lutomirski wrote

Re: [PATCH RESEND 4.9.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
On Jul 1, 2019, at 6:51 PM, David Miller wrote: > I just tried to apply this with "git am" to the current v4.19 -stable > branch and it failed. This is only needed for the v4.9 stable kernel, ndo_busy_poll (and this NPE) went away in kernel 4.11. Sorry, I probably should have called that out m

Re: [PATCH RESEND 4.9.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread David Miller
From: Josh Elsasser Date: Mon, 1 Jul 2019 16:41:43 -0700 > No changes since V2[1], resent as per discussiond on -stable[2]. I hope > this is the correct way to send net fixes for older LTS releases, I'm > going off of the latest netdev FAQ: I just tried to apply this with "git am" to the curren

[PATCH V4] can: flexcan: fix stop mode acknowledgment

2019-07-01 Thread Joakim Zhang
To enter stop mode, the CPU should manually assert a global Stop Mode request and check the acknowledgment asserted by FlexCAN. The CPU must only consider the FlexCAN in stop mode when both request and acknowledgment conditions are satisfied. Fixes: de3578c198c6 ("can: flexcan: add self wakeup sup

Re: [PATCH bpf-next] virtio_net: add XDP meta data support

2019-07-01 Thread Yuya Kusakabe
On 7/1/19 6:30 PM, Jason Wang wrote: > > On 2019/6/27 下午4:06, Yuya Kusakabe wrote: >> This adds XDP meta data support to both receive_small() and >> receive_mergeable(). >> >> Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") >> Signed-off-by: Yuya Kusakabe >> --- >>   drivers/net/v

Re: [PATCH bpf-next 7/8] samples/bpf: add sample program that periodically dumps TCP stats

2019-07-01 Thread Y Song
On Mon, Jul 1, 2019 at 5:31 PM Stanislav Fomichev wrote: > > On 07/01, Y Song wrote: > > On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > > > > > Uses new RTT callback to dump stats every second. > > > > > > $ mkdir -p /tmp/cgroupv2 > > > $ mount -t cgroup2 none /tmp/cgroupv2 > > > $

Re: [PATCH v5 bpf-next 0/9] libbpf: add bpf_link and tracing attach APIs

2019-07-01 Thread Yonghong Song
On 7/1/19 4:58 PM, Andrii Nakryiko wrote: > This patchset adds the following APIs to allow attaching BPF programs to > tracing entities: > - bpf_program__attach_perf_event for attaching to any opened perf event FD, >allowing users full control; > - bpf_program__attach_kprobe for attaching to

Re: [PATCH bpf-next 7/8] samples/bpf: add sample program that periodically dumps TCP stats

2019-07-01 Thread Stanislav Fomichev
On 07/01, Y Song wrote: > On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > > > Uses new RTT callback to dump stats every second. > > > > $ mkdir -p /tmp/cgroupv2 > > $ mount -t cgroup2 none /tmp/cgroupv2 > > $ mkdir -p /tmp/cgroupv2/foo > > $ echo $$ >> /tmp/cgroupv2/foo/cgroup.procs >

Re: [PATCH bpf-next 6/8] selftests/bpf: test BPF_SOCK_OPS_RTT_CB

2019-07-01 Thread Y Song
On Mon, Jul 1, 2019 at 5:07 PM Stanislav Fomichev wrote: > > On 07/01, Y Song wrote: > > On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > > > > > Make sure the callback is invoked for syn-ack and data packet. > > > > > > Cc: Eric Dumazet > > > Cc: Priyaranjan Jha > > > Cc: Yuchung C

Re: [PATCH bpf-next 7/8] samples/bpf: add sample program that periodically dumps TCP stats

2019-07-01 Thread Y Song
On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > Uses new RTT callback to dump stats every second. > > $ mkdir -p /tmp/cgroupv2 > $ mount -t cgroup2 none /tmp/cgroupv2 > $ mkdir -p /tmp/cgroupv2/foo > $ echo $$ >> /tmp/cgroupv2/foo/cgroup.procs > $ bpftool prog load ./tcp_dumpstats_ker

Re: [PATCH bpf-next 6/8] selftests/bpf: test BPF_SOCK_OPS_RTT_CB

2019-07-01 Thread Stanislav Fomichev
On 07/01, Y Song wrote: > On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > > > Make sure the callback is invoked for syn-ack and data packet. > > > > Cc: Eric Dumazet > > Cc: Priyaranjan Jha > > Cc: Yuchung Cheng > > Cc: Soheil Hassas Yeganeh > > Signed-off-by: Stanislav Fomichev

[PATCH v5 bpf-next 5/9] libbpf: add tracepoint attach API

2019-07-01 Thread Andrii Nakryiko
Allow attaching BPF programs to kernel tracepoint BPF hooks specified by category and name. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Reviewed-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c | 79 tools/lib/bpf/libbpf.h | 4 ++ tools/lib/

[PATCH v5 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-07-01 Thread Andrii Nakryiko
Add ability to attach to kernel and user probes and retprobes. Implementation depends on perf event support for kprobes/uprobes. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c | 169 +++ tools/lib/bpf/libbpf.h |

[PATCH v5 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-07-01 Thread Andrii Nakryiko
Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF programs to raw tracepoints. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Reviewed-by: Stanislav Fomichev --- tools/lib/bpf/libbpf.c | 39 +++ tools/lib/bpf/libbpf.h | 3 +++

[PATCH v5 bpf-next 0/9] libbpf: add bpf_link and tracing attach APIs

2019-07-01 Thread Andrii Nakryiko
This patchset adds the following APIs to allow attaching BPF programs to tracing entities: - bpf_program__attach_perf_event for attaching to any opened perf event FD, allowing users full control; - bpf_program__attach_kprobe for attaching to kernel probes (both entry and return probes); - bpf_p

[PATCH v5 bpf-next 1/9] libbpf: make libbpf_strerror_r agnostic to sign of error

2019-07-01 Thread Andrii Nakryiko
It's often inconvenient to switch sign of error when passing it into libbpf_strerror_r. It's better for it to handle that automatically. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- tools/lib/bpf/str_error.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v5 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-07-01 Thread Andrii Nakryiko
bpf_link is an abstraction of an association of a BPF program and one of many possible BPF attachment points (hooks). This allows to have uniform interface for detaching BPF programs regardless of the nature of link and how it was created. Details of creation and setting up of a specific bpf_link i

[PATCH v5 bpf-next 9/9] selftests/bpf: convert existing tracepoint tests to new APIs

2019-07-01 Thread Andrii Nakryiko
Convert some existing tests that attach to tracepoints to use bpf_program__attach_tracepoint API instead. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../bpf/prog_tests/stacktrace_build_id.c | 55 --- .../selftests/bpf/prog_tests/s

[PATCH v5 bpf-next 8/9] selftests/bpf: add kprobe/uprobe selftests

2019-07-01 Thread Andrii Nakryiko
Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as expected. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../selftests/bpf/prog_tests/attach_probe.c | 166 ++ .../selftests/bpf/progs/test_attach_probe.c | 55 ++

[PATCH v5 bpf-next 7/9] selftests/bpf: switch test to new attach_perf_event API

2019-07-01 Thread Andrii Nakryiko
Use new bpf_program__attach_perf_event() in test previously relying on direct ioctl manipulations. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu --- .../bpf/prog_tests/stacktrace_build_id_nmi.c | 31 +-- 1 file changed, 15 insertions(+), 16

[PATCH v5 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-07-01 Thread Andrii Nakryiko
bpf_program__attach_perf_event allows to attach BPF program to existing perf event hook, providing most generic and most low-level way to attach BPF programs. It returns struct bpf_link, which should be passed to bpf_link__destroy to detach and free resources, associated with a link. Signed-off-by

[PATCH 4.4.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before following the pointer, avoidi

Re: [PATCH mlx5-next 00/18] Mellanox, mlx5 E-Switch and low level updates

2019-07-01 Thread Saeed Mahameed
On Fri, Jun 28, 2019 at 3:35 PM Saeed Mahameed wrote: > > Hi All, > > This series includes some low level updates mainly in the E-Switch > netdev and rdma vport representors areas. > > From Parav and Huy: > 1) Added hardware bits and structures definitions for sub-functions > 2) Small code clean

[PATCH RESEND 4.9.y] net: check before dereferencing netdev_ops during busy poll

2019-07-01 Thread Josh Elsasser
init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before following the pointer, avoidi

Re: [PATCH bpf-next 6/8] selftests/bpf: test BPF_SOCK_OPS_RTT_CB

2019-07-01 Thread Y Song
On Mon, Jul 1, 2019 at 1:49 PM Stanislav Fomichev wrote: > > Make sure the callback is invoked for syn-ack and data packet. > > Cc: Eric Dumazet > Cc: Priyaranjan Jha > Cc: Yuchung Cheng > Cc: Soheil Hassas Yeganeh > Signed-off-by: Stanislav Fomichev > --- > tools/testing/selftests/bpf/Makef

Re: [PATCH net-next v3 0/4] Add gve driver

2019-07-01 Thread Catherine Sullivan
Done in v4, thanks! On Sat, Jun 29, 2019 at 11:28 AM Jakub Kicinski wrote: > > On Fri, 28 Jun 2019 16:07:29 -0700, Catherine Sullivan wrote: > > This patch series adds the gve driver which will support the > > Compute Engine Virtual NIC that will be available in the future. > > Looks like buildbo

Re: [net-next 4/4] gve: Add ethtool support

2019-07-01 Thread Catherine Sullivan
On Fri, Jun 28, 2019 at 7:44 PM Florian Fainelli wrote: > > > > On 6/26/2019 11:52 AM, Catherine Sullivan wrote: > > [snip] > > > +static void > > +gve_get_ethtool_stats(struct net_device *netdev, > > + struct ethtool_stats *stats, u64 *data) > > +{ > > + struct gve_priv *pri

Re: [PATCH net-next 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-01 Thread Jakub Kicinski
On Mon, 1 Jul 2019 07:27:32 -0500, Parav Pandit wrote: > In an eswitch, PCI PF may have port which is normally represented > using a representor netdevice. > To have better visibility of eswitch port, its association with > PF, a representor netdevice and port number, introduce a PCI PF port > fla

Re: [PATCH v4 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 4:04 PM Yonghong Song wrote: > > > > On 7/1/19 3:26 PM, Andrii Nakryiko wrote: > > On Mon, Jul 1, 2019 at 10:13 AM Yonghong Song wrote: > >> > >> > >> > >> On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > >>> Add a wrapper utilizing bpf_link "infrastructure" to allow attaching

Re: [PATCH v4 bpf-next 7/9] selftests/bpf: switch test to new attach_perf_event API

2019-07-01 Thread Yonghong Song
On 7/1/19 3:32 PM, Andrii Nakryiko wrote: > On Mon, Jul 1, 2019 at 10:16 AM Yonghong Song wrote: >> >> >> >> On 6/28/19 8:49 PM, Andrii Nakryiko wrote: >>> Use new bpf_program__attach_perf_event() in test previously relying on >>> direct ioctl manipulations. >>> >>> Signed-off-by: Andrii Nakryik

Re: [PATCH v4 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-07-01 Thread Yonghong Song
On 7/1/19 3:26 PM, Andrii Nakryiko wrote: > On Mon, Jul 1, 2019 at 10:13 AM Yonghong Song wrote: >> >> >> >> On 6/28/19 8:49 PM, Andrii Nakryiko wrote: >>> Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF >>> programs to raw tracepoints. >>> >>> Signed-off-by: Andrii Nakr

Re: [PATCH v4 bpf-next 8/9] selftests/bpf: add kprobe/uprobe selftests

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 10:18 AM Yonghong Song wrote: > > > > On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > > Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as > > expected. > > > > Signed-off-by: Andrii Nakryiko > > Reviewed-by: Stanislav Fomichev > > Acked-by: Song Liu > > ---

Re: [PATCH v4 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-07-01 Thread Yonghong Song
On 7/1/19 2:57 PM, Andrii Nakryiko wrote: > On Mon, Jul 1, 2019 at 10:03 AM Yonghong Song wrote: >> >> >> >> On 6/28/19 8:49 PM, Andrii Nakryiko wrote: >>> bpf_program__attach_perf_event allows to attach BPF program to existing >>> perf event hook, providing most generic and most low-level way t

[PATCH net-next v4 0/4] Add gve driver

2019-07-01 Thread Catherine Sullivan
This patch series adds the gve driver which will support the Compute Engine Virtual NIC that will be available in the future. v2: - Patch 1: - Remove gve_size_assert.h and use static_assert instead. - Loop forever instead of bugging if the device won't reset - Use module_pci_driver - Patch 2

[PATCH net-next v4 3/4] gve: Add workqueue and reset support

2019-07-01 Thread Catherine Sullivan
Add support for the workqueue to handle management interrupts and support for resets. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo --- .../networking/device_drivers/google/gve.rst | 11 + drivers/n

[PATCH net-next v4 4/4] gve: Add ethtool support

2019-07-01 Thread Catherine Sullivan
Add support for the following ethtool commands: ethtool -s|--change devname [msglvl N] [msglevel type on|off] ethtool -S|--statistics devname ethtool -i|--driver devname ethtool -l|--show-channels devname ethtool -L|--set-channels devname ethtool -g|--show-ring devname ethtool --reset devname Sig

[PATCH net-next v4 2/4] gve: Add transmit and receive support

2019-07-01 Thread Catherine Sullivan
Add support for passing traffic. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo --- .../networking/device_drivers/google/gve.rst | 30 + drivers/net/ethernet/google/gve/Makefile | 2 +- driver

[PATCH net-next v4 1/4] gve: Add basic driver framework for Compute Engine Virtual NIC

2019-07-01 Thread Catherine Sullivan
Add a driver framework for the Compute Engine Virtual NIC that will be available in the future. At this point the only functionality is loading the driver. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo

Re: [PATCH v4 bpf-next 7/9] selftests/bpf: switch test to new attach_perf_event API

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 10:16 AM Yonghong Song wrote: > > > > On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > > Use new bpf_program__attach_perf_event() in test previously relying on > > direct ioctl manipulations. > > > > Signed-off-by: Andrii Nakryiko > > Reviewed-by: Stanislav Fomichev > > Acked-

Re: [PATCH v4 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 10:13 AM Yonghong Song wrote: > > > > On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > > Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF > > programs to raw tracepoints. > > > > Signed-off-by: Andrii Nakryiko > > Acked-by: Song Liu > > --- > > tools/

Re: [PATCH v4 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 10:09 AM Yonghong Song wrote: > > > > On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > > Add ability to attach to kernel and user probes and retprobes. > > Implementation depends on perf event support for kprobes/uprobes. > > > > Signed-off-by: Andrii Nakryiko > > --- > > too

Re: [PATCH v4 bpf-next 4/4] tools/bpftool: switch map event_pipe to libbpf's perf_buffer

2019-07-01 Thread Jakub Kicinski
On Sat, 29 Jun 2019 23:51:09 -0700, Andrii Nakryiko wrote: > Switch event_pipe implementation to rely on new libbpf perf buffer API > (it's raw low-level variant). > > Signed-off-by: Andrii Nakryiko > -int do_event_pipe(int argc, char **argv) > -{ > - int i, nfds, map_fd, index = -1, cpu = -

Re: [PATCH v4 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 10:03 AM Yonghong Song wrote: > > > > On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > > bpf_program__attach_perf_event allows to attach BPF program to existing > > perf event hook, providing most generic and most low-level way to attach BPF > > programs. It returns struct bpf_l

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:46:49PM +0100, Al Viro wrote: > already done cpu_to_le32 to the containing 32bit word. So the le32_to_cpu, sorry

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:13:56PM +0100, Al Viro wrote: > On Mon, Jul 01, 2019 at 10:36:26PM +0200, Heiner Kallweit wrote: > > > > The code dealing with the value passed to __vlan_hwaccel_put_tag() as the > > > third argument treats it as a host-endian integer. So... Has anyone > > > tested that

Re: [PATCHv3 next 2/3] blackhole_netdev: use blackhole_netdev to invalidate dst entries

2019-07-01 Thread Michael Chan
On Mon, Jul 1, 2019 at 2:39 PM Mahesh Bandewar wrote: > > Use blackhole_netdev instead of 'lo' device with lower MTU when marking > dst "dead". > > Signed-off-by: Mahesh Bandewar Tested-by: Michael Chan

Re: [PATCHv2 next 3/3] blackhole_dev: add a selftest

2019-07-01 Thread महेश बंडेवार
On Sat, Jun 29, 2019 at 12:28 PM David Miller wrote: > > From: Mahesh Bandewar > Date: Thu, 27 Jun 2019 12:43:09 -0700 > > > +config TEST_BLACKHOLE_DEV > > + tristate "Test BPF filter functionality" > > I think the tristate string needs to be changed :-) side effects of copy-paste :( sending

[PATCHv3 next 2/3] blackhole_netdev: use blackhole_netdev to invalidate dst entries

2019-07-01 Thread Mahesh Bandewar
Use blackhole_netdev instead of 'lo' device with lower MTU when marking dst "dead". Signed-off-by: Mahesh Bandewar --- v1->v2->v3 no change net/core/dst.c | 2 +- net/ipv4/route.c | 3 +-- net/ipv6/route.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/net/core/dst.c

[PATCHv3 next 3/3] blackhole_dev: add a selftest

2019-07-01 Thread Mahesh Bandewar
Since this is not really a device with all capabilities, this test ensures that it has *enough* to make it through the data path without causing unwanted side-effects (read crash!). Signed-off-by: Mahesh Bandewar --- v1 -> v2 fixed the conflict resolution in selftests Makefile v2 -> v3 fixed

[PATCHv3 next 1/3] loopback: create blackhole net device similar to loopack.

2019-07-01 Thread Mahesh Bandewar
Create a blackhole net device that can be used for "dead" dst entries instead of loopback device. This blackhole device differs from loopback in few aspects: (a) It's not per-ns. (b) MTU on this device is ETH_MIN_MTU (c) The xmit function is essentially kfree_skb(). and (d) since it's not register

[PATCHv3 next 0/3] blackhole device to invalidate dst

2019-07-01 Thread Mahesh Bandewar
When we invalidate dst or mark it "dead", we assign 'lo' to dst->dev. First of all this assignment is racy and more over, it has MTU implications. The standard dev MTU is 1500 while the Loopback MTU is 64k. TCP code when dereferencing the dst don't check if the dst is valid or not. TCP when derefe

Re: [PATCH 00/11] XDP unaligned chunk placement support

2019-07-01 Thread Jakub Kicinski
On Mon, 1 Jul 2019 15:44:29 +0100, Laatz, Kevin wrote: > On 28/06/2019 21:29, Jonathan Lemon wrote: > > On 28 Jun 2019, at 9:19, Laatz, Kevin wrote: > >> On 27/06/2019 22:25, Jakub Kicinski wrote: > >>> I think that's very limiting.  What is the challenge in providing > >>> aligned addresses, e

Re: [PATCH bpf-next 0/8] bpf: TCP RTT sock_ops bpf callback

2019-07-01 Thread Yuchung Cheng
On Mon, Jul 1, 2019 at 1:48 PM Stanislav Fomichev wrote: > > Congestion control team would like to have a periodic callback to > track some TCP statistics. Let's add a sock_ops callback that can be > selectively enabled on a socket by socket basis and is executed for > every RTT. BPF program frequ

Re: [PATCH net-next] r8169: fix ntohs/htons sparse warnings

2019-07-01 Thread Al Viro
On Mon, Jul 01, 2019 at 10:36:26PM +0200, Heiner Kallweit wrote: > > The code dealing with the value passed to __vlan_hwaccel_put_tag() as the > > third argument treats it as a host-endian integer. So... Has anyone > > tested that code on b-e host? Should that ntohs() actually be swab16(), > > y

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 14.00, santosh.shilim...@oracle.com wrote: >> > Look for command timeout in CX3 sources. 60 second is upper bound in > CX3. Its not standard in specs(at least not that I know) though > and may vary from vendor to vendor. > I am not seeing it. Can you point me to the rig

Re: [PATCH v2 bpf-next] bpf: Add support for fq's EDT to HBM

2019-07-01 Thread Yonghong Song
On 6/28/19 12:41 PM, brakmo wrote: > Adds support for fq's Earliest Departure Time to HBM (Host Bandwidth > Manager). Includes a new BPF program supporting EDT, and also updates > corresponding programs. > > It will drop packets with an EDT of more than 500us in the future > unless the packet be

Re: [PATCH bpf-next 0/8] bpf: TCP RTT sock_ops bpf callback

2019-07-01 Thread Soheil Hassas Yeganeh
On Mon, Jul 1, 2019 at 4:48 PM Stanislav Fomichev wrote: > > Congestion control team would like to have a periodic callback to > track some TCP statistics. Let's add a sock_ops callback that can be > selectively enabled on a socket by socket basis and is executed for > every RTT. BPF program frequ

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread santosh . shilimkar
On 7/1/19 1:55 PM, Gerd Rausch wrote: Hi Santosh, On 01/07/2019 13.41, santosh.shilim...@oracle.com wrote: @@ -144,7 +146,29 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)   if (printk_ratelimit())   pr_warn("RDS/IB: %s returned error(%d)\n",  

Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 13.53, santosh.shilim...@oracle.com wrote: > LOCAL_INV/REG etc are all end being HCA commands and the command timeouts are > large. 60 seconds is what CX3 HCA has for example. > Thats the worst case timeout from HCA before marking the command > to be timeout and hence th

Re: [PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
Hi Santosh, On 01/07/2019 13.41, santosh.shilim...@oracle.com wrote: >> @@ -144,7 +146,29 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) >>   if (printk_ratelimit()) >>   pr_warn("RDS/IB: %s returned error(%d)\n", >>   __func__, ret); >> +    got

Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread santosh . shilimkar
On 7/1/19 1:50 PM, Gerd Rausch wrote: Hi David, On 01/07/2019 11.27, David Miller wrote: From: Gerd Rausch Date: Mon, 1 Jul 2019 09:39:44 -0700 + /* Memory regions make it onto the "clean_list" via +* "rds_ib_flush_mr_pool", after the memory regi

Re: [PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
Hi David, On 01/07/2019 11.27, David Miller wrote: > From: Gerd Rausch > Date: Mon, 1 Jul 2019 09:39:44 -0700 > >> +/* Memory regions make it onto the "clean_list" via >> + * "rds_ib_flush_mr_pool", after the memory region has >> + * be

[PATCH bpf-next 4/8] bpf: add icsk_retransmits to bpf_tcp_sock

2019-07-01 Thread Stanislav Fomichev
Add some inet_connection_sock fields to bpf_tcp_sock that might be useful for debugging congestion control issues. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Signed-off-by: Stanislav Fomichev --- include/uapi/linux/bpf.h | 1 + net/core/filter.c

[PATCH bpf-next 6/8] selftests/bpf: test BPF_SOCK_OPS_RTT_CB

2019-07-01 Thread Stanislav Fomichev
Make sure the callback is invoked for syn-ack and data packet. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/progs/tcp_rtt.c | 61 +

  1   2   3   >