Re: [PATCH net-next] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

2018-07-23 Thread Cong Wang
On Sun, Jul 22, 2018 at 12:29 AM Tariq Toukan wrote: > > > > On 19/07/2018 8:21 PM, Cong Wang wrote: > > On Thu, Jul 19, 2018 at 7:50 AM Tariq Toukan wrote: > >> --- a/net/core/dev_ioctl.c > >> +++ b/net/core/dev_ioctl.c > >> @@ -282,14 +282,7 @@ static int dev_ifsioc(struct net *net, struct

[PATCH net] sock: fix sg page frag coalescing in sk_alloc_sg

2018-07-23 Thread Daniel Borkmann
Current sg coalescing logic in sk_alloc_sg() (latter is used by tls and sockmap) is not quite correct in that we do fetch the previous sg entry, however the subsequent check whether the refilled page frag from the socket is still the same as from the last entry with prior offset and length

[net-next V2 05/12] net/mlx5: FW tracer, parse traces and kernel tracing support

2018-07-23 Thread Saeed Mahameed
From: Feras Daoud For each message the driver should do the following: 1- Find the message string in the strings database 2- Count the param number of each message 3- Wait for the param events and accumulate them 4- Calculate the event timestamp using the local event timestamp and the first

[net-next V2 06/12] net/mlx5: FW tracer, Enable tracing

2018-07-23 Thread Saeed Mahameed
From: Feras Daoud Add the tracer file to the makefile and add the init function to the load one flow. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../mellanox/mlx5/core/diag/fw_tracer.h| 2 +-

[net-next V2 09/12] net/mlx5e: Support offloading tc double vlan headers match

2018-07-23 Thread Saeed Mahameed
From: Jianbo Liu We can match on both outer and inner vlan tags, add support for offloading that. Signed-off-by: Jianbo Liu Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 55 ++- 1 file changed, 52 insertions(+), 3

[net-next V2 04/12] net/mlx5: FW tracer, events handling

2018-07-23 Thread Saeed Mahameed
From: Feras Daoud The tracer has one event, event 0x26, with two subtypes: - Subtype 0: Ownership change - Subtype 1: Traces available An ownership change occurs in the following cases: 1- Owner releases his ownership, in this case, an event will be sent to inform others to reattempt acquire

[net-next V2 07/12] net/mlx5: FW tracer, Add debug prints

2018-07-23 Thread Saeed Mahameed
Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/diag/fw_tracer.c| 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c index

[net-next V2 02/12] net/mlx5: FW tracer, create trace buffer and copy strings database

2018-07-23 Thread Saeed Mahameed
From: Feras Daoud For each PF do the following: 1- Allocate memory for the tracer strings database and read the strings from the FW to the SW. These strings will be used later for parsing traces. 2- Allocate and dma map tracer buffers. Traces that will be written into the buffer will be parsed

[net-next V2 01/12] net/mlx5: FW tracer, implement tracer logic

2018-07-23 Thread Saeed Mahameed
From: Feras Daoud Implement FW tracer logic and registers access, initialization and cleanup flows. Initializing the tracer will be part of load one flow, as multiple PFs will try to acquire ownership but only one will succeed and will be the tracer owner. Signed-off-by: Feras Daoud

[pull request][net-next V2 00/12] Mellanox, mlx5e updates 2018-07-18

2018-07-23 Thread Saeed Mahameed
Hi Dave, This series includes updates for mlx5e net device driver, with a couple of major features and some misc updates. Please notice the mlx5-next merge patch at the beginning: "Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux" For more information

[net-next V2 12/12] net/mlx5e: Use PARTIAL_GSO for UDP segmentation

2018-07-23 Thread Saeed Mahameed
From: Boris Pismenny This patch removes the splitting of UDP_GSO_L4 packets in the driver, and exposes UDP_GSO_L4 as a PARTIAL_GSO feature. Thus, the network stack is not responsible for splitting the packet into two. Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed ---

[net-next V2 08/12] net/mlx5e: Remove redundant WARN when we cannot find neigh entry

2018-07-23 Thread Saeed Mahameed
From: Roi Dayan It is possible for neigh entry not to exist if it was cleaned already. When we bring down an interface the neigh gets deleted but it could be that our listener for neigh event to clear the encap valid bit didn't start yet and the neigh update last used work is started first. In

[net-next V2 11/12] net/mlx5e: Support offloading double vlan push/pop tc actions

2018-07-23 Thread Saeed Mahameed
From: Jianbo Liu As we can configure two push/pop actions in one flow table entry, add support to offload those double vlan actions in a rule to HW. Signed-off-by: Jianbo Liu Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 46

[net-next V2 03/12] net/mlx5: FW tracer, register log buffer memory key

2018-07-23 Thread Saeed Mahameed
Create a memory key and protection domain for the tracer log buffer. Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 64 ++- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c

[PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Caleb Raitto
From: Caleb Raitto The driver disables tx napi if it's not certain that completions will be processed affine with tx service. Its heuristic doesn't account for some scenarios where it is, such as when the queue pair count matches the core but not hyperthread count. Allow userspace to override

[PATCH v2 net-next] net: phy: add helper phy_polling_mode

2018-07-23 Thread Heiner Kallweit
Add a helper for checking whether polling is used to detect PHY status changes. Signed-off-by: Heiner Kallweit --- v2: - merge both patches --- drivers/net/phy/phy.c | 8 include/linux/phy.h | 10 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v4 net-next 0/8] lan743x: Add features to lan743x driver

2018-07-23 Thread David Miller
From: Bryan Whitehead Date: Mon, 23 Jul 2018 16:16:25 -0400 > This patch series adds extra features to the lan743x driver. Series applied, thank you.

Re: [pull request][net 0/8] Mellanox, mlx5 fixes 2018-07-18

2018-07-23 Thread Saeed Mahameed
On Sat, 2018-07-21 at 10:20 -0700, David Miller wrote: > From: Saeed Mahameed > Date: Wed, 18 Jul 2018 18:26:04 -0700 > > > The following series provides fixes to mlx5 core and net device > > driver. > > > > Please pull and let me know if there's any problem. > > Pulled, thanks Saeed. > >

Re: [pull request][net-next 00/16] Mellanox, mlx5e updates 2018-07-18

2018-07-23 Thread Saeed Mahameed
On Wed, 2018-07-18 at 18:00 -0700, Saeed Mahameed wrote: > Hi dave, > > This series includes updates for mlx5e net device driver, with a > couple > of major features and some misc updates. > > Please notice the mlx5-next merge patch at the beginning: > "Merge branch 'mlx5-next' of >

[net-next V2 10/12] net/mlx5e: Refactor tc vlan push/pop actions offloading

2018-07-23 Thread Saeed Mahameed
From: Jianbo Liu Extract actions offloading code to a new function, and also extend data structures for double vlan actions. Signed-off-by: Jianbo Liu Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 51 ---

Re: [PATCH v5 net-next] net/sched: add skbprio scheduler

2018-07-23 Thread Cong Wang
On Mon, Jul 23, 2018 at 7:07 AM Nishanth Devarajan wrote: > > net/sched: add skbprio scheduler > > Skbprio (SKB Priority Queue) is a queueing discipline that prioritizes packets > according to their skb->priority field. Under congestion, already-enqueued > lower > priority packets will be

[PATCH net-next] tls: Fix improper revert in zerocopy_from_iter

2018-07-23 Thread Doron Roberts-Kedes
The current code is problematic because the iov_iter is reverted and never advanced in the non-error case. This patch skips the revert in the non-error case. This patch also fixes the amount by which the iov_iter is reverted. Currently, iov_iter is reverted by size, which can be greater than the

[PATCH net v2] ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull

2018-07-23 Thread Willem de Bruijn
From: Willem de Bruijn Syzbot reported a read beyond the end of the skb head when returning IPV6_ORIGDSTADDR: BUG: KMSAN: kernel-infoleak in put_cmsg+0x5ef/0x860 net/core/scm.c:242 CPU: 0 PID: 4501 Comm: syz-executor128 Not tainted 4.17.0+ #9 Hardware name: Google Google Compute

Re: [PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-23 Thread Jakub Kicinski
On Mon, 23 Jul 2018 11:39:36 +0200, Björn Töpel wrote: > Den fre 20 juli 2018 kl 22:08 skrev Jakub Kicinski: > > On Fri, 20 Jul 2018 10:18:21 -0700, Martin KaFai Lau wrote: > > > On Sat, Jul 21, 2018 at 01:04:45AM +0900, Taehee Yoo wrote: > > > > rhashtable_lookup() can return NULL. so that

Re: [PATCH net-next] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

2018-07-23 Thread David Miller
From: Cong Wang Date: Mon, 23 Jul 2018 13:37:22 -0700 > On Sun, Jul 22, 2018 at 12:29 AM Tariq Toukan wrote: >> >> >> >> On 19/07/2018 8:21 PM, Cong Wang wrote: >> > On Thu, Jul 19, 2018 at 7:50 AM Tariq Toukan wrote: >> >> --- a/net/core/dev_ioctl.c >> >> +++ b/net/core/dev_ioctl.c >> >> @@

Re: [PATCH net-next 1/2] net: phy: add helper phy_polling_mode

2018-07-23 Thread Heiner Kallweit
On 22.07.2018 20:11, David Miller wrote: > > I think you can combine these two patches into one. > > Thank you. > Sure, will provide a v2.

[PATCH v4 net-next 8/8] lan743x: Add RSS support

2018-07-23 Thread Bryan Whitehead
Implement RSS support Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 132 +++ drivers/net/ethernet/microchip/lan743x_main.c| 20 drivers/net/ethernet/microchip/lan743x_main.h| 19 3 files changed, 171 insertions(+)

[PATCH v4 net-next 5/8] lan743x: Add support for ethtool eeprom access

2018-07-23 Thread Bryan Whitehead
Implement ethtool eeprom access Also provides access to OTP (One Time Programming) Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 209 +++ drivers/net/ethernet/microchip/lan743x_main.h| 33 2 files

[PATCH v4 net-next 1/8] lan743x: Add support for ethtool get_drvinfo

2018-07-23 Thread Bryan Whitehead
Implement ethtool get_drvinfo Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/Makefile | 2 +- drivers/net/ethernet/microchip/lan743x_ethtool.c | 21 + drivers/net/ethernet/microchip/lan743x_ethtool.h | 11 +++

[PATCH v4 net-next 4/8] lan743x: Add support for ethtool message level

2018-07-23 Thread Bryan Whitehead
Implement ethtool message level Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c

[PATCH v4 net-next 0/8] lan743x: Add features to lan743x driver

2018-07-23 Thread Bryan Whitehead
This patch series adds extra features to the lan743x driver. Updates for v4: Patch 6/8 - Modified get/set_wol to use super set of MAC and PHY driver support. Patch 7/9 - In set_eee, return the return value from phy_ethtool_set_eee. Updates for v3: Removed patch 9 from this series,

[PATCH v4 net-next 3/8] lan743x: Add support for ethtool statistics

2018-07-23 Thread Bryan Whitehead
Implement ethtool statistics Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 180 +++ drivers/net/ethernet/microchip/lan743x_main.c| 6 +- drivers/net/ethernet/microchip/lan743x_main.h| 31 3

[PATCH v4 net-next 7/8] lan743x: Add EEE support

2018-07-23 Thread Bryan Whitehead
Implement EEE support Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 85 drivers/net/ethernet/microchip/lan743x_main.h| 3 + 2 files changed, 88 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c

[PATCH v4 net-next 6/8] lan743x: Add power management support

2018-07-23 Thread Bryan Whitehead
Implement power management Supports suspend, resume, and Wake on LAN Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 47 ++ drivers/net/ethernet/microchip/lan743x_main.c| 176 +++ drivers/net/ethernet/microchip/lan743x_main.h

[PATCH v4 net-next 2/8] lan743x: Add support for ethtool link settings

2018-07-23 Thread Bryan Whitehead
Use default link setting functions Signed-off-by: Bryan Whitehead Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c

Re: [PATCH iproute2] devlink: CTRL_ATTR_FAMILY_ID is a u16

2018-07-23 Thread Stephen Hemminger
On Fri, 20 Jul 2018 09:35:26 -0700 dsah...@kernel.org wrote: > From: David Ahern > > CTRL_ATTR_FAMILY_ID is a u16, not a u32. Update devlink accordingly. > > Fixes: a3c4b484a1edd ("add devlink tool") > Signed-off-by: David Ahern Applied

Re: [PATCH mlx5-next v2 1/8] net/mlx5: Add forward compatible support for the FTE match data

2018-07-23 Thread Saeed Mahameed
On Mon, 2018-07-23 at 15:25 +0300, Leon Romanovsky wrote: > From: Yishai Hadas > > Use the PRM size including the reserved when working with the FTE > match data. > > This comes to support forward compatibility for cases that current > reserved data will be exposed by the firmware by an

Re: [PATCH mlx5-next v2 2/8] net/mlx5: Add support for flow table destination number

2018-07-23 Thread Saeed Mahameed
On Mon, 2018-07-23 at 15:25 +0300, Leon Romanovsky wrote: > From: Yishai Hadas > > Add support to set a destination from a flow table number. > This functionality will be used in downstream patches from this > series by the DEVX stuff. > > Signed-off-by: Yishai Hadas > Signed-off-by: Leon

Re: [PATCH net-next 3/4] net/tc: introduce TC_ACT_MIRRED.

2018-07-23 Thread Cong Wang
On Fri, Jul 20, 2018 at 2:54 AM Paolo Abeni wrote: > > Hi, > > Jiri, Cong, thank you for the feedback. Please allow me to give a > single reply to both of you, as you rised similar concers. > > On Thu, 2018-07-19 at 11:07 -0700, Cong Wang wrote: > > On Thu, Jul 19, 2018 at 6:03 AM Paolo Abeni

Re: [patch net-next v4 00/12] sched: introduce chain templates support with offloading to mlxsw

2018-07-23 Thread Jakub Kicinski
On Mon, 23 Jul 2018 09:23:03 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > For the TC clsact offload these days, some of HW drivers need > to hold a magic ball. The reason is, with the first inserted rule inside > HW they need to guess what fields will be used for the matching. If > later on

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-23 Thread David Ahern
On 7/20/18 1:03 PM, D'Souza, Nelson wrote: > Setup is as follows: > > ethUSB(ingress port) -> mgmtbr0 (bridge) -> mgmtvrf (vrf) | netns foo [ test-vrf ]| | | [ br0 ] 172.16.1.1 | | | [ veth1 ]

Re: [PATCH bpf] bpf: btf: Ensure the member->offset is in the right order

2018-07-23 Thread Daniel Borkmann
On 07/23/2018 08:45 PM, Yonghong Song wrote: > On 7/20/18 5:38 PM, Martin KaFai Lau wrote: >> This patch ensures the member->offset of a struct >> is in the correct order (i.e the later member's offset cannot >> go backward). >> >> The current "pahole -J" BTF encoder does not generate something >>

Re: [net-next v5 3/3] net/tls: Remove redundant array allocation.

2018-07-23 Thread Dave Watson
On 07/21/18 07:25 PM, David Miller wrote: > From: Vakul Garg > Date: Thu, 19 Jul 2018 21:56:13 +0530 > > > In function decrypt_skb(), array allocation in case when sgout is NULL > > is unnecessary. Instead, local variable sgin_arr[] can be used. > > > > Signed-off-by: Vakul Garg > > Hmmm... >

Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary

2018-07-23 Thread David Miller
From: Wei Wang Date: Sat, 21 Jul 2018 20:56:32 -0700 > From: Wei Wang > > In the code path where only rcu read lock is held, e.g. in the route > lookup code path, it is not safe to directly call fib6_info_hold() > because the fib6_info may already have been deleted but still exists > in the

Re: [PATCH bpf] bpf: btf: Ensure the member->offset is in the right order

2018-07-23 Thread Yonghong Song
On 7/20/18 5:38 PM, Martin KaFai Lau wrote: This patch ensures the member->offset of a struct is in the correct order (i.e the later member's offset cannot go backward). The current "pahole -J" BTF encoder does not generate something like this. However, checking this can ensure future

Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary

2018-07-23 Thread Martin KaFai Lau
On Sat, Jul 21, 2018 at 08:56:32PM -0700, Wei Wang wrote: > From: Wei Wang > > In the code path where only rcu read lock is held, e.g. in the route > lookup code path, it is not safe to directly call fib6_info_hold() > because the fib6_info may already have been deleted but still exists > in the

Re: [PATCH v2 bpf 2/3] bpf: Replace [u]int32_t and [u]int64_t in libbpf

2018-07-23 Thread Martin KaFai Lau
On Mon, Jul 23, 2018 at 11:04:34AM -0700, Yonghong Song wrote: > > > On 7/21/18 11:20 AM, Martin KaFai Lau wrote: > > This patch replaces [u]int32_t and [u]int64_t usage with > > __[su]32 and __[su]64. The same change goes for [u]int16_t > > and [u]int8_t. > > > > Fixes: 8a138aed4a80 ("bpf:

Re: [PATCH v2 bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-23 Thread Martin KaFai Lau
On Mon, Jul 23, 2018 at 11:31:43AM -0700, Yonghong Song wrote: > > > On 7/21/18 11:20 AM, Martin KaFai Lau wrote: > > This patch introduces BPF_ANNOTATE_KV_PAIR to signal the > > bpf loader about the btf key_type and value_type of a bpf map. > > Please refer to the changes in test_btf_haskv.c

Have you read my previous message

2018-07-23 Thread Lisa Jaster

Re: [PATCH net] ip: hash fragments consistently

2018-07-23 Thread Eric Dumazet
On 07/23/2018 07:50 AM, Paolo Abeni wrote: > The skb hash for locally generated ip[v6] fragments belonging > to the same datagram can vary in several circumstances: > * for connected UDP[v6] sockets, the first fragment get its hash > via set_owner_w()/skb_set_hash_from_sk() > * for

Re: [PATCH v2 bpf 3/3] bpf: Introduce BPF_ANNOTATE_KV_PAIR

2018-07-23 Thread Yonghong Song
On 7/21/18 11:20 AM, Martin KaFai Lau wrote: This patch introduces BPF_ANNOTATE_KV_PAIR to signal the bpf loader about the btf key_type and value_type of a bpf map. Please refer to the changes in test_btf_haskv.c for its usage. Both iproute2 and libbpf loader will then have the same

Re: [PATCH net] ip: hash fragments consistently

2018-07-23 Thread David Miller
From: Paolo Abeni Date: Mon, 23 Jul 2018 16:50:48 +0200 > The skb hash for locally generated ip[v6] fragments belonging > to the same datagram can vary in several circumstances: > * for connected UDP[v6] sockets, the first fragment get its hash > via set_owner_w()/skb_set_hash_from_sk() > *

[PATCH net 4/5] tcp: call tcp_drop() from tcp_data_queue_ofo()

2018-07-23 Thread Eric Dumazet
In order to be able to give better diagnostics and detect malicious traffic, we need to have better sk->sk_drops tracking. Fixes: 9f5afeae5152 ("tcp: use an RB tree for ooo receive queue") Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng ---

[PATCH net 5/5] tcp: add tcp_ooo_try_coalesce() helper

2018-07-23 Thread Eric Dumazet
In case skb in out_or_order_queue is the result of multiple skbs coalescing, we would like to get a proper gso_segs counter tracking, so that future tcp_drop() can report an accurate number. I chose to not implement this tracking for skbs in receive queue, since they are not dropped, unless

[PATCH net 2/5] tcp: avoid collapses in tcp_prune_queue() if possible

2018-07-23 Thread Eric Dumazet
Right after a TCP flow is created, receiving tiny out of order packets allways hit the condition : if (atomic_read(>sk_rmem_alloc) >= sk->sk_rcvbuf) tcp_clamp_window(sk); tcp_clamp_window() increases sk_rcvbuf to match sk_rmem_alloc (guarded by tcp_rmem[2]) Calling

[PATCH net 3/5] tcp: detect malicious patterns in tcp_collapse_ofo_queue()

2018-07-23 Thread Eric Dumazet
In case an attacker feeds tiny packets completely out of order, tcp_collapse_ofo_queue() might scan the whole rb-tree, performing expensive copies, but not changing socket memory usage at all. 1) Do not attempt to collapse tiny skbs. 2) Add logic to exit early when too many tiny skbs are

[PATCH net 1/5] tcp: free batches of packets in tcp_prune_ofo_queue()

2018-07-23 Thread Eric Dumazet
Juha-Matti Tilli reported that malicious peers could inject tiny packets in out_of_order_queue, forcing very expensive calls to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for every incoming packet. out_of_order_queue rb-tree can contain thousands of nodes, iterating over all of them is not

[PATCH net 0/5] tcp: more robust ooo handling

2018-07-23 Thread Eric Dumazet
Juha-Matti Tilli reported that malicious peers could inject tiny packets in out_of_order_queue, forcing very expensive calls to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for every incoming packet. With tcp_rmem[2] default of 6MB, the ooo queue could contain ~7000 nodes. This patch

Re: [patch net-next v4 00/12] sched: introduce chain templates support with offloading to mlxsw

2018-07-23 Thread David Miller
From: Jiri Pirko Date: Mon, 23 Jul 2018 09:23:03 +0200 > For the TC clsact offload these days, some of HW drivers need > to hold a magic ball. The reason is, with the first inserted rule inside > HW they need to guess what fields will be used for the matching. If > later on this guess proves to

Re: [PATCH v2 bpf 2/3] bpf: Replace [u]int32_t and [u]int64_t in libbpf

2018-07-23 Thread Yonghong Song
On 7/21/18 11:20 AM, Martin KaFai Lau wrote: This patch replaces [u]int32_t and [u]int64_t usage with __[su]32 and __[su]64. The same change goes for [u]int16_t and [u]int8_t. Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf") Signed-off-by: Martin KaFai Lau ---

Re: [PATCH net-next 1/2] be2net: Collect the transmit queue data in Tx timeout

2018-07-23 Thread David Miller
From: Suresh Reddy Date: Mon, 23 Jul 2018 10:25:23 -0400 > Driver dumps tx_queue, tx_compl, pending SKBs information in tx_timeout. > This debug data used to idenfiy the cause of the time out. > > Also reset Lancer chip in tx_timeout. > > Signed-off-by: Suresh Reddy The purpose of the tx

Re: [PATCH net-next] selftests: forwarding: gre_multipath: Drop IPv6 tests

2018-07-23 Thread David Miller
From: Petr Machata Date: Mon, 23 Jul 2018 12:33:08 +0200 > Support for device-only IPv6 multipath next hops was dropped in > commit 33bd5ac54dc4 ("net/ipv6: Revert attempt to simplify route replace > and append") and as of commit b5d2d75e079a ("net/ipv6: Do not allow > device only routes via the

Re: [PATCH v4 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-23 Thread Santosh Shilimkar
On 7/23/2018 7:16 AM, Ka-Cheong Poon wrote: This patch changes the internal representation of an IP address to use struct in6_addr. IPv4 address is stored as an IPv4 mapped address. All the functions which take an IP address as argument are also changed to use struct in6_addr. But RDS socket

Re: [PATCH v4 net-next 3/3] rds: Extend RDS API for IPv6 support

2018-07-23 Thread Santosh Shilimkar
On 7/23/2018 7:16 AM, Ka-Cheong Poon wrote: There are many data structures (RDS socket options) used by RDS apps which use a 32 bit integer to store IP address. To support IPv6, struct in6_addr needs to be used. To ensure backward compatibility, a new data structure is introduced for each of

Re: [PATCH v4 net-next 2/3] rds: Enable RDS IPv6 support

2018-07-23 Thread Santosh Shilimkar
On 7/23/2018 7:16 AM, Ka-Cheong Poon wrote: This patch enables RDS to use IPv6 addresses. For RDS/TCP, the listener is now an IPv6 endpoint which accepts both IPv4 and IPv6 connection requests. RDS/RDMA/IB uses a private data (struct rds_ib_connect_private) exchange between endpoints at RDS

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-23 Thread David Ahern
On 7/23/18 5:51 AM, Xin Long wrote: > +ping_ipv4() > +{ > + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 > + > + bc_forwarding_disable > + ping_test_from $h1 198.51.100.255 192.0.2.1 > + ping_test_from $h1 198.51.200.255 192.0.2.1 > + ping_test_from $h1 192.0.2.255

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-23 Thread Max Gurtovoy
On 7/23/2018 7:49 PM, Jason Gunthorpe wrote: On Fri, Jul 20, 2018 at 04:25:32AM +0300, Max Gurtovoy wrote: [ 2032.194376] nvme nvme0: failed to connect queue: 9 ret=-18 queue 9 is not mapped (overlap). please try the bellow: This seems to work.  Here are three mapping cases:  each

Re: [PATCH v2 bpf 1/3] bpf: btf: Sync uapi btf.h to tools

2018-07-23 Thread Yonghong Song
On 7/21/18 11:20 AM, Martin KaFai Lau wrote: This patch sync the uapi btf.h to tools/ Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 2 +- 1 file changed, 1

Re: pull-request: can 2018-07-23

2018-07-23 Thread David Miller
From: Marc Kleine-Budde Date: Mon, 23 Jul 2018 14:58:31 +0200 > this is a pull request of 12 patches for net/master. > > The patch by Stephane Grosjean for the peak_canfd CAN driver fixes a problem > with older firmware. The next patch is by Roman Fietze and fixes the setup of > the CCCR

Re: [PATCH v4 net-next 2/3] rds: Enable RDS IPv6 support

2018-07-23 Thread David Miller
From: Ka-Cheong Poon Date: Mon, 23 Jul 2018 07:16:11 -0700 > @@ -163,15 +165,29 @@ int rds_tcp_accept_one(struct socket *sock) > > inet = inet_sk(new_sock->sk); > > + my_addr = _sock->sk->sk_v6_rcv_saddr; > + peer_addr = _sock->sk->sk_v6_daddr, > rdsdebug("accepted tcp

Re: [PATCH net 0/5] tcp: more robust ooo handling

2018-07-23 Thread David Miller
From: Eric Dumazet Date: Mon, 23 Jul 2018 09:28:16 -0700 > Juha-Matti Tilli reported that malicious peers could inject tiny > packets in out_of_order_queue, forcing very expensive calls > to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for > every incoming packet. > > With tcp_rmem[2]

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-23 Thread Jason Gunthorpe
On Fri, Jul 20, 2018 at 04:25:32AM +0300, Max Gurtovoy wrote: > > >>>[ 2032.194376] nvme nvme0: failed to connect queue: 9 ret=-18 > >> > >>queue 9 is not mapped (overlap). > >>please try the bellow: > >> > > > >This seems to work.  Here are three mapping cases:  each vector on its > >own cpu,

Re: [PATCH 1/4] MIPS: lantiq: Do not enable IRQs in dma open

2018-07-23 Thread David Miller
From: Hauke Mehrtens Date: Tue, 24 Jul 2018 07:32:27 +0200 > > > On 07/24/2018 02:19 AM, Paul Burton wrote: >> Hi Hauke, >> >> On Sat, Jul 21, 2018 at 09:13:55PM +0200, Hauke Mehrtens wrote: >>> When a DMA channel is opened the IRQ should not get activated >>> automatically, this allows it to

[PATCH net-next] cbs: Add support for the graft function

2018-07-23 Thread Vinicius Costa Gomes
This will allow to install a child qdisc under cbs. The main use case is to install ETF (Earliest TxTime First) qdisc under cbs, so there's another level of control for time-sensitive traffic. Signed-off-by: Vinicius Costa Gomes --- net/sched/sch_cbs.c | 134

Re: [PATCH v3 bpf-next 3/8] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-23 Thread Jakub Kicinski
On Mon, 23 Jul 2018 00:13:03 +0900, Toshiaki Makita wrote: > From: Toshiaki Makita > > All oversized packets including GSO packets are dropped if XDP is > enabled on receiver side, so don't send such packets from peer. > > Drop TSO and SCTP fragmentation features so that veth devices themselves

Re: [PATCH v3 bpf-next 5/8] veth: Add ndo_xdp_xmit

2018-07-23 Thread Toshiaki Makita
On 2018/07/24 10:02, Jakub Kicinski wrote: > On Mon, 23 Jul 2018 00:13:05 +0900, Toshiaki Makita wrote: >> From: Toshiaki Makita >> >> This allows NIC's XDP to redirect packets to veth. The destination veth >> device enqueues redirected packets to the napi ring of its peer, then >> they are

Re: [PATCH v4 net-next 2/3] rds: Enable RDS IPv6 support

2018-07-23 Thread David Miller
From: Ka-Cheong Poon Date: Tue, 24 Jul 2018 11:18:24 +0800 > On 07/24/2018 02:15 AM, David Miller wrote: >> From: Ka-Cheong Poon >> Date: Mon, 23 Jul 2018 07:16:11 -0700 >> >>> @@ -163,15 +165,29 @@ int rds_tcp_accept_one(struct socket *sock) >>> inet = inet_sk(new_sock->sk); >>>

Re: [PATCH v5 net-next 0/3] rds: IPv6 support

2018-07-23 Thread David Miller
From: Ka-Cheong Poon Date: Mon, 23 Jul 2018 20:51:20 -0700 > This patch set adds IPv6 support to the kernel RDS and related > modules. Series applied.

Re: [PATCH 1/4] MIPS: lantiq: Do not enable IRQs in dma open

2018-07-23 Thread Hauke Mehrtens
On 07/24/2018 02:19 AM, Paul Burton wrote: > Hi Hauke, > > On Sat, Jul 21, 2018 at 09:13:55PM +0200, Hauke Mehrtens wrote: >> When a DMA channel is opened the IRQ should not get activated >> automatically, this allows it to pull data out manually without the help >> of interrupts. This is

Re: [PATCH rdma-next v2 0/8] Support mlx5 flow steering with RAW data

2018-07-23 Thread Leon Romanovsky
On Mon, Jul 23, 2018 at 08:42:36PM -0600, Jason Gunthorpe wrote: > On Mon, Jul 23, 2018 at 03:25:04PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog: > > v1->v2: > > * Fix matcher to use the correct size. > > * Rephrase commit log of the first patch. > > v0->v1: > >

[PATCH net-next] net/tls: Do not call msg_data_left() twice

2018-07-23 Thread Vakul Garg
In function tls_sw_sendmsg(), msg_data_left() needs to be called only once. The second invocation of msg_data_left() for assigning variable try_to_copy can be removed and merged with the first one. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v3 bpf-next 5/8] veth: Add ndo_xdp_xmit

2018-07-23 Thread kbuild test robot
Hi Toshiaki, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Toshiaki-Makita/veth-Driver-XDP/20180724-065517 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config:

Re: [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver

2018-07-23 Thread Paul Burton
Hi Hauke, On Sat, Jul 21, 2018 at 09:13:57PM +0200, Hauke Mehrtens wrote: > diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c > index e0af39b33e28..c704312ef7d5 100644 > --- a/arch/mips/lantiq/xway/sysctrl.c > +++ b/arch/mips/lantiq/xway/sysctrl.c > @@ -536,7 +536,7

Re: [PATCH v3 bpf-next 5/8] veth: Add ndo_xdp_xmit

2018-07-23 Thread kbuild test robot
Hi Toshiaki, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Toshiaki-Makita/veth-Driver-XDP/20180724-065517 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Stephen Hemminger
On Mon, 23 Jul 2018 16:11:19 -0700 Caleb Raitto wrote: > From: Caleb Raitto > > The driver disables tx napi if it's not certain that completions will > be processed affine with tx service. > > Its heuristic doesn't account for some scenarios where it is, such as > when the queue pair count

Re: [PATCH v3 bpf-next 6/8] xdp: Add a flag for disabling napi_direct of xdp_return_frame in xdp_mem_info

2018-07-23 Thread Jakub Kicinski
On Mon, 23 Jul 2018 00:13:06 +0900, Toshiaki Makita wrote: > From: Toshiaki Makita > > We need some mechanism to disable napi_direct on calling > xdp_return_frame_rx_napi() from some context. > When veth gets support of XDP_REDIRECT, it will redirects packets which > are redirected from other

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-23 Thread Willem de Bruijn
On Mon, Jul 23, 2018 at 8:55 PM Stephen Hemminger wrote: > > On Mon, 23 Jul 2018 16:11:19 -0700 > Caleb Raitto wrote: > > > From: Caleb Raitto > > > > The driver disables tx napi if it's not certain that completions will > > be processed affine with tx service. > > > > Its heuristic doesn't

Re: [PATCH v3 bpf-next 2/8] veth: Add driver XDP

2018-07-23 Thread Toshiaki Makita
Hi Jakub, Thanks for reviewing! On 2018/07/24 9:23, Jakub Kicinski wrote: > On Mon, 23 Jul 2018 00:13:02 +0900, Toshiaki Makita wrote: >> From: Toshiaki Makita >> >> This is the basic implementation of veth driver XDP. >> >> Incoming packets are sent from the peer veth device in the form of

Re: [PATCH net-next] tcp: ack immediately when a cwr packet arrives

2018-07-23 Thread Neal Cardwell
On Mon, Jul 23, 2018 at 8:49 PM Lawrence Brakmo wrote: > > We observed high 99 and 99.9% latencies when doing RPCs with DCTCP. The > problem is triggered when the last packet of a request arrives CE > marked. The reply will carry the ECE mark causing TCP to shrink its cwnd > to 1 (because there

Re: [PATCH rdma-next v2 0/8] Support mlx5 flow steering with RAW data

2018-07-23 Thread Jason Gunthorpe
On Mon, Jul 23, 2018 at 03:25:04PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v1->v2: > * Fix matcher to use the correct size. > * Rephrase commit log of the first patch. > v0->v1: > * Fixed ADD_UVERBS_ATTRIBUTES_SIMPLE macro to pass the real address. > ?*

Re: [PATCH v3 bpf-next 6/8] xdp: Add a flag for disabling napi_direct of xdp_return_frame in xdp_mem_info

2018-07-23 Thread Toshiaki Makita
On 2018/07/24 12:38, Jakub Kicinski wrote: > On Tue, 24 Jul 2018 11:43:11 +0900, Toshiaki Makita wrote: >> On 2018/07/24 10:22, Jakub Kicinski wrote: >>> On Mon, 23 Jul 2018 00:13:06 +0900, Toshiaki Makita wrote: From: Toshiaki Makita We need some mechanism to disable napi_direct

Re: [PATCH net] sock: fix sg page frag coalescing in sk_alloc_sg

2018-07-23 Thread David Miller
From: Daniel Borkmann Date: Mon, 23 Jul 2018 22:37:54 +0200 > Current sg coalescing logic in sk_alloc_sg() (latter is used by tls and > sockmap) is not quite correct in that we do fetch the previous sg entry, > however the subsequent check whether the refilled page frag from the > socket is

[net-next v6 1/2] net/tls: Use socket data_ready callback on record availability

2018-07-23 Thread Vakul Garg
On receipt of a complete tls record, use socket's saved data_ready callback instead of state_change callback. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 0c2d029c9d4c..fee1240eff92

[net-next v6 2/2] net/tls: Remove redundant variable assignments and wakeup

2018-07-23 Thread Vakul Garg
In function decrypt_skb_update(), the assignment to tls receive context variable 'decrypted' is redundant as the same is being done in function tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as

RE: [PATCH net-next] tls: Fix improper revert in zerocopy_from_iter

2018-07-23 Thread Vakul Garg
> -Original Message- > From: Doron Roberts-Kedes [mailto:doro...@fb.com] > Sent: Tuesday, July 24, 2018 3:50 AM > To: David S . Miller > Cc: Dave Watson ; Vakul Garg > ; Matt Mullins ; > netdev@vger.kernel.org; Doron Roberts-Kedes > Subject: [PATCH net-next] tls: Fix improper revert

Re: [PATCH v3 bpf-next 3/8] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-23 Thread Toshiaki Makita
On 2018/07/24 9:27, Jakub Kicinski wrote: > On Mon, 23 Jul 2018 00:13:03 +0900, Toshiaki Makita wrote: >> From: Toshiaki Makita >> >> All oversized packets including GSO packets are dropped if XDP is >> enabled on receiver side, so don't send such packets from peer. >> >> Drop TSO and SCTP

Re: [PATCH net-next] tcp: ack immediately when a cwr packet arrives

2018-07-23 Thread Daniel Borkmann
On 07/24/2018 04:15 AM, Neal Cardwell wrote: > On Mon, Jul 23, 2018 at 8:49 PM Lawrence Brakmo wrote: >> >> We observed high 99 and 99.9% latencies when doing RPCs with DCTCP. The >> problem is triggered when the last packet of a request arrives CE >> marked. The reply will carry the ECE mark

Re: [PATCH v3 bpf-next 6/8] xdp: Add a flag for disabling napi_direct of xdp_return_frame in xdp_mem_info

2018-07-23 Thread Toshiaki Makita
On 2018/07/24 10:22, Jakub Kicinski wrote: > On Mon, 23 Jul 2018 00:13:06 +0900, Toshiaki Makita wrote: >> From: Toshiaki Makita >> >> We need some mechanism to disable napi_direct on calling >> xdp_return_frame_rx_napi() from some context. >> When veth gets support of XDP_REDIRECT, it will

Re: [PATCH 3/4] net: lantiq: Add Lantiq / Intel vrx200 Ethernet driver

2018-07-23 Thread Hauke Mehrtens
Hi Paul, On 07/24/2018 02:34 AM, Paul Burton wrote: > Hi Hauke, > > On Sat, Jul 21, 2018 at 09:13:57PM +0200, Hauke Mehrtens wrote: >> diff --git a/arch/mips/lantiq/xway/sysctrl.c >> b/arch/mips/lantiq/xway/sysctrl.c >> index e0af39b33e28..c704312ef7d5 100644 >> ---

Re: [pull request][net-next V2 00/12] Mellanox, mlx5e updates 2018-07-18

2018-07-23 Thread David Miller
From: Saeed Mahameed Date: Mon, 23 Jul 2018 15:11:17 -0700 > This series includes updates for mlx5e net device driver, with a couple > of major features and some misc updates. > > Please notice the mlx5-next merge patch at the beginning: > "Merge branch 'mlx5-next' of >

  1   2   >