[PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer

2017-09-21 Thread Jason Wang
We should set xdp_xmit only when xdp_do_redirect() succeed. Cc: John Fastabend Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f6c1f13..dd14a45 100644 --- a/drive

Re: [patch net-next 03/12] ipmr: Add FIB notification access functions

2017-09-21 Thread Yotam Gigi
On 09/21/2017 02:19 PM, Nikolay Aleksandrov wrote: > On 21/09/17 09:43, Jiri Pirko wrote: >> From: Yotam Gigi >> >> Make the ipmr module register as a FIB notifier. To do that, implement both >> the ipmr_seq_read and ipmr_dump ops. >> >> The ipmr_seq_read op returns a sequence counter that is incr

Re: [PATCH 00/64] use setup_timer() helper function.

2017-09-21 Thread Allen
> >> This series uses setup_timer() helper function. The series >> addresses the files under drivers/net/*. > > I've reviewed this series and will apply it to net-next. > > But please send out smaller chunks next time, maybe 10-15 > in a bunch? 64 patches at once makes it really hard for > review

Re: tg3 pxe weirdness

2017-09-21 Thread Siva Reddy Kallam
On Thu, Sep 21, 2017 at 7:53 PM, Berend De Schouwer wrote: > Hi, > > I've got a machine with a Broadcom bcm5762c, using the tg3 driver, that > fails to receive network packets under some very specific conditions. > > It works perfectly using a 1Gbps switch. If, however, it first uses > PXE and th

[PATCH net-next v2 3/6] rtnetlink: add helper to dump qdisc name

2017-09-21 Thread Florian Westphal
We can use rcu here to make this safe even if we would not hold rtnl: qdisc_destroy uses call_rcu to free the Qdisc struct. Signed-off-by: Florian Westphal --- net/core/rtnetlink.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/net/core/rtnetlink.c b/net/co

[PATCH net-next v2 4/6] rtnetlink: add helper to dump ifalias

2017-09-21 Thread Florian Westphal
ifalias is currently protected by rtnl mutex, add assertion as a reminder. Signed-off-by: Florian Westphal --- net/core/rtnetlink.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index ad3f27da37a8..42ff582a010e 1006

[PATCH net-next v2 6/6] rtnetlink: rtnl_have_link_slave_info doesn't need rtnl

2017-09-21 Thread Florian Westphal
Switch it to rcu. rtnl_link_slave_info_fill on to other hand does need rtnl mutex for now so add an annotation to its caller as a reminder. Signed-off-by: Florian Westphal --- Change since v1: - don't add ASSERT_RTNL to rtnl_link_slave_info_fill and rtnl_link_info_fill they are only called

[PATCH net-next v2 5/6] rtnetlink: add helpers to dump vf and netnsid information

2017-09-21 Thread Florian Westphal
similar to earlier patches, split out more parts of this function to better see what is happening and where we assume rtnl is locked. Signed-off-by: Florian Westphal --- net/core/rtnetlink.c | 80 1 file changed, 50 insertions(+), 30 deletions

[PATCH net-next v2 2/6] rtnetlink: add helper to put master ifindex

2017-09-21 Thread Florian Westphal
rtnl_fill_ifinfo currently requires caller to hold the rtnl mutex. Unfortunately the function is quite large which makes it harder to see which spots need the lock, which spots assume it and which ones could do without. Add helpers to factor out the ifindex dumping. One helper can use rcu to remo

[PATCH net-next v2 0/6] rtnetlink: preparation patches for further rtnl lock pushdown/removal

2017-09-21 Thread Florian Westphal
First patch adds a rudimentary vrf test case. Remaining patches split large rtnl_fill_ifinfo into smaller chunks to better see which parts 1. require rtnl 2. do not require it at all 3. rely on rtnl locking now but could be converted changes since v2: - fix subject lines of patches 2 and 5 - dro

[PATCH net-next v2 1/6] selftests: rtnetlink.sh: add rudimentary vrf test

2017-09-21 Thread Florian Westphal
Cc: David Ahern Signed-off-by: Florian Westphal --- tools/testing/selftests/net/rtnetlink.sh | 42 1 file changed, 42 insertions(+) diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 4b48de565cae..6ee2bbaebcd4

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-21 Thread Johannes Berg
On Thu, 2017-09-21 at 23:56 +0100, Colin King wrote: > From: Colin Ian King > > Don't populate const array ac_to_fifo on the stack in an inlined > function, instead make it static.  Makes the object code smaller > by over 800 bytes: > >    text    data bss dec hex > filename >

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-21 Thread Jason Wang
On 2017年09月21日 06:02, John Fastabend wrote: On 09/19/2017 02:42 AM, Jason Wang wrote: This patch tries to add XDP_REDIRECT for virtio-net. The changes are not complex as we could use exist XDP_TX helpers for most of the work. The rest is passing the XDP_TX to NAPI handler for implementing batc

Re: Regression in throughput between kvm guests over virtual bridge

2017-09-21 Thread Jason Wang
On 2017年09月21日 03:38, Matthew Rosato wrote: Seems to make some progress on wakeup mitigation. Previous patch tries to reduce the unnecessary traversal of waitqueue during rx. Attached patch goes even further which disables rx polling during processing tx. Please try it to see if it has any diff

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread David Miller
From: Yunsheng Lin Date: Fri, 22 Sep 2017 09:57:31 +0800 > Hi, David > > On 2017/9/22 9:41, David Miller wrote: >> From: Yunsheng Lin >> Date: Thu, 21 Sep 2017 19:21:44 +0800 >> >>> @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct hclge_dev *hdev) >>> return 0; >>> } >>> >>>

Re: [PATCH net-next] test_rhashtable: remove initdata annotation

2017-09-21 Thread David Miller
From: Florian Westphal Date: Thu, 21 Sep 2017 17:36:08 +0200 > kbuild test robot reported a section mismatch warning w. gcc 4.x: > WARNING: lib/test_rhashtable.o(.text+0x139e): > Section mismatch in reference from the function rhltable_insert.clone.3() to > the variable .init.data:rhlt > > so r

Re: [PATCH net] net: prevent dst uses after free

2017-09-21 Thread David Miller
From: Eric Dumazet Date: Thu, 21 Sep 2017 09:15:46 -0700 > From: Eric Dumazet > > In linux-4.13, Wei worked hard to convert dst to a traditional > refcounted model, removing GC. > > We now want to make sure a dst refcount can not transition from 0 back > to 1. > > The problem here is that inp

Re: [PATCH] net: phy: Fix truncation of large IRQ numbers in phy_attached_print()

2017-09-21 Thread David Miller
From: Geert Uytterhoeven Date: Thu, 21 Sep 2017 13:27:02 +0200 > Given NR_IRQS is 2048 on sparc64, and even 32784 on alpha, 3 digits is > not enough to represent interrupt numbers on all architectures. Hence > PHY interrupt numbers may be truncated during printing. > > Increase the buffer size

Re: [PATCH net-next] net: vrf: remove skb_dst_force() after skb_dst_set()

2017-09-21 Thread David Miller
From: Eric Dumazet Date: Thu, 21 Sep 2017 07:50:28 -0700 > From: Eric Dumazet > > skb_dst_set(skb, dst) installs a normal (refcounted) dst, there is no > point using skb_dst_force(skb) > > Signed-off-by: Eric Dumazet Applied, thanks Eric.

RE: [net-next 2/2] ifb: add device MTU validation check

2017-09-21 Thread 张胜举
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: 2017年9月21日 23:10 > To: Zhang Shengju > Cc: da...@davemloft.net; will...@google.com; netdev@vger.kernel.org > Subject: Re: [net-next 2/2] ifb: add device MTU validation check > > On Thu, 21 Sep 2017

RE: [net-next 1/2] dummy: add device MTU validation check

2017-09-21 Thread 张胜举
> -Original Message- > From: Eric Dumazet [mailto:eric.duma...@gmail.com] > Sent: 2017年9月21日 23:02 > To: Zhang Shengju > Cc: da...@davemloft.net; will...@google.com; > step...@networkplumber.org; netdev@vger.kernel.org > Subject: Re: [net-next 1/2] dummy: add device MTU validation check >

Re: [PATCH v3 09/31] jfs: Define usercopy region in jfs_ip slab cache

2017-09-21 Thread Dave Kleikamp
Acked-by: Dave Kleikamp On 09/20/2017 03:45 PM, Kees Cook wrote: > From: David Windsor > > The jfs symlink pathnames, stored in struct jfs_inode_info.i_inline and > therefore contained in the jfs_ip slab cache, need to be copied to/from > userspace. > > cache object allocation: > fs/jfs/su

[PATCH net-next v2] net: Remove useless function skb_header_release

2017-09-21 Thread gfree . wind
From: Gao Feng There is no one which would invokes the function skb_header_release. So just remove it now. Signed-off-by: Gao Feng --- v2: Correct some comments, per Joe v1: initial version drivers/net/usb/asix_common.c | 2 +- include/linux/skbuff.h | 19 --- ne

[PATCH,v2,net-next 2/2] tun: enable napi_gro_frags() for TUN/TAP driver

2017-09-21 Thread Petar Penkov
Add a TUN/TAP receive mode that exercises the napi_gro_frags() interface. This mode is available only in TAP mode, as the interface expects packets with Ethernet headers. Furthermore, packets follow the layout of the iovec_iter that was received. The first iovec is the linear data, and every one a

[PATCH,v2,net-next 0/2] Improve code coverage of syzkaller

2017-09-21 Thread Petar Penkov
This patch series is intended to improve code coverage of syzkaller on the early receive path, specifically including flow dissector, GRO, and GRO with frags parts of the networking stack. Syzkaller exercises the stack through the TUN driver and this is therefore where changes reside. Current cover

[PATCH,v2,net-next 1/2] tun: enable NAPI for TUN/TAP driver

2017-09-21 Thread Petar Penkov
Changes TUN driver to use napi_gro_receive() upon receiving packets rather than netif_rx_ni(). Adds flag IFF_NAPI that enables these changes and operation is not affected if the flag is disabled. SKBs are constructed upon packet arrival and are queued to be processed later. The new path was evalu

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread Yunsheng Lin
Hi, David On 2017/9/22 9:41, David Miller wrote: > From: Yunsheng Lin > Date: Thu, 21 Sep 2017 19:21:44 +0800 > >> @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct hclge_dev *hdev) >> return 0; >> } >> >> -static int hclge_cmd_alloc_tx_buff(struct hclge_dev *hdev, u16 buf_siz

Re: [v2,3/3] can: m_can: Add PM Runtime

2017-09-21 Thread Yang, Wenyou
Hi Franklin, On 2017/9/21 8:36, Franklin S Cooper Jr wrote: On 08/24/2017 03:30 AM, Sekhar Nori wrote: + OMAP mailing list On Tuesday 25 July 2017 04:21 AM, Franklin Cooper wrote: Add support for PM Runtime which is the new way to handle managing clocks. However, to avoid breaking SoCs not u

Re: [PATCH net-next 01/10] net: hns3: Support for dynamically assigning tx buffer to TC

2017-09-21 Thread David Miller
From: Yunsheng Lin Date: Thu, 21 Sep 2017 19:21:44 +0800 > @@ -1324,23 +1324,28 @@ static int hclge_alloc_vport(struct hclge_dev *hdev) > return 0; > } > > -static int hclge_cmd_alloc_tx_buff(struct hclge_dev *hdev, u16 buf_size) > +static int hclge_cmd_alloc_tx_buff(struct hclge_dev *

Re: linux-next: build failure after merge of the net-next tree

2017-09-21 Thread David Miller
From: Stephen Rothwell Date: Fri, 22 Sep 2017 11:03:55 +1000 > After merging the net-next tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > net/ipv4/fib_frontend.c: In function 'fib_validate_source': > net/ipv4/fib_frontend.c:411:16: error: 'struct netns_ipv4' has n

[no subject]

2017-09-21 Thread unsubscribe.me
<>

Re: [PATCH net] net/ncsi: Don't assume last available channel exists

2017-09-21 Thread David Miller
From: Samuel Mendoza-Jonas Date: Fri, 22 Sep 2017 11:00:00 +1000 > If we haven't configured a channel yet (or are in the process of doing > so) we won't have a hot_channel - does it make more sense to > - check against the hot_channel as currently done, > - only check the filter size at configure

linux-next: build failure after merge of the net-next tree

2017-09-21 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (arm multi_v7_defconfig) failed like this: net/ipv4/fib_frontend.c: In function 'fib_validate_source': net/ipv4/fib_frontend.c:411:16: error: 'struct netns_ipv4' has no member named 'fib_has_custom_local_routes' if (net->ipv4.f

Re: [PATCH net] net/ncsi: Don't assume last available channel exists

2017-09-21 Thread Samuel Mendoza-Jonas
On Wed, 2017-09-20 at 16:05 -0700, David Miller wrote: > From: Samuel Mendoza-Jonas > Date: Wed, 20 Sep 2017 14:12:51 +1000 > > > When handling new VLAN tags in NCSI we check the maximum allowed number > > of filters on the last active ("hot") channel. However if the 'add' > > callback is called

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 15:07 -0700, Florian Fainelli wrote: > On 09/21/2017 02:54 PM, Eric Dumazet wrote: > > On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > > > >> Would not this apply to pretty much any stacked device setup though? It > >> seems like any network device that just queu

[PATCH net] net: qualcomm: rmnet: Fix rcu splat in rmnet_is_real_dev_registered

2017-09-21 Thread Subash Abhinov Kasiviswanathan
Xiaolong reported a suspicious rcu_dereference_check in the device unregister notifier callback. Since we do not dereference the rx_handler_data, it's ok to just check for the value of the pointer. Note that this section is already protected by rtnl_lock. [ 101.364846] WARNING: suspicious RCU usa

[Patch net-next] net_sched: use idr to allocate u32 filter handles

2017-09-21 Thread Cong Wang
Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_u32.c | 108 1 file changed, 67 insertions(+), 41 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 10b8d851fc6b..316b8a791b13 100644 --- a/

[Patch net-next] net_sched: use idr to allocate basic filter handles

2017-09-21 Thread Cong Wang
Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_basic.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index d89ebafd2239..29da19eb6447 100644 --- a/net/sched/

[Patch net-next] net_sched: use idr to allocate bpf filter handles

2017-09-21 Thread Cong Wang
Cc: Daniel Borkmann Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/cls_bpf.c | 57 ++--- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c index 520c5027646a..4fd35

[net-next:master 42/46] net/ipv4/fib_frontend.c:411:16: error: 'struct netns_ipv4' has no member named 'fib_has_custom_local_routes'

2017-09-21 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: b6cd4b5895848968e8fee93fc5e3dc8babc40b9e commit: 6e617de84e87d626d1e976fc30e1322239fd4d2d [42/46] net: avoid a full fib lookup when rp_filter is disabled. config: x86_64-kexec (attached as .config) compiler:

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Y Song
On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: > On 21/09/17 20:44, Alexei Starovoitov wrote: >> On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: >>> More intuitive, but agree on the from_be/le. Maybe we should >>> just drop the "to_" prefix altogether, and leave the rest as

[PATCH] cnic: Fix an error handling path in 'cnic_alloc_bnx2x_resc()'

2017-09-21 Thread Christophe JAILLET
All the error handling paths 'goto error', except this one. We should also go to error in this case, or some resources will be leaking. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/broadcom/cnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ether

[PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-21 Thread Colin King
From: Colin Ian King Don't populate const array ac_to_fifo on the stack in an inlined function, instead make it static. Makes the object code smaller by over 800 bytes: textdata bss dec hex filename 159029 331541216 193399 2f377 4965-mac.o textdata bss

Re: [PATCH 1/1] net: usb: catc: use setup_timer() helper

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:24:15 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 1/1] net: ti: netcp: use setup_timer

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:32:58 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 1/1] net: wan : hdlc: use setup_timer() helper

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 18:17:55 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [PATCH 1/1] net:nfc: use setup_timer

2017-09-21 Thread David Miller
From: Allen Pais Date: Thu, 21 Sep 2017 16:29:33 +0530 > Use setup_timer function instead of initializing timer with the > function and data fields. > > Signed-off-by: Allen Pais Applied.

Re: [net-next v3] bridge: trigger RTM_NEWLINK when interface is modified by bridge ioctl

2017-09-21 Thread David Miller
From: Vincent Bernat Date: Thu, 21 Sep 2017 12:05:25 +0200 > Currently, there is a difference in netlink events received when an > interface is modified through bridge ioctl() or through netlink. This > patch generates additional events when an interface is added to or > removed from a bridge via

[PATCH net-next v2] bpf: Optimize lpm trie delete

2017-09-21 Thread Craig Gallek
From: Craig Gallek Before the delete operator was added, this datastructure maintained an invariant that intermediate nodes were only present when necessary to build the tree. This patch updates the delete operation to reinstate that invariant by removing unnecessary intermediate nodes after a n

Re: [PATCH net-next 12/14] gtp: Configuration for zero UDP checksum

2017-09-21 Thread Tom Herbert
On Wed, Sep 20, 2017 at 6:55 PM, Harald Welte wrote: > Hi Tom, > > On Wed, Sep 20, 2017 at 11:09:29AM -0700, Tom Herbert wrote: >> On Mon, Sep 18, 2017 at 9:24 PM, David Miller wrote: >> > From: Tom Herbert >> >> Add configuration to control use of zero checksums on transmit for both >> >> IPv4

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Roopa Prabhu
On Thu, Sep 21, 2017 at 2:25 AM, Amine Kherbouche wrote: > This commit introduces the MPLSoGRE support (RFC 4023), using ip tunnel > API. > > Encap: > - Add a new iptunnel type mpls. > > Decap: > - pull gre hdr and call mpls_forward(). > > Signed-off-by: Amine Kherbouche > --- > include/net/

Re: [PATCH net-next] cxgb4: avoid stall while shutting down the adapter

2017-09-21 Thread David Miller
From: Ganesh Goudar Date: Thu, 21 Sep 2017 12:50:47 +0530 > do not wait for completion while deleting the filters > when the adapter is shutting down because we may not get > the response as interrupts will be disabled. > > Signed-off-by: Ganesh Goudar Applied, thanks.

Re: [PATCH net-next 1/1] net/smc: parameter cleanup in smc_cdc_get_free_slot()

2017-09-21 Thread David Miller
From: Ursula Braun Date: Thu, 21 Sep 2017 09:17:34 +0200 > Use the smc_connection as first parameter with smc_cdc_get_free_slot(). > This is just a small code cleanup, no functional change. > > Signed-off-by: Ursula Braun Applied.

Re: [PATCH net 0/9] net/smc: bug fixes 2017-09-20

2017-09-21 Thread David Miller
From: Ursula Braun Date: Thu, 21 Sep 2017 09:16:25 +0200 > here is a collection of small smc-patches built for net fixing > smc problems in different areas. Series applied, thanks.

Re: [PATCH net-next ] net: Remove useless function skb_header_release

2017-09-21 Thread David Miller
From: gfree.w...@vip.163.com Date: Thu, 21 Sep 2017 12:39:31 +0800 > From: Gao Feng > > There is no one which would invokes the function skb_header_release. > So just remove it now. > > Signed-off-by: Gao Feng As Joe Perches mentioned, there are comment references remaining. This should be r

Re: [PATCH net-next] net: dsa: better scoping of slave functions

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 19:31:57 -0400 > A few DSA slave functions take a dsa_slave_priv pointer as first > argument, whereas the scope of the slave.c functions is the slave > net_device structure. Fix this and rename dsa_netpoll_send_skb to > dsa_slave_netpoll_send_skb. > >

Re: [PATCH net-next] net: dsa: add port fdb dump

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 19:32:14 -0400 > Dumping a DSA port's FDB entries is not specific to a DSA slave, so add > a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and > dsa_port_fdb_del. > > Signed-off-by: Vivien Didelot Applied.

Re: [PATCH v5 net 0/3] lan78xx: This series of patches are for lan78xx driver.

2017-09-21 Thread David Miller
From: Nisar Sayed Date: Thu, 21 Sep 2017 02:36:35 +0530 > This series of patches are for lan78xx driver. > > These patches fixes potential issues associated with lan78xx driver. Series applied, thank you.

Re: [PATCH net 0/2] Bring back transceiver type for PHYLIB

2017-09-21 Thread David Miller
From: Florian Fainelli Date: Wed, 20 Sep 2017 15:52:12 -0700 > With the introduction of the xLINKSETTINGS ethtool APIs, the transceiver type > was deprecated, but in that process we lost some useful information that > PHYLIB > was consistently reporting about internal vs. external PHYs. > > Thi

Re: [PATCH] [RESEND][for 4.14] net: qcom/emac: add software control for pause frame mode

2017-09-21 Thread David Miller
From: Timur Tabi Date: Wed, 20 Sep 2017 15:32:53 -0500 > The EMAC has the option of sending only a single pause frame when > flow control is enabled and the RX queue is full. Although sending > only one pause frame has little value, this would allow admins to > enable automatic flow control with

Re: [PATCH] hv_netvsc: fix send buffer failure on MTU change

2017-09-21 Thread David Miller
From: Stephen Hemminger Date: Wed, 20 Sep 2017 11:17:35 -0700 > From: Alex Ng > > If MTU is changed the host would reject the send buffer change. > This problem is result of recent change to allow changing send > buffer size. > > Every time we change the MTU, we store the previous net_device s

Re: [PATCH net-next] net: dsa: use dedicated CPU port

2017-09-21 Thread David Miller
From: Vivien Didelot Date: Wed, 20 Sep 2017 12:28:05 -0400 > Each port in DSA has its own dedicated CPU port currently available in > its parent switch's ds->ports[port].cpu_dp. Use it instead of getting > the unique tree CPU port, which will be deprecated soon. > > Signed-off-by: Vivien Didelot

Re: [PATCH net-next] net: avoid a full fib lookup when rp_filter is disabled.

2017-09-21 Thread David Miller
From: Paolo Abeni Date: Wed, 20 Sep 2017 18:26:53 +0200 > Since commit 1dced6a85482 ("ipv4: Restore accept_local behaviour > in fib_validate_source()") a full fib lookup is needed even if > the rp_filter is disabled, if accept_local is false - which is > the default. > > What we really need in t

Re: [Patch net] net_sched: remove cls_flower idr on failure

2017-09-21 Thread David Miller
From: Cong Wang Date: Wed, 20 Sep 2017 09:18:45 -0700 > Fixes: c15ab236d69d ("net/sched: Change cls_flower to use IDR") > Cc: Chris Mi > Cc: Jiri Pirko > Signed-off-by: Cong Wang Applied, thanks.

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Florian Fainelli
On 09/21/2017 02:54 PM, Eric Dumazet wrote: > On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > >> Would not this apply to pretty much any stacked device setup though? It >> seems like any network device that just queues up its packet on another >> physical device for actual transmissio

[PATCH] e1000: avoid null pointer dereference on invalid stat type

2017-09-21 Thread Colin King
From: Colin Ian King Currently if the stat type is invalid then data[i] is being set either by dereferencing a null pointer p, or it is reading from an incorrect previous location if we had a valid stat type previously. Fix this by nullify pointer p if a stat type is invalid and only setting dat

[RFC PATCH 0/2] capability controlled user-namespaces

2017-09-21 Thread Mahesh Bandewar
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, CVE-2017-7184, CVE-2017-7308 etc. just to name few. Current form of user-namespaces, however, if changed

[RFC PATCH 2/2] userns: control capabilities of some user namespaces

2017-09-21 Thread Mahesh Bandewar
From: Mahesh Bandewar With this new notion of "controlled" user-namespaces, the controlled user-namespaces are marked at the time of their creation while the capabilities of processes that belong to them are controlled using the global mask. Init-user-ns is always uncontrolled and a process that

[RFC PATCH 1/2] capability: introduce sysctl for controlled user-ns capability whitelist

2017-09-21 Thread Mahesh Bandewar
From: Mahesh Bandewar Add a sysctl variable kernel.controlled_userns_caps_whitelist. This takes input as capability mask expressed as two comma separated hex u32 words. The mask, however, is stored in kernel as kernel_cap_t type. Any capabilities that are not part of this mask will be controlled

Re: [PATCH net] bpf: one perf event close won't free bpf program attached by another perf event

2017-09-21 Thread Alexei Starovoitov
On 9/21/17 4:17 AM, Peter Zijlstra wrote: On Wed, Sep 20, 2017 at 10:20:13PM -0700, Yonghong Song wrote: (2). trace_event_call->perf_events are per cpu data structure, that means, some filtering logic is needed to avoid the same perf_event prog is executing twice. What I mean here is that the

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 14:41 -0700, Florian Fainelli wrote: > Would not this apply to pretty much any stacked device setup though? It > seems like any network device that just queues up its packet on another > physical device for actual transmission may need that (e.g: DSA, bond, > team, more.?) W

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 23:41, Florian Fainelli pisze: On 09/21/2017 02:26 PM, Paweł Staszewski wrote: W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb28430

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Florian Fainelli
On 09/21/2017 02:26 PM, Paweł Staszewski wrote: > > > W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: >> diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c >> index >> 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 >> 100644 >> --- a/net/8021q/

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Amine Kherbouche
Hi Francois, Thanks for the feedback, I'll make it for the next version. On 21/09/2017 23:25, Francois Romieu wrote: Amine Kherbouche : [...] diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 36ea2ad..060ed07 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c [...] @@ -39,6 +

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Brandon Streiff
> On Thu, Sep 21, 2017 at 01:05:57PM -0700, Florian Fainelli wrote: > >>> It looks like the macb driver still can't handle boards that don't >>> have a PHY. Is that correct? >> >> Not since: >> >> dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 ("net: macb: add fixed-link >> node support") > > Yep, it'

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-09-21 o 23:34, Eric Dumazet pisze: On Thu, 2017-09-21 at 23:26 +0200, Paweł Staszewski wrote: W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261c

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Eric Dumazet
On Thu, 2017-09-21 at 23:26 +0200, Paweł Staszewski wrote: > > W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: > > diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c > > index > > 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 > > > > 100644

Re: Kernel 4.13.0-rc4-next-20170811 - IP Routing / Forwarding performance vs Core/RSS number / HT on

2017-09-21 Thread Paweł Staszewski
W dniu 2017-08-15 o 11:11, Paweł Staszewski pisze: diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index 5e831de3103e2f7092c7fa15534def403bc62fb4..9472de846d5c0960996261cb2843032847fa4bf7 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -143,6 +143,7 @

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-21 Thread Francois Romieu
Amine Kherbouche : [...] > diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c > index 36ea2ad..060ed07 100644 > --- a/net/mpls/af_mpls.c > +++ b/net/mpls/af_mpls.c [...] > @@ -39,6 +40,40 @@ static int one = 1; > static int label_limit = (1 << 20) - 1; > static int ttl_max = 255; > > +size_t

Re: [PATCH net] packet: hold bind lock when rebinding to fanout hook

2017-09-21 Thread Willem de Bruijn
On Wed, Sep 20, 2017 at 5:03 PM, David Miller wrote: > From: Willem de Bruijn > Date: Fri, 15 Sep 2017 10:07:46 -0400 > >> On Thu, Sep 14, 2017 at 5:14 PM, Willem de Bruijn wrote: >>> Packet socket bind operations must hold the po->bind_lock. This keeps >>> po->running consistent with whether th

pull-request: ieee802154 2017-09-20

2017-09-21 Thread Stefan Schmidt
Hello Dave. [Resend with netdev in cc] Here comes a pull request for ieee802154 changes I have queued up for this merge window. Normally these have been coming through the bluetooth tree but as this three have been falling through the cracks so far and I have to review and ack all of them anyway

[PATCH 5/5] xfrm: eradicate size_t

2017-09-21 Thread Alexey Dobriyan
All netlink message sizes are a) unsigned, b) can't be >= 4GB in size because netlink doesn't support >= 64KB messages in the first place. All those size_t across the code are a scam especially across networking which likes to work with small numbers like 1500 or 65536. Propagate unsignedness and

[PATCH 4/5] xfrm: make xfrm_replay_state_esn_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Replay detection bitmaps can't have negative length. Comparisons with nla_len() are left signed just in case negative value can sneak in there. Propagate unsignedness for code size savings: add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-38 (-38) function

[PATCH 2/5] xfrm: make xfrm_alg_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/xfrm.h

[PATCH 3/5] xfrm: make xfrm_alg_auth_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/xfrm.h

[PATCH 1/5] xfrm: make aead_len() return unsigned int

2017-09-21 Thread Alexey Dobriyan
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan --- include/net/xfrm.h |2 +- net/xfrm/xfrm_user.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/include/net/xfrm.h

[PATCH] net: use 32-bit arithmetic while allocating net device

2017-09-21 Thread Alexey Dobriyan
Private part of allocation is never big enough to warrant size_t. Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) function old new delta alloc_netdev_mqs11201110 -10 Signed-

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Grant Edwards
On Thu, Sep 21, 2017 at 01:05:57PM -0700, Florian Fainelli wrote: >> It looks like the macb driver still can't handle boards that don't >> have a PHY. Is that correct? > > Not since: > > dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 ("net: macb: add fixed-link > node support") Yep, it's obvious now

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Florian Fainelli
On 09/21/2017 12:59 PM, Grant Edwards wrote: > Several years back (circa 2.6.33) I had to hack up macb.c to work on > an at91 board that didn't have a PHY connected to the macb controller. > Now I might need to get a recent kernel version running on that board. > > It looks like the macb driver st

net: macb: fail when there's no PHY

2017-09-21 Thread Grant Edwards
Several years back (circa 2.6.33) I had to hack up macb.c to work on an at91 board that didn't have a PHY connected to the macb controller. Now I might need to get a recent kernel version running on that board. It looks like the macb driver still can't handle boards that don't have a PHY. Is that

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Edward Cree
On 21/09/17 20:44, Alexei Starovoitov wrote: > On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: >> More intuitive, but agree on the from_be/le. Maybe we should >> just drop the "to_" prefix altogether, and leave the rest as is since >> it's not surrounded by braces, it's also not a

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Alexei Starovoitov
On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: > On 09/21/2017 06:58 PM, Edward Cree wrote: > > On 21/09/17 17:40, Y Song wrote: > > > On Thu, Sep 21, 2017 at 9:24 AM, Edward Cree wrote: > > > > On 21/09/17 16:52, Alexei Starovoitov wrote: > > > > > imo > > > > > (u16) r4 endian

Re: [v2,1/3] can: m_can: Make hclk optional

2017-09-21 Thread Franklin S Cooper Jr
On 09/21/2017 09:08 AM, Sekhar Nori wrote: > On Thursday 21 September 2017 06:01 AM, Franklin S Cooper Jr wrote: >> >> >> On 08/24/2017 03:00 AM, Sekhar Nori wrote: >>> + some OMAP folks and Linux OMAP list >>> >>> On Tuesday 25 July 2017 04:21 AM, Franklin Cooper wrote: Hclk is the MCAN's i

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-21 Thread Daniel Borkmann
On 09/21/2017 06:58 PM, Edward Cree wrote: On 21/09/17 17:40, Y Song wrote: On Thu, Sep 21, 2017 at 9:24 AM, Edward Cree wrote: On 21/09/17 16:52, Alexei Starovoitov wrote: imo (u16) r4 endian be isn't intuitive. Can we come up with some better syntax? Like bswap16be r4 bswap32le r4 Hmm, I d

Re: [PATCH v4 0/4] Add cross-compilation support to eBPF samples

2017-09-21 Thread David Miller
From: Joel Fernandes Date: Wed, 20 Sep 2017 09:04:32 -0700 > These patches fix issues seen when cross-compiling eBPF samples on arm64. > Compared to [1], I dropped the controversial inline-asm patch and exploring > other options to fix it. However these patches are a step in the right > direction

Re: [PATCH] net_sched/hfsc: fix curve activation in hfsc_change_class()

2017-09-21 Thread David Miller
From: Konstantin Khlebnikov Date: Wed, 20 Sep 2017 15:46:11 +0300 > If real-time or fair-share curves are enabled in hfsc_change_class() > class isn't inserted into rb-trees yet. Thus init_ed() and init_vf() > must be called in place of update_ed() and update_vf(). > > Remove isn't required beca

Re: [PATCH] net_sched: always reset qdisc backlog in qdisc_reset()

2017-09-21 Thread David Miller
From: Konstantin Khlebnikov Date: Wed, 20 Sep 2017 15:45:36 +0300 > SKB stored in qdisc->gso_skb also counted into backlog. > > Some qdiscs don't reset backlog to zero in ->reset(), > for example sfq just dequeue and free all queued skb. > > Signed-off-by: Konstantin Khlebnikov > Fixes: 2f

Re: [PATCH net v2] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-21 Thread David Miller
From: Sabrina Dubroca Date: Tue, 19 Sep 2017 15:40:40 +0200 > If we try to delete the same tunnel twice, the first delete operation > does a lookup (l2tp_tunnel_get), finds the tunnel, calls > l2tp_tunnel_delete, which queues it for deletion by > l2tp_tunnel_del_work. > > The second delete opera

Re: [Patch net] net_sched: remove cls_flower idr on failure

2017-09-21 Thread Cong Wang
On Thu, Sep 21, 2017 at 11:47 AM, Cong Wang wrote: > On Wed, Sep 20, 2017 at 9:18 AM, Cong Wang wrote: >> +errout_idr: >> + if (fnew->handle) >> + idr_remove_ext(&head->handle_idr, fnew->handle); > > Hmm, I should check fold instead of fnew->handle here. > I will update this p

Re: [Patch net] net_sched: remove cls_flower idr on failure

2017-09-21 Thread Cong Wang
On Wed, Sep 20, 2017 at 9:18 AM, Cong Wang wrote: > +errout_idr: > + if (fnew->handle) > + idr_remove_ext(&head->handle_idr, fnew->handle); Hmm, I should check fold instead of fnew->handle here. I will update this patch.

  1   2   3   4   >