[Patch net] net_sched: fix a memory leak of filter chain

2017-09-05 Thread Cong Wang
tcf_chain_destroy() is called by tcf_block_put() and tcf_chain_put(). tcf_chain_put() is refcn'ed and paired with tcf_chain_get(), but tcf_block_put() is not, it should be paired with tcf_block_get() and we still need to decrease the refcnt. However, tcf_block_put() is special, it stores the

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Roopa Prabhu
On Tue, Sep 5, 2017 at 3:25 PM, Jamal Hadi Salim wrote: > On 17-09-05 06:01 PM, Roopa Prabhu wrote: > >> >> yes, like Nikolay says we have been discussing this as well. Nikolay's >> patch is a cleaver and most importantly non-invasive >> way today given the anchor point for tc

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Roopa Prabhu
On Tue, Sep 5, 2017 at 3:45 PM, Daniel Borkmann wrote: > On 09/06/2017 12:01 AM, Roopa Prabhu wrote: >> >> On Tue, Sep 5, 2017 at 11:18 AM, Cong Wang >> wrote: >>> >>> On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov >>>

[no subject]

2017-09-05 Thread informationrequest
45388.doc Description: MS-Word document

[PATCH net] netlink: access nlk groups safely in netlink bind and getname

2017-09-05 Thread Xin Long
Now there is no lock protecting nlk ngroups/groups' accessing in netlink bind and getname. It's safe from nlk groups' setting in netlink_release, but not from netlink_realloc_groups called by netlink_setsockopt. netlink_lock_table is needed in both netlink bind and getname when accessing nlk

[PATCH net] netlink: fix an use-after-free issue for nlk groups

2017-09-05 Thread Xin Long
ChunYu found a netlink use-after-free issue by syzkaller: [28448.842981] BUG: KASAN: use-after-free in __nla_put+0x37/0x40 at addr 8807185e2378 [28448.969918] Call Trace: [...] [28449.117207] __nla_put+0x37/0x40 [28449.132027] nla_put+0xf5/0x130 [28449.146261]

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-09-05 Thread Michael S. Tsirkin
On Tue, Sep 05, 2017 at 04:09:19PM +0200, Willem de Bruijn wrote: > On Mon, Sep 4, 2017 at 5:03 AM, Jason Wang wrote: > > > > > > On 2017年09月02日 00:17, Willem de Bruijn wrote: > > > > This is not a 50/50 split, which impliesTw that some packets from the > > large

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

2017-09-05 Thread Joel Fernandes
Hi Alexei, On Tue, Sep 5, 2017 at 8:24 PM, Alexei Starovoitov wrote: > On Sun, Sep 03, 2017 at 11:23:21AM -0700, Joel Fernandes wrote: >> These patches fix issues seen when cross-compiling eBPF samples on arm64. >> Compared to [1], I dropped the controversial

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

2017-09-05 Thread Alexei Starovoitov
On Sun, Sep 03, 2017 at 11:23:21AM -0700, Joel Fernandes wrote: > These patches fix issues seen when cross-compiling eBPF samples on arm64. > Compared to [1], I dropped the controversial inline-asm patch pending further > discussion on the right way to do it. However these patches are still a step

Re: [PATCH v3 2/2] ip6_tunnel: fix ip6 tunnel lookup in collect_md mode

2017-09-05 Thread Alexei Starovoitov
On 9/4/17 1:36 AM, Haishuang Yan wrote: In collect_md mode, if the tun dev is down, it still can call __ip6_tnl_rcv to receive on packets, and the rx statistics increase improperly. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Cc: Alexei Starovoitov

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-05 Thread Alexander Duyck
On Tue, Sep 5, 2017 at 2:13 PM, Tom Herbert wrote: >> The situation with encapsulation is even more complicated: >> >> We are basically only interested in the UDP/vxlan/Ethernet/IP/UDP >> constellation. If we do the fragmentation inside the vxlan tunnel and >> carry over the

Re: [net 0/2][pull request] Intel Wired LAN Driver Updates 2017-09-05

2017-09-05 Thread David Miller
From: Jeff Kirsher Date: Tue, 5 Sep 2017 18:04:16 -0700 > This series contains fixes for i40e only. Pulled, thanks Jeff.

Re: [PATCH net-next v6 3/3] openvswitch: enable NSH support

2017-09-05 Thread Yang, Yi
On Tue, Sep 05, 2017 at 09:12:09PM +0800, Hannes Frederic Sowa wrote: > "Yang, Yi" writes: > > > We can change this later if we really find a better way to handle this > > because it isn't defined in include/uapi/linux/openvswitch.h, so I still > > have backdoor to do this

