Re: [PATCH] ucc_geth: Add BQL support

2018-06-19 Thread Joakim Tjernlund
On Tue, 2018-06-19 at 11:37 -0700, Dave Taht wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > very happy to see this. is there a specific chip or devboard

Re: [PATCH] ucc_geth: Add BQL support

2018-06-19 Thread Dave Taht
very happy to see this. is there a specific chip or devboard this runs on? On Tue, Jun 19, 2018 at 11:24 AM, Li Yang wrote: > On Tue, Jun 19, 2018 at 11:30 AM, Joakim Tjernlund > wrote: >> Signed-off-by: Joakim Tjernlund > > Acked-by: Li Yang > >> --- >>

Re: [PATCH] tc, bpf: add option to dump bpf verifier as C program fragment

2018-06-19 Thread Daniel Borkmann
On 06/18/2018 11:44 PM, David Ahern wrote: > On 6/18/18 2:18 PM, Jakub Kicinski wrote: >> On Sun, 17 Jun 2018 08:48:41 +, Ophir Munk wrote: >>> Similar to cbpf used within tcpdump utility with a "-d" option to dump >>> the compiled packet-matching code in a human readable form - tc has the >>>

[PATCH net] enic: initialize enic->rfs_h.lock in enic_probe

2018-06-19 Thread Govindarajulu Varadarajan
lockdep spotted that we are using rfs_h.lock in enic_get_rxnfc() without initializing. rfs_h.lock is initialized in enic_open(). But ethtool_ops can be called when interface is down. Move enic_rfs_flw_tbl_init to enic_probe. INFO: trying to register non-static key. the code is fine but needs

Re: [PATCH net 0/3] qed*: Fix series.

2018-06-19 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 18 Jun 2018 21:57:59 -0700 > From: Sudarsana Reddy Kalluru > > The patch series fixes few issues in the qed/qede drivers. > Please consider applying this series to "net". Series applied.

Re: [PATCH v2 0/4] Slience NCSI logging

2018-06-19 Thread David Miller
From: Joel Stanley Date: Tue, 19 Jun 2018 15:08:30 +0930 > v2: > Fix indent issue and commit message based on Joe's feedback > Add Sam's acks > > Here are three changes to silence unnecessary warnings in the ncsi code. > > The final patch adds Sam as the maintainer for NCSI. Series

Re: [net] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-19 Thread David Miller
From: Jeff Kirsher Date: Tue, 19 Jun 2018 14:33:54 -0700 > From: Daniel Borkmann > > Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) > is clearly wrong since I40E_SKB_PAD already points to the offset where > the original xdp->data was sitting since

Re: [PATCH net] enic: initialize enic->rfs_h.lock in enic_probe

2018-06-19 Thread David Miller
From: Govindarajulu Varadarajan Date: Tue, 19 Jun 2018 08:15:24 -0700 > lockdep spotted that we are using rfs_h.lock in enic_get_rxnfc() without > initializing. rfs_h.lock is initialized in enic_open(). But ethtool_ops > can be called when interface is down. > > Move enic_rfs_flw_tbl_init to

Re: [PATCH net] ipvlan: use ETH_MAX_MTU as max mtu

2018-06-19 Thread David Miller
From: Xin Long Date: Mon, 18 Jun 2018 16:15:57 +0800 > Similar to the fixes on team and bonding, this restores the ability > to set an ipvlan device's mtu to anything higher than 1500. > > Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") > Signed-off-by: Xin Long

Re: [PATCH 1/1] tcp: tcp_mtup_probe -> tcp_mtu_probe

2018-06-19 Thread David Miller
From: Wang Jian Date: Mon, 18 Jun 2018 18:58:50 +0800 > Comment correction. > > Signed-off-by: Jian Wang This patch was corrupted by your email client. Please fix this, email the patch to yourself, and only resubmit this patch to the mailing list when you can successfull apply the patch

Re: [PATCH net] net/ipv6: respect rcu grace period before freeing fib6_info

2018-06-19 Thread David Miller
From: Eric Dumazet Date: Mon, 18 Jun 2018 05:24:31 -0700 > syzbot reported use after free that is caused by fib6_info being > freed without a proper RCU grace period. ... > Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") > Signed-off-by: Eric Dumazet > Cc: David Ahern

Re: Incomplete fix for be9c798 / 7b2ee50 hv_netvsc: common detach logic?

2018-06-19 Thread Greg KH
On Tue, Jun 19, 2018 at 03:19:41PM -0400, Thomas Walker wrote: > Upon updating some internal kernels from 4.14.18 to 4.14.49, our hyper-v > guests failed to bring up network interfaces on boot, logging "A link change > request failed with some changes committed already. Interface eth0 may have

Re: [PATCH net] net/tcp: Fix socket lookups with SO_BINDTODEVICE

