Re: [PATCH bpf-next 0/4] Enable direct receive on AF_XDP sockets

2019-10-08 Thread Samudrala, Sridhar
On 10/8/2019 5:49 PM, Jakub Kicinski wrote: On Mon, 7 Oct 2019 23:16:51 -0700, Sridhar Samudrala wrote: This is a rework of the following patch series https://lore.kernel.org/netdev/1565840783-8269-1-git-send-email-sridhar.samudr...@intel.com/#r that tried to enable direct receive by bypassi

Question about concurrent accesses to an eBPF map

2019-10-08 Thread Chen鹏
Hi, Now I have an eBPF program which adds or updates elements in an eBPF map. Meanwhile, I have a user space application which reads and deletes elements in the aforementioned eBPF map. For a specific element in the eBPF map, if an update happens between the read and delete, I will lose some data.

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

2019-10-08 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 10:04 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 bpf-next 09/10] bpf: disallow bpf_probe_read[_str] helpers

2019-10-08 Thread Andrii Nakryiko
On Fri, Oct 4, 2019 at 10:04 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 > --- > kernel/trace/bpf_trace.c | 4 >

Re: [PATCH bpf-next 05/10] bpf: implement accurate raw_tp context access via BTF

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 9:01 PM Andrii Nakryiko wrote: > > On Tue, Oct 8, 2019 at 8:31 PM Alexei Starovoitov wrote: > > > > On 10/7/19 5:35 PM, Andrii Nakryiko wrote: > > > On Fri, Oct 4, 2019 at 10:04 PM Alexei Starovoitov > > > wrote: > > >> > > >> libbpf analyzes bpf C program, searches in-ke

Re: [PATCH net-next v2 14/22] bnxt_en: Add new FW devlink_health_reporter

2019-10-08 Thread Vasundhara Volam
On Mon, Oct 7, 2019 at 3:26 PM Jiri Pirko wrote: > > Fri, Aug 30, 2019 at 05:54:57AM CEST, michael.c...@broadcom.com wrote: > >From: Vasundhara Volam > > > >Create new FW devlink_health_reporter, to know the current health > >status of FW. > > > >Command example and output: > >$ devlink health sh

RE: [PATCH bpf-next 1/3] libbpf: fix struct end padding in btf_dump

