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

2018-07-23 Thread Paolo Abeni
Hi, On Mon, 2018-07-23 at 14:12 -0700, Cong Wang wrote: > On Fri, Jul 20, 2018 at 2:54 AM Paolo Abeni wrote: > > Note this is what already happens with TC_ACT_REDIRECT: currently the > > user space uses it freely, even if only {cls,act}_bpf can return such > > value in a meaningful way, and only

[PATCH net-next] net/tls: Removed redundant checks for non-NULL

2018-07-23 Thread Vakul Garg
Removed checks against non-NULL before calling kfree_skb() and crypto_free_aead(). These functions are safe to be called with NULL as an argument. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tl

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 deletion

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

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 neede

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 >> --- a/arch/mips/lantiq/xway/sysct

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 in

[net-next v6 0/2] Minor code cleanup patches

2018-07-23 Thread Vakul Garg
This patch series improves tls_sw.c code by: 1) Using correct socket callback for flagging data availability. 2) Removing redundant variable assignments and wakeup callbacks. Vakul Garg (2): net/tls: Use socket data_ready callback on record availability net/tls: Remove redundant variable ass

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

[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: [net-next v5 3/3] net/tls: Remove redundant array allocation.

2018-07-23 Thread David Miller
From: Vakul Garg Date: Tue, 24 Jul 2018 04:43:55 + > Can you still apply the rest of two patches in the series or do I > need to send them again separately? When a change of any kind needs to be made to a patch series, you must always resubmit the entire series. Thank you.

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

2018-07-23 Thread Vakul Garg
Hi Dave Can you still apply the rest of two patches in the series or do I need to send them again separately? Regards Vakul From: netdev-ow...@vger.kernel.org on behalf of David Miller Sent: Tuesday, July 24, 2018 10:11:09 AM To: davejwat...@fb.com Cc: Vaku

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

2018-07-23 Thread David Miller
From: Dave Watson Date: Mon, 23 Jul 2018 09:35:09 -0700 > I don't think this patch is safe as-is. sgin_arr is a stack array of > size MAX_SKB_FRAGS (+ overhead), while my read of skb_cow_data is that > it walks the whole chain of skbs from skb->next, and can return any > number of segments. The

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 still

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 v5 net-next 2/3] rds: Enable RDS IPv6 support

2018-07-23 Thread santosh.shilim...@oracle.com
On 7/23/18 8:51 PM, 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 connec

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

2018-07-23 Thread santosh.shilim...@oracle.com
On 7/23/18 8:51 PM, 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 those

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

2018-07-23 Thread santosh.shilim...@oracle.com
On 7/23/18 8:51 PM, 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 laye

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

2018-07-23 Thread David Miller
Hello, Since you have not fundamentally changed the code, just made a build failure fix, would you please retain the ACKs that the previous version received? I either have to apply this as-is without the ACKs, or wait and see if that person does the ACKs again for you. Thank you.

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

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

2018-07-23 Thread Ka-Cheong Poon
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 connection establishment time to support RDMA. Thi

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

2018-07-23 Thread Ka-Cheong Poon
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 layer is not modified such that it still does no

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

2018-07-23 Thread Ka-Cheong Poon
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 those data structures which use a 32 bit integer t

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

2018-07-23 Thread Ka-Cheong Poon
This patch set adds IPv6 support to the kernel RDS and related modules. Existing RDS apps using IPv4 address continue to run without any problem. New RDS apps which want to use IPv6 address can do so by passing the address in struct sockaddr_in6 to bind(), connect() or sendmsg(). And those apps

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 b

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 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 on calling > >> xdp_return_frame_rx_napi() fro

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

2018-07-23 Thread Ka-Cheong Poon
On 07/24/2018 11:20 AM, David Miller wrote: 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 = ine

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 > git://git.kernel.org/pub

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 v4 net-next 2/3] rds: Enable RDS IPv6 support

2018-07-23 Thread Ka-Cheong Poon
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); + my_addr = &new_sock->sk->sk_v6_rcv_saddr; + peer_addr = &new_sock->sk->sk_v6_

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 redire

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. > ?* Replaced

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 proces

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 caus

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 ar

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 proces

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

2018-07-23 Thread Toshiaki Makita
On 2018/07/24 9:19, kbuild test robot wrote: > 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.o

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 fragmen

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

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

2018-07-23 Thread D'Souza, Nelson
Hi David, I copy and pasted the configs onto my device, but pings on test-vrf do not work in my setup. I'm essentially seeing the same issue as I reported before. In this case, pings sent out on test-vrf (host ns) are received and replied to by the loopback interface (foo ns). Although the rep

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 acco

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 dev

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

2018-07-23 Thread Jakub Kicinski
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 processed by XDP on its peer veth device. > This can be

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 mat

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

2018-07-23 Thread Lawrence Brakmo
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 are no packets in flight). When the 1st packet of the next request a

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 confi

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 2/8] veth: Add driver XDP

2018-07-23 Thread Jakub Kicinski
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 skb, > so this is generally doing the same thing as generic XDP. > > This itself is

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

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

2018-07-23 Thread Paul Burton
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 needed for a workaround in the vrx200 Ethernet > driver. >

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

[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 Engine/Goo

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 th

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

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

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

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

[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 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 --- .../net/eth

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

[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 +- drivers/net/ethern

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

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

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

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

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

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

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

[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

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: [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 > git://git.ker

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

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 wro

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

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 applicat

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

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

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 ifre

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

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

[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 b/drivers/net/ethernet/microchip/

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

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

[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 b/drivers/net/ethernet/microchip/lan743x_eth

[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(+) d

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

[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 b/dr

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 NUL

[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 a/drivers/net/

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.

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

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 encode

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

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 for

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() > * for

  1   2   >