Re: [PATCH v5 26/39] nds32: Device tree support

2018-01-03 Thread Greentime Hu
2018-01-04 3:14 GMT+08:00 Rob Herring : > On Tue, Jan 2, 2018 at 2:24 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds support for device tree. >> >> Signed-off-by: Vincent Chen >> Signed-off-by: Greentime Hu >> --- >> arch/nds32/boot/dts/Makefile |8 + >> arch/nds3

Re: [PATCH net-next v2 05/10] net: qualcomm: rmnet: Set pacing rate

2018-01-03 Thread Eric Dumazet
On Wed, 2018-01-03 at 15:45 -0700, Subash Abhinov Kasiviswanathan wrote: > > > + sk_pacing_shift_update(skb->sk, 8); > > > > Well... Please tell us why this is needed in this driver. > > > > This interface is meant for wifi aggregation, not to work around some > > strange ethernet drivers designs

[patch iproute2 v6 2/3] tc: Add -bs option to batch mode

2018-01-03 Thread Chris Mi
Currently in tc batch mode, only one command is read from the batch file and sent to kernel to process. With this support, we can accumulate several commands before sending to kernel. Now it only works for the following successive rules, 1. filter add 2. filter delete 3. actions add 4. actions del

[patch iproute2 v6 1/3] lib/libnetlink: Add a function rtnl_talk_msg

2018-01-03 Thread Chris Mi
rtnl_talk can only send a single message to kernel. Add a new function rtnl_talk_msg that can send multiple messages to kernel. Signed-off-by: Chris Mi --- include/libnetlink.h | 3 +++ lib/libnetlink.c | 66 ++-- 2 files changed, 51 insertion

[patch iproute2 v6 0/3] tc: Add -bs option to batch mode

2018-01-03 Thread Chris Mi
Currently in tc batch mode, only one command is read from the batch file and sent to kernel to process. With this patchset, we can accumulate several commands before sending to kernel. The batch size is specified using option -bs or -batchsize. To accumulate the commands in tc, client should alloc

[patch iproute2 v6 3/3] man: Add -bs option to tc manpage

2018-01-03 Thread Chris Mi
Signed-off-by: Chris Mi --- man/man8/tc.8 | 7 +++ 1 file changed, 7 insertions(+) diff --git a/man/man8/tc.8 b/man/man8/tc.8 index ff071b33..23db730c 100644 --- a/man/man8/tc.8 +++ b/man/man8/tc.8 @@ -601,6 +601,13 @@ must exist already. read commands from provided file or standard input a

Re: [PATCH net] tipc: fix missing rtnl lock protection during setting link properties

2018-01-03 Thread Ying Xue
On 01/03/2018 11:48 PM, David Miller wrote: > As soon as you drop the RTNL lock, the media or bearer entry can be > removed from the tables. > Thanks for the review. Yes, you are right. But even if we temporarily release RTNL lock, it's still safe for us because when we set media/bearer propertie

Re: [patch iproute2 v5 2/3] tc: Add -bs option to batch mode

2018-01-03 Thread Chris Mi
 2018/1/3 12:25, David Ahern: You need a patch description here ... Done. On 1/2/18 7:55 PM, Chris Mi wrote: static int tc_action_modify(int cmd, unsigned int flags, - int *argc_p, char ***argv_p) + int *argc_p, char ***argv_p, +

Re: [PATCH net-next 2/2] tun: allow to attach ebpf socket filter

2018-01-03 Thread Jason Wang
On 2018年01月02日 17:19, Willem de Bruijn wrote: More importantly, should this program just return a boolean pass or drop. Taking a length and trimming may introduce bugs later on if the stack parses the packet unconditionally, expecting a minimum size to be present. This was the reason for intro

[PATCH bpf-next 1/2] bpf: implement syscall command BPF_MAP_GET_NEXT_KEY for stacktrace map

2018-01-03 Thread Yonghong Song
Currently, bpf syscall command BPF_MAP_GET_NEXT_KEY is not supported for stacktrace map. However, there are use cases where user space wants to enumerate all stacktrace map entries where BPF_MAP_GET_NEXT_KEY command will be really helpful. In addition, if user space wants to delete all map entries

Re: [patch iproute2 v5 1/3] lib/libnetlink: Add a function rtnl_talk_msg

