[PATCH net-next] ipv6: Implement optimized IPv6 masked address comparison for ARM64

2017-03-16 Thread Subash Abhinov Kasiviswanathan
Android devices use multiple ip[6]tables for statistics, UID matching and other functionality. Perf output indicated that ip6_do_table was taking a considerable amount of CPU and more that ip_do_table for an equivalent rate. ipv6_masked_addr_cmp was chosen for optimization as there are more instruc

[PATCH net-next v3 2/2]L2TP:Adjust intf MTU, add underlay L3, L2 hdrs

2017-03-16 Thread R. Parameswaran
In existing kernel code, when setting up the L2TP interface, all of the tunnel encapsulation headers are not taken into account when setting up the MTU on the L2TP logical interface device. Due to this, the packets created by the applications on top of the L2TP layer are larger than they ought to

Re: [PATCH net-next 0/3] netvsc: small changesfor net-next

2017-03-16 Thread David Miller
From: Stephen Hemminger Date: Thu, 16 Mar 2017 16:12:36 -0700 > One bugfix, and two non-code patches Series applied.

Re: [PATCH net-next] liquidio: fix wrong information about link modes reported to ethtool

2017-03-16 Thread David Miller
From: Felix Manlunas Date: Thu, 16 Mar 2017 16:16:17 -0700 > From: Manish Awasthi > > Information reported to ethtool about link modes is wrong for 25G NIC. Fix > it by checking for presence of 25G NIC, checking the link speed reported by > NIC firmware, and then assigning proper values to the

Re: [PATCH net] tcp: tcp_get_info() should read tcp_time_stamp later

2017-03-16 Thread David Miller
From: Eric Dumazet Date: Thu, 16 Mar 2017 15:43:19 -0700 > From: Eric Dumazet > > Commit b369e7fd41f7 ("tcp: make TCP_INFO more consistent") moved > lock_sock_fast() earlier in tcp_get_info() > > This has the minor effect that jiffies value being sampled at the > beginning of tcp_get_info() is

Re: [PATCH net] netvsc: fix race during initialization

2017-03-16 Thread David Miller
From: Stephen Hemminger Date: Thu, 16 Mar 2017 12:21:32 -0700 > When device is being setup on boot, there is a small race where > network device callback is registered, but the netvsc_device pointer > is not set yet. This can cause a NULL ptr dereference if packet > arrives during this window. >

Re: [PATCH net] rxrpc: Ignore BUSY packets on old calls

2017-03-16 Thread David Miller
From: David Howells Date: Thu, 16 Mar 2017 16:27:10 + > If we receive a BUSY packet for a call we think we've just completed, the > packet is handed off to the connection processor to deal with - but the > connection processor doesn't expect a BUSY packet and so flags a protocol > error. > >

[PATCH net-next v3 1/2]L2TP:Adjust intf MTU, add underlay L3, L2 hdrs

2017-03-16 Thread R. Parameswaran
In existing kernel code, when setting up the L2TP interface, all of the tunnel encapsulation headers are not taken into account when setting up the MTU on the L2TP logical interface device. Due to this, the packets created by the applications on top of the L2TP layer are larger than they ought t

Re: [PATCH 05/10] netfilter: nf_tables: fix mismatch in big-endian system

2017-03-16 Thread Liping Zhang
Hi David, 2017-03-16 18:58 GMT+08:00 David Laight : [...] >> For the similar reason, when loading an u16 value from the u32 data >> register, we should use "*(u16 *) sreg;" instead of "(u16)*sreg;", >> the 2nd method will get the wrong value in the big-endian system. > ... > > That seems to be pape

Re: [Patch net] bridge: resolve a false alarm of lockdep

2017-03-16 Thread David Miller
From: Nikolay Aleksandrov Date: Thu, 16 Mar 2017 19:36:07 +0200 > On 16/03/17 19:32, Cong Wang wrote: >> Andrei reported a false alarm of lockdep at net/bridge/br_fdb.c:109, >> this is because in Andrei's case, a spin_bug() was already triggered >> before this, therefore the debug_locks is turned

Re: [PATCH net] ibmvnic: Free tx/rx scrq pointer array when releasing sub-crqs