[net 2/2] i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq

2017-09-05 Thread Jeff Kirsher
From: Jacob Keller When introducing the functions to read the NVM through the AdminQ, we did not correctly mark the wb_desc. Fixes: 7073f46e443e ("i40e: Add AQ commands for NVM Update for X722", 2015-06-05) Signed-off-by: Jacob Keller

[net 0/2][pull request] Intel Wired LAN Driver Updates 2017-09-05

2017-09-05 Thread Jeff Kirsher
This series contains fixes for i40e only. These two patches fix an issue where our nvmupdate tool does not work on RHEL 7.4 and newer kernels, in fact, the use of the nvmupdate tool on newer kernels can cause the cards to be non-functional unless these patches are applied. Anjali reworks the

[net 1/2] i40e: avoid NVM acquire deadlock during NVM update

2017-09-05 Thread Jeff Kirsher
From: Anjali Singhai Jain X722 devices use the AdminQ to access the NVM, and this requires taking the AdminQ lock. Because of this, we lock the AdminQ during i40e_read_nvm(), which is also called in places where the lock is already held, such as the firmware update path

Re: [PATCH v2 rfc 0/8] IGMP snooping for local traffic

2017-09-05 Thread Andrew Lunn
> The third and last issue will be explained in a followup email. Hi DSA hackers So there is the third issue. It affects just DSA, but it possible affects all DSA drivers. This patchset broken broadcast with the Marvell drivers. It could break broadcast on others drivers as well. What i found

Re: [PATCH 2/3] security: bpf: Add eBPF LSM hooks and security field to eBPF map

2017-09-05 Thread Alexei Starovoitov
On Tue, Sep 05, 2017 at 02:59:38PM -0700, Chenbo Feng wrote: > On Thu, Aug 31, 2017 at 7:05 PM, Alexei Starovoitov > wrote: > > On Thu, Aug 31, 2017 at 01:56:34PM -0700, Chenbo Feng wrote: > >> From: Chenbo Feng > >> > >> Introduce a pointer into

Re: [PATCH v2 rfc 0/8] IGMP snooping for local traffic

2017-09-05 Thread Stephen Hemminger
On Wed, 6 Sep 2017 01:35:02 +0200 Andrew Lunn wrote: > After the very useful feedback from Nikolay, i threw away what i had, > and started again. To recap: > > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which

[PATCH v2 rfc 1/8] net: bridge: Rename mglist to host_joined

2017-09-05 Thread Andrew Lunn
The boolean mglist indicates the host has joined a particular multicast group on the bridge interface. It is badly named, obscuring what is means. Rename it. Signed-off-by: Andrew Lunn --- net/bridge/br_input.c | 2 +- net/bridge/br_mdb.c | 2 +-

[PATCH v2 rfc 3/8] net: bridge: Add/del switchdev object on host join/leave

2017-09-05 Thread Andrew Lunn
When the host joins or leaves a multicast group, use switchdev to add an object to the hardware to forward traffic for the group to the host. Signed-off-by: Andrew Lunn --- include/net/switchdev.h | 1 + net/bridge/br_mdb.c | 39 +++

[PATCH v2 rfc 6/8] net: dsa: switch: Don't add CPU port to an mdb by default

2017-09-05 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c

[PATCH v2 rfc 0/8] IGMP snooping for local traffic

2017-09-05 Thread Andrew Lunn
After the very useful feedback from Nikolay, i threw away what i had, and started again. To recap: The linux bridge supports IGMP snooping. It will listen to IGMP reports on bridge ports and keep track of which groups have been joined on an interface. It will then forward multicast based on this

[PATCH v2 rfc 4/8] net: dsa: slave: Handle switchdev host mdb add/del

2017-09-05 Thread Andrew Lunn
Add code to handle switchdev host mdb add/del. As with normal mdb add/del, send a notification to the switch layer. Signed-off-by: Andrew Lunn --- net/dsa/dsa_priv.h | 7 +++ net/dsa/port.c | 26 ++ net/dsa/slave.c| 6 ++ 3 files

[PATCH v2 rfc 8/8] net: dsa: Fix SWITCHDEV_ATTR_ID_PORT_PARENT_ID

2017-09-05 Thread Andrew Lunn
SWITCHDEV_ATTR_ID_PORT_PARENT_ID is used by the software bridge when determining which ports to flood a packet out. If the packet originated from a switch, it assumes the switch has already flooded the packet out the switches ports, so the bridge should not flood the packet itself out switch

[PATCH v2 rfc 5/8] net: dsa: switch: handle host mdb add/remove

