Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Eric Dumazet
On 04/18/2018 09:44 AM, Mikulas Patocka wrote: > > > On Wed, 18 Apr 2018, Eric Dumazet wrote: > >> >> >> On 04/18/2018 07:34 AM, Mikulas Patocka wrote: >>> The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if kzalloc >>> fails (later patches change it to kvzalloc). >>> >>> The

Re: [PATCH net-next 2/2] netns: isolate seqnums to use per-netns locks

2018-04-18 Thread Eric W. Biederman
Christian Brauner writes: > Now that it's possible to have a different set of uevents in different > network namespaces, per-network namespace uevent sequence numbers are > introduced. This increases performance as locking is now restricted to the > network

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread David Miller
From: Sowmini Varadhan Date: Wed, 18 Apr 2018 09:47:06 -0400 > - in the "GSO" proposal my 2000 bytes of data are sent as *two* > udp packets, each of them with a unique udp header, and uh_len set > to 1476 (for first) and 526 (for second). The receiver has no

[PATCH v2 1/3] lan78xx: Read MAC address from DT if present

2018-04-18 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH] atm: iphase: fix spelling mistake: "Tansmit" -> "Transmit"

2018-04-18 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in message text. Signed-off-by: Colin Ian King --- drivers/atm/iphase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c

[bpf-next PATCH 0/3] Add ID to bpf_map/prog tracepoints

2018-04-18 Thread Sebastiano Miano
The following series: 1) Add ID to both map and prog related tracepoints 2) Add a sample program that shows how to monitor and filter map related events using their IDs. --- Sebastiano Miano (3): bpf: add id to map tracepoint bpf: add id to prog tracepoint bpf: add sample

[bpf-next PATCH 1/3] bpf: add id to map tracepoint

2018-04-18 Thread Sebastiano Miano
This patch adds the map id to the bpf tracepoints that can be used when monitoring or inspecting map related functions. Signed-off-by: Sebastiano Miano Suggested-by: Jesper Dangaard Brouer --- include/trace/events/bpf.h | 29

[bpf-next PATCH 2/3] bpf: add id to prog tracepoint

2018-04-18 Thread Sebastiano Miano
This patch adds the prog id to the bpf tracepoints that can be used when monitoring or inspecting prog related functions. Signed-off-by: Sebastiano Miano Suggested-by: Jesper Dangaard Brouer --- include/trace/events/bpf.h | 15 --- 1

Re: [PATCH v2 2/3] lan78xx: Read LED states from Device Tree

2018-04-18 Thread Andrew Lunn
On Wed, Apr 18, 2018 at 04:45:22PM +0100, Phil Elwell wrote: > Add support for DT property "microchip,led-modes", a vector of zero > to four cells (u32s) in the range 0-15, each of which sets the mode > for one of the LEDs. Some possible values are: > > 0=link/activity

