Re: [PATCH] Replace a set of atomic_add()

2020-11-10 Thread Kalle Valo
Yejune Deng writes: > a set of atomic_inc() looks more readable > > Signed-off-by: Yejune Deng > --- > drivers/net/wireless/st/cw1200/bh.c | 10 +- > drivers/net/wireless/st/cw1200/wsm.c | 8 > 2 files changed, 9 insertions(+), 9 deletions(-) The subject prefix should be "cw

Re: [Intel-wired-lan] [PATCH bpf-next 5/6] xsk: introduce batched Tx descriptor interfaces

2020-11-10 Thread Magnus Karlsson
On Mon, Nov 9, 2020 at 10:06 PM John Fastabend wrote: > > Magnus Karlsson wrote: > > From: Magnus Karlsson > > > > Introduce batched descriptor interfaces in the xsk core code for the > > Tx path to be used in the driver to write a code path with higher > > performance. This interface will be use

Re: [PATCH net v2 00/21] net: avoid to remove module when its debugfs is being used

2020-11-10 Thread Johannes Berg
On Sat, 2020-11-07 at 11:05 -0800, Jakub Kicinski wrote: > On Sat, 7 Nov 2020 17:21:31 + Taehee Yoo wrote: > > When debugfs file is opened, its module should not be removed until > > it's closed. > > Because debugfs internally uses the module's data. > > So, it could access freed memory. > >