2018-06-19 Thread David Miller
From: dsah...@kernel.org Date: Mon, 18 Jun 2018 12:30:37 -0700 > From: David Ahern > > Similar to 69678bcd4d2d ("udp: fix SO_BINDTODEVICE"), TCP socket lookups > need to fail if dev_match is not true. Currently, a packet to a given port > can match a socket bound to device when it should not.

Re: Incomplete fix for be9c798 / 7b2ee50 hv_netvsc: common detach logic?

2018-06-19 Thread Stephen Hemminger
On Wed, 20 Jun 2018 08:01:50 +0900 Greg KH wrote: > On Tue, Jun 19, 2018 at 03:19:41PM -0400, Thomas Walker wrote: > > Upon updating some internal kernels from 4.14.18 to 4.14.49, our hyper-v > > guests failed to bring up network interfaces on boot, logging "A link > > change request failed

Re: [PATCH net] enic: do not overwrite error code

2018-06-19 Thread David Miller
From: Govindarajulu Varadarajan Date: Mon, 18 Jun 2018 10:01:05 -0700 > In failure path, we overwrite err to what vnic_rq_disable() returns. In > case it returns 0, enic_open() returns success in case of error. > > Reported-by: Ben Hutchings > Fixes: e8588e268509 ("enic: enable rq before

davinci_emac failures in 4.18-rc1 on AM3517-EVM

2018-06-19 Thread Adam Ford
I am not sure if anyone else has seen this. If not, I'll bisect, but the AM3517 ethernet seems to have died, and it's throwing some errors [2.708933] davinci_mdio davinci_mdio.0: failed to get device clock [2.715363] davinci_mdio: probe of davinci_mdio.0 failed with error -2 [snip] [

Re: bpfilter compile failure on parisc

2018-06-19 Thread John David Anglin
On 2018-06-19 1:38 PM, Meelis Roos wrote: Tried enabling bpfilter on parisc, got this: HOSTCC net/bpfilter/main.o net/bpfilter/main.c:3:21: fatal error: sys/uio.h: No such file or directory #include Probably has something to do with the include directories searched by HOSTCC.  The

Re: Incomplete fix for be9c798 / 7b2ee50 hv_netvsc: common detach logic?

2018-06-19 Thread Stephen Hemminger
On Wed, 20 Jun 2018 08:01:50 +0900 Greg KH wrote: > On Tue, Jun 19, 2018 at 03:19:41PM -0400, Thomas Walker wrote: > > Upon updating some internal kernels from 4.14.18 to 4.14.49, our hyper-v > > guests failed to bring up network interfaces on boot, logging "A link > > change request failed

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread Martin KaFai Lau
On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote: > On 6/19/18 9:25 AM, Martin KaFai Lau wrote: > > On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: > >> On 6/18/18 2:55 PM, Martin KaFai Lau wrote: > /* rc > 0 case */ > switch(rc) { > case

[PATCH] bpfilter: fix build error

2018-06-19 Thread Matteo Croce
bpfilter Makefile assumes that the system locale is en_US, and the parsing of objdump output fails. Set LC_ALL=C and, while at it, rewrite the objdump parsing so it spawns only 2 processes instead of 7. Fixes: d2ba09c17a064 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Matteo

iproute2 won't compile without AF_VSOCK

2018-06-19 Thread Steve Wise
Hey David, I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it fails to compile because AF_VSOCK is not defined.  Should this functionality be a configure option to disable it on older distros? Thanks, Steve. misc     CC   ss.o ss.c:301:27: error: ‘AF_VSOCK’

Re: Link modes representation in phylib

2018-06-19 Thread Andrew Lunn
> What I propose is that we add 3 link_mode fields in phy_device, and keep > the legacy fields for now. It would be up to the driver to fill the new > "supported" field in config_init, kind of like what's done in the > marvell10g driver. Hi Maxime You can do this conversion in the core. If

[PATCH] bpfilter: ignore binary files

2018-06-19 Thread Matteo Croce
net/bpfilter/bpfilter_umh is a binary file generated when bpfilter is enabled, add it to .gitignore to avoid committing it. Fixes: d2ba09c17a064 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Matteo Croce --- net/bpfilter/.gitignore | 1 + 1 file changed, 1 insertion(+) create

[PATCH] ucc_geth: Add BQL support

2018-06-19 Thread Joakim Tjernlund
Signed-off-by: Joakim Tjernlund --- drivers/net/ethernet/freescale/ucc_geth.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index f77ba9fa257b..6c99a9af6647 100644 ---

[PATCH net v2] ip: limit use of gso_size to udp

2018-06-19 Thread Willem de Bruijn
From: Willem de Bruijn The ipcm(6)_cookie field gso_size is set only in the udp path. The ip layer copies this to cork only if sk_type is SOCK_DGRAM. This check proved too permissive. Ping and l2tp sockets have the same type. Limit to sockets of type SOCK_DGRAM and protocol IPPROTO_UDP to

Re: [PATCH rdma-next v2 00/20] Introduce mlx5 DEVX interface

2018-06-19 Thread Leon Romanovsky
On Tue, Jun 19, 2018 at 07:59:30AM +0300, Leon Romanovsky wrote: > On Mon, Jun 18, 2018 at 04:05:04PM -0600, Jason Gunthorpe wrote: > > On Sun, Jun 17, 2018 at 12:59:46PM +0300, Leon Romanovsky wrote: > > > > > Leon Romanovsky (2): > > > drm/i915: Move u64-to-ptr helpers to general header > > >

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 9:25 AM, Martin KaFai Lau wrote: > On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: >> On 6/18/18 2:55 PM, Martin KaFai Lau wrote: /* rc > 0 case */ switch(rc) { case BPF_FIB_LKUP_RET_BLACKHOLE: case BPF_FIB_LKUP_RET_UNREACHABLE: case

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread Martin KaFai Lau
On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: > On 6/18/18 2:55 PM, Martin KaFai Lau wrote: > >>/* rc > 0 case */ > >>switch(rc) { > >>case BPF_FIB_LKUP_RET_BLACKHOLE: > >>case BPF_FIB_LKUP_RET_UNREACHABLE: > >>case BPF_FIB_LKUP_RET_PROHIBIT: > >>

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread Stephen Hemminger
On Tue, 19 Jun 2018 10:17:45 -0500 Steve Wise wrote: > Hey David, > > I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it > fails to compile because AF_VSOCK is not defined.  Should this > functionality be a configure option to disable it on older distros? > > > Thanks, >

[PATCH net 2/5] net sched actions: fix coding style in pedit headers

2018-06-19 Thread Roman Mashak
Fix coding style issues in tc pedit headers detected by the checkpatch script. Signed-off-by: Roman Mashak --- include/net/tc_act/tc_pedit.h| 1 + include/uapi/linux/tc_act/tc_pedit.h | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH net 5/5] net sched actions: fix misleading text strings in pedit action

2018-06-19 Thread Roman Mashak
Change "tc filter pedit .." to "tc actions pedit .." in error messages to clearly refer to pedit action. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index

[PATCH net 1/5] net sched actions: fix coding style in pedit action

2018-06-19 Thread Roman Mashak
Fix coding style issues in tc pedit action detected by the checkpatch script. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index

[PATCH net 3/5] net sched actions: fix sparse warning

2018-06-19 Thread Roman Mashak
The variable _data in include/asm-generic/sections.h defines sections, this causes sparse warning in pedit: net/sched/act_pedit.c:293:35: warning: symbol '_data' shadows an earlier one ./include/asm-generic/sections.h:36:13: originally declared here Therefore rename the variable. Signed-off-by:

[PATCH net 4/5] net sched actions: use sizeof operator for buffer length

2018-06-19 Thread Roman Mashak
Replace constant integer with sizeof() to clearly indicate the destination buffer length in skb_header_pointer() calls. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c

Re: [PATCH net 5/5] net sched actions: fix misleading text strings in pedit action

2018-06-19 Thread Roman Mashak
Stephen Hemminger writes: > On Tue, 19 Jun 2018 12:56:08 -0400 [...] >> @@ -326,12 +326,12 @@ static int tcf_pedit(struct sk_buff *skb, const struct >> tc_action *a, >> } >> >> if (offset % 4) { >> -pr_info("tc filter

[RFC v2 PATCH 2/4] ebpf: Add sg_filter_run and sg helper

2018-06-19 Thread Tushar Dave
When sg_filter_run() is invoked it runs the attached eBPF SOCKET_SG_FILTER program which deals with struct scatterlist. In addition, this patch also adds bpf_sg_next helper function that allows users to retrieve the next sg element from sg list. Signed-off-by: Tushar Dave Acked-by: Sowmini

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-19 Thread Saeed Mahameed
On Thu, 2018-06-14 at 16:49 -0700, Eric Dumazet wrote: > > On 06/14/2018 02:04 PM, Saeed Mahameed wrote: > > > I was looking at the code without my fix :) > > > > with my fix: > > release = frags->page_offset + frag_info->frag_stride > PAGE_SIZE; > > > > for XDP: frag_info->frag_stride is

Re: [PATCH net] net/sched: act_ife: preserve the action control in case of error

2018-06-19 Thread Cong Wang
On Tue, Jun 19, 2018 at 6:45 AM, Davide Caratti wrote: > in the following script > > # tc actions add action ife encode allow prio pass index 42 > # tc actions replace action ife encode allow tcindex drop index 42 > > the action control should remain equal to 'pass', if the kernel failed > to

Re: [PATCH net] net/sched: act_ife: fix recursive lock and idr leak

2018-06-19 Thread Cong Wang
On Tue, Jun 19, 2018 at 6:39 AM, Davide Caratti wrote: > a recursive lock warning [1] can be observed with the following script, > > # $TC actions add action ife encode allow prio pass index 42 > IFE type 0xED3E > # $TC actions replace action ife encode allow tcindex pass index 42 > > in case

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 10:36 AM, Martin KaFai Lau wrote: > On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote: >> On 6/19/18 9:25 AM, Martin KaFai Lau wrote: >>> On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: On 6/18/18 2:55 PM, Martin KaFai Lau wrote: >> /* rc > 0 case */

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread David Ahern
On 6/19/18 9:47 AM, Stephen Hemminger wrote: > On Tue, 19 Jun 2018 10:17:45 -0500 > Steve Wise wrote: > >> Hey David, >> >> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it >> fails to compile because AF_VSOCK is not defined.  Should this >> functionality be a configure

bpfilter compile failure on parisc

2018-06-19 Thread Meelis Roos
Tried enabling bpfilter on parisc, got this: HOSTCC net/bpfilter/main.o net/bpfilter/main.c:3:21: fatal error: sys/uio.h: No such file or directory #include ^ compilation terminated. -- Meelis Roos (mr...@linux.ee)

[RFC v2 PATCH 0/4] eBPF and struct scatterlist

2018-06-19 Thread Tushar Dave
This follows up on https://patchwork.ozlabs.org/cover/927050/ where the review feedback was to use bpf_skb_load_bytes() to deal with linear and non-linear skbs. While that feedback is valid and correct, the motivation for this work is to allow eBPF based firewalling for kernel modules that do not

[RFC v2 PATCH 1/4] eBPF: Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER

2018-06-19 Thread Tushar Dave
Add new eBPF prog type BPF_PROG_TYPE_SOCKET_SG_FILTER which uses the existing socket filter infrastructure for bpf program attach and load. SOCKET_SG_FILTER eBPF program receives struct scatterlist as bpf context contrast to SOCKET_FILTER which deals with struct skb. This is useful for kernel

[RFC v2 PATCH 4/4] rds: invoke socket sg filter attached to rds socket

2018-06-19 Thread Tushar Dave
RDS module sits on top of TCP (rds_tcp) and IB (rds_rdma), so messages arrive in form of skb (over TCP) and scatterlist (over IB/RDMA). However, because socket filter only deal with skb (e.g. struct skb as bpf context) we can only use socket filter for rds_tcp and not for rds_rdma. Considering

[RFC v2 PATCH 3/4] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-06-19 Thread Tushar Dave
Add a sample program that shows how socksg program is used and attached to socket filter. The kernel sample program deals with struct scatterlist that is passed as bpf context. When run in server mode, the sample RDS program opens PF_RDS socket, attaches eBPF program to RDS socket which then uses

[PATCH][v2] xfrm: replace NR_CPU with nr_cpu_ids

2018-06-19 Thread Li RongQing
The default NR_CPUS can be very large, but actual possible nr_cpu_ids usually is very small. For some x86 distribution, the NR_CPUS is 8192 and nr_cpu_ids is 4, so replace NR_CPU to save some memory Signed-off-by: Li RongQing Signed-off-by: Wang Li --- net/xfrm/xfrm_policy.c | 4 ++-- 1 file

Re: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path handling.

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 14:42, Kalluru, Sudarsana wrote: > > > -Original Message- > From: Yunsheng Lin [mailto:linyunsh...@huawei.com] > Sent: 19 June 2018 11:32 > To: Kalluru, Sudarsana ; da...@davemloft.net > Cc: netdev@vger.kernel.org; Elior, Ariel ; Kalderon, > Michal > Subject: Re:

[PATCH net 0/5] net sched actions: code style cleanup and fixes

2018-06-19 Thread Roman Mashak
The patchset fixes a few code stylistic issues and typos, as well as one detected by sparse semantic checker tool. No functional changes introduced. Patch 1 & 2 fix coding style bits caught by the checkpatch.pl script Patch 3 fixes an issue with a shadowed variable Patch 4 adds sizeof() operator

Re: [PATCH net 5/5] net sched actions: fix misleading text strings in pedit action

2018-06-19 Thread Stephen Hemminger
On Tue, 19 Jun 2018 12:56:08 -0400 Roman Mashak wrote: > Change "tc filter pedit .." to "tc actions pedit .." in error > messages to clearly refer to pedit action. > > Signed-off-by: Roman Mashak > --- > net/sched/act_pedit.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH] ucc_geth: Add BQL support

2018-06-19 Thread Li Yang
On Tue, Jun 19, 2018 at 11:30 AM, Joakim Tjernlund wrote: > Signed-off-by: Joakim Tjernlund Acked-by: Li Yang > --- > drivers/net/ethernet/freescale/ucc_geth.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/freescale/ucc_geth.c >

Re: [bug] cxgb4: vrf stopped working with cxgb4 card

2018-06-19 Thread AMG Zollner Robert
On 19.06.2018 16:24, Ganesh Goudar wrote: On Monday, June 06/11/18, 2018 at 14:47:55 +0530, Ganesh Goudar wrote: On Saturday, June 06/09/18, 2018 at 18:47:55 -0600, David Ahern wrote: Ganesh: On 6/4/18 9:03 AM, AMG Zollner Robert wrote: I have noticed that vrf is not working with kernel

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread Cong Wang
On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu wrote: > @@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, > u16 nval) > mdev->l3mdev_ops = NULL; > } > list_for_each_entry(ipvlan, >ipvlans, pnode) { > +

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread Martin KaFai Lau
On Tue, Jun 19, 2018 at 02:16:53PM -0600, David Ahern wrote: > On 6/19/18 10:36 AM, Martin KaFai Lau wrote: > > On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote: > >> On 6/19/18 9:25 AM, Martin KaFai Lau wrote: > >>> On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote: > On

[net] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-19 Thread Jeff Kirsher
From: Daniel Borkmann Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) is clearly wrong since I40E_SKB_PAD already points to the offset where the original xdp->data was sitting since xdp->data_hard_start is defined as xdp->data - i40e_rx_offset(rx_ring) where latter

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread David Ahern
On 6/19/18 2:27 PM, David Ahern wrote: > On 6/19/18 9:47 AM, Stephen Hemminger wrote: >> On Tue, 19 Jun 2018 10:17:45 -0500 >> Steve Wise wrote: >> >>> Hey David, >>> >>> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it >>> fails to compile because AF_VSOCK is not defined. 

Re: iproute2 won't compile without AF_VSOCK

2018-06-19 Thread Steve Wise
On 6/19/2018 3:29 PM, David Ahern wrote: > On 6/19/18 2:27 PM, David Ahern wrote: >> On 6/19/18 9:47 AM, Stephen Hemminger wrote: >>> On Tue, 19 Jun 2018 10:17:45 -0500 >>> Steve Wise wrote: >>> Hey David, I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it

Re: [PATCH] PCI: allow drivers to limit the number of VFs to 0

2018-06-19 Thread Bjorn Helgaas
On Fri, May 25, 2018 at 09:02:23AM -0500, Bjorn Helgaas wrote: > On Thu, May 24, 2018 at 06:20:15PM -0700, Jakub Kicinski wrote: > > Hi Bjorn! > > > > On Thu, 24 May 2018 18:57:48 -0500, Bjorn Helgaas wrote: > > > On Mon, Apr 02, 2018 at 03:46:52PM -0700, Jakub Kicinski wrote: > > > > Some user

Re: [PATCH] net: propagate dev_get_valid_name return code

2018-06-19 Thread David Miller
From: Li RongQing Date: Tue, 19 Jun 2018 17:23:17 +0800 > if dev_get_valid_name failed, propagate its return code > > and remove the setting err to ENODEV, it will be set to > 0 again before dev_change_net_namespace exits. > > Signed-off-by: Li RongQing Applied, thank you.

Re: [PATCH] [net-next, v2] tcp: use monotonic timestamps for PAWS

2018-06-19 Thread Eric Dumazet
On 06/19/2018 05:36 AM, Arnd Bergmann wrote: > Using get_seconds() for timestamps is deprecated since it can lead > to overflows on 32-bit systems. While the interface generally doesn't > overflow until year 2106, the specific implementation of the TCP PAWS > algorithm breaks in 2038 when the

Re: [PATCH net] net/sched: act_ife: preserve the action control in case of error

2018-06-19 Thread David Miller
From: Davide Caratti Date: Tue, 19 Jun 2018 15:45:50 +0200 > in the following script > > # tc actions add action ife encode allow prio pass index 42 > # tc actions replace action ife encode allow tcindex drop index 42 > > the action control should remain equal to 'pass', if the kernel failed

Re: [PATCH net] net/sched: act_ife: fix recursive lock and idr leak

2018-06-19 Thread David Miller
From: Davide Caratti Date: Tue, 19 Jun 2018 15:39:46 +0200 > a recursive lock warning [1] can be observed with the following script, ... > in case the kernel was unable to run the last command (e.g. because of > the impossibility to load 'act_meta_skbtcindex'). For a similar reason, > the

Re: [PATCH] net/usb/drivers: Remove useless hrtimer_active check

2018-06-19 Thread David Miller
From: Daniel Lezcano Date: Tue, 19 Jun 2018 16:14:30 +0200 > The code does: > > if (hrtimer_active()) > hrtimer_cancel(); > > However, hrtimer_cancel() checks if the timer is active, so the > test above is pointless. > > Signed-off-by: Daniel Lezcano Applied.

Re: [PATCH] bpfilter: fix build error

2018-06-19 Thread David Miller
From: Matteo Croce Date: Tue, 19 Jun 2018 17:16:20 +0200 > bpfilter Makefile assumes that the system locale is en_US, and the > parsing of objdump output fails. > Set LC_ALL=C and, while at it, rewrite the objdump parsing so it spawns > only 2 processes instead of 7. > > Fixes: d2ba09c17a064

Re: [PATCH] bpfilter: ignore binary files

2018-06-19 Thread David Miller
From: Matteo Croce Date: Tue, 19 Jun 2018 17:21:36 +0200 > net/bpfilter/bpfilter_umh is a binary file generated when bpfilter is > enabled, add it to .gitignore to avoid committing it. > > Fixes: d2ba09c17a064 ("net: add skeleton of bpfilter kernel module") > Signed-off-by: Matteo Croce

Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition

2018-06-19 Thread Eric Dumazet
On 06/19/2018 11:05 AM, Saeed Mahameed wrote: > this is only true for XDP setup, for non XDP max stride_size can only > be around ~3k and only for mtu > ~6k > > For XDP setup you suggested: > - priv->frag_info[0].frag_size = eff_mtu; > +

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-19 Thread Michel Machado
On 06/19/2018 08:01 AM, Jamal Hadi Salim wrote: Per my previous comments, why do we need the TCA_SKBEDIT_FLAGS TLV? Isnt SKBEDIT_F_INHERITDSFIELD sufficient? i.e in tcf_skbedit_init() check for d->flags_F_INHERITDSFIELD then set skb->priority and flags|=SKBEDIT_F_INHERITDSFIELD Notice that,

Re: [PATCH rdma-next 0/3] Dump and fill MKEY

2018-06-19 Thread Leon Romanovsky
On Tue, Jun 19, 2018 at 08:21:06AM -0600, Jason Gunthorpe wrote: > On Tue, Jun 19, 2018 at 08:47:21AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > MLX5 IB HCA offers the memory key, dump_fill_mkey to increase > > performance, when used in a send or receive operations. > > > >

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/19/18 3:36 AM, Quentin Monnet wrote: > Since you are about to respin (I think?), could you please also fix the > formatting in your change to the doc? The "BPF_FIB_LKUP_RET_" is not > emphasized (and will even cause an error message when producing the man > page, because of the trailing

[PATCH net] net/sched: act_ife: fix recursive lock and idr leak

2018-06-19 Thread Davide Caratti
a recursive lock warning [1] can be observed with the following script, # $TC actions add action ife encode allow prio pass index 42 IFE type 0xED3E # $TC actions replace action ife encode allow tcindex pass index 42 in case the kernel was unable to run the last command (e.g. because of the

[PATCH net] net/sched: act_ife: preserve the action control in case of error

2018-06-19 Thread Davide Caratti
in the following script # tc actions add action ife encode allow prio pass index 42 # tc actions replace action ife encode allow tcindex drop index 42 the action control should remain equal to 'pass', if the kernel failed to replace the TC action. Pospone the assignment of the action control,

Re: [PATCH net] xfrm_user: prevent leaking 2 bytes of kernel memory

2018-06-19 Thread Steffen Klassert
On Mon, Jun 18, 2018 at 09:35:07PM -0700, Eric Dumazet wrote: > struct xfrm_userpolicy_type has two holes, so we should not > use C99 style initializer. > > KMSAN report: > > BUG: KMSAN: kernel-infoleak in copyout lib/iov_iter.c:140 [inline] > BUG: KMSAN: kernel-infoleak in

Re: [PATCH rdma-next 0/3] Dump and fill MKEY

2018-06-19 Thread Jason Gunthorpe
On Tue, Jun 19, 2018 at 08:47:21AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > MLX5 IB HCA offers the memory key, dump_fill_mkey to increase > performance, when used in a send or receive operations. > > It is used to force local HCA operations to skip the PCI bus access, > while

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread David Ahern
On 6/18/18 2:55 PM, Martin KaFai Lau wrote: >> >> Arguably BPF_FIB_LKUP_RET_NO_NHDEV is not needed. See below. >> ... @@ -4252,16 +4277,19 @@ static int bpf_ipv6_fib_lookup(struct net *net, struct bpf_fib_lookup *params, if (check_mtu) { mtu =

Re: [PATCH v1 net] stmmac: fix DMA channel hang in half-duplex mode

2018-06-19 Thread David Miller
From: Bhadram Varka Date: Sun, 17 Jun 2018 20:02:05 +0530 > HW does not support Half-duplex mode in multi-queue > scenario. Fix it by not advertising the Half-Duplex > mode if multi-queue enabled. > > Signed-off-by: Bhadram Varka Applied and queued up for -stable.

[PATCH net-next 2/2] selftests: rtnetlink: use a local IP address for IPsec tests

2018-06-19 Thread Shannon Nelson
Find an IP address on this machine to use as a source IP, and make up a destination IP address based on the source IP. No actual messages will be sent, just a couple of IPsec rules are created and deleted. Fixes: 5e596ee171ba ("selftests: add xfrm state-policy-monitor to rtnetlink.sh")

[PATCH net-next 0/2] fixes for ipsec selftests

2018-06-19 Thread Shannon Nelson
A couple of bad behaviors in the ipsec selftest were pointed out by Anders Roxell and are addressed here. Shannon Nelson (2): selftests: rtnetlink: hide complaint from terminated monitor selftests: rtnetlink: use a local IP address for IPsec tests tools/testing/selftests/net/rtnetlink.sh |

[PATCH net-next 1/2] selftests: rtnetlink: hide complaint from terminated monitor

2018-06-19 Thread Shannon Nelson
Set up the "ip xfrm monitor" subprogram so as to not see a "Terminated" message when the subprogram is killed. Fixes: 5e596ee171ba ("selftests: add xfrm state-policy-monitor to rtnetlink.sh") Reported-by: Anders Roxell Signed-off-by: Shannon Nelson --- tools/testing/selftests/net/rtnetlink.sh

[PATCH net] net: sungem: fix rx checksum support

2018-06-19 Thread Eric Dumazet
After commit 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"), sungem owners reported the infamous "eth0: hw csum failure" message. CHECKSUM_COMPLETE has in fact never worked for this driver, but this was masked by the fact that upper stacks had to strip the FCS, and

Re: [PATCH net v3 2/2] ipv4: igmp: use alarmtimer to prevent delayed reports

2018-06-19 Thread kbuild test robot
Hi Tejaswi, Thank you for the patch! Yet something to improve: [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Tejaswi-Tanikella/ktime-helpers-to-convert-between-ktime-and-jiffies/20180611-214916 config: x86_64-randconfig-s4-06200944 (attached as .config)

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread Hangbin Liu
On Tue, Jun 19, 2018 at 02:10:18PM -0700, Cong Wang wrote: > On Mon, Jun 18, 2018 at 7:04 AM, Hangbin Liu wrote: > > @@ -94,10 +95,13 @@ static int ipvlan_set_port_mode(struct ipvl_port *port, > > u16 nval) > > mdev->l3mdev_ops = NULL; > > } > >

Re: [PATCH net] ip: limit use of gso_size to udp

2018-06-19 Thread David Miller
From: Willem de Bruijn Date: Tue, 19 Jun 2018 06:40:26 -0400 > From: Willem de Bruijn > > The ipcm(6)_cookie field gso_size is set only in the udp path. The ip > layer copies this to cork only if sk_type is SOCK_DGRAM. This check > proved too permissive. Ping and l2tp sockets have the same

Re: [PATCH] PCI: allow drivers to limit the number of VFs to 0

2018-06-19 Thread Jakub Kicinski
On Tue, 19 Jun 2018 16:37:15 -0500, Bjorn Helgaas wrote: > On Fri, May 25, 2018 at 09:02:23AM -0500, Bjorn Helgaas wrote: > > On Thu, May 24, 2018 at 06:20:15PM -0700, Jakub Kicinski wrote: > > > Hi Bjorn! > > > > > > On Thu, 24 May 2018 18:57:48 -0500, Bjorn Helgaas wrote: > > > > On Mon,

[PATCH net-next] tcp: ignore rcv_rtt sample with old ts ecr value

2018-06-19 Thread Wei Wang
From: Wei Wang When receiving multiple packets with the same ts ecr value, only try to compute rcv_rtt sample with the earliest received packet. This is because the rcv_rtt calculated by later received packets could possibly include long idle time or other types of delay. For example: (1) server

Re: [PATCH net] net: sungem: fix rx checksum support

2018-06-19 Thread David Miller
From: Eric Dumazet Date: Tue, 19 Jun 2018 19:18:50 -0700 > After commit 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE > are friends"), sungem owners reported the infamous "eth0: hw csum failure" > message. > > CHECKSUM_COMPLETE has in fact never worked for this driver, but this >

Re: [PATCH net] ipvlan: call dev_change_flags when reset ipvlan mode

2018-06-19 Thread David Miller
From: Hangbin Liu Date: Wed, 20 Jun 2018 11:22:54 +0800 > The only case dev_change_flags() return an err is when we change IFF_UP flag. > Since we only set/reset IFF_NOARP, do you think we still need to check the > return value? It is bad to try and take shortcuts on error handling using

Re: [PATCH] ucc_geth: Add BQL support

2018-06-19 Thread David Miller
From: Joakim Tjernlund Date: Tue, 19 Jun 2018 18:30:36 +0200 > @@ -3242,6 +3243,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ) > struct ucc_geth_private *ugeth = netdev_priv(dev); > u8 __iomem *bd; /* BD pointer */ > u32 bd_status; > + int howmany = 0;

Re: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path handling.

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 12:58, Sudarsana Reddy Kalluru wrote: > Memory for packet buffers need to be freed in the error paths as there is > no consumer (e.g., upper layer) for such packets and that memory will never > get freed. > The issue was uncovered when port was attacked with flood of isatap >

RE: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path handling.

2018-06-19 Thread Kalluru, Sudarsana
-Original Message- From: Yunsheng Lin [mailto:linyunsh...@huawei.com] Sent: 19 June 2018 11:32 To: Kalluru, Sudarsana ; da...@davemloft.net Cc: netdev@vger.kernel.org; Elior, Ariel ; Kalderon, Michal Subject: Re: [PATCH net 1/3] qed: Fix possible memory leak in Rx error path

Re: [PATCH][v2] xfrm: replace NR_CPU with nr_cpu_ids

2018-06-19 Thread Florian Westphal
Li RongQing wrote: > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > usually is very small. For some x86 distribution, the NR_CPUS is 8192 > and nr_cpu_ids is 4, so replace NR_CPU to save some memory Steffen, I will soon submit a patch to remove the percpu cache; removal

Re: Link modes representation in phylib

2018-06-19 Thread Maxime Chevallier
Hello Andrew, Thanks for your feedback ! >> I'm currently working on adding support for 2.5GBaseT on some Marvell >> PHYs (the marvell10g family, including the 88X3310). >> >> However, phylib doesn't quite support these modes yet. Its stores the >> different supported and advertised modes in

Re: array bounds warning in xfrm_output_resume

2018-06-19 Thread Florian Westphal
David Ahern wrote: > $ make O=kbuild/perf -j 24 -s > In file included from /home/dsa/kernel-3.git/include/linux/kernel.h:10:0, > from /home/dsa/kernel-3.git/include/linux/list.h:9, > from /home/dsa/kernel-3.git/include/linux/module.h:9, > from

[PATCH] net: propagate dev_get_valid_name return code

2018-06-19 Thread Li RongQing
if dev_get_valid_name failed, propagate its return code and remove the setting err to ENODEV, it will be set to 0 again before dev_change_net_namespace exits. Signed-off-by: Li RongQing --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c

Re: [PATCH][v2] xfrm: replace NR_CPU with nr_cpu_ids

2018-06-19 Thread Yunsheng Lin
On 2018/6/19 15:11, Li RongQing wrote: > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > usually is very small. For some x86 distribution, the NR_CPUS is 8192 > and nr_cpu_ids is 4, so replace NR_CPU to save some memory > > Signed-off-by: Li RongQing > Signed-off-by:

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread Quentin Monnet
Hi David, 2018-06-17 08:18 UTC-0700 ~ dsah...@kernel.org > From: David Ahern > > For ACLs implemented using either FIB rules or FIB entries, the BPF > program needs the FIB lookup status to be able to drop the packet. > Since the bpf_fib_lookup API has not reached a released kernel yet, >

Re: [PATCH][v2] xfrm: replace NR_CPU with nr_cpu_ids

2018-06-19 Thread Steffen Klassert
On Tue, Jun 19, 2018 at 09:53:49AM +0200, Florian Westphal wrote: > Li RongQing wrote: > > The default NR_CPUS can be very large, but actual possible nr_cpu_ids > > usually is very small. For some x86 distribution, the NR_CPUS is 8192 > > and nr_cpu_ids is 4, so replace NR_CPU to save some memory

[PATCH net] ip: limit use of gso_size to udp

2018-06-19 Thread Willem de Bruijn
From: Willem de Bruijn The ipcm(6)_cookie field gso_size is set only in the udp path. The ip layer copies this to cork only if sk_type is SOCK_DGRAM. This check proved too permissive. Ping and l2tp sockets have the same type. Limit to sockets of type SOCK_DGRAM and protocol IPPROTO_UDP to

Re: [PATCH v4 net-next] net:sched: add action inheritdsfield to skbedit

2018-06-19 Thread Jamal Hadi Salim
Hi Qiaobin, Per my previous comments, why do we need the TCA_SKBEDIT_FLAGS TLV? Isnt SKBEDIT_F_INHERITDSFIELD sufficient? i.e in tcf_skbedit_init() check for d->flags_F_INHERITDSFIELD then set skb->priority and flags|=SKBEDIT_F_INHERITDSFIELD Side note: Infact the whole flags setting in the

Re: WARNING: CPU: 3 PID: 0 at net/sched/sch_hfsc.c:1388 hfsc_dequeue+0x319/0x350 [sch_hfsc]

2018-06-19 Thread Marco Berizzi
> Il 18 giugno 2018 alle 21.28 Cong Wang ha scritto: > Can you test the attached patch? > > It almost certainly fixes the warning, but I am not sure if > it papers out any other real problem. Please make sure > hfsc still works as expected. :) Hi Cong, Thanks a lot for the patch. I'm building