Re: [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data

2016-08-11 Thread Toshiaki Makita
On 2016/08/10 22:32, Hadar Hen Zion wrote: > Early in the datapath skb_vlan_untag function is called, stripped > the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. > > The current dissection doesn't handle vlan packets correctly. Vlan > doesn't exist in skb->data anymore when

Re: [PATCH net-next 2/4] flow_dissector: Get vlan priority in addition to vlan id

2016-08-11 Thread Jiri Pirko
r-Hen-Zion/flow_dissector-Get-vlan-info-from-skb-vlan_tci-instead-of-skb-data/20160811-042500 >> config: cris-etrax-100lx_v2_defconfig (attached as .config) >> compiler: cris-linux-gcc (GCC) 4.6.3 >> reproduce: >> wget >> https://git.kernel.org/cgit/linux/kerne

Re: [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data

2016-08-11 Thread Jiri Pirko
Wed, Aug 10, 2016 at 03:32:20PM CEST, had...@mellanox.com wrote: >Early in the datapath skb_vlan_untag function is called, stripped >the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. > >The current dissection doesn't handle vlan packets correctly. Vlan >doesn't exist in skb->

Re: [PATCH net-next 4/4] net_sched: act_vlan: Add priority option

2016-08-11 Thread Jiri Pirko
Wed, Aug 10, 2016 at 03:32:23PM CEST, had...@mellanox.com wrote: >The current vlan push action supports only vid and protocol options. >Add priority option. > >Example script that adds vlan push action with vid and >priority: > >tc filter add dev veth0 protocol ip parent : \ > flower \

Re: [PATCH net-next 3/4] net_sched: flower: Add vlan support

2016-08-11 Thread Jiri Pirko
Wed, Aug 10, 2016 at 03:32:22PM CEST, had...@mellanox.com wrote: >Enhance flower to support 802.1Q vlan protocol classification. >Currently, the supported fields are vlan_id and vlan_priority. > >Example: > > # add a flower filter with vlan id and priority classification > tc filter add

[PATCH v2] ipv6: suppress sparse warnings in IP6_ECN_set_ce()

2016-08-11 Thread Johannes Berg
From: Johannes Berg Pass the correct type __wsum to csum_sub() and csum_add(). This doesn't really change anything since __wsum really *is* __be32, but removes the address space warnings from sparse. Cc: Eric Dumazet Fixes: 34ae6a1aa054 ("ipv6: update skb->csum when CE mark is propagated") Sign

Re: [PATCH] ipv6: suppress sparse warnings in IP6_ECN_set_ce()

2016-08-11 Thread Johannes Berg
On Thu, 2016-08-11 at 23:26 +0200, Eric Dumazet wrote: > On Thu, 2016-08-11 at 12:04 +0200, Johannes Berg wrote: > > > > From: Johannes Berg > > > > Use the correct type for these manipulations, which is __wsum, > > instead of using __be32. This doesn't really change anything > > since __wsum re

Re: [PATCH] net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, allow segmentation for gre tunneled skbs

2016-08-11 Thread Shmulik Ladkani
Hi, On Fri, 12 Aug 2016 11:51:07 +0800 wenxu wrote: > > And in b8247f095edd, the condition skb_iif also should be removed. > given: > ovs-internal-dev bridge with ovs-gre > > There are the same problem which the skb from local. There's no need to remove the skb_iif criteria: For the loca

Re: [PATCHv2 3/4] pci: Determine actual VPD size on first access

2016-08-11 Thread Benjamin Herrenschmidt
On Thu, 2016-08-11 at 14:17 -0600, Alex Williamson wrote: > > vfio isn't playing nanny here for the fun of it, part of the reason we > have vpd access functions is because folks have discovered that vpd > registers between PCI functions on multi-function devices may be > shared.  So pounding on vp

Re: [PATCH net-next v4 2/3] bpf: Add bpf_current_task_under_cgroup helper

2016-08-11 Thread Sargun Dhillon
I realize that in_cgroup is more consistent, but under_cgroup makes far more sense to me. I think it's more intuitive. On Thu, Aug 11, 2016 at 9:48 PM, Alexei Starovoitov wrote: > On Thu, Aug 11, 2016 at 08:14:56PM -0700, Sargun Dhillon wrote: >> This adds a bpf helper that's similar to the skb_i

Re: [PATCH net-next v4 2/3] bpf: Add bpf_current_task_under_cgroup helper

2016-08-11 Thread Alexei Starovoitov
On Thu, Aug 11, 2016 at 08:14:56PM -0700, Sargun Dhillon wrote: > This adds a bpf helper that's similar to the skb_in_cgroup helper to check > whether the probe is currently executing in the context of a specific > subset of the cgroupsv2 hierarchy. It does this based on membership test > for a cgr

Re: [PATCH] net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, allow segmentation for gre tunneled skbs

2016-08-11 Thread wenxu
> On Wed, 10 Aug 2016 17:35:11 -0700 (PDT) David Miller > wrote: >>> commit b8247f095edd ("net: ip_finish_output_gso: If skb_gso_network_seglen >>> exceeds MTU, allow segmentation for local udp tunneled skbs") >>> >>> Given: >>> - tap0 and ovs-gre >>> - ovs-gre stacked on eth0, eth0 hav

[PATCH net-next v4 3/3] samples/bpf: Add test_current_task_under_cgroup test

2016-08-11 Thread Sargun Dhillon
This test has a BPF program which writes the last known pid to call the sync syscall within a given cgroup to a map. The user mode program creates its own mount namespace, and mounts the cgroupsv2 hierarchy in there, as on all current test systems (Ubuntu 16.04, Debian), the cgroupsv2 vfs is unmo

[PATCH net-next v4 2/3] bpf: Add bpf_current_task_under_cgroup helper

2016-08-11 Thread Sargun Dhillon
This adds a bpf helper that's similar to the skb_in_cgroup helper to check whether the probe is currently executing in the context of a specific subset of the cgroupsv2 hierarchy. It does this based on membership test for a cgroup arraymap. It is invalid to call this in an interrupt, and it'll retu

[PATCH net-next v4 1/3] cgroup: Add task_under_cgroup_hierarchy cgroup inline function to headers

2016-08-11 Thread Sargun Dhillon
This commit adds an inline function to cgroup.h to check whether a given task is under a given cgroup hierarchy. This is to avoid having to put ifdefs in .c files to gate access to cgroups. When cgroups are disabled this always returns true. Signed-off-by: Sargun Dhillon Cc: Alexei Starovoitov C

[PATCH net-next v4 0/3]

2016-08-11 Thread Sargun Dhillon
This patchset includes a helper and an example to determine whether the probe is currently executing in the context of a specific cgroup based on a cgroup bpf map / array. The helper checks the cgroupsv2 hierarchy based on the handle in the map and if the current cgroup is equal to it, or a descend

Re: [PATCH net] rhashtable: avoid large lock-array allocations

2016-08-11 Thread Florian Westphal
kbuild test robot wrote: > Hi Florian, > > [auto build test WARNING on net/master] > > url: > https://github.com/0day-ci/linux/commits/Florian-Westphal/rhashtable-avoid-large-lock-array-allocations/20160812-101458 > config: x86_64-randconfig-x015-201632 (attached as .config) > compiler: gcc-

Re: [PATCH net] rhashtable: avoid large lock-array allocations

2016-08-11 Thread kbuild test robot
Hi Florian, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/rhashtable-avoid-large-lock-array-allocations/20160812-101458 config: x86_64-randconfig-x015-201632 (attached as .config) compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 reproduc

[PATCH net] rhashtable: avoid large lock-array allocations

2016-08-11 Thread Florian Westphal
Sander reports following splat after netfilter nat bysrc table got converted to rhashtable: swapper/0: page allocation failure: order:3, mode:0x2084020(GFP_ATOMIC|__GFP_COMP) CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.0-rc1 [..] [] warn_alloc_failed+0xdd/0x140 [] __alloc_pages_nodemask+0x3e

[PATCH net-next 0/3] bpf improvements

2016-08-11 Thread Alexei Starovoitov
Two bpf improvements: 1. allow bpf helpers like bpf_map_lookup_elem() access packet data directly for XDP programs 2. enable bpf_get_prandom_u32() for tracing programs Aaron Yue (1): samples/bpf: add verifier tests for the helper access to the packet Alexei Starovoitov (2): bpf: allow helpe

[PATCH net-next 3/3] bpf: allow bpf_get_prandom_u32() to be used in tracing

2016-08-11 Thread Alexei Starovoitov
bpf_get_prandom_u32() was initially introduced for socket filters and later requested numberous times to be added to tracing bpf programs for the same reason as in socket filters: to be able to randomly select incoming events. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- kern

[PATCH net-next 2/3] samples/bpf: add verifier tests for the helper access to the packet

2016-08-11 Thread Alexei Starovoitov
From: Aaron Yue test various corner cases of the helper function access to the packet via crafted XDP programs. Signed-off-by: Aaron Yue Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- samples/bpf/test_verifier.c | 114 ++-- 1 file chan

[PATCH net-next 1/3] bpf: allow helpers access the packet directly

2016-08-11 Thread Alexei Starovoitov
The helper functions like bpf_map_lookup_elem(map, key) were only allowing 'key' to point to the initialized stack area. That is causing performance degradation when programs need to process millions of packets per second and need to copy contents of the packet into the stack just to pass the stack

[Patch net v3 4/5] net_sched: move tc offload macros to pkt_cls.h

2016-08-11 Thread Cong Wang
struct tcf_exts belongs to filters, should not be visible to plain tc actions. Cc: Ido Schimmel Signed-off-by: Cong Wang --- include/net/act_api.h | 19 +++ include/net/pkt_cls.h | 19 +++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/include/n

[Patch net v3 0/5] net_sched: tc action fixes and updates

2016-08-11 Thread Cong Wang
This patchset fixes a few regressions caused by the previous code refactor. Thanks to Jamal for catching them! Note, patch 3/5 and 4/5 are not strictly necessary for this patchset, I just want to carry them together. --- v3: avoid list for fast path, suggested by Jamal v2: replace flex_array wit

[Patch net v3 1/5] net_sched: remove the leftover cleanup_a()

2016-08-11 Thread Cong Wang
After refactoring tc_action into tcf_common, we no longer need to cleanup temporary "actions" in list, they are permanently stored in the hashtable. Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common") Reported-by: Jamal Hadi Salim Cc: Jamal Hadi Salim Signed-off-by: Cong Wang ---

[Patch net v3 2/5] net_sched: remove an unnecessary list_del()

2016-08-11 Thread Cong Wang
This list_del() for tc action is not needed actually, because we only use this list to chain bulk operations, therefore should not be carried for latter operations. Fixes: ec0595cc4495 ("net_sched: get rid of struct tcf_common") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang --- net/sched/act_ap

[Patch net v3 5/5] net_sched: convert tcf_exts from list to pointer array

2016-08-11 Thread Cong Wang
As pointed out by Jamal, an action could be shared by multiple filters, so we can't use list to chain them any more after we get rid of the original tc_action. Instead, we could just save pointers to these actions in tcf_exts, since they are refcount'ed, so convert the list to an array of pointers.

[Patch net v3 3/5] net_sched: fix a typo in tc_for_each_action()

2016-08-11 Thread Cong Wang
It is harmless because all users pass 'a' to this macro. Fixes: 00175aec941e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") Cc: Amir Vadai Signed-off-by: Cong Wang --- include/net/act_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/act_api.h b/inc

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-11 Thread Cong Wang
On Thu, Aug 11, 2016 at 9:20 AM, Jamal Hadi Salim wrote: > On 16-08-10 04:06 PM, Cong Wang wrote: >> >> On Wed, Aug 10, 2016 at 7:34 AM, Jamal Hadi Salim >> wrote: >>> >>> On 16-08-08 04:46 PM, Cong Wang wrote: > > >>> tcf_exts_exec() is the culprit - and conversion to from flexarray >>> to linke

[PATCH -next] qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc()

2016-08-11 Thread Wei Yongjun
'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: a1d8d8a51e83 ("qed: Add dcbnl support.") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 + 1 file change

[iproute PATCH] man: ip-link.8: Document missing geneve options

2016-08-11 Thread Phil Sutter
This adds missing documentation of geneve type options: - dstport - external - udpcsum - udp6zerocsumtx - udp6zerocsumrx The bits for the last three was just copy and pasted from vxlan section. Signed-off-by: Phil Sutter --- man/man8/ip-link.8.in | 36 1 fi

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-11 Thread Florian Fainelli
On 08/11/2016 02:34 PM, Timur Tabi wrote: > Add supports for ethernet controller HW on Qualcomm Technologies, Inc. SoC. > This driver supports the following features: > 1) Checksum offload. > 2) Interrupt coalescing support. > 3) SGMII phy. > 4) phylib interface for external phy OK, so this is loo