Re: [net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-10 Thread Numan Siddique
On Tue, Nov 10, 2020 at 1:25 AM Jakub Kicinski wrote: > > On Mon, 9 Nov 2020 12:59:30 +0530 nusid...@redhat.com wrote: > > From: Numan Siddique > > > > Before calling nf_conntrack_in(), caller can set this flag in the > > connection template for a tcp packet and any errors in the > > tcp_in_wind

Re: [PATCH v2 bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-10 Thread wanghai (M)
在 2020/11/10 12:33, John Fastabend 写道: Wang Hai wrote: progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, it should be closed. Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface") Signed-off-by: Wang Hai --- v1->v2: use cleanup tag i

Re: [net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-10 Thread Numan Siddique
On Tue, Nov 10, 2020 at 3:06 AM Florian Westphal wrote: > > nusid...@redhat.com wrote: > > From: Numan Siddique > > > > Before calling nf_conntrack_in(), caller can set this flag in the > > connection template for a tcp packet and any errors in the > > tcp_in_window() will be ignored. > > > > A

Re: [PATCH RFC PKS/PMEM 05/58] kmap: Introduce k[un]map_thread

2020-11-10 Thread Thomas Gleixner
On Mon, Nov 09 2020 at 20:59, Ira Weiny wrote: > On Tue, Nov 10, 2020 at 02:13:56AM +0100, Thomas Gleixner wrote: > Also, we can convert the new memcpy_*_page() calls to kmap_local() as well. > [For now my patch just uses kmap_atomic().] > > I've not looked at all of the patches in your latest vers

[PATCH] rfkill: Fix use-after-free in rfkill_resume()

2020-11-10 Thread Claire Chang
If a device is getting removed or reprobed during resume, use-after-free might happen. For example, h5_btrtl_resume()[drivers/bluetooth/hci_h5.c] schedules a work queue for device reprobing. During the reprobing, if rfkill_set_block() in rfkill_resume() is called after the corresponding *_unregiste

Re: [PATCH] Replace a set of atomic_add()

2020-11-10 Thread Kalle Valo
Yejune Deng writes: > Oh,I was forgetting. thanks. And you should also disable HTML in your emails :) See the wiki link below for more. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Re: [PATCH v2 0/5] net: qrtr: Add distant node support

2020-11-10 Thread Loic Poulain
Hi Jakub, On Mon, 9 Nov 2020 at 19:39, Jakub Kicinski wrote: > > On Mon, 9 Nov 2020 09:49:24 +0100 Loic Poulain wrote: > > > Looks like patch 1 is a bug fix and patches 2-5 add a new feature. > > > Is that correct? > > > > That's correct, though strictly speaking 2-5 are also bug fix since remote

[PATCH] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers

2020-11-10 Thread Tobias Waldekranz
Ethertype DSA encodes exactly the same information in the DSA tag as the non-ethertype variety. So refactor out the common parts and reuse them for both protocols. This is ensures tag parsing and generation as always consistent across all mv88e6xxx chips. While we are at it, explicitly deal with

[PATCH v2 03/10] thunderbolt: Create XDomain devices for loops back to the host

2020-11-10 Thread Mika Westerberg
It is perfectly possible to have loops back from the routers to the host, or even from one host port to another. Instead of ignoring these, we create XDomain devices for each. This allows creating services such as DMA traffic test that is used in manufacturing for example. Signed-off-by: Mika West

[PATCH v2 05/10] thunderbolt: Add functions for enabling and disabling lane bonding on XDomain

2020-11-10 Thread Mika Westerberg
From: Isaac Hazan These can be used by service drivers to enable and disable lane bonding as needed. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/switch.c | 24 +++-- drivers/thunderbolt/tb.h | 3 ++ drivers/thunde

[PATCH v2 07/10] thunderbolt: Make it possible to allocate one directional DMA tunnel

2020-11-10 Thread Mika Westerberg
With DMA tunnels it is possible that the service using it does not require bi-directional paths so make RX and TX optional (but of course one of them needs to be set). Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/tunnel.c | 50 ++--

[PATCH v2 02/10] thunderbolt: Find XDomain by route instead of UUID

2020-11-10 Thread Mika Westerberg
We are going to represent loops back to the host also as XDomains and they all have the same (host) UUID, so finding them needs to use route string instead. This also requires that we check if the XDomain device is added to the bus before its properties can be updated. Otherwise the remote UUID mig

[PATCH v2 10/10] MAINTAINERS: Add Isaac as maintainer of Thunderbolt DMA traffic test driver

2020-11-10 Thread Mika Westerberg
From: Isaac Hazan I will be maintaining the Thunderbolt DMA traffic test driver. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3da6d8c154e4..83c4c66

[PATCH v2 09/10] thunderbolt: Add DMA traffic test driver

2020-11-10 Thread Mika Westerberg
From: Isaac Hazan This driver allows sending DMA traffic over XDomain connection. Specifically over a loopback connection using either a Thunderbolt/USB4 cable that is connected back to the host router port, or a special loopback dongle that has RX and TX lines crossed. This can be useful at manu

[PATCH v2 08/10] thunderbolt: Add support for end-to-end flow control

2020-11-10 Thread Mika Westerberg
USB4 spec defines end-to-end (E2E) flow control that can be used between hosts to prevent overflow of a RX ring. We previously had this partially implemented but that code was removed with commit 53f13319d131 ("thunderbolt: Get rid of E2E workaround") with the idea that we add it back properly if t

[PATCH v2 00/10] thunderbolt: Add DMA traffic test driver

2020-11-10 Thread Mika Westerberg
Hi all, This series adds a new Thunderbolt service driver that can be used on manufacturing floor to test that each Thunderbolt/USB4 port is functional. It can be done either using a special loopback dongle that has RX and TX lanes crossed, or by connecting a cable back to the host (for those who

[PATCH v2 04/10] thunderbolt: Add link_speed and link_width to XDomain

2020-11-10 Thread Mika Westerberg
From: Isaac Hazan Link speed and link width are needed for checking expected values in case of using a loopback service. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- .../ABI/testing/sysfs-bus-thunderbolt | 28 drivers/thunderbolt/sw

[PATCH v2 06/10] thunderbolt: Create debugfs directory automatically for services

2020-11-10 Thread Mika Westerberg
This allows service drivers to use it as parent directory if they need to add their own debugfs entries. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/debugfs.c | 24 drivers/thunderbolt/tb.h | 4 drivers/thunderbolt/xdomain

[PATCH v2 01/10] thunderbolt: Do not clear USB4 router protocol adapter IFC and ISE bits

2020-11-10 Thread Mika Westerberg
These fields are marked as vendor defined in the USB4 spec and should not be modified by the software, so only clear them when we are dealing with pre-USB4 hardware. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat --- drivers/thunderbolt/path.c | 13 ++--- 1 file changed, 10 in

[PATCH v3 1/2] PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter

2020-11-10 Thread Zhang Qilong
In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with

[PATCH v3 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-10 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference

[PATCH v3 0/2] Fix usage counter leak by adding a general sync ops

2020-11-10 Thread Zhang Qilong
In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-10 Thread Guillaume Nault
On Mon, Nov 09, 2020 at 03:52:37PM -0800, Jakub Kicinski wrote: > On Fri, 6 Nov 2020 18:16:45 + Tom Parkin wrote: > > This small RFC series implements a suggestion from Guillaume Nault in > > response to my previous submission to add an ac/pppoe driver to the l2tp > > subsystem[1]. > > > > Fo

Re: [PATCH v2 00/10] thunderbolt: Add DMA traffic test driver

2020-11-10 Thread Greg Kroah-Hartman
On Tue, Nov 10, 2020 at 12:19:47PM +0300, Mika Westerberg wrote: > Hi all, > > This series adds a new Thunderbolt service driver that can be used on > manufacturing floor to test that each Thunderbolt/USB4 port is functional. > It can be done either using a special loopback dongle that has RX and

Re: [PATCH 05/10] ARM: dts: BCM5301X: Provide defaults ports container node

2020-11-10 Thread Rafał Miłecki
10.11.2020 04:31, Florian Fainelli wrote: Provide an empty 'ports' container node with the correct #address-cells and #size-cells properties. This silences the following warning: arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml: ethernet-switch@18007000: 'oneOf' conditional failed, one must be f

[PATCH net-next 06/15] mlxsw: spectrum: Export RALUE pack helper and use it from IPIP

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko As the RALUE packing is going to be put into op, make the user from IPIP code use the same helper as the router code does. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 17 ++--- .../ethernet/mellanox/m

[PATCH net-next 07/15] mlxsw: spectrum_router: Pass destination IP as a pointer to mlxsw_reg_ralue_pack4()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Instead of passing destination IP as a u32 value, pass it as pointer to u32. Avoid using local variable for the pointer store. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 4 ++-- drivers/net/ethernet/mellan

[PATCH net-next 13/15] mlxsw: spectrum_router: Introduce fib_entry priv for low-level ops

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Prepare for the low-level ops that need to store some data alongside the fib_entry and introduce a per-fib_entry priv for ll ops. The priv is reference counted as in the follow-up patch it is going to be saved in pack() function and used later on in commit() even in case the rela

[PATCH net-next 10/15] mlxsw: spectrum: Push RALUE packing and writing into low-level router ops

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko With follow-up introduction of XM implementation, XMDR register is going to be optionally used instead of RALUE register. Push the RALUE packing helpers and write call into low-level router ops. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/m

[PATCH net-next 11/15] mlxsw: spectrum_router: Prepare work context for possible bulking

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko For XMDR register it is possible to carry multiple FIB entry operations in a single write. However the FW does not restrict mixing the types of operations, make the code easier and indicate the bulking is ok only in case the bulk contains FIB operations of the same family and eve

[PATCH net-next 00/15] mlxsw: spectrum: Prepare for XM implementation - prefix insertion and removal

2020-11-10 Thread Ido Schimmel
From: Ido Schimmel Jiri says: This is a preparation patchset for follow-up support of boards with extended mezzanine (XM), which is going to allow extended (scale-wise) router offload. XM requires a separate PRM register named XMDR to be used instead of RALUE to insert/update/remove FIB entries

[PATCH net-next 08/15] mlxsw: reg: Allow to pass NULL pointer to mlxsw_reg_ralue_pack4/6()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko In preparation for the change that is going to be done in the next patch, allow to pass NULL pointer to mlxsw_reg_ralue_pack4() and mlxsw_reg_ralue_pack6() helpers. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 6 --

[PATCH net-next 14/15] mlxsw: spectrum_router: Track FIB entry committed state and skip uncommitted on delete

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko In case bulking is used, the entry that was previously added may not be yet committed to the HW as it waits in the queue for bulk send. For such entries, skip the deletion. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_

[PATCH net-next 15/15] mlxsw: spectrum_router: Introduce FIB entry update op

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Follow-up patchset introducing XMDR implementation is going to need to distinguish write and update ops. Therefore introduce "update op" and call "write op" only when new FIB entry is inserted. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/ml

[PATCH net-next 09/15] mlxsw: spectrum_router: Use RALUE pack helper from abort function

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Unify the RALUE register payload packing and use the __mlxsw_sp_fib_entry_ralue_pack() helper from __mlxsw_sp_router_set_abort_trap(). Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- 1 file changed, 2 i

[PATCH net-next 01/15] mlxsw: spectrum_router: Pass non-register proto enum to __mlxsw_sp_router_set_abort_trap()

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Don't pass RALXX register enum and rather pass enum mlxsw_sp_l3proto to __mlxsw_sp_router_set_abort_trap(). This is in preparation to fib entry pack implementation by XMDR register. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spec

[PATCH net-next 03/15] mlxsw: spectrum_router: Introduce FIB event queue instead of separate works

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Currently, every FIB event is queued-up as a separate work to be processed. However, that allows to process only one FIB entry per work callback. In preparation of future XMDR register bulking of multiple FIB entries, convert to FIB event queue. Implement this by a list_head, ad

[PATCH net-next 04/15] mlxsw: spectrum: Propagate context from work handler containing RALUE payload

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Currently, RALUE payload is defined locally in the function that is calling the register write. With introduction of alternative register to RALUE, XMDR, it has to be possible to put multiple FIB entry operations into single register write. So in order to prepare for that, have

[PATCH net-next 05/15] mlxsw: spectrum_router: Push out RALUE pack into separate helper

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko As the RALUE packing is going to be pushed into an op, in preparation for that push the code into a separate function in the meantime. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_router.c | 49 +++ 1 file chan

[PATCH net-next 12/15] mlxsw: spectrum_router: Have FIB entry op context allocated for the instance

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Get the max size needed for FIB entry op context and allocate it once for the instance. Use it repeatedly from the scheduled work. By this, allow to extend the context to hold more data than it is wise to do when it was on the stack. Make sure to signalize that the context needs

[PATCH net-next 02/15] mlxsw: spectrum_router: Use RALUE-independent op arg

2020-11-10 Thread Ido Schimmel
From: Jiri Pirko Since the write/delete of FIB entry is going to be implemented by XMDR register for XM implementation, introduce RALUE-independent enum for op so the enum could be used in both RALUE and XMDR. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../ethernet/mellanox/mlx

Re: [PATCH iproute2-next v4 03/11] lib: json_print: Add print_on_off()

2020-11-10 Thread Leon Romanovsky
On Sun, Nov 08, 2020 at 10:14:08PM +0100, Petr Machata wrote: > The value of a number of booleans is shown as "on" and "off" in the plain > output, and as an actual boolean in JSON mode. Add a function that does > that. > > RDMA tool already uses a function named print_on_off(). This function > alw

[PATCH v6 8/8] can-dev: add len8_dlc support for various CAN USB adapters

2020-11-10 Thread Oliver Hartkopp
Support the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15 on various Classical CAN capable USB network drivers: - gs_usb - pcan_usb - pcan_usb_fd - usb_8dev Tested-by: Oliver Hartkopp Signed-off-by: Oliver Hartkopp --- drivers/net/can/usb/gs_usb.c

[PATCH v6 0/8] Introduce optional DLC element for Classic CAN

2020-11-10 Thread Oliver Hartkopp
Introduce improved DLC handling for Classic CAN with introduces a new element 'len8_dlc' to the struct can_frame and additionally rename the 'can_dlc' element to 'len' as it represents a plain payload length. Before implementing the CAN_CTRLMODE_CC_LEN8_DLC handling on driver level this patch set

Re: [PATCH v5 8/8] can-dev: add len8_dlc support for various CAN USB adapters

2020-11-10 Thread Oliver Hartkopp
On 10.11.20 08:46, Marc Kleine-Budde wrote: On 11/10/20 7:55 AM, Oliver Hartkopp wrote: I would suggest something like u8 can_get_cc_len(const u32 ctrlmode, struct can_frame *cf, u8 dlc) that still returns the 'len' element, so that we can replace can_cc_dlc2len() with can_get_cc_len() for C

[PATCH v6 2/8] can: rename get_can_dlc() macro with can_cc_dlc2len()

2020-11-10 Thread Oliver Hartkopp
The get_can_dlc() macro is used to ensure the payload length information of the Classical CAN frame to be max 8 bytes (the CAN_MAX_DLEN). Rename the macro and use the correct constant in preparation of the len/dlc cleanup for Classical CAN frames. Signed-off-by: Oliver Hartkopp --- drivers/net/

[PATCH v6 6/8] can: update documentation for DLC usage in Classical CAN

2020-11-10 Thread Oliver Hartkopp
The extension of struct can_frame with the len8_dlc element and the can_dlc naming issue required an update of the documentation. Additionally introduce the term 'Classical CAN' which has been established by CAN in Automation to separate the original CAN2.0 A/B from CAN FD. Updated some data stru

[PATCH v6 3/8] can: remove obsolete get_canfd_dlc() macro

2020-11-10 Thread Oliver Hartkopp
The macro was always used together with can_dlc2len() which sanitizes the given dlc value on its own. Signed-off-by: Oliver Hartkopp --- drivers/net/can/flexcan.c | 2 +- drivers/net/can/peak_canfd/peak_canfd.c | 2 +- drivers/net/can/spi/mcp251xfd/mcp251xfd-cor

[PATCH v6 4/8] can: replace can_dlc as variable/element for payload length

2020-11-10 Thread Oliver Hartkopp
The naming of can_dlc as element of struct can_frame and also as variable name is misleading as it claims to be a 'data length CODE' but in reality it always was a plain data length. With the indroduction of a new 'len' element in struct can_frame we can now remove can_dlc as name and make clear w

[PATCH v6 7/8] can-dev: introduce helpers to access Classical CAN DLC values

2020-11-10 Thread Oliver Hartkopp
can_get_cc_dlc: get the data length code for Classical CAN raw DLC access can_get_cc_len: get len and len8_dlc value for Classical CAN raw DLC access Signed-off-by: Oliver Hartkopp --- include/linux/can/dev.h | 28 1 file changed, 28 insertions(+) diff --git a/inclu

[PATCH v6 1/8] can: add optional DLC element to Classical CAN frame structure

2020-11-10 Thread Oliver Hartkopp
ISO 11898-1 Chapter 8.4.2.3 defines a 4 bit data length code (DLC) table which maps the DLC to the payload length of the CAN frame in bytes: DLC -> payload length 0 .. 8 -> 0 .. 8 9 .. 15 -> 8 Although the DLC values 8 .. 15 in Classical CAN always result in a payload lengt

[PATCH v6 5/8] can: rename CAN FD related can_len2dlc and can_dlc2len helpers

2020-11-10 Thread Oliver Hartkopp
The helper functions can_len2dlc and can_dlc2len are only relevant for CAN FD data length code (DLC) conversion. To fit the introduced can_cc_dlc2len for Classical CAN we rename: can_dlc2len -> can_fd_dlc2len to get the payload length from the DLC can_len2dlc -> can_fd_len2dlc to get the DLC from

Re: [PATCH] phy: phylink: Fix CuSFP issue in phylink

2020-11-10 Thread Russell King - ARM Linux admin
On Tue, Nov 10, 2020 at 11:06:42AM +0100, Bjarni Jonasson wrote: > There is an issue with the current phylink driver and CuSFPs which > results in a callback to the phylink validate function without any > advertisement capabilities. The workaround (in this changeset) > is to assign capabilities if

[PATCH net-next] ipv4: Set nexthop flags in a more consistent way

2020-11-10 Thread Ido Schimmel
From: Ido Schimmel Be more consistent about the way in which the nexthop flags are set and set them in one go. Suggested-by: Jakub Kicinski Signed-off-by: Ido Schimmel --- RTNH_F_DEAD and RTNH_F_LINKDOWN are set separately above, so I decided to keep them as-is. --- net/ipv4/fib_semantics.c |

Re: [PATCHv5 bpf] bpf: Move iterator functions into special init section

2020-11-10 Thread Jiri Olsa
On Mon, Nov 09, 2020 at 11:04:34PM +0100, Daniel Borkmann wrote: SNIP > > index 7b53cb3092ee..a7c71e3b5f9a 100644 > > --- a/include/linux/init.h > > +++ b/include/linux/init.h > > @@ -52,6 +52,7 @@ > > #define __initconst __section(".init.rodata") > > #define __exitdata__section

Re: [PATCH v4 net-next 5/5] net: mlx5: add xdp tx return bulking support

2020-11-10 Thread Jesper Dangaard Brouer
On Fri, 6 Nov 2020 19:19:11 +0100 Lorenzo Bianconi wrote: > Convert mlx5 driver to xdp_return_frame_bulk APIs. > > XDP_REDIRECT (upstream codepath): 8.5Mpps > XDP_REDIRECT (upstream codepath + bulking APIs): 10.1Mpps > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/ethernet/mellanox/m

Re: [PATCH v4 net-next 1/5] net: xdp: introduce bulking for xdp tx return path

2020-11-10 Thread Jesper Dangaard Brouer
On Fri, 6 Nov 2020 19:19:07 +0100 Lorenzo Bianconi wrote: > XDP bulk APIs introduce a defer/flush mechanism to return > pages belonging to the same xdp_mem_allocator object > (identified via the mem.id field) in bulk to optimize > I-cache and D-cache since xdp_return_frame is usually run > insid

Re: [PATCH v4 net-next 2/5] net: page_pool: add bulk support for ptr_ring

2020-11-10 Thread Jesper Dangaard Brouer
On Fri, 6 Nov 2020 19:19:08 +0100 Lorenzo Bianconi wrote: > Introduce the capability to batch page_pool ptr_ring refill since it is > usually run inside the driver NAPI tx completion loop. > > Suggested-by: Jesper Dangaard Brouer > Signed-off-by: Lorenzo Bianconi > --- > include/net/page_poo

[PATCH bpf-next v2 0/5] xsk: i40e: Tx performance improvements

2020-11-10 Thread Magnus Karlsson
This patch set improves the performance of mainly the Tx processing of AF_XDP sockets. Though, patch 3 also improves the Rx path. All in all, this patch set improves the throughput of the l2fwd xdpsock application by around 11%. If we just take a look at Tx processing part, it is improved by 35% to

[PATCH bpf-next v2 2/5] i40e: remove unnecessary sw_ring access from xsk Tx

2020-11-10 Thread Magnus Karlsson
From: Magnus Karlsson Remove the unnecessary access to the software ring for the AF_XDP zero-copy driver. This was used to record the length of the packet so that the driver Tx completion code could sum this up to produce the total bytes sent. This is now performed during the transmission of the

[PATCH bpf-next v2 1/5] samples/bpf: increment Tx stats at sending

2020-11-10 Thread Magnus Karlsson
From: Magnus Karlsson Increment the statistics over how many Tx packets have been sent at the time of sending instead of at the time of completion. This as a completion event means that the buffer has been sent AND returned to user space. The packet always gets sent shortly after sendto() is call

[PATCH bpf-next v2 4/5] xsk: introduce batched Tx descriptor interfaces

2020-11-10 Thread Magnus Karlsson
From: Magnus Karlsson Introduce batched descriptor interfaces in the xsk core code for the Tx path to be used in the driver to write a code path with higher performance. This interface will be used by the i40e driver in the next patch. Though other drivers would likely benefit from this new inter

[PATCH bpf-next v2 3/5] xsk: introduce padding between more ring pointers

2020-11-10 Thread Magnus Karlsson
From: Magnus Karlsson Introduce one cache line worth of padding between the consumer pointer and the flags field as well as between the flags field and the start of the descriptors in all the lockless rings. This so that the x86 HW adjacency prefetcher will not prefetch the adjacent pointer/field

[PATCH bpf-next v2 5/5] i40e: use batched xsk Tx interfaces to increase performance

2020-11-10 Thread Magnus Karlsson
From: Magnus Karlsson Use the new batched xsk interfaces for the Tx path in the i40e driver to improve performance. On my machine, this yields a throughput increase of 4% for the l2fwd sample app in xdpsock. If we instead just look at the Tx part, this patch set increases throughput with above 20

Re: [PATCH v4 net-next 1/5] net: xdp: introduce bulking for xdp tx return path

2020-11-10 Thread Jesper Dangaard Brouer
On Fri, 6 Nov 2020 19:19:07 +0100 Lorenzo Bianconi wrote: > +void xdp_return_frame_bulk(struct xdp_frame *xdpf, > +struct xdp_frame_bulk *bq) > +{ > + struct xdp_mem_info *mem = &xdpf->mem; > + struct xdp_mem_allocator *xa; > + > + if (mem->type != MEM_TYPE_PA

Re: [PATCH 1/2] dccp: ccid: move timers to struct dccp_sock

2020-11-10 Thread Thadeu Lima de Souza Cascardo
On Mon, Nov 09, 2020 at 02:15:53PM -0800, Jakub Kicinski wrote: > On Mon, 9 Nov 2020 18:31:34 -0300 Thadeu Lima de Souza Cascardo wrote: > > > Which paths are those (my memory of this code is waning)? I thought > > > disconnect is only called from the user space side (shutdown syscall). > > > The o

Re: [PATCH] net/xdp: remove unused macro REG_STATE_NEW

2020-11-10 Thread Jesper Dangaard Brouer
On Mon, 09 Nov 2020 13:44:48 -0800 John Fastabend wrote: > Alex Shi wrote: > > > > > > 在 2020/11/7 上午12:13, Jesper Dangaard Brouer 写道: > > > Hmm... REG_STATE_NEW is zero, so it is implicitly set via memset zero. > > > But it is true that it is technically not directly used or referenced. > >

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-10 Thread Tom Parkin
On Mon, Nov 09, 2020 at 23:51:53 +0100, Guillaume Nault wrote: > > * I believe that the fact we're not explicitly locking anything in the > >ppp_input path for access to the channel bridge field is OK since: > > > > - ppp_input is called from the socket backlog recv > > > > - ppp

[PATCH] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-10 Thread xiakaixu1987
From: Kaixu Xia The unsigned variable datasec_id is assigned a return value from the call to check_pseudo_btf_id(), which may return negative error code. Fixes coccicheck warning: ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expression compared with zero: datasec_id > 0 Reported-by: T

Re: [RFC PATCH 1/2] ppp: add PPPIOCBRIDGECHAN ioctl

2020-11-10 Thread Tom Parkin
On Tue, Nov 10, 2020 at 00:24:01 +0100, Guillaume Nault wrote: > On Fri, Nov 06, 2020 at 06:16:46PM +, Tom Parkin wrote: > > + case PPPIOCBRIDGECHAN: > > + if (get_user(unit, p)) > > + break; > > + err = -ENXIO; > > +

Re: [net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-10 Thread Florian Westphal
Numan Siddique wrote: > On Tue, Nov 10, 2020 at 3:06 AM Florian Westphal wrote: > Thanks for the comments. I actually tried this approach first, but it > doesn't seem to work. > I noticed that for the committed connections, the ct tcp flag - > IP_CT_TCP_FLAG_BE_LIBERAL is > not set when nf_conntr

Re: [PATCH AUTOSEL 5.9 26/55] wireguard: selftests: check that route_me_harder packets use the right sk

2020-11-10 Thread Jason A. Donenfeld
Note that this requires https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=46d6c5ae953cc0be38efd0e469284df7c4328cf8 And that commit should be backported to every kernel ever, since the bug is so old.

net DIM (Dynamic interrupt moderation) queries

2020-11-10 Thread Manish Chopra
Hello Tal, I looked through the documentation but some of the things were not cleared, so I am looking for some fine details on this topic if you could help please - Q1- In general, can this feature be problematic or not useful if device only support time based moderation but does not suppo

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-10 Thread Tom Parkin
On Tue, Nov 10, 2020 at 10:28:34 +0100, Guillaume Nault wrote: > On Mon, Nov 09, 2020 at 03:52:37PM -0800, Jakub Kicinski wrote: > > On Fri, 6 Nov 2020 18:16:45 + Tom Parkin wrote: > > > This small RFC series implements a suggestion from Guillaume Nault in > > > response to my previous submis

[PATCH bpf-next] samples/bpf: add xdp_redirect_map with xdp_prog support

2020-11-10 Thread Hangbin Liu
This patch add running xdp program on egress interface support for xdp_redirect_map sample. The new prog will change the IP ttl based on egress ifindex. Signed-off-by: Hangbin Liu --- samples/bpf/xdp_redirect_map_kern.c | 74 - samples/bpf/xdp_redirect_map_user.c | 21

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-10 Thread Edward Cree
On 05/11/2020 14:05, Jamal Hadi Salim wrote: > On 2020-11-04 10:19 p.m., David Ahern wrote: > > [..] >> Similarly, it is not realistic or user friendly to *require* general >> Linux users to constantly chase latest versions of llvm, clang, dwarves, >> bcc, bpftool, libbpf, (I am sure I am missing m

Re: [net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-10 Thread Numan Siddique
On Tue, Nov 10, 2020 at 5:55 PM Florian Westphal wrote: > > Numan Siddique wrote: > > On Tue, Nov 10, 2020 at 3:06 AM Florian Westphal wrote: > > Thanks for the comments. I actually tried this approach first, but it > > doesn't seem to work. > > I noticed that for the committed connections, the

Re: [PATCH] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers

2020-11-10 Thread Vladimir Oltean
On Tue, Nov 10, 2020 at 10:13:25AM +0100, Tobias Waldekranz wrote: > Ethertype DSA encodes exactly the same information in the DSA tag as > the non-ethertype variety. So refactor out the common parts and reuse > them for both protocols. > > This is ensures tag parsing and generation as always cons

Re: [PATCH net-next] MAINTAINERS: Add entry for Hirschmann Hellcreek Switch Driver

2020-11-10 Thread Vladimir Oltean
On Tue, Nov 10, 2020 at 08:18:29AM +0100, Kurt Kanzenbach wrote: > Add myself to cover the Hirschmann Hellcreek TSN Ethernet Switch Driver. > > Suggested-by: Andrew Lunn > Signed-off-by: Kurt Kanzenbach > --- > MAINTAINERS | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/MAINT

Re: [PATCH] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-10 Thread Denis Kirjanov
On 11/10/20, xiakaixu1...@gmail.com wrote: > From: Kaixu Xia > > The unsigned variable datasec_id is assigned a return value from the call > to check_pseudo_btf_id(), which may return negative error code. > > Fixes coccicheck warning: > > ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expre

Re: [net-next] netfiler: conntrack: Add the option to set ct tcp flag - BE_LIBERAL per-ct basis.

2020-11-10 Thread Florian Westphal
Numan Siddique wrote: > On Tue, Nov 10, 2020 at 5:55 PM Florian Westphal wrote: > > > > Numan Siddique wrote: > > > On Tue, Nov 10, 2020 at 3:06 AM Florian Westphal wrote: > > > Thanks for the comments. I actually tried this approach first, but it > > > doesn't seem to work. > > > I noticed tha

Re: Subject: [RFC] clang tooling cleanups

2020-11-10 Thread Tom Rix
On 11/9/20 6:52 PM, Joe Perches wrote: > On Tue, 2020-10-27 at 09:42 -0700, t...@redhat.com wrote: >> This rfc will describe >> An upcoming treewide cleanup. >> How clang tooling was used to programatically do the clean up. >> Solicit opinions on how to generally use clang tooling. >> >> The clan

Re: [PATCH 10/10] dt-bindings: net: dsa: b53: Add YAML bindings

2020-11-10 Thread Kurt Kanzenbach
On Mon Nov 09 2020, Florian Fainelli wrote: > From: Kurt Kanzenbach > > Convert the b53 DSA device tree bindings to YAML in order to allow > for automatic checking and such. > > Suggested-by: Florian Fainelli > Signed-off-by: Kurt Kanzenbach > --- > .../devicetree/bindings/net/dsa/b53.txt

Re: [PATCH net] vrf: Fix fast path output packet handling with async Netfilter rules

2020-11-10 Thread Pablo Neira Ayuso
Hi Martin, Just a few nitpicks, see below. On Fri, Nov 06, 2020 at 08:30:30AM +0100, Martin Willi wrote: > VRF devices use an optimized direct path on output if a default qdisc > is involved, calling Netfilter hooks directly. This path, however, does > not consider Netfilter rules completing asyn

Re: [PATCH v22 16/23] LSM: security_secid_to_secctx in netlink netfilter

2020-11-10 Thread Pablo Neira Ayuso
Hi Casey, On Wed, Nov 04, 2020 at 04:49:17PM -0800, Casey Schaufler wrote: > Change netlink netfilter interfaces to use lsmcontext > pointers, and remove scaffolding. > > Reviewed-by: Kees Cook > Reviewed-by: John Johansen > Acked-by: Stephen Smalley > Signed-off-by: Casey Schaufler > Cc: net

Re: [PATCH] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers

2020-11-10 Thread Andrew Lunn
> @@ -7,8 +7,7 @@ dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o > obj-$(CONFIG_NET_DSA_TAG_8021Q) += tag_8021q.o > obj-$(CONFIG_NET_DSA_TAG_AR9331) += tag_ar9331.o > obj-$(CONFIG_NET_DSA_TAG_BRCM_COMMON) += tag_brcm.o > -obj-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o > -obj-$(CONFIG_NE

Re: [PATCH net-next] MAINTAINERS: Add entry for Hirschmann Hellcreek Switch Driver

2020-11-10 Thread Kurt Kanzenbach
On Tue Nov 10 2020, Vladimir Oltean wrote: > On Tue, Nov 10, 2020 at 08:18:29AM +0100, Kurt Kanzenbach wrote: >> Add myself to cover the Hirschmann Hellcreek TSN Ethernet Switch Driver. >> >> Suggested-by: Andrew Lunn >> Signed-off-by: Kurt Kanzenbach >> --- >> MAINTAINERS | 9 + >> 1 f

[PATCH] phy: phylink: Fix CuSFP issue in phylink

2020-11-10 Thread Bjarni Jonasson
There is an issue with the current phylink driver and CuSFPs which results in a callback to the phylink validate function without any advertisement capabilities. The workaround (in this changeset) is to assign capabilities if a 1000baseT SFP is identified. Signed-off-by: Bjarni Jonasson --- dri

[PATCH net v2] net: phy: spi_ks8995: Do not overwrite SPI mode flags

2020-11-10 Thread Sven Van Asbroeck
From: Sven Van Asbroeck This driver makes sure the underlying SPI bus is set to "mode 0" by assigning SPI_MODE_0 to spi->mode. Which overwrites all other SPI mode flags. In some circumstances, this can break the underlying SPI bus driver. For example, if SPI_CS_HIGH is set on the SPI bus, the dr

Re: [PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime

2020-11-10 Thread Jeff Dike
Hi Jakub, On 11/9/20 2:47 PM, Jakub Kicinski wrote: > This makes sense because mcast L2 addr is calculated, not discovered, > and therefore can be recreated at a very low cost, correct? Yes. > Perhaps it would make sense to widen the API to any "computed" address > rather than implicitly dependi

Re: [PATCH net V2] Exempt multicast addresses from five-second neighbor lifetime

2020-11-10 Thread Jeff Dike
Hi David, On 11/9/20 10:55 PM, David Ahern wrote: > ipv6_addr_type() and IPV6_ADDR_MULTICAST is the better way to code this. Thanks, will fix. Jeff

Re: [PATCH bpf-next] samples/bpf: add xdp_redirect_map with xdp_prog support

2020-11-10 Thread Jesper Dangaard Brouer
On Tue, 10 Nov 2020 20:46:39 +0800 Hangbin Liu wrote: > This patch add running xdp program on egress interface support for > xdp_redirect_map sample. The new prog will change the IP ttl based > on egress ifindex. > > Signed-off-by: Hangbin Liu > --- > samples/bpf/xdp_redirect_map_kern.c | 74 +

Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support

2020-11-10 Thread Christian Eggers
On Tuesday, 10 November 2020, 02:42:34 CET, Vladimir Oltean wrote: > Sorry for getting back late to you. It did not compute when I read your > email the first time around, then I let it sit for a while. > > On Thu, Nov 05, 2020 at 09:18:04PM +0100, Christian Eggers wrote: > > unfortunately I made

[PATCH net] cosa: Add missing kfree in error path of cosa_write

2020-11-10 Thread Wang Hai
If memory allocation for 'kbuf' succeed, cosa_write() doesn't have a corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/net/wan/cosa.c | 1 + 1 file

[PATCH RFC v3] ipvs: add genetlink cmd to dump all services and destinations

2020-11-10 Thread Cezar Sa Espinola
A common operation for userspace applications managing ipvs is to dump all services and all destinations and then sort out what needs to be done. Previously this could only be accomplished by issuing 1 netlink IPVS_CMD_GET_SERVICE dump command followed by N IPVS_CMD_GET_DEST dump commands. For a dy

Re: [PATCH v3 5/9] pinctrl: use krealloc_array()

2020-11-10 Thread Linus Walleij
On Mon, Nov 9, 2020 at 12:07 PM Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Use the helper that checks for overflows internally instead of manually > calculating the size of the new array. > > Signed-off-by: Bartosz Golaszewski > Reviewed-by: Andy Shevchenko Reviewed-by: Linus

Re: [PATCH RFC] SUNRPC: Use zero-copy to perform socket send operations

2020-11-10 Thread Chuck Lever
> On Nov 9, 2020, at 3:10 PM, Eric Dumazet wrote: > > > > On 11/9/20 8:31 PM, Chuck Lever wrote: >> >> >>> On Nov 9, 2020, at 1:16 PM, Trond Myklebust wrote: >>> >>> On Mon, 2020-11-09 at 12:36 -0500, Chuck Lever wrote: > On Nov 9, 2020, at 12:32 PM, Trond Myklebust < >>>

  1   2   3   4   >