Re: [PATCH bpf-next v3 07/11] bpf: make tun compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 09:42:19PM -0700, Nikita V. Shirokov wrote: > w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as > well (only "decrease" of pointer's location is going to be supported). > changing of this pointer will change packet's size. > for tun driver we need to

Re: [PATCH net-next 2/2] udp: implement and use per cpu rx skbs cache

2018-04-18 Thread Paolo Abeni
Hi, On Wed, 2018-04-18 at 09:56 -0700, Eric Dumazet wrote: > > On 04/18/2018 03:22 AM, Paolo Abeni wrote: > > This changeset extends the idea behind commit c8c8b127091b ("udp: > > under rx pressure, try to condense skbs"), trading more BH cpu > > time and memory bandwidth to decrease the load on

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread David Miller
From: Sowmini Varadhan Date: Wed, 18 Apr 2018 08:31:03 -0400 > However, I share Sridhar's concerns about the very fundamental change > to UDP message boundary semantics here. There is actually no such thing > as a "segment" in udp, so in general this feature makes

Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine

2018-04-18 Thread David Miller
From: liuxiang Date: Wed, 18 Apr 2018 21:48:22 +0800 (CST) > Because the timeout task gets the main spinlock and disable the > current cpu's irq, there is no other task on the same cpu can run, > and tasks on the other cpus can not enter the dm9000_timeout() > again. So

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread David Miller
From: Willem de Bruijn Date: Wed, 18 Apr 2018 09:51:50 -0400 > Eric is correct. If the application sets a segment size with UDP_SEGMENT > this is an instruction to the kernel to split the payload along that border > into > separate discrete datagrams. > > It

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Apr 2018 09:51:25 -0700 > I suggest that virtio_net clearly identifies which part needs a specific > allocation > and does its itself, instead of abusing the netdev_priv storage. > > Ie use a pointer to a block of memory, allocated by

[PATCH v2 3/3] dt-bindings: Document the DT bindings for lan78xx

2018-04-18 Thread Phil Elwell
The Microchip LAN78XX family of devices are Ethernet controllers with a USB interface. Despite being discoverable devices it can be useful to be able to configure them from Device Tree, particularly in low-cost applications without an EEPROM or programmed OTP. Document the supported properties in

[PATCH v2 0/3] lan78xx: Read configuration from Device Tree

2018-04-18 Thread Phil Elwell
The Microchip LAN78XX family of devices are Ethernet controllers with a USB interface. Despite being discoverable devices it can be useful to be able to configure them from Device Tree, particularly in low-cost applications without an EEPROM or programmed OTP. This patch set adds support for

[PATCH net-next] lan78xx: Add support to dump lan78xx registers

2018-04-18 Thread Raghuram Chary J
In order to dump lan78xx family registers using ethtool, add support at lan78xx driver level. Signed-off-by: Raghuram Chary J --- drivers/net/usb/lan78xx.c | 54 +++ 1 file changed, 54 insertions(+) diff --git

Re: [RFC PATCH] net: bridge: multicast querier per VLAN support

2018-04-18 Thread Stephen Hemminger
On Wed, 18 Apr 2018 16:14:26 +0300 Nikolay Aleksandrov wrote: > On 18/04/18 16:07, Joachim Nilsson wrote: > > On Wed, Apr 18, 2018 at 03:31:57PM +0300, Nikolay Aleksandrov wrote: > >> On 18/04/18 15:07, Joachim Nilsson wrote: > >>> - First of all, is this patch

[PATCH net-next] MAINTAINERS: Direct networking documentation changes to netdev

2018-04-18 Thread Jonathan Corbet
Networking docs changes go through the networking tree, so patch the MAINTAINERS file to direct authors to the right place. Signed-off-by: Jonathan Corbet --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH bpf-next v2 6/9] samples/bpf: move common-purpose perf_event functions to bpf_load.c

2018-04-18 Thread Yonghong Song
There is no functionality change in this patch. The common-purpose perf_event functions are moved from trace_output_user.c to bpf_load.c so that these function can be reused later. Signed-off-by: Yonghong Song --- samples/bpf/bpf_load.c | 104

[PATCH bpf-next v2 2/9] bpf: add bpf_get_stack helper

2018-04-18 Thread Yonghong Song
Currently, stackmap and bpf_get_stackid helper are provided for bpf program to get the stack trace. This approach has a limitation though. If two stack traces have the same hash, only one will get stored in the stackmap table, so some stack traces are missing from user perspective. This patch

Re: [PATCH net-next v2 16/21] net/ipv6: Add gfp_flags to route add functions

2018-04-18 Thread Eric Dumazet
On 04/17/2018 05:33 PM, David Ahern wrote: > Most FIB entries can be added using memory allocated with GFP_KERNEL. > Add gfp_flags to ip6_route_add and addrconf_dst_alloc. Code paths that > can be reached from the packet path (e.g., ndisc and autoconfig) or > atomic notifiers use GFP_ATOMIC;

RE: SRIOV switchdev mode BoF minutes

2018-04-18 Thread Parikh, Neerav
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Andy Gospodarek > Sent: Wednesday, April 18, 2018 8:15 AM > To: Jakub Kicinski > Cc: Andy Gospodarek ; Or Gerlitz

Re: [PATCH bpf-next v4 03/10] bpf: btf: Check members of struct/union

2018-04-18 Thread Jakub Kicinski
On Tue, 17 Apr 2018 13:42:36 -0700, Martin KaFai Lau wrote: > This patch checks a few things of struct's members: > > 1) It has a valid size (e.g. a "const void" is invalid) > 2) A member's size (+ its member's offset) does not exceed >the containing struct's size. > 3) The member's offset

