Re: [PATCH 1/2] Convert target drivers to use sbitmap

2018-05-15 Thread Felipe Balbi
Hi, Matthew Wilcox writes: > From: Matthew Wilcox > > The sbitmap and the percpu_ida perform essentially the same task, > allocating tags for commands. Since the sbitmap is more used than > the percpu_ida, convert the percpu_ida users to the

Re: [RFC v3 4/5] virtio_ring: add event idx support in packed ring

2018-05-15 Thread Tiwei Bie
On Wed, May 16, 2018 at 01:01:04PM +0800, Jason Wang wrote: > On 2018年04月25日 13:15, Tiwei Bie wrote: [...] > > @@ -1143,10 +1160,17 @@ static unsigned > > virtqueue_enable_cb_prepare_packed(struct virtqueue *_vq) > > /* We optimistically turn back on interrupts, then check if there was > >

Re: [PATCH bpf-next 7/7] tools/bpftool: add perf subcommand

2018-05-15 Thread Yonghong Song
On 5/15/18 9:41 PM, Jakub Kicinski wrote: On Tue, 15 May 2018 16:45:21 -0700, Yonghong Song wrote: The new command "bpftool perf [show]" will traverse all processes under /proc, and if any fd is associated with a perf event, it will print out related perf event information. Below is an

Re: [RFC v3 4/5] virtio_ring: add event idx support in packed ring

2018-05-15 Thread Jason Wang
On 2018年04月25日 13:15, Tiwei Bie wrote: This commit introduces the event idx support in packed ring. This feature is temporarily disabled, because the implementation in this patch may not work as expected, and some further discussions on the implementation are needed, e.g. do we have to check

Re: [PATCH bpf-next 7/7] tools/bpftool: add perf subcommand

2018-05-15 Thread Jakub Kicinski
On Tue, 15 May 2018 16:45:21 -0700, Yonghong Song wrote: > The new command "bpftool perf [show]" will traverse > all processes under /proc, and if any fd is associated > with a perf event, it will print out related perf event > information. > > Below is an example to show the results using bcc

[PATCH net-next v3 0/3] fib rule selftest

2018-05-15 Thread Roopa Prabhu
From: Roopa Prabhu This series adds a new test to test fib rules. ip route get is used to test fib rule matches. This series also extends ip route get to match on sport and dport to test recent support of sport and dport fib rule match. v2 - address ido's commemt to

[PATCH net-next v3 1/3] ipv4: support sport, dport and ip_proto in RTM_GETROUTE

2018-05-15 Thread Roopa Prabhu
From: Roopa Prabhu This is a followup to fib rules sport, dport and ipproto match support. Only supports tcp, udp and icmp for ipproto. Used by fib rule self tests. Before this patch getroute used same skb to pass through the route lookup and for the netlink getroute

[PATCH net-next v3 2/3] ipv6: support sport, dport and ip_proto in RTM_GETROUTE

2018-05-15 Thread Roopa Prabhu
From: Roopa Prabhu This is a followup to fib6 rules sport, dport and ipproto match support. Only supports tcp, udp and icmp for ipproto. Used by fib rule self tests. Signed-off-by: Roopa Prabhu --- net/ipv6/route.c | 17 +

[PATCH net-next v3 3/3] selftests: net: initial fib rule tests

2018-05-15 Thread Roopa Prabhu
From: Roopa Prabhu This adds a first set of tests for fib rule match/action for ipv4 and ipv6. Initial tests only cover action lookup table. can be extended to cover other actions in the future. Uses ip route get to validate the rule lookup. Signed-off-by: Roopa

xdp and fragments with virtio

2018-05-15 Thread David Ahern
Hi Jason: I am trying to test MTU changes to the BPF fib_lookup helper and seeing something odd. Hoping you can help. I have a VM with multiple virtio based NICs and tap backends. I install the xdp program on eth1 and eth2 to do forwarding. In the host I send a large packet to eth1: $ ping -s

[PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-05-15 Thread David Wu
Add constants and callback functions for the dwmac on px30 soc. The base structure is the same, but registers and the bits in them moved slightly, and add the clk_mac_speed for the select of mac speed. Signed-off-by: David Wu ---

RE: Hangs in r8152 connected to power management in kernels at least up v4.17-rc4

2018-05-15 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > > Hi, > > I got reports about hangs with this trace: > > May 13 01:36:55 neroon kernel: INFO: task kworker/0:0:4 blocked for more > than 60 seconds. > May 13 01:36:55 neroon kernel: Tainted: G U > 4.17.0-rc4-1.g8257a00-vanilla #1 > May 13

[PATCH v5 0/3] multi-threading device shutdown

2018-05-15 Thread Pavel Tatashin
Changelog v4 - v5 - Addressed comments from Andy Shevchenko and Greg Kroah-Hartman - Split the patch into a series of 3 patches in order to provide a better bisecting, and facilitate with reviewing. v3 - v4 - Added device_shutdown_serial kernel parameter

[PATCH v5 3/3] drivers core: multi-threading device shutdown

2018-05-15 Thread Pavel Tatashin
When system is rebooted, halted or kexeced device_shutdown() is called. This function shuts down every single device by calling either: dev->bus->shutdown(dev) dev->driver->shutdown(dev) Even on a machine with just a moderate amount of devices, device_shutdown() may take

[PATCH v5 1/3] drivers core: refactor device_shutdown

2018-05-15 Thread Pavel Tatashin
device_shutdown() traverses through the list of devices, and calls dev->{bug/driver}->shutdown() for each entry in the list. Refactor the function by keeping device_shutdown() to do the logic of traversing the list of devices, and device_shutdown_one() to perform the actual shutdown operation on

[PATCH v5 2/3] drivers core: prepare device_shutdown for multi-threading

2018-05-15 Thread Pavel Tatashin
Do all the necessary refactoring to prepare device_shutdown() logic to be multi-threaded. Which includes: 1. Change the direction of traversing the list instead of going backward, we now go forward. 2. Children are shutdown recursively for each root device from bottom-up. 3. Functions that can be

Re: [PATCH] net: qcom/emac: Encapsulate sgmii ops under one structure

2018-05-15 Thread Timur Tabi
On 5/15/18 8:10 PM, Hemanth Puranik wrote: This patch introduces ops structure for sgmii, This by ensures that we do not need dummy functions in case of emulation platforms. Signed-off-by: Hemanth Puranik Acked-by: Timur Tabi -- Qualcomm

RE: [PATCH net-next v2 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Andy Duan
From: Florian Fainelli Sent: 2018年5月16日 7:56 > A number of drivers have the following pattern: > > if (np) > of_mdiobus_register() > else > mdiobus_register() > > which the implementation of of_mdiobus_register() now takes care of. > Remove that pattern in

ECMP routing: problematic selection of outgoing interface

2018-05-15 Thread Hirotaka Yamamoto
Hi, Recently I have built a highly-available network using an ECMP route connected to two isolated L2 switches as follows. Router-- ToR switch 1 Linux | 192.168.11.1/24 | eth0: 192.168.11.2/24 | | eth1: 192.168.12.2/24 +-- ToR switch 2 --+

[net-next PATCH v2 4/4] Documentation: Add explanation for XPS using Rx-queue map

2018-05-15 Thread Amritha Nambiar
Signed-off-by: Amritha Nambiar --- Documentation/networking/scaling.txt | 58 -- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt index

[net-next PATCH v2 0/4] Symmetric queue selection using XPS for Rx queues

2018-05-15 Thread Amritha Nambiar
This patch series implements support for Tx queue selection based on Rx queue(s) map. This is done by configuring Rx queue(s) map per Tx-queue using sysfs attribute. If the user configuration for Rx queues does not apply, then the Tx queue selection falls back to XPS using CPUs and finally to

[net-next PATCH v2 1/4] net: Refactor XPS for CPUs and Rx queues

2018-05-15 Thread Amritha Nambiar
Refactor XPS code to support Tx queue selection based on CPU map or Rx queue map. Signed-off-by: Amritha Nambiar --- include/linux/cpumask.h | 11 ++ include/linux/netdevice.h | 72 +++- net/core/dev.c| 208

[net-next PATCH v2 3/4] net-sysfs: Add interface for Rx queue map per Tx queue

2018-05-15 Thread Amritha Nambiar
Extend transmit queue sysfs attribute to configure Rx queue map per Tx queue. By default no receive queues are configured for the Tx queue. - /sys/class/net/eth0/queues/tx-*/xps_rxqs Signed-off-by: Amritha Nambiar --- net/core/net-sysfs.c | 81