2017-09-05 Thread Andrew Lunn
When receiving notifications of the host mdb add/remove, add/remove an mdb to the CPU port, so that traffic flows from a port to the CPU port and hence to the host. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 72 ++-- 1

[PATCH v2 rfc 7/8] net: dsa: set offload_fwd_mark on received packets

2017-09-05 Thread Andrew Lunn
The software bridge needs to know if a packet has already been bridged by hardware offload to ports in the same hardware offload, in order that it does not re-flood them, causing duplicates. This is particularly true for multicast traffic which the host has required. By setting offload_fwd_mark

[PATCH v2 rfc 2/8] net: bridge: Send notification when host join/leaves a group

2017-09-05 Thread Andrew Lunn
The host can join or leave a multicast group on the brX interface, as indicated by IGMP snooping. This is tracked within the bridge multicast code. Send a notification when this happens, in the same way a notification is sent when a port of the bridge joins/leaves a group because of IGMP

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Daniel Borkmann
On 09/06/2017 12:45 AM, Daniel Borkmann wrote: On 09/06/2017 12:01 AM, Roopa Prabhu wrote: On Tue, Sep 5, 2017 at 11:18 AM, Cong Wang wrote: On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov wrote: Hi all, This RFC adds a new mode for

Re: linux-next: manual merge of the pci tree with the net tree

2017-09-05 Thread Stephen Rothwell
Hi Sinan, On Tue, 5 Sep 2017 18:54:38 -0400 Sinan Kaya wrote: > > On 9/4/2017 12:54 AM, Stephen Rothwell wrote: > > Just a reminder that this conflict still exists. > > I suppose this was a message for Bjorn, right? Correct. It was just a reminder that he may have to

Re: linux-next: manual merge of the pci tree with the net tree

2017-09-05 Thread Sinan Kaya
On 9/4/2017 12:54 AM, Stephen Rothwell wrote: > Just a reminder that this conflict still exists. I suppose this was a message for Bjorn, right? I looked at the change and it looked good to me. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.

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

2017-09-05 Thread Stephen Hemminger
On Tue, 5 Sep 2017 15:35:50 -0700 Petar Penkov wrote: > Changes TUN driver to use napi_gro_receive() upon receiving packets > rather than netif_rx_ni(). Adds flag CONFIG_TUN_NAPI that enables > these changes and operation is not affected if the flag is disabled. > SKBs are

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Daniel Borkmann
On 09/06/2017 12:01 AM, Roopa Prabhu wrote: On Tue, Sep 5, 2017 at 11:18 AM, Cong Wang wrote: On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov wrote: Hi all, This RFC adds a new mode for clsact which designates a device's egress

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

2017-09-05 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

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

2017-09-05 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

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

2017-09-05 Thread Petar Penkov
Changes TUN driver to use napi_gro_receive() upon receiving packets rather than netif_rx_ni(). Adds flag CONFIG_TUN_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

Re: [PATCH net-next] bpf: fix numa_node validation

2017-09-05 Thread Martin KaFai Lau
On Mon, Sep 04, 2017 at 10:41:02PM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller reported crashes in bpf map creation or map update [1] > > Problem is that nr_node_ids is a signed integer, > NUMA_NO_NODE is also an integer, so it is very tempting > to declare

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Jamal Hadi Salim
On 17-09-05 06:01 PM, Roopa Prabhu wrote: yes, like Nikolay says we have been discussing this as well. Nikolay's patch is a cleaver and most importantly non-invasive way today given the anchor point for tc rules is a netdev. we have also considered a separate implicit tc anchor device. lo

Re: [PATCH 1/3] security: bpf: Add eBPF LSM hooks to security module

2017-09-05 Thread Chenbo Feng
On Fri, Sep 1, 2017 at 5:50 AM, Stephen Smalley wrote: > On Thu, 2017-08-31 at 13:56 -0700, Chenbo Feng wrote: >> From: Chenbo Feng >> >> Introduce 5 LSM hooks to provide finer granularity controls on eBPF >> related operations including create eBPF maps,

Re: [PATCH 0/3] drivers: net: xgene: Misc bug fixes

2017-09-05 Thread David Miller
From: Iyappan Subramanian Date: Tue, 5 Sep 2017 11:16:29 -0700 > This patch set fixes bugs related to handling the case for ACPI for, > reading and programming tx/rx delay values. > > Signed-off-by: Iyappan Subramanian Series applied, thank you.

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Roopa Prabhu
On Tue, Sep 5, 2017 at 11:18 AM, Cong Wang wrote: > On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov > wrote: >> Hi all, >> This RFC adds a new mode for clsact which designates a device's egress >> classifier as global per netns. The