Re: [PATCH bpf-next v3 04/11] bpf: make bnxt compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Michael Chan
On Tue, Apr 17, 2018 at 9:42 PM, Nikita V. Shirokov wrote: > w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as > well (only "decrease" of pointer's location is going to be supported). > changing of this pointer will change packet's size. > for bnxt

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Apr 2018 09:05:54 -0700 > Each virtio_net should probably allocate the exact amount of > DMA-memory it wants, instead of expecting core networking stack to > have a huge chunk of DMA-memory for everything. Yes, if you need DMA'able

Re: [PATCH bpf-next v4 07/10] bpf: btf: Add pretty print support to the basic arraymap

2018-04-18 Thread Martin KaFai Lau
On Wed, Apr 18, 2018 at 05:20:11PM +0200, Daniel Borkmann wrote: > Hi Martin, > > first of all great work on the set! One issue that puzzled me > while digesting it further below. > > On 04/17/2018 10:42 PM, Martin KaFai Lau wrote: > > This patch adds pretty print support to the basic arraymap.

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread David Miller
From: Mikulas Patocka Date: Wed, 18 Apr 2018 12:44:25 -0400 (EDT) > The structure net_device is followed by arbitrary driver-specific data > (accessible with the function netdev_priv). And for virtio-net, these > driver-specific data must be in DMA memory. And we are

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, Eric Dumazet wrote: > > > On 04/18/2018 09:44 AM, Mikulas Patocka wrote: > > > > > > On Wed, 18 Apr 2018, Eric Dumazet wrote: > > > >> > >> > >> On 04/18/2018 07:34 AM, Mikulas Patocka wrote: > >>> The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread David Miller
From: Willem de Bruijn Date: Tue, 17 Apr 2018 16:00:50 -0400 > Segmentation offload reduces cycles/byte for large packets by > amortizing the cost of protocol stack traversal. > > This patchset implements GSO for UDP. This looks great. And as mentioned in

[PATCH net-next 0/2] UDP: introduce RX skb cache

2018-04-18 Thread Paolo Abeni
The goal of this series is to improve UDP performance in the RX path, that got worse when spectre/meltdown mithigations were introduced. The main idea is to move almost entirely the cost of skb handling from the receiver process context into the BH processing, leveraging, for small packets, a

[PATCH net-next 2/2] udp: implement and use per cpu rx skbs cache

2018-04-18 Thread Paolo Abeni
This changeset extends the idea behind commit c8c8b127091b ("udp: under rx pressure, try to condense skbs"), trading more BH cpu time and memory bandwidth to decrease the load on the user space receiver. At boot time we allocate a limited amount of skbs with small data buffer, storing them in per

[PATCH net-next 1/2] udp: if the rx queue is full, free the skb in __udp_enqueue_schedule_skb()

2018-04-18 Thread Paolo Abeni
This commit moves the kfree_skb() call on queue full event from the ipv4/ipv6 caller into __udp_enqueue_schedule_skb(), cleaning up the code and avoid referencing the skb after that __udp_enqueue_schedule_skb() completes, so that we can modify the skb ptr itself into the latter function.

Re: tcp hang when socket fills up ?

2018-04-18 Thread Dominique Martinet
Jozsef Kadlecsik wrote on Wed, Apr 18, 2018: > Thanks for the testing! One more line is required, however: we have to get > the assured bit set for the connection, see the new patch below. I think it actually was better before. If I understand things correctly at this point (when we get in the

Re: [PATCH net-next v4 0/3] kernel: add support to collect hardware logs in crash recovery kernel

2018-04-18 Thread Rahul Lakkireddy
On Wednesday, April 04/18/18, 2018 at 11:45:46 +0530, Dave Young wrote: > Hi Rahul, > On 04/17/18 at 01:14pm, Rahul Lakkireddy wrote: > > On production servers running variety of workloads over time, kernel > > panic can happen sporadically after days or even months. It is > > important to collect

Re: [RFC PATCH] net: bridge: multicast querier per VLAN support

2018-04-18 Thread Nikolay Aleksandrov
On 18/04/18 15:07, Joachim Nilsson wrote: This RFC patch¹ is an attempt to add multicast querier per VLAN support to a VLAN aware bridge. I'm posting it as RFC for now since non-VLAN aware bridges are not handled, and one of my questions is if that is complexity we need to continue supporting?

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread Sowmini Varadhan
I went through the patch set and the code looks fine- it extends existing infra for TCP/GSO to UDP. One thing that was not clear to me about the API: shouldn't UDP_SEGMENT just be automatically determined in the stack from the pmtu? Whats the motivation for the socket option for this? also AIUI

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz wrote: > On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski > wrote: >> From: John Hurley >> >> Pass information to the match offload on whether or not the repr is the >>

Re: [PATCH bpf-next] tools: bpftool: make it easier to feed hex bytes to bpftool

2018-04-18 Thread Daniel Borkmann
On 04/18/2018 04:46 AM, Jakub Kicinski wrote: > From: Quentin Monnet > > bpftool uses hexadecimal values when it dumps map contents: > > # bpftool map dump id 1337 > key: ff 13 37 ff value: a1 b2 c3 d4 ff ff ff ff > Found 1 element > > In order to

Re: [RFC PATCH] net: bridge: multicast querier per VLAN support

2018-04-18 Thread Nikolay Aleksandrov
On 18/04/18 16:07, Joachim Nilsson wrote: > On Wed, Apr 18, 2018 at 03:31:57PM +0300, Nikolay Aleksandrov wrote: >> On 18/04/18 15:07, Joachim Nilsson wrote: >>> - First of all, is this patch useful to anyone >> Obviously to us as it's based on our patch. :-) >> We actually recently discussed what

[PATCH bpf-next v3 05/11] bpf: make cavium thunder compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for cavium's thunder driver we will just calculate packet's length unconditionally Acked-by: Alexei

Re: [PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
On Wed, Apr 18, 2018 at 02:37:40PM +0200, Daniel Borkmann wrote: > On 04/18/2018 06:29 AM, Nikita V. Shirokov wrote: > > In this patch series i'm add new bpf helper which allow to manupulate > > xdp's data_end pointer. right now only "shrinking" (reduce packet's size > > by moving pointer) is

[PATCH bpf-next v3 09/11] bpf: making bpf_prog_test run aware of possible data_end ptr change

2018-04-18 Thread Nikita V. Shirokov
after introduction of bpf_xdp_adjust_tail helper packet length could be changed not only if xdp->data pointer has been changed but xdp->data_end as well. making bpf_prog_test_run aware of this possibility Signed-off-by: Nikita V. Shirokov --- net/bpf/test_run.c | 3 ++- 1

[PATCH bpf-next v3 02/11] bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail

2018-04-18 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for generic XDP we need to reflect this packet's length change by adjusting skb's tail pointer

Re: [PATCH bpf-next 1/2] bpf: add helper for getting xfrm states

2018-04-18 Thread Daniel Borkmann
On 04/17/2018 06:48 AM, Eyal Birger wrote: > This commit introduces a helper which allows fetching xfrm state > parameters by eBPF programs attached to TC. > > Prototype: > bpf_skb_get_xfrm_state(skb, index, xfrm_state, size, flags) > > skb: pointer to skb > index: the index in the skb

Re: WARNING: suspicious RCU usage in fib6_info_alloc

2018-04-18 Thread David Ahern
On 4/18/18 3:02 PM, syzbot wrote: > stack backtrace: > CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.16.0+ #5 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Workqueue: ipv6_addrconf addrconf_dad_work > Call Trace: >  __dump_stack

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-18 Thread Florian Fainelli
On 04/17/2018 06:49 PM, gree...@candelatech.com wrote: > From: Ben Greear > > This is similar to ETHTOOL_GSTATS, but it allows you to specify > flags. These flags can be used by the driver to decrease the > amount of stats refreshed. In particular, this helps with

Re: WARNING: suspicious RCU usage in fib6_info_alloc

2018-04-18 Thread Eric Dumazet
On 04/18/2018 02:04 PM, David Ahern wrote: > On 4/18/18 3:02 PM, syzbot wrote: >> stack backtrace: >> CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.16.0+ #5 >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> Google 01/01/2011 >> Workqueue: ipv6_addrconf

Re: [PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-18 Thread Michael Schmitz
Hi Finn, thanks for the feedback! On Wed, Apr 18, 2018 at 5:45 PM, Finn Thain wrote: >> > 1/9 net: phy: new Asix Electronics PHY driver >> > 2/9 net: ax88796: Fix MAC address reading >> > 3/9 net: ax88796: Attach MII bus only when open >> > 4/9 net: ax88796: Do not

Re: [PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-18 Thread Michael Schmitz
Hi Andrew, sorry, my mistake. I didn't realize how fast DaveM's tree diverges from Linus' (and Geert's) once the merge window opens. Cheers, Michael On Thu, Apr 19, 2018 at 12:19 AM, Andrew Lunn wrote: > On Wed, Apr 18, 2018 at 05:10:45PM +1200, Michael Schmitz wrote: >>

[PATCH net 0/3] net: sched: ife: malformed ife packet fixes

2018-04-18 Thread Alexander Aring
As promised at netdev 2.2 tc workshop I am working on adding scapy support for tdc testing. It is still work in progress. I will submit the patches to tdc later (they are not in good shape yet). The good news is I have been able to find bugs which normal packet testing would not be able to find.

[PATCH net 3/3] net: sched: ife: check on metadata length

2018-04-18 Thread Alexander Aring
This patch checks if sk buffer is available to dererence ife header. If not then NULL will returned to signal an malformed ife packet. This avoids to crashing the kernel from outside. Signed-off-by: Alexander Aring --- net/ife/ife.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH net 2/3] net: sched: ife: handle malformed tlv length

2018-04-18 Thread Alexander Aring
There is currently no handling to check on a invalid tlv length. This patch adds such handling to avoid killing the kernel with a malformed ife packet. Signed-off-by: Alexander Aring --- include/net/ife.h | 3 ++- net/ife/ife.c | 35

[PATCH net 1/3] net: sched: ife: signal not finding metaid

2018-04-18 Thread Alexander Aring
We need to record stats for received metadata that we dont know how to process. Have find_decode_metaid() return -ENOENT to capture this. Signed-off-by: Alexander Aring --- net/sched/act_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-18 Thread Ben Greear
On 04/18/2018 02:26 PM, Johannes Berg wrote: On Tue, 2018-04-17 at 18:49 -0700, gree...@candelatech.com wrote: + * @get_ethtool_stats2: Return extended statistics about the device. + * This is only useful if the device maintains statistics not + * included in rtnl_link_stats64. + *

[PATCH bpf-next,v2 2/2] samples/bpf: extend test_tunnel_bpf.sh with xfrm state test

2018-04-18 Thread Eyal Birger
Add a test for fetching xfrm state parameters from a tc program running on ingress. Signed-off-by: Eyal Birger --- samples/bpf/tcbpf2_kern.c | 15 +++ samples/bpf/test_tunnel_bpf.sh| 71 +++

[PATCH bpf-next,v2 1/2] bpf: add helper for getting xfrm states

2018-04-18 Thread Eyal Birger
This commit introduces a helper which allows fetching xfrm state parameters by eBPF programs attached to TC. Prototype: bpf_skb_get_xfrm_state(skb, index, xfrm_state, size, flags) skb: pointer to skb index: the index in the skb xfrm_state secpath array xfrm_state: pointer to 'struct

Re: [PATCH bpf-next 1/2] bpf: add helper for getting xfrm states

2018-04-18 Thread Eyal Birger
On Wed, 18 Apr 2018 22:59:27 +0200 Daniel Borkmann wrote: > On 04/17/2018 06:48 AM, Eyal Birger wrote: > > This commit introduces a helper which allows fetching xfrm state > > parameters by eBPF programs attached to TC. > > > > Prototype: > > bpf_skb_get_xfrm_state(skb,

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 18, 2018 at 09:46:04PM CEST, m...@redhat.com wrote: >On Wed, Apr 18, 2018 at 09:13:15PM +0200, Jiri Pirko wrote: >> Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: >> >On 4/18/2018 2:25 AM, Jiri Pirko wrote: >> >> Wed, Apr 11, 2018 at 09:13:52PM CEST,

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Eric Dumazet
On 04/18/2018 10:55 AM, Michael S. Tsirkin wrote: > Imagine you want to pass some data to card. > Natural thing is to just put it in a variable and start DMA. > However DMA API disallows stack access nowdays, > so it's natural to put this within struct device. > > See e.g. > > commit

Re: [PATCH net-next 2/2] netns: isolate seqnums to use per-netns locks

2018-04-18 Thread Christian Brauner
On Wed, Apr 18, 2018 at 11:55:52AM -0500, Eric W. Biederman wrote: > Christian Brauner writes: > > > Now that it's possible to have a different set of uevents in different > > network namespaces, per-network namespace uevent sequence numbers are > > introduced. This

Re: [RFC net-next PATCH 2/2] bpf: disallow XDP data_meta to overlap with xdp_frame area

2018-04-18 Thread Daniel Borkmann
On 04/18/2018 07:53 PM, Jesper Dangaard Brouer wrote: > On Wed, 18 Apr 2018 18:21:21 +0200 > Daniel Borkmann wrote: > >> On 04/18/2018 02:10 PM, Jesper Dangaard Brouer wrote: >>> If combining xdp_adjust_head and xdp_adjust_meta, then it is possible >>> to make data_meta

Re: [PATCH bpf-next v4 00/10] BTF: BPF Type Format

2018-04-18 Thread Daniel Borkmann
On 04/17/2018 10:42 PM, Martin KaFai Lau wrote: > This patch introduces BPF Type Format (BTF). > > BTF (BPF Type Format) is the meta data format which describes > the data types of BPF program/map. Hence, it basically focus > on the C programming language which the modern BPF is primary > using.

WARNING: suspicious RCU usage in fib6_info_alloc

2018-04-18 Thread syzbot
Hello, syzbot hit the following crash on net-next commit 0565de29cbd65b378147d36f9642f93a046240dc (Wed Apr 18 03:41:18 2018 +) Merge branch 'ipv6-Separate-data-structures-for-FIB-and-data-path' syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=2add39b05179b31f912f So far

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-18 Thread Johannes Berg
On Tue, 2018-04-17 at 18:49 -0700, gree...@candelatech.com wrote: > > + * @get_ethtool_stats2: Return extended statistics about the device. > + * This is only useful if the device maintains statistics not > + * included in rtnl_link_stats64. > + * Takes a flags argument: 0 means all

[PATCH bpf-next,v2 0/2] bpf: add helper for getting xfrm states

2018-04-18 Thread Eyal Birger
This patchset adds support for fetching XFRM state information from an eBPF program called from TC. The first patch introduces a helper for fetching an XFRM state from the skb's secpath. The XFRM state is modeled using a new virtual struct which contains the SPI, peer address, and reqid values of

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 01:47:21PM -0400, David Miller wrote: > From: Eric Dumazet > Date: Wed, 18 Apr 2018 09:51:25 -0700 > > > I suggest that virtio_net clearly identifies which part needs a specific > > allocation > > and does its itself, instead of abusing the

[PATCH net-next] team: account for oper state

2018-04-18 Thread George Wilkie
Account for operational state when determining port linkup state, as per Documentation/networking/operstates.txt. Signed-off-by: George Wilkie --- drivers/net/team/team.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/team/team.c

Re: [PATCH bpf-next v4 03/10] bpf: btf: Check members of struct/union

2018-04-18 Thread Jakub Kicinski
On Wed, 18 Apr 2018 11:01:15 -0700, Martin KaFai Lau wrote: > On Wed, Apr 18, 2018 at 10:22:10AM -0700, Jakub Kicinski wrote: > > On Tue, 17 Apr 2018 13:42:36 -0700, Martin KaFai Lau wrote: > > > This patch checks a few things of struct's members: > > > > > > 1) It has a valid size (e.g. a

[Patch net] llc: hold llc_sap before release_sock()

2018-04-18 Thread Cong Wang
syzbot reported we still access llc->sap in llc_backlog_rcv() after it is freed in llc_sap_remove_socket(): Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error

[PATCH net] vmxnet3: fix incorrect dereference when rxvlan is disabled

2018-04-18 Thread Ronak Doshi
vmxnet3_get_hdr_len() is used to calculate the header length which in turn is used to calculate the gso_size for skb. When rxvlan offload is disabled, vlan tag is present in the header and the function references ip header from sizeof(ethhdr) and leads to incorrect pointer reference. This patch

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, David Miller wrote: > From: Eric Dumazet > Date: Wed, 18 Apr 2018 09:51:25 -0700 > > > I suggest that virtio_net clearly identifies which part needs a specific > > allocation > > and does its itself, instead of abusing the netdev_priv storage. > >

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 09:05:54AM -0700, Eric Dumazet wrote: > > > On 04/18/2018 07:34 AM, Mikulas Patocka wrote: > > The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if kzalloc > > fails (later patches change it to kvzalloc). > > > > The problem with this is that if the vzalloc

Re: [PATCH bpf] tools/bpf: fix test_sock and test_sock_addr.sh failure

2018-04-18 Thread Andrey Ignatov
The patch looks good to me. Acked-by: Andrey Ignatov Thanks for improving the tests, Yonghong! Yonghong Song [Wed, 2018-04-18 10:49 -0700]: > The bpf selftests test_sock and test_sock_addr.sh failed > in my test machine. The failure looks like: > $ ./test_sock >

Re: [PATCH 0/8] ipconfig: NTP server support, bug fixes, documentation improvements

2018-04-18 Thread Chris Novakovic
On 18/04/2018 19:06, Chris Novakovic wrote: > On 18/04/2018 18:59, David Miller wrote: >> I think a plain file named /proc/net/ntp is quite confusing. It doesn't >> give any indication that it's a special file populated only by ipconfig >> and not some general NTP thing the kernel is doing. >> >>

Re: [RFC PATCH V1 01/12] audit: add container id

2018-04-18 Thread Richard Guy Briggs
On 2018-04-18 14:45, Stefan Berger wrote: > On 03/15/2018 11:58 PM, Richard Guy Briggs wrote: > > On 2018-03-15 16:27, Stefan Berger wrote: > > > On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: > > > > Implement the proc fs write to set the audit container ID of a process, > > > > emitting an

Re: [PATCH v3 net,stable] tun: fix vlan packet truncation

2018-04-18 Thread David Miller
From: Bjørn Mork Date: Tue, 17 Apr 2018 22:46:38 +0200 > Bogus trimming in tun_net_xmit() causes truncated vlan packets. > > skb->len is correct whether or not skb_vlan_tag_present() is true. There > is no more reason to adjust the skb length on xmit in this driver than > any

Re: [PATCH bpf-next v4 03/10] bpf: btf: Check members of struct/union

2018-04-18 Thread Martin KaFai Lau
On Wed, Apr 18, 2018 at 10:22:10AM -0700, Jakub Kicinski wrote: > On Tue, 17 Apr 2018 13:42:36 -0700, Martin KaFai Lau wrote: > > This patch checks a few things of struct's members: > > > > 1) It has a valid size (e.g. a "const void" is invalid) > > 2) A member's size (+ its member's offset) does

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread Willem de Bruijn
On Wed, Apr 18, 2018 at 1:50 PM, David Miller wrote: > From: Willem de Bruijn > Date: Tue, 17 Apr 2018 16:00:50 -0400 > >> Segmentation offload reduces cycles/byte for large packets by >> amortizing the cost of protocol stack traversal. >> >>

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread Or Gerlitz
On Wed, Apr 18, 2018 at 3:31 PM, John Hurley wrote: > On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz wrote: >> On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski >> wrote: >>> From: John Hurley

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread Willem de Bruijn
On Wed, Apr 18, 2018 at 2:12 PM, Alexander Duyck wrote: > On Wed, Apr 18, 2018 at 10:28 AM, David Miller wrote: >> From: Sowmini Varadhan >> Date: Wed, 18 Apr 2018 08:31:03 -0400 >> >>> However, I share Sridhar's

Re: [RFC PATCH V1 01/12] audit: add container id

2018-04-18 Thread Stefan Berger
On 03/15/2018 11:58 PM, Richard Guy Briggs wrote: On 2018-03-15 16:27, Stefan Berger wrote: On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: Implement the proc fs write to set the audit container ID of a process, emitting an AUDIT_CONTAINER record to document the event. This is a write from

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: >On 4/18/2018 2:25 AM, Jiri Pirko wrote: >> Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/11/2018 8:51 AM, Jiri Pirko wrote: >> > > Tue, Apr 10, 2018 at 08:59:48PM CEST,

Re: [RFC PATCH V1 01/12] audit: add container id

2018-04-18 Thread Stefan Berger
On 04/18/2018 03:23 PM, Richard Guy Briggs wrote: On 2018-04-18 14:45, Stefan Berger wrote: On 03/15/2018 11:58 PM, Richard Guy Briggs wrote: On 2018-03-15 16:27, Stefan Berger wrote: On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: Implement the proc fs write to set the audit container ID

Re: [RFC PATCH V1 01/12] audit: add container id

2018-04-18 Thread Richard Guy Briggs
On 2018-04-18 15:39, Stefan Berger wrote: > On 04/18/2018 03:23 PM, Richard Guy Briggs wrote: > > On 2018-04-18 14:45, Stefan Berger wrote: > > > On 03/15/2018 11:58 PM, Richard Guy Briggs wrote: > > > > On 2018-03-15 16:27, Stefan Berger wrote: > > > > > On 03/01/2018 02:41 PM, Richard Guy Briggs

[PATCH] docs: ip-sysctl.txt: fix name of some ipv6 variables

2018-04-18 Thread Olivier Gayot
The name of the following proc/sysctl entries were incorrectly documented: /proc/sys/net/ipv6/conf//max_dst_opts_number /proc/sys/net/ipv6/conf//max_hbt_opts_number /proc/sys/net/ipv6/conf//max_dst_opts_length /proc/sys/net/ipv6/conf//max_hbt_length Their name was set to the name

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, David Miller wrote: > From: Mikulas Patocka > Date: Wed, 18 Apr 2018 12:44:25 -0400 (EDT) > > > The structure net_device is followed by arbitrary driver-specific data > > (accessible with the function netdev_priv). And for virtio-net, these > >

Re: [RFC net-next PATCH 2/2] bpf: disallow XDP data_meta to overlap with xdp_frame area

2018-04-18 Thread Jesper Dangaard Brouer
On Wed, 18 Apr 2018 18:21:21 +0200 Daniel Borkmann wrote: > On 04/18/2018 02:10 PM, Jesper Dangaard Brouer wrote: > > If combining xdp_adjust_head and xdp_adjust_meta, then it is possible > > to make data_meta overlap with area used by xdp_frame. And another > > invocation

Re: [PATCH 0/8] ipconfig: NTP server support, bug fixes, documentation improvements

2018-04-18 Thread David Miller
From: Chris Novakovic Date: Tue, 17 Apr 2018 21:58:22 +0100 > - Patch #7 allows for NTP servers to be configured (manually on the >kernel command line or automatically via DHCP), enabling systems with >an NFS root filesystem to synchronise their clock before mounting

[PATCH iproute2] iplink_geneve: correct size of message to avoid spurious errors

2018-04-18 Thread Jakub Kicinski
Commit 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") inadvertently changed the parameter to addattr_l() resulting in: addattr_l ERROR: message exceeded bound of 4 when remote is specified. Fixes: 6c4b672738ac ("iplink_geneve: Get rid of inet_get_addr()") Signed-off-by: Jakub

Re: [PATCH 0/8] ipconfig: NTP server support, bug fixes, documentation improvements

2018-04-18 Thread Chris Novakovic
On 18/04/2018 18:59, David Miller wrote: > I think a plain file named /proc/net/ntp is quite confusing. It doesn't > give any indication that it's a special file populated only by ipconfig > and not some general NTP thing the kernel is doing. > > I would suggest creating a subdirectory like

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread Alexander Duyck
On Wed, Apr 18, 2018 at 10:28 AM, David Miller wrote: > From: Sowmini Varadhan > Date: Wed, 18 Apr 2018 08:31:03 -0400 > >> However, I share Sridhar's concerns about the very fundamental change >> to UDP message boundary semantics here. There is

[PATCH net-next] net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends

2018-04-18 Thread Eric Dumazet
After working on IP defragmentation lately, I found that some large packets defeat CHECKSUM_COMPLETE optimization because of NIC adding zero paddings on the last (small) fragment. While removing the padding with pskb_trim_rcsum(), we set skb->ip_summed to CHECKSUM_NONE, forcing a full csum

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 2:25 AM, Jiri Pirko wrote: Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: On 4/11/2018 8:51 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen

sendmmsg flags userspace ABI change in kernel 4.6

2018-04-18 Thread Florian Weimer
Since this commit: commit 28a94d8fb35b3a75b802f368ae6f4a9f6b0d435a Author: Tom Herbert Date: Mon Mar 7 14:11:02 2016 -0800 net: Allow MSG_EOR in each msghdr of sendmmsg This patch allows setting MSG_EOR in each individual msghdr passed in sendmmsg. This

Re: [PATCH net-next] team: account for oper state

2018-04-18 Thread Jiri Pirko
Wed, Apr 18, 2018 at 05:33:12PM CEST, gwil...@vyatta.att-mail.com wrote: >On Wed, Apr 18, 2018 at 04:58:22PM +0200, Jiri Pirko wrote: >> Wed, Apr 18, 2018 at 03:35:49PM CEST, gwil...@vyatta.att-mail.com wrote: >> >On Wed, Apr 18, 2018 at 02:56:44PM +0200, Jiri Pirko wrote: >> >> Wed, Apr 18, 2018

Re: [PATCH net-next 2/2] udp: implement and use per cpu rx skbs cache

2018-04-18 Thread Eric Dumazet
On 04/18/2018 10:15 AM, Paolo Abeni wrote: is not appealing to me :/ > > Thank you for the feedback. > Sorry for not being clear about it, but knotd is using SO_REUSEPORT and > the above tests are leveraging it. > > That 5% is on top of that 300%. Then there is something wrong. Adding copies

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-18 Thread David Miller
From: Alexander Duyck Date: Wed, 18 Apr 2018 11:12:06 -0700 > My only concern with the patch set is verifying what mitigations are > in case so that we aren't trying to set an MSS size that results in a > frame larger than MTU. I'm still digging through the code and

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 09:13:15PM +0200, Jiri Pirko wrote: > Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: > >On 4/18/2018 2:25 AM, Jiri Pirko wrote: > >> Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: > >> > On 4/11/2018 8:51 AM, Jiri Pirko

<    1   2   3   4   >