[PATCH v2 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-06 Thread Song Liu
Currently, bpf stackmap store address for each entry in the call trace. To map these addresses to user space files, it is necessary to maintain the mapping from these virtual address to symbols in the binary. Usually, the user space profiler (such as perf) has to scan /proc/pid/maps at the

Re: [RFC,POC] iptables/nftables to epbf/xdp via common intermediate layer

2018-03-06 Thread Edward Cree
On 06/03/18 18:03, Florian Westphal wrote: > I don't know. I suspect we should go for naive algorithm only, > but I would defer such decision to Alexei/Daniel. > > f.e. i don't know if using llvm is a good idea or not, Yeah, I wondered about that too.  I think it's probably not a good idea,  

[pci PATCH v3 1/3] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to add some basic functionality to support for SR-IOV on devices when the VFs are not managed by the kernel. The functions provided here can be used by drivers such as vfio-pci and virtio to enable SR-IOV on devices that are

[pci PATCH v3 3/3] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck Hardware-realized virtio_pci devices can implement SR-IOV, so this patch enables its use. The device in question is an upcoming Intel NIC that implements both a virtio_net PF and virtio_net VFs. These are hardware realizations of what has been

[PATCH net] dccp: check sk for closed state in dccp_sendmsg()

2018-03-06 Thread Alexey Kodanev
dccp_disconnect() sets 'dp->dccps_hc_tx_ccid' tx handler to NULL, therefore if DCCP socket is disconnected and dccp_sendmsg() is called after it, it will cause a NULL pointer dereference in dccp_write_xmit(). This crash and the reproducer was reported by syzbot. Looks like it is reproduced if

Re: [PATCH] net/mlx4_en: fix potential use-after-free with dma_unmap_page

2018-03-06 Thread Sarah Newman
On 03/06/2018 08:13 AM, Tariq Toukan wrote: > I have a general question about the process. > I don't totally get what branch this patch is targeted to. > It touches critical areas in datapath and should go through regression tests > before it is accepted to any branch. > This one is against

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Alexander Duyck
On Mon, Mar 5, 2018 at 7:15 PM, Stephen Hemminger wrote: > On Mon, 5 Mar 2018 14:47:20 -0800 > Alexander Duyck wrote: > >> On Mon, Mar 5, 2018 at 2:30 PM, Jiri Pirko wrote: >> > Mon, Mar 05, 2018 at 05:11:32PM CET,

Re: [next-queue PATCH v2 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-06 Thread Vinicius Costa Gomes
Hi, Jakub Kicinski writes: > On Fri, 2 Mar 2018 10:43:44 -0800, Vinicius Costa Gomes wrote: >> This allows filters added by tc-flower and specifying MAC addresses, >> Ethernet types, and the VLAN priority field, to be offloaded to the >> controller. >> >> This reuses most of

[pci PATCH v3 0/3] Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
This series is meant to add support for SR-IOV on devices when the VFs are not managed by the kernel. Examples of recent patches attempting to do this include: virto - https://patchwork.kernel.org/patch/10241225/ pci-stub - https://patchwork.kernel.org/patch/10109935/ vfio -

Re: [PATCH net] l2tp: do not accept arbitrary sockets

2018-03-06 Thread James Chapman
On 6 March 2018 at 15:54, Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller found an issue caused by lack of sufficient checks > in l2tp_tunnel_create() > > RAW sockets can not be considered as UDP ones for instance. Acked-by: James Chapman

Re: [RFC,POC] iptables/nftables to epbf/xdp via common intermediate layer

2018-03-06 Thread Florian Westphal
Edward Cree wrote: > On 06/03/18 16:42, Florian Westphal wrote: > > I would also add 'highlevel' objects that are themselves translated into > > basic operations. Most obvious example > > are 'fetch 4 bytes x bytes into transport header'. > > > > Frontend should not need to

Re: [bpf-next PATCH 05/16] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-06 Thread John Fastabend
On 03/06/2018 07:47 AM, David Miller wrote: > From: John Fastabend > Date: Mon, 5 Mar 2018 23:06:01 -0800 > >> On 03/05/2018 10:42 PM, David Miller wrote: >>> From: John Fastabend >>> Date: Mon, 5 Mar 2018 22:22:21 -0800 >>> All I meant

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 1:34 AM, Alexei Starovoitov wrote: > As the first step in development of bpfilter project [1] the request_module() > code is extended to allow user mode helpers to be invoked. Idea is that > user mode helpers are built as part of the kernel build and

Re: [PATCH v2 net-next 2/5] net/ipv6: Address checks need to consider the L3 domain

2018-03-06 Thread David Ahern
On 3/6/18 8:01 AM, Ido Schimmel wrote: > On Mon, Mar 05, 2018 at 01:34:03PM -0800, David Ahern wrote: >> ipv6_chk_addr_and_flags determines if an address is a local address. It >> is called by ip6_route_info_create to validate a gateway address is not a >> local address. It currently does not

Re: [PATCH net] l2tp: do not accept arbitrary sockets

2018-03-06 Thread Guillaume Nault
On Tue, Mar 06, 2018 at 07:54:53AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller found an issue caused by lack of sufficient checks > in l2tp_tunnel_create() > > RAW sockets can not be considered as UDP ones for instance. > Indeed, missing checks have been

Re: [PATCH v2 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-06 Thread Song Liu
> On Mar 6, 2018, at 10:25 AM, Peter Zijlstra wrote: > > On Tue, Mar 06, 2018 at 10:09:13AM -0800, Song Liu wrote: >> +/* Parse build ID of ELF file mapped to vma */ >> +static int stack_map_get_build_id(struct vm_area_struct *vma, >> +

[RFC] netfilter: cttimeout: remove VLA in ctnl_timeout_parse_policy

2018-03-06 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. Signed-off-by: Gustavo A. R. Silva --- net/netfilter/nfnetlink_cttimeout.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Don Dutile
On 03/05/2018 04:41 PM, Alexander Duyck wrote: On Mon, Mar 5, 2018 at 12:57 PM, Don Dutile wrote: On 03/01/2018 03:22 PM, Alex Williamson wrote: On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck wrote: On Wed, Feb 28, 2018 at 2:59 PM, Alex

[PATCH v2 2/2] bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID

2018-03-06 Thread Song Liu
test_stacktrace_build_id() is added. It accesses tracepoint urandom_read with "dd" and "urandom_read" and gathers stack traces. Then it reads the stack traces from the stackmap. urandom_read is a statically link binary that reads from /dev/urandom. test_stacktrace_build_id() calls readelf to read

Re: [PATCH bpf-next 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-06 Thread Song Liu
> On Mar 5, 2018, at 8:26 AM, Peter Zijlstra wrote: > > On Mon, Feb 26, 2018 at 09:49:22AM -0800, Song Liu wrote: > >> +/* Parse build ID of ELF file mapped to vma */ >> +static int stack_map_get_build_id(struct vm_area_struct *vma, >> +

Zdravstvujte! Vas interesujut klientskie bazy dannyh dlja prodazhi Vashih tovarov i uslug?

2018-03-06 Thread agranamw
Zdravstvujte! Vas interesujut klientskie bazy dannyh dlja prodazhi Vashih tovarov i uslug?

[PATCH] enic: fix boolreturn.cocci warnings

2018-03-06 Thread kbuild test robot
From: Fengguang Wu drivers/net/ethernet/cisco/enic/vnic_dev.c:1294:9-10: WARNING: return of 0/1 in function 'vnic_dev_capable_udp_rss' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by:

Re: [next-queue PATCH v2 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-06 Thread Jakub Kicinski
On Tue, 06 Mar 2018 11:08:26 -0800, Vinicius Costa Gomes wrote: > >> +static int igb_parse_cls_flower(struct igb_adapter *adapter, > >> + struct tc_cls_flower_offload *f, > >> + int traffic_class, > >> + struct

[PATCH v3 2/2] bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID

2018-03-06 Thread Song Liu
test_stacktrace_build_id() is added. It accesses tracepoint urandom_read with "dd" and "urandom_read" and gathers stack traces. Then it reads the stack traces from the stackmap. urandom_read is a statically link binary that reads from /dev/urandom. test_stacktrace_build_id() calls readelf to read

[PATCH v3 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-06 Thread Song Liu
Currently, bpf stackmap store address for each entry in the call trace. To map these addresses to user space files, it is necessary to maintain the mapping from these virtual address to symbols in the binary. Usually, the user space profiler (such as perf) has to scan /proc/pid/maps at the

Re: [PATCH net v2 RESEND] ipv6: Reflect MTU changes on PMTU of exceptions for MTU-less routes

2018-03-06 Thread David Ahern
On 3/6/18 3:10 AM, Stefano Brivio wrote: > Currently, administrative MTU changes on a given netdevice are > not reflected on route exceptions for MTU-less routes, with a > set PMTU value, for that device: > > # ip -6 route get 2001:db8::b > 2001:db8::b from :: dev vti_a proto kernel src

Re: [PATCH v2 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-06 Thread Peter Zijlstra
On Tue, Mar 06, 2018 at 10:09:13AM -0800, Song Liu wrote: > +/* Parse build ID of ELF file mapped to vma */ > +static int stack_map_get_build_id(struct vm_area_struct *vma, > + unsigned char *build_id) > +{ > + Elf32_Ehdr *ehdr; > + struct page *page; > +

[PATCH bpf-next 2/2] samples/bpf: add example to test reading address

2018-03-06 Thread Teng Qin
This commit adds additional test in the trace_event example, by attaching the bpf program to MEM_UOPS_RETIRED.LOCK_LOADS event with PERF_SAMPLE_ADDR requested, and print the lock address value read from the bpf program to trace_pipe. Signed-off-by: Teng Qin ---

[PATCH bpf-next 1/2] bpf: add support to read sample address in bpf program

2018-03-06 Thread Teng Qin
This commit adds new field "addr" to bpf_perf_event_data which could be read and used by bpf programs attached to perf events. The value of the field is copied from bpf_perf_event_data_kern.addr and contains the address value recorded by specifying sample_type with PERF_SAMPLE_ADDR when calling

[PATCH bpf-next 0/2] bpf: add support for bpf program to read perf event sample address

2018-03-06 Thread Teng Qin
These patches add support that allows bpf programs attached to perf events to read the address values recorded with the perf events. These values are requested by specifying sample_type with PERF_SAMPLE_ADDR when calling perf_event_open(). The main motivation for these changes is to support

Re: [PATCH net-next] net/sched: cls_flower: Add support to handle first frag as match field

2018-03-06 Thread Jakub Kicinski
On Tue, 6 Mar 2018 18:11:14 +0100, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Allow setting firstfrag as matching option in tc flower classifier. > > # tc filter add dev eth0 protocol ip parent : \ > flower indev eth0 \ >

[PATCH net-next] net/mlx4_en: try to use high order pages for RX rings

2018-03-06 Thread Eric Dumazet
From: Eric Dumazet RX rings can fit most of the time in a contiguous piece of memory, so lets use kvzalloc_node/kvfree instead of vzalloc_node/vfree Note that kvzalloc_node() automatically falls back to another node, there is no need to do the fallback ourselves.

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Linus Torvalds
On Mon, Mar 5, 2018 at 5:34 PM, Alexei Starovoitov wrote: > As the first step in development of bpfilter project [1] the request_module() > code is extended to allow user mode helpers to be invoked. Idea is that > user mode helpers are built as part of the kernel build and

[pci PATCH v3 2/3] vfio: Add support for unmanaged or userspace managed SR-IOV

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to allow assignment of an SR-IOV enabled PF, as in VFs have been generated, with vfio-pci. My understanding is the primary use case for this is something like DPDK running the PF while the VFs are all assigned to guests. A

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Linus Torvalds
On Tue, Mar 6, 2018 at 12:01 PM, Andy Lutomirski wrote: > > I assume I'm missing some context here, but why does this need to be > handled by the kernel rather than, say, a change to how modprobe > works? Honestly, the less we have to mess with user-mode tooling, the better.

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Tycho Andersen
On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: > >> Suppose I'm writing a container manager. I want to run "mount" in the > >> container, but I don't want to allow moun() in general and I want to > >> emulate certain mount() actions. I can write a filter that catches > >> mount

[PATCH v3.18] net: fec: introduce fec_ptp_stop and use in probe fail path

2018-03-06 Thread Guenter Roeck
From: Lucas Stach [ upstream commit 32cba57ba74be58589aeb4cb6496183e46a5e3e5 ] This function frees resources and cancels delayed work item that have been initialized in fec_ptp_init(). Use this to do proper error handling if something goes wrong in probe function after

Re: Userspace helper design

2018-03-06 Thread Sargun Dhillon
On Tue, Mar 6, 2018 at 12:31 PM, Daniel Borkmann wrote: > On 03/06/2018 05:02 PM, Sargun Dhillon wrote: >> On Tue, Mar 6, 2018 at 3:26 AM, Daniel Borkmann wrote: >>> On 03/06/2018 02:53 AM, Alexei Starovoitov wrote: On Mon, Mar 05, 2018 at

Re: [next-queue PATCH v2 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-06 Thread Vinicius Costa Gomes
Hi, Jakub Kicinski writes: > On Tue, 06 Mar 2018 11:08:26 -0800, Vinicius Costa Gomes wrote: >> >> +static int igb_parse_cls_flower(struct igb_adapter *adapter, >> >> + struct tc_cls_flower_offload *f, >> >> + int traffic_class, >>

[bpf-next V1 PATCH 12/15] xdp: allow page_pool as an allocator type in xdp_return_frame

2018-03-06 Thread Jesper Dangaard Brouer
New allocator type MEM_TYPE_PAGE_POOL for page_pool usage. The registered allocator page_pool pointer is not available directly from xdp_rxq_info, but it could be (if needed). For now, the driver should keep separate track of the page_pool pointer, which it should use for RX-ring page

[bpf-next V1 PATCH 14/15] xdp: transition into using xdp_frame for return API

2018-03-06 Thread Jesper Dangaard Brouer
Changing API xdp_return_frame() to take struct xdp_frame as argument, seems like a natural choice. But there are some subtle performance details here that needs extra care, which is a deliberate choice. When de-referencing xdp_frame on a remote CPU during DMA-TX completion, result in the

[bpf-next V1 PATCH 11/15] page_pool: refurbish version of page_pool code

2018-03-06 Thread Jesper Dangaard Brouer
Need a fast page recycle mechanism for ndo_xdp_xmit API for returning pages on DMA-TX completion time, which have good cross CPU performance, given DMA-TX completion time can happen on a remote CPU. Refurbish my page_pool code, that was presented[1] at MM-summit 2016. Adapted page_pool code to

[bpf-next V1 PATCH 15/15] xdp: transition into using xdp_frame for ndo_xdp_xmit

2018-03-06 Thread Jesper Dangaard Brouer
Changing API ndo_xdp_xmit to take a struct xdp_frame instead of struct xdp_buff. This brings xdp_return_frame and ndp_xdp_xmit in sync. This builds towards changing the API further to become a bulk API, because xdp_buff is not a queue-able object while xdp_frame is. Signed-off-by: Jesper

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 10:25 PM, Mickaël Salaün wrote: > > > On 28/02/2018 00:09, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 10:03 PM, Mickaël Salaün wrote: >>> >>> On 27/02/2018 05:36, Andy Lutomirski wrote: On Tue, Feb 27, 2018 at 12:41 AM,

[RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-06 Thread Jesus Sanchez-Palencia
Extend SO_TXTIME APIs with new per-packet parameters: a clockid_t and a drop_if_late flag. With this commit the API becomes: - use SO_TXTIME to enable the feature on a socket; - pass the per-packet arguments through the cmsg header using: * SCM_CLOCKID for the clockid to be used as the txtime

[RFC v3 net-next 16/18] igb: Only change Tx arbitration when CBS is on

2018-03-06 Thread Jesus Sanchez-Palencia
Currently the data transmission arbitration algorithm - DataTranARB field on TQAVCTRL reg - is always set to CBS when the Tx mode is changed from legacy to 'Qav' mode. Make that configuration a bit more granular in preparation for the upcoming Launchtime enabling patches, since CBS and Launchtime

[RFC v3 net-next 11/18] net: packet: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/packet/af_packet.c | 13 + 1 file changed, 13 insertions(+)

[RFC v3 net-next 14/18] net/sched: Add HW offloading capability to TBS

2018-03-06 Thread Jesus Sanchez-Palencia
Add new queueing modes to tbs qdisc so HW offload is supported. For hw offload, if sorting is on, then the time sorted list will still be used, but when sorting is disabled the enqueue / dequeue flow will be based on a 'raw' FIFO through the usage of qdisc_enqueue_tail() and qdisc_dequeue_head().

[RFC v3 net-next 13/18] net/sched: Introduce the TBS Qdisc

2018-03-06 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes TBS (Time Based Scheduler) uses the information added earlier in this series (the socket option SO_TXTIME and the new role of sk_buff->tstamp) to schedule traffic transmission based on absolute time. For some workloads, just bandwidth

[RFC v3 net-next 09/18] net: ipv4: raw: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 5 + 1 file changed, 5 insertions(+) diff --git

[RFC v3 net-next 10/18] net: ipv4: udp: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/udp.c | 5 + 1 file changed, 5 insertions(+) diff --git

[RFC v3 net-next 01/18] sock: Fix SO_ZEROCOPY switch case

2018-03-06 Thread Jesus Sanchez-Palencia
Fix the SO_ZEROCOPY switch case on sock_setsockopt() avoiding the ret values to be overwritten by the one set on the default case. Fixes: 28190752c7092 ("sock: permit SO_ZEROCOPY on PF_RDS socket") Signed-off-by: Jesus Sanchez-Palencia --- net/core/sock.c | 3

[RFC v3 net-next 04/18] net: Add a new socket option for a future transmit time.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran This patch introduces SO_TXTIME. User space enables this option in order to pass a desired future transmit time in a CMSG when calling sendmsg(2). A new field is added to struct sockcm_cookie, and the tstamp from skbuffs will be used later on.

[RFC v3 net-next 02/18] net: Clear skb->tstamp only on the forwarding path

2018-03-06 Thread Jesus Sanchez-Palencia
This is done in preparation for the upcoming time based transmission patchset. Now that skb->tstamp will be used to hold packet's txtime, we must ensure that it is being cleared when traversing namespaces. Also, doing that from skb_scrub_packet() would break our feature when tunnels are used.

[RFC v3 net-next 00/18] Time based packet transmission

2018-03-06 Thread Jesus Sanchez-Palencia
This series is the v3 of the Time based packet transmission RFC, which was originally proposed by Richard Cochran (v1: https://lwn.net/Articles/733962/ ) and further developed by us with the addition of the tbs qdisc (v2: https://lwn.net/Articles/744797/ ). It introduces a new socket option

[RFC v3 net-next 03/18] posix-timers: Add CLOCKID_INVALID mask

2018-03-06 Thread Jesus Sanchez-Palencia
posix-timers.h states that a clockid_t value is invalid if bits 0, 1 and 2 are all set. Add a mask that can be safely used elsewhere even if this implicit rule's implementation is changed. This is done in preparation for the upcoming time based transmission patchset. Signed-off-by: Jesus

[RFC v3 net-next 15/18] igb: Refactor igb_configure_cbs()

2018-03-06 Thread Jesus Sanchez-Palencia
Make this function retrieve what it needs from the Tx ring being addressed since it already relies on what had been saved on it before. Also, since this function will be used by the upcoming Launchtime patches rename it to better reflect its intention. Note that Launchtime is not part of what

[RFC v3 net-next 12/18] net/sched: Allow creating a Qdisc watchdog with other clocks

2018-03-06 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes This adds 'qdisc_watchdog_init_clockid()' that allows a clockid to be passed, this allows other time references to be used when scheduling the Qdisc to run. Signed-off-by: Vinicius Costa Gomes ---

[RFC v3 net-next 17/18] igb: Refactor igb_offload_cbs()

2018-03-06 Thread Jesus Sanchez-Palencia
Split code into a separate function (igb_offload_apply()) that will be used by TBS offload implementation. Signed-off-by: Jesus Sanchez-Palencia --- drivers/net/ethernet/intel/igb/igb_main.c | 23 ++- 1 file changed, 14 insertions(+), 9

[RFC v3 net-next 07/18] net: packet: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw layer-2 packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia ---

[RFC v3 net-next 18/18] igb: Add support for TBS offload

2018-03-06 Thread Jesus Sanchez-Palencia
Implement HW offload support for SO_TXTIME through igb's Launchtime feature. This is done by extending igb_setup_tc() so it supports TC_SETUP_QDISC_TBS and configuring i210 so time based transmit arbitration is enabled. The FQTSS transmission mode added before is extended so strict priority (SP)

[RFC v3 net-next 06/18] net: ipv4: udp: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For udp packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/udp.c | 5 -

[RFC v3 net-next 05/18] net: ipv4: raw: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 2 ++ 1

Re: [PATCH net-next] net: Only honor ifindex in IP_PKTINFO if non-0

2018-03-06 Thread David Ahern
On 2/16/18 12:03 PM, David Ahern wrote: > Only allow ifindex from IP_PKTINFO to override SO_BINDTODEVICE settings > if the index is actually set in the message. > > Signed-off-by: David Ahern > --- > net/ipv4/ip_sockglue.c | 6 -- > 1 file changed, 4 insertions(+), 2

Re: Userspace helper design

2018-03-06 Thread Alexei Starovoitov
On Tue, Mar 06, 2018 at 01:14:30PM -0800, Sargun Dhillon wrote: > > So, would this verifier just ensure that no maps are accessed prior to > the helper being called, XOR ensure that after the helper is called, > no map values are accessed? Nack on this design.

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-03-06 Thread Mickaël Salaün
On 28/02/2018 01:09, Andy Lutomirski wrote: > On Wed, Feb 28, 2018 at 12:00 AM, Mickaël Salaün wrote: >> >> On 28/02/2018 00:23, Andy Lutomirski wrote: >>> On Tue, Feb 27, 2018 at 11:02 PM, Andy Lutomirski wrote: On Tue, Feb 27, 2018 at 10:14 PM, Mickaël

Re: [PATCH iproute2-next v2 00/12] ip more JSON

2018-03-06 Thread David Ahern
On 3/6/18 2:07 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > The ip command implementation of JSON was very spotty. Only address > and link were originally implemented. After doing route for next, > went ahead and implemented it for a bunch of the other sub

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 11:06 PM, Mickaël Salaün wrote: > > On 06/03/2018 23:46, Tycho Andersen wrote: >> On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: > Suppose I'm writing a container manager. I want to run "mount" in the > container, but I don't

[PATCH iproute2-next v2 00/12] ip more JSON

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger The ip command implementation of JSON was very spotty. Only address and link were originally implemented. After doing route for next, went ahead and implemented it for a bunch of the other sub commands. Hopefully will reach full coverage soon.

[PATCH iproute2-next v2 01/12] ipneigh: add color and json support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Use json_print to provide json (and color) support to ip neigh command. Example: $ ip -j -p neigh [ { "dst": "192.168.1.29", "dev": "enp12s0", "state": [ "FAILED" ] },{ "dst": "192.168.1.130", "dev":

[PATCH iproute2-next v2 07/12] tcp_metrics: add json support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Add JSON support to the ip tcp_metrics output. $ ip -j -p tcp_metrics show [ { "dst": "192.18.1.11", "age": 23617.8, "ssthresh": 7, "cwnd": 3, "rtt": 0.039176, "rttvar": 0.039176, "source":

[PATCH iproute2-next v2 09/12] token: support JSON

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Add JSON output to ip token command. Signed-off-by: Stephen Hemminger --- ip/iptoken.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ip/iptoken.c b/ip/iptoken.c index

[PATCH net] tcp: purge write queue upon aborting the connection

2018-03-06 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh When the connection is aborted, there is no point in keeping the packets on the write queue until the connection is closed. Similar to a27fd7a8ed38 ('tcp: purge write queue upon RST'), this is essential for a correct MSG_ZEROCOPY implementation,

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 12:19 PM, Don Dutile wrote: > On 03/05/2018 04:41 PM, Alexander Duyck wrote: >> >> On Mon, Mar 5, 2018 at 12:57 PM, Don Dutile wrote: >>> >>> On 03/01/2018 03:22 PM, Alex Williamson wrote: On Wed, 28 Feb 2018 16:36:38

Re: "wrong" ifindex on received VLAN tagged packet?

2018-03-06 Thread Lawrence Kreeger
Using ETH_P_ALL instead of ETH_P_802_2, is causing mstpd to get 3 copies of the same BPDU. One from eth0, one from eth0.100, and another from vlan100 (the bridge). mstpd will drop the one from vlan100, but since there is also an instance of spanning tree running on the native VLAN, there is now

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Jiri Pirko
Tue, Mar 06, 2018 at 08:08:21PM CET, alexander.du...@gmail.com wrote: >On Mon, Mar 5, 2018 at 7:15 PM, Stephen Hemminger > wrote: >> On Mon, 5 Mar 2018 14:47:20 -0800 >> Alexander Duyck wrote: >> >>> On Mon, Mar 5, 2018 at 2:30 PM, Jiri Pirko

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 2:59 PM, Jiri Pirko wrote: > Tue, Mar 06, 2018 at 08:08:21PM CET, alexander.du...@gmail.com wrote: >>On Mon, Mar 5, 2018 at 7:15 PM, Stephen Hemminger >> wrote: >>> On Mon, 5 Mar 2018 14:47:20 -0800 >>> Alexander Duyck

Re: [PATCH] net: don't unnecessarily load kernel modules in dev_ioctl()

2018-03-06 Thread Stephen Hemminger
On Tue, 06 Mar 2018 17:27:44 -0500 Paul Moore wrote: > From: Paul Moore > > Starting with v4.16-rc1 we've been seeing a higher than usual number > of requests for the kernel to load networking modules, even on events > which shouldn't trigger a module

Re: [PATCH net-next 2/2] rds: use list structure to track information for zerocopy completion notification

2018-03-06 Thread Willem de Bruijn
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan wrote: > Commit 401910db4cd4 ("rds: deliver zerocopy completion notification > with data") removes support fo r zerocopy completion notification > on the sk_error_queue, thus we no longer need to track the cookie >

Re: [PATCH net-next 1/2] rds: refactor zcopy code into rds_message_zcopy_from_user

2018-03-06 Thread Willem de Bruijn
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan wrote: > Move the large block of code predicated on zcopy from > rds_message_copy_from_user into a new function, > rds_message_zcopy_from_user() > > Signed-off-by: Sowmini Varadhan

Re: "wrong" ifindex on received VLAN tagged packet?

2018-03-06 Thread David Ahern
On 3/6/18 3:02 PM, Lawrence Kreeger wrote: > Hello, > > I'm trying to run mstpd on a per VLAN basis using one traditional > linux bridge per VLAN. I'm running it on kernel version 4.12.4. It > works fine for untagged frames, but I'm having a problem with VLAN > tagged BPDUs arriving on the

[PATCH iproute2-next 3/3] ipmroute: convert to output JSON

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Should be no change for non-json case except putting color on address if desired. Signed-off-by: Stephen Hemminger --- ip/ipmroute.c | 117 ++ 1 file changed, 77

[PATCH iproute2-next 1/3] ipmaddr: json and color support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Support printing mulitcast addresses in json and color mode. Output format is unchanged for normal use. Signed-off-by: Stephen Hemminger --- ip/ipmaddr.c | 69

[PATCH iproute2-next 2/3] ipmroute: don't complain about unicast routes

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Every non-multicast route prints an error message. Kernel doesn't filter out unicast routes, it is up to filter function to do this. Signed-off-by: Stephen Hemminger --- ip/ipmroute.c | 7 +++ 1 file changed, 3

[PATCH iproute2-next 0/3] ip multicast command JSON support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Update maddr and mroute to support JSON. Fix bug in ipmroute that causes it print error on every unicast route. Stephen Hemminger (3): ipmaddr: json and color support ipmroute: don't complain about unicast routes ipmroute: convert to output

[bpf-next V1 PATCH 08/15] bpf: cpumap convert to use generic xdp_frame

2018-03-06 Thread Jesper Dangaard Brouer
The generic xdp_frame format, was inspired by the cpumap own internal xdp_pkt format. It is now time to convert it over to the generic xdp_frame format. The cpumap needs one extra field dev_rx. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h |1 +

[bpf-next V1 PATCH 13/15] mlx5: use page_pool for xdp_return_frame call

2018-03-06 Thread Jesper Dangaard Brouer
This patch shows how it is possible to have both the driver local page cache, which uses elevated refcnt for "catching"/avoiding SKB put_page. And at the same time, have pages getting returned to the page_pool from ndp_xdp_xmit DMA completion. Performance is surprisingly good. Tested DMA-TX

[bpf-next V1 PATCH 09/15] mlx5: register a memory model when XDP is enabled

2018-03-06 Thread Jesper Dangaard Brouer
Now all the users of ndo_xdp_xmit have been converted to use xdp_return_frame. This enable a different memory model, thus activating another code path in the xdp_return_frame API. Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c |

[bpf-next V1 PATCH 06/15] tun: convert to use generic xdp_frame and xdp_return_frame API

2018-03-06 Thread Jesper Dangaard Brouer
The tuntap driver invented it's own driver specific way of queuing XDP packets, by storing the xdp_buff information in the top of the XDP frame data. Convert it over to use the more generic xdp_frame structure. The main problem with the in-driver method is that the xdp_rxq_info pointer cannot be

[bpf-next V1 PATCH 10/15] xdp: rhashtable with allocator ID to pointer mapping

2018-03-06 Thread Jesper Dangaard Brouer
Use the IDA infrastructure for getting a cyclic increasing ID number, that is used for keeping track of each registered allocator per RX-queue xdp_rxq_info. Instead of using the IDR infrastructure, which uses a radix tree, use a dynamic rhashtable, for creating ID to pointer lookup table, because

[bpf-next V1 PATCH 01/15] mlx5: basic XDP_REDIRECT forward support

2018-03-06 Thread Jesper Dangaard Brouer
This implements basic XDP redirect support in mlx5 driver. Notice that the ndo_xdp_xmit() is NOT implemented, because that API need some changes that this patchset is working towards. The main purpose of this patch is have different drivers doing XDP_REDIRECT to show how different memory models

[bpf-next V1 PATCH 02/15] xdp: introduce xdp_return_frame API and use in cpumap

2018-03-06 Thread Jesper Dangaard Brouer
Introduce an xdp_return_frame API, and convert over cpumap as the first user, given it have queued XDP frame structure to leverage. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h | 32 +++ kernel/bpf/cpumap.c | 60

[bpf-next V1 PATCH 04/15] xdp: move struct xdp_buff from filter.h to xdp.h

2018-03-06 Thread Jesper Dangaard Brouer
This is done to prepare for the next patch, and it is also nice to move this XDP related struct out of filter.h. Signed-off-by: Jesper Dangaard Brouer --- include/linux/filter.h | 24 +--- include/net/xdp.h | 22 ++ 2 files

[bpf-next V1 PATCH 05/15] xdp: introduce a new xdp_frame type

2018-03-06 Thread Jesper Dangaard Brouer
This is needed to convert drivers tuntap and virtio_net. This is a generalization of what is done inside cpumap, which will be converted later. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h | 40 1 file changed, 40

[bpf-next V1 PATCH 03/15] ixgbe: use xdp_return_frame API

2018-03-06 Thread Jesper Dangaard Brouer
Extend struct ixgbe_tx_buffer to store the xdp_mem_info. Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/intel/ixgbe/ixgbe.h |1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[bpf-next V1 PATCH 07/15] virtio_net: convert to use generic xdp_frame and xdp_return_frame API

2018-03-06 Thread Jesper Dangaard Brouer
The virtio_net driver assumes XDP frames are always released based on page refcnt (via put_page). Thus, is only queues the XDP data pointer address and uses virt_to_head_page() to retrieve struct page. Use the XDP return API to get away from such assumptions. Instead queue an xdp_frame, which

"wrong" ifindex on received VLAN tagged packet?

2018-03-06 Thread Lawrence Kreeger
Hello, I'm trying to run mstpd on a per VLAN basis using one traditional linux bridge per VLAN. I'm running it on kernel version 4.12.4. It works fine for untagged frames, but I'm having a problem with VLAN tagged BPDUs arriving on the socket with the ifindex of the bridge itself, and not the

[PATCH net] macvlan: filter out xfrm feature flags

2018-03-06 Thread Shannon Nelson
Adding a macvlan device on top of a lowerdev that supports the xfrm offloads fails. # ip link add link ens1f0 mv0 type macvlan RTNETLINK answers: Operation not permitted Tracing down the failure shows that the macvlan device inherits the NETIF_F_HW_ESP and NETIF_F_HW_ESP_TX_CSUM feature

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Mickaël Salaün
On 06/03/2018 23:46, Tycho Andersen wrote: > On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: Suppose I'm writing a container manager. I want to run "mount" in the container, but I don't want to allow moun() in general and I want to emulate certain mount() actions.

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Alexei Starovoitov
combining multiple answers... On 3/6/18 3:05 AM, Greg KH wrote: Any chance you can add a field to your "umh module" type such that a normal 'modinfo' program will be able to notice it is different easily? ok. handling of modinfo turned out to be straightforward. kmod tooling worked fine with

  1   2   3   >