Re: [PATCH 2/3] security: bpf: Add eBPF LSM hooks and security field to eBPF map

2017-09-05 Thread Chenbo Feng
On Thu, Aug 31, 2017 at 7:05 PM, Alexei Starovoitov wrote: > On Thu, Aug 31, 2017 at 01:56:34PM -0700, Chenbo Feng wrote: >> From: Chenbo Feng >> >> Introduce a pointer into struct bpf_map to hold the security information >> about the map. The

Re: [PATCH][next v2] rocker: fix kcalloc parameter order

2017-09-05 Thread David Miller
From: Zahari Doychev Date: Tue, 5 Sep 2017 21:49:58 +0200 > The function calls to kcalloc use wrong parameter order and incorrect flags > values. GFP_KERNEL is used instead of flags now and the order is corrected. > > The change was done using the following coccinelle

Re: [PATCH net] rds: Fix non-atomic operation on shared flag variable

2017-09-05 Thread David Miller
From: Håkon Bugge Date: Tue, 5 Sep 2017 17:42:01 +0200 > The bits in m_flags in struct rds_message are used for a plurality of > reasons, and from different contexts. To avoid any missing updates to > m_flags, use the atomic set_bit() instead of the non-atomic

Re: [PATCH net v2] net: sched: don't use GFP_KERNEL under spin lock

2017-09-05 Thread David Miller
From: Jakub Kicinski Date: Tue, 5 Sep 2017 08:31:23 -0700 > The new TC IDR code uses GFP_KERNEL under spin lock. Which leads > to: ... > Try to preallocate the memory with idr_prealloc(GFP_KERNEL) > (as suggested by Eric Dumazet), and change the allocation >

Re: [PATCH net V2] vhost_net: correctly check tx avail during rx busy polling

2017-09-05 Thread David Miller
From: Jason Wang Date: Tue, 5 Sep 2017 09:22:05 +0800 > We check tx avail through vhost_enable_notify() in the past which is > wrong since it only checks whether or not guest has filled more > available buffer since last avail idx synchronization which was just > done by

Re: [PATCH net-next] rxrpc: Make service connection lookup always check for retry

2017-09-05 Thread David Miller
From: David Howells Date: Mon, 04 Sep 2017 15:28:28 +0100 > When an RxRPC service packet comes in, the target connection is looked up > by an rb-tree search under RCU and a read-locked seqlock; the seqlock retry > check is, however, currently skipped if we got a match, but

Re: [PATCH v3 net-next 0/2] Use correct sk->sk_prot for IPV6

2017-09-05 Thread David Miller
From: Ilya Lesokhin Date: Mon, 4 Sep 2017 13:13:59 +0300 > The tls ulp overrides sk->prot with a new tls specific proto structs. > > The tls specific structs were previously based on the ipv4 specific > > tcp_prot sturct.

Re: [PATCH net-next v7] net: stmmac: Delete dead code for MDIO registration

2017-09-05 Thread David Miller
From: Romain Perier Date: Mon, 4 Sep 2017 10:41:36 +0200 > This code is no longer used, the logging function was changed by commit > fbca164776e4 ("net: stmmac: Use the right logging function in > stmmac_mdio_register"). > It was previously showing information

Re: [net v2] gianfar: Fix Tx flow control deactivation

2017-09-05 Thread David Miller
From: Claudiu Manoil Date: Mon, 4 Sep 2017 10:45:28 +0300 > The wrong register is checked for the Tx flow control bit, > it should have been maccfg1 not maccfg2. > This went unnoticed for so long probably because the impact is > hardly visible, not to mention the tangled

Re: [PATCH net-next] cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6

2017-09-05 Thread David Miller
From: Ganesh Goudar Date: Mon, 4 Sep 2017 11:25:34 +0530 > MPS_TX_INT_CAUSE[Bubble] is a normal condition for T6, hence > ignore this interrupt for T6. > > Signed-off-by: Ganesh Goudar > Signed-off-by: Casey Leedom Applied.

Re: [PATCH net-next] cxgb4: Fix pause frame count in t4_get_port_stats

2017-09-05 Thread David Miller
From: Ganesh Goudar Date: Mon, 4 Sep 2017 11:17:36 +0530 > MPS_STAT_CTL[CountPauseStatTx] and MPS_STAT_CTL[CountPauseStatRx] > only control whether or not Pause Frames will be counted as part > of the 64-Byte Tx/Rx Frame counters. These bits do not control > whether Pause