2019-10-08 Thread John Fastabend
Andrii Nakryiko wrote: > Fix a case where explicit padding at the end of a struct is necessary > due to non-standart alignment requirements of fields (which BTF doesn't > capture explicitly). > > Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") > Reported-by: John Fastabend

[PATCH] DIM: fix dim.h kernel-doc and headers

2019-10-08 Thread Randy Dunlap
From: Randy Dunlap Lots of fixes to kernel-doc in structs, enums, and functions. Also add header files that are being used but not yet #included. Signed-off-by: Randy Dunlap Cc: Yamin Friedman Cc: Tal Gilboa Cc: Saeed Mahameed Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-r...@vger.kernel

Re: [PATCH net-next] Revert "tun: call dev_get_valid_name() before register_netdevice()"

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 14:20:34 -0700, Eric Dumazet wrote: > This reverts commit 0ad646c81b2182f7fa67ec0c8c825e0ee165696d. > > As noticed by Jakub, this is no longer needed after > commit 11fc7d5a0a2d ("tun: fix memory leak in error path") > > This no longer exports dev_get_valid_name() for the excl

RE: [PATCH 2/6] net: can: xilinx_can: Fix flags field initialization for axi can and canps

2019-10-08 Thread Appana Durga Kedareswara Rao
Hi, > On 18.3.2019 13.32, Appana Durga Kedareswara rao wrote: > > AXI CAN IP and CANPS IP supports tx fifo empty feature, this patch > > updates the flags field for the same. > > > > Signed-off-by: Appana Durga Kedareswara rao > > > > --- > > drivers/net/can/xilinx_can.c | 2 ++ > > 1 file chan

Re: [PATCH bpf-next 05/10] bpf: implement accurate raw_tp context access via BTF

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 8:31 PM Alexei Starovoitov wrote: > > On 10/7/19 5:35 PM, Andrii Nakryiko wrote: > > On Fri, Oct 4, 2019 at 10:04 PM Alexei Starovoitov wrote: > >> > >> libbpf analyzes bpf C program, searches in-kernel BTF for given type name > >> and stores it into expected_attach_type. >

Re: [PATCH 00/20] DPAA fixes

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 15:10:21 +0300, Madalin Bucur wrote: > Here's a series of fixes and changes for the DPAA 1.x drivers. > Fixing some boot time dependency issues, removing some dead code, > changing the buffers used for reception, fixing the DMA devices, > some cleanups. Hi Madalin! The title o

Re: [PATCH bpf-next 05/10] bpf: implement accurate raw_tp context access via BTF

2019-10-08 Thread Alexei Starovoitov
On 10/7/19 9:32 AM, Alan Maguire wrote: > This is an incredible leap forward! One question I have relates to > another aspect of checking. As we move from bpf_probe_read() to "direct > struct access", should we have the verifier insist on the same sort of > checking we have for direct packet access

Re: [PATCH bpf-next 05/10] bpf: implement accurate raw_tp context access via BTF

2019-10-08 Thread Alexei Starovoitov
On 10/7/19 5:35 PM, Andrii Nakryiko wrote: > On Fri, Oct 4, 2019 at 10:04 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:

Re: [PATCH V2 iproute2 0/3] Devlink health FMSG fixes and enhancements

2019-10-08 Thread Stephen Hemminger
On Wed, 2 Oct 2019 17:35:13 +0300 Tariq Toukan wrote: > Hi, > > This patchset by Aya enhances FMSG output and fixes bugs in devlink health. > > Patch 1 adds a helper function wrapping repeating code which determines > whether left-hand-side space separator in needed or not. It's not > need

Re: [PATCH iproute2] tc: fix segmentation fault on gact action

2019-10-08 Thread Stephen Hemminger
On Tue, 1 Oct 2019 12:32:17 +0200 Andrea Claudi wrote: > tc segfaults if gact action is used without action or index: > > $ ip link add type dummy > $ tc actions add action pipe index 1 > $ tc filter add dev dummy0 parent : protocol ip \ > pref 10 u32 match ip src 127.0.0.2 flowid 1:10 ac

Re: [PATCH iproute2] Bareudp device support

2019-10-08 Thread Stephen Hemminger
On Tue, 8 Oct 2019 16:29:21 +0530 Martin Varghese wrote: > From: Martin > > The Bareudp device provides a generic L3 encapsulation for tunnelling > different protocols like MPLS,IP,NSH, etc. inside a UDP tunnel. > > Signed-off-by: Martin Varghese When you resubmit this should go to iproute2

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 5:34 PM Martin Lau wrote: > > On Tue, Oct 08, 2019 at 04:49:30PM -0700, Andrii Nakryiko wrote: > > On Tue, Oct 8, 2019 at 2:53 PM Martin Lau wrote: > > > > > > On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > > > > Maps that are read-only both from BPF pro

Re: [PATCH net] team: call RCU read lock when walking the port_list

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 16:13:59 +0200, Jiri Pirko wrote: > Tue, Oct 08, 2019 at 03:56:14PM CEST, liuhang...@gmail.com wrote: > >Before reading the team port list, we need to acquire the RCU read lock. > >Also change list_for_each_entry() to list_for_each_entry_rcu(). > > > >Fixes: 9ed68ca0d90b ("team:

Re: [PATCH bpf-next 04/10] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-08 Thread Alexei Starovoitov
On 10/7/19 4:41 PM, Andrii Nakryiko wrote: > On Fri, Oct 4, 2019 at 10:04 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

Re: [PATCH -net] Doc: networking/device_drivers/pensando: fix ionic.rst warnings

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 08:35:51 -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Fix documentation build warnings for Pensando ionic: > > Documentation/networking/device_drivers/pensando/ionic.rst:39: WARNING: > Unexpected indentation. > Documentation/networking/device_drivers/pensando/ionic.rst

Re: [PATCH] net/appletalk: restore success case for atalk_proc_init()

2019-10-08 Thread Jakub Kicinski
On Wed, 9 Oct 2019 10:26:30 +0900, Christopher KOBAYASHI wrote: > Commit e2bcd8b0ce6ee3410665765db0d44dd8b7e3b348 to > net/appletalk/atalk_proc.c removed the success case, rendering > appletalk.ko inoperable. This one-liner restores correct operation. > > Signed-off-by: Christopher KOBAYASHI Th

Re: [PATCH bpf-next v3 1/5] bpf: Support chain calling multiple BPF programs after each other

2019-10-08 Thread Alexei Starovoitov
On Tue, Oct 08, 2019 at 10:07:46AM +0200, Toke Høiland-Jørgensen wrote: > Alexei Starovoitov writes: > > > On Mon, Oct 07, 2019 at 07:20:36PM +0200, Toke Høiland-Jørgensen wrote: > >> From: Toke Høiland-Jørgensen > >> > >> This adds support for wrapping eBPF program dispatch in chain calling >

[PATCH] net/appletalk: restore success case for atalk_proc_init()

2019-10-08 Thread Christopher KOBAYASHI
Commit e2bcd8b0ce6ee3410665765db0d44dd8b7e3b348 to net/appletalk/atalk_proc.c removed the success case, rendering appletalk.ko inoperable. This one-liner restores correct operation. Signed-off-by: Christopher KOBAYASHI --- diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c inde

Re: [PATCH bpf-next 2/4] xsk: allow AF_XDP sockets to receive packets directly from a queue

2019-10-08 Thread Alexei Starovoitov
On Mon, Oct 7, 2019 at 11:18 PM Sridhar Samudrala wrote: > + > +u32 bpf_direct_xsk(const struct bpf_prog *prog, struct xdp_buff *xdp) > +{ > + struct xdp_sock *xsk; > + > + xsk = xdp_get_xsk_from_qid(xdp->rxq->dev, xdp->rxq->queue_index); > + if (xsk) { > + struct b

Re: [patch net-next] net: tipc: prepare attrs in __tipc_nl_compat_dumpit()

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 13:01:51 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > __tipc_nl_compat_dumpit() calls tipc_nl_publ_dump() which expects > the attrs to be available by genl_dumpit_info(cb)->attrs. Add info > struct and attr parsing in compat dumpit function. > > Reported-by: syzbot+8d37c50

Re: [patch net-next] net: genetlink: always allocate separate attrs for dumpit ops,

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 12:31:43 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Individual dumpit ops (start, dumpit, done) are locked by genl_lock > for if !family->parallel_ops. However, multiple > genl_family_rcv_msg_dumpit() calls may in in flight in parallel. > Each has a separate struct genl_d

Re: [PATCH bpf-next 0/4] Enable direct receive on AF_XDP sockets

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 23:16:51 -0700, Sridhar Samudrala wrote: > This is a rework of the following patch series > https://lore.kernel.org/netdev/1565840783-8269-1-git-send-email-sridhar.samudr...@intel.com/#r > that tried to enable direct receive by bypassing XDP program attached > to the device. >

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Martin Lau
On Tue, Oct 08, 2019 at 04:49:30PM -0700, Andrii Nakryiko wrote: > On Tue, Oct 8, 2019 at 2:53 PM Martin Lau wrote: > > > > On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > > > Maps that are read-only both from BPF program side and user space side > > > have their contents consta

Re: [PATCH net v1] net: taprio: Fix returning EINVAL when configuring without flags

2019-10-08 Thread Vinicius Costa Gomes
Hi, Vladimir Oltean writes: > Hi Vinicius, > > On Wed, 9 Oct 2019 at 02:19, Vinicius Costa Gomes > wrote: >> >> When configuring a taprio instance if "flags" is not specified (or >> it's zero), taprio currently replies with an "Invalid argument" error. >> >> So, set the return value to zero aft

Re: [PATCH net v1] net: taprio: Fix returning EINVAL when configuring without flags

2019-10-08 Thread Vladimir Oltean
On Wed, 9 Oct 2019 at 02:58, Vladimir Oltean wrote: > > Hi Vinicius, > > On Wed, 9 Oct 2019 at 02:19, Vinicius Costa Gomes > wrote: > > > > When configuring a taprio instance if "flags" is not specified (or > > it's zero), taprio currently replies with an "Invalid argument" error. > > > > So, set

Re: [PATCH net v1] net: taprio: Fix returning EINVAL when configuring without flags

2019-10-08 Thread Vladimir Oltean
Hi Vinicius, On Wed, 9 Oct 2019 at 02:19, Vinicius Costa Gomes wrote: > > When configuring a taprio instance if "flags" is not specified (or > it's zero), taprio currently replies with an "Invalid argument" error. > > So, set the return value to zero after we are done with all the > checks. > > F

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 2:53 PM Martin Lau wrote: > > On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > > Maps that are read-only both from BPF program side and user space side > > have their contents constant, so verifier can track referenced values > > precisely and use that know

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 2:29 PM Daniel Borkmann wrote: > > On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > > Maps that are read-only both from BPF program side and user space side > > have their contents constant, so verifier can track referenced values > > precisely and use that

Re: [Patch net] net_sched: fix backward compatibility for TCA_ACT_KIND

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 13:26:29 -0700, Cong Wang wrote: > For TCA_ACT_KIND, we have to keep the backward compatibility too, > and rely on nla_strlcpy() to check and terminate the string with > a NUL. > > Note for TC actions, nla_strcmp() is already used to compare kind > strings, so we don't need to

Re: [Patch net] net_sched: fix backward compatibility for TCA_KIND

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 13:26:28 -0700, Cong Wang wrote: > Marcelo noticed a backward compatibility issue of TCA_KIND > after we move from NLA_STRING to NLA_NUL_STRING, so it is probably > too late to change it. > > Instead, to make everyone happy, we can just insert a NUL to > terminate the string wi

Re: [PATCH v4 bpf-next 1/3] uapi/bpf: fix helper docs

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 2:49 PM Daniel Borkmann wrote: > > On Mon, Oct 07, 2019 at 10:47:19AM -0700, Andrii Nakryiko wrote: > > On Mon, Oct 7, 2019 at 2:43 AM Daniel Borkmann wrote: > > > On Sun, Oct 06, 2019 at 08:07:36PM -0700, Andrii Nakryiko wrote: > > > > Various small fixes to BPF helper doc

[PATCH net v1] net: taprio: Fix returning EINVAL when configuring without flags

2019-10-08 Thread Vinicius Costa Gomes
When configuring a taprio instance if "flags" is not specified (or it's zero), taprio currently replies with an "Invalid argument" error. So, set the return value to zero after we are done with all the checks. Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Signed-off-by: Vini

Re: [PATCH net] net/mlx5: DR, Allow insertion of duplicate rules

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 16:13:25 +0300, Tariq Toukan wrote: > From: Alex Vesker > > Duplicate rules were not allowed to be configured with SW steering. > This restriction caused failures with the replace rule logic done by > upper layers. > > This fix allows for multiple rules with the same match va

Re: [PATCH net] netns: fix NLM_F_ECHO mechanism for RTM_NEWNSID

2019-10-08 Thread Guillaume Nault
On Mon, Oct 07, 2019 at 01:58:35PM +0200, Nicolas Dichtel wrote: > The flag NLM_F_ECHO aims to reply to the user the message notified to all > listeners. > It was not the case with the command RTM_NEWNSID, let's fix this. > > Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids"

[PATCH bpf-next 1/3] libbpf: fix struct end padding in btf_dump

2019-10-08 Thread Andrii Nakryiko
Fix a case where explicit padding at the end of a struct is necessary due to non-standart alignment requirements of fields (which BTF doesn't capture explicitly). Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") Reported-by: John Fastabend Signed-off-by: Andrii Nakryiko -

[PATCH bpf-next 0/3] Fix BTF-to-C converter's padding generation

2019-10-08 Thread Andrii Nakryiko
Fix BTF-to-C logic of handling padding at the end of a struct. Fix existing test that should have captured this. Also move test_btf_dump into a test_progs test to leverage common infrastructure. Andrii Nakryiko (3): libbpf: fix struct end padding in btf_dump selftests/bpf: convert test_btf_dum

[PATCH bpf-next 2/3] selftests/bpf: convert test_btf_dump into test_progs test

2019-10-08 Thread Andrii Nakryiko
Convert test_btf_dump into a part of test_progs, instead of a stand-alone test binary. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/Makefile | 2 +- .../btf_dump.c} | 88 +++ 2 files changed, 35 insertions(+), 55 deletions

[PATCH bpf-next 3/3] selftests/bpf: fix btf_dump padding test case

2019-10-08 Thread Andrii Nakryiko
Existing padding test case for btf_dump has a good test that was supposed to test padding generation at the end of a struct, but its expected output was specified incorrectly. Fix this. Fixes: 2d2a3ad872f8 ("selftests/bpf: add btf_dump BTF-to-C conversion tests") Reported-by: John Fastabend Signe

Re: [PATCH net-next 0/2] Ease nsid allocation

2019-10-08 Thread Guillaume Nault
On Fri, Oct 04, 2019 at 05:45:22PM +0200, Nicolas Dichtel wrote: > Le 03/10/2019 à 18:19, Guillaume Nault a écrit : > [snip] > > Why not using the existing NLM_F_ECHO mechanism? > > > > IIUC, if rtnl_net_notifyid() did pass the proper nlmsghdr and portid to > > rtnl_notify(), the later would autom

Re: [PATCH bpf 0/2] selftests/bpf: fix false failures

2019-10-08 Thread Daniel Borkmann
On Tue, Oct 08, 2019 at 03:10:43PM +0200, Jiri Benc wrote: > The test_flow_dissector and test_lwt_ip_encap selftests were failing for me. > It was caused by the tests not being enough system/distro independent. > > Jiri Benc (2): > selftests/bpf: set rp_filter in test_flow_dissector > selftest

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Martin Lau
On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > Maps that are read-only both from BPF program side and user space side > have their contents constant, so verifier can track referenced values > precisely and use that knowledge for dead code elimination, branch > pruning, etc. This

Re: [PATCH v4 bpf-next 1/3] uapi/bpf: fix helper docs

2019-10-08 Thread Daniel Borkmann
On Mon, Oct 07, 2019 at 10:47:19AM -0700, Andrii Nakryiko wrote: > On Mon, Oct 7, 2019 at 2:43 AM Daniel Borkmann wrote: > > On Sun, Oct 06, 2019 at 08:07:36PM -0700, Andrii Nakryiko wrote: > > > Various small fixes to BPF helper documentation comments, enabling > > > automatic header generation w

Re: [PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Daniel Borkmann
On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote: > Maps that are read-only both from BPF program side and user space side > have their contents constant, so verifier can track referenced values > precisely and use that knowledge for dead code elimination, branch > pruning, etc. This

Re: [PATCH v5 bpf-next 0/7] Move bpf_helpers and add BPF_CORE_READ macros

2019-10-08 Thread Daniel Borkmann
On Tue, Oct 08, 2019 at 10:59:35AM -0700, Andrii Nakryiko wrote: > This patch set makes bpf_helpers.h and bpf_endian.h a part of libbpf itself > for consumption by user BPF programs, not just selftests. It also splits off > tracing helpers into bpf_tracing.h, which also becomes part of libbpf. Some

[PATCH net-next] Revert "tun: call dev_get_valid_name() before register_netdevice()"

2019-10-08 Thread Eric Dumazet
This reverts commit 0ad646c81b2182f7fa67ec0c8c825e0ee165696d. As noticed by Jakub, this is no longer needed after commit 11fc7d5a0a2d ("tun: fix memory leak in error path") This no longer exports dev_get_valid_name() for the exclusive use of tun driver. Suggested-by: Jakub Kicinski Signed-off-b

[next-queue PATCH 0/2] Address IRQ related crash seen due to io_perm_failure

2019-10-08 Thread Alexander Duyck
David Dai had submitted a patch[1] to address a reported issue with e1000e calling pci_disable_msi without first freeing the interrupts. Looking over the issue it seems the problem was the fact that e1000e_down was being called in e1000_io_error_detected without calling e1000_free_irq, and this was

[next-queue PATCH 1/2] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm

2019-10-08 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to address possible race conditions that can exist between network configuration and power management. A similar issue was fixed for igb in commit 9474933caf21 ("igb: close/suspend race in netif_device_detach"). In addition it consolidates the code so th

[next-queue PATCH 2/2] e1000e: Drop unnecessary __E1000_DOWN bit twiddling

2019-10-08 Thread Alexander Duyck
From: Alexander Duyck Since we no longer check for __E1000_DOWN in e1000e_close we can drop the spot where we were restoring the bit. This saves us a bit of unnecessary complexity. Signed-off-by: Alexander Duyck --- drivers/net/ethernet/intel/e1000e/netdev.c |7 +-- 1 file changed, 1 i

Re: [PATCH net 0/4] llc: fix sk_buff refcounting

2019-10-08 Thread Jakub Kicinski
On Sun, 6 Oct 2019 14:24:23 -0700, Eric Biggers wrote: > Hello, > > Patches 1-2 fix the memory leaks that syzbot has reported in net/llc: > > memory leak in llc_ui_create (2) > memory leak in llc_ui_sendmsg > memory leak in llc_conn_ac_send_sabme_cmd_p_set_x > > Patches 3-4 fi

Re: Potential Bug Report

2019-10-08 Thread Heiner Kallweit
On 08.10.2019 14:55, Informationstechnik Würfl wrote: > Hi Heiner, > > i just wanted to inform you about a potential bug since Kernel 5.3 (since the > realtek driver has been renamed and refactored). > > Booting with Kernels > 5.2 always result in a kernel oops (r8169,libphy), i > guess that in

Re: [PATCH net-next] tun: fix memory leak in error path

2019-10-08 Thread Jakub Kicinski
On Tue, 8 Oct 2019 12:47:56 -0700, Eric Dumazet wrote: > On Tue, Oct 8, 2019 at 12:31 PM Jakub Kicinski wrote: > > On Mon, 7 Oct 2019 12:21:05 -0700, Eric Dumazet wrote: > > > syzbot reported a warning [1] that triggered after recent Jiri patch. > > > > > > This exposes a bug that we hit already

Re: RTL8169 question

2019-10-08 Thread Heiner Kallweit
On 08.10.2019 10:27, Mariusz Bialonczyk wrote: > Heiner, > Hello again. > > On Wed, 25 Sep 2019 21:28:04 +0200 > Heiner Kallweit wrote: > >>> Here is the brief description of the problem: >>> After the NIC is going out of suspend-to-ram it is in some weird state. >>> This state is causing proble

Re: [PATCH net-next] tun: fix memory leak in error path

2019-10-08 Thread Eric Dumazet
On Tue, Oct 8, 2019 at 12:31 PM Jakub Kicinski wrote: > > On Mon, 7 Oct 2019 12:21:05 -0700, Eric Dumazet wrote: > > syzbot reported a warning [1] that triggered after recent Jiri patch. > > > > This exposes a bug that we hit already in the past (see commit > > ff244c6b29b1 ("tun: handle register

[PATCH bpf-next 2/2] selftests/bpf: add read-only map values propagation tests

2019-10-08 Thread Andrii Nakryiko
Add tests checking that verifier does proper constant propagation for read-only maps. If constant propagation didn't work, skipp_loop and part_loop BPF programs would be rejected due to BPF verifier otherwise not being able to prove they ever complete. With constant propagation, though, they are su

[PATCH bpf-next 0/2] Track read-only map contents as known scalars in BPF verifiers

2019-10-08 Thread Andrii Nakryiko
With BPF maps supporting direct map access (currently, array_map w/ single element, used for global data) that are read-only both from system call and BPF side, it's possible for BPF verifier to track its contents as known constants. Now it's possible for user-space control app to pre-initialize r

[PATCH bpf-next 1/2] bpf: track contents of read-only maps as scalars

2019-10-08 Thread Andrii Nakryiko
Maps that are read-only both from BPF program side and user space side have their contents constant, so verifier can track referenced values precisely and use that knowledge for dead code elimination, branch pruning, etc. This patch teaches BPF verifier how to do this. Signed-off-by: Andrii Nakryi

Re: [PATCH net-next] tun: fix memory leak in error path

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 12:21:05 -0700, Eric Dumazet wrote: > syzbot reported a warning [1] that triggered after recent Jiri patch. > > This exposes a bug that we hit already in the past (see commit > ff244c6b29b1 ("tun: handle register_netdevice() failures properly") > for details) > > tun uses priv

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

2019-10-08 Thread John Fastabend
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 issues arrising from running > applications using any of the two formats. However, libbpf was not > exte

Re: pull-request: can-next 2019-10-07

2019-10-08 Thread Jakub Kicinski
On Mon, 7 Oct 2019 16:38:14 +0200, Marc Kleine-Budde wrote: > Hello David, > > this is a pull request for net-next/master consisting of 12 patches. > > The first patch is by Andy Shevchenko for the mcp251x driver and removes > the legacy platform data from all in-tree users and the driver. > > T

Applied "spi: Add a PTP system timestamp to the transfer structure" to the spi tree

2019-10-08 Thread Mark Brown
The patch spi: Add a PTP system timestamp to the transfer structure has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) an

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 8:37 AM Jiri Benc wrote: > > On Fri, 4 Oct 2019 18:37:44 +, Yonghong Song wrote: > > distro can package bpf/btf uapi headers into libbpf package. > > Users linking with libbpf.a/libbpf.so can use bpf/btf.h with include > > path pointing to libbpf dev package include dire

[PATCH v5 bpf-next 7/7] selftests/bpf: add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests

2019-10-08 Thread Andrii Nakryiko
Validate BPF_CORE_READ correctness and handling of up to 9 levels of nestedness using cyclic task->(group_leader->)*->tgid chains. Also add a test of maximum-dpeth BPF_CORE_READ_STR_INTO() macro. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/

[PATCH v5 bpf-next 4/7] selftests/bpf: split off tracing-only helpers into bpf_tracing.h

2019-10-08 Thread Andrii Nakryiko
Split-off PT_REGS-related helpers into bpf_tracing.h header. Adjust selftests and samples to include it where necessary. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- samples/bpf/map_perf_test_kern.c | 1 + samples/bpf/offwaketime_kern.c|

[PATCH v5 bpf-next 3/7] selftests/bpf: adjust CO-RE reloc tests for new bpf_core_read() macro

2019-10-08 Thread Andrii Nakryiko
To allow adding a variadic BPF_CORE_READ macro with slightly different syntax and semantics, define CORE_READ in CO-RE reloc tests, which is a thin wrapper around low-level bpf_core_read() macro, which in turn is just a wrapper around bpf_probe_read(). Acked-by: John Fastabend Acked-by: Song Liu

[PATCH v5 bpf-next 5/7] libbpf: move bpf_{helpers,helper_defs,endian,tracing}.h into libbpf

2019-10-08 Thread Andrii Nakryiko
Move bpf_helpers.h, bpf_tracing.h, and bpf_endian.h into libbpf. Move bpf_helper_defs.h generation into libbpf's Makefile. Ensure all those headers are installed along the other libbpf headers. Also, adjust selftests and samples include path to include libbpf now. Acked-by: Song Liu Signed-off-by

[PATCH v5 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-10-08 Thread Andrii Nakryiko
Add few macros simplifying BCC-like multi-level probe reads, while also emitting CO-RE relocations for each read. Acked-by: John Fastabend Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/Makefile| 3 +- tools/lib/bpf/bpf_core_read.h

[PATCH v5 bpf-next 0/7] Move bpf_helpers and add BPF_CORE_READ macros

2019-10-08 Thread Andrii Nakryiko
This patch set makes bpf_helpers.h and bpf_endian.h a part of libbpf itself for consumption by user BPF programs, not just selftests. It also splits off tracing helpers into bpf_tracing.h, which also becomes part of libbpf. Some of the legacy stuff (BPF_ANNOTATE_KV_PAIR, load_{byte,half,word}, bpf_

[PATCH v5 bpf-next 2/7] selftests/bpf: samples/bpf: split off legacy stuff from bpf_helpers.h

2019-10-08 Thread Andrii Nakryiko
Split off few legacy things from bpf_helpers.h into separate bpf_legacy.h file: - load_{byte|half|word}; - remove extra inner_idx and numa_node fields from bpf_map_def and introduce bpf_map_def_legacy for use in samples; - move BPF_ANNOTATE_KV_PAIR into bpf_legacy.h. Adjust samples and selftests

[net] net: update net_dim documentation after rename

2019-10-08 Thread Jacob Keller
Commit 8960b38932be ("linux/dim: Rename externally used net_dim members") renamed the net_dim API, removing the "net_" prefix from the structures and functions. The patch didn't update the net_dim.txt documentation file. Fix the documentation so that its examples match the current code. Signed-of

[PATCH v5 bpf-next 1/7] selftests/bpf: undo GCC-specific bpf_helpers.h changes

2019-10-08 Thread Andrii Nakryiko
Having GCC provide its own bpf-helper.h is not the right approach and is going to be changed. Undo bpf_helpers.h change before moving bpf_helpers.h into libbpf. Acked-by: Song Liu Acked-by: Ilya Leoshkevich Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bp

Re: [PATCH net-next v2 00/10] optimize openvswitch flow looking up

2019-10-08 Thread Gregory Rose
On 10/7/2019 6:00 PM, xiangxia.m@gmail.com wrote: From: Tonghao Zhang This series patch optimize openvswitch for performance or simplify codes. Patch 1, 2, 4: Port Pravin B Shelar patches to linux upstream with little changes. Patch 5, 6, 7: Optimize the flow looking up and simplify the

RE: [Intel-wired-lan] [PATCH 1/1] ixgbe: protect TX timestamping from API misuse

2019-10-08 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Manjunath Patil > Sent: Saturday, October 5, 2019 8:20 AM > To: Kirsher, Jeffrey T ; da...@davemloft.net; > intel-wired-...@lists.osuosl.org; netdev@vger.kernel.org; linux- > ker...@vger.

Re: [PATCH v4 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-10-08 Thread Andrii Nakryiko
On Tue, Oct 8, 2019 at 8:10 AM Alexei Starovoitov wrote: > > On 10/7/19 11:15 PM, Andrii Nakryiko wrote: > >>> +#define BPF_CORE_READ(src, a, ...) > >>> \ > >>> + ({ > >>> \ > >>> +

Re: [PATCH bpf 1/2] selftests/bpf: set rp_filter in test_flow_dissector

2019-10-08 Thread Petar Penkov
On Tue, Oct 8, 2019 at 6:11 AM Jiri Benc wrote: > > Many distributions enable rp_filter. However, the flow dissector test > generates packets that have 1.1.1.1 set as (inner) source address without > this address being reachable. This causes the selftest to fail. > > The selftests should not assum

Re: Applied "spi: Add a PTP system timestamp to the transfer structure" to the spi tree

2019-10-08 Thread Mark Brown
On Tue, Oct 08, 2019 at 03:58:51PM +0300, Vladimir Oltean wrote: > Dave, do you think you can somehow integrate this patch into net-next > as well, so that I can send some further patches that depend on the > newly introduced ptp_sts member of struct spi_transfer without waiting > for another kern

Re: [PATCH net-next 1/2] UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.

2019-10-08 Thread Willem de Bruijn
On Tue, Oct 8, 2019 at 5:51 AM Martin Varghese wrote: > > From: Martin > > The Bareudp tunnel module provides a generic L3 encapsulation > tunnelling module for tunnelling different protocols like MPLS, > IP,NSH etc inside a UDP tunnel. > > Signed-off-by: Martin Varghese > --- > Documentation/n

[PATCH net 1/2] s390/qeth: Fix error handling during VNICC initialization

2019-10-08 Thread Julian Wiedmann
From: Alexandra Winter Smatch discovered the use of uninitialized variable sup_cmds in error paths. Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l2_main.c | 11 +++ 1 file c

[PATCH net 0/2] s390/qeth: fixes 2019-10-08

2019-10-08 Thread Julian Wiedmann
Hi Dave, please apply the following two patches to your net tree. Alexandra fixes two issues in the initialization code for vnicc cmds. One is an uninitialized variable when a cmd fails, the other that we wouldn't recover correctly if the device's supported features changed. Thanks, Julian Ale

[PATCH net 2/2] s390/qeth: Fix initialization of vnicc cmd masks during set online

2019-10-08 Thread Julian Wiedmann
From: Alexandra Winter Without this patch, a command bit in the supported commands mask is only ever set to unsupported during set online. If a command is ever marked as unsupported (e.g. because of error during qeth_l2_vnicc_query_cmds), subsequent successful initialization (offline/online) woul

Re: [PATCH net-next 2/2] Special handling for IP & MPLS.

2019-10-08 Thread Willem de Bruijn
On Tue, Oct 8, 2019 at 5:52 AM Martin Varghese wrote: > > From: Martin > This commit would need a commit message. > Signed-off-by: Martin Varghese > > Signed-off-by: Martin Varghese > --- > Documentation/networking/bareudp.txt | 18 > drivers/net/bareudp.c| 82 > +++

Re: [PATCH net-next 1/2] UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.

2019-10-08 Thread Stephen Hemminger
On Tue, 8 Oct 2019 15:18:53 +0530 Martin Varghese wrote: > + if (new_mtu > dev->max_mtu) > + new_mtu = dev->max_mtu; > + else if (new_mtu < dev->min_mtu) > + new_mtu = dev->min_mtu; > + These checks are already handled as errors in dev_set_mtu_ext()

Re: [PATCH net-next 1/2] UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.

2019-10-08 Thread Stephen Hemminger
On Tue, 8 Oct 2019 15:18:53 +0530 Martin Varghese wrote: > +#if IS_ENABLED(CONFIG_IPV6) > + ret = bareudp_sock_add(bareudp, true); > +#endif > + ret = bareudp_sock_add(bareudp, false); > + if ipv6 returns error it will get overriden by the ipv4 value

Re: [PATCH v3] rtl8xxxu: add bluetooth co-existence support for single antenna

2019-10-08 Thread Jes Sorensen
On 10/5/19 5:48 AM, Chris Chiu wrote: The RTL8723BU suffers the wifi disconnection problem while bluetooth device connected. While wifi is doing tx/rx, the bluetooth will scan without results. This is due to the wifi and bluetooth share the same single antenna for RF communication and they need t

Re: [PATCH iproute2] Bareudp device support

2019-10-08 Thread Stephen Hemminger
On Tue, 8 Oct 2019 16:29:21 +0530 Martin Varghese wrote: Overall ok, but where is man page? > + > + if (tb[IFLA_BAREUDP_PORT]) > + print_uint(PRINT_ANY, > + "port", > + "dstport %u ", > + rta_get

Re: [PATCH -net] Doc: networking/device_drivers/pensando: fix ionic.rst warnings

2019-10-08 Thread Shannon Nelson
1 deletion(-) --- linux-next-20191008.orig/Documentation/networking/device_drivers/pensando/ionic.rst +++ linux-next-20191008/Documentation/networking/device_drivers/pensando/ionic.rst @@ -36,8 +36,10 @@ Support === For general Linux networking support, please use the netdev mailing list

[PATCH -net] phylink: fix kernel-doc warnings

2019-10-08 Thread Randy Dunlap
ion in 'phylink_create' Fixes: 8796c8923d9c ("phylink: add documentation for kernel APIs") Signed-off-by: Randy Dunlap Cc: Russell King --- drivers/net/phy/phylink.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20191008.orig/drivers/net/phy/phylink.c

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-08 Thread Jiri Benc
On Fri, 4 Oct 2019 18:37:44 +, Yonghong Song wrote: > distro can package bpf/btf uapi headers into libbpf package. > Users linking with libbpf.a/libbpf.so can use bpf/btf.h with include > path pointing to libbpf dev package include directory. > Could this work? I don't think it would. Distros

[PATCH -net] Doc: networking/device_drivers/pensando: fix ionic.rst warnings

2019-10-08 Thread Randy Dunlap
ionic: Add basic framework for IONIC Network device driver") Signed-off-by: Randy Dunlap Cc: Shannon Nelson --- Documentation/networking/device_drivers/pensando/ionic.rst |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- linux-next-20191008.orig/Documentation/networking/devi

Re: [PATCH v3 bpf-next 5/7] libbpf: move bpf_{helpers,endian,tracing}.h into libbpf

2019-10-08 Thread Jiri Benc
On Fri, 4 Oct 2019 11:30:26 -0700, Jakub Kicinski wrote: > Surely for distroes tho - they would have kernel headers matching the > kernel release they ship. If parts of libbpf from GH only work with > the latest kernel, distroes should ship libbpf from the kernel source, > rather than GH. I don't

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

2019-10-08 Thread Xin Long
On Tue, Oct 8, 2019 at 9:02 PM David Laight wrote: > > From: Xin Long > > Sent: 08 October 2019 12:25 > > > > This is a sockopt defined in section 7.3 of rfc7829: "Exposing > > the Potentially Failed Path State", by which users can change > > pf_expose per sock and asoc. > > If I read these patche

Re: [PATCH bpf-next] bpftool: fix bpftool build by switching to bpf_object__open_file()

2019-10-08 Thread Stanislav Fomichev
On 10/07, Andrii Nakryiko wrote: > -- Andrii > > On Mon, Oct 7, 2019 at 2:50 PM Andrii Nakryiko > wrote: > > > > On Mon, Oct 7, 2019 at 2:46 PM Stanislav Fomichev wrote: > > > > > > On 10/07, Andrii Nakryiko wrote: > > > > As part of libbpf in 5e61f2707029 ("libbpf: stop enforcing kern_version,

[PATCHv2 net-next 5/6] erspan: fix the tun_info options_len check

2019-10-08 Thread Xin Long
The check for !md doens't really work for ip_tunnel_info_opts(info) which only does info + 1. Also to avoid out-of-bounds access on info, it should ensure options_len is not less than erspan_metadata in both erspan_xmit() and ip6erspan_tunnel_xmit(). Signed-off-by: Xin Long --- net/ipv4/ip_gre.c

[PATCHv2 net-next 6/6] erspan: make md work without TUNNEL_ERSPAN_OPT set

2019-10-08 Thread Xin Long
Now when a skb comes with ip_tun_info but with no TUNNEL_ERSPAN_OPT to a md erspan device, it will be dropped. This patch is to allow this skb to go through this erspan device, and the options (version, index, hwid, dir, etc.) will be filled with tunnel's params, which can be configured by users.

[PATCHv2 net-next 3/6] lwtunnel: add LWTUNNEL_IP6_OPTS support for lwtunnel_ip6

2019-10-08 Thread Xin Long
Similar to lwtunnel_ip, this patch is to add options set/dump support for lwtunnel_ip6. Signed-off-by: Xin Long --- include/uapi/linux/lwtunnel.h | 1 + net/ipv4/ip_tunnel_core.c | 22 ++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/

  1   2   3   >