Re: [PATCH net] net: fib_rules: add protocol check in rule_find

2018-06-28 Thread Roopa Prabhu
On Wed, Jun 27, 2018 at 6:27 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > After commit f9d4b0c1e969 ("fib_rules: move common handling of newrule > delrule msgs into fib_nl2rule"), rule_find is strict about checking > for an existing rule. rule_find must check against all > user given

Re: [PATCH v12 03/10] netdev: cavium: octeon: Add Octeon III BGX Ethernet Nexus

2018-06-28 Thread David Miller
From: Carlos Munoz Date: Thu, 28 Jun 2018 14:20:05 -0700 > > > On 06/28/2018 01:41 AM, Andrew Lunn wrote: >> External Email >> >>> +static char *mix_port; >>> +module_param(mix_port, charp, 0444); >>> +MODULE_PARM_DESC(mix_port, "Specifies which ports connect to MIX >>> interfaces."); >>> +

Re: [PATCH net-next 0/4] ila: Cleanup

2018-06-28 Thread David Miller
From: Tom Herbert Date: Wed, 27 Jun 2018 14:38:58 -0700 > Perform some cleanup in ILA code. This includes: > > - Fix rhashtable walk for cases where nl dumps are done with muliple > function calls. Add a skip index to skip over entries in > a node that have been previously visitied. Call

Re: [PATCH v12 03/10] netdev: cavium: octeon: Add Octeon III BGX Ethernet Nexus

2018-06-28 Thread Chavva, Chandrakala
David, How can we support NFS boot if pass the parameters via devlink. Basically this determines what phy to use from device tree. Chandra From: David Miller Sent: Thursday, June 28, 2018 7:19:05 PM To: Munoz, Carlos Cc: and...@lunn.ch; Hill, Steven;

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Linus Torvalds
On Thu, Jun 28, 2018 at 7:21 AM Christoph Hellwig wrote: > > Note that for this removes the possibility of actually returning an > error before waiting in poll. We could still do this with an ERR_PTR > in f_poll_head with a little bit of WRITE_ONCE/READ_ONCE magic, but > I'd like to defer that

[PATCH net-next 3/4] selftests: forwarding: Tweak tc filters for mirror-to-gretap tests

2018-06-28 Thread Petr Machata
When running mirror_gre_bridge_1d_vlan tests on veth, several issues cause spurious failures: - vlan_ethtype should be ip, not ipv6 even in mirror-to-ip6gretap case, because the overlay packet is still IPv4. - Similarly ip_proto matches the innermost IP protocol, so can't be used to filter

[PATCH net-next 2/4] selftests: forwarding: lib: Avoid trapping soft devices

2018-06-28 Thread Petr Machata
There are several cases where traffic that would normally be forwarded in silicon needs to be observed in slow path. That's achieved by trapping such traffic, and the functions trap_install() and trap_uninstall() realize that. However, such treatment is obviously wrong if the device in question is

[PATCH net-next 0/4] Fixes for running mirror-to-gretap tests on veth

2018-06-28 Thread Petr Machata
The forwarding selftests infrastructure makes it possible to run the individual tests on a purely software netdevices. Names of interfaces to run the test with can be passed as command line arguments to a test. lib.sh then creates veth pairs backing the interfaces if none exist in the system.

[PATCH net-next 4/4] selftests: forwarding: mirror_gre_changes: Fix waiting for neighbor

2018-06-28 Thread Petr Machata
When running the test on soft devices, there's no mechanism to gratuitously start resolving the neighbor for remote tunnel endpoint. So instead of passively waiting, wait for the device to be up, and then probe the neighbor with a ping. Signed-off-by: Petr Machata ---

[PATCH net-next 1/4] selftests: forwarding: lib: Split out setup_wait_dev()

2018-06-28 Thread Petr Machata
Split out of setup_wait() a function setup_wait_dev() that waits for a single device. This gives tests the opportunity to wait for a selected device after they tinkered with its upness. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/lib.sh | 25 -

Re: [PATCH net-next v2 3/4] net: check tunnel option type in tunnel flags

2018-06-28 Thread Jiri Benc
On Thu, 28 Jun 2018 09:54:52 -0700, Jakub Kicinski wrote: > Hmm... in practice we could steal top bits of the size parameter for > some flags, since it seems to be limited to values < 256 today? Is it > worth it? > > It would look something along the lines of: Something like that, yes. I'll