Re: 4.8.0-rc1: page allocation failure: order:3, mode:0x2084020(GFP_ATOMIC|__GFP_COMP)

2016-08-11 Thread Thomas Graf
On 08/09/16 at 02:22pm, Florian Westphal wrote: > Hmmm, seems this is coming from an attempt to allocate the bucket lock > array (since actual table has __GFP_NOWARN). > > I was about to just send a patch that adds a GPF_NOWARN in > bucket_table_alloc/alloc_bucket_locks call. > > However, I wonde

Re: [PATCH net-next v3 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-11 Thread Tejun Heo
Hello, Sargun. On Thu, Aug 11, 2016 at 11:51:42AM -0700, Sargun Dhillon wrote: > This adds a bpf helper that's similar to the skb_in_cgroup helper to check > whether the probe is currently executing in the context of a specific > subset of the cgroupsv2 hierarchy. It does this based on membership

RE: [PATCH 08/16] net: usb: lan78xx: don't print error when allocating urb fails

2016-08-11 Thread Woojung.Huh
> -Original Message- > From: Wolfram Sang [mailto:wsa-...@sang-engineering.com] > Sent: Thursday, August 11, 2016 5:05 PM > To: linux-...@vger.kernel.org > Cc: Wolfram Sang; Woojung Huh - C21699; UNGLinuxDriver; > netdev@vger.kernel.org > Subject: [PATCH 08/16] net: usb: lan78xx: don't prin

Re: [PATCH 16/16] net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails

2016-08-11 Thread Larry Finger
On 08/11/2016 04:13 PM, Wolfram Sang wrote: kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) Acked-by: Larry Finger diff --git a/drivers/net/wi

[PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-11 Thread Timur Tabi
Add supports for ethernet controller HW on Qualcomm Technologies, Inc. SoC. This driver supports the following features: 1) Checksum offload. 2) Interrupt coalescing support. 3) SGMII phy. 4) phylib interface for external phy Based on original work by Niranjana Vishwanathapura Gil

Re: [PATCH] ipv6: suppress sparse warnings in IP6_ECN_set_ce()

2016-08-11 Thread Eric Dumazet
On Thu, 2016-08-11 at 12:04 +0200, Johannes Berg wrote: > From: Johannes Berg > > Use the correct type for these manipulations, which is __wsum, > instead of using __be32. This doesn't really change anything > since __wsum really *is* __be32, but removes the address space > warnings from sparse.

[PATCH 16/16] net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c

[PATCH 15/16] net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/marvell/mwifiex/usb.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell

[PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/m

[PATCH 07/16] net: usb: hso: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/usb/hso.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 4b4458616693f9..c5544d36c54f96 100644 ---

[PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersi

[PATCH 05/16] net: can: usb: peak_usb: pcan_usb_core: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_co

[PATCH 06/16] net: can: usb: usb_8dev: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/usb_8dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index a731720f1d1325..108a30e1509756 10

[PATCH 02/16] net: can: usb: esd_usb2: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/esd_usb2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index 784a9002fbb930..be928ce62d32e0 100644 --- a/drivers

[PATCH 09/16] net: usb: usbnet: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/usb/usbnet.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 3bfb592093263b..d5071e364d40e1 100644 --- a/drivers

[PATCH 12/16] net: wireless: broadcom: brcm80211: brcmfmac: usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wirel

[PATCH 10/16] net: wimax: i2400m: usb-notif: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wimax/i2400m/usb-notif.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wimax/i2400m/usb-notif.c b/drivers/net/wimax/i2400m/usb-notif.c index fc1355d98bc6ae..5d429f81612546 1006

[PATCH 11/16] net: wireless: ath: ar5523: ar5523: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/wireless/ath/ar5523/ar5523.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c ind

[PATCH 03/16] net: can: usb: gs_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/gs_usb.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 6f0cbc38782e68..77e3cc06a30c8c 100

[PATCH 04/16] net: can: usb: kvaser_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/kvaser_usb.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 6f1f3b675ff553..d51e0c401

[PATCH 08/16] net: usb: lan78xx: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/usb/lan78xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 6a9d474b08b21c..432b8a3ae35491 100644 --- a/drive

[PATCH 01/16] net: can: usb: ems_usb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang --- drivers/net/can/usb/ems_usb.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 71f0e791355b9c..b3d02759c226bb

[PATCH 00/16] net: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses kmalloc which already prints enough information on failure. So, let's simply remove those "allocation failed" messages from drivers like we did already for other -ENOMEM cases. gkh acked this approach when we talked abou

Re: [PATCH net-next v3 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-11 Thread Daniel Borkmann
Hi Sargun, just some minor comment inline. On 08/11/2016 08:51 PM, Sargun Dhillon wrote: [...] diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 1113423..6c01ab1 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -319,4 +319,26 @@ extern const struct bpf_func_proto bpf_get

Re: [PATCHv2 3/4] pci: Determine actual VPD size on first access

2016-08-11 Thread Alex Williamson
On Thu, 11 Aug 2016 11:52:02 -0700 Alexander Duyck wrote: > On Wed, Aug 10, 2016 at 4:54 PM, Benjamin Herrenschmidt > wrote: > > On Wed, 2016-08-10 at 08:47 -0700, Alexander Duyck wrote: > >> > >> The problem is if we don't do this it becomes possible for a guest to > >> essentially cripple a

[PATCH net v2] ibmveth: Disable tx queue while changing mtu

2016-08-11 Thread Thomas Falcon
If the device is running while the MTU is changed, ibmveth is closed and the bounce buffer is freed. If a transmission is sent before ibmveth can be reopened, ibmveth_start_xmit tries to copy to the null bounce buffer, leading to a kernel oops. The proposed solution disables the tx queue until ibmv

Re: [PATCH] net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, allow segmentation for gre tunneled skbs

2016-08-11 Thread Shmulik Ladkani
On Wed, 10 Aug 2016 17:35:11 -0700 (PDT) David Miller wrote: > > commit b8247f095edd ("net: ip_finish_output_gso: If skb_gso_network_seglen > > exceeds MTU, allow segmentation for local udp tunneled skbs") > > > > Given: > > - tap0 and ovs-gre > > - ovs-gre stacked on eth0, eth0 having

[PATCH net] bpf: fix write helpers with regards to non-linear parts

2016-08-11 Thread Daniel Borkmann
Fix the bpf_try_make_writable() helper and all call sites we have in BPF, it's currently defect with regards to skbs when the write_len spans into non-linear parts, no matter if cloned or not. There are multiple issues at once. First, using skb_store_bits() is not correct since even if we have a c

[PATCH net-next v3 2/2] samples/bpf: Add test_current_task_in_cgroup test

2016-08-11 Thread Sargun Dhillon
This test has a BPF program which writes the last known pid to call the sync syscall within a given cgroup to a map. The user mode program creates its own mount namespace, and mounts the cgroupsv2 hierarchy in there, as on all current test systems (Ubuntu 16.04, CoreOS 1053), the cgroupsv2 vfs is

Re: [PATCHv2 3/4] pci: Determine actual VPD size on first access

2016-08-11 Thread Alexander Duyck
On Wed, Aug 10, 2016 at 4:54 PM, Benjamin Herrenschmidt wrote: > On Wed, 2016-08-10 at 08:47 -0700, Alexander Duyck wrote: >> >> The problem is if we don't do this it becomes possible for a guest to >> essentially cripple a device on the host by just accessing VPD >> regions that aren't actually v

[PATCH net-next v3 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-11 Thread Sargun Dhillon
This adds a bpf helper that's similar to the skb_in_cgroup helper to check whether the probe is currently executing in the context of a specific subset of the cgroupsv2 hierarchy. It does this based on membership test for a cgroup arraymap. It is invalid to call this in an interrupt, and it'll retu

[PATCH net-next v3 0/2] Add bpf current_task_in_cgroup helper & opensnoop example

2016-08-11 Thread Sargun Dhillon
This patchset includes a helper and an example to determine whether the probe is currently executing in the context of a specific cgroup based on a cgroup bpf map / array. The helper checks the cgroupsv2 hierarchy based on the handle in the map and if the current cgroup is equal to it, or a descend

Re: [PATCH] bonding: Allow tun-interfaces as slaves

2016-08-11 Thread Jörn Engel
On Wed, Aug 10, 2016 at 05:58:38PM -0700, Jay Vosburgh wrote: > Jörn Engel wrote: > >On Wed, Aug 10, 2016 at 02:26:49PM -0700, Jörn Engel wrote: > >> > >> Having to set one more parameter is a bit annoying. It would have to be > >> documented in a prominent place and people would still often mis

[PATCH] calipso: fix resource leak on calipso_genopt failure

2016-08-11 Thread Colin King
From: Colin Ian King Currently, if calipso_genopt fails then the error exit path does not free the ipv6_opt_hdr new causing a memory leak. Fix this by kfree'ing new on the error exit path. Signed-off-by: Colin Ian King --- net/ipv6/calipso.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

RE: [PATCH net 4/4] hv_netvsc: avoid deadlocks between rtnl lock and netvsc_inject_disable()

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: netdev@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 4/4] hv_netvsc: avoid

Re: [PATCH net] macsec: use after free when deleting the underlying device

2016-08-11 Thread David Miller
From: Sabrina Dubroca Date: Thu, 11 Aug 2016 15:24:27 +0200 > macsec_notify() loops over the list of macsec devices configured on the > underlying device when this device is being removed. This list is part > of the rx_handler data. > > However, macsec_dellink unregisters the rx_handler and fre

Re: [PATCH net] macvtap: fix use after free for skb_array during release

2016-08-11 Thread David Miller
From: Jason Wang Date: Thu, 11 Aug 2016 18:15:56 +0800 > We've clean skb_array in macvtap_put_queue() but still try to pop from > it during macvtap_sock_destruct(). Fix this use after free by moving > the skb array cleanup to macvtap_sock_destruct() instead. > > Fixes: 362899b8725b ("macvtap: sw

Re: [4.4-RT PATCH RFC/RFT] drivers: net: cpsw: mark rx/tx irq as IRQF_NO_THREAD

2016-08-11 Thread Steven Rostedt
On Thu, 11 Aug 2016 19:15:40 +0300 Grygorii Strashko wrote: > Mark CPSW Rx/Tx IRQs as IRQF_NO_THREAD and avoid double scheduling on -RT > where this IRQs are forced threaded: > rx-irq > |- schedule threaded rx-irq handler > ... > |- threaded rx-irq handler -> cpsw_rx_interrupt() > |- na

Re: Kernel NFS boot failure

2016-08-11 Thread Grygorii Strashko
On 08/03/2016 06:04 PM, Grygorii Strashko wrote: > Hi Vladimir, > > On 08/03/2016 03:06 PM, Vladimir Murzin wrote: >> On 03/08/16 12:41, Grygorii Strashko wrote: >>> We observe Kernel boot failure while running NFS boot stress test (1000 >>> iterations): >>> - Linux version 4.7.0 > > I'd like t

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-11 Thread Jamal Hadi Salim
On 16-08-10 04:06 PM, Cong Wang wrote: On Wed, Aug 10, 2016 at 7:34 AM, Jamal Hadi Salim wrote: On 16-08-08 04:46 PM, Cong Wang wrote: tcf_exts_exec() is the culprit - and conversion to from flexarray to linked list in the fast problem to be specific. Ah, this reminds me that I don't have

[4.4-RT PATCH RFC/RFT] drivers: net: cpsw: mark rx/tx irq as IRQF_NO_THREAD

2016-08-11 Thread Grygorii Strashko
Mark CPSW Rx/Tx IRQs as IRQF_NO_THREAD and avoid double scheduling on -RT where this IRQs are forced threaded: rx-irq |- schedule threaded rx-irq handler ... |- threaded rx-irq handler -> cpsw_rx_interrupt() |- napi_schedule() |- __raise_softirq_irqoff() |- wakeup_prope

RE: [PATCH net 1/4] hv_netvsc: don't lose VF information

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: netdev@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 1/4] hv_netvsc: don't

RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: netdev@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 2/4] hv_netvsc: reset

RE: [PATCH net 3/4] hv_netvsc: protect module refcount by checking net_device_ctx->vf_netdev

2016-08-11 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Thursday, August 11, 2016 6:59 AM > To: netdev@vger.kernel.org > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Haiyang > Zhang ; KY Srinivasan > Subject: [PATCH net 3/4] hv_netvsc: protec

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-11 Thread Timur Tabi
Timur Tabi wrote: The hang occurs with this loop in napi_disable(): while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) msleep(1); This loop never exits. Can you give me a clue as to what could be the reason? I figured it out. I cannot call napi_disable() twice in a row.