2017-03-16 Thread David Miller
From: Nathan Fontenot Date: Wed, 15 Mar 2017 23:38:07 -0400 > The pointer array for the tx/rx sub crqs should be free'ed when > releasing the tx/rx sub crqs. > > Signed-off-by: Nathan Fontenot Applied, thanks.

Re: Performance issue with igb with lots of different src-ip addrs.

2017-03-16 Thread Ben Greear
I think we can, might take us a day or two to get time to do it. Thanks, Ben On 03/16/2017 08:05 PM, Alexander Duyck wrote: I'm not really interested in installing a custom version of pktgen. Any chance you can recreate the issue with standard pktgen? You might try running perf to get a snapsh

Re: [PATCH] net: ipv6: set route type for anycast routes

2017-03-16 Thread David Miller
From: David Ahern Date: Thu, 16 Mar 2017 21:45:12 -0600 > On 3/16/17 9:41 PM, David Miller wrote: >> From: David Ahern >> Date: Wed, 15 Mar 2017 18:14:33 -0700 >> >>> Anycast routes have the RTF_ANYCAST flag set, but when dumping routes >>> for userspace the route type is not set to RTN_ANYCAST

Re: [PATCH] net: ipv6: set route type for anycast routes

2017-03-16 Thread David Ahern
On 3/16/17 9:41 PM, David Miller wrote: > From: David Ahern > Date: Wed, 15 Mar 2017 18:14:33 -0700 > >> Anycast routes have the RTF_ANYCAST flag set, but when dumping routes >> for userspace the route type is not set to RTN_ANYCAST. Make it so. >> >> Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCA

Re: [PATCH net-next 0/6] bpf: inline bpf_map_lookup_elem()

2017-03-16 Thread David Miller
From: Alexei Starovoitov Date: Wed, 15 Mar 2017 18:26:38 -0700 > bpf_map_lookup_elem() is one of the most frequently used helper functions. > Improve JITed program performance by inlining this helper. > > bpf_map_type before after > hash 58M 74M > array 174M280M > > T

Re: [PATCH net-next v3] net: ipv4: add support for ECMP hash policy choice

2017-03-16 Thread David Miller
From: Tom Herbert Date: Tue, 14 Mar 2017 19:30:47 -0700 > Agreed, but then why do we even need any complexity here by that > argument? RSS is specifically defined to do 5-tuple hashing for TCP > (and UDP), and 3-tuple. No one has ever complained that doing per flow > RSS for TCP is bad thing AFAI

Re: [PATCH] net: ipv6: set route type for anycast routes

2017-03-16 Thread David Miller
From: David Ahern Date: Wed, 15 Mar 2017 18:14:33 -0700 > Anycast routes have the RTF_ANYCAST flag set, but when dumping routes > for userspace the route type is not set to RTN_ANYCAST. Make it so. > > Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes") > CC: Hideaki YOSHIFUJI

Re: [PATCH v2] net: sun: sungem: rix a possible null dereference

2017-03-16 Thread David Miller
From: Philippe Reynes Date: Wed, 15 Mar 2017 22:51:13 +0100 > The function gem_begin_auto_negotiation dereference > the pointer ep before testing if it's null. This > patch add a check on ep before dereferencing it. > > Fixes: 92552fdd557 ("net: sun: sungem: use new api [davem@localhost net-nex

RE: [PATCH net-next] r8152: simply the arguments

2017-03-16 Thread Hayes Wang
David Laight [mailto:david.lai...@aculab.com] > Sent: Thursday, March 16, 2017 10:28 PM [...] > If you are really lucky the compiler will optimise it away. > Otherwise it will generate another local variable and possibly > a register spill to stack. However, I could reduce the time for calculating

[PATCH net-next] r8152: check hw version first

2017-03-16 Thread Hayes Wang
Check hw version first in probe(). Do nothing if the driver doesn't support the chip. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 102 ++-- 1 file changed, 63 insertions(+), 39 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/ne

Re: [PATCH v2 net-next 0/5] sunvnet: better connection management

2017-03-16 Thread David Miller
From: Shannon Nelson Date: Tue, 14 Mar 2017 10:24:38 -0700 > These patches remove some problems in handling of carrier state > with the ldmvsw vswitch, remove an xoff misuse in sunvnet, and > add stats for debug and tracking of point-to-point connections > between the ldom VMs. > > v2: > - add

Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

