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 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 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 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 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 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 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 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 >

Diagnosing network module for missing link establishment (cxgb3, Chelsio T320)

2018-06-28 Thread U.Mutlu
Hi, I've got a pair of used old dual port 10GbE NICs (Chelsio T320 10GBASE-R RNIC (rev 3) PCI Express x4 MSI-X) with 2 modular transceivers on board the 2 NICs (ie. these can be taken off of the card for replacement etc.). The problem is that the cards don't establish a link; the green LEDs go

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:49 PM Al Viro wrote: > > aio_poll() is not a problem. It's wakeup callback that is one. No, it's not a problem either. The only thing the wakup callback wants to do is to remove the wait queue entry. And *that* doesn't need to sleep, and it has absolutely nothing to

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:35:03PM -0700, Linus Torvalds wrote: > Yes, the AIO poll implementation did it under the spinlock. > > But there's no good *reason* for that. The "aio_poll()" function > itself is called in perfectly fine blocking context. aio_poll() is not a problem. It's wakeup

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 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 bpf-net 05/14] bpf: extend bpf_prog_array to store pointers to the cgroup storage

2018-06-28 Thread kbuild test robot
Hi Roman, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] [also build test WARNING 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 10:30:27PM +0100, Al Viro wrote: > I'm not saying that blocking on other things is a bug; some of such *are* > bogus, > but a lot aren't really broken. What I said is that in a lot of cases we > really > have hard "no blocking other than in callback" (and on subsequent

Re: [PATCH 0/6] offload Linux LAG devices to the TC datapath

2018-06-28 Thread Or Gerlitz
On Thu, Jun 28, 2018 at 7:02 AM, Jakub Kicinski wrote: [...] > } else if (netif_is_lag_master(out_dev) && >priv->flower_ext_feats & NFP_FL_FEATS_LAG) { > int gid; > > output->flags = cpu_to_be16(tmp_flags); > gid =

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] 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: [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!

[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

[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 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 +

[net-next 08/12] net/mlx5e: Add a counter for congested UMRs

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Add per-ring and global ethtool counters for congested UMR requests. These events indicate congestion in UMR handlers in HW. Such event is concluded when there's an outstanding UMR post, yet the SW consumed at least two additional MPWQEs in the meanwhile. Signed-off-by:

[net-next 06/12] net/mlx5e: Add XDP_TX completions statistics

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

[net-next 10/12] net/mlx5e: Add counter for MPWQE filler strides

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Add ethtool counter to indicate the number of strides consumed by filler CQEs. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c| 5 - drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 9 ++---

[net-next 12/12] net/mlx5e: Update NIC HW stats on demand only

2018-06-28 Thread Saeed Mahameed
Disable periodic stats update background thread and update stats in background on demand when ndo_get_stats is called. Having a background thread running in the driver all the time is bad for power consumption and normally a user space daemon will query the stats once every specific interval, so

[net-next 07/12] net/mlx5e: Add NAPI statistics

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Add per-channel and global ethtool counters for NAPI. This helps us monitor and analyze performance in general. - ch[i]_poll: the number of times the channel's NAPI poll was invoked. - ch[i]_arm: the number of times the channel's NAPI poll completed and armed the

[net-next 04/12] net/mlx5e: RX, Use existing WQ local variable

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Local variable 'wq' already points to >wq, use it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[net-next 11/12] net/mlx5e: Add counter for total num of NOP operations

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan A per-ring counter for NOP operations already exists. Here I add a counter that sums them up. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 1 +

[net-next 09/12] net/mlx5e: Add channel events counter

2018-06-28 Thread Saeed Mahameed
From: Tariq Toukan Add per-channel and global ethtool counters for channel events. Each event indicates an interrupt on one of the channel's completion queues. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++

[pull request][net-next 00/12] Mellanox, mlx5e updates 2018-06-28

2018-06-28 Thread Saeed Mahameed
Hi Dave, The following pull request includes updates for mlx5e netdevice driver. For more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit 7861552cedd81a164c0d5d1c89fe2cb45a3ed41b: netlink:

[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 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 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

[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

[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

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 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 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

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); >>

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 1:37 PM Al Viro wrote: > > > Speaking of obvious bogosities (a lot more so than a blocking allocation > several calls down into helper): > > static __poll_t ca8210_test_int_poll( > struct file *filp, > struct poll_table_struct *ptable > ) Ok, that's just

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 1:28 PM Al Viro wrote: > > > Sure, but... > > static __poll_t binder_poll(struct file *filp, > struct poll_table_struct *wait) > { > struct binder_proc *proc = filp->private_data; > struct binder_thread *thread = NULL; >

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

2018-06-28 Thread Jakub Kicinski
On Thu, 28 Jun 2018 20:02:43 +0100, Jiong Wang wrote: > > If that's the case, we should at least add a WARNING on the slow path. > > OK, I will add a pr_warn inside "reciprocal_value_adv" when l == 32 is > triggered. WARN() seems useful, given seeing l == 32 means the code calling this

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 net-next v2] tcp: force cwnd at least 2 in tcp_cwnd_reduction

2018-06-28 Thread Neal Cardwell
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 > >Host B receives them, and the last packet is marked with congestion (CE) > >Host B sends ACKs for packets not

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:28:37PM +0100, Al Viro wrote: > Sure. Unfortunately, adding yourself to the poll table is not the only > way to block. And a plenty of instances in e.g. drivers/media (where > the bulk of ->poll() instances lives) are very free with grabbing mutexes > as they go.

[PATCH net] net/ipv6: Fix updates to prefix route

2018-06-28 Thread dsahern
From: David Ahern Sowmini reported that a recent commit broke prefix routes for linklocal addresses. The newly added modify_prefix_route is attempting to add a new prefix route when the ifp priority does not match the route metric however the check needs to account for the default priority. In

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 12:31:14PM -0700, Linus Torvalds wrote: > > * a *LOT* of ->poll() instances only block in __pollwait() > > called (indirectly) on the first pass. > > They are *all* supposed to do it. Sure, but... static __poll_t binder_poll(struct file *filp,

[PATCH net-next] openvswitch: kernel datapath clone action

2018-06-28 Thread Yifeng Sun
Add 'clone' action to kernel datapath by using existing functions. When actions within clone don't modify the current flow, the flow key is not cloned before executing clone actions. This is a follow up patch for this incomplete work: https://patchwork.ozlabs.org/patch/722096/ Signed-off-by:

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 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 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; >> +

[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 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 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 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 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] 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 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 > >

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 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 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

[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

[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

[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

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

[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 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 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 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

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 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

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

[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 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 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 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 ++

  1   2   >