Re: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization

2016-08-11 Thread Jarod Wilson
On Tue, Aug 02, 2016 at 07:33:01AM +, Brown, Aaron F wrote: > > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > > Behalf Of Jarod Wilson > > Sent: Monday, August 1, 2016 6:32 PM > > To: Avargil, Raanan > > Cc: Hall, Christopher S ; > > netdev@vger.kernel.org; intel

Re: [PATCH net] sctp: fix a success return may hide an error

2016-08-11 Thread Neil Horman
On Thu, Aug 11, 2016 at 08:52:58PM +0800, Xin Long wrote: > Now in the end of sctp_outq_flush, sctp calls sctp_packet_transmit > in a loop. The return of current sctp_packet_transmit always covers > the prior one's. If the last call of sctp_packet_transmit return a > success, it may hide the error

[PATCHv5 net-next 1/2] cxgb4: Add control net_device for configuring PCIe VF

2016-08-11 Thread Hariprasad Shenai
Issue: For instance, the current APIs assume a 1-to-1 mapping of Network Ports, Physical Functions and the SR-IOV Virtual Functions of those Physical Functions. This is not the case with our cards where any Virtual Function can be hooked up to any Port -- or any number of Ports the current Linux AP

[PATCHv5 net-next 0/2] Add support for IFLA_VF_MAC