Re: [PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-28 Thread Davide Caratti
hello Lucas, On Wed, 2018-06-27 at 14:50 -0400, Lucas Bates wrote: > On Tue, Jun 26, 2018 at 10:51 AM, Davide Caratti wrote: > > On Tue, 2018-06-26 at 09:17 -0400, Keara Leibovitz wrote: > > > Create unittests for the tc tunnel_key action. > > > > > > > > > Signed-off-by: Keara Leibovitz > >

[PATCH bpf-net 06/14] bpf/verifier: introduce BPF_PTR_TO_MAP_VALUE

2018-06-28 Thread Roman Gushchin
BPF_MAP_TYPE_CGROUP_STORAGE maps are special in a way that the access from the bpf program side is lookup-free. That means the result is guaranteed to be a valid pointer to the cgroup storage; no NULL-check is required. This patch introduces BPF_PTR_TO_MAP_VALUE return type, which is required to

[PATCH bpf-net 05/14] bpf: extend bpf_prog_array to store pointers to the cgroup storage

2018-06-28 Thread Roman Gushchin
This patch converts bpf_prog_array from an array of prog pointers to the array of struct bpf_prog_array_item elements. This allows to save a cgroup storage pointer for each bpf program efficiently attached to a cgroup. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann

[PATCH bpf-net 02/14] bpf: introduce cgroup storage maps

2018-06-28 Thread Roman Gushchin
This commit introduces BPF_MAP_TYPE_CGROUP_STORAGE maps: a special type of maps which are implementing the cgroup storage. >From the userspace point of view it's almost a generic hash map with the (cgroup inode id, attachment type) pair used as a key. The only difference is that some operations

[PATCH bpf-net 00/14] bpf: cgroup local storage

2018-06-28 Thread Roman Gushchin
This patchset implements cgroup local storage for bpf programs. The main idea is to provide a fast accessible memory for storing various per-cgroup data, e.g. number of transmitted packets. Cgroup local storage looks as a special type of map for userspace, and is accessible using generic bpf maps

[PATCH bpf-net 12/14] selftests/bpf: add verifier cgroup storage tests

2018-06-28 Thread Roman Gushchin
Add the following verifier tests to cover the cgroup storage functionality: 1) valid access to the cgroup storage 2) invalid access: use regular hashmap instead of cgroup storage map 3) invalid access: use invalid map fd 4) invalid access: try access memory after the cgroup storage 5) invalid

[PATCH bpf-net 01/14] bpf: add ability to charge bpf maps memory dynamically

2018-06-28 Thread Roman Gushchin
This commits extends existing bpf maps memory charging API to support dynamic charging/uncharging. This is required to account memory used by maps, if all entries are created dynamically after the map initialization. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann

Re: [PATCH net-next 0/4] net: Geneve options support for TC act_tunnel_key

2018-06-28 Thread Jakub Kicinski
On Thu, 28 Jun 2018 16:17:31 +0900 (KST), David Miller wrote: > From: Jakub Kicinski > Date: Tue, 26 Jun 2018 11:53:04 -0700 > > > Hi, > > > > Simon & Pieter say: > > > > This set adds Geneve Options support to the TC tunnel key action. > > It provides the plumbing required to configure Geneve

Re: [PATCH bpf-net 00/14] bpf: cgroup local storage

2018-06-28 Thread Roman Gushchin
On Thu, Jun 28, 2018 at 09:34:44AM -0700, Roman Gushchin wrote: > This patchset implements cgroup local storage for bpf programs. > The main idea is to provide a fast accessible memory for storing > various per-cgroup data, e.g. number of transmitted packets. Just noticed a typo in the subject:

Re: [PATCH net-next v2 3/4] net: check tunnel option type in tunnel flags

2018-06-28 Thread Jakub Kicinski
On Thu, 28 Jun 2018 09:42:06 +0200, Jiri Benc wrote: > On Wed, 27 Jun 2018 11:49:49 +0200, Daniel Borkmann wrote: > > Looks good to me, and yes in BPF case a mask like TUNNEL_OPTIONS_PRESENT is > > right approach since this is opaque info and solely defined by the BPF prog > > that is using the

[PATCH net-next 05/10] net/smc: add pnetid support for SMC-D and ISM

2018-06-28 Thread Ursula Braun
From: Hans Wippel SMC-D relies on PNETIDs to find usable SMC-D/ISM devices for a SMC connection. This patch adds SMC-D/ISM support to the current PNETID implementation. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Suggested-by: Thomas Richter --- include/net/smc.h | 1 +

[PATCH net-next 04/10] net/smc: add base infrastructure for SMC-D and ISM

2018-06-28 Thread Ursula Braun
From: Hans Wippel SMC supports two variants: SMC-R and SMC-D. For data transport, SMC-R uses RDMA devices, SMC-D uses so-called Internal Shared Memory (ISM) devices. An ISM device only allows shared memory communication between SMC instances on the same machine. For example, this allows virtual

[PATCH net-next 03/10] net/smc: optimize consumer cursor updates