Re: [PATCH net-next] cxgb4: fix memory leak

2017-09-05 Thread David Miller
From: Ganesh Goudar Date: Mon, 4 Sep 2017 11:16:28 +0530 > do not reuse the loop counter which is used iterate over > the ports, so that sched_tbl will be freed for all the ports. > > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next 2/2] tun: rename generic_xdp to skb_xdp

2017-09-05 Thread David Miller
From: Jason Wang Date: Mon, 4 Sep 2017 11:36:09 +0800 > Rename "generic_xdp" to "skb_xdp" to avoid confusing it with the > generic XDP which will be done at netif_receive_skb(). > > Cc: Daniel Borkmann > Signed-off-by: Jason Wang

Re: [PATCH net-next 1/2] tun: reserve extra headroom only when XDP is set

2017-09-05 Thread David Miller
From: Jason Wang Date: Mon, 4 Sep 2017 11:36:08 +0800 > We reserve headroom unconditionally which could cause unnecessary > stress on socket memory accounting because of increased trusesize. Fix > this by only reserve extra headroom when XDP is set. > > Cc: Jakub Kicinski

Re: [PATCH net-next] net: cpsw: Don't handle SIOC[GS]HWTSTAMP when CPTS is disabled

2017-09-05 Thread Grygorii Strashko
Hi On 08/31/2017 02:48 AM, Richard Cochran wrote: > On Wed, Aug 30, 2017 at 02:47:45PM -0700, David Miller wrote: >> It should not be required to disable a Kconfig option just to get PHY >> timestamping to work properly. > > Well, if the MAC driver handles the ioctl and enables time stamping, >

Re: [PATCH 6/10] ixgbe: Use ARRAY_SIZE macro

2017-09-05 Thread David Miller
From: Joe Perches Date: Tue, 05 Sep 2017 13:01:18 -0700 > On Tue, 2017-09-05 at 21:45 +0200, Thomas Meyer wrote: >> On Tue, Sep 05, 2017 at 11:50:44AM -0700, David Miller wrote: >> > From: Thomas Meyer >> > Date: Sun, 03 Sep 2017 14:19:31 +0200 >> > >> > >

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-05 Thread Tom Herbert
> The situation with encapsulation is even more complicated: > > We are basically only interested in the UDP/vxlan/Ethernet/IP/UDP > constellation. If we do the fragmentation inside the vxlan tunnel and > carry over the skb hash to all resulting UDP/vxlan packets source ports, > we are fine and

Re: [PATCH net-next 2/4] ip/options: explicitly provide net ns to __ip_options_echo()

2017-09-05 Thread Paolo Abeni
On Tue, 2017-09-05 at 10:18 -0700, Eric Dumazet wrote: > On Thu, 2017-08-03 at 18:07 +0200, Paolo Abeni wrote: > > __ip_options_echo() uses the current network namespace, and > > currently retrives it via skb->dst->dev. > > > > This commit adds an explicit 'net' argument to __ip_options_echo() >

Re: [PATCH 2/2] b43legacy: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Michael Büsch
On Tue, 5 Sep 2017 19:16:58 +0100 Colin King wrote: > From: Colin Ian King > > The u8 char array ret is not being initialized and elements outside > the range start to end contain just garbage values from the stack. > This results in a later

Re: [PATCH 1/2] b43: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Michael Büsch
On Tue, 5 Sep 2017 19:15:50 +0100 Colin King wrote: > From: Colin Ian King > > The u8 char array ret is not being initialized and elements outside > the range start to end contain just garbage values from the stack. > This results in a later

[PATCH] e1000e: changed some expensive calls of udelay to usleep_range

2017-09-05 Thread Kardonik Michael
Calls to udelay are not preemtable by userspace so userspace applications experience a large (~200us) latency when running on core0. Instead usleep_range can be used to be more friendly to userspace since it is preemtable. This is due to udelay using busy-wait loops while usleep_rang uses

Re: [PATCH 6/10] ixgbe: Use ARRAY_SIZE macro

2017-09-05 Thread Joe Perches
On Tue, 2017-09-05 at 21:45 +0200, Thomas Meyer wrote: > On Tue, Sep 05, 2017 at 11:50:44AM -0700, David Miller wrote: > > From: Thomas Meyer > > Date: Sun, 03 Sep 2017 14:19:31 +0200 > > > > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > >

[PATCH][next v2] rocker: fix kcalloc parameter order