2016-08-11 Thread Hariprasad Shenai
Hi, We're struggling to implement the PCI SR-IOV management features for administering Virtual Functions which represent networking devices using the current Linux APIs. The problem is that these APIs incorporate all sorts of assumptions which don't match chelsio networking cards. For instance, t

[PATCHv5 net-next 2/2] cxgb4/cxgb4vf: Add set VF mac address support

2016-08-11 Thread Hariprasad Shenai
Add ndo_set_vf_mac support which allows to set the MAC address for cxgb4vf interfaces from the host Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c| 24 - drivers/net/ethernet/chelsio/cxg

Re: [PATCH net-next 2/4] flow_dissector: Get vlan priority in addition to vlan id

2016-08-11 Thread Hadar Hen Zion
On Thu, Aug 11, 2016 at 12:58 AM, kbuild test robot wrote: > Hi Hadar, > > [auto build test ERROR on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Hadar-Hen-Zion/flow_dissector-Get-vlan-info-from-skb-vlan_tci-instead-of-skb-data/20160811-042500 &g

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-11 Thread Timur Tabi
Timur Tabi wrote: The hang occurs with this loop in napi_disable(): while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) msleep(1); This loop never exits. Can you give me a clue as to what could be the reason? I figured it out. I cannot call napi_disable() twice in a row. I

