Re: Race condition in route lookup

2019-10-11 Thread Martin Lau
On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > > > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jesse Hathaway wrote: > > > On Thu, Oct 10, 2019 at 3:31 AM Ido Schimmel wrote: > > > > I think it's working as expected. Here is my th

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 9:38 PM, Andrii Nakryiko wrote: > On Fri, Oct 11, 2019 at 6:29 PM Alexei Starovoitov wrote: >> >> On 10/11/19 5:40 PM, Alexei Starovoitov wrote: But even if kernel supports attach_btf_id, I think users still need to opt in into specifying attach_btf_id by libbpf. Think about

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 5:40 PM Alexei Starovoitov wrote: > > On 10/11/19 11:07 AM, Andrii Nakryiko wrote: > > On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > >> > >> For raw tracepoint program types libbpf will try to find > >> btf_id of raw tracepoint in vmlinux's BTF. > >> It's a re

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 6:29 PM Alexei Starovoitov wrote: > > On 10/11/19 5:40 PM, Alexei Starovoitov wrote: > >> But even if kernel supports attach_btf_id, I think users still need to > >> opt in into specifying attach_btf_id by libbpf. Think about existing > >> raw_tp programs that are using bpf

Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 6:39 PM Alexei Starovoitov wrote: > > On 10/11/19 12:02 PM, Andrii Nakryiko wrote: > > On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > >> > >> /* type of values returned from helper functions */ > >> @@ -235,11 +236,17 @@ struct bpf_func_proto { > >>

Re: [patch net-next v2 0/4] netdevsim: add devlink health reporters suppor

2019-10-11 Thread David Miller
From: Jiri Pirko Date: Thu, 10 Oct 2019 15:18:47 +0200 > From: Jiri Pirko > > This patchset adds support for devlink health reporter interface > testing. First 2 patches are small dependencies of the last 2. Series applied, thanks Jiri.

[PATCH] net: ethernet: broadcom: have drivers select DIMLIB as needed

2019-10-11 Thread Randy Dunlap
tions(+), 1 deletion(-) --- linux-next-20191011.orig/drivers/net/ethernet/broadcom/Kconfig +++ linux-next-20191011/drivers/net/ethernet/broadcom/Kconfig @@ -8,7 +8,6 @@ config NET_VENDOR_BROADCOM default y depends on (SSB_POSSIBLE && HAS_DMA) || PCI || BCM63XX || \

Re: [PATCH net-next v2] net: usb: ax88179_178a: write mac to hardware in get_mac_addr

2019-10-11 Thread David Miller
From: Peter Fink Date: Thu, 10 Oct 2019 15:00:22 +0200 > From: Peter Fink > > When the MAC address is supplied via device tree or a random > MAC is generated it has to be written to the asix chip in > order to receive any data. > > Previously in 9fb137aef34e ("net: usb: ax88179_178a: allow > o

Re: ingress bandwidth limitation for ipv6 is inaccurate

2019-10-11 Thread David Miller
From: yue longguang Date: Sat, 12 Oct 2019 10:01:12 +0800 > Hi, kuznet,i am looking forward to your reply. Targetting a specific developer, especially one who hasn't actually been active in a very long time, is extremely unwise. Please set your expectations appropriately.

Re: [PATCH net 2/2] net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions

2019-10-11 Thread kbuild test robot
Hi Davide, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Davide-Caratti/net-avoid-errors-when-trying-to-pop-MLPS-header-on-non-MPLS-packets/20191012-085439 reproduce: make htmldocs If you fix the

[PATCH net-next] net: Update address for vrf and l3mdev in MAINTAINERS

2019-10-11 Thread David Ahern
From: David Ahern Use my kernel.org address for all entries in MAINTAINERS. Signed-off-by: David Ahern --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8824f61cd2c0..b431e6d5f43f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @

Re: ingress bandwidth limitation for ipv6 is inaccurate

2019-10-11 Thread yue longguang
Hi, kuznet,i am looking forward to your reply. thanks On Tue, Oct 8, 2019 at 1:53 PM yue longguang wrote: > > Firstly, thank you stephen. > > Hi, kuznet: > > 1. according to my test, bandwidth limitation is inaccurate for > ingress ipv6 . The accuracy is affected by burst. if rate is less

[PATCH net-next 2/3] vhost_net: user tap recvmsg api to access ptr ring

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole Currently vhost_net directly accesses ptr ring of tap driver to fetch Rx packet pointers. In order to avoid it this patch modifies tap driver's recvmsg api to do additional task of fetching Rx packet pointers. A special struct tun_msg_ctl is already being usedd via msg_contr

[PATCH net-next 3/3] tuntap: remove usage of ptr ring in vhost_net

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole Remove usage of ptr ring of tuntap in vhost_net and remove the functions exported from tuntap drivers to get ptr ring. Signed-off-by: Prashant Bhole --- drivers/net/tap.c | 13 - drivers/net/tun.c | 13 - drivers/vhost/net.c | 31 ---

[PATCH net-next 1/3] tuntap: reorganize tun_msg_ctl usage

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole In order to extend the usage of tun_msg_ctl structure, this patch changes the member name from type to cmd. Also following definitions are changed: TUN_MSG_PTR : TUN_CMD_BATCH TUN_MSG_UBUF: TUN_CMD_PACKET Signed-off-by: Prashant Bhole --- drivers/net/tap.c | 9 ++-

[PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg

2019-10-11 Thread prashantbhole . linux
From: Prashant Bhole vhost_net needs to peek tun packet sizes to allocate virtio buffers. Currently it directly accesses tap ptr ring to do it. Jason Wang suggested to achieve this using msghdr->msg_control and modifying the behavior of tap recvmsg. This change will be useful in future in case o

Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 12:02 PM, Andrii Nakryiko wrote: > On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: >> >> /* type of values returned from helper functions */ >> @@ -235,11 +236,17 @@ struct bpf_func_proto { >> bool gpl_only; >> bool pkt_access; >> enum bpf_return_t

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 5:40 PM, Alexei Starovoitov wrote: >> But even if kernel supports attach_btf_id, I think users still need to >> opt in into specifying attach_btf_id by libbpf. Think about existing >> raw_tp programs that are using bpf_probe_read() because they were not >> created with this kernel featu

[PATCHv3 next] blackhole_netdev: fix syzkaller reported issue

2019-10-11 Thread Mahesh Bandewar
While invalidating the dst, we assign backhole_netdev instead of loopback device. However, this device does not have idev pointer and hence no ip6_ptr even if IPv6 is enabled. Possibly this has triggered the syzbot reported crash. The syzbot report does not have reproducer, however, this is the on

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 11:07 AM, Andrii Nakryiko wrote: > On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: >> >> For raw tracepoint program types libbpf will try to find >> btf_id of raw tracepoint in vmlinux's BTF. >> It's a responsiblity of bpf program author to annotate the program >> with SEC("ra

Re: [PATCH bpf-next 1/3] bpf: preserve command of the process that loaded the program

2019-10-11 Thread Stanislav Fomichev
On 10/11, Alexei Starovoitov wrote: > On Fri, Oct 11, 2019 at 9:21 AM Stanislav Fomichev wrote: > > > > Even though we have the pointer to user_struct and can recover > > uid of the user who has created the program, it usually contains > > 0 (root) which is not very informative. Let's store the co

Re: [PATCHv2 next] blackhole_netdev: fix syzkaller reported issue

2019-10-11 Thread महेश बंडेवार
On Thu, Oct 10, 2019 at 5:37 PM Wei Wang wrote: > > On Thu, Oct 10, 2019 at 9:48 AM Mahesh Bandewar wrote: > > > > While invalidating the dst, we assign backhole_netdev instead of > > loopback device. However, this device does not have idev pointer > > and hence no ip6_ptr even if IPv6 is enabled

Re: [PATCH bpf-next 1/3] bpf: preserve command of the process that loaded the program

2019-10-11 Thread Alexei Starovoitov
On Fri, Oct 11, 2019 at 9:21 AM Stanislav Fomichev wrote: > > Even though we have the pointer to user_struct and can recover > uid of the user who has created the program, it usually contains > 0 (root) which is not very informative. Let's store the comm of the > calling process and export it via

[PATCH net-next 0/4] PTP driver refactoring for SJA1105 DSA

2019-10-11 Thread Vladimir Oltean
This series creates a better separation between the driver core and the PTP portion. Therefore, users who are not interested in PTP can get a simpler and smaller driver by compiling it out. This is in preparation for further patches: SPI transfer timestamping, synchronizing the hardware clock (as

[PATCH net-next 1/4] net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info

2019-10-11 Thread Vladimir Oltean
We need priv->ptp_caps to hold a structure and not just a pointer, because we use container_of in the various PTP callbacks. Therefore, the sja1105_ptp_caps structure declared in the global memory of the driver serves no further purpose after copying it into priv->ptp_caps. So just populate priv-

[PATCH net-next 4/4] net: dsa: sja1105: Change the PTP command access pattern

2019-10-11 Thread Vladimir Oltean
The PTP command register contains enable bits for: - Putting the 64-bit PTPCLKVAL register in add/subtract or write mode - Taking timestamps off of the corrected vs free-running clock - Starting/stopping the TTEthernet scheduling - Starting/stopping PPS output - Resetting the switch When a command

[PATCH net-next 2/4] net: dsa: sja1105: Make all public PTP functions take dsa_switch as argument

2019-10-11 Thread Vladimir Oltean
The new rule (as already started for sja1105_tas.h) is for functions of optional driver components (ones which may be disabled via Kconfig - PTP and TAS) to take struct dsa_switch *ds instead of struct sja1105_private *priv as first argument. This is so that forward-declarations of struct sja1105_

[PATCH net-next 3/4] net: dsa: sja1105: Move PTP data to its own private structure

2019-10-11 Thread Vladimir Oltean
This is a non-functional change with 2 goals (both for the case when CONFIG_NET_DSA_SJA1105_PTP is not enabled): - Reduce the size of the sja1105_private structure. - Make the PTP code more self-contained. Leaving priv->ptp_data.lock to be initialized in sja1105_main.c is not a leftover: it will

Re: [PATCH v2 bpf-next 06/12] bpf: implement accurate raw_tp context access via BTF

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 11:31 AM Andrii Nakryiko wrote: > > On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > > > libbpf analyzes bpf C program, searches in-kernel BTF for given type name > > and stores it into expected_attach_type. > > The kernel verifier expects this btf_id to point

Re: [patch net-next v2 2/4] devlink: propagate extack down to health reporter ops

2019-10-11 Thread David Ahern
On 10/11/19 12:45 AM, Johannes Berg wrote: > So to me this looks fine. > > I don't really share the concern about extack being netlink specific and > then using it here - it ultimately doesn't matter whether this thing is > called "netlink_extack" or "extended_error_reporting", IMHO. +1

[PATCH net-next 1/2] net: dsa: sja1105: Move sja1105_spi_transfer into sja1105_xfer

2019-10-11 Thread Vladimir Oltean
This is a cosmetic patch that reduces some boilerplate in the SPI interaction of the driver. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/sja1105_spi.c | 48 +-- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/drivers/net/dsa/sja1105/sja1105_

[PATCH net-next 0/2] Scatter/gather SPI for SJA1105 DSA

2019-10-11 Thread Vladimir Oltean
This is a small series that reduces the stack memory usage for the sja1105 driver. Vladimir Oltean (2): net: dsa: sja1105: Move sja1105_spi_transfer into sja1105_xfer net: dsa: sja1105: Switch to scatter/gather API for SPI drivers/net/dsa/sja1105/sja1105.h | 2 +- drivers/net/dsa/sja11

[PATCH net-next 2/2] net: dsa: sja1105: Switch to scatter/gather API for SPI

2019-10-11 Thread Vladimir Oltean
This reworks the SPI transfer implementation to make use of more of the SPI core features. The main benefit is to avoid the memcpy in sja1105_xfer_buf(). The memcpy was only needed because the function was transferring a single buffer at a time. So it needed to copy the caller-provided buffer at b

[PATCH v2 bpf-next 1/2] selftests/bpf: enforce libbpf build before BPF programs are built

2019-10-11 Thread Andrii Nakryiko
Given BPF programs rely on libbpf's bpf_helper_defs.h, which is auto-generated during libbpf build, libbpf build has to happen before we attempt progs/*.c build. Enforce it as order-only dependency. Fixes: 24f25763d6de ("libbpf: auto-generate list of BPF helper definitions") Signed-off-by: Andrii

[PATCH v2 bpf-next 2/2] selftests/bpf: remove obsolete pahole/BTF support detection

2019-10-11 Thread Andrii Nakryiko
Given lots of selftests won't work without recent enough Clang/LLVM that fully supports BTF, there is no point in maintaining outdated BTF support detection and fall-back to pahole logic. Just assume we have everything we need. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/Makef

[PATCH v2 bpf-next 0/2] selftests/bpf Makefile cleanup and fixes

2019-10-11 Thread Andrii Nakryiko
Patch #1 enforces libbpf build to have bpf_helper_defs.h ready before test BPF programs are built. Patch #2 drops obsolete BTF/pahole detection logic from Makefile. v1->v2: - drop CPU and PROBE (Martin). Andrii Nakryiko (2): selftests/bpf: enforce libbpf build before BPF programs are built se

Re: [PATCH bpf-next 3/3] bpftool: print the comm of the process that loaded the program

2019-10-11 Thread Stanislav Fomichev
On 10/11, Arnaldo Carvalho de Melo wrote: > On October 11, 2019 5:37:16 PM GMT-03:00, Stanislav Fomichev > wrote: > >On 10/11, Martin Lau wrote: > >> On Fri, Oct 11, 2019 at 09:21:24AM -0700, Stanislav Fomichev wrote: > >> > Example with loop1.o (loaded via > > > >> What will be in "comm" for th

Re: [PATCH bpf-next] libbpf: handle invalid typedef emitted by old GCC

2019-10-11 Thread Daniel Borkmann
On Thu, Oct 10, 2019 at 08:29:01PM -0700, Andrii Nakryiko wrote: > Old GCC versions are producing invalid typedef for __gnuc_va_list > pointing to void. Special-case this and emit valid: > > typedef __builtin_va_list __gnuc_va_list; > > Reported-by: John Fastabend > Signed-off-by: Andrii Nakryik

Re: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-11 Thread Neil Horman
On Sat, Oct 12, 2019 at 12:25:27AM +0800, Xin Long wrote: > On Fri, Oct 11, 2019 at 11:57 PM Xin Long wrote: > > > > On Thu, Oct 10, 2019 at 8:40 PM Neil Horman wrote: > > > > > > On Thu, Oct 10, 2019 at 05:28:34PM +0800, Xin Long wrote: > > > > On Thu, Oct 10, 2019 at 12:18 AM Neil Horman > >

Re: Race condition in route lookup

2019-10-11 Thread David Ahern
On 10/11/19 12:52 PM, Ido Schimmel wrote: > On Fri, Oct 11, 2019 at 11:47:12AM -0700, Wei Wang wrote: >> On Fri, Oct 11, 2019 at 11:25 AM Ido Schimmel wrote: >>> >>> On Fri, Oct 11, 2019 at 09:17:42PM +0300, Ido Schimmel wrote: On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > O

Re: [PATCH bpf-next] libbpf: generate more efficient BPF_CORE_READ code

2019-10-11 Thread Daniel Borkmann
On Thu, Oct 10, 2019 at 07:38:47PM -0700, Andrii Nakryiko wrote: > Existing BPF_CORE_READ() macro generates slightly suboptimal code. If > there are intermediate pointers to be read, initial source pointer is > going to be assigned into a temporary variable and then temporary > variable is going to

Re: [PATCH] xdp: Trivial, fix spelling in function description

2019-10-11 Thread Daniel Borkmann
On Fri, Oct 11, 2019 at 09:43:03AM +0100, Anton Ivanov wrote: > Signed-off-by: Anton Ivanov Applied, thanks!

Re: taprio testing - Any help?

2019-10-11 Thread Vinicius Costa Gomes
Hi, Murali Karicheri writes: > Hi Vinicius, > > On 10/11/2019 04:12 PM, Vinicius Costa Gomes wrote: >> Hi Murali, >> >> Murali Karicheri writes: >> >>> Hi, >>> >>> I am testing the taprio (802.1Q Time Aware Shaper) as part of my >>> pre-work to implement taprio hw offload and test. >>> >>> I

Re: [PATCH v2 bpf-next] bpf: fix cast to pointer from integer of different size warning

2019-10-11 Thread Daniel Borkmann
On Fri, Oct 11, 2019 at 10:20:53AM -0700, Andrii Nakryiko wrote: > Fix "warning: cast to pointer from integer of different size" when > casting u64 addr to void *. > > Fixes: a23740ec43ba ("bpf: Track contents of read-only maps as scalars") > Reported-by: kbuild test robot > Acked-by: Martin KaFa

Re: [PATCH bpf-next v3 0/2] Atomic flow dissector updates

2019-10-11 Thread Daniel Borkmann
On Fri, Oct 11, 2019 at 10:29:44AM +0200, Jakub Sitnicki wrote: > This patch set changes how bpf(BPF_PROG_ATTACH) operates on flow dissector > hook when there is already a program attached. After this change the user > is allowed to update the program in a single syscall. Please see the first > pat

Re: [PATCH bpf-next] bpf: align struct bpf_prog_stats

2019-10-11 Thread Daniel Borkmann
On Fri, Oct 11, 2019 at 11:11:40AM -0700, Eric Dumazet wrote: > Do not risk spanning these small structures on two cache lines. > > Signed-off-by: Eric Dumazet Applied, thanks!

Re: [Potential Spoof] [PATCH bpf-next 2/2] selftests/bpf: remove obsolete pahole/BTF support detection

2019-10-11 Thread Daniel Borkmann
On Fri, Oct 11, 2019 at 10:28:39AM -0700, Andrii Nakryiko wrote: > On Fri, Oct 11, 2019 at 9:21 AM Martin Lau wrote: > > On Thu, Oct 10, 2019 at 08:13:18PM -0700, Andrii Nakryiko wrote: > > > Given lots of selftests won't work without recent enough Clang/LLVM that > > > fully supports BTF, there i

Re: [PATCH bpf-next 3/3] bpftool: print the comm of the process that loaded the program

2019-10-11 Thread Arnaldo Carvalho de Melo
On October 11, 2019 5:37:16 PM GMT-03:00, Stanislav Fomichev wrote: >On 10/11, Martin Lau wrote: >> On Fri, Oct 11, 2019 at 09:21:24AM -0700, Stanislav Fomichev wrote: >> > Example with loop1.o (loaded via > >> What will be in "comm" for the python bcc script? >I guess it will be "python". But a

Re: Race condition in route lookup

2019-10-11 Thread Jesse Hathaway
On Fri, Oct 11, 2019 at 1:52 PM Ido Schimmel wrote: > I think this is fine. > > Jesse, can you please test Wei's patch? I tested with a patched kernel using the same scripts and it does seem to resolve the issue, thanks!

RE: [PATCH bpf-next] libbpf: handle invalid typedef emitted by old GCC

2019-10-11 Thread John Fastabend
Andrii Nakryiko wrote: > Old GCC versions are producing invalid typedef for __gnuc_va_list > pointing to void. Special-case this and emit valid: > > typedef __builtin_va_list __gnuc_va_list; > > Reported-by: John Fastabend > Signed-off-by: Andrii Nakryiko > --- Acked-by: John Fastabend

Re: [PATCH bpf] libbpf: fix compatibility for kernels without need_wakeup

2019-10-11 Thread John Fastabend
Magnus Karlsson wrote: > On Tue, Oct 8, 2019 at 9:29 PM John Fastabend > wrote: > > > > Magnus Karlsson wrote: > > > When the need_wakeup flag was added to AF_XDP, the format of the > > > XDP_MMAP_OFFSETS getsockopt was extended. Code was added to the kernel > > > to take care of compatibility is

Re: taprio testing - Any help?

2019-10-11 Thread Murali Karicheri
Hi Vinicius, On 10/11/2019 04:12 PM, Vinicius Costa Gomes wrote: Hi Murali, Murali Karicheri writes: Hi, I am testing the taprio (802.1Q Time Aware Shaper) as part of my pre-work to implement taprio hw offload and test. I was able to configure tap prio on my board and looking to do some tr

Re: [PATCH bpf-next 3/3] bpftool: print the comm of the process that loaded the program

2019-10-11 Thread Stanislav Fomichev
On 10/11, Martin Lau wrote: > On Fri, Oct 11, 2019 at 09:21:24AM -0700, Stanislav Fomichev wrote: > > Print recently added created_by_comm along the existing created_by_uid. > > > > Example with loop1.o (loaded via bpftool): > > 4: raw_tracepoint name nested_loops tag b9472b3ff5753ef2 gpl > >

Re: IPv6 addr and route is gone after adding port to vrf (5.2.0+)

2019-10-11 Thread David Ahern
On 10/11/19 7:57 AM, Ben Greear wrote: >> The down-up cycling is done on purpose - to clear out neigh entries and >> routes associated with the device under the old VRF. All entries must be >> created with the device in the new VRF. > > I believe I found another thing to be aware of relating to th

Re: [PATCH bpf-next 1/2] selftests/bpf: enforce libbpf build before BPF programs are built

2019-10-11 Thread Martin Lau
On Thu, Oct 10, 2019 at 08:13:17PM -0700, Andrii Nakryiko wrote: > Given BPF programs rely on libbpf's bpf_helper_defs.h, which is > auto-generated during libbpf build, libbpf build has to happen before > we attempt progs/*.c build. Enforce it as order-only dependency. Acked-by: Martin KaFai Lau

Re: [PATCH bpf-next 3/3] bpftool: print the comm of the process that loaded the program

2019-10-11 Thread Martin Lau
On Fri, Oct 11, 2019 at 09:21:24AM -0700, Stanislav Fomichev wrote: > Print recently added created_by_comm along the existing created_by_uid. > > Example with loop1.o (loaded via bpftool): > 4: raw_tracepoint name nested_loops tag b9472b3ff5753ef2 gpl > loaded_at 2019-10-10T13:38:18-070

Re: taprio testing - Any help?

2019-10-11 Thread Vinicius Costa Gomes
Hi Murali, Murali Karicheri writes: > Hi, > > I am testing the taprio (802.1Q Time Aware Shaper) as part of my > pre-work to implement taprio hw offload and test. > > I was able to configure tap prio on my board and looking to do > some traffic test and wondering how to play with the tc command

Wohltätige Spende: € 2,000,000-00 EUR

2019-10-11 Thread Herr Richard Wahl
Lieber Freund, Ich bin Herr Richard Wahl der Mega-Gewinner von $ 533M In Mega Millions Jackpot spende ich an 5 zufällige Personen, wenn Sie diese E-Mail erhalten, dann wurde Ihre E-Mail nach einem Spinball ausgewählt. Ich habe den größten Teil meines Vermögens auf eine Reihe von Wohltätigkeitso

taprio testing - Any help?

2019-10-11 Thread Murali Karicheri
Hi, I am testing the taprio (802.1Q Time Aware Shaper) as part of my pre-work to implement taprio hw offload and test. I was able to configure tap prio on my board and looking to do some traffic test and wondering how to play with the tc command to direct traffic to a specfic queue. For example

Re: [PATCH v2 bpf-next 12/12] selftests/bpf: add kfree_skb raw_tp test

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > Load basic cls_bpf program. > Load raw_tracepoint program and attach to kfree_skb raw tracepoint. > Trigger cls_bpf via prog_test_run. > At the end of test_run kernel will call kfree_skb > which will trigger trace_kfree_skb tracepoint. >

Re: [PATCH v2 bpf-next 11/12] bpf: disallow bpf_probe_read[_str] helpers

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > Disallow bpf_probe_read() and bpf_probe_read_str() helpers in > raw_tracepoint bpf programs that use in-kernel BTF to track > types of memory accesses. > > Signed-off-by: Alexei Starovoitov > --- I like it much better, thanks! Acked-b

Re: [PATCH v2 bpf-next 10/12] bpf: check types of arguments passed into helpers

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > Introduce new helper that reuses existing skb perf_event output > implementation, but can be called from raw_tracepoint programs > that receive 'struct sk_buff *' as tracepoint argument or > can walk other kernel data structures to skb p

Re: [PATCH v3 3/3] i40e: Add UDP segmentation offload support

2019-10-11 Thread Samudrala, Sridhar
On 10/11/2019 10:56 AM, Alexander Duyck wrote: On Fri, 2019-10-11 at 10:39 -0700, Samudrala, Sridhar wrote: On 10/11/2019 9:53 AM, Josh Hunt wrote: Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the i40e driver. CC: Alexander Duyck CC: Willem d

Re: Race condition in route lookup

2019-10-11 Thread Ido Schimmel
On Fri, Oct 11, 2019 at 11:47:12AM -0700, Wei Wang wrote: > On Fri, Oct 11, 2019 at 11:25 AM Ido Schimmel wrote: > > > > On Fri, Oct 11, 2019 at 09:17:42PM +0300, Ido Schimmel wrote: > > > On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > > > > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimme

[PATCH v1 2/3] net: bcmgenet: use optional max DMA burst size property

2019-10-11 Thread matthias . bgg
From: Matthias Brugger Depending on the HW, the maximal usable DMA burst size can vary. If not set accordingly a timeout in the transmit queue happens and no package can be sent. Read to optional max-burst-sz property, if not present, fallback to the standard value. Signed-off-by: Matthias Brugg

Re: [PATCH v2 bpf-next 09/12] bpf: add support for BTF pointers to x86 JIT

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > Pointer to BTF object is a pointer to kernel object or NULL. > Such pointers can only be used by BPF_LDX instructions. > The verifier changed their opcode from LDX|MEM|size > to LDX|PROBE_MEM|size to make JITing easier. > The number of e

Re: Race condition in route lookup

2019-10-11 Thread Wei Wang
On Fri, Oct 11, 2019 at 11:25 AM Ido Schimmel wrote: > > On Fri, Oct 11, 2019 at 09:17:42PM +0300, Ido Schimmel wrote: > > On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > > > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > > > > > > > On Fri, Oct 11, 2019 at 09:36:51AM -0500,

Re: [PATCH v2 bpf-next 07/12] bpf: attach raw_tp program with BTF via type name

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:16 PM Alexei Starovoitov wrote: > > BTF type id specified at program load time has all > necessary information to attach that program to raw tracepoint. > Use kernel type name to find raw tracepoint. > > Signed-off-by: Alexei Starovoitov > --- > kernel/bpf/syscall.c | 67

Re: [PATCH v2 bpf-next 06/12] bpf: implement accurate raw_tp context access via BTF

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > libbpf analyzes bpf C program, searches in-kernel BTF for given type name > and stores it into expected_attach_type. > The kernel verifier expects this btf_id to point to something like: > typedef void (*btf_trace_kfree_skb)(void *, stru

Re: Race condition in route lookup

2019-10-11 Thread Ido Schimmel
On Fri, Oct 11, 2019 at 09:17:42PM +0300, Ido Schimmel wrote: > On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > > > > > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jesse Hathaway wrote: > > > > On Thu, Oct 10, 2019 at 3:31 AM Ido

Re: Race condition in route lookup

2019-10-11 Thread Ido Schimmel
On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > > > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jesse Hathaway wrote: > > > On Thu, Oct 10, 2019 at 3:31 AM Ido Schimmel wrote: > > > > I think it's working as expected. Here is my th

[PATCH bpf-next] bpf: align struct bpf_prog_stats

2019-10-11 Thread Eric Dumazet
Do not risk spanning these small structures on two cache lines. Signed-off-by: Eric Dumazet --- include/linux/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 5b9d2233860654512da6ff5ec8bf56f2343ed722..282e28bf41ec627cad63c

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > For raw tracepoint program types libbpf will try to find > btf_id of raw tracepoint in vmlinux's BTF. > It's a responsiblity of bpf program author to annotate the program > with SEC("raw_tracepoint/name") where "name" is a valid raw trac

Re: [PATCH 0/4] treewide: Add 'fallthrough' pseudo-keyword

2019-10-11 Thread Miguel Ojeda
Hi Linus, On Fri, Oct 11, 2019 at 6:30 PM Linus Torvalds wrote: > > On Sat, Oct 5, 2019 at 9:46 AM Joe Perches wrote: > > > > Add 'fallthrough' pseudo-keyword to enable the removal of comments > > like '/* fallthrough */'. > > I applied patches 1-3 to my tree just to make it easier for people to

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > For raw tracepoint program types libbpf will try to find > btf_id of raw tracepoint in vmlinux's BTF. > It's a responsiblity of bpf program author to annotate the program > with SEC("raw_tracepoint/name") where "name" is a valid raw trac

Re: [PATCH v2 bpf-next 04/12] bpf: add attach_btf_id attribute to program load

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:16 PM Alexei Starovoitov wrote: > > Add attach_btf_id attribute to prog_load command. > It's similar to existing expected_attach_type attribute which is > used in several cgroup based program types. > Unfortunately expected_attach_type is ignored for > tracing programs and

Re: [PATCH v3 3/3] i40e: Add UDP segmentation offload support

2019-10-11 Thread Alexander Duyck
On Fri, 2019-10-11 at 10:39 -0700, Samudrala, Sridhar wrote: > > On 10/11/2019 9:53 AM, Josh Hunt wrote: > > Based on a series from Alexander Duyck this change adds UDP segmentation > > offload support to the i40e driver. > > > > CC: Alexander Duyck > > CC: Willem de Bruijn > > Signed-off-by: J

Re: [PATCH v2 bpf-next 03/12] bpf: process in-kernel BTF

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:15 PM Alexei Starovoitov wrote: > > If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux' > for further use by the verifier. > In-kernel BTF is trusted just like kallsyms and other build artifacts > embedded into vmlinux. > Yet run this BTF image through B

Re: Race condition in route lookup

2019-10-11 Thread Wei Wang
On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jesse Hathaway wrote: > > On Thu, Oct 10, 2019 at 3:31 AM Ido Schimmel wrote: > > > I think it's working as expected. Here is my theory: > > > > > > If CPU0 is executing both the route get request an

[vhost:vhost 6/6] drivers/vhost/vhost.c:2672:9: error: 'desc' undeclared; did you mean 'rdtsc'?

2019-10-11 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed commit: 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed [6/6] vhost: batching fetches config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-13) 7.4.0 repro

Re: [PATCH v3 3/3] i40e: Add UDP segmentation offload support

2019-10-11 Thread Samudrala, Sridhar
On 10/11/2019 9:53 AM, Josh Hunt wrote: Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the i40e driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt --- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethe

Re: [Potential Spoof] [PATCH bpf-next 2/2] selftests/bpf: remove obsolete pahole/BTF support detection

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 9:21 AM Martin Lau wrote: > > On Thu, Oct 10, 2019 at 08:13:18PM -0700, Andrii Nakryiko wrote: > > Given lots of selftests won't work without recent enough Clang/LLVM that > > fully supports BTF, there is no point in maintaining outdated BTF > > support detection and fall-b

[PATCH v2 bpf-next] bpf: fix cast to pointer from integer of different size warning

2019-10-11 Thread Andrii Nakryiko
Fix "warning: cast to pointer from integer of different size" when casting u64 addr to void *. Fixes: a23740ec43ba ("bpf: Track contents of read-only maps as scalars") Reported-by: kbuild test robot Acked-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko --- kernel/bpf/verifier.c | 2 +- 1 f

Re: [Potential Spoof] [PATCH bpf-next] bpf: fix cast to pointer from integer of different size warning

2019-10-11 Thread Andrii Nakryiko
On Thu, Oct 10, 2019 at 10:16 PM Martin Lau wrote: > > On Thu, Oct 10, 2019 at 09:29:25PM -0700, Andrii Nakryiko wrote: > > Fix "warning: cast to pointer from integer of different size" when > > casting u64 addr to void *. > > > > Reported-by: kbuild test robot > > Signed-off-by: Andrii Nakryiko

[PATCH net-next] net: sched: Avoid using yield() in a busy waiting loop

2019-10-11 Thread Sebastian Andrzej Siewior
From: Marc Kleine-Budde With threaded interrupts enabled, the interrupt thread runs as SCHED_RR with priority 50. If a user application with a higher priority preempts the interrupt thread and tries to shutdown the network interface then it will loop forever. The kernel will spin in the loop wait

[vhost:vhost 6/6] drivers/vhost/vhost.c:2672:9: error: 'desc' undeclared

2019-10-11 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed commit: 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed [6/6] vhost: batching fetches config: mips-allmodconfig (attached as .config) compiler: mips-linux-gcc (GCC) 7.4.0 reproduce:

[PATCH v3 1/3] igb: Add UDP segmentation offload support

2019-10-11 Thread Josh Hunt
Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the igb driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt --- drivers/net/ethernet/intel/igb/e1000_82575.h | 1 + drivers/net/ethernet/intel/igb/igb_main.c| 23 +

[PATCH v3 2/3] ixgbe: Add UDP segmentation offload support

2019-10-11 Thread Josh Hunt
Repost from a series by Alexander Duyck to add UDP segmentation offload support to the igb driver: https://lore.kernel.org/netdev/20180504003916.4769.66271.stgit@localhost.localdomain/ CC: Alexander Duyck CC: Willem de Bruijn Suggested-by: Alexander Duyck Signed-off-by: Josh Hunt --- drivers/

[PATCH v3 0/3] igb, ixgbe, i40e UDP segmentation offload support

2019-10-11 Thread Josh Hunt
Alexander Duyck posted a series in 2018 proposing adding UDP segmentation offload support to ixgbe and ixgbevf, but those patches were never accepted: https://lore.kernel.org/netdev/20180504003556.4769.11407.stgit@localhost.localdomain/ This series is a repost of his ixgbe patch along with a simi

[PATCH v3 3/3] i40e: Add UDP segmentation offload support

2019-10-11 Thread Josh Hunt
Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the i40e driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt --- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 +---

Re: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-11 Thread Xin Long
On Fri, Oct 11, 2019 at 11:57 PM Xin Long wrote: > > On Thu, Oct 10, 2019 at 8:40 PM Neil Horman wrote: > > > > On Thu, Oct 10, 2019 at 05:28:34PM +0800, Xin Long wrote: > > > On Thu, Oct 10, 2019 at 12:18 AM Neil Horman > > > wrote: > > > > > > > > On Tue, Oct 08, 2019 at 11:28:32PM +0800, Xin

[PATCH bpf-next 1/3] bpf: preserve command of the process that loaded the program

2019-10-11 Thread Stanislav Fomichev
Even though we have the pointer to user_struct and can recover uid of the user who has created the program, it usually contains 0 (root) which is not very informative. Let's store the comm of the calling process and export it via bpf_prog_info. This should help answer the question "which process lo

[PATCH bpf-next 3/3] bpftool: print the comm of the process that loaded the program

2019-10-11 Thread Stanislav Fomichev
Print recently added created_by_comm along the existing created_by_uid. Example with loop1.o (loaded via bpftool): 4: raw_tracepoint name nested_loops tag b9472b3ff5753ef2 gpl loaded_at 2019-10-10T13:38:18-0700 uid 0 comm bpftool xlated 264B jited 152B memlock 4096B

Re: [Potential Spoof] [PATCH bpf-next 2/2] selftests/bpf: remove obsolete pahole/BTF support detection

2019-10-11 Thread Martin Lau
On Thu, Oct 10, 2019 at 08:13:18PM -0700, Andrii Nakryiko wrote: > Given lots of selftests won't work without recent enough Clang/LLVM that > fully supports BTF, there is no point in maintaining outdated BTF > support detection and fall-back to pahole logic. Just assume we have > everything we need

[PATCH bpf-next 2/3] tools/bpf: sync bpf.h

2019-10-11 Thread Stanislav Fomichev
Add created_by_comm. Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index a65c3b0c6935..4e883ecbba1e 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools

Re: [PATCH v2 1/3] igb: Add UDP segmentation offload support

2019-10-11 Thread Josh Hunt
On 10/11/19 8:29 AM, Alexander Duyck wrote: On Thu, 2019-10-10 at 20:25 -0400, Josh Hunt wrote: Based on a series from Alexander Duyck this change adds UDP segmentation offload support to the igb driver. CC: Alexander Duyck CC: Willem de Bruijn Signed-off-by: Josh Hunt --- drivers/net/e

Re: Race condition in route lookup

2019-10-11 Thread Jesse Hathaway
On Fri, Oct 11, 2019 at 10:42 AM Ido Schimmel wrote: > Do you remember when you started seeing this behavior? I think it > started in 4.13 with commit ffe95ecf3a2e ("Merge branch > 'net-remove-dst-garbage-collector-logic'"). Unfortunately, our data on when the problem started is a bit fuzzy, but

Re: [PATCH bpf-next] libbpf: handle invalid typedef emitted by old GCC

2019-10-11 Thread Martin Lau
On Thu, Oct 10, 2019 at 08:29:01PM -0700, Andrii Nakryiko wrote: > Old GCC versions are producing invalid typedef for __gnuc_va_list > pointing to void. Special-case this and emit valid: > > typedef __builtin_va_list __gnuc_va_list; Acked-by: Martin KaFai Lau

Re: [PATCH net] net: socionext: netsec: fix xdp stats accounting

2019-10-11 Thread Lorenzo Bianconi
> On Fri, Oct 11, 2019 at 05:15:03PM +0300, Ilias Apalodimas wrote: > > Hi Lorenzo, > > > > On Fri, Oct 11, 2019 at 03:45:38PM +0200, Lorenzo Bianconi wrote: > > > Increment netdev rx counters even for XDP_DROP verdict. Moreover report > > > even tx bytes for xdp buffers (TYPE_NETSEC_XDP_TX or >

Re: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-11 Thread Xin Long
On Thu, Oct 10, 2019 at 8:40 PM Neil Horman wrote: > > On Thu, Oct 10, 2019 at 05:28:34PM +0800, Xin Long wrote: > > On Thu, Oct 10, 2019 at 12:18 AM Neil Horman wrote: > > > > > > On Tue, Oct 08, 2019 at 11:28:32PM +0800, Xin Long wrote: > > > > On Tue, Oct 8, 2019 at 9:02 PM David Laight > >

  1   2   >