2018-06-28 Thread Ursula Braun
From: Ursula Braun The SMC protocol requires to send a separate consumer cursor update, if it cannot be piggybacked to updates of the producer cursor. Currently the decision to send a separate consumer cursor update just considers the amount of data already received by the socket program. It

[PATCH net-next 06/10] net/smc: add SMC-D support in CLC messages

2018-06-28 Thread Ursula Braun
From: Hans Wippel There are two types of SMC: SMC-R and SMC-D. These types are signaled within the CLC messages during the CLC handshake. This patch adds support for and checks of the SMC type. Also, SMC-R and SMC-D need to exchange different information during the CLC handshake. So, this patch

Re: [PATCH bpf 1/4] xsk: fix potential lost completion message in SKB path

2018-06-28 Thread Song Liu
On Wed, Jun 27, 2018 at 7:02 AM, Magnus Karlsson wrote: > The code in xskq_produce_addr erroneously checked if there > was up to LAZY_UPDATE_THRESHOLD amount of space in the completion > queue. It only needs to check if there is one slot left in the > queue. This bug could under some

Re: [PATCH v1 net-next 13/14] net/sched: Enforce usage of CLOCK_TAI for sch_etf

2018-06-28 Thread Jesus Sanchez-Palencia
On 06/28/2018 07:26 AM, Willem de Bruijn wrote: > On Wed, Jun 27, 2018 at 8:45 PM Jesus Sanchez-Palencia > wrote: >> >> The qdisc and the SO_TXTIME ABIs allow for a clockid to be configured, >> but it's been decided that usage of CLOCK_TAI should be enforced until >> we decide to allow for

Re: [PATCH v1 net-next 12/14] igb: Only call skb_tx_timestamp after descriptors are ready

2018-06-28 Thread Jesus Sanchez-Palencia
On 06/27/2018 04:56 PM, Eric Dumazet wrote: > > > On 06/27/2018 02:59 PM, Jesus Sanchez-Palencia wrote: >> Currently, skb_tx_timestamp() is being called before the DMA >> descriptors are prepared in igb_xmit_frame_ring(), which happens >> during either the igb_tso() or igb_tx_csum() calls. >>

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 05:50:08PM CEST, dsah...@gmail.com wrote: >On 6/28/18 9:37 AM, Jiri Pirko wrote: > > Why this restriction? It's a template, so why can't it be removed > regardless of whether there are filters? That means you could start to insert filters that does not

[PATCH bpf-net 09/14] bpf: sync bpf.h to tools/

2018-06-28 Thread Roman Gushchin
Sync cgroup storage related changes: 1) new BPF_MAP_TYPE_CGROUP_STORAGE map type 2) struct bpf_cgroup_sotrage_key definition 3) get_local_storage() helper Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h |

[PATCH bpf-net 04/14] bpf: allocate cgroup storage entries on attaching bpf programs

2018-06-28 Thread Roman Gushchin
If a bpf program is using cgroup local storage, allocate a bpf_cgroup_storage structure automatically on attaching the program to a cgroup and save the pointer into the corresponding bpf_prog_list entry. Analogically, release the cgroup local storage on detaching of the bpf program.

[PATCH bpf-net 10/14] bpftool: add support for CGROUP_STORAGE maps

2018-06-28 Thread Roman Gushchin
Add BPF_MAP_TYPE_CGROUP_STORAGE maps to the list of maps types which bpftool recognizes. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jakub Kicinski Acked-by: Martin KaFai Lau --- tools/bpf/bpftool/map.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH bpf-net 14/14] samples/bpf: extend test_cgrp2_attach2 test to use cgroup storage

2018-06-28 Thread Roman Gushchin
The test_cgrp2_attach test covers bpf cgroup attachment code well, so let's re-use it for testing allocation/releasing of cgroup storage. The extension is pretty straightforward: the bpf program will use the cgroup storage to save the number of transmitted bytes. Expected output: $

[PATCH bpf-net 13/14] selftests/bpf: add a cgroup storage test

2018-06-28 Thread Roman Gushchin
Implement a test to cover the cgroup storage functionality. The test implements a bpf program which drops every second packet by using the cgroup storage as a persistent storage. The test also use the userspace API to check the data in the cgroup storage, alter it, and check that the loaded and

[PATCH bpf-net 08/14] bpf: introduce the bpf_get_local_storage() helper function

2018-06-28 Thread Roman Gushchin
The bpf_get_local_storage() helper function is used to get a pointer to the bpf local storage from a bpf program. It takes a pointer to a storage map and flags as arguments. Right now it accepts only cgroup storage maps, and flags argument has to be 0. Further it can be extended to support other

[PATCH bpf-net 07/14] bpf: don't allow create maps of cgroup local storages

2018-06-28 Thread Roman Gushchin
As there is one-to-one relation between a bpf program and cgroup local storage map, there is no sense in creating a map of cgroup local storage maps. Forbid it explicitly to avoid possible side effects. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin

[PATCH bpf-net 11/14] bpf/test_run: support cgroup local storage

2018-06-28 Thread Roman Gushchin
Allocate a temporary cgroup storage to use for bpf program test runs. Because the test program is not actually attached to a cgroup, the storage is allocated manually just for the execution of the bpf program. If the program is executed multiple times, the storage is not zeroed on each run,

[PATCH bpf-net 03/14] bpf: pass a pointer to a cgroup storage using pcpu variable

2018-06-28 Thread Roman Gushchin
This commit introduces the bpf_cgroup_storage_set() helper, which will be used to pass a pointer to a cgroup storage to the bpf helper. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau --- include/linux/bpf-cgroup.h | 14 ++

[PATCH net-next 00/10] pnetid and SMC-D support

2018-06-28 Thread Ursula Braun
Dave, SMC requires a configured pnet table to map Ethernet interfaces to RoCE adapter ports. For s390 there exists hardware support to group such devices. The first three patches cover the s390 pnetid support, enabling SMC-R usage on s390 without configuring an extra pnet table. SMC currently

[PATCH net-next 10/10] s390/ism: add device driver for internal shared memory

2018-06-28 Thread Ursula Braun
From: Sebastian Ott Add support for the Internal Shared Memory vPCI Adapter. This driver implements the interfaces of the SMC-D protocol. Signed-off-by: Sebastian Ott Signed-off-by: Ursula Braun --- drivers/s390/net/Kconfig | 10 + drivers/s390/net/Makefile | 3 +

[PATCH net-next 07/10] net/smc: add SMC-D support in data transfer

2018-06-28 Thread Ursula Braun
From: Hans Wippel The data transfer and CDC message headers differ in SMC-R and SMC-D. This patch adds support for the SMC-D data transfer to the existing SMC code. It consists of the following: * SMC-D CDC support * SMC-D tx support * SMC-D rx support The CDC header is stored at the beginning

[PATCH net-next 08/10] net/smc: add SMC-D support in af_smc

2018-06-28 Thread Ursula Braun
From: Hans Wippel This patch ties together the previous SMC-D patches. It adds support for SMC-D to the listen and connect functions and, thus, enables SMC-D support in the SMC code. If a connection supports both SMC-R and SMC-D, SMC-D is preferred. Signed-off-by: Hans Wippel Signed-off-by:

Re: [PATCH net-next v2 3/4] net: check tunnel option type in tunnel flags

2018-06-28 Thread Jakub Kicinski
On Thu, 28 Jun 2018 19:01:52 +0200, Jiri Benc wrote: > On Thu, 28 Jun 2018 09:54:52 -0700, Jakub Kicinski wrote: > > Hmm... in practice we could steal top bits of the size parameter for > > some flags, since it seems to be limited to values < 256 today? Is it > > worth it? > > > > It would look

[PATCH net-next 01/10] net/smc: determine port attributes independent from pnet table

2018-06-28 Thread Ursula Braun
For SMC it is important to know the current port state of RoCE devices. Monitoring port states has been triggered, when a RoCE device was added to the pnet table. To support future alternatives to the pnet table the monitoring of ports is made independent of the existence of a pnet table. It

[PATCH net-next 02/10] net/smc: add pnetid support

2018-06-28 Thread Ursula Braun
s390 hardware supports the definition of a so-call Physical NETwork IDentifier (short PNETID) per network device port. These PNETIDS can be used to identify network devices that are attached to the same physical network (broadcast domain). On s390 try to use the PNETID of the ethernet device port

[PATCH net-next 09/10] net/smc: add SMC-D diag support

2018-06-28 Thread Ursula Braun
From: Hans Wippel This patch adds diag support for SMC-D. Signed-off-by: Hans Wippel Signed-off-by: Ursula Braun Suggested-by: Thomas Richter --- include/uapi/linux/smc_diag.h | 10 ++ net/smc/smc_diag.c| 15 +++ 2 files changed, 25 insertions(+) diff --git

Re: [PATCH] test_bpf: flag tests that cannot be jited on s390