Re: [PATCH] net: ethernet: mediatek: enhance the locking using the lightweight ones

2016-08-11 Thread John Crispin
On 11/08/2016 11:51, sean.w...@mediatek.com wrote: > From: Sean Wang > > Since these critical sections protected by page_lock are all entered > from the user context or bottom half context, they can be replaced > with the spin_lock() or spin_lock_bh instead of spin_lock_irqsave(). > > Signed-o

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-11 Thread Timur Tabi
Florian Fainelli wrote: netif_stop_queue(netdev); > napi_disable(&adpt->rx_q.napi); > >I cannot call just napi_disable() in emac_change_mtu(), because when I >then call emac_mac_down(), the first thing it does is call >netif_stop_queue(), and that's when I timeout/hang. Whatever emac_ma

Re: [PATCH net-next 0/3] lwtunnel, mpls fragmentation and gso fixes

2016-08-11 Thread Roopa Prabhu
On 8/10/16, 11:43 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > This series fixes a few issues around mtu and fragmentation > for tunnels using lwtunnel output redirect and also fixes > a few gso issues recently reported by Lennert Buytenhek. > > David Ahern (2): > net: mpls fixes for GSO >

Re: [iproute PATCH] ip-route: Pretty-print expired routes

2016-08-11 Thread Phil Sutter
On Thu, Aug 11, 2016 at 02:46:26PM +0100, Edward Cree wrote: > On 10/08/16 12:14, Phil Sutter wrote: > > Instead of printing 'expires -23sec' for expired (but not yet garbage > > collected) routes, print 'expired 23sec' instead. > > > > Signed-off-by: Phil Sutter > > --- > > ip/iproute.c | 12 +++