2018-01-03 Thread Chris Mi
2018/1/3 12:08, David Ahern: On 1/2/18 7:55 PM, Chris Mi wrote: diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 00e6ce0c..cc02a139 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -581,32 +581,34 @@ static void rtnl_talk_error(struct nlmsghdr *h, struct nlmsgerr *err,

[PATCH bpf-next 0/2] bpf: implement syscall command BPF_MAP_GET_NEXT_KEY for stacktrace map

2018-01-03 Thread Yonghong Song
The patch set implements bpf syscall command BPF_MAP_GET_NEXT_KEY for stacktrace map. Patch #1 is the core implementation and Patch #2 implements a bpf test at tools/testing/selftests/bpf directory. Please see individual patch comments for details. Yonghong Song (2): bpf: implement syscall comma

[PATCH bpf-next 2/2] tools/bpf: add a bpf selftest for stacktrace

2018-01-03 Thread Yonghong Song
Added a bpf selftest in test_progs at tools directory for stacktrace. The test will populate a hashtable map and a stacktrace map at the same time with the same key, stackid. The user space will compare both maps, using BPF_MAP_LOOKUP_ELEM command and BPF_MAP_GET_NEXT_KEY command, to ensure that bo

[PATCH net-next] net: dsa: lan9303: Fix error return code in lan9303_check_device()

2018-01-03 Thread Wei Yongjun
Fix to return error code -ENODEV from the chip not found error handling case instead of 0(ret have been overwritten to 0 by lan9303_read()), as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [patch net-next v4 00/10] net: sched: allow qdiscs to share filter block instances

2018-01-03 Thread Jakub Kicinski
On Thu, 4 Jan 2018 07:57:02 +0100, Jiri Pirko wrote: > Thu, Jan 04, 2018 at 12:51:52AM CET, kubak...@wp.pl wrote: > >On Wed, 3 Jan 2018 18:22:09 +0100, Jiri Pirko wrote: > >> However I don't agree about breaking the existing filter add and show > >> and also imposibility to make not-shared block

[PATCH iproute2-next v1 6/9] rdma: Update kernel header file

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky Synchronize iporute2 package with latest kernel RDMA netlink header file. Signed-off-by: Leon Romanovsky --- include/uapi/rdma/rdma_netlink.h | 58 ++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/include/uapi/rdma/rd

[PATCH iproute2-next v1 8/9] rdma: Add QP resource tracking information

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds ss-similar interface to view various resource tracked objects. At this stage, only QP is presented. 1. Get all QPs for the specific device: $ rdma res show qp link mlx5_4 DEV/PORT LQPN TYPE STATE PIDCOMM mlx5_4/- 8 UDRESET 0

[PATCH iproute2-next v1 9/9] rdma: Document resource tracking

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky Spartan version of resource tracking documentation. Signed-off-by: Leon Romanovsky --- man/man8/rdma-resource.8 | 91 1 file changed, 91 insertions(+) create mode 100644 man/man8/rdma-resource.8 diff --git a/man/man8/rdma

[PATCH iproute2-next v1 1/9] rdma: Add option to provide "-" sign for the port number

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky According to the IBTA spec [1], the physical connected port is provided for the QP in RTR-to-INIT stage performed by modify_qp(). It causes to do not have port number for newly created QPs. The following patch adds "-" sign to present absence of port, because QPs are going

[PATCH iproute2-next v1 4/9] rdma: Set pointer to device name position

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky The dev and link execution callbacks expects that next command line argument is device or port name. Set pointer to device or port name position prior calls to rd_exec_dev()/rd_exec_link(). Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 1 + rdma/utils.c | 19 +++

[PATCH iproute2-next v1 3/9] rdma: Add filtering infrastructure

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky This patch adds general infrastructure to RDMAtool to handle various filtering options needed for the downstream resource tracking patches. The infrastructure is generic and stores filters in list of key<->value entries. There are three types of filters: 1. Numeric - the v

[PATCH iproute2-next v1 7/9] rdma: Add resource tracking summary

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky The global resource summary information. The object names, current utilization and maximum numbers are received as is from the kernel. $ rdma res 1: mlx5_0: curr/max: pd 3/16777216 cq 5/16777216 qp 4/262144 2: mlx5_1: curr/max: pd 3/16777216 cq 5/16777216 qp 4/262144 3: mlx

[PATCH iproute2-next v1 0/9] RDMA resource tracking

2018-01-03 Thread Leon Romanovsky
Changelog: v0 -> v1: * Fixed subject title in patch #1: rdam -> rdma. * Added newline between variable declaration and the code. * Add check to failure in strdup() call in rd_check_is_string_filtered(). * Rewrote res_qp_parse_cb() to avoid long lines and extra indentation. ---

[PATCH iproute2-next v1 2/9] rdma: Make visible the number of arguments

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 1 + rdma/utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index cbd9aa89..1b66ae04 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -74,6 +74,7 @@ int rd_exec_cmd(struct

[PATCH iproute2-next v1 5/9] rdma: Allow external usage of compare string routine

2018-01-03 Thread Leon Romanovsky
From: Leon Romanovsky Signed-off-by: Leon Romanovsky --- rdma/rdma.h | 2 ++ rdma/utils.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index e842d076..816c8ddd 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -84,6 +84,8 @@ void rd_free(struct rd

Issue with commit fea23fb591cc "net: phy: convert read-modify-write to phy_modify()"

2018-01-03 Thread Heiner Kallweit
Parameter mask of phy_modify() holds the bits to be cleared. In the mentioned commit parameter mask seems to be inverted in few cases, what IMO is wrong (see example). Maybe I miss something, could you please check? And somehow related: When adding such helpers, wouldn't it make sense to add helpe

Re: [patch net-next v4 00/10] net: sched: allow qdiscs to share filter block instances

2018-01-03 Thread Jiri Pirko
Thu, Jan 04, 2018 at 12:51:52AM CET, kubak...@wp.pl wrote: >On Wed, 3 Jan 2018 18:22:09 +0100, Jiri Pirko wrote: >> However I don't agree about breaking the existing filter add and show >> and also imposibility to make not-shared block shared in the runtime >> before defining it first. > >FWIW I wo

Re: KASAN: use-after-free Read in __dev_queue_xmit

2018-01-03 Thread Eric Dumazet
On Wed, 2018-01-03 at 21:13 -0800, Eric Dumazet wrote: > Note: all commands must start from beginning of the line in the email body. > > I guess skb_probe_transport_header() should be hardened to reject malicious > packets given by user space, instead of being gentle. Although bug triggered for t

[PATCH net-next 0/3] net: dsa: Move padding into Broadcom tagger

2018-01-03 Thread Florian Fainelli
Hi all, This patch series moves the padding of short packets to where it belongs within the DSA Broadcom tagger code, I just found myself doing this for a third driver, which was a clear indication this was wrong and did not scale. Florian Fainelli (3): net: dsa: Move padding into Broadcom tagg

[PATCH net-next 3/3] net: bgmac: Remove short packet padding for DSA

2018-01-03 Thread Florian Fainelli
DSA now correctly pads short packets within net/dsa/tag_brcm.c such that this it is no longer necessary to do this within bgmac. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bgmac.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/net/ethernet/broa

[PATCH net-next 1/3] net: dsa: Move padding into Broadcom tagger

2018-01-03 Thread Florian Fainelli
Instead of having the different master network device drivers potentially used by DSA/Broadcom tags, move the padding necessary for the switches to accept short packets where it makes most sense: within tag_brcm.c. This avoids multiplying the number of similar commits to e.g: bgmac, bcmsysport, etc

[PATCH net-next 2/3] net: systemport: Remove short packet padding

2018-01-03 Thread Florian Fainelli
Short packet padding added to the driver is only necessary when using Broadcom tags, but since this is now taken care of net/dsa/tag_brcm.c, we are guaranteed being given correctly padded packets. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 12 1

[PATCH net] net: dsa: b53: Turn off Broadcom tags for more switches

2018-01-03 Thread Florian Fainelli
Models such as BCM5395/97/98 and BCM53125/24/53115 and compatible require that we turn on managed mode to actually act on Broadcom tags, otherwise they just pass them through on ingress (host -> switch) and don't insert them in egress (switch -> host). Turning on managed mode is simple, but require

Re: [PATCHv4 0/2] capability controlled user-namespaces

2018-01-03 Thread महेश बंडेवार
On Wed, Jan 3, 2018 at 8:44 AM, Eric W. Biederman wrote: > Mahesh Bandewar writes: > >> From: Mahesh Bandewar >> >> TL;DR version >> - >> Creating a sandbox environment with namespaces is challenging >> considering what these sandboxed processes can engage into. e.g. >> CVE-2017-6074

[PATCH v3 3/3] qemu: add linkspeed and duplex settings to virtio-net

2018-01-03 Thread Jason Baron
Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', this requires custom ethtool commands for virtio-net by default. Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows the hypervisor to export a linkspeed and duplex setting. The user can subsequently over

[PATCH v3 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

2018-01-03 Thread Jason Baron
We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net. The ability to set linkspeed and duplex is useful in v

[PATCH net-next v3 1/3] virtio_net: propagate linkspeed/duplex settings from the hypervisor

2018-01-03 Thread Jason Baron
The ability to set speed and duplex for virtio_net is useful in various scenarios as described here: 16032be virtio_net: add ethtool support for set and get of settings However, it would be nice to be able to set this from the hypervisor, such that virtio_net doesn't require custom guest ethtool

[PATCH v3 2/3] qemu: virtio-net: use 64-bit values for feature flags

2018-01-03 Thread Jason Baron
In prepartion for using some of the high order feature bits, make sure that virtio-net uses 64-bit values everywhere. Signed-off-by: Jason Baron Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtio-...@lists.oasis-open.org --- hw/net/virtio-net.c| 54 +

Re: KASAN: use-after-free Read in __dev_queue_xmit

2018-01-03 Thread Eric Dumazet
On Wed, Jan 3, 2018 at 8:58 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 37759fa6d0fa9e4d6036d19ac12f555bfc0aeafd > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is a

Re: [PATCH net v2 1/2] sctp: do not retransmit upon FragNeeded if PMTU discovery is disabled

2018-01-03 Thread Xin Long
On Thu, Jan 4, 2018 at 6:59 AM, Marcelo Ricardo Leitner wrote: > Currently, if PMTU discovery is disabled on a given transport, but the > configured value is higher than the actual PMTU, it is likely that we > will get some icmp Frag Needed. The issue is, if PMTU discovery is > disabled, we won't

Re: b53 tags on bpi-r1 (bcm53125)

2018-01-03 Thread Florian Fainelli
On 12/29/2017 07:22 PM, Florian Fainelli wrote: > Le 12/29/17 à 13:56, Florian Fainelli a écrit : >> Le 12/29/17 à 12:21, Florian Fainelli a écrit : >>> Hi Jochen, >>> >>> Le 12/18/17 à 02:44, Jochen Friedrich a écrit : Hi Florian, unfortunately, this doesn't make any difference. >>>

Re: [PATCH v2] openvswitch: Trim off padding before L3+ netfilter processing

2018-01-03 Thread Ed Swierk
On Fri, Dec 22, 2017 at 3:31 PM, Pravin Shelar wrote: > On Thu, Dec 21, 2017 at 7:17 AM, Ed Swierk wrote: >> IPv4 and IPv6 packets may arrive with lower-layer padding that is not >> included in the L3 length. For example, a short IPv4 packet may have >> up to 6 bytes of padding following the IP p

RE: [Intel-wired-lan] [PATCH] igb: Delete an error message for a failed memory allocation in igb_enable_sriov()

2018-01-03 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of SF Markus Elfring > Sent: Monday, January 1, 2018 11:57 AM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org; Kirsher, > Jeffrey T > Cc: kernel-janit...@vger.kernel.org; LKML > Subject: [Intel-wired-la

[PATCH net-next V2 0/2] XDP transmission for tuntap

2018-01-03 Thread Jason Wang
Hi all: This series tries to implement XDP transmission (ndo_xdp_xmit) for tuntap. Pointer ring was used for queuing both XDP buffers and sk_buff, this is done by encoding the type into lowest bit of the pointer and storin XDP metadata in the headroom of XDP buff. Tests gets 3.05 Mpps when doing

[PATCH net-next V2 1/2] tun/tap: use ptr_ring instead of skb_array

2018-01-03 Thread Jason Wang
This patch switches to use ptr_ring instead of skb_array. This will be used to enqueue different types of pointers by encoding type into lower bits. Signed-off-by: Jason Wang --- drivers/net/tap.c | 41 + drivers/net/tun.c | 42 ++

[PATCH net-next V2 2/2] tuntap: XDP transmission

2018-01-03 Thread Jason Wang
This patch implements XDP transmission for TAP. Since we can't create new queues for TAP during XDP set, exist ptr_ring was reused for queuing XDP buffers. To differ xdp_buff from sk_buff, TUN_XDP_FLAG (0x1UL) was encoded into lowest bit of xpd_buff pointer during ptr_ring_produce, and was decoded

Re: [RFC PATCH] asm/generic: introduce if_nospec and nospec_barrier

2018-01-03 Thread Alexei Starovoitov
On Thu, Jan 04, 2018 at 02:15:53AM +, Alan Cox wrote: > > > > Elena has done the work of auditing static analysis reports to a dozen > > > or so locations that need some 'nospec' handling. > > > > How exactly is that related (especially in longer-term support terms) to > > BPF anyway? > >

Re: "lockless" qdisc breaks tx_queue_len change too?

2018-01-03 Thread John Fastabend
On 01/03/2018 03:41 PM, Cong Wang wrote: > On Wed, Jan 3, 2018 at 10:09 AM, John Fastabend > wrote: >> On 01/02/2018 08:41 PM, Cong Wang wrote: >>> Hi, John >>> >>> While reviewing your ptr_ring fix again today, it looks like your >>> "lockless" qdisc patchset breaks dev->tx_queue_len behavior. >>

[PATCH net,stable 1/1] net: fec: free/restore resource in related probe error pathes

2018-01-03 Thread Fugang Duan
Fixes in probe error path: - Restore dev_id before failed_ioremap path. Fixes: ("net: fec: restore dev_id in the cases of probe error") - Call of_node_put(phy_node) before failed_phy path. Fixes: ("net: fec: Support phys probed from devicetree and fixed-link") Signed-off-by: Fugang Duan ---

[PATCH net-next 2/2] net: revert "Update RFS target at poll for tcp/udp"

2018-01-03 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh On multi-threaded processes, one common architecture is to have one (or a small number of) threads polling sockets, and a considerably larger pool of threads reading form and writing to the sockets. When we set RPS core on tcp_poll() or udp_poll() we essentially steer

[PATCH net-next 1/2] ip: do not set RFS core on error queue reads

2018-01-03 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh We should only record RPS on normal reads and writes. In single threaded processes, all calls record the same state. In multi-threaded processes where a separate thread processes errors, the RFS table mispredicts. Note that, when CONFIG_RPS is disabled, sock_rps_recor

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-03 Thread David Ahern
On 1/3/18 11:05 AM, Arkadi Sharshevsky wrote: > > > On 01/02/2018 08:05 PM, David Ahern wrote: >> On 1/1/18 7:58 AM, Arkadi Sharshevsky wrote: >>> >>> Just to summarize the current fixes required: >>> >>> 1. ERIF dpipe table size is reporting wrong size. More precisely the >>>ERIF table does

RE: [PATCH v3 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread Andy Duan
From: David Miller Sent: Thursday, January 04, 2018 10:23 AM >> The simple patches just clean up in the cases of probe error like >> restore dev_id and handle the defer probe when regulator is still not ready. > >As I stated, v2 of these patches are already in my tree, so this patch series >will

Re: [PATCH v3 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread David Miller
From: Fugang Duan Date: Thu, 4 Jan 2018 10:15:27 +0800 > The simple patches just clean up in the cases of probe error like restore > dev_id and > handle the defer probe when regulator is still not ready. As I stated, v2 of these patches are already in my tree, so this patch series will not appl

Re: [PATCH v2 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread David Miller
From: Andy Duan Date: Thu, 4 Jan 2018 02:07:40 + > Sorry, pls hold on apply these series, there have one comment from > Troy kisky, sorry for the inconvenience due to my mistake. Once I have applied patches, they are there in my GIT tree and and cannot be "undone". You have to send me relat

[PATCH v3 net,stable 1/2] net: fec: restore dev_id in the cases of probe error

2018-01-03 Thread Fugang Duan
The static variable dev_id always plus one before netdev registerred. It should restore the dev_id value in the cases of probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fec_ma

[PATCH v3 net,stable 2/2] net: fec: defer probe if regulator is not ready

2018-01-03 Thread Fugang Duan
Defer probe if regulator is not ready. E.g. some regulator is fixed regulator controlled by i2c expander gpio, the i2c device may be probed after the driver, then it should handle the case of defer probe error. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 4 1

[PATCH v3 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread Fugang Duan
The simple patches just clean up in the cases of probe error like restore dev_id and handle the defer probe when regulator is still not ready. v2: * Fabio Estevam's comment to suggest split v1 to separate patches. v3: * Restore dev_id before failed_ioremap path from Troy Kisky's comment. Fugang

Re: [PATCH net-next] net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set

2018-01-03 Thread Cong Wang
On Wed, Jan 3, 2018 at 5:30 PM, Jakub Kicinski wrote: > From: Quentin Monnet > > The definition of functions tcf_block_get() and tcf_block_get_ext() > depends of CONFIG_NET_CLS being set. When those functions gained extack > support, only one version of the declaration of those functions was > up

RE: [PATCH v2 net,stable 0/2] net: fec: clean up in the cases of probe error

2018-01-03 Thread Andy Duan
From: David Miller Sent: Thursday, January 04, 2018 12:41 AM >> The simple patches just clean up in the cases of probe error like >> restore dev_id and handle the defer probe when regulator is still not ready. >> >> v2: >> * Fabio Estevam's comment to suggest split v1 to separate patches. > >Seri

[net-next PATCH 1/2] bpf: sockmap remove unused function

2018-01-03 Thread John Fastabend
This was added for some work that was eventually factored out but the helper call was missed. Remove it now and add it back later if needed. Signed-off-by: John Fastabend --- kernel/bpf/sockmap.c |8 1 file changed, 8 deletions(-) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sock

[net-next PATCH 2/2] bpf: only build sockmap with CONFIG_INET

2018-01-03 Thread John Fastabend
The sockmap infrastructure is only aware of TCP sockets at the moment. In the future we plan to add UDP. In both cases CONFIG_NET should be built-in. So lets only build sockmap if CONFIG_INET is enabled. Signed-off-by: John Fastabend --- include/linux/bpf.h |2 +- include/linux/bpf_ty

[PATCH net-next] net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set

2018-01-03 Thread Jakub Kicinski
From: Quentin Monnet The definition of functions tcf_block_get() and tcf_block_get_ext() depends of CONFIG_NET_CLS being set. When those functions gained extack support, only one version of the declaration of those functions was updated. Function tcf_block_get() was later fixed with commit 3c1490

Re: [PATCH] net/mlx5e: hide an unused variable

2018-01-03 Thread Saeed Mahameed
On 1/3/2018 2:40 PM, Arnd Bergmann wrote: The uplink_rpriv variable was added at the start of the function but only used inside of an #ifdef: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function 'mlx5e_route_lookup_ipv6': drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:1549:25: error:

Re: [wireless-testsing2:master 1/4] drivers/net/netdevsim/bpf.c:130:14: sparse: incompatible types for 'case' statement

2018-01-03 Thread Jakub Kicinski
On Thu, 4 Jan 2018 03:53:20 +0800, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git > master > head: 6b3b30d0c31ddb2f4d8208c90bc2b4adef47204d > commit: af2cae39f6ab9dc596616d6a28c7772e1dd55e91 [1/4] Merge remote-tracking > branc

Re: [PATCH net-next 0/2] Enable virtio to act as a master for a passthru device

2018-01-03 Thread Samudrala, Sridhar
On 1/3/2018 10:28 AM, Alexander Duyck wrote: On Wed, Jan 3, 2018 at 10:14 AM, Samudrala, Sridhar wrote: On 1/3/2018 8:59 AM, Alexander Duyck wrote: On Tue, Jan 2, 2018 at 6:16 PM, Jakub Kicinski wrote: On Tue, 2 Jan 2018 16:35:36 -0800, Sridhar Samudrala wrote: This patch series enables v

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-03 Thread Arkadi Sharshevsky
On 01/03/2018 08:29 PM, David Ahern wrote: > On 1/3/18 11:17 AM, Jiri Pirko wrote: >> Wed, Jan 03, 2018 at 07:14:16PM CET, d...@cumulusnetworks.com wrote: >>> On 1/3/18 11:05 AM, Arkadi Sharshevsky wrote: As I stated this is a user-space bug which I fixed, and updated my repo so please

Re: [PATCH bpf-next v4 1/3] libbpf: add function to setup XDP

2018-01-03 Thread Eric Leblond
Hello, On Sat, 2017-12-30 at 21:41 +0100, Eric Leblond wrote: > Most of the code is taken from set_link_xdp_fd() in bpf_load.c and > slightly modified to be library compliant. I've just discovered this patch is breaking the build of samples/bpf/ (nlattr not included at least and some int type pro

Re: [patch net-next v4 00/10] net: sched: allow qdiscs to share filter block instances

2018-01-03 Thread Jakub Kicinski
On Wed, 3 Jan 2018 18:22:09 +0100, Jiri Pirko wrote: > However I don't agree about breaking the existing filter add and show > and also imposibility to make not-shared block shared in the runtime > before defining it first. FWIW I would agree with David that allowing add on a shared block modify f

Re: WARNING in sk_stream_kill_queues (2)

2018-01-03 Thread Cong Wang
#syz dup: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

Re: "lockless" qdisc breaks tx_queue_len change too?

2018-01-03 Thread Cong Wang
On Wed, Jan 3, 2018 at 10:09 AM, John Fastabend wrote: > On 01/02/2018 08:41 PM, Cong Wang wrote: >> Hi, John >> >> While reviewing your ptr_ring fix again today, it looks like your >> "lockless" qdisc patchset breaks dev->tx_queue_len behavior. >> >> Before your patchset, dev->tx_queue_len is mer

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-03 Thread Cong Wang
On Wed, Jan 3, 2018 at 12:55 PM, Ozgur wrote: > > > 03.01.2018, 21:57, "Cong Wang" : >> On Tue, Jan 2, 2018 at 3:58 PM, syzbot >> wrote: >>> Hello, >>> >>> syzkaller hit the following crash on >>> 61233580f1f33c50e159c50e24d80ffd2ba2e06b >>> git://git.kernel.org/pub/scm/linux/kernel/git/torva

Re: [RFC PATCH net-next 03/19] ipv6: Clear nexthop flags upon netdev up

2018-01-03 Thread David Ahern
On 1/3/18 1:53 PM, Ido Schimmel wrote: > On Wed, Jan 03, 2018 at 11:47:16AM -0700, David Ahern wrote: >> On 1/3/18 10:40 AM, Ido Schimmel wrote: >>> David, can we please get back to the issue at hand? What's the problem >>> with the location of the call to rt6_sync_up()? >> >> My original comment w

[PATCH net v2 2/2] sctp: fix the handling of ICMP Frag Needed for too small MTUs

2018-01-03 Thread Marcelo Ricardo Leitner
syzbot reported a hang involving SCTP, on which it kept flooding dmesg with the message: [ 246.742374] sctp: sctp_transport_update_pmtu: Reported pmtu 508 too low, using default minimum of 512 That happened because whenever SCTP hits an ICMP Frag Needed, it tries to adjust to the new MTU and trig

[PATCH net v2 1/2] sctp: do not retransmit upon FragNeeded if PMTU discovery is disabled

2018-01-03 Thread Marcelo Ricardo Leitner
Currently, if PMTU discovery is disabled on a given transport, but the configured value is higher than the actual PMTU, it is likely that we will get some icmp Frag Needed. The issue is, if PMTU discovery is disabled, we won't update the information and will issue a retransmission immediately, whic

[PATCH net v2 0/2] SCTP PMTU discovery fixes

2018-01-03 Thread Marcelo Ricardo Leitner
This patchset fixes 2 issues with PMTU discovery that can lead to flood of retransmissions. The first patch fixes the issue for when PMTUD is disabled by the application, while the second fixes it for when its enabled. Please consider these to stable. Thanks, Marcelo Ricardo Leitner (2): sctp:

[PATCH net-next 0/4] l2tp: remove configurable offset parameters

2018-01-03 Thread James Chapman
This patch series removes all code to support a configurable offset in transmitted l2tp packets. Code to handle this is incomplete and buggy and has been this way for years. If anyone tried to configure an offset, it would be ignored for L2TPv2 tunnels, or for L2TPv3 tunnels, could result in L2TPv3

[PATCH net-next 4/4] l2tp: add comment in API header that L2TP_ATTR_OFFSET is not used

2018-01-03 Thread James Chapman
Signed-off-by: James Chapman --- include/uapi/linux/l2tp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/l2tp.h b/include/uapi/linux/l2tp.h index d84ce5c..f78eef4 100644 --- a/include/uapi/linux/l2tp.h +++ b/include/uapi/linux/l2tp.h @@ -94,7 +94,7 @@ enum

[PATCH net-next 2/4] l2tp: revert "l2tp: fix missing print session offset info"

2018-01-03 Thread James Chapman
Revert commit 820da5357572 ("l2tp: fix missing print session offset info"). The peer_offset parameter is removed. Signed-off-by: James Chapman --- net/l2tp/l2tp_netlink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index 7e9c501..a1f24f

[PATCH net-next 3/4] l2tp: remove configurable payload offset

2018-01-03 Thread James Chapman
If L2TP_ATTR_OFFSET is set to a non-zero value in L2TPv3 tunnels, it results in L2TPv3 packets being transmitted which might not be compliant with the L2TPv3 RFC. This patch has l2tp ignore the offset setting and send all packets with no offset. In more detail: L2TPv2 supports a variable offset f

[PATCH net-next 1/4] l2tp: revert "l2tp: add peer_offset parameter"

2018-01-03 Thread James Chapman
Revert commit f15bc54eeecd ("l2tp: add peer_offset parameter"). This is removed because it is adding another configurable offset and configurable offsets are being removed. Signed-off-by: James Chapman --- include/uapi/linux/l2tp.h | 1 - net/l2tp/l2tp_core.c | 3 +-- net/l2tp/l2tp_core.h

Re: [PATCH net-next v2 05/10] net: qualcomm: rmnet: Set pacing rate

2018-01-03 Thread Subash Abhinov Kasiviswanathan
+ sk_pacing_shift_update(skb->sk, 8); Well... Please tell us why this is needed in this driver. This interface is meant for wifi aggregation, not to work around some strange ethernet drivers designs. Hi Eric The real device over which the rmnet devices are installed also aggregate mult

[PATCH] net/mlx5e: hide an unused variable

2018-01-03 Thread Arnd Bergmann
The uplink_rpriv variable was added at the start of the function but only used inside of an #ifdef: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function 'mlx5e_route_lookup_ipv6': drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:1549:25: error: unused variable 'uplink_rpriv' [-Werror=unus

Re: Linux ECN Handling

2018-01-03 Thread Steve Ibanez
Hi Neal, I've attached a pdf of a slide that I made which shows some data from the kernel log at the receiver as well as the timestamp, SeqNo, and length of the corresponding segments from the tcpdump trace at the receiver interface. Hopefully this helps clarify why I think tcp_transmit_skb() is c

uapi/if_ether.h: prevent redefinition of struct ethhdr

2018-01-03 Thread Hauke Mehrtens
Musl provides its own ethhdr struct definition. Add a guard to prevent its definition of the appropriate musl header has already been included. glibc does not implement this header, but when glibc will implement this they can just define __UAPI_DEF_ETHHDR 0 to make it work with the kernel. Signed

[PATCH net] ipv6: fix general protection fault in fib6_add()

2018-01-03 Thread Wei Wang
From: Wei Wang In fib6_add(), pn could be NULL if fib6_add_1() failed to return a fib6 node. Checking pn != fn before accessing pn->leaf makes sure pn is not NULL. This fixes the following GPF reported by syzkaller: general protection fault: [#1] SMP KASAN Dumping ftrace buffer: (ftrace b

Re: [PATCH net-next v2 05/10] net: qualcomm: rmnet: Set pacing rate

2018-01-03 Thread Eric Dumazet
On Wed, 2018-01-03 at 14:43 -0700, Subash Abhinov Kasiviswanathan wrote: > With a default pacing rate of 10, the uplink data rate for a single > TCP stream is around 10Mbps. Setting it to 8 increases it to 146Mbps > which is the maximum supported transmit rate. > > Signed-off-by: Subash Abhinov Ka

Re: bonding: Delete an error message for a failed memory allocation in bond_update_slave_arr()

2018-01-03 Thread Eric Dumazet
On Wed, 2018-01-03 at 11:28 -0800, Mahesh Bandewar (महेश बंडेवार) wrote: > On Wed, Jan 3, 2018 at 12:45 AM, SF Markus Elfring > wrote: > > > > Omit an extra message for a memory allocation failure in this function. > > > > > > > > This issue was detected by using the Coccinelle software. > > > >

[PATCH net-next v2 04/10] net: qualcomm: rmnet: Rename ingress data format to data format

2018-01-03 Thread Subash Abhinov Kasiviswanathan
This is done so that we can use this field for both ingress and egress flags. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 10 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/

[PATCH net-next v2 10/10] net: qualcomm: rmnet: Add support for GSO

2018-01-03 Thread Subash Abhinov Kasiviswanathan
Real devices may support scatter gather(SG), so enable SG on rmnet devices to use GSO. GSO reduces CPU cycles by 20% for a rate of 146Mpbs for a single stream TCP connection. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 1 + 1 file changed,

[PATCH net-next v2 09/10] net: qualcomm: rmnet: Add support for TX checksum offload

2018-01-03 Thread Subash Abhinov Kasiviswanathan
TX checksum offload applies to TCP / UDP packets which are not fragmented using the MAPv4 checksum trailer. The following needs to be done to have checksum computed in hardware - 1. Set the checksum start offset and inset offset. 2. Set the csum_enabled bit 3. Compute and set 1's complement of par

[PATCH net-next v2 03/10] net: qualcomm: rmnet: Remove unused function declaration

2018-01-03 Thread Subash Abhinov Kasiviswanathan
rmnet_map_demultiplex() is only declared but not defined anywhere, so remove it. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h b/drivers/net/eth

[PATCH net-next v2 06/10] net: qualcomm: rmnet: Define the MAPv4 packet formats

2018-01-03 Thread Subash Abhinov Kasiviswanathan
The MAPv4 packet format adds support for RX / TX checksum offload. For a bi-directional UDP stream at a rate of 570 / 146 Mbps, roughly 10% CPU cycles are saved. For receive path, there is a checksum trailer appended to the end of the MAP packet. The valid field indicates if hardware has computed

[PATCH net-next v2 02/10] net: qualcomm: rmnet: Remove invalid condition while stamping mux id

2018-01-03 Thread Subash Abhinov Kasiviswanathan
rmnet devices cannot have a mux id of 255. This is validated when assigning the mux id to the rmnet devices. As a result, checking for mux id 255 does not apply in egress path. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 + 1 fil

[PATCH net-next v2 07/10] net: qualcomm: rmnet: Add support for RX checksum offload

2018-01-03 Thread Subash Abhinov Kasiviswanathan
When using the MAPv4 packet format, receive checksum offload can be enabled in hardware. The checksum computation over pseudo header is not offloaded but the rest of the checksum computation over the payload is offloaded. This applies only for TCP / UDP packets which are not fragmented. rmnet vali

[PATCH net-next v2 00/10] net: qualcomm: rmnet: Enable csum offloads

2018-01-03 Thread Subash Abhinov Kasiviswanathan
This series introduces the MAPv4 packet format for checksum offload plus some other minor changes. Patches 1-3 are cleanups. Patch 4 renames the ingress format to data format so that all data formats can be configured using this going forward. Patch 5 uses the pacing helper to improve TCP transm

[PATCH net-next v2 05/10] net: qualcomm: rmnet: Set pacing rate

2018-01-03 Thread Subash Abhinov Kasiviswanathan
With a default pacing rate of 10, the uplink data rate for a single TCP stream is around 10Mbps. Setting it to 8 increases it to 146Mbps which is the maximum supported transmit rate. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 +++ 1

[PATCH net-next v2 08/10] net: qualcomm: rmnet: Handle command packets with checksum trailer

2018-01-03 Thread Subash Abhinov Kasiviswanathan
When using the MAPv4 packet format in conjunction with MAP commands, a dummy DL checksum trailer will be appended to the packet. Before this packet is sent out as an ACK, the DL checksum trailer needs to be removed. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/

[PATCH net-next v2 01/10] net: qualcomm: rmnet: Remove redundant check when stamping map header

2018-01-03 Thread Subash Abhinov Kasiviswanathan
We already check the headroom once in rmnet_map_egress_handler(), so this is not needed. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data

Re: [PATCHv5 1/3] dt-bindings: net: Add DT bindings for Socionext Netsec

2018-01-03 Thread Ard Biesheuvel
Hi Jassi, On 1 January 2018 at 05:14, wrote: > From: Jassi Brar > > This patch adds documentation for Device-Tree bindings for the > Socionext NetSec Controller driver. > > Signed-off-by: Jassi Brar > Signed-off-by: Ard Biesheuvel > --- > .../devicetree/bindings/net/socionext-netsec.txt |

  1   2   3   4   >