2018-06-28 Thread Song Liu
On Wed, Jun 27, 2018 at 8:19 AM, Kleber Sacilotto de Souza wrote: > Flag with FLAG_EXPECTED_FAIL the BPF_MAXINSNS tests that cannot be jited > on s390 because they exceed BPF_SIZE_MAX and fail when > CONFIG_BPF_JIT_ALWAYS_ON is set. Also set .expected_errcode to -ENOTSUPP > so the tests pass in

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Linus Torvalds
On Thu, Jun 28, 2018 at 4:37 PM Al Viro wrote: > > You underestimate the nastiness of that thing (and for the record, I'm > a lot *less* fond of AIO than you are, what with having had to read that > nest of horrors lately). It does not "copy the data to userland"; what it > does instead is

Re: [PATCH net-next v2] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-28 Thread Lawrence Brakmo
On 6/28/18, 1:48 PM, "netdev-ow...@vger.kernel.org on behalf of Neal Cardwell" wrote: On Thu, Jun 28, 2018 at 4:20 PM Lawrence Brakmo wrote: > > I just looked at 4.18 traces and the behavior is as follows: > >Host A sends the last packets of the request > >

Re: [PATCH bpf-net 08/14] bpf: introduce the bpf_get_local_storage() helper function

2018-06-28 Thread kbuild test robot
Hi Roman, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] [also build test ERROR on v4.18-rc2] [cannot apply to next-20180628] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Al Viro
On Thu, Jun 28, 2018 at 03:55:35PM -0700, Linus Torvalds wrote: > > You are misreading that mess. What he's trying to do (other than surviving > > the awful clusterfuck around cancels) is to handle the decision what to > > report to userland right in the wakeup callback. *That* is what really >

Re: [PATCH v2 net-next 0/6] net sched actions: code style cleanup and fixes

2018-06-28 Thread David Miller
From: Roman Mashak Date: Wed, 27 Jun 2018 13:33:29 -0400 > The patchset fixes a few code stylistic issues and typos, as well as one > detected by sparse semantic checker tool. > > No functional changes introduced. > > Patch 1 & 2 fix coding style bits caught by the checkpatch.pl script > Patch

[patch iproute2/net-next v2] tc: introduce support for chain templates

2018-06-28 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- v1->v2: - moved the template handling from "tc filter template" to "tc chaintemplate" --- include/uapi/linux/rtnetlink.h | 7 +++ man/man8/tc.8 | 26 ++ tc/tc.c| 5 +- tc/tc_common.h

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jamal Hadi Salim
On 26/06/18 03:59 AM, Jiri Pirko wrote: From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule inside HW they need to guess what fields will be used for the matching. If later on this guess proves to be

[PATCH v3 net-next 0/5] Fixes coding style in xilinx_emaclite.c

2018-06-28 Thread Radhey Shyam Pandey
This patchset fixes checkpatch and kernel-doc warnings in xilinx emaclite driver. No functional change. Changes from v2: -In 2/5 patch refactor if-else to make failure path return early. -In 2/5 patch coalesce the format onto a single line and add the missing space after the comma. Radhey Shyam

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jamal Hadi Salim
On 28/06/18 09:22 AM, Jiri Pirko wrote: Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote: On 26/06/18 03:59 AM, Jiri Pirko wrote: From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 7:08 AM, Jiri Pirko wrote: > Create dummy device with clsact first: > # ip link add type dummy > # tc qdisc add dev dummy0 clsact > > There is no template assigned by default: > # tc chaintemplate show dev dummy0 ingress > > Add a template of type flower allowing to insert rules

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jiri Pirko
Thu, Jun 28, 2018 at 03:54:17PM CEST, j...@mojatatu.com wrote: >On 28/06/18 09:22 AM, Jiri Pirko wrote: >> Thu, Jun 28, 2018 at 03:13:30PM CEST, j...@mojatatu.com wrote: >> > >> > On 26/06/18 03:59 AM, Jiri Pirko wrote: >> > > From: Jiri Pirko >> > > >> > > For the TC clsact offload these days,

Re: [PATCH v1 net-next 13/14] net/sched: Enforce usage of CLOCK_TAI for sch_etf

2018-06-28 Thread Willem de Bruijn
On Wed, Jun 27, 2018 at 8:45 PM Jesus Sanchez-Palencia wrote: > > The qdisc and the SO_TXTIME ABIs allow for a clockid to be configured, > but it's been decided that usage of CLOCK_TAI should be enforced until > we decide to allow for other clockids to be used. The rationale here is > that PTP

Re: [PATCH v1 net-next 14/14] net/sched: Make etf report drops on error_queue

2018-06-28 Thread Willem de Bruijn
On Wed, Jun 27, 2018 at 6:07 PM Jesus Sanchez-Palencia wrote: > > Use the socket error queue for reporting dropped packets if the > socket has enabled that feature through the SO_TXTIME API. > > Packets are dropped either on enqueue() if they aren't accepted by the > qdisc or on dequeue() if the

Re: [PATCH v1 net-next 02/14] net: Add a new socket option for a future transmit time.

2018-06-28 Thread Willem de Bruijn
On Thu, Jun 28, 2018 at 10:26 AM Willem de Bruijn wrote: > > On Wed, Jun 27, 2018 at 6:08 PM Jesus Sanchez-Palencia > wrote: > > > > 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

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Linus Torvalds
On Thu, Jun 28, 2018 at 11:17 AM Al Viro wrote: > > As for what can be salvaged out of the whole mess, > * probably the most serious lesson is that INDIRECT CALLS ARE > COSTLY NOW and shouldn't be used lightly. Note that this has always been true, it's just _way_ more obvious now.