2017-03-16 Thread David Miller
From: David Arcari Date: Mon, 13 Mar 2017 19:07:16 -0400 > When the aquantia device mtu is changed the net_device structure is not > updated. As a result the ip command does not properly reflect the mtu change. > > Commit 5513e16421cb incorrectly assumed that __dev_set_mtu() was making the > as

Re: [PATCH net-next] liquidio: use meaningful names for IRQs

2017-03-16 Thread David Miller
From: Felix Manlunas Date: Mon, 13 Mar 2017 12:58:04 -0700 > From: Rick Farrington > > All IRQs owned by the PF and VF drivers share the same nondescript name > "octeon"; this makes it difficult to setup interrupt affinity. > > Change the IRQ names to reflect their specific purpose: > > L

Re: [PATCH net-next] bonding: add 802.3ad support for 25G speeds

2017-03-16 Thread David Miller
From: Jarod Wilson Date: Tue, 14 Mar 2017 11:48:32 -0400 > Cut-n-paste enablement of 802.3ad bonding on 25G NICs, which currently > report 0 as their bandwidth. > > CC: Jay Vosburgh > CC: Veaceslav Falico > CC: Andy Gospodarek > CC: netdev@vger.kernel.org > Signed-off-by: Jarod Wilson Appli

Re: [PATCH] tcp_westwood: fix tcp_westwood_info() style mistakes

2017-03-16 Thread David Miller
From: Chun Long Date: Tue, 14 Mar 2017 15:26:24 +0800 > From: chun Long > > replace comma to semi colons in tcp_westwood_info(). Applied.

Re: [PATCH] net: mpls: Fix nexthop alive tracking on down events

2017-03-16 Thread David Miller
From: David Ahern Date: Mon, 13 Mar 2017 16:49:10 -0700 > Alive tracking of nexthops can account for a link twice if the carrier > goes down followed by an admin down of the same link rendering multipath > routes useless. This is similar to 79099aab38c8 for UNREGISTER events and > DOWN events. >

Re: Performance issue with igb with lots of different src-ip addrs.

2017-03-16 Thread Ben Greear
I'm actually using a hacked up version of pktgen nicely driven by our GUI tool, but the crux is that you need to set min and max src IP to some large range. We are driving pktgen from a separate machine. Stock pktgen isn't good at reporting received pkts last I checked, so it may be more diffic

Re: [PATCH net-next] liquidio: remove/replace invalid code

2017-03-16 Thread David Miller
From: Felix Manlunas Date: Mon, 13 Mar 2017 12:07:32 -0700 > From: Rick Farrington > > Remove invalid call to dma_sync_single_for_cpu() because previous DMA > allocation was coherent--not streaming. Remove code that references fields > in struct list_head; replace it with calls to list_empty()

Re: [PATCH net] net/mlx4_core: Avoid delays during VF driver device shutdown

2017-03-16 Thread David Miller
From: Tariq Toukan Date: Mon, 13 Mar 2017 19:29:08 +0200 > From: Jack Morgenstein > > Some Hypervisors detach VFs from VMs by instantly causing an FLR event > to be generated for a VF. > > In the mlx4 case, this will cause that VF's comm channel to be disabled > before the VM has an opportunit

Re: [PATCH net-next] netem: apply correct delay when rate throttling

2017-03-16 Thread David Miller
From: Stephen Hemminger Date: Mon, 13 Mar 2017 10:16:58 -0700 > From: Nik Unger > > I recently reported on the netem list that iperf network benchmarks > show unexpected results when a bandwidth throttling rate has been > configured for netem. Specifically: > > 1) The measured link bandwidth *

Re: [RESEND PATCH -net] cpsw/netcp: work around reverse cpts dependency