Re: [iproute PATCH] ip-route: Pretty-print expired routes

2016-08-11 Thread Edward Cree
On 10/08/16 12:14, Phil Sutter wrote: > Instead of printing 'expires -23sec' for expired (but not yet garbage > collected) routes, print 'expired 23sec' instead. > > Signed-off-by: Phil Sutter > --- > ip/iproute.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --gi

Re: [PATCH net-next 2/3] net: mpls fixes for GSO

2016-08-11 Thread David Ahern
Hi Simon: On 8/11/16 7:30 AM, Simon Horman wrote: > On Thu, Aug 11, 2016 at 09:47:36AM +0200, Simon Horman wrote: >> > On Wed, Aug 10, 2016 at 11:43:31PM -0700, Roopa Prabhu wrote: >>> > > From: David Ahern >>> > > >>> > > Signed-off-by: David Ahern >>> > > Reported-by: Lennert Buytenhek >> >

Re: [PATCH net-next 2/3] net: mpls fixes for GSO

2016-08-11 Thread Simon Horman
Hi Roopa, On Thu, Aug 11, 2016 at 09:47:36AM +0200, Simon Horman wrote: > On Wed, Aug 10, 2016 at 11:43:31PM -0700, Roopa Prabhu wrote: > > From: David Ahern > > > > Signed-off-by: David Ahern > > Reported-by: Lennert Buytenhek > > Thanks. This looks like it should be correct to me. However,