Re: [PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-28 Thread Keara Leibovitz
>> Until I'm able to submit everything, I'd be OK with having Keara add >> the non-zero exit codes to the teardown on her tests. In the meantime >> we'll get the README updated and config file added as well. >> >> How does this sound? > > it sounds good to me, but at this point we can also leave

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Jiri Pirko
Oh, this is v3 already. The changelog should be: --- v2->v3: - patch 5: - rebase on top of the reoffload pathset - patch 6: - rebase on top of the reoffload pathset - patch 9: - adjust to the userspace cmdline changes v1->v2: - patch 6: - remove leftover extack arg in fl_hw_create_tmplt()

Re: [PATCH v1 net-next 02/14] net: Add a new socket option for a future transmit time.

2018-06-28 Thread Willem de Bruijn
On Wed, Jun 27, 2018 at 6:08 PM Jesus Sanchez-Palencia wrote: > > 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). The argument to this socket option is a 6-bytes long

Re: [PATCH v1 net-next 03/14] net: ipv4: Hook into time based transmission

2018-06-28 Thread Willem de Bruijn
On Wed, Jun 27, 2018 at 6:07 PM Jesus Sanchez-Palencia wrote: > > Add a transmit_time field to struct inet_cork, then copy the > timestamp from the CMSG cookie at ip_setup_cork() so we can > safely copy it into the skb later during __ip_make_skb(). > > For the raw fast path, just perform the copy

Re: [PATCH] bpfilter: fix user mode helper cross compilation

2018-06-28 Thread Alexei Starovoitov
On Wed, Jun 27, 2018 at 11:17:09PM -0700, Andrew Morton wrote: > On Wed, 20 Jun 2018 16:04:34 +0200 Matteo Croce wrote: > > > Use $(OBJDUMP) instead of literal 'objdump' to avoid > > using host toolchain when cross compiling. > > > > I'm still having issues here, with ld. > > x86_64 machine,

Re: [PATCH net] net: fib_rules: add protocol check in rule_find

2018-06-28 Thread David Ahern
On 6/27/18 7:27 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > After commit f9d4b0c1e969 ("fib_rules: move common handling of newrule > delrule msgs into fib_nl2rule"), rule_find is strict about checking > for an existing rule. rule_find must check against all > user given attributes, else it

[PATCH net-next] net: phy: realtek: add support for RTL8211

2018-06-28 Thread Heiner Kallweit
In preparation of adding phylib support to the r8169 driver we need PHY drivers for all chip-internal PHY types. Fortunately almost all of them are either supported by the Realtek PHY driver already or work with the genphy driver. Still missing is support for the PHY of RTL8169s, it requires a

[PATCH net-next] r8169: use standard debug output functions

2018-06-28 Thread Heiner Kallweit
I see no need to define a private debug output symbol, let's use the standard debug output functions instead. In this context also remove the deprecated PFX define. The one assertion is wrong IMO anyway, this code path is used also by chip version 01. Signed-off-by: Heiner Kallweit ---