[net-next PATCH v2 2/4] net: Enable Tx queue selection based on Rx queues

2018-05-15 Thread Amritha Nambiar
This patch adds support to pick Tx queue based on the Rx queue map configuration set by the admin through the sysfs attribute for each Tx queue. If the user configuration for receive queue map does not apply, then the Tx queue selection falls back to CPU map based selection and finally to hashing.

RE: [PATCH net-next 2/3] net: ethernet: freescale: Allow FEC with COMPILE_TEST

2018-05-15 Thread Andy Duan
From: Florian Fainelli Sent: 2018年5月16日 7:48 > The Freescale FEC driver builds fine with COMPILE_TEST, so make that > possible. > > Signed-off-by: Florian Fainelli Acked-by: Fugang Duan > --- >

[PATCH] net: qcom/emac: Encapsulate sgmii ops under one structure

2018-05-15 Thread Hemanth Puranik
This patch introduces ops structure for sgmii, This by ensures that we do not need dummy functions in case of emulation platforms. Signed-off-by: Hemanth Puranik --- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 5 +-

[PATCH net-next v2 1/3] net: qualcomm: rmnet: Capture all drops in transmit path

2018-05-15 Thread Subash Abhinov Kasiviswanathan
Packets in transmit path could potentially be dropped if there were errors while adding the MAP header or the checksum header. Increment the tx_drops stats in these cases. Additionally, refactor the code to free the packet and increment the tx_drops stat under a single label. Signed-off-by:

[PATCH net-next v2 0/3] net: qualcomm: rmnet: Updates 2018-05-14

2018-05-15 Thread Subash Abhinov Kasiviswanathan
Patch 1 adds tx_drops counter to more places. Patch 2 adds ethtool private stats support to make it easy to debug the checksum offload path. Patch 3 is a cleanup in command packet processing path. v1->v2: Fix the incorrect if / else statement in rmnet_map_checksum_downlink_packet() and define

[PATCH net-next v2 2/3] net: qualcomm: rmnet: Add support for ethtool private stats

2018-05-15 Thread Subash Abhinov Kasiviswanathan
Add ethtool private stats handler to debug the handling of packets with checksum offload header / trailer. This allows to keep track of the number of packets for which hardware computes the checksum and counts and reasons where checksum computation was skipped in hardware and was done in the

[PATCH net-next v2 3/3] net: qualcomm: rmnet: Remove redundant command check

2018-05-15 Thread Subash Abhinov Kasiviswanathan
The command packet size is already checked once in rmnet_map_deaggregate() for the header, packet and trailer size, so this additional check is not needed. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c | 14

[PATCH iproute2-next] tc-netem: fix limit description in man page

2018-05-15 Thread Marcelo Ricardo Leitner
As the kernel code says, limit is actually the amount of packets it can hold queued at a time, as per: static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) { ... if (unlikely(sch->q.qlen >= sch->limit))

Re: [PATCH v2] {net, IB}/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'

2018-05-15 Thread Saeed Mahameed
On Tue, May 15, 2018 at 3:21 PM, Jason Gunthorpe wrote: > On Sun, May 13, 2018 at 09:00:41AM +0200, Christophe JAILLET wrote: >> When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to >> free it. >> >> Signed-off-by: Christophe JAILLET

Re: [PATCH net-next v2 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Grygorii Strashko
On 05/15/2018 06:56 PM, Florian Fainelli wrote: A number of drivers have the following pattern: if (np) of_mdiobus_register() else mdiobus_register() which the implementation of of_mdiobus_register() now takes care of. Remove that pattern in drivers that strictly adhere to

Re: [PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-15 Thread Willem de Bruijn
On Tue, May 15, 2018 at 4:04 PM, Willem de Bruijn wrote: > On Tue, May 15, 2018 at 10:14 AM, Willem de Bruijn > wrote: >> On Mon, May 14, 2018 at 7:45 PM, Eric Dumazet wrote: >>> >>> >>> On 05/14/2018

[PATCH net-next v2 1/2] of: mdio: Fall back to mdiobus_register() with NULL device_node

2018-05-15 Thread Florian Fainelli
When the device_node specified is NULL, fall back to mdiobus_register(). We have a number of drivers having a similar pattern which is: if (np) of_mdiobus_register() else mdiobus_register() so incorporate that behavior within the core of_mdiobus_register() function. This is also

[PATCH net-next v2 0/2] of: mdio: Fall back to mdiobus_register() with NULL device_node

2018-05-15 Thread Florian Fainelli
Hi all, This patch series updates of_mdiobus_register() such that when the device_node argument is NULL, it calls mdiobus_register() directly. This is consistent with the behavior of of_mdiobus_register() when CONFIG_OF=n. I only converted the most obvious drivers, there are others that have a

[PATCH net-next v2 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Florian Fainelli
A number of drivers have the following pattern: if (np) of_mdiobus_register() else mdiobus_register() which the implementation of of_mdiobus_register() now takes care of. Remove that pattern in drivers that strictly adhere to it. Signed-off-by: Florian Fainelli

[PATCH net-next 0/3] net: Allow more drivers with COMPILE_TEST

2018-05-15 Thread Florian Fainelli
Hi David, This patch series includes more drivers to be build tested with COMPILE_TEST enabled. This helps cover some of the issues I just ran into with missing a driver *sigh*. Florian Fainelli (3): net: ethernet: ti: Allow most drivers with COMPILE_TEST net: ethernet: freescale: Allow FEC

[PATCH net-next 1/3] net: ethernet: ti: Allow most drivers with COMPILE_TEST

2018-05-15 Thread Florian Fainelli
Most of the TI drivers build just fine with COMPILE_TEST, cpmac (AR7) is the exception because it uses a header file from arch/mips/include/asm/mach-ar7/ar7.h. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/Kconfig | 14 +++--- 1 file changed, 7

[PATCH net-next 3/3] net: phy: Allow MDIO_MOXART and MDIO_SUN4I with COMPILE_TEST

2018-05-15 Thread Florian Fainelli
Those drivers build just fine with COMPILE_TEST, so make that possible. Signed-off-by: Florian Fainelli --- drivers/net/phy/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index

[PATCH net-next 2/3] net: ethernet: freescale: Allow FEC with COMPILE_TEST

2018-05-15 Thread Florian Fainelli
The Freescale FEC driver builds fine with COMPILE_TEST, so make that possible. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/freescale/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/Kconfig

[PATCH bpf-next 5/7] samples/bpf: add a samples/bpf test for BPF_PERF_EVENT_QUERY

2018-05-15 Thread Yonghong Song
This is mostly to test kprobe/uprobe which needs kernel headers. Signed-off-by: Yonghong Song --- samples/bpf/Makefile| 4 + samples/bpf/perf_event_query_kern.c | 19 ++ samples/bpf/perf_event_query_user.c | 376 3 files

[PATCH bpf-next 0/7] bpf: implement BPF_PERF_EVENT_QUERY for perf event query

2018-05-15 Thread Yonghong Song
Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf program is attached to which tracepoint/kprobe/uprobe. Such attachment information will be really useful to

[PATCH bpf-next 3/7] tools/bpf: sync kernel header bpf.h and add bpf_trace_event_query in libbpf

2018-05-15 Thread Yonghong Song
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and implement bpf_trace_event_query() in libbpf. The test programs in samples/bpf and tools/testing/selftests/bpf, and later bpftool will use this libbpf function to query kernel. Signed-off-by: Yonghong Song ---

[PATCH bpf-next 2/7] bpf: introduce bpf subcommand BPF_PERF_EVENT_QUERY

2018-05-15 Thread Yonghong Song
Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf program is attached to which tracepoint/kprobe/uprobe. Such attachment information will be really useful to

[PATCH bpf-next 6/7] tools/bpf: add two BPF_PERF_EVENT_QUERY tests in test_progs

2018-05-15 Thread Yonghong Song
The new tests are added to query perf_event information for raw_tracepoint and tracepoint attachment. For tracepoint, both syscalls and non-syscalls tracepoints are queries as they are treated slightly differently inside the kernel. Signed-off-by: Yonghong Song ---

[PATCH bpf-next 7/7] tools/bpftool: add perf subcommand

2018-05-15 Thread Yonghong Song
The new command "bpftool perf [show]" will traverse all processes under /proc, and if any fd is associated with a perf event, it will print out related perf event information. Below is an example to show the results using bcc commands. Running the following 4 bcc commands: kprobe: trace.py

[PATCH bpf-next 1/7] perf/core: add perf_get_event() to return perf_event given a struct file

2018-05-15 Thread Yonghong Song
A new extern function, perf_get_event(), is added to return a perf event given a struct file. This function will be used in later patches. Signed-off-by: Yonghong Song --- include/linux/perf_event.h | 5 + kernel/events/core.c | 8 2 files changed, 13

[PATCH bpf-next 4/7] tools/bpf: add ksym_get_addr() in trace_helpers

2018-05-15 Thread Yonghong Song
Given a kernel function name, ksym_get_addr() will return the kernel address for this function, or 0 if it cannot find this function name in /proc/kallsyms. This function will be used later when a kernel address is used to initiate a kprobe perf event. Signed-off-by: Yonghong Song

Re

2018-05-15 Thread ''Maria-Elisabeth Schaeffler''
I am Maria-Elisabeth Schaeffler, a German citizen, wife of late George W.Schaeffler, 75 years old. You can see here: en.wikipedia.org/wiki/Maria-Elisabeth_Schaeffler I intend to give to you a portion of my Wealth as a free-will financial donation to you. Respond now to partake. Regards

[PATCH net-next v2] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

2018-05-15 Thread Grygorii Strashko
This fixes klockworks warnings: Pointer 'dev' returned from call to function 'bus_find_device' at line 179 may be NULL and will be dereferenced at line 181. cpsw-phy-sel.c:179: 'dev' is assigned the return value from function 'bus_find_device'. bus.c:342: 'bus_find_device' explicitly

[PATCH bpf-next] samples/bpf: Decrement ttl in fib forwarding example

2018-05-15 Thread David Ahern
Only consider forwarding packets if ttl in received packet is > 1 and decrement ttl before handing off to bpf_redirect_map. Signed-off-by: David Ahern --- samples/bpf/xdp_fwd_kern.c | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-)

Re: [PATCH net-next 2/3] net: qualcomm: rmnet: Add support for ethtool private stats

2018-05-15 Thread kbuild test robot
Hi Subash, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Subash-Abhinov-Kasiviswanathan/net-qualcomm-rmnet-Updates-2018-05-14/20180515-115355 config: x86_64-randconfig-s4-05160610 (attached

Re: [PATCH net-next] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

2018-05-15 Thread Grygorii Strashko
On 05/15/2018 06:07 PM, Andy Shevchenko wrote: On Wed, May 16, 2018 at 2:01 AM, Grygorii Strashko wrote: This fixes klockworks warnings: Pointer 'dev' returned from call to function 'bus_find_device' at line 179 may be NULL and will be dereferenced at line 181. +

Re: [PATCH net-next] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

2018-05-15 Thread Andy Shevchenko
On Wed, May 16, 2018 at 2:01 AM, Grygorii Strashko wrote: > This fixes klockworks warnings: Pointer 'dev' returned from call to > function 'bus_find_device' at line 179 may be NULL and will be dereferenced > at line 181. > + dev_err(dev, "unable to find

[PATCH net v2 2/3] net: dsa: bcm_sf2: Fix IPv6 rules and chain ID

2018-05-15 Thread Florian Fainelli
We had several issues that would make the programming of IPv6 rules both inconsistent and error prone: - the chain ID that we would be asking the hardware to put in the packet's Broadcom tag would be off by one, it would return one of the two indexes, but not the one user-space specified -

[PATCH net-next] net: ethernet: ti: cpsw-phy-sel: check bus_find_device() ret value

2018-05-15 Thread Grygorii Strashko
This fixes klockworks warnings: Pointer 'dev' returned from call to function 'bus_find_device' at line 179 may be NULL and will be dereferenced at line 181. cpsw-phy-sel.c:179: 'dev' is assigned the return value from function 'bus_find_device'. bus.c:342: 'bus_find_device' explicitly

[PATCH net v2 3/3] net: dsa: bcm_sf2: Fix IPv6 rule half deletion

2018-05-15 Thread Florian Fainelli
It was possible to delete only one half of an IPv6, which would leave the second half still programmed and possibly in use. Instead of checking for the unused bitmap, we need to check the unique bitmap, and refuse any deletion that does not match that criteria. We also need to move that check from

[PATCH net v2 1/3] net: dsa: bcm_sf2: Fix RX_CLS_LOC_ANY overwrite for last rule

2018-05-15 Thread Florian Fainelli
When we let the kernel pick up a rule location with RX_CLS_LOC_ANY, we would be able to overwrite the last rules because of a number of issues. The IPv4 code path would not be checking that rule_index is within bounds, and it would also only be allowed to pick up rules from range 0..126 instead

[PATCH net v2 0/3] net: dsa: bcm_sf2: CFP fixes

2018-05-15 Thread Florian Fainelli
Hi David, This patch series fixes a number of usability issues with the SF2 Compact Field Processor code: - we would not be properly bound checking the location when we let the kernel automatically place rules with RX_CLS_LOC_ANY - when using IPv6 rules and user space specifies a location

Re: [PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Florian Fainelli
On 05/15/2018 03:57 PM, Grygorii Strashko wrote: > > > On 05/15/2018 04:59 PM, Florian Fainelli wrote: >> A number of drivers have the following pattern: >> >> if (np) >> of_mdiobus_register() >> else >> mdiobus_register() >> >> which the implementation of of_mdiobus_register() now takes

Re: [PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Grygorii Strashko
On 05/15/2018 04:59 PM, Florian Fainelli wrote: A number of drivers have the following pattern: if (np) of_mdiobus_register() else mdiobus_register() which the implementation of of_mdiobus_register() now takes care of. Remove that pattern in drivers that strictly adhere to

Re: [PATCH v2] {net, IB}/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'

2018-05-15 Thread Jason Gunthorpe
On Sun, May 13, 2018 at 09:00:41AM +0200, Christophe JAILLET wrote: > When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to > free it. > > Signed-off-by: Christophe JAILLET > --- > v1 -> v2: More places to update have been added to the patch >

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 6:03 PM, Lucas Bates wrote: > On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim wrote: >>> Test 7d50: Add skbmod action to set destination mac >>> exit: 255 0 >>> dst MAC address <11:22:33:44:55:66> >>> RTNETLINK answers: No such

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim wrote: >> Test 7d50: Add skbmod action to set destination mac >> exit: 255 0 >> dst MAC address <11:22:33:44:55:66> >> RTNETLINK answers: No such file or directory >> We have an error talking to the kernel >> > > You may

[PATCH net-next 0/2] of: mdio: Fall back to mdiobus_register() with np is NULL

2018-05-15 Thread Florian Fainelli
Hi all, This patch series updates of_mdiobus_register() such that when the device_node argument is NULL, it calls mdiobus_register() directly. This is consistent with the behavior of of_mdiobus_register() when CONFIG_OF=n. I only converted the most obvious drivers, there are others that have a

[PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()

2018-05-15 Thread Florian Fainelli
A number of drivers have the following pattern: if (np) of_mdiobus_register() else mdiobus_register() which the implementation of of_mdiobus_register() now takes care of. Remove that pattern in drivers that strictly adhere to it. Signed-off-by: Florian Fainelli

[PATCH net-next 1/2] of: mdio: Fall back to mdiobus_register() with np is NULL

2018-05-15 Thread Florian Fainelli
When the Device Tree node specified is NULL, fall back to mdiobus_register(). We have a number of drivers having a similar pattern which is: if (np) of_mdiobus_register() else mdiobus_register() so incorporate that behavior within the core of_mdiobus_register() function. This is

[PATCH iproute2] Allow to configure /var/run/netns directory

2018-05-15 Thread Pavel Maltsev
Currently NETNS_RUN_DIR is hardcoded and refers to /var/run/netns. However, some systems (e.g. Android) doesn't have /var which results in error attempts to create network namespaces on these systems. This change makes NETNS_RUN_DIR configurable at build time by allowing to pass environment

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Jamal Hadi Salim
On 15/05/18 05:21 PM, Vlad Buslov wrote: On Tue 15 May 2018 at 18:25, Jamal Hadi Salim wrote: On 14/05/18 04:46 PM, Vlad Buslov wrote: On Mon 14 May 2018 at 18:03, Jamal Hadi Salim wrote: On 14/05/18 10:27 AM, Vlad Buslov wrote: Hello Jamal, I'm

Re: i40e - Is i40e_force_link_state doing the right thing ?

2018-05-15 Thread Chaitanya Lala
Hi Mariusz, ... On Tue, May 15, 2018 at 2:24 PM, Stachura, Mariusz wrote: > On Tue, May 15, 2018 at 1:15 PM, Chaitanya Lala > wrote: >> Hi, >> >> I am trying to bring up a Intel XL710 4x10G Intel card using the >> latest mainline

RE: i40e - Is i40e_force_link_state doing the right thing ?

2018-05-15 Thread Stachura, Mariusz
On Tue, May 15, 2018 at 1:15 PM, Chaitanya Lala wrote: > Hi, > > I am trying to bring up a Intel XL710 4x10G Intel card using the > latest mainline top-of-tree. > The problem is that "ifconfig up" and "ifconfig down" do not take > effect at the link state level. > I

Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Vlad Buslov
On Tue 15 May 2018 at 18:25, Jamal Hadi Salim wrote: > On 14/05/18 04:46 PM, Vlad Buslov wrote: >> >> On Mon 14 May 2018 at 18:03, Jamal Hadi Salim wrote: >>> On 14/05/18 10:27 AM, Vlad Buslov wrote: > > >> Hello Jamal, >> >> I'm trying to run tdc, but

Re: [PATCH bpf-next v6 2/4] bpf: sockmap, add hash map support

2018-05-15 Thread Y Song
On Tue, May 15, 2018 at 12:01 PM, Daniel Borkmann wrote: > On 05/14/2018 07:00 PM, John Fastabend wrote: >> Sockmap is currently backed by an array and enforces keys to be >> four bytes. This works well for many use cases and was originally >> modeled after devmap which also

Re: Poor TCP performance with XPS enabled after scrubbing skb

2018-05-15 Thread Eric Dumazet
On 05/15/2018 12:31 PM, Flavio Leitner wrote: > Hi, > > There is a significant throughput issue (~50% drop) for a single TCP > stream when the skb is scrubbed and XPS is enabled. > > If I turn CONFIG_XPS off, then the issue never happens and the test > reaches line rate. The same happens if I

Re: [PATCH net-next v3 0/7] Microsemi Ocelot Ethernet switch support

2018-05-15 Thread David Miller
From: Alexandre Belloni Date: Mon, 14 May 2018 22:04:53 +0200 > The ocelot dts changes are here for reference and should probably go > through the MIPS tree once the bindings are accepted. Ok, series applied to net-next minus patches #5 and #6. Thank you.

Re: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Doug Ledford
On Tue, 2018-05-15 at 15:28 -0500, Steve Wise wrote: > > -Original Message- > > From: linux-rdma-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Doug Ledford > > Sent: Tuesday, May 15, 2018 2:53 PM > > To: David Ahern ; Steve Wise > >

Re: i40e - Is i40e_force_link_state doing the right thing ?

2018-05-15 Thread Alexander Duyck
On Tue, May 15, 2018 at 1:15 PM, Chaitanya Lala wrote: > Hi, > > I am trying to bring up a Intel XL710 4x10G Intel card using the > latest mainline top-of-tree. > The problem is that "ifconfig up" and "ifconfig down" do not take > effect at the link state level. > I

RE: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Steve Wise
> -Original Message- > From: David Ahern > Sent: Tuesday, May 15, 2018 3:02 PM > To: Doug Ledford ; Steve Wise > ; l...@kernel.org > Cc: step...@networkplumber.org; netdev@vger.kernel.org; linux- > r...@vger.kernel.org

RE: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Steve Wise
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org ow...@vger.kernel.org> On Behalf Of Doug Ledford > Sent: Tuesday, May 15, 2018 2:53 PM > To: David Ahern ; Steve Wise > ; l...@kernel.org > Cc: step...@networkplumber.org;

RE: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Steve Wise
> On Tue, 2018-05-15 at 13:37 -0600, David Ahern wrote: > > On 5/14/18 9:42 AM, Steve Wise wrote: > > > diff --git a/rdma/include/uapi/rdma/rdma_netlink.h > b/rdma/include/uapi/rdma/rdma_netlink.h > > > index 60416ed..40be0d8 100644 > > > --- a/rdma/include/uapi/rdma/rdma_netlink.h > > > +++

Re: [RFC PATCH bpf-next 11/12] i40e: implement AF_XDP zero-copy support for Rx

2018-05-15 Thread Alexander Duyck
On Tue, May 15, 2018 at 12:06 PM, Björn Töpel wrote: > From: Björn Töpel > > A lot of things here. First we add support for the new > XDP_SETUP_XSK_UMEM command in ndo_bpf. This allows the AF_XDP socket > to pass a UMEM to the driver. The driver will

Re: [PATCH net-next 2/2] pfifo_fast: drop unneeded additional lock on dequeue

2018-05-15 Thread Michael S. Tsirkin
On Tue, May 15, 2018 at 04:24:37PM +0200, Paolo Abeni wrote: > After the previous patch, for NOLOCK qdiscs, q->seqlock is > always held when the dequeue() is invoked, we can drop > any additional locking to protect such operation. > > Signed-off-by: Paolo Abeni > --- >

i40e - Is i40e_force_link_state doing the right thing ?

2018-05-15 Thread Chaitanya Lala
Hi, I am trying to bring up a Intel XL710 4x10G Intel card using the latest mainline top-of-tree. The problem is that "ifconfig up" and "ifconfig down" do not take effect at the link state level. I tracked the problem down to i40e_force_link_state() when it is called from i40e_down(). It calls

Re: [net 1/1] net/mlx5: Fix build break when CONFIG_SMP=n

2018-05-15 Thread Guenter Roeck
On Mon, May 14, 2018 at 03:38:10PM -0700, Saeed Mahameed wrote: > Avoid using the kernel's irq_descriptor and return IRQ vector affinity > directly from the driver. > > This fixes the following build break when CONFIG_SMP=n > > include/linux/mlx5/driver.h: In function

Re: [PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-15 Thread Willem de Bruijn
On Tue, May 15, 2018 at 10:14 AM, Willem de Bruijn wrote: > On Mon, May 14, 2018 at 7:45 PM, Eric Dumazet wrote: >> >> >> On 05/14/2018 04:30 PM, Willem de Bruijn wrote: >> >>> I don't quite follow. The reported crash happens in the

Re: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Doug Ledford
On Tue, 2018-05-15 at 14:01 -0600, David Ahern wrote: > On 5/15/18 2:00 PM, Doug Ledford wrote: > > I just sent an incremental fix to the list under separate cover. You > > can squash that fix into Steve's patch and it should resolve the issue. > > Or Steve can respin the set. Either way. > >

Re: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread David Ahern
On 5/15/18 2:00 PM, Doug Ledford wrote: > I just sent an incremental fix to the list under separate cover. You > can squash that fix into Steve's patch and it should resolve the issue. > Or Steve can respin the set. Either way. Once the patch has been committed to the upstream repo, spin a new

aio poll and a new in-kernel poll API V11

2018-05-15 Thread Christoph Hellwig
Hi all, this series adds support for the IOCB_CMD_POLL operation to poll for the readyness of file descriptors using the aio subsystem. The API is based on patches that existed in RHAS2.1 and RHEL3, which means it already is supported by libaio. To implement the poll support efficiently new

[PATCH 01/32] fs: unexport poll_schedule_timeout

2018-05-15 Thread Christoph Hellwig
No users outside of select.c. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 3 +-- include/linux/poll.h | 2 -- 2 files changed, 1 insertion(+), 4

[PATCH 02/32] fs: cleanup do_pollfd

2018-05-15 Thread Christoph Hellwig
Use straightline code with failure handling gotos instead of a lot of nested conditionals. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong --- fs/select.c | 48

Re: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes

2018-05-15 Thread Doug Ledford
On Tue, 2018-05-15 at 13:53 -0600, David Ahern wrote: > sure for the above, but not the ones below. > > Before this patch, this program: > $ cat a.c > #include > #include > > int main(void) > { > printf("RDMA_NLDEV_ATTR_NDEV_INDEX = %d\n", > RDMA_NLDEV_ATTR_NDEV_INDEX); > >

[PATCH 03/32] fs: update documentation to mention __poll_t and match the code

2018-05-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Greg Kroah-Hartman --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 04/32] fs: add new vfs_poll and file_can_poll helpers

2018-05-15 Thread Christoph Hellwig
These abstract out calls to the poll method in preparation for changes in how we poll. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Darrick J. Wong ---

[PATCH 05/32] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-05-15 Thread Christoph Hellwig
->get_poll_head returns the waitqueue that the poll operation is going to sleep on. Note that this means we can only use a single waitqueue for the poll, unlike some current drivers that use two waitqueues for different events. But now that we have keyed wakeups and heavily use those for poll

[PATCH 06/32] aio: simplify KIOCB_KEY handling

2018-05-15 Thread Christoph Hellwig
No need to pass the key field to lookup_iocb to compare it with KIOCB_KEY, as we can do that right after retrieving it from userspace. Also move the KIOCB_KEY definition to aio.c as it is an internal value not used by any other place in the kernel. Signed-off-by: Christoph Hellwig

[PATCH 07/32] aio: simplify cancellation

2018-05-15 Thread Christoph Hellwig
With the current aio code there is no need for the magic KIOCB_CANCELLED value, as a cancelation just kicks the driver to queue the completion ASAP, with all actual completion handling done in another thread. Given that both the completion path and cancelation take the context lock there is no

[PATCH 09/32] aio: add delayed cancel support

2018-05-15 Thread Christoph Hellwig
The upcoming aio poll support would like to be able to complete the iocb inline from the cancellation context, but that would cause a double lock of ctx_lock as-is. Add a new delayed_cancel_reqs list of iocbs that should be cancelled from outside the ctx_lock by calling the (re-)added ki_cancel

[PATCH 10/32] aio: implement IOCB_CMD_POLL

2018-05-15 Thread Christoph Hellwig
Simple one-shot poll through the io_submit() interface. To poll for a file descriptor the application should submit an iocb of type IOCB_CMD_POLL. It will poll the fd for the events specified in the the first 32 bits of the aio_buf field of the iocb. Unlike poll or epoll without EPOLLONESHOT

[PATCH 11/32] net: refactor socket_poll

2018-05-15 Thread Christoph Hellwig
Factor out two busy poll related helpers for late reuse, and remove a command that isn't very helpful, especially with the __poll_t annotations in place. Signed-off-by: Christoph Hellwig --- include/net/busy_poll.h | 15 +++ net/socket.c| 21

  1   2   3   >