[PATCH net] macsec: use after free when deleting the underlying device

2016-08-11 Thread Sabrina Dubroca
macsec_notify() loops over the list of macsec devices configured on the underlying device when this device is being removed. This list is part of the rx_handler data. However, macsec_dellink unregisters the rx_handler and frees the rx_handler data when the last macsec device is removed from the u

Re: [PATCH v2 2/3] mac80211: mesh: improve path resolving time

2016-08-11 Thread Johannes Berg
On Tue, 2016-07-19 at 08:36 -0400, Bob Copeland wrote: > On Wed, Jul 13, 2016 at 02:45:25PM +0300, Yaniv Machani wrote: > > > > When a packet is received for transmission, > > a PREQ frame is sent to resolve the appropriate path to the desired > > destination. > > After path was established, any s

[PATCH ipsec-next 4/8] xfrm: policy: use atomic_inc_not_zero in rcu section

2016-08-11 Thread Florian Westphal
If we don't hold the policy lock anymore the refcnt might already be 0, i.e. policy struct is about to be free'd. Switch to atomic_inc_not_zero to avoid this. On removal policies are already unlinked from the tables (lists) before the last _put occurs so we are not supposed to find the same 'dead

[PATCH ipsec-next 2/8] xfrm: policy: prepare policy_bydst hash for rcu lookups

2016-08-11 Thread Florian Westphal
Since commit 56f047305dd4b6b617 ("xfrm: add rcu grace period in xfrm_policy_destroy()") xfrm policy objects are already free'd via rcu. In order to make more places lockless (i.e. use rcu_read_lock instead of grabbing read-side of policy rwlock) we only need to: - use rcu_assign_pointer to store

[PATCH ipsec-next 8/8] xfrm: policy: convert policy_lock to spinlock

2016-08-11 Thread Florian Westphal
After earlier patches conversions all spots acquire the writer lock and we can now convert this to a normal spinlock. Signed-off-by: Florian Westphal --- include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_policy.c | 68 2 files changed, 35 insertio

[PATCH ipsec-next 3/8] xfrm: policy: add sequence count to sync with hash resize

2016-08-11 Thread Florian Westphal
Once xfrm_policy_lookup_bytype doesn't grab xfrm_policy_lock anymore its possible for a hash resize to occur in parallel. Use sequence counter to block lookup in case a resize is in progress and to also re-lookup in case hash table was altered in the mean time (might cause use to not find the best

[PATCH ipsec-next 6/8] xfrm: policy: only use rcu in xfrm_sk_policy_lookup

2016-08-11 Thread Florian Westphal
Don't acquire the readlock anymore and rely on rcu alone. In case writer on other CPU changed policy at the wrong moment (after we obtained sk policy pointer but before we could obtain the reference) just repeat the lookup. Signed-off-by: Florian Westphal --- net/xfrm/xfrm_policy.c | 8 +++-

[PATCH ipsec-next 5/8] xfrm: policy: make xfrm_policy_lookup_bytype lockless

2016-08-11 Thread Florian Westphal
side effect: no longer disables BH (should be fine). Signed-off-by: Florian Westphal --- include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_policy.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 1ab51d1..3ab828a 1

  1   2   >