2017-03-16 Thread David Miller
From: Arnd Bergmann Date: Mon, 13 Mar 2017 17:59:04 +0100 > The dependency is reversed: cpsw and netcp call into cpts, > but cpts depends on the other two in Kconfig. This can lead > to cpts being a loadable module and its callers built-in: > > drivers/net/ethernet/ti/cpsw.o: In function `cpsw_r

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > What I probably can do is go through and replace all the spots where > we where checking for sk_napi_id being 0, and instead replace it with > a check against NR_CPUS. This seems a good idea.

Re: Performance issue with igb with lots of different src-ip addrs.

2017-03-16 Thread Alexander Duyck
I'm not really interested in installing a custom version of pktgen. Any chance you can recreate the issue with standard pktgen? You might try running perf to get a snapshot of what is using CPU time on the system. It will probably give you a pretty good idea where the code is that is eating up al

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 7:57 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > >> What I probably can do is go through and replace all the spots where >> we where checking for sk_napi_id being 0, and instead replace it with >> a check against NR_CPUS. > > This s

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 19:40 -0700, Alexander Duyck wrote: > I don't know. My concern here is about the cost of going through all > that code just for something that we know shouldn't be valid. If > nothing else I might update sk_can_busy_loop so that it doesn't try > busy looping on a sk_napi_id

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:50 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: >> On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > >> > It is not clear why this patch is needed . >> > >> > What you describe here is the case we might receive packets for a so

Re: Performance issue with igb with lots of different src-ip addrs.

2017-03-16 Thread Alexander Duyck
Can you include the pktgen script you are running? Also when you say you are driving traffic through the bridge are you sending from something external on the system or are you actually directing the traffic from pktgen into the bridge directly? - Alex On Thu, Mar 16, 2017 at 3:49 PM, Ben Greear

[PATCH net-stable] net: solve a NAPI race

2017-03-16 Thread Eric Dumazet
commit 39e6c8208d7b6fb9d2047850fb3327db567b564b upstream. While playing with mlx4 hardware timestamping of RX packets, I found that some packets were received by TCP stack with a ~200 ms delay... Since the timestamp was provided by the NIC, and my probe was added in tcp_v4_rcv() while in BH handl

Re: [RFC] [net]openvswitch: Clear the ct flow key for the recirculated packet

2017-03-16 Thread Joe Stringer
On 16 March 2017 at 05:25, Numan Siddique wrote: > It is possible that the ct flow key information would have > gone stale for the packets received from the userspace due to > clone or ct_clear actions. > > In the case of OVN, it adds ping responder flows, which modifies > the original icmp4 reque

mlx5e backports for v4.9 -stable

2017-03-16 Thread David Miller
Commits: >From b0d4660b4cc52e6477ca3a43435351d565dfcedc Mon Sep 17 00:00:00 2001 From: Tariq Toukan Date: Wed, 22 Feb 2017 17:20:14 +0200 Subject: [PATCH] net/mlx5e: Fix broken CQE compression initialization and >From 6dc4b54e77282

[PATCH net-next 1/3] netvsc: avoid race with callback

2017-03-16 Thread Stephen Hemminger
Change the argument to channel callback from the channel pointer to the internal data structure containing per-channel info. This avoids any possible races when callback happens during initialization and makes IRQ code simpler. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c

Re: netdev level filtering? perhaps pushing socket filters down?

2017-03-16 Thread Johannes Berg
> Attach at just above the driver, before it ever gets to > stations/vdevs, and ignore radiotap headers and/or add special > processing for metadata like rx-info? That'd be a different feature, perhaps more like XDP. There anyway is no radiotap header at that point, but not changing whether or n

Re: NAPI complete race backport?

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 16:25 -0700, David Miller wrote: > Eric, could you please give me a backport of commit: > > > From 39e6c8208d7b6fb9d2047850fb3327db567b564b Mon Sep 17 00:00:00 2001 > From: Eric Dumazet > Date: Tue, 28 Feb 2017 10:34:50 -0800 > Subject: [PATCH] net: solv

Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 16:13 -0700, Cong Wang wrote: > On Thu, Mar 16, 2017 at 2:33 PM, Eric Dumazet wrote: > > Have you backported the redirect fix ? > > > > commit 45caeaa5ac0b4b11784ac6f932c0ad4c6b67cda0 > > > > Or other fixes that went very recently (pick David Miller net tree) > > Why the com

NAPI complete race backport?

2017-03-16 Thread David Miller
Eric, could you please give me a backport of commit: >From 39e6c8208d7b6fb9d2047850fb3327db567b564b Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 28 Feb 2017 10:34:50 -0800 Subject: [PATCH] net: solve a NAPI race for 4.10 and earlier? This is

[PATCH net-next 3/3] netvsc: remove unused #define

2017-03-16 Thread Stephen Hemminger
Not used anywhere. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index b09c4fca1805..6b5f75217694 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/driv

[PATCH net-next] liquidio: fix wrong information about link modes reported to ethtool

2017-03-16 Thread Felix Manlunas
From: Manish Awasthi Information reported to ethtool about link modes is wrong for 25G NIC. Fix it by checking for presence of 25G NIC, checking the link speed reported by NIC firmware, and then assigning proper values to the ethtool_link_ksettings struct. Signed-off-by: Manish Awasthi Signed-

Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread Cong Wang
On Thu, Mar 16, 2017 at 2:33 PM, Eric Dumazet wrote: > Have you backported the redirect fix ? > > commit 45caeaa5ac0b4b11784ac6f932c0ad4c6b67cda0 > > Or other fixes that went very recently (pick David Miller net tree) Why the commit above is relevant here? It fixes a double-release, while Kevin's

[PATCH net-next 0/3] netvsc: small changesfor net-next

2017-03-16 Thread Stephen Hemminger
One bugfix, and two non-code patches Stephen Hemminger (3): netvsc: avoid race with callback netvsc: add comments about callback's and NAPI netvsc: remove unused #define drivers/net/hyperv/hyperv_net.h | 3 --- drivers/net/hyperv/netvsc.c | 31 +-- driv

[PATCH net-next 2/3] netvsc: add comments about callback's and NAPI

2017-03-16 Thread Stephen Hemminger
Add some short description of how callback's and NAPI interoperate. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 0a2e9bd98d2c..989

Re: [net-next PATCH 3/5] net: Introduce SO_INCOMING_NAPI_ID

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > > + case SO_INCOMING_NAPI_ID: > + v.val = sk->sk_napi_id; > + break; I guess that here you should filter invalid values. (So that you no longer need the first patch in this series) Also, it looks like eBPF

[net-next sample action optimization v3 2/4] openvswitch: Refactor recirc key allocation.

2017-03-16 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar --- net/openvswitch/actions.c | 66 +

[net-next sample action optimization v3 1/4] openvswitch: Deferred fifo API change.

2017-03-16 Thread Andy Zhou
add_deferred_actions() API currently requires actions to be passed in as a fully encoded netlink message. So far both 'sample' and 'recirc' actions happens to carry actions as fully encoded netlink messages. However, this requirement is more restrictive than necessary, future patch will need to pas

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 15:33 -0700, Alexander Duyck wrote: > On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > > It is not clear why this patch is needed . > > > > What you describe here is the case we might receive packets for a socket > > coming from different interfaces ? > > > > If skb->n

[net-next sample action optimization v3 0/4]

2017-03-16 Thread Andy Zhou
The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. --- v1->v2: Address pr

[net-next sample action optimization v3 3/4] openvswitch: Optimize sample action for the clone use cases

2017-03-16 Thread Andy Zhou
With the introduction of open flow 'clone' action, the OVS user space can now translate the 'clone' action into kernel datapath 'sample' action, with 100% probability, to ensure that the clone semantics, which is that the packet seen by the clone action is the same as the packet seen by the action

[net-next sample action optimization v3 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-16 Thread Andy Zhou
Added clone_execute() that both the sample and the recirc action implementation can use. Signed-off-by: Andy Zhou --- net/openvswitch/actions.c | 175 -- 1 file changed, 92 insertions(+), 83 deletions(-) diff --git a/net/openvswitch/actions.c b/net/op

[PATCH net] tcp: tcp_get_info() should read tcp_time_stamp later

2017-03-16 Thread Eric Dumazet
From: Eric Dumazet Commit b369e7fd41f7 ("tcp: make TCP_INFO more consistent") moved lock_sock_fast() earlier in tcp_get_info() This has the minor effect that jiffies value being sampled at the beginning of tcp_get_info() is more likely to be off by one, and we report big tcpi_last_data_sent valu

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:05 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: >> From: Sridhar Samudrala >> >> Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if >> skb->napi_id is a valid value. >> >> This happens in loopback paths where

Re: netdev level filtering? perhaps pushing socket filters down?

2017-03-16 Thread Ben Greear
On 03/16/2017 03:33 PM, Johannes Berg wrote: Hi all, Occasionally - we just had another case - people want to hook into packets received and processed by the mac80211 stack, but because they don't need all of them (e.g. not data packets), even adding a monitor interface and bringing it up has to

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Samudrala, Sridhar
On 3/16/2017 3:05 PM, Eric Dumazet wrote: On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: From: Sridhar Samudrala Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if skb->napi_id is a valid value. This happens in loopback paths where skb->napi_id is not updat

Performance issue with igb with lots of different src-ip addrs.

2017-03-16 Thread Ben Greear
Hello, We notice that when using two igb ports as a bridge, if we use pktgen to drive traffic through the bridge and randomize (or use a very large range) for the source IP addr in pktgen, then performance of igb is very poor (like 150Mbps throughput instead of 1Gbps). It runs right at line spe

Re: [net-next PATCH 5/5] epoll: Add busy poll support to epoll with socket fds.

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:11 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 11:33 -0700, Alexander Duyck wrote: >> From: Sridhar Samudrala > >> +/* >> + * If busy polling is on and the file is a socket, return a pointer to >> + * struct sock >> + */ >> +static inline struct sock *ep_sk_from_file

Re: [net-next PATCH 2/5] net: Call sk_mark_napi_id() in the ACK receive path

2017-03-16 Thread Alexander Duyck
On Thu, Mar 16, 2017 at 3:04 PM, Eric Dumazet wrote: > On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: >> From: Sridhar Samudrala >> >> Call sk_mark_napi_id() in the ACK receive path of a TCP_NEW_SYN_RECV >> socket, so that sk->napi_id is set even if the socket hasn't yet received >> an

netdev level filtering? perhaps pushing socket filters down?

2017-03-16 Thread Johannes Berg
Hi all, Occasionally - we just had another case - people want to hook into packets received and processed by the mac80211 stack, but because they don't need all of them (e.g. not data packets), even adding a monitor interface and bringing it up has too high a cost because SKBs need to be prepared

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-16 Thread Akshay Bhat
Hi Wolfgang, On 03/16/2017 04:02 PM, Wolfgang Grandegger wrote: > > Looks much better now! There are message for state changes to error > warning and passive. Just the following message is not correct: > > (000.200824) can0 2004 [8] 00 40 00 00 00 00 5F 19 ERRORFRAME > controller

[PATCH 00/11] net: usbnet: move to new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. On usbnet, it was often implemented with usbnet_{get|set}_settings. In this serie, I add usbnet_{get|set}_link_ksettings in the first patch, then I update all the driver to use this new api, and in the last patch I remove the old api usbnet_{get|se

[PATCH 04/11] net: usb: cdc_ncm: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/cdc_ncm.c |4 ++-- 1 files changed, 2 insertions(+)

[PATCH 01/11] net: usb: usbnet: add new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We add the new api {get|set}_link_ksettings to this driver. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/usbnet.c | 36 ++

[PATCH 11/11] net: usb: usb: remove old api ethtool_{get|set}_settings

2017-03-16 Thread Philippe Reynes
The function usbnet_{get|set}_settings is no longer used, so we remove it. Signed-off-by: Philippe Reynes --- drivers/net/usb/usbnet.c | 35 --- include/linux/usb/usbnet.h |4 2 files changed, 0 insertions(+), 39 deletions(-) diff --git a/drivers/net

[PATCH 10/11] net: usb: asix: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/asix_devices.c | 12 ++-- 1 files changed, 6

[PATCH 09/11] net: usb: sr9700: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/sr9700.c |4 ++-- 1 files changed, 2 insertions(+),

[PATCH 07/11] net: usb: sierra_net: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/sierra_net.c |4 ++-- 1 files changed, 2 insertions

[PATCH 08/11] net: usb: smsc75xx: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/smsc75xx.c |4 ++-- 1 files changed, 2 insertions(+

[PATCH 06/11] net: usb: mcs7830: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/mcs7830.c |4 ++-- 1 files changed, 2 insertions(+)

[PATCH 03/11] net: usb: sr9800: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/sr9800.c |4 ++-- 1 files changed, 2 insertions(+),

[PATCH 02/11] net: usb: smsc95xx: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/smsc95xx.c | 24 1 files cha

[PATCH 05/11] net: usb: dm9601: use new api ethtool_{get|set}_link_ksettings

2017-03-16 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/dm9601.c |4 ++-- 1 files changed, 2 insertions(+),

Re: [net-next PATCH 5/5] epoll: Add busy poll support to epoll with socket fds.

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:33 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > +/* > + * If busy polling is on and the file is a socket, return a pointer to > + * struct sock > + */ > +static inline struct sock *ep_sk_from_file(struct file *file) > +{ > + struct inode *inode = file_ino

Re: [net-next PATCH 1/5] net: Do not record sender_cpu as napi_id in socket receive paths

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > Fix sk_mark_napi_id() and sk_mark_napi_id_once() to set sk_napi_id only if > skb->napi_id is a valid value. > > This happens in loopback paths where skb->napi_id is not updated in > rx path and holds sender_c

Re: [net-next PATCH 2/5] net: Call sk_mark_napi_id() in the ACK receive path

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 11:32 -0700, Alexander Duyck wrote: > From: Sridhar Samudrala > > Call sk_mark_napi_id() in the ACK receive path of a TCP_NEW_SYN_RECV > socket, so that sk->napi_id is set even if the socket hasn't yet received > any data. With this change we should be able to start busy po

Re: [PATCH] [PATCH net] net: Do not hold the reference for the same sk_rx_dst.

2017-03-16 Thread Eric Dumazet
On Thu, 2017-03-16 at 01:08 -0700, Kevin Xu wrote: > In some rare cases, inet_sk_rx_dst_set() may be called multiple times > on the same dst, causing reference count leakage. Eventually, it > prevents net_device to be destroyed. The bug then manifested as > > unregister_netdevice: waiting for lo t

Re: [RFC] [net]openvswitch: Clear the ct flow key for the recirculated packet

2017-03-16 Thread Lance Richardson
> From: "Numan Siddique" > To: netdev@vger.kernel.org, "ovs dev" > Cc: "Joe Stringer" , "Andy Zhou" , ja...@ovn.org > Sent: Thursday, March 16, 2017 8:25:06 AM > Subject: [RFC] [net]openvswitch: Clear the ct flow key for the recirculated > packet > > It is possible that the ct flow key informat

Re: [PATCH net-next V2 0/2] small set of sched cleanups

2017-03-16 Thread Cong Wang
On Thu, Mar 16, 2017 at 12:02 PM, David Miller wrote: > From: Or Gerlitz > Date: Thu, 16 Mar 2017 12:53:40 +0200 > >> Just two cleanups -- but for the 2nd one I think we need ack from >> Cong Wang to make sure this isn't actually a bug report.. > ... >> changes from V1: >> - addressed comment

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-16 Thread Wolfgang Grandegger
Hello Akshay, Am 16.03.2017 um 18:06 schrieb Akshay Bhat: > Hi Wolfgang, > > On 03/15/2017 05:42 AM, Wolfgang Grandegger wrote: >> Hello Akshay, >> > ..snip.. >>> >>> So here is my plan: >>> - Have the bus error interrupt always enabled >>> - If berr-reporting off, then have the isr checks/report

Re: port mirror on dsa switches?

2017-03-16 Thread Florian Fainelli
On 03/16/2017 12:43 PM, Maxim Uvarov wrote: > 2017-03-16 19:47 GMT+03:00 Florian Fainelli : >> Hi, >> >> On 03/16/2017 03:32 AM, Maxim Uvarov wrote: >>> Hello, >>> >>> Some dsa switches can support port mirror in hardware. Does somebody >>> have any idea how to >>> work with it from linux side in g

[PATCH net] netvsc: fix race during initialization

2017-03-16 Thread Stephen Hemminger
When device is being setup on boot, there is a small race where network device callback is registered, but the netvsc_device pointer is not set yet. This can cause a NULL ptr dereference if packet arrives during this window. Fixes: 46b4f7f5d1f7 ("netvsc: eliminate per-device outstanding send coun

[PATCH] tun: fix inability to set offloads after disabling them via ethtool

2017-03-16 Thread Yaroslav Isakov
Added missing logic in tun driver, which prevents apps to set offloads using tun ioctl, if offloads were previously disabled via ethtool Signed-of-by: Yaroslav Isakov (yaroslav.isa...@gmail.com) --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/driver

[PATCH] tun: fix inability to set offloads after disabling them via ethtool

2017-03-16 Thread Yaroslav Isakov
Added missing logic in tun driver, which prevents apps to set offloads using tun ioctl, if offloads were previously disabled via ethtool Signed-off-by: Yaroslav Isakov --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 34cc3c5.

Re: port mirror on dsa switches?

2017-03-16 Thread Maxim Uvarov
2017-03-16 19:47 GMT+03:00 Florian Fainelli : > Hi, > > On 03/16/2017 03:32 AM, Maxim Uvarov wrote: >> Hello, >> >> Some dsa switches can support port mirror in hardware. Does somebody >> have any idea how to >> work with it from linux side in generic way? > > It has been implemented with commit >

Re: [PATCH] tun: fix inability to set offloads after disabling them via ethtool

2017-03-16 Thread Yaroslav Isakov
Sorry for spamming mailing list, forgot to check via checkpatch.pl, will resend it one more time 2017-03-16 21:08 GMT+03:00 Yaroslav Isakov : > Added missing logic in tun driver, which prevents apps to set > offloads using tun ioctl, if offloads were previously disabled via ethtool > > Signed-of-b

Re: [net-next sample action optimization v2 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-16 Thread Pravin Shelar
On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou wrote: > Added execute_or_defer_actions() that both sample and recirc > action's implementation can use. > > Signed-off-by: Andy Zhou > --- > net/openvswitch/actions.c | 96 > +-- > 1 file changed, 59 inserti

Re: [net-next sample action optimization v2 1/4] openvswitch: Deferred fifo API change.

2017-03-16 Thread Andy Zhou
On Thu, Mar 16, 2017 at 10:28 AM, Pravin Shelar wrote: > On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou wrote: >> add_deferred_actions() API currently requires actions to be passed in >> as a fully encoded netlink message. So far both 'sample' and 'recirc' >> actions happens to carry actions as fully

Re: tun offloads bug

2017-03-16 Thread Yaroslav Isakov
Sorry for this mess! I'll do it properly this time, I hope :) 2017-03-16 22:12 GMT+03:00 David Miller : > > This is not how you resubmit a patch. > > You must make a fresh patch posting to the mailing list, provide the > commit message and patch as inline text, and not do it as a reply to > anothe

Re: tun offloads bug

2017-03-16 Thread David Miller
This is not how you resubmit a patch. You must make a fresh patch posting to the mailing list, provide the commit message and patch as inline text, and not do it as a reply to another posting. Thank you.

Re: [PATCH 07/17] net: convert sock.sk_refcnt from atomic_t to refcount_t

2017-03-16 Thread David Miller
From: Kees Cook Date: Thu, 16 Mar 2017 11:38:25 -0600 > I am, of course, biased, but I think the evidence of actual > refcounting attacks outweighs the theoretical performance cost of > these changes. This is not theoretical at all. We count the nanoseconds that every packet takes to get proces

Re: [PATCH v2] openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD

2017-03-16 Thread David Miller
From: Kris Murphy Date: Thu, 16 Mar 2017 10:51:28 -0500 > Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement > in ip_tun_from_nlattr in order to prevent the default case > returning an error. > > Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area") > Signed-off-by:

Re: [PATCH 0/2] pull request for net: batman-adv 2017-03-16

2017-03-16 Thread David Miller
From: Simon Wunderlich Date: Thu, 16 Mar 2017 13:55:10 +0100 > here are two bugfixes for batman-adv which we would like to see > integrated into net. > > Please pull or let me know of any problem! Pulled, thanks Simon.

Re: [PATCH net-next] bpf: Detect identical PTR_TO_MAP_VALUE_OR_NULL registers

2017-03-16 Thread Daniel Borkmann
On 03/16/2017 07:23 PM, David Miller wrote: From: Daniel Borkmann Date: Thu, 16 Mar 2017 11:32:31 +0100 Do you have a chance to queue this one and it's follow-up fixes to -stable? I checked 4.10 and they seem to have it already, but not 4.9 kernels. Commits: 6760bf2 bpf: fix mark_reg_unkn

Re: [PATCH net-next V2 0/2] small set of sched cleanups

2017-03-16 Thread David Miller
From: Or Gerlitz Date: Thu, 16 Mar 2017 12:53:40 +0200 > Just two cleanups -- but for the 2nd one I think we need ack from > Cong Wang to make sure this isn't actually a bug report.. ... > changes from V1: > - addressed comment from Sergei to use 12 hex digits etc Series applied since Eric D

  1   2   3   >