2017-09-05 Thread Zahari Doychev
The function calls to kcalloc use wrong parameter order and incorrect flags values. GFP_KERNEL is used instead of flags now and the order is corrected. The change was done using the following coccinelle script: @@ expression E1,E2; type T; @@ -kcalloc(E1, E2, sizeof(T)) +kcalloc(E2, sizeof(T),

Re: [PATCH 6/10] ixgbe: Use ARRAY_SIZE macro

2017-09-05 Thread Thomas Meyer
On Tue, Sep 05, 2017 at 11:50:44AM -0700, David Miller wrote: > From: Thomas Meyer > Date: Sun, 03 Sep 2017 14:19:31 +0200 > > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > yourself. > > Found with: find -type f -name "*.c" -o -name "*.h" | xargs

Re: 915f3e3f76 ("mac80211_hwsim: Replace bogus hrtimer clockid"): BUG: kernel reboot-without-warning in test stage

2017-09-05 Thread Thomas Gleixner
On Tue, 5 Sep 2017, Sebastian Andrzej Siewior wrote: > On 2017-09-05 09:12:40 [+0200], Thomas Gleixner wrote: > > Sorry, no. That bisect is completely bogus. The commit in question merily > > replaces the unsupported clockid with a valid one. > > The bisect is correct. It just has problems to

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-05 Thread Hannes Frederic Sowa
Hi Tom, Tom Herbert writes: > On Tue, Sep 5, 2017 at 4:14 AM, Hannes Frederic Sowa > wrote: >> Tom Herbert writes: >> >>> There is absolutely no requirement in IP that packets are delivered in >>> order-- there never has

Re: [PATCH net-next v2 RESEND 0/4] net: dsa: Allow switch drivers to indicate number of TX queues

2017-09-05 Thread David Miller
From: Florian Fainelli Date: Sun, 3 Sep 2017 20:26:59 -0700 > This patch series extracts the parts of the patch set that are likely not to > be > controversial and actually bringing multi-queue support to DSA-created network > devices. > > With these patches, we can now

Re: [PATCH net-next] bridge: switchdev: Use an helper to clear forward mark

2017-09-05 Thread David Miller
From: Ido Schimmel Date: Sun, 3 Sep 2017 17:44:13 +0300 > Instead of using ifdef in the C file. > > Signed-off-by: Ido Schimmel > Suggested-by: Nikolay Aleksandrov > Tested-by: Yotam Gigi Applied.

Re: [PATCH 7/10] net/mlx4_core: Use ARRAY_SIZE macro

2017-09-05 Thread David Miller
From: Thomas Meyer Date: Sun, 03 Sep 2017 14:19:31 +0200 > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\

Re: [PATCH 6/10] ixgbe: Use ARRAY_SIZE macro

2017-09-05 Thread David Miller
From: Thomas Meyer Date: Sun, 03 Sep 2017 14:19:31 +0200 > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\

[PATCH v2] radix-tree: must check __radix_tree_preload() return value

2017-09-05 Thread Eric Dumazet
From: Eric Dumazet __radix_tree_preload() only disables preemption if no error is returned. So we really need to make sure callers always check the return value. idr_preload() contract is to always disable preemption, so we need to add a missing preempt_disable() if an

Re: [PATCH v2 net-next 0/2] flow_dissector: Flow dissector fixes

2017-09-05 Thread David Miller
From: Tom Herbert Date: Fri, 1 Sep 2017 14:04:10 -0700 > This patch set fixes some basic issues with __skb_flow_dissect function. > > Items addressed: > - Cleanup control flow in the function; in particular eliminate a > bunch of goto's and implement a simplified

Re: [PATCH] radix-tree: must check __radix_tree_preload() return value

2017-09-05 Thread Eric Dumazet
On Tue, 2017-09-05 at 11:07 -0700, Linus Torvalds wrote: > On Tue, Sep 5, 2017 at 10:59 AM, Eric Dumazet wrote: > > @@ -2104,7 +2104,10 @@ EXPORT_SYMBOL(radix_tree_tagged); > > */ > > void idr_preload(gfp_t gfp_mask) > > { > > - __radix_tree_preload(gfp_mask,

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Nikolay Aleksandrov
On 9/5/17 9:18 PM, Cong Wang wrote: On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov wrote: Hi all, This RFC adds a new mode for clsact which designates a device's egress classifier as global per netns. The packets that are not classified for a particular device

Re: [RFC net-next] net: sch_clsact: add support for global per-netns classifier mode

2017-09-05 Thread Cong Wang
On Tue, Sep 5, 2017 at 5:48 AM, Nikolay Aleksandrov wrote: > Hi all, > This RFC adds a new mode for clsact which designates a device's egress > classifier as global per netns. The packets that are not classified for > a particular device will be classified using the

[PATCH 3/3] drivers: net: xgene: Remove return statement from void function

2017-09-05 Thread Iyappan Subramanian
commit 183db4 ("drivers: net: xgene: Correct probe sequence handling") changed the return type of xgene_enet_check_phy_handle() to void. This patch, removes the return statement from the last line. Signed-off-by: Iyappan Subramanian ---

[PATCH 1/3] drivers: net: xgene: Read tx/rx delay for ACPI

2017-09-05 Thread Iyappan Subramanian
This patch fixes reading tx/rx delay values for ACPI. Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] b43legacy: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Colin King
From: Colin Ian King The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the

[PATCH 0/3] drivers: net: xgene: Misc bug fixes

2017-09-05 Thread Iyappan Subramanian
This patch set fixes bugs related to handling the case for ACPI for, reading and programming tx/rx delay values. Signed-off-by: Iyappan Subramanian --- Iyappan Subramanian (2): drivers: net: xgene: Read tx/rx delay for ACPI drivers: net: xgene: Remove return statement

[PATCH 2/3] drivers: net: xgene: Configure tx/rx delay for ACPI

2017-09-05 Thread Iyappan Subramanian
From: Quan Nguyen This patch fixes configuring tx/rx delay values for ACPI. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 7 ++- 1 file changed, 2 insertions(+), 5

[PATCH 1/2] b43: fix unitialized reads of ret by initializing the array to zero

2017-09-05 Thread Colin King
From: Colin Ian King The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the

Re: [PATCH] radix-tree: must check __radix_tree_preload() return value

2017-09-05 Thread Linus Torvalds
On Tue, Sep 5, 2017 at 10:59 AM, Eric Dumazet wrote: > @@ -2104,7 +2104,10 @@ EXPORT_SYMBOL(radix_tree_tagged); > */ > void idr_preload(gfp_t gfp_mask) > { > - __radix_tree_preload(gfp_mask, IDR_PRELOAD_SIZE); > + int ret = __radix_tree_preload(gfp_mask,

[PATCH] radix-tree: must check __radix_tree_preload() return value

2017-09-05 Thread Eric Dumazet
From: Eric Dumazet __radix_tree_preload() only disables preemption if no error is returned. So we really need to make sure callers always check the return value. idr_preload() contract is to always disable preemption, so we need to add a missing preempt_disable() if an

Re: [PATCH net-next 2/4] ip/options: explicitly provide net ns to __ip_options_echo()

2017-09-05 Thread Eric Dumazet
On Thu, 2017-08-03 at 18:07 +0200, Paolo Abeni wrote: > __ip_options_echo() uses the current network namespace, and > currently retrives it via skb->dst->dev. > > This commit adds an explicit 'net' argument to __ip_options_echo() > and update all the call sites to provide it, usually via a

Re: [PATCH net v2] net: sched: don't use GFP_KERNEL under spin lock

2017-09-05 Thread Eric Dumazet
On Tue, 2017-09-05 at 08:31 -0700, Jakub Kicinski wrote: > The new TC IDR code uses GFP_KERNEL under spin lock. Which leads > to: > > [ 582.621091] BUG: sleeping function called from invalid context at > ../mm/slab.h:416 > [ 582.629721] in_atomic(): 1, irqs_disabled(): 0, pid: 3379, name: tc

[ANNOUNCE] Iproute2 for Linux 4.13

2017-09-05 Thread Stephen Hemminger
Update to iproute2 utility to support new features in Linux 4.13. This is a larger than usual release because of lots of updates for BPF and the new RDMA utility. Lots of cleanups and Coverity reported potential issues as well. Source:

Re: 915f3e3f76 ("mac80211_hwsim: Replace bogus hrtimer clockid"): BUG: kernel reboot-without-warning in test stage

2017-09-05 Thread Sebastian Andrzej Siewior
On 2017-09-05 09:12:40 [+0200], Thomas Gleixner wrote: > Sorry, no. That bisect is completely bogus. The commit in question merily > replaces the unsupported clockid with a valid one. The bisect is correct. It just has problems to express itself properly. So the table says: |

Re: [PATCH iproute2 master 2/2] bpf: consolidate dumps to use bpf_dump_prog_info

2017-09-05 Thread Daniel Borkmann
On 09/05/2017 06:35 PM, Stephen Hemminger wrote: [...] I applied this to master, and resolved conflicts with net-next. But the dump with JSON of xdp is now incomplete. Ok, I will check it out, and send a follow-up to make it complete again.

Re: [PATCH iproute2 master 2/2] bpf: consolidate dumps to use bpf_dump_prog_info

2017-09-05 Thread Stephen Hemminger
On Tue, 5 Sep 2017 02:24:32 +0200 Daniel Borkmann wrote: > Consolidate dump of prog info to use bpf_dump_prog_info() when possible. > Moving forward, we want to have a consistent output for BPF progs when > being dumped. E.g. in cls/act case we used to dump tag as a

Re: [PATCH net] rds: Fix non-atomic operation on shared flag variable

2017-09-05 Thread Santosh Shilimkar
On 9/5/2017 8:42 AM, Håkon Bugge wrote: The bits in m_flags in struct rds_message are used for a plurality of reasons, and from different contexts. To avoid any missing updates to m_flags, use the atomic set_bit() instead of the non-atomic equivalent. Signed-off-by: Håkon Bugge

Re: [PATCH iproute2/master] tc actions: store and dump correct length of user cookies

2017-09-05 Thread Stephen Hemminger
On Tue, 5 Sep 2017 13:06:24 +0200 Simon Horman wrote: > Correct two errors which cancel each other out: > * Do not send twice the length of the actual provided by the user to the > kernel > * Do not dump half the length of the cookie provided by the kernel > > As

Re: [PATCH iproute2 master 0/2] Two minor BPF updates

2017-09-05 Thread Stephen Hemminger
On Tue, 5 Sep 2017 02:24:30 +0200 Daniel Borkmann wrote: > Two minor updates including a small cleanup for dumping > the trace pipe and one for consolidating prog dumps for > tc and xdp to use bpf_prog_info_by_fd() when possible. > > Thanks! > > Daniel Borkmann (2): >

Re: [PATCH] soc: ti/knav_dma: include dmaengine header

2017-09-05 Thread David Miller
From: Arnd Bergmann Date: Tue, 5 Sep 2017 10:31:35 +0200 > A header file cleanup apparently caused a build regression > with one driver using the knav infrastructure: > > In file included from drivers/net/ethernet/ti/netcp_core.c:30:0: > include/linux/soc/ti/knav_dma.h:129:30:

Re: [PATCH] net/ncsi: fix ncsi_vlan_rx_{add,kill}_vid references

2017-09-05 Thread David Miller
From: Arnd Bergmann Date: Tue, 5 Sep 2017 10:05:47 +0200 > We get a new link error in allmodconfig kernels after ftgmac100 > started using the ncsi helpers: > > ERROR: "ncsi_vlan_rx_kill_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] > undefined! > ERROR:

Re: [PATCH net-next] bpf: fix numa_node validation

2017-09-05 Thread David Miller
From: Eric Dumazet Date: Mon, 04 Sep 2017 22:41:02 -0700 > From: Eric Dumazet > > syzkaller reported crashes in bpf map creation or map update [1] > > Problem is that nr_node_ids is a signed integer, > NUMA_NO_NODE is also an integer, so it is very

Re: [pull request][net-next 0/3] Mellanox, mlx5 GRE tunnel offloads

2017-09-05 Thread Tom Herbert
On Tue, Sep 5, 2017 at 4:14 AM, Hannes Frederic Sowa wrote: > Tom Herbert writes: > >> There is absolutely no requirement in IP that packets are delivered in >> order-- there never has been and there never will be! If the ULP, like >> Ethernet

[PATCH 24/25 v2] net/cdc_ncm: Replace tasklet with softirq hrtimer

2017-09-05 Thread Sebastian Andrzej Siewior
From: Thomas Gleixner The bh tasklet is used in invoke the hrtimer (cdc_ncm_tx_timer_cb) in softirq context. This can be also achieved without the tasklet but with CLOCK_MONOTONIC_SOFT as hrtimer base. Signed-off-by: Thomas Gleixner Signed-off-by:

[PATCH net] rds: Fix non-atomic operation on shared flag variable

2017-09-05 Thread Håkon Bugge
The bits in m_flags in struct rds_message are used for a plurality of reasons, and from different contexts. To avoid any missing updates to m_flags, use the atomic set_bit() instead of the non-atomic equivalent. Signed-off-by: Håkon Bugge Reviewed-by: Knut Omang

[PATCH net v2] net: sched: don't use GFP_KERNEL under spin lock

2017-09-05 Thread Jakub Kicinski
The new TC IDR code uses GFP_KERNEL under spin lock. Which leads to: [ 582.621091] BUG: sleeping function called from invalid context at ../mm/slab.h:416 [ 582.629721] in_atomic(): 1, irqs_disabled(): 0, pid: 3379, name: tc [ 582.636939] 2 locks held by tc/3379: [ 582.641049] #0:

  1   2   >