Re: [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned

2018-06-28 Thread Jiong Wang
On Tue, Jun 26, 2018 at 7:21 AM, Song Liu wrote: > On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski > wrote: >> From: Jiong Wang >> + >> +struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec) >> +{ >> + struct reciprocal_value_adv R; >> + u32 l, post_shift; >> +

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Cong Wang
On Wed, Jun 27, 2018 at 9:48 PM David Miller wrote: > > This series doesn't apply cleanly to net-next, and also there seems to still > be some discussion about how the iproute2 command line should look. > I am sure you know this, so just to be clear: A redesign of "how iproute2 command line

Re: [PATCH v1 net-next 02/14] net: Add a new socket option for a future transmit time.

2018-06-28 Thread Jesus Sanchez-Palencia
Hi Willem, On 06/28/2018 07:40 AM, Willem de Bruijn wrote: > On Thu, Jun 28, 2018 at 10:26 AM Willem de Bruijn > wrote: >> >> On Wed, Jun 27, 2018 at 6:08 PM Jesus Sanchez-Palencia >> wrote: >>> >>> From: Richard Cochran >>> >>> This patch introduces SO_TXTIME. User space enables this option

Re: [patch net-next 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Cong Wang
On Wed, Jun 27, 2018 at 11:19 PM Jiri Pirko wrote: > > Wed, Jun 27, 2018 at 07:04:32PM CEST, xiyou.wangc...@gmail.com wrote: > >On Wed, Jun 27, 2018 at 9:46 AM Samudrala, Sridhar > > wrote: > >> > >> On 6/27/2018 12:50 AM, Jiri Pirko wrote: > >> > if you don't like "tc filter template add dev

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Al Viro
On Thu, Jun 28, 2018 at 09:40:21AM -0700, Linus Torvalds wrote: > On Thu, Jun 28, 2018 at 7:21 AM Christoph Hellwig wrote: > > > > Note that for this removes the possibility of actually returning an > > error before waiting in poll. We could still do this with an ERR_PTR > > in f_poll_head with

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Al Viro
On Thu, Jun 28, 2018 at 02:11:17PM -0700, Linus Torvalds wrote: > On Thu, Jun 28, 2018 at 1:28 PM Al Viro wrote: > > > > > > Sure, but... > > > > static __poll_t binder_poll(struct file *filp, > > struct poll_table_struct *wait) > > { > > struct binder_proc

[PATCH bpf-next 3/8] tools: libbpf: allow setting ifindex for programs and maps

2018-06-28 Thread Jakub Kicinski
Users of bpf_object__open()/bpf_object__load() APIs may want to load the programs and maps onto a device for offload. Allow setting ifindex on those sub-objects. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/libbpf.c | 10 ++ tools/lib/bpf/libbpf.h | 2

[PATCH bpf-next 8/8] tools: bpftool: deal with options upfront

2018-06-28 Thread Jakub Kicinski
Remove options (in getopt() sense, i.e. starting with a dash like -n or --NAME) while parsing arguments for bash completions. This allows us to refer to position-dependent parameters better, and complete options at any point. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

[PATCH bpf-next 6/8] tools: bpftool: drop unnecessary Author comments

2018-06-28 Thread Jakub Kicinski
Drop my author comments, those are from the early days of bpftool and make little sense in tree, where we have quite a few people contributing and git to attribute the work. While at it bump some copyrights. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

[PATCH bpf-next 7/8] tools: bpftool: add missing --bpffs to completions

2018-06-28 Thread Jakub Kicinski
--bpffs is not suggested by bash completions. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/bash-completion/bpftool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/bash-completion/bpftool

[net-next 01/12] net/mlx5e: Add UDP GSO support

2018-06-28 Thread Saeed Mahameed
From: Boris Pismenny This patch enables UDP GSO support. We enable this by using two WQEs the first is a UDP LSO WQE for all segments with equal length, and the second is for the last segment in case it has different length. Due to HW limitation, before sending, we must adjust the packet length

[net-next 05/12] net/mlx5e: Add TX completions statistics

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Add per-ring and global ethtool counters for TX completions. This helps us monitor and analyze TX flow performance. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++

[net-next 03/12] net/mlx5e: Convert large order kzalloc allocations to kvzalloc

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Replace calls to kzalloc_node with kvzalloc_node, as it fallsback to lower-order pages if the higher-order trials fail. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 44 +-- 1 file changed, 22

Re: [bpf-next PATCH 0/2] xdp/bpf: extend XDP samples/bpf xdp_rxq_info

2018-06-28 Thread Daniel Borkmann
On 06/25/2018 04:27 PM, Jesper Dangaard Brouer wrote: > While writing an article about XDP, the samples/bpf xdp_rxq_info > program were extended to cover some more use-cases. Applied to bpf-next, thanks guys!

Re: [PATCH] test_bpf: flag tests that cannot be jited on s390

2018-06-28 Thread Daniel Borkmann
On 06/27/2018 05:19 PM, Kleber Sacilotto de Souza wrote: > Flag with FLAG_EXPECTED_FAIL the BPF_MAXINSNS tests that cannot be jited > on s390 because they exceed BPF_SIZE_MAX and fail when > CONFIG_BPF_JIT_ALWAYS_ON is set. Also set .expected_errcode to -ENOTSUPP > so the tests pass in that case.

Re: [PATCH v3 bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-28 Thread Daniel Borkmann
On 06/27/2018 01:21 AM, dsah...@kernel.org wrote: > From: David Ahern > > For ACLs implemented using either FIB rules or FIB entries, the BPF > program needs the FIB lookup status to be able to drop the packet. > Since the bpf_fib_lookup API has not reached a released kernel yet, > change the

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread Cong Wang
On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: > Add a template of type flower allowing to insert rules matching on last > 2 bytes of destination mac address: > # tc chaintemplate add dev dummy0 ingress proto ip flower dst_mac > 00:00:00:00:00:00/00:00:00:00:FF:FF > > The template is now

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Linus Torvalds
On Thu, Jun 28, 2018 at 3:20 PM Al Viro wrote: > > The rules for drivers change only in one respect - if your ->poll() is going > to > need to block, check poll_requested_events(pt) & EPOLL_ATOMIC and return > EPOLLNVAL > in such case. OI still don't even understand why you care. Yes, the AIO

Re: [PATCH v12 03/10] netdev: cavium: octeon: Add Octeon III BGX Ethernet Nexus

2018-06-28 Thread Carlos Munoz
On 06/28/2018 01:41 AM, Andrew Lunn wrote: > External Email > >> +static char *mix_port; >> +module_param(mix_port, charp, 0444); >> +MODULE_PARM_DESC(mix_port, "Specifies which ports connect to MIX >> interfaces."); >> + >> +static char *pki_port; >> +module_param(pki_port, charp, 0444); >>

[PATCH bpf 3/3] bpf: undo prog rejection on read-only lock failure

2018-06-28 Thread Daniel Borkmann
Partially undo commit 9facc336876f ("bpf: reject any prog that failed read-only lock") since it caused a regression, that is, syzkaller was able to manage to cause a panic via fault injection deep in set_memory_ro() path by letting an allocation fail: In x86's __change_page_attr_set_clr() it was

[PATCH bpf 1/3] bpf, arm32: fix to use bpf_jit_binary_lock_ro api

2018-06-28 Thread Daniel Borkmann
Any eBPF JIT that where its underlying arch supports ARCH_HAS_SET_MEMORY would need to use bpf_jit_binary_{un,}lock_ro() pair instead of the set_memory_{ro,rw}() pair directly as otherwise changes to the former might break. arm32's eBPF conversion missed to change it, so fix this up here. Fixes:

[PATCH bpf 0/3] Three BPF fixes

2018-06-28 Thread Daniel Borkmann
This set contains three fixes that are mostly JIT and set_memory_*() related. The third in the series in particular fixes the syzkaller bugs that were still pending; aside from local reproduction & testing, also 'syz test' wasn't able to trigger them anymore. I've tested this series on x86_64,

[PATCH bpf 2/3] bpf, s390: fix potential memleak when later bpf_jit_prog fails

2018-06-28 Thread Daniel Borkmann
If we would ever fail in the bpf_jit_prog() pass that writes the actual insns to the image after we got header via bpf_jit_binary_alloc() then we also need to make sure to free it through bpf_jit_binary_free() again when bailing out. Given we had prior bpf_jit_prog() passes to initially probe for

Re: [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer

2018-06-28 Thread Linus Torvalds
On Thu, Jun 28, 2018 at 2:30 PM Al Viro wrote: > > > Again, locking is permitted. It's not great, but it's not against the rules. > > Me: a *LOT* of ->poll() instances only block in __pollwait() called > (indirectly) > on the first pass. > > You: They are *all* supposed to do it. > > Me: Oh, I

[PATCH bpf-next 1/8] tools: bpftool: use correct make variable type to improve compilation time

2018-06-28 Thread Jakub Kicinski
Commit 4bfe3bd3cc35 ("tools/bpftool: use version from the kernel source tree") added version to bpftool. The version used is equal to the kernel version and obtained by running make kernelversion against kernel source tree. Version is then communicated to the sources with a command line define

[PATCH bpf-next 2/8] tools: libbpf: add section names for missing program types

2018-06-28 Thread Jakub Kicinski
Specify default section names for BPF_PROG_TYPE_LIRC_MODE2 and BPF_PROG_TYPE_LWT_SEG6LOCAL, these are the only two missing right now. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH bpf-next 0/8] tools: bpf: updates to bpftool and libbpf

2018-06-28 Thread Jakub Kicinski
Hi! Set of random updates to bpftool and libbpf. I'm preparing for extending bpftool prog load, but there is a good number of improvements that can be made before bpf -> bpf-next merge helping to keep the later patch set to a manageable size as well. First patch is a bpftool build speed

[PATCH bpf-next 4/8] tools: libbpf: restore the ability to load programs from .text section

2018-06-28 Thread Jakub Kicinski
libbpf used to be able to load programs from the default section called '.text'. It's not very common to leave sections unnamed, but if it happens libbpf will fail to load the programs reporting -EINVAL from the kernel. The -EINVAL comes from bpf_obj_name_cpy() because since 48cca7e44f9f

[PATCH bpf-next 5/8] tools: libbpf: don't return '.text' as a program for multi-function programs

2018-06-28 Thread Jakub Kicinski
Make bpf_program__next() skip over '.text' section if object file has pseudo calls. The '.text' section is hardly a program in that case, it's more of a storage for code of functions other than main. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/libbpf.c | 16

[net-next 02/12] net/mlx5e: Add UDP GSO remaining counter

2018-06-28 Thread Saeed Mahameed
From: Boris Pismenny This patch adds a counter for tx UDP GSO packets that contain a segment that is not aligned to MSS - remaining segment. Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/rxtx.c | 1 +

  1   2   >