The branch, ecsv/to_submit has been created at 094e43d50d7e421e9036d72a5a1d93c250cdbf0a (commit)
- Shortlog ------------------------------------------------------------ commit 094e43d50d7e421e9036d72a5a1d93c250cdbf0a Author: Kazuya Mizuguchi kazuya.mizuguchi.ks@renesas.com Date: Mon May 2 00:19:51 2016 +0900
ravb: Remove rx buffer ALIGN
Aligning the reception data size is not required.
Signed-off-by: Kazuya Mizuguchi kazuya.mizuguchi.ks@renesas.com Signed-off-by: Yoshihiro Kaneko ykaneko0929@gmail.com Tested-by: Simon Horman horms+renesas@verge.net.au Signed-off-by: David S. Miller davem@davemloft.net
commit ede00a5ceb4d903a8c137a52bb77d574baaef8bd Merge: 9580bf2 9d3f65b Author: David S. Miller davem@davemloft.net Date: Tue May 3 00:35:16 2016 -0400
Merge tag 'wireless-drivers-next-for-davem-2016-05-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says:
==================== wireless-drivers patches for 4.7
Major changes:
brcmfmac
* add support for nl80211 BSS_SELECT feature
mwifiex
* add platform specific wakeup interrupt support
ath10k
* implement set_tsf() for 10.2.4 branch * remove rare MSI range support * remove deprecated firmware API 1 support
ath9k
* add module parameter to invert LED polarity
wcn36xx
* fixes to get the driver properly working on Dragonboard 410c ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 9580bf2edb402b3afaf9c5a4efb6953f993ef52e Author: Eric Dumazet edumazet@google.com Date: Sat Apr 30 10:19:29 2016 -0700
net: relax expensive skb_unclone() in iptunnel_handle_offloads()
Locally generated TCP GSO packets having to go through a GRE/SIT/IPIP tunnel have to go through an expensive skb_unclone()
Reallocating skb->head is a lot of work.
Test should really check if a 'real clone' of the packet was done.
TCP does not care if the original gso_type is changed while the packet travels in the stack.
This adds skb_header_unclone() which is a variant of skb_clone() using skb_header_cloned() check instead of skb_cloned().
This variant can probably be used from other points.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit c0ef079ca791ef9e057ac748051425a768c9e192 Author: Florian Westphal fw@strlen.de Date: Tue May 3 03:29:09 2016 +0200
netdevice: shrink size of struct netdev_queue
- trans_timeout is incremented when tx queue timed out (tx watchdog). - tx_maxrate is set via sysfs
Moving tx_maxrate to read-mostly part shrinks the struct by 64 bytes. While at it, also move trans_timeout (it is out-of-place in the 'write-mostly' part).
Signed-off-by: Florian Westphal fw@strlen.de Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit e8194d4fa00dae2ff24983b82780ed0949eaf2fd Merge: d1ac3b1 a60c090 Author: David S. Miller davem@davemloft.net Date: Mon May 2 22:27:06 2016 -0400
Merge branch 'bridge-per-vlan-stats'
Nikolay Aleksandrov says:
==================== bridge: per-vlan stats
This set adds support for bridge per-vlan statistics. In order to be able to dump statistics for many vlans we need a way to continue dumping after reaching maximum size, thus patches 01 and 02 extend the new stats API with a per-device extended link stats attribute and callback which can save its local state and continue where it left off afterwards. I considered using the already existing "fill_xstats" callback but it gets confusing since we need to separate the linkinfo dump from the new stats api dump and adding a flag/argument to do that just looks messy. I don't think the rtnl_link_ops size is an issue, so adding these seemed like the cleaner approach.
Patches 03 and 04 add the stats support and netlink dump support respectively. The stats accounting is controlled via a bridge option which is default off, thus the performance impact is kept minimal. I've tested this set with both old and modified iproute2, kmemleak on and some traffic stress tests while adding/removing vlans and ports.
v3: - drop the RCU pvid patch and remove one pointer fetch as requested - make stats accounting optional with default to off, the option is in the same cache line as vlan_proto and vlan_enabled, so it is already fetched before the fast path check thus the performance impact is minimal, this also allows us to avoid one vlan lookup and return early when using pvid - rebased and retested
v2: - Improve the error checking, rename lidx to prividx and save the current idx user instead of restricting it to one in patch 01 - squash patch 02 into 01 and remove the restriction - add callback descriptions, improve the size calculation and change the xstats message structure to have an embedding level per rtnl link type so we can avoid one call to get the link type (and thus filter on it) and also each link type can now have any number of private attributes inside - fix a problem where the vlan stats are not dumped if the bridge has 0 vlans on it but has vlans on the ports, add bridge link type private attributes and also add paddings for future extensions to avoid at least a few netlink attributes and improve struct alignment - drop the is_skb_forwardable argument constifying patch as it's not needed anymore, but it's a nice cleanup which I'll send separately ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit a60c090361ea211625c27052dbbc11c5222e20e4 Author: Nikolay Aleksandrov nikolay@cumulusnetworks.com Date: Sat Apr 30 10:25:29 2016 +0200
bridge: netlink: export per-vlan stats
Add a new LINK_XSTATS_TYPE_BRIDGE attribute and implement the RTM_GETSTATS callbacks for IFLA_STATS_LINK_XSTATS (fill_linkxstats and get_linkxstats_size) in order to export the per-vlan stats. The paddings were added because soon these fields will be needed for per-port per-vlan stats (or something else if someone beats me to it) so avoiding at least a few more netlink attributes.
Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6dada9b10a0818ba72c249526a742c8c41274a73 Author: Nikolay Aleksandrov nikolay@cumulusnetworks.com Date: Sat Apr 30 10:25:28 2016 +0200
bridge: vlan: learn to count
Add support for per-VLAN Tx/Rx statistics. Every global vlan context gets allocated a per-cpu stats which is then set in each per-port vlan context for quick access. The br_allowed_ingress() common function is used to account for Rx packets and the br_handle_vlan() common function is used to account for Tx packets. Stats accounting is performed only if the bridge-wide vlan_stats_enabled option is set either via sysfs or netlink. A struct hole between vlan_enabled and vlan_proto is used for the new option so it is in the same cache line. Currently it is binary (on/off) but it is intentionally restricted to exactly 0 and 1 since other values will be used in the future for different purposes (e.g. per-port stats).
Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 97a47facf3468fb6ebd697324fc2a7245755c417 Author: Nikolay Aleksandrov nikolay@cumulusnetworks.com Date: Sat Apr 30 10:25:27 2016 +0200
net: rtnetlink: add linkxstats callbacks and attribute
Add callbacks to calculate the size and fill link extended statistics which can be split into multiple messages and are dumped via the new rtnl stats API (RTM_GETSTATS) with the IFLA_STATS_LINK_XSTATS attribute. Also add that attribute to the idx mask check since it is expected to be able to save state and resume dumping (e.g. future bridge per-vlan stats will be dumped via this attribute and callbacks). Each link type should nest its private attributes under the per-link type attribute. This allows to have any number of separated private attributes and to avoid one call to get the dev link type.
Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit e8872a25a05efcf0a133ca7ed6511fe9f908dc41 Author: Nikolay Aleksandrov nikolay@cumulusnetworks.com Date: Sat Apr 30 10:25:26 2016 +0200
net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter
The new prividx argument allows the current dumping device to save a private state counter which would enable it to continue dumping from where it left off. And the idxattr is used to save the current idx user so multiple prividx using attributes can be requested at the same time as suggested by Roopa Prabhu.
Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit d1ac3b16d535019b7da6fd81d81a469e72d5c3dd Merge: 570d632 b05229f Author: David S. Miller davem@davemloft.net Date: Mon May 2 19:23:32 2016 -0400
Merge branch 'ipv6-tunnel-cleanups'
Tom Herbert says:
==================== net: Cleanup IPv6 ip tunnels
The IPv6 tunnel code is very different from IPv4 code. There is a lot of redundancy with the IPv4 code, particularly in the GRE tunneling.
This patch set cleans up the tunnel code to make the IPv6 code look more like the IPv4 code and use common functions between the two stacks where possible.
This work should make it easier to maintain and extend the IPv6 ip tunnels.
Items in this patch set: - Cleanup IPv6 tunnel receive path (ip6_tnl_rcv). Includes using gro_cells and exporting ip6_tnl_rcv so the ip6_gre can call it - Move GRE functions to common header file (tx functions) or gre_demux.c (rx functions like gre_parse_header) - Call common GRE functions from IPv6 GRE - Create ip6_tnl_xmit (to be like ip_tunnel_xmit)
Tested: Ran super_netperf tests for TCP_RR and TCP_STREAM for: - IPv4 over gre, gretap, gre6, gre6tap - IPv6 over gre, gretap, gre6, gre6tap - ipip - ip6ip6 - ipip/gue - IPv6 over gre/gue - IPv4 over gre/gue ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit b05229f442288210f2b1f5b4b2a9d71836e90686 Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:21 2016 -0700
gre6: Cleanup GREv6 transmit path, call common GRE functions
Changes in GREv6 transmit path: - Call gre_checksum, remove gre6_checksum - Rename ip6gre_xmit2 to __gre6_xmit - Call gre_build_header utility function - Call ip6_tnl_xmit common function - Call ip6_tnl_change_mtu, eliminate ip6gre_tunnel_change_mtu
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 79ecb90e65f33d1941ac1f8e43eec34ec3bdbad8 Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:20 2016 -0700
ipv6: Generic tunnel cleanup
A few generic changes to generalize tunnels in IPv6: - Export ip6_tnl_change_mtu so that it can be called by ip6_gre - Add tun_hlen to ip6_tnl structure.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 182a352d2d5e0b435f7856c0cc23d467dcec55ef Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:19 2016 -0700
gre: Create common functions for transmit
Create common functions for both IPv4 and IPv6 GRE in transmit. These are put into gre.h.
Common functions are for: - GRE checksum calculation. Move gre_checksum to gre.h. - Building a GRE header. Move GRE build_header and rename gre_build_header.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8eb30be0352d09165e94a41fef1c7b994dca0714 Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:18 2016 -0700
ipv6: Create ip6_tnl_xmit
This patch renames ip6_tnl_xmit2 to ip6_tnl_xmit and exports it. Other users like GRE will be able to call this. The original ip6_tnl_xmit function is renamed to ip6_tnl_start_xmit (this is an ndo_start_xmit function).
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 308edfdf1563f78e93ebda9aee608279de1c5898 Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:17 2016 -0700
gre6: Cleanup GREv6 receive path, call common GRE functions
- Create gre_rcv function. This calls gre_parse_header and ip6gre_rcv. - Call ip6_tnl_rcv. Doing this and using gre_parse_header eliminates most of the code in ip6gre_rcv.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 95f5c64c3c13a609e137d35c4b452519e0b954df Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:16 2016 -0700
gre: Move utility functions to common headers
Several of the GRE functions defined in net/ipv4/ip_gre.c are usable for IPv6 GRE implementation (that is they are protocol agnostic).
These include: - GRE flag handling functions are move to gre.h - GRE build_header is moved to gre.h and renamed gre_build_header - parse_gre_header is moved to gre_demux.c and renamed gre_parse_header - iptunnel_pull_header is taken out of gre_parse_header. This is now done by caller. The header length is returned from gre_parse_header in an int* argument.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0d3c703a9d1723c7707e0680019ac8ff5922db42 Author: Tom Herbert tom@herbertland.com Date: Fri Apr 29 17:12:15 2016 -0700
ipv6: Cleanup IPv6 tunnel receive path
Some basic changes to make IPv6 tunnel receive path look more like IPv4 path: - Make ip6_tnl_rcv non-static so that GREv6 and others can call it - Make ip6_tnl_rcv look like ip_tunnel_rcv - Switch to gro_cells_receive - Make ip6_tnl_rcv non-static and export it
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 570d632008fc2c7b17f55db44179fb9a03d107c4 Merge: 5e59c83 d41a69f Author: David S. Miller davem@davemloft.net Date: Mon May 2 17:02:26 2016 -0400
Merge branch 'tcp-preempt'
Eric Dumazet says:
==================== net: make TCP preemptible
Most of TCP stack assumed it was running from BH handler.
This is great for most things, as TCP behavior is very sensitive to scheduling artifacts.
However, the prequeue and backlog processing are problematic, as they need to be flushed with BH being blocked.
To cope with modern needs, TCP sockets have big sk_rcvbuf values, in the order of 16 MB, and soon 32 MB. This means that backlog can hold thousands of packets, and things like TCP coalescing or collapsing on this amount of packets can lead to insane latency spikes, since BH are blocked for too long.
It is time to make UDP/TCP stacks preemptible.
Note that fast path still runs from BH handler.
v2: Added "tcp: make tcp_sendmsg() aware of socket backlog" to reduce latency problems of large sends.
v3: Fixed a typo in tcp_cdg.c ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit d41a69f1d390fa3f2546498103cdcd78b30676ff Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:53 2016 -0700
tcp: make tcp_sendmsg() aware of socket backlog
Large sendmsg()/write() hold socket lock for the duration of the call, unless sk->sk_sndbuf limit is hit. This is bad because incoming packets are parked into socket backlog for a long time. Critical decisions like fast retransmit might be delayed. Receivers have to maintain a big out of order queue with additional cpu overhead, and also possible stalls in TX once windows are full.
Bidirectional flows are particularly hurt since the backlog can become quite big if the copy from user space triggers IO (page faults)
Some applications learnt to use sendmsg() (or sendmmsg()) with small chunks to avoid this issue.
Kernel should know better, right ?
Add a generic sk_flush_backlog() helper and use it right before a new skb is allocated. Typically we put 64KB of payload per skb (unless MSG_EOR is requested) and checking socket backlog every 64KB gives good results.
As a matter of fact, tests with TSO/GSO disabled give very nice results, as we manage to keep a small write queue and smaller perceived rtt.
Note that sk_flush_backlog() maintains socket ownership, so is not equivalent to a {release_sock(sk); lock_sock(sk);}, to ensure implicit atomicity rules that sendmsg() was giving to (possibly buggy) applications.
In this simple implementation, I chose to not call tcp_release_cb(), but we might consider this later.
Signed-off-by: Eric Dumazet edumazet@google.com Cc: Alexei Starovoitov ast@fb.com Cc: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5413d1babe8f10de13d72496c12b862eef8ba613 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:52 2016 -0700
net: do not block BH while processing socket backlog
Socket backlog processing is a major latency source.
With current TCP socket sk_rcvbuf limits, I have sampled __release_sock() holding cpu for more than 5 ms, and packets being dropped by the NIC once ring buffer is filled.
All users are now ready to be called from process context, we can unblock BH and let interrupts be serviced faster.
cond_resched_softirq() could be removed, as it has no more user.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 860fbbc343bf05a71b31555579ff4878194be01b Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:51 2016 -0700
sctp: prepare for socket backlog behavior change
sctp_inq_push() will soon be called without BH being blocked when generic socket code flushes the socket backlog.
It is very possible SCTP can be converted to not rely on BH, but this needs to be done by SCTP experts.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit e61da9e259ef887bd516ab08dfdf1c1261017e8e Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:50 2016 -0700
udp: prepare for non BH masking at backlog processing
UDP uses the generic socket backlog code, and this will soon be changed to not disable BH when protocol is called back.
We need to use appropriate SNMP accessors.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7309f8821fd65e8272ce82e852532b02967812da Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:49 2016 -0700
dccp: do not assume DCCP code is non preemptible
DCCP uses the generic backlog code, and this will soon be changed to not disable BH when protocol is called back.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit fb3477c0f45aad5dfb2de559949872770e6cd431 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:48 2016 -0700
tcp: do not block bh during prequeue processing
AFAIK, nothing in current TCP stack absolutely wants BH being disabled once socket is owned by a thread running in process context.
As mentioned in my prior patch ("tcp: give prequeue mode some care"), processing a batch of packets might take time, better not block BH at all.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit c10d9310edf5aa4a676991139d1a43ec7d87e56b Author: Eric Dumazet edumazet@google.com Date: Fri Apr 29 14:16:47 2016 -0700
tcp: do not assume TCP code is non preemptible
We want to to make TCP stack preemptible, as draining prequeue and backlog queues can take lot of time.
Many SNMP updates were assuming that BH (and preemption) was disabled.
Need to convert some __NET_INC_STATS() calls to NET_INC_STATS() and some __TCP_INC_STATS() to TCP_INC_STATS()
Before using this_cpu_ptr(net->ipv4.tcp_sk) in tcp_v4_send_reset() and tcp_v4_send_ack(), we add an explicit preempt disabled section.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5e59c83f2335d634946e1a4fe7bc1e921930f132 Merge: 582a1db 6619ac5 Author: David S. Miller davem@davemloft.net Date: Mon May 2 16:47:55 2016 -0400
Merge branch 'xgene-channel-number'
Iyappan Subramanian says:
==================== drivers: net: xgene: fix: Get channel number from device binding
This patch set adds 'channel' property to get ethernet to CPU channel number, thus decoupling the Linux driver from static resource selection.
v2: Address review comments from v1 - removed irq reference from Linux driver - added 'channel' property to get ethernet to CPU channel number
v1: - Initial version ====================
Signed-off-by: Iyappan Subramanian isubramanian@apm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6619ac5a440961536c167dbc10596a26e9288915 Author: Iyappan Subramanian isubramanian@apm.com Date: Fri Apr 29 11:10:15 2016 -0700
dtb: xgene: Add channel property
Added 'channel' property, describing ethernet to CPU channel number.
Signed-off-by: Iyappan Subramanian isubramanian@apm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4cac949f59a133df11d88bc3d1512786507b02bf Author: Iyappan Subramanian isubramanian@apm.com Date: Fri Apr 29 11:10:14 2016 -0700
Documentation: dtb: xgene: Add channel property
Signed-off-by: Iyappan Subramanian isubramanian@apm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2a37daa634416a617bb8e9032626ab491004e7da Author: Iyappan Subramanian isubramanian@apm.com Date: Fri Apr 29 11:10:13 2016 -0700
drivers: net: xgene: Get channel number from device binding
This patch gets ethernet to CPU channel (prefetch buffer number) from the newly added 'channel' property, thus decoupling Linux driver from resource management.
Signed-off-by: Iyappan Subramanian isubramanian@apm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 582a1db98892ef4c1f34c7338b272331994d44ab Merge: 158bc06 16f46bf Author: David S. Miller davem@davemloft.net Date: Mon May 2 00:16:45 2016 -0400
Merge branch 'qed-selftests'
Sudarsana Reddy Kalluru says:
==================== qed/qede: ethtool selftests support.
This series adds the driver support for following selftests: 1. Register test 2. Memory test 3. Clock test 4. Interrupt test 5. Internal loopback test Patch (1) adds the qed driver infrastructure for selftests. Patches (2) and (3) add qede driver support for ethtool selftests.
Please consider applying this series to "net-next". ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 16f46bf054f8bb12c002c0ba64fc9ff17a61bf8f Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Thu Apr 28 20:20:54 2016 -0400
qede: add implementation for internal loopback test.
This patch adds the qede implementation for internal loopback test.
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3044a02eeb61d6fde77ea5140651bfc54afe524c Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Thu Apr 28 20:20:53 2016 -0400
qede: add support for selftests.
This patch adds the qede ethtool support for the following tests: - interrupt test - memory test - register test - clock test
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 03dc76ca1ee5d02401d5a22ed7ddf15b5e9dfe76 Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Thu Apr 28 20:20:52 2016 -0400
qed: add infrastructure for device self tests.
This patch adds the functionality and APIs needed for selftests. It adds the ability to configure the link-mode which is required for the implementation of loopback tests. It adds the APIs for clock test, register test, interrupt test and memory test.
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 158bc065f29c9be0919d18aefab320161936b3a8 Author: Andrew Lunn andrew@lunn.ch Date: Thu Apr 28 21:24:06 2016 -0400
net: dsa: mv88e6xxx: replace ds with ps where possible
The dsa_switch structure ds is actually needed in very few places, mostly during setup of the switch. The private structure ps is however needed nearly everywhere. Pass ps, not ds internally.
[vd: rebased Andrew's patch.]
Signed-off-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8cd14ccbfdba76d0eae13414a85865294fb98df8 Merge: 0970f5b 1c7b4a2 Author: David S. Miller davem@davemloft.net Date: Sun May 1 23:38:49 2016 -0400
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 40GbE Intel Wired LAN Driver Updates 2016-05-01
This series contains updates to i40e and i40evf.
The theme of this series is code reduction, with several code cleanups in this series. Starting with Neerav's removal of the code that implemented the HMC AQ APIs and calls, since they are now obsolete and not supported by firmware.
Anjali changes the default of VFs to make sure they are not trusted or privileged until its explicitly set for trust through the new NDO op interface. Also limited the number of MAC and VLAN addresses a VF can add if it is untrusted/privileged.
Carolyn syncs the VF code for the changes made to the PF for the RSS hash tuple settings, which ends up cleaning up much of the existing code.
Jesse cleans up compiler warnings which were found with gcc's W=2 option. Then removed duplicate code, especially since only one copy was actually being used.
Jacob addresses an issue which was found when testing GCC 6's which happens to produce new warnings when you left shift a signed value beyond the storage sizeof the type. The converts i40e & i40evf to use the BIT() macro more consistently.
Alex actually bucks the trend of code removal by adding support for both drivers to use GSO_PARTIAL so that segmentation of frames with checksums enabled in outer headers is supported. Fortunately it does not take much to add this support! ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 0970f5b3665933f5f0d069607c78fb10bd918b62 Author: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Date: Fri Apr 29 14:17:08 2016 -0300
sctp: signal sk_data_ready earlier on data chunks reception
Dave Miller pointed out that fb586f25300f ("sctp: delay calls to sk_data_ready() as much as possible") may insert latency specially if the receiving application is running on another CPU and that it would be better if we signalled as early as possible.
This patch thus basically inverts the logic on fb586f25300f and signals it as early as possible, similar to what we had before.
Fixes: fb586f25300f ("sctp: delay calls to sk_data_ready() as much as possible") Reported-by: Dave Miller davem@davemloft.net Signed-off-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 70e927b98bb632e0c987818835aacd6787ebe107 Author: Marek Vasut marex@denx.de Date: Mon May 2 02:47:31 2016 +0200
mdio_bus: Fix MDIO bus scanning in __mdiobus_register()
Since commit b74766a0a0fe ("phylib: don't return NULL from get_phy_device()") in linux-next, phy_get_device() will return ERR_PTR(-ENODEV) instead of NULL if the PHY device ID is all ones.
This causes problem with stmmac driver and likely some other drivers which call mdiobus_register(). I triggered this bug on SoCFPGA MCVEVK board with linux-next 20160427 and 20160428. In case of the stmmac, if there is no PHY node specified in the DT for the stmmac block, the stmmac driver ( drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c function stmmac_mdio_register() ) will call mdiobus_register() , which will register the MDIO bus and probe for the PHY.
The mdiobus_register() resp. __mdiobus_register() iterates over all of the addresses on the MDIO bus and calls mdiobus_scan() for each of them, which invokes get_phy_device(). Before the aforementioned patch, the mdiobus_scan() would return NULL if no PHY was found on a given address and mdiobus_register() would continue and try the next PHY address. Now, mdiobus_scan() returns ERR_PTR(-ENODEV), which is caught by the 'if (IS_ERR(phydev))' condition and the loop exits immediately if the PHY address does not contain PHY.
Repair this by explicitly checking for the ERR_PTR(-ENODEV) and if this error comes around, continue with the next PHY address.
Signed-off-by: Marek Vasut marex@denx.de Cc: Arnd Bergmann arnd@arndb.de Cc: David S. Miller davem@davemloft.net Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Florian Fainelli f.fainelli@gmail.com Cc: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1c7b4a23d12f63a2864c2a67ad96e74d0dbbf39c Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 17:19:25 2016 -0400
i40e/i40evf: Add support for GSO partial with UDP_TUNNEL_CSUM and GRE_CSUM
This patch makes it so that i40e and i40evf can use GSO_PARTIAL to support segmentation for frames with checksums enabled in outer headers. As a result we can now send data over these types of tunnels at over 20Gb/s versus the 12Gb/s that was previously possible on my system.
The advantage with the i40e parts is that this offload is mostly transparent as the hardware still deals with the inner and/or outer IPv4 headers so the IP ID is still incrementing for both when this offload is performed.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit ae63bff0d7f333677e7ec532e9c315c74a510403 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:27 2016 -0700
i40evf: make use of BIT() macro to avoid signed left shift
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 2101bac2d4c26208fa0d1d9ffd8b83ad0199d61a Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:26 2016 -0700
i40e: make use of BIT() macro to prevent left shift of signed values
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit dcb57456e73f204beff12e4532aaf573d1115114 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:25 2016 -0700
i40e/i40evf: fix I40E_MASK signed shift overflow warnings
GCC 6 has a new warning which will display when you attempt to left shift a signed value beyond the storage size of the type. I40E_MASK generates a mask value for 32bit registers. Properly typecast the mask value and place the values in parenthesis to prevent macro expansion issues.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5a6fc256e7b64b3073688cc72fae357612cf31c6 Author: Harshitha Ramamurthy harshitha.ramamurthy@intel.com Date: Wed Apr 13 03:08:32 2016 -0700
i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10
Signed-off-by: Harshitha Ramamurthy harshitha.ramamurthy@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a3aa5036cf3798c18fe22041fbfbac01642657e0 Author: Catherine Sullivan catherine.sullivan@intel.com Date: Wed Apr 13 03:08:31 2016 -0700
i40e: Update device ids for X722
Add a device ID for X722.
Change-Id: I574f2345ab341de98a6a1c212d0603af853e48b0 Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit de38fef610f4e72fdf506bb84ddb05b46f4bf653 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Wed Apr 13 03:08:30 2016 -0700
i40e: Drop extra copy of function
i40e_release_rx_desc was in two files, but was only used and needed in txrx.c. Get rid of the extra copy.
Change-Id: I86e18239aa03531fc198b6c052847475084a9200 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a1b5a24fccc83430bb1fa6e0f9925fb8328abd34 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Wed Apr 13 03:08:29 2016 -0700
i40e: Use consistent type for vf_id
The driver was all over the place using signed or unsigned types for vf_id, when it should always be signed.
This fixes warnings of type unsafe comparisons from gcc with W=2.
Change-Id: I2cb681f83d0f68ca124d2e4131e4ac0d9f8a6b22 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit cdc3d93257e162dd12906a6e0207436c2d5c6873 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Wed Apr 13 03:08:28 2016 -0700
i40e: PTP - avoid aggregate return warnings
Aggregate return warnings are when struct types are returned and must be copied to the lvalue with a struct copy by the compiler.
This fixes warnings of type aggregate-return from gcc with W=2.
Change-Id: I896b1bf514544bf0faeb458869d79914b9f1b168 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3ed439c56e0d82fd08275fff2c21278f92ed8ec5 Author: Catherine Sullivan catherine.sullivan@intel.com Date: Wed Apr 13 03:08:27 2016 -0700
i40e: Fix uninitialized variable
We have an uninitialized variable warning for valid_len for one case in validate_vf_mesg. To fix this, just initialize it to 0 at the top of the function and remove all of the now redundant assignments to 0 in the individual cases.
Change-Id: Iacbd97f4c521ed8d662eef803a598d8707708cfd Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b29699b39924db73993734a605665cf4bebef9ea Author: Carolyn Wyborny carolyn.wyborny@intel.com Date: Wed Apr 13 03:08:26 2016 -0700
i40evf: RSS Hash Option parameters
This patch syncs the VF code for the changes made to the PF for the RSS hash tuple settings. Since the VF still cannot change the RSS hash settings, change the code to make this clear to the user. Previously, the default settings were returned in this function. However, the default can be changed by the PF so this does not make sense anymore.
Change-Id: I085eaf005fc7978b440d2a1bf2b2dd7cadaff39b Signed-off-by: Carolyn Wyborny carolyn.wyborny@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 2b79c58d80921acb7f784c340fd7532c4a8b8d95 Author: Neerav Parikh neerav.parikh@intel.com Date: Sun May 1 14:29:53 2016 -0700
i40e: Remove HMC AQ API implementation
Remove the code that implements the HMC AQ APIs and call these APIs. This is done because these are obsolete APIs and are not supported by firmware.
Change-ID: I5d771d8f37c3e16e7b0a972ff9b27e75aa2d05d4 Signed-off-by: Neerav Parikh neerav.parikh@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a856b5cb83fea40f28634a0220d7587d42e529d2 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Wed Apr 13 03:08:23 2016 -0700
i40e: Prevent falling to promiscuous if the VF is not trusted
With this change a non trusted VF can never fall to promiscuous mode when there is no room for a MAC/VLAN filter.
Change-Id: I8a155aa25c0bcdc6093414920c9ade4ee0bd20e8 Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5f527ba962e277963b08f4c7f12fbeeac3f34e3c Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Wed Apr 13 03:08:22 2016 -0700
i40e: Limit the number of MAC and VLAN addresses that can be added for VFs
If the VF is privileged/trusted it can do as it may please including but not limited to hogging resources and playing unfair. But if the VF is not privileged/trusted it still can add some number (8) of MAC and VLAN addresses. Other restrictions with respect to Port VLAN and normal VLAN still apply to not privileged/trusted VF.
Change-Id: I3a9529201b184c8873e1ad2e300aff468c9e6296 Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit def22c47d749c5ff8011831a8232b951f223963e Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Thu Apr 28 20:16:08 2016 -0400
tipc: set 'active' state correctly for first established link
When we are displaying statistics for the first link established between two peers, it will always be presented as STANDBY although it in reality is ACTIVE.
This happens because we forget to set the 'active' flag in the link instance at the moment it is established. Although this is a bug, it only has impact on the presentation view of the link, not on its actual functionality.
Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit a77f4f70fd34ac7b67581fe5b89ddc1c9ac20d39 Author: Florian Fainelli f.fainelli@gmail.com Date: Thu Apr 28 16:24:12 2016 -0700
of: of_mdio: Check if MDIO bus controller is available
Add a check whether the 'struct device_node' pointer passed to of_mdiobus_register() is an available (aka enabled) node in the Device Tree.
Rationale for doing this are cases where an Ethernet MAC provides a MDIO bus controller and node, and an additional Ethernet MAC might be connecting its PHY/switches to that first MDIO bus controller, while still embedding one internally which is therefore marked as "disabled".
Instead of sprinkling checks like these in callers of of_mdiobus_register(), do this in a central location.
Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 692fb0a75e816d2676f222c9db33e91f46ea1e03 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Wed Apr 13 03:08:21 2016 -0700
i40e: Change the default for VFs to be not privileged
Make sure a VF is not trusted/privileged until its explicitly set for trust through the new NDO op interface.
Change-Id: I476385c290d2b4901d8fceb29de43546accdc499 Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3cfef195212976032ce7bcd6b4d0b9f1e4741725 Merge: 4b2523c 45bf454 Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 16:29:12 2016 -0400
Merge branch 'mlx5-aRFS'
Saeed Mahameed says:
==================== Mellanox 100G mlx5 ethernet aRFS support
This series adds accelerated RFS support for the mlx5e driver. I have added one patch non-related to aRFS that fixes the rtnl_lock warning mlx5 driver been getting since b7aade15485a ('vxlan: break dependency with netdev drivers')
aRFS support in details:
A direct TIR per RQ is now required in order to have the essential building blocks for aRFS. Today the driver has one direct TIR that forwards traffic to RQ[0] (core 0), and one indirect TIR for RSS indirection table. For that we've added one direct TIR per RQ, e.g.: TIR[i] -> RQ[i] (core i).
Publicize Modify flow rule destination and reveal it in flow steering API, to have the ability to dynamically modify the destination TIR(core) for aRFS rules from the ethernet driver.
Initializing CPU reverse mapping to notify upper layer on internal receive queue cpu mappings.
Some design refactoring for mlx5e ethernet driver flow tables and flow steering API. Now the caller of create_flow_table can choose the level of the flow table, this way we will create the mlx5e flow tables in a reversed order and connect them as we go, we create flow table[i+1] before flow table[i] to be able to set flow table[i + 1] as a destination of flow table[i] once flow table[i] is created. also we have split the main flow table in the following manner: - From before: RX packet had to visit two flow tables until it is delivered to its receive queue: RX packet -> vlan filter flow table -> main flow table. > vlan filter will check the packet vlan field is allowed. > main flow will check if the dest mac is allowed and will check the l3/l4 headers to retrieve the RSS hash for steering the packet into its final receive queue.
- Now main flow table is split into l2 dst mac steering table and ttc (traffic type classifier) table: RX packet -> vlan filter -> l2 table -> ttc table > vlan filter - same as before > L2 filter - filter packets according their destination mac address > ttc table - classify packet headers for RSS steering - L3/L4 classification rules to steer the packet according to thier headers hash - in case of none of the rules applies the packet is steered to RQ[0]
After the above refactoring all left to-do is to create aRFS flow table which will manage aRFS steering rules to forward traffic to the desired RQ (core) and just connect the ttc table rules destinations to aRFS flow table.
aRFS flow table in case of a miss will deliver the traffic to the core where the original ttc hash would have chosen.
TTC table is not initialized and enabled until the user explicitly asks to, i.e. setting the NETIF_F_NTUPLE to ON. This way there is no need for ttc table to forward traffic to aRFS table unless required. When setting back to OFF aRFS flow table is disabled and disconnected. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 45bf454ae88414e80b80979ebb2c22bd66ea7d1b Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:42 2016 +0300
net/mlx5e: Enabling aRFS mechanism
Accelerated RFS requires that ntuple filtering is enabled via ethtool and driver supports ndo_rx_flow_steer. When the ntuple filtering is enabled, we modify the l3_l4 ttc rules to point on the aRFS flow tables and when the filtering is disabled, we modify the l3_l4 ttc rules to point on the RSS TIRs.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 18c908e477dcc94ede69323a6b876b5d8cfb40ff Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:41 2016 +0300
net/mlx5e: Add accelerated RFS support
Implement ndo_rx_flow_steer ndo. A new flow steering rule will be composed from the skb 4-tuple and added to the hardware aRFS flow table.
Each rule is stored in an internal hash table, if such skb 4-tuple rule already exists we update the corresponding hardware steering rule with the new destination.
For garbage collection rps_may_expire_flow will be invoked for a limited amount of old rules upon any ndo_rx_flow_steer invocation.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1cabe6b0965ec067ac60e8f182f16d479a3b9a5c Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:40 2016 +0300
net/mlx5e: Create aRFS flow tables
Create the following four flow tables for aRFS usage: 1. IPv4 TCP - filtering 4-tuple of IPv4 TCP packets. 2. IPv6 TCP - filtering 4-tuple of IPv6 TCP packets. 3. IPv4 UDP - filtering 4-tuple of IPv4 UDP packets. 4. IPv6 UDP - filtering 4-tuple of IPv6 UDP packets.
Each flow table has two flow groups: one for the 4-tuple filtering (full match) and the other contains * rule for miss rule.
Full match rule means a hit for aRFS and packet will be forwarded to the dedicated RQ/Core, miss rule packets will be forwarded to default RSS hashing.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5a7b27eb9cf3986f487469b57a3a41286d2e7100 Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:39 2016 +0300
net/mlx5: Initializing CPU reverse mapping
Allocating CPU rmap and add entry for each IRQ. CPU rmap is used in aRFS to get the RX queue number of the RX completion interrupts.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 33cfaaa8f36ffbee9ad259264334325b5449f5fe Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:38 2016 +0300
net/mlx5e: Split the main flow steering table
Currently, the main flow table is used for two purposes: One is to do mac filtering and the other is to classify the packet l3-l4 header in order to steer the packet to the right RSS TIR.
This design is very complex, for each configured mac address we have to add eleven rules (rule for each traffic type), the same if the device is put to promiscuous/allmulti mode. This scheme isn't scalable for future features like aRFS.
In order to simplify it, the main flow table is split to two flow tables: 1. l2 table - filter the packet dmac address, if there is a match we forward to the ttc flow table.
2. TTC (Traffic Type Classifier) table - classify the traffic type of the packet and steer the packet to the right TIR.
In this new design, when new mac address is added, the driver adds only one flow rule instead of eleven.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit acff797cd187402d73cf9f290531a41250613294 Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:37 2016 +0300
net/mlx5e: Refactor mlx5e flow steering structs
Slightly refactor and re-order the flow steering structs, tables and data-bases for better self-containment and flexibility to add more future steering phases (tables/rules/data bases) e.g: aRFS.
Changes: 1. Move the vlan DB and address DB into their table structs. 2. Rename steering table structs to unique format: mlx5e_*_table, e.g: mlx5e_vlan_table.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 13de6c106cdd68e43b6c282c17c110e8f7905872 Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:36 2016 +0300
net/mlx5: Support different attributes for priorities in namespace
Currently, namespace could be initialized only with priorities with the same attributes. Add support to initialize namespace with priorities with different attributes(e.g. different number of levels).
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d63cd28608bb563d52e62990fa01c016e8dbdb75 Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:35 2016 +0300
net/mlx5: Add user chosen levels when allocating flow tables
Currently, consumers of the flow steering infrastructure can't choose their own flow table levels and are limited to one flow table per level. This just waste levels. Instead, we introduce here the possibility to use multiple flow tables in a level. The user is free to connect these flow tables, while following the rule (FTEs in FT of level x could only point to FTs of level y where y > x).
In addition this patch switch the order of the create/destroy flow tables of the NIC(vlan and main).
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit a257b94a18f7eb60bbe9b5fd415d208ac71d49ea Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:34 2016 +0300
net/mlx5: Set number of allowed levels in priority
Refactors the flow steering namespace creation, by changing the name num_fts to num_levels. When new flow table is created, the driver assign new level to this flow table therefore the meaning is equivalent. Since downstream patches will introduce the ability to create more than one flow table per level, the name num_fts is no longer accurate.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d745098cedb3f5c6a554796d4a3a505abd4ebaa6 Author: Maor Gottlieb maorg@mellanox.com Date: Fri Apr 29 01:36:33 2016 +0300
net/mlx5: Introduce modify flow rule destination
This API is used for modifying the flow rule destination. This is needed for modifying the pointed flow table by the traffic type classifier rules to point on the aRFS tables.
Signed-off-by: Maor Gottlieb maorg@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1da366964ec907fccdea0339d81c2e9ef3d803f8 Author: Tariq Toukan tariqt@mellanox.com Date: Fri Apr 29 01:36:32 2016 +0300
net/mlx5e: Direct TIR per RQ
Introduce new TIRs for direct access per RQ. Now we have 2 available kinds of TIRs: - indirect TIR per traffic type, each points to one RQT (RSS RQT) same as before. - New direct TIR per RQ, each points to RQT with a size of one that forwards packets to that RQ only.
Driver will open max channels (num cores) direct TIRs by default, they will be filled with the actual RQs once channels are allocated.
Needed for downstream aRFS and ethtool direct steering functionalities.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 01a14098d3374e1b931d605da666300ee248d3d9 Author: Matthew Finlay matt@mellanox.com Date: Fri Apr 29 01:36:31 2016 +0300
net/mlx5e: Call vxlan_get_rx_port() with rtnl lock
Hold the rtnl lock when calling vxlan_get_rx_port().
Fixes: b7aade15485a ("vxlan: break dependency with netdev drivers") Signed-off-by: Matthew Finlay matt@mellanox.com Reported-by: Alexander Duyck alexander.duyck@gmail.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4b2523c180c8e5e8e02b2d518d7b1dcb4c9d98de Merge: f4b05d2 2dd355a Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 16:23:03 2016 -0400
Merge branch 'enc28j60-small-improvements'
Michael Heimpold says:
==================== net: ethernet: enc28j60: small improvements
This series of two patches adds the following improvements to the driver:
1) Rework the central SPI read function so that it is compatible with SPI masters which only support half duplex transfers.
2) Add a device tree binding for the driver.
Changelog:
v3: * renamed and improved binding documentation as suggested by Rob Herring
v2: * took care of Arnd Bergmann's review comments - allow to specify MAC address via DT - unconditionally define DT id table * increased the driver version minor number * driver author's email address bounces, removed from address list
v1: * Initial submission ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 2dd355a007e44960ec049c75920ddb6778fec9ee Author: Michael Heimpold mhei@heimpold.de Date: Thu Apr 28 22:06:15 2016 +0200
net: ethernet: enc28j60: add device tree support
The following patch adds the required match table for device tree support (and while at, fix the indent). It's also possible to specify the MAC address in the DT blob.
Also add the corresponding binding documentation file.
Signed-off-by: Michael Heimpold mhei@heimpold.de Signed-off-by: David S. Miller davem@davemloft.net
commit 2957a28a0e874aea0f734e2897b27f669502a970 Author: Michael Heimpold mhei@heimpold.de Date: Thu Apr 28 22:06:14 2016 +0200
net: ethernet: enc28j60: support half-duplex SPI controllers
The current spi_read_buf function fails on SPI host masters which are only half-duplex capable. Splitting the Tx and Rx part solves this issue.
Tested on Raspberry Pi (full duplex) and I2SE Duckbill (half duplex).
Signed-off-by: Michael Heimpold mhei@heimpold.de Signed-off-by: David S. Miller davem@davemloft.net
commit f4b05d27ec6b032ca504591e2a157b058b6f172f Author: Nikolay Aleksandrov nikolay@cumulusnetworks.com Date: Thu Apr 28 17:59:28 2016 +0200
net: constify is_skb_forwardable's arguments
is_skb_forwardable is not supposed to change anything so constify its arguments
Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 92aff96ac315a713b14c7e4f7b2e84fb3dc9ce16 Merge: ac1f74a 96d934c Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 16:09:45 2016 -0400
Merge branch 'ppp-rtnetlink'
Guillaume Nault says:
==================== ppp: add rtnetlink support
PPP devices lack the ability to be customised at creation time. In particular they can't be created in a given netns or with a particular name. Moving or renaming the device after creation is possible, but creates undesirable transient effects on servers where PPP devices are constantly created and removed, as users connect and disconnect. Implementing rtnetlink support solves this problem.
The rtnetlink handlers implemented in this series are minimal, and can only replace the PPPIOCNEWUNIT ioctl. The rest of PPP ioctls remains necessary for any other operation on channels and units. It is perfectly possible to mix PPP devices created by rtnl and by ioctl(PPPIOCNEWUNIT). Devices will behave in the same way.
mutex_trylock() is used to resolve the locking issue wrt. locking dependency between rtnl_lock() and ppp_mutex (see ppp_nl_newlink() in patch #2).
A user visible difference brought by this series is that old PPP interfaces (those created with ioctl(PPPIOCNEWUNIT)), can now be removed by "ip link del", just like new rtnl based PPP devices.
Changes since v3: - Rebase on net-next. - Not an RFC anymore.
Changes since v2: - Define ->rtnl_link_ops for ioctl based PPP devices, so they can handle rtnl messages just like rtnl based ones (suggested by Stephen Hemminger). - Move back to original lock ordering between ppp_mutex and rtnl_lock to simplify patch series. Handle lock inversion issue using mutex_trylock() (suggested by Stephen Hemminger). - Do file descriptor lookup directly in ppp_nl_newlink(), to simplify ppp_dev_configure().
Changes since v1: - Rebase on net-next. - Invert locking order wrt. ppp_mutex and rtnl_lock and protect file->private_data with ppp_mutex. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 96d934c70db6e1bc135600c57da1285eaf7efb26 Author: Guillaume Nault g.nault@alphalink.fr Date: Thu Apr 28 17:55:30 2016 +0200
ppp: add rtnetlink device creation support
Define PPP device handler for use with rtnetlink. The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and contains the file descriptor of the associated /dev/ppp instance (the file descriptor which would have been used for ioctl(PPPIOCNEWUNIT) in the ioctl-based API). The PPP device is removed when this file descriptor is released (same behaviour as with ioctl based PPP devices).
PPP devices created with the rtnetlink API behave like the ones created with ioctl(PPPIOCNEWUNIT). In particular existing ioctls work the same way, no matter how the PPP device was created. The rtnl callbacks are also assigned to ioctl based PPP devices. This way, rtnl messages have the same effect on any PPP devices. The immediate effect is that all PPP devices, even ioctl-based ones, can now be removed with "ip link del".
A minor difference still exists between ioctl and rtnl based PPP interfaces: in the device name, the number following the "ppp" prefix corresponds to the PPP unit number for ioctl based devices, while it is just an unrelated incrementing index for rtnl ones.
Signed-off-by: Guillaume Nault g.nault@alphalink.fr Signed-off-by: David S. Miller davem@davemloft.net
commit 7d9f0b48746d37e4381efc02da27535a0a1bac43 Author: Guillaume Nault g.nault@alphalink.fr Date: Thu Apr 28 17:55:28 2016 +0200
ppp: define reusable device creation functions
Move PPP device initialisation and registration out of ppp_create_interface(). This prepares code for device registration with rtnetlink.
While there, simplify the prototype of ppp_create_interface():
* Since ppp_dev_configure() takes care of setting file->private_data, there's no need to return a ppp structure to ppp_unattached_ioctl() anymore.
* The unit parameter is made read/write so that ppp_create_interface() can tell which unit number has been assigned.
Signed-off-by: Guillaume Nault g.nault@alphalink.fr Signed-off-by: David S. Miller davem@davemloft.net
commit ac1f74a7fc197660f26b59395b3fd2468f59f5dc Author: Alexandre TORGUE alexandre.torgue@st.com Date: Thu Apr 28 15:56:45 2016 +0200
net: ethernet: stmmac: update MDIO support for GMAC4
On new GMAC4 IP, MAC_MDIO_address register has been updated, and bitmaps changed. This patch takes into account those changes.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 65226ef8ea167c773de4c5b31a0fd3cb3a08f5b4 Author: Jiri Benc jbenc@redhat.com Date: Thu Apr 28 16:36:30 2016 +0200
vxlan: fix initialization with custom link parameters
Commit 0c867c9bf84c ("vxlan: move Ethernet initialization to a separate function") changed initialization order and as an unintended result, when the user specifies additional link parameters (such as IFLA_ADDRESS) while creating vxlan interface, those are overwritten by vxlan_ether_setup later.
It's necessary to call ether_setup from withing the ->setup callback. That way, the correct parameters are set by rtnl_create_link later. This is done also for VXLAN-GPE, as we don't know the interface type yet at that point, and changed to the correct interface type later.
Fixes: 0c867c9bf84c ("vxlan: move Ethernet initialization to a separate function") Reported-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: Jiri Benc jbenc@redhat.com Tested-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 638af1787357f2f8bbb5006d4df0693afd3b805b Merge: c23846c bdefbbf Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 14:26:32 2016 -0400
Merge branch 'samples-bpf-user-experience'
Jesper Dangaard Brouer says:
==================== samples/bpf: Improve user experience
It is a steep learning curve getting started with using the eBPF examples in samples/bpf/. There are several dependencies, and specific versions of these dependencies. Invoking make in the correct manor is also slightly obscure.
This patchset cleanup, document and hopefully improves the first time user experience with the eBPF samples directory by auto-detecting certain scenarios.
V4: - Address Naveen's nitpicks - Handle/fail if extra args are passed in LLC or CLANG (David Laight)
V3: - Add Alexei's ACKs - Remove README paragraph about LLVM experimental BPF target as it only existed between LLVM version 3.6 to 3.7.
V2: - Adjusted recommend minimum versions to 3.7.1 - Included clang build instructions - New patch adding CLANG variable and validation of command ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit bdefbbf2ecff6efcd253767179a60961aebed9dc Author: Jesper Dangaard Brouer brouer@redhat.com Date: Thu Apr 28 14:21:14 2016 +0200
samples/bpf: like LLC also verify and allow redefining CLANG command
Users are likely to manually compile both LLVM 'llc' and 'clang' tools. Thus, also allow redefining CLANG and verify command exist.
Makefile implementation wise, the target that verify the command have been generalized.
Signed-off-by: Jesper Dangaard Brouer brouer@redhat.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit b62a796c109ca0be3e49de620a8ea8248412446d Author: Jesper Dangaard Brouer brouer@redhat.com Date: Thu Apr 28 14:21:09 2016 +0200
samples/bpf: allow make to be run from samples/bpf/ directory
It is not intuitive that 'make' must be run from the top level directory with argument "samples/bpf/" to compile these eBPF samples.
Introduce a kbuild make file trick that allow make to be run from the "samples/bpf/" directory itself. It basically change to the top level directory and call "make samples/bpf/" with the "/" slash after the directory name.
Also add a clean target that only cleans this directory, by taking advantage of the kbuild external module setting M=$PWD.
Signed-off-by: Jesper Dangaard Brouer brouer@redhat.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 1c97566d515de2ef66873e30288b150f0154f3b3 Author: Jesper Dangaard Brouer brouer@redhat.com Date: Thu Apr 28 14:21:04 2016 +0200
samples/bpf: add a README file to get users started
Getting started with using examples in samples/bpf/ is not straightforward. There are several dependencies, and specific versions of these dependencies.
Just compiling the example tool is also slightly obscure, e.g. one need to call make like:
make samples/bpf/
Do notice the "/" slash after the directory name.
Signed-off-by: Jesper Dangaard Brouer brouer@redhat.com Acked-by: Naveen N. Rao naveen.n.rao@linux.vnet.ibm.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 7b01dd5793394ee2ef47c328b28c30f5c01107c9 Author: Jesper Dangaard Brouer brouer@redhat.com Date: Thu Apr 28 14:20:58 2016 +0200
samples/bpf: Makefile verify LLVM compiler avail and bpf target is supported
Make compiling samples/bpf more user friendly, by detecting if LLVM compiler tool 'llc' is available, and also detect if the 'bpf' target is available in this version of LLVM.
Signed-off-by: Jesper Dangaard Brouer brouer@redhat.com Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 6ccfba75d3137efc3b665a337b946fd6df1162b9 Author: Jesper Dangaard Brouer brouer@redhat.com Date: Thu Apr 28 14:20:53 2016 +0200
samples/bpf: add back functionality to redefine LLC command
It is practical to be-able-to redefine the location of the LLVM command 'llc', because not all distros have a LLVM version with bpf target support. Thus, it is sometimes required to compile LLVM from source, and sometimes it is not desired to overwrite the distros default LLVM version.
This feature was removed with 128d1514be35 ("samples/bpf: Use llc in PATH, rather than a hardcoded value").
Add this features back. Note that it is possible to redefine the LLC on the make command like:
make samples/bpf/ LLC=~/git/llvm/build/bin/llc
Fixes: 128d1514be35 ("samples/bpf: Use llc in PATH, rather than a hardcoded value") Signed-off-by: Jesper Dangaard Brouer brouer@redhat.com Acked-by: Alexei Starovoitov ast@kernel.org Acked-by: Naveen N. Rao naveen.n.rao@linux.vnet.ibm.com Signed-off-by: David S. Miller davem@davemloft.net
commit c23846c143e81963096e922d91b7b00284c22bed Merge: 482f13a ae7b757 Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 13:41:47 2016 -0400
Merge branch 'cxgb4-mbox-cmd-logging'
Hariprasad Shenai says:
==================== cxgb4/cxgb4vf: add support for mbox cmd logging
This patch series adds support for logging mailbox commands and replies for debugging purpose for both PF and VF driver.
This patch series has been created against net-next tree and includes patches on cxgb4 and cxgb4vf driver.
We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit ae7b7576220560617e903910c6307e13ec93b279 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Thu Apr 28 13:23:19 2016 +0530
cxgb4vf: Add support to enable logging of firmware mailbox commands for VF
Add new /sys/kernel/debug/ support to dump firmware mailbox commands and replies for debugging purpose.
Based on original work by Casey Leedom leedom@chelsio.com
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7f080c3f2ff091c095248f670bb34308f141ff7a Author: Hariprasad Shenai hariprasad@chelsio.com Date: Thu Apr 28 13:23:18 2016 +0530
cxgb4: Add support to enable logging of firmware mailbox commands
Add new /sys/kernel/debug/ support to dump a firmware mailbox command issued and replies for debugging purpose.
Based on original work by Casey Leedom leedom@chelsio.com
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 482f13aa5e13819acad0ff4fb94f6fb0364522f0 Merge: 494e848 ea99102 Author: David S. Miller davem@davemloft.net Date: Fri Apr 29 13:39:04 2016 -0400
Merge branch 'hns-props'
Yisen Zhuang says:
==================== net: hns: update DT properties according to Rob's comments
There are some inappropriate properties definition in hns DT. We update the definition according to Rob's review comments and fix some typos in binding.
For more details, please see individual patches. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit ea991027efcb2acf801633190bc2f35ad1eb78c2 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Thu Apr 28 15:09:04 2016 +0800
dts: hisi: update hns dst for changing property port-id to reg
Indexes should generally be avoided. This patch changes property port-id to reg in dsaf port node.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit a1ecde2c6f00825e3a6d90dc774cddc18cb0e247 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Thu Apr 28 15:09:03 2016 +0800
Documentation: Bindings: Update DT binding for hns dsaf node
This patch changes property port-id to reg in dsaf port node, removes property cpld-ctrl-reg, and fixes some typos.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0211b8fb5dd750357b3113a7c40b879c4a055a98 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Thu Apr 28 15:09:02 2016 +0800
net: hns: change port-id property to reg property in dsaf port node
Indexes should generally be avoided. So we use reg rather than port-id to index ports.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1ffdfac99f36555b66c5b9d979c855a9c1a4503b Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Thu Apr 28 15:09:01 2016 +0800
net: hns: remove cpld-ctrl-reg and add cell in the cpld-syscon property
Because cpld-ctrl-reg property is offset base on cpld-syscon property, we make it as a cell in the cpld-syscon property.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 494e8489db50157637d146ee377991ed6f0018f1 Author: Mahesh Bandewar maheshb@google.com Date: Wed Apr 27 14:59:27 2016 -0700
ipvlan: Fix failure path in dev registration during link creation
When newlink creation fails at device-registration, the port->count is decremented twice. Francesco Ruggeri (fruggeri@arista.com) found this issue in Macvlan and the same exists in IPvlan driver too.
While fixing this issue I noticed another issue of missing unregister in case of failure, so adding it to the fix which is similar to the macvlan fix by Francesco in commit 308379607548 ("macvlan: fix failure during registration v3")
Reported-by: Francesco Ruggeri fruggeri@arista.com Signed-off-by: Mahesh Bandewar maheshb@google.com CC: Eric Dumazet edumazet@google.com CC: Eric W. Biederman ebiederm@xmission.com Signed-off-by: David S. Miller davem@davemloft.net
commit 222e4d0b13c674b28a562d67c270367d45d0a53d Author: françois romieu romieu@fr.zoreil.com Date: Wed Apr 27 23:29:44 2016 +0200
pch_gbe: replace private tx ring lock with common netif_tx_lock
pch_gbe_tx_ring.tx_lock is only used in the hard_xmit handler and in the transmit completion reaper called from NAPI context.
Compile-tested only. Potential victims Cced.
Someone more knowledgeable may check if pch_gbe_tx_queue could have some use for a mmiowb.
Signed-off-by: Francois Romieu romieu@fr.zoreil.com Cc: Darren Hart dvhart@infradead.org Cc: Andy Cress andy.cress@us.kontron.com Cc: bryan@fossetcon.org Signed-off-by: David S. Miller davem@davemloft.net
commit badf3ada60ab8f76f9488dc8f5c0c57f70682f5a Author: Florian Fainelli f.fainelli@gmail.com Date: Wed Apr 27 11:45:14 2016 -0700
net: dsa: Provide CPU port statistics to master netdev
This patch overloads the DSA master netdev, aka CPU Ethernet MAC to also include switch-side statistics, which is useful for debugging purposes, when the switch is not properly connected to the Ethernet MAC (duplex mismatch, (RG)MII electrical issues etc.).
We accomplish this by retaining the original copy of the master netdev's ethtool_ops, and just overload the 3 operations we care about: get_sset_count, get_strings and get_ethtool_stats so as to intercept these calls and call into the original master_netdev ethtool_ops, plus our own.
We take this approach as opposed to providing a set of DSA helper functions that would retrive the CPU port's statistics, because the entire purpose of DSA is to allow unmodified Ethernet MAC drivers to be used as CPU conduit interfaces, therefore, statistics overlay in such drivers would simply not scale.
The new ethtool -S <iface> output would therefore look like this now: <iface> statistics p<2 digits cpu port number>_<switch MIB counter names>
Signed-off-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0cef6a4c34b56a9a6894f2dad2fad4be789990e1 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 10:12:25 2016 -0700
tcp: give prequeue mode some care
TCP prequeue goal is to defer processing of incoming packets to user space thread currently blocked in a recvmsg() system call.
Intent is to spend less time processing these packets on behalf of softirq handler, as softirq handler is unfair to normal process scheduler decisions, as it might interrupt threads that do not even use networking.
Current prequeue implementation has following issues :
1) It only checks size of the prequeue against sk_rcvbuf
It was fine 15 years ago when sk_rcvbuf was in the 64KB vicinity. But we now have ~8MB values to cope with modern networking needs. We have to add sk_rmem_alloc in the equation, since out of order packets can definitely use up to sk_rcvbuf memory themselves.
2) Even with a fixed memory truesize check, prequeue can be filled by thousands of packets. When prequeue needs to be flushed, either from sofirq context (in tcp_prequeue() or timer code), or process context (in tcp_prequeue_process()), this adds a latency spike which is often not desirable. I added a fixed limit of 32 packets, as this translated to a max flush time of 60 us on my test hosts.
Also note that all packets in prequeue are not accounted for tcp_mem, since they are not charged against sk_forward_alloc at this point. This is probably not a big deal.
Note that this might increase LINUX_MIB_TCPPREQUEUEDROPPED counts, which is misnamed, as packets are not dropped at all, but rather pushed to the stack (where they can be either consumed or dropped)
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b43e7199a9061562e28c72192a1d07e00ec4e97f Author: Michal Kazior michal.kazior@tieto.com Date: Wed Apr 27 12:59:13 2016 +0200
fq: split out backlog update logic
mac80211 (which will be the first user of the fq.h) recently started to support software A-MSDU aggregation. It glues skbuffs together into a single one so the backlog accounting needs to be more fine-grained.
To avoid backlog sorting logic duplication split it up for re-use.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: David S. Miller davem@davemloft.net
commit b43586576e54609f7970096478cf4113de18a4db Author: Dan Carpenter dan.carpenter@oracle.com Date: Wed Apr 27 11:05:28 2016 +0300
tipc: remove an unnecessary NULL check
This is never called with a NULL "buf" and anyway, we dereference 's' on the lines before so it would Oops before we reach the check.
Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6b87663fbe4a366e558d6566b3e6b6bc227da5a1 Author: Arnd Bergmann arnd@arndb.de Date: Tue Apr 26 17:52:33 2016 +0200
net/mlx5e: avoid stack overflow in mlx5e_open_channels
struct mlx5e_channel_param is a large structure that is allocated on the stack of mlx5e_open_channels, and with a recent change it has grown beyond the warning size for the maximum stack that a single function should use:
mellanox/mlx5/core/en_main.c: In function 'mlx5e_open_channels': mellanox/mlx5/core/en_main.c:1325:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
The function is already using dynamic allocation and is not in a fast path, so the easiest workaround is to use another kzalloc for allocating the channel parameters.
Signed-off-by: Arnd Bergmann arnd@arndb.de Fixes: d3c9bc2743dc ("net/mlx5e: Added ICO SQs") Acked-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3df97ba83019d524c012fd43d3216d4cc3005955 Author: Jason Wang jasowang@redhat.com Date: Mon Apr 25 23:13:42 2016 -0400
tuntap: calculate rps hash only when needed
There's no need to calculate rps hash if it was not enabled. So this patch export rps_needed and check it before trying to get rps hash. Tests (using pktgen to inject packets to guest) shows this can improve pps about 13% (when rps is disabled).
Before: ~1150000 pps After: ~1300000 pps
Cc: Michael S. Tsirkin mst@redhat.com Signed-off-by: Jason Wang jasowang@redhat.com ---- Changes from V1: - Fix build when CONFIG_RPS is not set Signed-off-by: David S. Miller davem@davemloft.net
commit f345c9a5726d10cc3613d17ae75dcb1ab0986ba1 Merge: 2a9e843 a166140 Author: David S. Miller davem@davemloft.net Date: Thu Apr 28 16:14:20 2016 -0400
Merge branch 'tcp-eor'
Martin KaFai Lau says:
==================== tcp: Make use of MSG_EOR in tcp_sendmsg
v4: ~ Do not set eor bit in do_tcp_sendpages() since there is no way to pass MSG_EOR from the userland now. ~ Avoid rmw by testing MSG_EOR first in tcp_sendmsg(). ~ Move TCP_SKB_CB(skb)->eor test to a new helper tcp_skb_can_collapse_to() (suggested by Soheil). ~ Add some packetdrill tests.
v3: ~ Separate EOR marking from the SKBTX_ANY_TSTAMP logic. ~ Move the eor bit test back to the loop in tcp_sendmsg and tcp_sendpage because there could be >1 threads doing sendmsg. ~ Thanks to Eric Dumazet's suggestions on v2. ~ The TCP timestamp bug fixes are separated into other threads.
v2: ~ Rework based on the recent work "add TX timestamping via cmsg" by Soheil Hassas Yeganeh soheil.kdev@gmail.com ~ This version takes the MSG_EOR bit as a signal of end-of-response-message and leave the selective timestamping job to the cmsg ~ Changes based on the v1 feedback (like avoid unlikely check in a loop and adding tcp_sendpage support) ~ The first 3 patches are bug fixes. The fixes in this series depend on the newly introduced txstamp_ack in net-next. I will make relevant patches against net after getting some feedback. ~ The test results are based on the recently posted net fix: "tcp: Fix SOF_TIMESTAMPING_TX_ACK when handling dup acks"
One potential use case is to use MSG_EOR with SOF_TIMESTAMPING_TX_ACK to get a more accurate TCP ack timestamping on application protocol with multiple outgoing response messages (e.g. HTTP2).
One of our use case is at the webserver. The webserver tracks the HTTP2 response latency by measuring when the webserver sends the first byte to the socket till the TCP ACK of the last byte is received. In the cases where we don't have client side measurement, measuring from the server side is the only option. In the cases we have the client side measurement, the server side data can also be used to justify/cross-check-with the client side data. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit a166140e810e74682f3ca248ef3879177b5c1315 Author: Martin KaFai Lau kafai@fb.com Date: Mon Apr 25 14:44:50 2016 -0700
tcp: Handle eor bit when fragmenting a skb
When fragmenting a skb, the next_skb should carry the eor from prev_skb. The eor of prev_skb should also be reset.
Packetdrill script for testing: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0
0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7> 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
0.200 sendto(4, ..., 15330, MSG_EOR, ..., ...) = 15330 0.200 sendto(4, ..., 730, 0, ..., ...) = 730
0.200 > . 1:7301(7300) ack 1 0.200 > . 7301:14601(7300) ack 1
0.300 < . 1:1(0) ack 14601 win 257 0.300 > P. 14601:15331(730) ack 1 0.300 > P. 15331:16061(730) ack 1
0.400 < . 1:1(0) ack 16061 win 257 0.400 close(4) = 0 0.400 > F. 16061:16061(0) ack 1 0.400 < F. 1:1(0) ack 16062 win 257 0.400 > . 16062:16062(0) ack 2
Signed-off-by: Martin KaFai Lau kafai@fb.com Cc: Eric Dumazet edumazet@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Soheil Hassas Yeganeh soheil@google.com Cc: Willem de Bruijn willemb@google.com Cc: Yuchung Cheng ycheng@google.com Acked-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit a643b5d41c95164c14b111d19c05d6913bedb80b Author: Martin KaFai Lau kafai@fb.com Date: Mon Apr 25 14:44:49 2016 -0700
tcp: Handle eor bit when coalescing skb
This patch: 1. Prevent next_skb from coalescing to the prev_skb if TCP_SKB_CB(prev_skb)->eor is set 2. Update the TCP_SKB_CB(prev_skb)->eor if coalescing is allowed
Packetdrill script for testing: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0
0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7> 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
0.200 sendto(4, ..., 730, MSG_EOR, ..., ...) = 730 0.200 sendto(4, ..., 730, MSG_EOR, ..., ...) = 730 0.200 write(4, ..., 11680) = 11680
0.200 > P. 1:731(730) ack 1 0.200 > P. 731:1461(730) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:13141(4380) ack 1
0.300 < . 1:1(0) ack 1 win 257 <sack 1461:13141,nop,nop> 0.300 > P. 1:731(730) ack 1 0.300 > P. 731:1461(730) ack 1 0.400 < . 1:1(0) ack 13141 win 257
0.400 close(4) = 0 0.400 > F. 13141:13141(0) ack 1 0.500 < F. 1:1(0) ack 13142 win 257 0.500 > . 13142:13142(0) ack 2
Signed-off-by: Martin KaFai Lau kafai@fb.com Cc: Eric Dumazet edumazet@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Soheil Hassas Yeganeh soheil@google.com Cc: Willem de Bruijn willemb@google.com Cc: Yuchung Cheng ycheng@google.com Acked-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit c134ecb87817ce70fd62b2dc48bb079c44fc08df Author: Martin KaFai Lau kafai@fb.com Date: Mon Apr 25 14:44:48 2016 -0700
tcp: Make use of MSG_EOR in tcp_sendmsg
This patch adds an eor bit to the TCP_SKB_CB. When MSG_EOR is passed to tcp_sendmsg, the eor bit will be set at the skb containing the last byte of the userland's msg. The eor bit will prevent data from appending to that skb in the future.
The change in do_tcp_sendpages is to honor the eor set during the previous tcp_sendmsg(MSG_EOR) call.
This patch handles the tcp_sendmsg case. The followup patches will handle other skb coalescing and fragment cases.
One potential use case is to use MSG_EOR with SOF_TIMESTAMPING_TX_ACK to get a more accurate TCP ack timestamping on application protocol with multiple outgoing response messages (e.g. HTTP2).
Packetdrill script for testing: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0
0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7> 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
0.200 write(4, ..., 14600) = 14600 0.200 sendto(4, ..., 730, MSG_EOR, ..., ...) = 730 0.200 sendto(4, ..., 730, MSG_EOR, ..., ...) = 730
0.200 > . 1:7301(7300) ack 1 0.200 > P. 7301:14601(7300) ack 1
0.300 < . 1:1(0) ack 14601 win 257 0.300 > P. 14601:15331(730) ack 1 0.300 > P. 15331:16061(730) ack 1
0.400 < . 1:1(0) ack 16061 win 257 0.400 close(4) = 0 0.400 > F. 16061:16061(0) ack 1 0.400 < F. 1:1(0) ack 16062 win 257 0.400 > . 16062:16062(0) ack 2
Signed-off-by: Martin KaFai Lau kafai@fb.com Cc: Eric Dumazet edumazet@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Soheil Hassas Yeganeh soheil@google.com Cc: Willem de Bruijn willemb@google.com Cc: Yuchung Cheng ycheng@google.com Suggested-by: Eric Dumazet edumazet@google.com Acked-by: Eric Dumazet edumazet@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2a9e8438a29c00432ae14eaceb088b965f8ac290 Merge: ba7863f 0a2cf20 Author: David S. Miller davem@davemloft.net Date: Thu Apr 28 16:06:11 2016 -0400
Merge branch 'tcp-redundant-checks'
Soheil Hassas Yeganeh says:
==================== tcp: simplify ack tx timestamps
v2: - Fully remove SKBTX_ACK_TSTAMP, as suggested by Willem de Bruijn.
This patch series aims at removing redundant checks and fields for ack timestamps for TCP. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 0a2cf20c3fb62ad4717276b5303bf831f7b29d54 Author: Soheil Hassas Yeganeh soheil@google.com Date: Wed Apr 27 23:39:01 2016 -0400
tcp: remove SKBTX_ACK_TSTAMP since it is redundant
The SKBTX_ACK_TSTAMP flag is set in skb_shinfo->tx_flags when the timestamp of the TCP acknowledgement should be reported on error queue. Since accessing skb_shinfo is likely to incur a cache-line miss at the time of receiving the ack, the txstamp_ack bit was added in tcp_skb_cb, which is set iff the SKBTX_ACK_TSTAMP flag is set for an skb. This makes SKBTX_ACK_TSTAMP flag redundant.
Remove the SKBTX_ACK_TSTAMP and instead use the txstamp_ack bit everywhere.
Note that this frees one bit in shinfo->tx_flags.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Martin KaFai Lau kafai@fb.com Suggested-by: Willem de Bruijn willemb@google.com Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 863c1fd9814618eefba02218f8fadf8a430c2a17 Author: Soheil Hassas Yeganeh soheil@google.com Date: Wed Apr 27 23:39:00 2016 -0400
tcp: remove an unnecessary check in tcp_tx_timestamp
Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp.
tcp_tx_timestamp() receives the tsflags as a parameter. As a result the "sk->sk_tsflags || tsflags" is redundant, since tsflags already includes sk->sk_tsflags plus overrides from control messages.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit ba7863f4d3bfe1698e0a92934cbc9c3021f4448d Author: Eric Dumazet edumazet@google.com Date: Thu Apr 28 06:33:24 2016 -0700
net: snmp: fix 64bit stats on 32bit arches
I accidentally replaced BH disabling by preemption disabling in SNMP_ADD_STATS64() and SNMP_UPD_PO_STATS64() on 32bit builds.
For 64bit stats on 32bit arch, we really need to disable BH, since the "struct u64_stats_sync syncp" might be manipulated both from process and BH contexts.
Fixes: 6aef70a851ac ("net: snmp: kill various STATS_USER() helpers") Reported-by: Nicolas Dichtel nicolas.dichtel@6wind.com Tested-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8be2748a40cb84c2ac5085e7e6bccb5a5fcc6235 Merge: 210732d 4be7352 Author: David S. Miller davem@davemloft.net Date: Wed Apr 27 23:08:41 2016 -0400
Merge branch 'socket-space-optimizations'
Eric Dumazet says:
==================== net: avoid some atomic ops when FASYNC is not used
We can avoid some atomic operations on sockets not using FASYNC ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 4be735225f7cd040ca81c18740e7b672021bafeb Author: Eric Dumazet edumazet@google.com Date: Mon Apr 25 10:39:34 2016 -0700
net: SOCKWQ_ASYNC_WAITDATA optimizations
SOCKWQ_ASYNC_WAITDATA is set/cleared in sk_wait_data() and equivalent functions, so that sock_wake_async() can send a SIGIO only when necessary.
Since these atomic operations are really not needed unless socket expressed interest in FASYNC, we can omit them in most cases.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9317bb69824ec8d078b0b786b6971aedb0af3d4f Author: Eric Dumazet edumazet@google.com Date: Mon Apr 25 10:39:32 2016 -0700
net: SOCKWQ_ASYNC_NOSPACE optimizations
SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async() so that a SIGIO signal is sent when needed.
tcp_sendmsg() clears the bit. tcp_poll() sets the bit when stream is not writeable.
We can avoid two atomic operations by first checking if socket is actually interested in the FASYNC business (most sockets in real applications do not use AIO, but select()/poll()/epoll())
This also removes one cache line miss to access sk->sk_wq->flags in tcp_sendmsg()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 210732d16d20f0c18fc5e5dcdf726c8b02b81957 Merge: 2995aea 13415e4 Author: David S. Miller davem@davemloft.net Date: Wed Apr 27 22:48:25 2016 -0400
Merge branch 'snmp-stats-update'
Eric Dumazet says:
==================== net: snmp: update SNMP methods
In the old days (before linux-3.0), SNMP counters were duplicated, one set for user context, and anther one for BH context.
After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%") we have a single copy, and what really matters is preemption being enabled or disabled, since we use this_cpu_inc() or __this_cpu_inc() respectively.
This patch series kills the obsolete STATS_USER() helpers, and rename all XXX_BH() helpers to __XXX() ones, to more closely match conventions used to update per cpu variables.
This is probably going to hurt maintainers job for a while, since cherry-picks will not be clean, but this had to be cleaned at one point. I am so sorry guys. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 13415e46c5915e2dac089de516369005fbc045f9 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:43 2016 -0700
net: snmp: kill STATS_BH macros
There is nothing related to BH in SNMP counters anymore, since linux-3.0.
Rename helpers to use __ prefix instead of _BH prefix, for contexts where preemption is disabled.
This more closely matches convention used to update percpu variables.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit f3832ed2c27e7ad13300791db4089a7d4304f500 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:42 2016 -0700
ipv6: kill ICMP6MSGIN_INC_STATS_BH()
IPv6 ICMP stats are atomics anyway.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit c2005eb01044e82498209ee4ee43be604da3ef2a Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:41 2016 -0700
ipv6: rename IP6_UPD_PO_STATS_BH()
Rename IP6_UPD_PO_STATS_BH() to __IP6_UPD_PO_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1d0155035918aa44e634941ac05721536b461d7c Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:40 2016 -0700
ipv6: rename IP6_INC_STATS_BH()
Rename IP6_INC_STATS_BH() to __IP6_INC_STATS() and IP6_ADD_STATS_BH() to __IP6_ADD_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 02a1d6e7a6bb025a77da77012190e1efc1970f1c Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:39 2016 -0700
net: rename NET_{ADD|INC}_STATS_BH()
Rename NET_INC_STATS_BH() to __NET_INC_STATS() and NET_ADD_STATS_BH() to __NET_ADD_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b15084ec7d4c89000242d69b5f57b4d138bad1b9 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:38 2016 -0700
net: rename IP_UPD_PO_STATS_BH()
Rename IP_UPD_PO_STATS_BH() to __IP_UPD_PO_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 98f619957ec2717fea09b398957e130e4bf4b30c Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:37 2016 -0700
net: rename IP_ADD_STATS_BH()
Rename IP_ADD_STATS_BH() to __IP_ADD_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit a16292a0f0e0cef40ed51685dfde12b3002959b5 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:36 2016 -0700
net: rename ICMP6_INC_STATS_BH()
Rename ICMP6_INC_STATS_BH() to __ICMP6_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b45386efa2ec4533196a24d397ec5f9f0a42abc4 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:35 2016 -0700
net: rename IP_INC_STATS_BH()
Rename IP_INC_STATS_BH() to __IP_INC_STATS(), to better express this is used in non preemptible context.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 08e3baef65e2e9481637a1e8fb06089ca70be707 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:34 2016 -0700
net: sctp: rename SCTP_INC_STATS_BH()
Rename SCTP_INC_STATS_BH() to __SCTP_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 214d3f1f87e17357c422dad844f03be7b9d65ce7 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:33 2016 -0700
net: icmp: rename ICMPMSGIN_INC_STATS_BH()
Remove misleading _BH suffix.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 90bbcc608369a1b46089b0f5aa22b8ea31ffa12e Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:32 2016 -0700
net: tcp: rename TCP_INC_STATS_BH
Rename TCP_INC_STATS_BH() to __TCP_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b540f9d702f0eedf4f2dc49472f4cf40d053d5b1 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:31 2016 -0700
net: xfrm: kill XFRM_INC_STATS_BH()
Not used anymore.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 02c223470c3cc30e5ff90217abea761679553ac3 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:30 2016 -0700
net: udp: rename UDP_INC_STATS_BH()
Rename UDP_INC_STATS_BH() to __UDP_INC_STATS(), and UDP6_INC_STATS_BH() to __UDP6_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5d3848bc33b7d13fc97b5b6e0dccde2d0755bfd5 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:29 2016 -0700
net: rename ICMP_INC_STATS_BH()
Rename ICMP_INC_STATS_BH() to __ICMP_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit aa62d76b6e1a7c927a9e0ca39de8a93b751f3b8c Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:28 2016 -0700
dccp: rename DCCP_INC_STATS_BH()
Rename DCCP_INC_STATS_BH() to __DCCP_INC_STATS()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6aef70a851ac77967992340faaff33f44598f60a Author: Eric Dumazet edumazet@google.com Date: Wed Apr 27 16:44:27 2016 -0700
net: snmp: kill various STATS_USER() helpers
In the old days (before linux-3.0), SNMP counters were duplicated, one for user context, and one for BH context.
After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%") we have a single copy, and what really matters is preemption being enabled or disabled, since we use this_cpu_inc() or __this_cpu_inc() respectively.
We therefore kill SNMP_INC_STATS_USER(), SNMP_ADD_STATS_USER(), NET_INC_STATS_USER(), NET_ADD_STATS_USER(), SCTP_INC_STATS_USER(), SNMP_INC_STATS64_USER(), SNMP_ADD_STATS64_USER(), TCP_ADD_STATS_USER(), UDP_INC_STATS_USER(), UDP6_INC_STATS_USER(), and XFRM_INC_STATS_USER()
Following patches will rename __BH helpers to make clear their usage is not tied to BH being disabled.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2995aea5b68b6850e76aadd95be777cb36949e62 Merge: 501e7ef 47d3483 Author: David S. Miller davem@davemloft.net Date: Wed Apr 27 21:59:08 2016 -0400
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 40GbE Intel Wired LAN Driver Updates 2016-04-27
This series contains updates to i40e and i40evf.
Alex Duyck cleans up the feature flags since they are becoming pretty "massive", the primary change being that we now build our features list around hw_encap_features. Added support for IPIP and SIT offloads, which should improvement in throughput for IPIP and SIT tunnels with the offload enabled.
Mitch adds support for configuring RSS on behalf of the VFs, which removes the burden of dealing with different hardware interfaces from the VF drivers and improves future compatibility. Fix to ensure that we do not panic by checking that the vsi_res pointer is valid before dereferencing it, after which we can drink beer and eat peanuts.
Shannon does come housekeeping in i40e_add_fdir_ethtool() in preparation for more cloud filter work. Added flexibility to the nvmupdate facility by adding the ability to specify an AQ event opcode to wait on after Exec_AQ request.
Michal adds device capability which defines if an update is available and if a security check is needed during the update process.
Kamil just adds a device id to support X722 QSFP+ device.
Greg fixes an issue where a mirror rule ID may be zero, so do not return invalid parameter when the user passes in a zero for a rule ID. Adds support to steer packets to VSIs by VLAN tag alone while being in promiscuous mode for multicast and unicast MAC addresses.
Jesse fixes the driver from offloading the VLAN tag into the skb any time there was a VLAN tag and the hardware stripping was enabled, to making sure it is enabled before put_tag.
v2: Dropped patch 8 ("i40e: Allow user to change input set mask for flow director") while Kiran reworks a more generalized solution based on feedback from David Miller. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 501e7ef569f4ea2dc7e50773cf6a5d757c94f9b4 Author: Eric Dumazet edumazet@google.com Date: Tue Apr 26 15:30:07 2016 -0700
net-rfs: fix false sharing accessing sd->input_queue_head
sd->input_queue_head is incremented for each processed packet in process_backlog(), and read from other cpus performing Out Of Order avoidance in get_rps_cpu()
Moving this field in a separate cache line keeps it mostly hot for the cpu in process_backlog(), as other cpus will only read it.
In a stress test, process_backlog() was consuming 6.80 % of cpu cycles, and the patch reduced the cost to 0.65 %
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 35ef7d689d7d54ab345b179e50c749fe3a2529eb Author: Akinobu Mita akinobu.mita@gmail.com Date: Wed Apr 27 05:43:48 2016 +0900
net: w5100: support W5500
This adds support for W5500 chip.
W5500 has similar register and memory organization with W5100 and W5200. There are a few important differences listed below but it is still possible to share common code with W5100 and W5200.
* W5500 register and memory are organized by multiple blocks. Each one is selected by 16bits offset address and 5bits block select bits.
But the existing register access operations take u16 address. This change extends the addess by u32 address and put offset address to lower 16bits and block select bits to upper 16bits.
This change also adds the offset addresses for socket register and TX/RX memory blocks to the driver private data structure in order to reduce conditional switches for each chip.
* W5500 has the different register offset for socket interrupt mask register. Newly added internal functions w5100_enable_intr() and w5100_disable_intr() take care of the diffrence.
* W5500 has the different register offset for retry time-value register. But this register is only used to verify that the reset value is correctly read at initialization. So move the verification to w5100_hw_reset() which already does different things for different chips.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit 47d3483988f649739ad8d6462eaa1723e5d077c3 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Tue Apr 12 08:30:52 2016 -0700
i40evf: Add driver support for promiscuous mode
Add necessary Linux Ethernet driver support for promiscuous mode operation. Add a flag so the VF knows it is in promiscuous mode and two state flags to discreetly track multicast and unicast promiscuous states.
Change-Id: Ib2f2dc7a7582304fec90fc917ebb7ded21ba1de4 Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Signed-off-by: Greg Rose gregory.v.rose@intel.com Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5676a8b9cd9a1c9822cdb3d88109f449eb2126c1 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Tue Apr 12 08:30:51 2016 -0700
i40e: Add VF promiscuous mode driver support
Add infrastructure for Network Function Virtualization VLAN tagged packet steering feature.
Change-Id: I9b873d8fcc253858e6baba65ac68ec5b9363944e Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Signed-off-by: Greg Rose gregory.v.rose@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 6c41a7606967803702d0b5c2ba57acce71ec8d9d Author: Greg Rose gregory.v.rose@intel.com Date: Tue Apr 12 08:30:50 2016 -0700
i40e: Add promiscuous on VLAN support
NFV use cases require the ability to steer packets to VSIs by VLAN tag alone while being in promiscuous mode for multicast and unicast MAC addresses. These two new functions support that ability.
Signed-off-by: Greg Rose gregory.v.rose@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a149f2c323b62bc6cff91d874d853250250e8497 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Tue Apr 12 08:30:49 2016 -0700
i40e/i40evf: Only offload VLAN tag if enabled
The driver was offloading the VLAN tag into the skb any time there was a VLAN tag and the hardware stripping was enabled. Just check to make sure it's enabled before put_tag.
Change-Id: Ife95290c06edd9a616393b38679923938b382241 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit db0772782f6b99adbd8548e1d3830fe019c9f250 Author: Greg Rose gregory.v.rose@intel.com Date: Tue Apr 12 08:30:48 2016 -0700
i40e: Remove zero check
A mirror rule ID may be zero so do not return invalid parameter when the user passes in a zero value for a rule ID.
Change-ID: I261b8c24725ce2c6ed32f859da81093dfcbe2970 Signed-off-by: Greg Rose gregory.v.rose@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit bccf474435b668312e9fc8bd9586c2e256b66841 Author: Kamil Krawczyk kamil.krawczyk@intel.com Date: Tue Apr 12 08:30:47 2016 -0700
i40e: Add DeviceID for X722 QSFP+
Change-ID: I1370fbc7774e815ac1ad56561e97488e829592fc Signed-off-by: Kamil Krawczyk kamil.krawczyk@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 68a1c5a777f8e94d3bb0b0e287443492316ea5b5 Author: Michal Kosiarz michal.kosiarz@intel.com Date: Tue Apr 12 08:30:46 2016 -0700
i40e: Add device capability which defines if update is available
Add device capability which defines if update is available and security check is needed during update process.
Change-ID: I380787c878275e1df18b39198df3ee3666342282 Signed-off-by: Michal Kosiarz michal.kosiarz@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c0cc53162a0644dd57dce5e2fbb9bbafdc57d183 Merge: 8c14586 f28f20d Author: David S. Miller davem@davemloft.net Date: Wed Apr 27 15:43:10 2016 -0400
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor overlapping changes in the conflicts.
In the macsec case, the change of the default ID macro name overlapped with the 64-bit netlink attribute alignment fixes in net-next.
Signed-off-by: David S. Miller davem@davemloft.net
commit 8c14586fc320acfed8a0048eb21d1f2e2856fc36 Author: David Ahern dsa@cumulusnetworks.com Date: Sun Apr 24 21:26:04 2016 -0700
net: ipv6: Use passed in table for nexthop lookups
Similar to 3bfd847203c6 ("net: Use passed in table for nexthop lookups") for IPv4, if the route spec contains a table id use that to lookup the next hop first and fall back to a full lookup if it fails (per the fix 4c9bcd117918b ("net: Fix nexthop lookups")).
Example:
root@kenny:~# ip -6 ro ls table red local 2100:1::1 dev lo proto none metric 0 pref medium 2100:1::/120 dev eth1 proto kernel metric 256 pref medium local 2100:2::1 dev lo proto none metric 0 pref medium 2100:2::/120 dev eth2 proto kernel metric 256 pref medium local fe80::e0:f9ff:fe09:3cac dev lo proto none metric 0 pref medium local fe80::e0:f9ff:fe1c:b974 dev lo proto none metric 0 pref medium fe80::/64 dev eth1 proto kernel metric 256 pref medium fe80::/64 dev eth2 proto kernel metric 256 pref medium ff00::/8 dev red metric 256 pref medium ff00::/8 dev eth1 metric 256 pref medium ff00::/8 dev eth2 metric 256 pref medium unreachable default dev lo metric 240 error -113 pref medium
root@kenny:~# ip -6 ro add table red 2100:3::/64 via 2100:1::64 RTNETLINK answers: No route to host
Route add fails even though 2100:1::64 is a reachable next hop: root@kenny:~# ping6 -I red 2100:1::64 ping6: Warning: source address might be selected on device other than red. PING 2100:1::64(2100:1::64) from 2100:1::1 red: 56 data bytes 64 bytes from 2100:1::64: icmp_seq=1 ttl=64 time=1.33 ms
With this patch: root@kenny:~# ip -6 ro add table red 2100:3::/64 via 2100:1::64 root@kenny:~# ip -6 ro ls table red local 2100:1::1 dev lo proto none metric 0 pref medium 2100:1::/120 dev eth1 proto kernel metric 256 pref medium local 2100:2::1 dev lo proto none metric 0 pref medium 2100:2::/120 dev eth2 proto kernel metric 256 pref medium 2100:3::/64 via 2100:1::64 dev eth1 metric 1024 pref medium local fe80::e0:f9ff:fe09:3cac dev lo proto none metric 0 pref medium local fe80::e0:f9ff:fe1c:b974 dev lo proto none metric 0 pref medium fe80::/64 dev eth1 proto kernel metric 256 pref medium fe80::/64 dev eth2 proto kernel metric 256 pref medium ff00::/8 dev red metric 256 pref medium ff00::/8 dev eth1 metric 256 pref medium ff00::/8 dev eth2 metric 256 pref medium unreachable default dev lo metric 240 error -113 pref medium
Signed-off-by: David Ahern dsa@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 570d8e9398011a63590c281a36cdce311196608e Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Wed Apr 27 17:53:08 2016 +0200
taskstats: fix nl parsing in accounting/getdelays.c
The type TASKSTATS_TYPE_NULL should always be ignored.
When jumping to the next attribute, only the length of the current attribute should be added, not the length of all nested attributes. This last bug was not visible before commit 80df554275c2, because the kernel didn't put more than two nested attributes.
Fixes: a3baf649ca9c ("[PATCH] per-task-delay-accounting: documentation") Fixes: 80df554275c2 ("taskstats: use the libnl API to align nlattr on 64-bit") Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9d3f65b0c2ddb926340af96eb89ad9be589865c0 Author: Amitkumar Karwar akarwar@marvell.com Date: Sun Apr 24 23:49:52 2016 -0700
mwifiex: increase dwell time for active scan
It's been observed that sometimes AP's probe response is received after scan duration gets completed for the channel. This happens especially when wildcard scan is performed along with specific SSID scan. We will increase the time from 30 msecs to 40 msecs.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 1b499cb72f26bbf44f2fa158c2d1487730aae96a Author: Amitkumar Karwar akarwar@marvell.com Date: Sun Apr 24 23:49:51 2016 -0700
mwifiex: disable channel filtering feature in firmware
As 2.4Ghz channels are overlapping, sometimes AP responds to probe request even if it's operating on neighbouring channel. Currently firmware drops those scan entries, as current channel doesn't match with APs channel.
This patch enables MWIFIEX_DISABLE_CHAN_FILT flag in scan command to disable the feature so that better scan results will be received in 2.4Ghz band.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit d286af9bf40ab88f2035aef293f6ecae4187c6bb Author: Amitkumar Karwar akarwar@marvell.com Date: Thu Apr 21 08:07:56 2016 -0700
mwifiex: avoid querying wakeup reason when wowlan is disabled
In cfg80211 resume handler, we query wakeup reason from firmware and report to cfg80211. if wowlan is disabled, connection is already terminated during suspend. We don't need to query wakeup reason in this case.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit df2288623ee0ce77743d76ed8ca816e92246e77b Author: Amitkumar Karwar akarwar@marvell.com Date: Thu Apr 21 08:07:55 2016 -0700
mwifiex: report wowlan wakeup reasons correctly
It's been observed that wakeup on GTK rekey failure wasn't reported to cfg80211. This patch corrects the check so that all valid wakeup reasons are reported.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 3f210e2f1269ffe83188db2f1f5839da907fc722 Author: Amitkumar Karwar akarwar@marvell.com Date: Thu Apr 21 08:07:54 2016 -0700
mwifiex: fix coding style
Redundant space in case statement is removed.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8d666302df95ab585f5cc7b2fb779991f8797eb5 Author: Marty Faltesek mfaltesek@google.com Date: Wed Apr 20 00:22:01 2016 -0400
mwifiex: transmit packet stats incorrect.
tx_packets counter is incremented for aggregated packets, when it had already been incremented for the aggregated packet's constituent parts. Removing the extra count.
Signed-off-by: Marty Faltesek mfaltesek@google.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b977d305ad20e05212c0ded2a7ef90e411edc1b3 Author: Marty Faltesek mfaltesek@google.com Date: Wed Apr 20 00:20:52 2016 -0400
mwifiex: fw download does not release sdio bus during failure
Signed-off-by: Marty Faltesek mfaltesek@google.com Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit bb28c28ee10559c5bc5b5f48c2d6f6f2f6bd5586 Author: Marty Faltesek mfaltesek@google.com Date: Wed Apr 20 00:19:35 2016 -0400
mwifiex: bridged packets cause wmm_tx_pending counter to go negative
When a packet is queued from the bridge, wmm_tx_pending is not incremented, but when the packet is dequeued the counter is decremented.
Signed-off-by: Marty Faltesek mfaltesek@google.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 0e7dd0c9c3cde901f79f04260aa706bbfdc0c67e Author: Florian Westphal fw@strlen.de Date: Tue Apr 26 23:14:30 2016 +0200
pch_gbe: fix bogus trylock conversion
Should have converted 'if (trylock)' to 'lock'.
Fixes: a6086a893718db ("drivers: net: remove NETDEV_TX_LOCKED") Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit 50d5d2bd1d4273f1417135965a151e13f1f061c4 Merge: 3ccec4b ec65cfc Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 16:07:21 2016 -0400
Merge branch 'sh_eth-next'
Sergei Shtylyov says:
==================== sh_eth: couple of software reset bit cleanups
Here's a set of 2 patches against DaveM's 'net-next.git' repo. We clean up the use of the software reset bits... ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit ec65cfce508885e433445036ab46f4ec91d32c5c Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 23:46:15 2016 +0300
sh_eth: rename ARSTR register bit
The Renesas RZ/A1H manual names the software reset bit in the software reset register (ARSTR) ARST which makes a bit more sense than the ARSTR_ARSTR name used now by the driver -- rename the latter to ARSTR_ARST.
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Simon Horman horms+renesas@verge.net.au Signed-off-by: David S. Miller davem@davemloft.net
commit 97717edc69eabdcc8b1859af75a363790c3e9cb6 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 23:45:23 2016 +0300
sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
sh_eth_check_reset() uses a bare number where EDMR_SRST_GETHER would fit, i.e. the receive/trasmit software reset bits that comprise EDMR_SRST_GETHER read as 1 while the corresponding reset is in progress and thus, when both are 0, the reset is complete.
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Simon Horman horms+renesas@verge.net.au Signed-off-by: David S. Miller davem@davemloft.net
commit 3ccec4bd10c95bbd8729b1edebef887b666905bf Merge: 4e095a9 1b223dd Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 15:58:03 2016 -0400
Merge branch 'mlx5-next'
Saeed Mahameed says:
==================== Mellanox 100G extending mlx5 ethtool support
Changes from V0: - Dropped: net/mlx5e: Disable link up on INIT HCA command Due to Ido's and Or's requests we will submit this patch to net and will need it for -stable. - Rebased to: 11afbff86168 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next")
This series is centralized around extending and improving mlx5 ethernet driver ethtool support. We've done some code refactoring for ethtool statistics reporting, making it more scalable and robust, now each reported ethtool counter belongs to a group and has its own descriptor within that group, the descriptor holds the counter name and offset in memory in that group memory block.
Added new counters: - Reporting more error and drop counter in ifconig/ip tool. - Per priority pause and traffic counter in ethtool. - link down events counter in ethtool.
Set features handling was also refactored a little bit to be more resilient and generic, now setting more than one feature will not stop on the first failed one, but instead it will try to continue setting others. We made it generic to make it simpler for adding more features support, it is now done easily by only introducing a handler function of the new supported netdev feature, and let the generic handler do the job.
New netdev features and ethtool support: - Netdev feature RXALL, set on/off FCS check offload. - Netdev feature HW_VLAN_CTAG_RX, set on/off rx-vlan stripping offload. - Ethtool interface identify. - Ethtool dump module EEPROM. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 1b223dd391622fde05e03829d813c3c6cc998685 Author: Saeed Mahameed saeedm@mellanox.com Date: Sun Apr 24 22:51:56 2016 +0300
net/mlx5e: Fix checksum handling for non-stripped vlan packets
Now as rx-vlan offload can be disabled, packets can be received with vlan tag not stripped, which means is_first_ethertype_ip will return false, for that we need to check if the hardware reported csum OK so we will report CHECKSUM_UNNECESSARY for those packets.
Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 363501145e3faa650193722fe7047b767ed87172 Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:55 2016 +0300
net/mlx5e: Add ethtool support for rxvlan-offload (vlan stripping)
Use ethtool -K <interface> rxvlan <on/off> to enable/disable C-TAG vlan stripping by hardware.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit bb64143eee8c036a89b31daa4e9bf8360a8bded1 Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:54 2016 +0300
net/mlx5e: Add ethtool support for dump module EEPROM
Add query MCIA, PMLP registers infrastructure and commands. Add ethtool support for get_module_info() and get_module_eeprom() callbacks.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit da54d24ec3ef736de04c61a01653776a9750334f Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:53 2016 +0300
net/mlx5e: Add ethtool support for interface identify (LED blinking)
Add the needed hardware command and mlx5_ifc structs for managing LED control. Add set_phys_id ethtool callback to support ethtool -p flag.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Eugenia Emantayev eugenia@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 94cb1ebbafd509210887eea6ced55c40da7b4baa Author: Eran Ben Elisha eranbe@mellanox.com Date: Sun Apr 24 22:51:52 2016 +0300
net/mlx5e: Add support for RXALL netdev feature
Introduce new access register named Ports Check Mask Register (PCMR) to control all HW checks on port. With this register, the driver can enable/disable Hardware FCS validation.
When RXALL is enabled/disabled using ndo_set_features, enable/disable fcs check at HW. User can change HW configuration using rx-all flag at ethtool.
Signed-off-by: Eran Ben Elisha eranbe@mellanox.com Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0e405443e803a3ce9ba22f11be37e2a74f3fb9ad Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:51 2016 +0300
net/mlx5e: Improve set features ndo resiliency
In current mlx5e ndo_set_features implementation, setting some features can success while others can fail. Today, we return one error code which doesn't reflect the current features status of the netdev at the end of the ndo callback.
Set netdev->features with features which were successfully set in order to keep the current status in case of failure. For this purpose, define new Macro to set/unset specific feature in netdev->features.
This patch introduces a mechanism that uses feature handlers for each feature. Set features will call a generic handler, which will then call a specific handler in his turn and update netdev->features according to it's return value. Each specific handler is responsible to perform driver specific actions, and updating params if needed.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 121fcdc84d8240d4dfe1f737befd5814b12623ee Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:50 2016 +0300
net/mlx5e: Add link down events counter
Expose link_down_events counter through ethtool -S. This counter is read from PPort statistics, then proccessed and stored as a special handling software counter. This counter is stored along software counters since it is the only PPort counter that it's size is not 64 bits.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit cf678570d5a1022c4c4dbda7792f2a36f0b9fec0 Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:49 2016 +0300
net/mlx5e: Add per priority group to PPort counters
Expose counters providing information for each priority level (PCP) through ethtool -S option and DCBNL. This includes rx/tx bytes, frames, and pause counters.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8075cb72382bf854a3a95f74ea4f9d19ebe29fd5 Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:48 2016 +0300
net/mlx5e: Rename VPort counters
VPort and software counters names are confusing and may be unclear, all VPort counters now have a prefix of rx/tx_vport_*.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9218b44dcc059e08e249f6f7614b8e391eb041d8 Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:47 2016 +0300
net/mlx5e: Statistics handling refactoring
Redesign ethtool statistics handling and reporting in the driver: 1. Move counters to a separate file (en_stats.h). 2. Remove unnecessary dependencies between stats and strings. 3. Use counter descriptors which hold a name and offset for each counter, and will be used to decide which counters will be exposed.
For example when adding a new software counter to ethtool, instead of: 1. Add to stats struct. 2. Add to strings struct in the same order. 3. Change macro defining number of software counters. The only thing needed is to link the new counter to a counter descriptor.
VPort counters are a set of hardware traffic counters created automatically for each virtual port opened. PPort counters are a set of counters describing per physical port performance statistics. These counters are gathered from hardware register and divided to groups according to different protocols.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 269e6b3af3bfbc4e50b497924c2abb1c4cf3364e Author: Gal Pressman galp@mellanox.com Date: Sun Apr 24 22:51:46 2016 +0300
net/mlx5e: Report additional error statistics in get stats ndo
Provide rtnl_link_stats64 with information regarding physical errors to be seen in ifconfig and ip tool.
Signed-off-by: Gal Pressman galp@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4e095a9a6ee50ba8a9820a4991b6a2a27c67bdb4 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 15:57:19 2016 -0400
infiniband: nes: Kill unused variable in nes_netdev_start_xmit()
Signed-off-by: David S. Miller davem@davemloft.net
commit c578e9ab4cd467bd7b9e1ea391b5376894c56d0d Merge: c971c0e f0cdf76 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 15:53:06 2016 -0400
Merge branch 'netdev_tx_locked-removal'
Florian Westphal says:
==================== net: core: remove TX_LOCKED support
Not that many users left, lets kill it.
TX_LOCKED was meant to be used by LLTX drivers when spin_trylock() failed. Stack then re-queued if collisions happened on different cpus or free'd the skb to prevent deadlocks.
Most of the driver removal patches fall into one of three categories: 1. remove the driver-private tx lock (and LLTX flag), or... 2. convert spin_trylock to plain spin_lock, or... 3. convert TX_LOCKED to free+TX_OK
Patches are grouped by these categories, last patch is the actual removal. All driver changes were compile tested only with exception of atl1e. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit f0cdf76c103ffa34ca5ac87dcdef7edffc722cbf Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:14 2016 +0200
net: remove NETDEV_TX_LOCKED support
No more users in the tree, remove NETDEV_TX_LOCKED support. Adds another hole in softnet_stats struct, but better than keeping the unused collision counter around.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit a6086a893718db07ef9e7af5624ec27cb376ef0a Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:13 2016 +0200
drivers: net: remove NETDEV_TX_LOCKED
replace the trylock by a full spin_lock and remove TX_LOCKED return value. Followup patch will remove TX_LOCKED from the kernel.
Cc: Jon Mason jdmason@kudzu.us Cc: Andy Gospodarek andy@greyhouse.net Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit 926f27300100f4233c7665649f68fcf615f58d68 Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:12 2016 +0200
drivers: net: use NETDEV_TX_OK instead of NETDEV_TX_LOCKED
These drivers already call netif_stop_queue() so we should not be called unless tx space is available. Just free the skb and return TX_OK.
Followup patch will remove NETDEV_TX_LOCKED from the kernel.
Cc: linux-parisc@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: Thomas Sailer t.sailer@alumni.ethz.ch Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit 4acff371f2e3f386422253c7fce0092a793ec1a4 Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:11 2016 +0200
atle1: remove LLTX support and TX_UNLOCKED
similar to atl1c: lock is only used in ndo_start_xmit, but we also advertised LLTX, so remove that as well and let core stack handle tx locking.
Allows to remove the TX_LOCKED return value from the driver.
Cc: Jay Cliburn jcliburn@gmail.com Cc: Chris Snook chris.snook@gmail.com Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit 353e3bd5a7081f23a9f015cbf172ec25b1412b93 Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:10 2016 +0200
atl1c: remove private tx lock
AFAICS this is safe: the lock is only used in the .ndo_start_xmit function and this driver does not set LLTX.
Gets rid of TX_LOCKED return value, followup patches will remove it.
Cc: Jay Cliburn jcliburn@gmail.com Cc: Chris Snook chris.snook@gmail.com Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit 47975cd1022d12735f02046ef8ada83f8ad24087 Author: Florian Westphal fw@strlen.de Date: Sun Apr 24 21:38:09 2016 +0200
RDMA/nes: remove use of NETDEV_TX_LOCKED
ndo_start_xmit never returns it to stack, but nes_nic_send helper used it if skb could not be queued to hardware. Switch to bool instead.
Cc: linux-rdma@vger.kernel.org Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: David S. Miller davem@davemloft.net
commit c971c0e580a6478c75339e45300e8ae3d167c0e9 Merge: f796721 af5840a Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 15:41:21 2016 -0400
Merge branch 'get_phy_device-retval'
Sergei Shtylyov says:
==================== Don't return NULL from get_phy_device() anymore
Here's the set of 5 patches against DaveM's 'net-next.git' repo. The first patch makes get_phy_device() return only error values on error, the rest of the patches clean up the callers of that function... ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit af5840a968fcb175900e5b821f37363a089f5b75 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 20:31:42 2016 +0300
of_mdio: get_phy_device() doesn't return NULL anymore
Now that get_phy_device() no longer returns NULL on error, we don't need to check for it...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 66c239e71adee694bc35f44387fb373942cfd957 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 20:30:53 2016 +0300
mdio_bus: get_phy_device() doesn't return NULL anymore
Now that get_phy_device() no longer returns NULL on error, we don't need to check for it...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4914a584b1d66680532b20898cba1cf7d5ae63e4 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 20:29:23 2016 +0300
fixed_phy: get_phy_device() doesn't return NULL anymore
Now that get_phy_device() no longer returns NULL on error, we don't need to check for it...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit fb1116ab7cf55f9b022c2a2d40a0f0c4464eb201 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 20:27:49 2016 +0300
xgene: get_phy_device() doesn't return NULL anymore
Now that get_phy_device() no longer returns NULL on error, we don't need to check for it...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit b74766a0a0feeef5c779709cc5d109451c0d5b17 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 20:25:23 2016 +0300
phylib: don't return NULL from get_phy_device()
Arnd Bergmann asked that get_phy_device() returns either NULL or the error value, not both on error. Do as he said, return ERR_PTR(-ENODEV) instead of NULL when the PHY ID registers read as all ones.
Suggested-by: Arnd Bergmann arnd@arndb.de Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit f796721040f933bb51b33f53899a382b4872b3e6 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 24 19:11:07 2016 +0300
sh_eth: get rid of the 2nd parameter to sh_eth_dev_init()
sh_eth_dev_init() is now always called with 'true' as the 2nd argument, so that there's no more sense in having 2 parameters to this function...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Reviewed-by: Simon Horman horms+renesas@verge.net.au Signed-off-by: David S. Miller davem@davemloft.net
commit f052f20a825a80c4662dafd3899dddafd4c8f036 Author: Xin Long lucien.xin@gmail.com Date: Sun Apr 24 23:21:22 2016 +0800
sctp: sctp_diag should fill RMEM_ALLOC with asoc->rmem_alloc when rcvbuf_policy is set
For sctp assoc, when rcvbuf_policy is set, it will has it's own rmem_alloc, when we dump asoc info in sctp_diag, we should use that value on RMEM_ALLOC as well, just like WMEM_ALLOC.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit e96c37f185529d1db4ebc021e4f56822d43945bb Author: Francesco Ruggeri fruggeri@arista.com Date: Sat Apr 23 15:04:31 2016 -0700
macvtap: check minor when unregistering
macvtap_device_event(NETDEV_UNREGISTER) should check vlan->minor to determine if it is being invoked in the context of a macvtap_newlink that failed, for example in this code sequence:
macvtap_newlink macvlan_common_newlink register_netdevice call_netdevice_notifiers(NETDEV_REGISTER, dev) macvtap_device_event(NETDEV_REGISTER) <fail here, vlan->minor = 0> rollback_registered(dev); rollback_registered_many call_netdevice_notifiers(NETDEV_UNREGISTER, dev); macvtap_device_event(NETDEV_UNREGISTER) <nothing to clean up here>
Signed-off-by: Francesco Ruggeri fruggeri@arista.com Acked-by: "Eric W. Biederman" ebiederm@xmission.com Signed-off-by: David S. Miller davem@davemloft.net
commit 308379607548524b8d86dbf20134681024935e0b Author: Francesco Ruggeri fruggeri@arista.com Date: Sat Apr 23 15:03:32 2016 -0700
macvlan: fix failure during registration v3
If macvlan_common_newlink fails in register_netdevice after macvlan_init then it decrements port->count twice, first in macvlan_uninit (from register_netdevice or rollback_registered) and then again in macvlan_common_newlink. A similar problem may exist in the ipvlan driver. This patch consolidates modifications to port->count into macvlan_init and macvlan_uninit (thanks to Eric Biederman for suggesting this approach).
v3: remove macvtap specific bits.
Signed-off-by: Francesco Ruggeri fruggeri@arista.com Acked-by: "Eric W. Biederman" ebiederm@xmission.com Signed-off-by: David S. Miller davem@davemloft.net
commit 713d4ddc99677499281fbacdfc8519b9d22513fa Merge: 101e63b a64b02d Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 13:56:27 2016 -0400
Merge branch 'qed-bandwidth-config'
Manish Chopra says:
==================== qed: Bandwidth configuration support
This series adds support in driver for min/max bandwidth configuration for the PF on the link change notification or on explicit request of bandwidth update from the MFW [management firmware].
The same infrastructure would later be used by user based flows [for example, rate shaping for the VFs]
Please consider applying this series to "net-next" ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit a64b02d5301cc7da7ac33ae3b3531ab1262d196e Author: Manish Chopra manish.chopra@qlogic.com Date: Tue Apr 26 10:56:10 2016 -0400
qed: Add PF min bandwidth configuration support
This patch adds support for PF minimum bandwidth update or configuration notified by management firmware.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4b01e5192bd26ed4d0c3c271611cc74ae2c164f2 Author: Manish Chopra manish.chopra@qlogic.com Date: Tue Apr 26 10:56:09 2016 -0400
qed: Add PF max bandwidth configuration support
This patch adds support for PF maximum bandwidth update or configuration notified by management firmware.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit bcd197c81f63afa4610e481ed353d1507ba401d0 Author: Manish Chopra manish.chopra@qlogic.com Date: Tue Apr 26 10:56:08 2016 -0400
qed: Add vport WFQ configuration APIs
This patch adds relevant APIs needed to configure WFQ (Weighted fair queueing) values for the vports. WFQ configuration is used per vport basis when minimum bandwidth update/configuration is notified to the PF by the management firmware.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 101e63b454ccd48120e4b39ae12ff2faec790acf Merge: c0b0479 ddc7740 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 13:23:58 2016 -0400
Merge branch 'cxgb4-next'
Hariprasad Shenai says:
==================== cxgb4: minor fixes, decode msgs and code refactor for few functions
This patch series adds new routine to get adapter information and removes some redundant messages logged in dmesg. Fixes race while freeing tx descriptors. Decodes module type and link down reason codes obtained from firmware. Refactor port initialization and FW_PORT_CMD handling. Pass correct port id in DCB message handler to obtain netdev associated.
This patch series has been created against net-next tree and includes patches on cxgb4 driver.
We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit ddc7740d9a7c7e61650309a81037f12d5cfad88e Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:29 2016 +0530
cxgb4: Decode link down reason code obtained from firmware
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 23853a0a9a7621922a21759eeed8c5bc09c71c54 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:28 2016 +0530
cxgb4: Don't assume FW_PORT_CMD reply is always port info msg
The firmware can send a set of asynchronous replies through FW_PORT_CMD with DCBX information when that's negotiated with the Link Peer. The old code always assumed that a FW_PORT_CMD reply was always a Get Port Information message. This change conditionalizes the code to only handle the Get Port Information messages and throws a warning if we don't understand what we've been given.
Also refactor t4_handle_fw_rpl() so that core functionality performed by t4_handle_get_port_info() for a specified port.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 134491fdc319037f37adc5f8ec51093e5cd5ada1 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:27 2016 +0530
cxgb4: DCB message handler needs to use correct portid to netdev mapping
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit c3e324e3d0662661f53c80fee28d70b6713f9dc8 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:26 2016 +0530
cxgb4: Refactor t4_port_init function
Refactor t4_port_init() so that the core functionality is done by t4_init_portinfo() for a particular port. Also rename variables to sensible ones.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit be81a2deb1134c47fadb10cb0bd6540caf6f32d7 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:25 2016 +0530
cxgb4: Properly decode port module type
Decode and log port module error, unknown modules and unsupported modules.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit fbe8077687330a55e87bc26745d4992991c101ec Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:24 2016 +0530
cxgb4: Avoids race and deadlock while freeing tx descriptor
There could be race between t4_eth_xmit() and t4_free_sge_resources() while freeing tx descriptors, take txq lock in t4_free_sge_resources(). We need to stop the xmit frame path which runs in bottom half context while unloading the driver using _bh variant of the lock. This is to prevent the deadlock between xmit and driver unload.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit ed98c85ee9a16373f73afeb5bcd7b37b65c2a62f Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:23 2016 +0530
cxgb4: Add llseek operation for flash debugfs entry
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0de727383c46510f12932d32e4b66292854be508 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 26 20:10:22 2016 +0530
cxgb4: add new routine to get adapter info
Add new routine to print out general adapter information (various version numbers, adapter name, part number, serial number, etc.) and remove redundant information dumped in the Port Information.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit c0b04793076167c8d8aade4c31fe06a4cc45b626 Merge: 9c9f261 5544107 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 13:15:56 2016 -0400
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:
==================== pull request: bluetooth-next 2016-04-26
Here's another set of Bluetooth & 802.15.4 patches for the 4.7 kernel:
- Cleanups & refactoring of ieee802154 & 6lowpan code - Security related additions to ieee802154 and mrf24j40 driver - Memory corruption fix to Bluetooth 6lowpan code - Race condition fix in vhci driver - Enhancements to the atusb 802.15.4 driver
Please let me know if there are any issues pulling. Thanks. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 43a3d9ba34c9ca313573201d3f45de5ab3494cec Author: Mitch Williams mitch.a.williams@intel.com Date: Tue Apr 12 08:30:44 2016 -0700
i40evf: Allow PF driver to configure RSS
If the PF driver reports proper support, allow the PF driver to configure RSS on the behalf of the VF driver. This will allow for RSS support on future hardware without changes to the VF driver.
Unfortunately, the old RSS code still needs to stay as the driver needs to be compatible with PF drivers that don't support this interface. But this change still simplifies the data structures a bunch and makes this code simpler to read and maintain.
Change-ID: I0375aad40788ecdc0cb24d5cfeccf07804e69771 Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit fed2db99824334b3a7219da6b45d70f448449d7d Author: Shannon Nelson shannon.nelson@intel.com Date: Tue Apr 12 08:30:43 2016 -0700
i40e: Specify AQ event opcode to wait for
To add a little flexibility to the nvmupdate facility, this code adds the ability to specify an AQ event opcode to wait on after the Exec_AQ request.
Change-ID: Iddbfd63c3de8df3edb9d3e90678b08989bc4946e Signed-off-by: Shannon Nelson shannon.nelson@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 9c9f261d6e3b1084816e9e2df794a55df16e7387 Merge: fab7b62 9854518 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 12:00:50 2016 -0400
Merge branch 'nla_align-set-4'
Nicolas Dichtel says:
==================== netlink: align attributes when needed (patchset #3)
This is the continuation (series #3) of the work done to align netlink attributes when these attributes contain some 64-bit fields.
It's the last patchset from what I've seen.
The last user of nla_put_u64() is block/drbd. This module does not use standard netlink API (see all the stuff in include/linux/genl_magic_struct.h and include/linux/genl_magic_func.h). I didn't modify it because it's seems hard to do it whithout testing and fully understanding the context (for example, why include/linux/drbd_genl.h is not part of uapi?). Any thoughts? ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 9854518ea04db33738602d45ebc96a200e6f5198 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:18 2016 +0200
sched: align nlattr properly when needed
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit b676338fb3aab0b63b4a2489feb8f35003db22e8 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:17 2016 +0200
neigh: align nlattr properly when needed
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 270cb4d05b2923a4a4d712276e61f64c82567138 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:16 2016 +0200
rtnl: align nlattr properly when needed
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 66c7a5ee1a6b7c69d41dfd68d207fdd54efba56a Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:15 2016 +0200
ovs: align nlattr properly when needed
I also fix commit 8b32ab9e6ef1: use nla_total_size_64bit() for OVS_FLOW_ATTR_USED in ovs_flow_cmd_msg_size().
Fixes: 8b32ab9e6ef1 ("ovs: use nla_put_u64_64bit()") Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6ed46d1247a595c58b6c04481fa77cf532f45de0 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:14 2016 +0200
sock_diag: align nlattr properly when needed
I also fix the value of INET_DIAG_MAX. It's wrong since commit 8f840e47f190 which is only in net-next right now, thus I didn't make a separate patch.
Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file") Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3c6f3714d6a9e051eb84759e4fa5a2f4a3e730c6 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:13 2016 +0200
fs/quota: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Acked-by: Jan Kara jack@suse.cz Signed-off-by: David S. Miller davem@davemloft.net
commit 08f4cbb8f207e2b8f40e8acc2a4e3a7df642b095 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:12 2016 +0200
drivers/wireless: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit f60d94c009685da0632d93297cae971c5898a04b Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Tue Apr 26 10:06:11 2016 +0200
macsec: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit efd7cef3100b2683ba4ff48943215b9537e9a37c Merge: f0d8f38 ffc03c3 Author: Kalle Valo kvalo@codeaurora.org Date: Tue Apr 26 14:13:59 2016 +0300
Merge ath-next from ath.git
ath.git patches for 4.7. Major changes:
ath10k
* implement set_tsf() for 10.2.4 branch * remove rare MSI range support * remove deprecated firmware API 1 support
ath9k
* add module parameter to invert LED polarity
wcn36xx
* fixes to get the driver properly working on Dragonboard 410c
commit bab3a34bb5f0b4056e37edf1bf6d097b147de453 Author: Shannon Nelson shannon.nelson@intel.com Date: Tue Apr 12 08:30:42 2016 -0700
i40e: Code cleanup in i40e_add_fdir_ethtool
A little bit of code cleanup in prep for more cloud filter work.
Change-ID: I0dc33ce0d4c207944336a07437640fef920c100c Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c0913c2e431c86026acba667f8655d90979bb79c Author: Mitch Williams mitch.a.williams@intel.com Date: Tue Apr 12 08:30:41 2016 -0700
i40evf: Don't Panic
Under some circumstances the driver remove function may be called before the driver is fully initialized. So we can't assume that we know where our towel is at, or that all of the data structures are initialized.
To ensure that we don't panic, check that the vsi_res pointer is valid before dereferencing it. Then drink beer and eat peanuts.
Change-ID: If697b4db57348e39f9538793e16aa755e3e1af03 Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c4e1868c3aa1992de1cba600e7083fcd49bd20b8 Author: Mitch Williams mitch.a.williams@intel.com Date: Tue Apr 12 08:30:40 2016 -0700
i40e: Add support for configuring VF RSS
Add support for configuring RSS on behalf of the VFs. This removes the burden of dealing with different hardware interfaces from the VF drivers, allowing for better future compatibility.
Change-ID: Icea75d3f37241ee8e447be5779e5abb53ddf04c0 Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 577389a5db766c44400e75e6a79f39d9b0d585f8 Author: Alexander Duyck aduyck@mirantis.com Date: Sat Apr 2 00:06:56 2016 -0700
i40e/i40evf: Add support for IPIP and SIT offloads
Looking over the documentation it turns out enabling IPIP and SIT offloads for i40e is pretty straightforward. As such I decided to enable them with this patch. In my testing I am seeing an improvement of 8 to 10 Gb/s for IPIP and SIT tunnels with this offload enabled.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b0fe3306432796c8f7adbede8ccd479bb7b53d0a Author: Alexander Duyck aduyck@mirantis.com Date: Sat Apr 2 00:05:14 2016 -0700
i40e/i40evf: Clean up feature flags
The feature flags list for i40e and i40evf is beginning to become pretty massive. I plan to add another 4 or so features to these drivers and duplicating the flags for each and every flags list is becoming a bit repetitive.
The primary change here is that we now build our features list around hw_encap_features. After that we assign that to vlan_features, hw_features, and finally map that onto features. In addition we end up throwing features onto hw_encap_features that end up having no effect such as the Rx offloads and SCTP_CRC. However that should have no impact and makes things a bit easier for us as hw_encap_features is one of the less updated features maps available.
For i40evf I went through and sanity checked a few features as well. Specifically RXCSUM was being set as a read-only feature which didn't make much sense. I have updated things so we can clear the NETIF_F_RXCSUM flag since that is really a software feature and not a hardware one anyway so disabling it is just a matter of ignoring the result from the hardware.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit f0d8f38cd909e072833a06b79939256c4aebe3a0 Author: Luca Coelho luciano.coelho@intel.com Date: Mon Apr 25 20:02:09 2016 +0300
iwlwifi: fix fw version reading for DVM devices
In commit 97f95c93c8ed ("iwlwifi: remove support for fw older than -16.ucode") we accidentally changed the fw version reading code for DVM devices. The code intended to remove the old fw version API, because all MVM firmwares version 16 and above that we support don't use it anymore. But DVM devices still use the old FW API.
Fix that by bringing the code back in.
Reported-by: Pat Erley pat-lkml@erley.org Tested-by: Kalle Valo kvalo@codeaurora.org Fixes: 97f95c93c8ed ("iwlwifi: remove support for fw older than-16.ucode") Signed-off-by: Luca Coelho luciano.coelho@intel.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2557654df14b95141f1410127c33ed1661a8abbb Author: Chun-Yeow Yeoh yeohchunyeow@gmail.com Date: Thu Apr 21 00:41:34 2016 +0800
rt2800lib: enable MFP if hw crypt is disabled
If rt2800usb is loaded with nohwcrypt=1, mac80211 takes care of the crypto with software encryption/decryption and thus, MFP can be used.
Tested for secured mesh using ath9k_htc and ath9k.
Signed-off-by: Chun-Yeow Yeoh yeohchunyeow@gmail.com Acked-by: Stanislaw Gruszka sgruszka@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 81542fac6eae586e0d6fd502618342e8e20b4c5a Author: Dan Carpenter dan.carpenter@oracle.com Date: Tue Apr 19 07:25:43 2016 -0700
brcmfmac: testing the wrong variable in brcmf_rx_hdrpull()
Smatch complains about this code:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c:335 brcmf_rx_hdrpull() error: we previously assumed '*ifp' could be null (see line 333)
The problem is that we recently changed these from "ifp" to "*ifp" but there was one that we didn't update.
- if (ret || !ifp || !ifp->ndev) { + if (ret || !(*ifp) || !(*ifp)->ndev) { if (ret != -ENODATA && ifp) ^^^ - ifp->stats.rx_errors++; + (*ifp)->stats.rx_errors++;
I have updated it to *ifp as well. We always call this function is a non-NULL "ifp" pointer, btw.
Fixes: c462ebcdfe42 ('brcmfmac: create common function for handling brcmf_proto_hdrpull()') Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Acked-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 394f0ed53108d5e038910e3eb733ccd3f0d9c464 Author: Dan Carpenter dan.carpenter@oracle.com Date: Tue Apr 19 07:23:44 2016 -0700
mwifiex: fix loop timeout in mwifiex_prog_fw_w_helper()
USB8XXX_FW_MAX_RETRY is 3. We were using a post-op loop "while (retries--) {" but then the lines after that assume the loop exits with retries set to zero.
I've fixed this by changing to a pre-op loop. I started with retries set to 4 instead of 3 so that we still go through the loop the same number of times.
Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e0bdef0f75f0ee0d4747b72fa75310da78dbfa56 Author: Dan Carpenter dan.carpenter@oracle.com Date: Tue Apr 19 07:21:58 2016 -0700
mwifiex: missing error code on allocation failure
We accidentally return success instead of -ENOMEM.
Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 04a74a9f8af0cd61598e886c260ad0644b1dd5c0 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:36 2016 -0400
rtl8xxxu: Rename rtl8723au_iqk_phy_iq_bb_reg
There is nothing 8723au specific about rtl8723au_iqk_phy_iq_bb_reg so rename the array to rtl8xxxu_iqk_phy_iq_bb_reg.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 85f466350abf3a7eeb579a3abd75f85e36d591fa Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:35 2016 -0400
rtl8xxxu: Rename rtl8723bu_simularity_compare()
This renames rtl8723bu_simularity_compare() to rtl8xxxu_gen2_simularity_compare() to reflect it is used for all gen2 parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 5ac74145487dbf93a109a06c8aec0da1395c35f5 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:34 2016 -0400
rtl8xxxu: Rename rtl8723b_channel_to_group()
This renames rtl8723b_channel_to_group() to rtl8xxxu_gen2_channel_to_group() to reflect it is used by all currently supported gen2 parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8db71451e5c4ab5813e70b22a876e67a29a57a3f Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:33 2016 -0400
rtl8xxxu: Rename rtl8723a_mac_init_table to rtl8xxxu_gen1_mac_init_table
All currently supported gen1 parts use the same mac_init_table, so rename it to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8396a41cf7478f950f4682c1333771e1e4cf0b36 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:32 2016 -0400
rtl8xxxu: Rename rtl8723a_enable_rf() to rtl8xxxu_gen1_enable_rf()
All gen1 parts use the same enable_rf() function, so rename it to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 42a3bc7a2a8525f9a3679e5dad19866ef34e2c09 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:31 2016 -0400
rtl8xxxu: Rename rtl8723a_set_tx_power() to rtl8xxxu_gen1_set_tx_power()
All gen1 parts use the same interface for setting TX power, so rename the function to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit de7c189c342da635d8b17460b851fbe9b7f1e898 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:30 2016 -0400
rtl8xxxu: Rename rtl8723au_init_phy_bb() to rtl8xxxu_gen1_init_phy_bb()
All gen1 parts use the same init_phy_bb() function, so rename it to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 28466e9214029ef0978acfbaae0f02f78caa4ae9 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:29 2016 -0400
rtl8xxxu: Rename rtl8723au_phy_iq_calibrate() to rtl8xxxu_gen1_phy_iq_calibrate()
All supported gen1 parts use the same phy_iq_calibrate() function (unlike their gen2 counterparts). Rename the function to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c6e39da02e17bf3521f1c08df1555b6ffa77dee4 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:28 2016 -0400
rtl8xxxu: Rename rtl8723au_update_rate_mask() to rtl8xxxu_update_rate_mask()
All currently supported gen1 parts use the same function for updating the rate mask, so rename it to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e09718c2fddfc68a14503ea2016970e48872e722 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:27 2016 -0400
rtl8xxxu: Rename rtl8723au_config_channel() to rtl8xxxu_gen1_config_channel()
All supported gen1 parts use the same config_channel() function, so rename it to reflect this.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 7eb1400c247934dc485817a2c2b62540121a6e55 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:26 2016 -0400
rtl8xxxu: Rename rtl8723a_disable_rf() to rtl8xxxu_gen1_disable_rf()
All currently supported gen1 parts use the same disable_rf() routine, so rename the function to reflect that.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 6a07b7915afe876195f8c8715ebc438c0b1d1348 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:25 2016 -0400
rtl8xxxu: Rename rtl8723b_disable_rf() to rtl8xxxu_gen2_disable_rf()
At least for now, all gen2 parts use the same disable_rf() function
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 3a56bf6aa13c1bb6e4012824e0897f32acbb1f04 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:24 2016 -0400
rtl8xxxu: Rename rtl8723bu_config_channel() to rtl8xxxu_gen2_config_channel()
Rename the function to indicate it is applicable to most/all gen2 parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit beb5531619c615f9b1d204d6d300dfe9e2fd454e Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:23 2016 -0400
rtl8xxxu: Rename rtl8723au_report_connect() to rtl8xxxu_gen1_report_connect()
Rename the function to reflect it is for all/most gen1 parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 32353a784f431185690919049b6951d309dc186e Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:22 2016 -0400
rtl8xxxu: Rename rtl8723bu_report_connect() to rtl8xxxu_gen2_report_connect()
Make the name reflect this is for most/all gen2 parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a8c8dfa5931970a31794eeb65ced790fcff099d0 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Mon Apr 18 11:49:21 2016 -0400
rtl8xxxu: Rename rtl8723bu_update_rate_mask() to rtl8xxxu_gen2_update_rate_mask()
Update the name of rtl8723bu_update_rate_mask() to make it reflect it's applicable for all/most gen2 N parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit eaf46b5fda3acd75df68f02d25754dccb446ec2d Author: Xinming Hu huxm@marvell.com Date: Mon Apr 18 06:42:55 2016 -0700
mwifiex: stop background scan when net device closed
Transmit data path should not touch background scan. We will stop background scan when net device is closed.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ce4f6f0c353b7bfd7b527667287a87fd83aea119 Author: Xinming Hu huxm@marvell.com Date: Mon Apr 18 05:22:23 2016 -0700
mwifiex: add platform specific wakeup interrupt support
On some arm-based platforms, we need to configure platform specific parameters by device tree node and also define our node as a child node of parent SDIO host controller. This patch parses these parameters from device tree. It includes calibration data dowoload to firmware, wakeup pin configured to firmware, and soc specific wake up gpio, which will be set as wakeup interrupt pin.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 84039920bdff60030b2b79e50e4c9d230ae00dad Author: Xinming Hu huxm@marvell.com Date: Mon Apr 18 05:22:22 2016 -0700
dt: bindings: add MARVELL's sd8xxx wireless device
Add device tree binding documentation for MARVELL's sd8xxx (sd8897 and sd8997) wlan chip.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Acked-by: Rob Herring robh@kernel.org Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 53985dccb1c98b7af080e2314bff0c5024e781b0 Author: Per Forlin per.forlin@gmail.com Date: Sun Apr 17 15:25:03 2016 +0200
brcmf: Fix null pointer exception in bcdc_hdrpull
In fwsignal.c: brcmf_fws_commit_skb() ... if (rc < 0) { entry->transit_count--; if (entry->suppressed) entry->suppr_transit_count--; (void)brcmf_proto_hdrpull(fws->drvr, false, skb, NULL); ^^^^^^^ goto rollback; } ...
The call to hdrpull will trigger a null pointer exception unless a null check is made in the method implementation.
Signed-off-by: Per Forlin per.forlin@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 7705ba6f7badb8cf38a0a19dad71e11a77ecb9cd Author: Arend van Spriel arend@broadcom.com Date: Sun Apr 17 16:44:58 2016 +0200
brcmfmac: add support for nl80211 BSS_SELECT feature
Announce support for nl80211 feature BSS_SELECT and process BSS selection behaviour provided in .connect() callback.
Reviewed-by: Hante Meuleman meuleman@broadcom.com Reviewed-by: Franky (Zhenhui) Lin frankyl@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieterpg@broadcom.com Reviewed-by: Lei Zhang leizh@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 005a425b24e101d312eca669b96a6b71d75e97fc Author: David Müller d.mueller@elsoft.ch Date: Fri Apr 15 08:50:25 2016 +0200
rtlwifi: rtl8821ae: Make sure loop counter is signed on all architectures
The for-loop condition does not work correctly on architectures where "char" is unsigned. Fix it by using an "int", which may also result in more efficient code.
Signed-off-by: David Müller d.mueller@elsoft.ch Acked-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 706a527ca32b3bf950754631fa42982c0f1c060b Author: Tina Ruchandani ruchandani.tina@gmail.com Date: Tue Apr 12 23:09:16 2016 -0700
prism54: isl_38xx: Replace 'struct timeval'
'struct timeval' uses a 32-bit seconds field which will overflow in year 2038 and beyond. This patch is part of a larger effort to remove all instances of 'struct timeval' from the kernel and replace them with 64-bit timekeeping variables. The patch also fixes the debug printf specifier to avoid the seconds value being truncated. The patch was build-tested / debugged by removing the "if VERBOSE > SHOW_ERROR_MESSAGES" guards.
Signed-off-by: Tina Ruchandani ruchandani.tina@gmail.com Suggested-by: Arnd Bergmann arnd@arndb.de Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e4c8b456c53d4beee5adaf5768c762171e2244f3 Author: Jia-Ju Bai baijiaju1990@163.com Date: Fri Mar 18 13:27:09 2016 +1100
rtl818x_pci: Fix a memory leak in rtl8180_init_rx_ring
When dev_alloc_skb or pci_dma_mapping_error in rtl8180_init_rx_ring fails, the memory allocated by pci_zalloc_consistent is not freed.
This patch fixes the bug by adding pci_free_consistent in error handling code.
Signed-off-by: Jia-Ju Bai baijiaju1990@163.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit fab7b629a82da1b59620470d13152aff975239f6 Merge: a843311 90bfe66 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 01:32:01 2016 -0400
Merge branch 'ila-csum-neutral'
Tom Herbert says:
==================== ila: Support for checksum neutral translations
This patch set updates ILA to support draft-herbert-nvo3-ila-02. The primary addition is support checksum neutral ILA translation. This allows address to be performed and still keep any transport layer checksums that include the addresses in their pseudo header to still be correct without the translator needing to parse L4.
Other items are: - Structures for ILA addresses, identifiers, locators - Disallow translation on non-ILA addresses (check by type in identifier). - Change xlat (nf_input) to translates solely based on matching locators not identifiers (since identifiers are not obfuscated by checksum neutral). - Side effect if above is that multiple ILA domains are supported. Each local locator can map to a different SIR address (ILA domain), and each domain defines its own identifier space.
Tested: Ran TCP_RR with 200 cnxs. ILA performance is slightly better than previously since we are not longer parsing L4 for checksum handling. I amd seeing about 1% performance overhead. Also ran TCP_STREAM and tested non-ILA address (type=0) are not translated.
v2: Fix compilation errors ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 90bfe662db13d49cadc6714b0b8ed7e2d0535c5c Author: Tom Herbert tom@herbertland.com Date: Sat Apr 23 11:46:57 2016 -0700
ila: add checksum neutral ILA translations
Support checksum neutral ILA as described in the ILA draft. The low order 16 bits of the identifier are used to contain the checksum adjustment value.
The csum-mode parameter is added to described checksum processing. There are three values: - adjust transport checksum (previous behavior) - do checksum neutral mapping - do nothing
On output the csum-mode in the ila_params is checked and acted on. If mode is checksum neutral mapping then to mapping and set C-bit.
On input, C-bit is checked. If it is set checksum-netural mapping is done (regardless of csum-mode in ila params) and C-bit will be cleared. If it is not set then action in csum-mode is taken.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 642c2c95585dac4ea977140dbb1149fd1e2e7f7f Author: Tom Herbert tom@herbertland.com Date: Sat Apr 23 11:46:56 2016 -0700
ila: xlat changes
Change model of xlat to be used only for input where lookup is done on the locator part of an address (comparing to locator_match as key in rhashtable). This is needed for checksum neutral translation which obfuscates the low order 16 bits of the identifier. It also permits hosts to be in muliple ILA domains (each locator can map to a different SIR address). A check is also added to disallow translating non-ILA addresses (check of type in identifier).
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 351596aad54a7e07de63fde38496656514661b07 Author: Tom Herbert tom@herbertland.com Date: Sat Apr 23 11:46:55 2016 -0700
ila: Add struct definitions and helpers
Add structures for identifiers, locators, and an ila address which is composed of a locator and identifier and in6_addr can be cast to it. This includes a three bit type field and enums for the types defined in ILA I-D.
In ILA lwt don't allow user to set a translation for a non-ILA address (type of identifier is zero meaning it is an IID). This also requires that the destination prefix is at least 65 bytes (64 bit locator and first byte of identifier).
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit a843311d87b69540641d491b97b328309d3a28a1 Author: Julia Lawall julia.lawall@lip6.fr Date: Sat Apr 23 11:07:02 2016 +0200
net: tsi108: use NULL for pointer-typed argument
The first argument of pci_free_consistent has type struct pci_dev *, so use NULL instead of 0.
The semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/)
// <smpl> @@ @@ pci_free_consistent( - 0 + NULL , ...) // </smpl>
Signed-off-by: Julia Lawall Julia.Lawall@lip6.fr Signed-off-by: David S. Miller davem@davemloft.net
commit 218afa10d82d7809c9a7d14f1c769be8d7d6e2b8 Merge: 5a5f079 218afd6 Author: David S. Miller davem@davemloft.net Date: Tue Apr 26 01:09:18 2016 -0400
Merge branch 'hns-debug-dsaf'
Yisen Zhuang says:
==================== net: hns: add support of debug dsaf device
There are two kinds of dsaf device in hns, one is for service ports, contains crossbar in it, can work under different mode. Another is for debug port, only can work under single port mode. The current code only declares a dsaf device for both service ports and debug ports.It is not so readability. This patch separates it to three platform devices to make the code more simple and readability.
The diagram of all port in one platform device(old): CPU | | DSAF(one platform device) -------------------------------------------------------------- / | | | | | / | PPE PPE PPE | / | | | | | / | | | | | / | crossbar | | | / | | | | |/ | ----------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | MAC MAC MAC MAC MAC MAC MAC MAC | | | | | | | | | | | -------------------------------------------------------------- | | | | | | | | PHY PHY PHY PHY PHY PHY PHY PHY
The diagram of separating ports to three platform(new): CPU | ----------------------------------- | | | ---------------------------------------------- --------- --------- | | | | | | | | | PPE | | PPE | | PPE | | | | | | | | | | | | | | | | | | | | crossbar | | | | | | | | | | | | | | | | | ---------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAC MAC MAC MAC MAC MAC | | MAC | | MAC | | | | | | | | | | | | | | | ---------------------------------------------- --------- --------- | | | | | | \ / | / | PHY PHY PHY PHY PHY PHY \ / PHY / PHY \ / / \ / / DSAF(three platform device)
We take the compatibility into consideration, and it works well by using the old dts file(tested on d02 board).
For more details, please see individual patches. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 218afd68a2e6de8226c4048e4dd051075648a9c6 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:17 2016 +0800
dts: hisi: update hns dst for separating dsaf dev support
Because debug dsaf port was separated from service dsaf port, this patch updates the related configurations of hns dts, changes it to match with the new binding files. This also removes enet nodes which don't exist in d02 board.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit c132cdccb71ee000d6456ec63acdf0535b5f35da Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:16 2016 +0800
Documentation: Bindings: add port-idx-in-ae for enet node
This patch adds description for port-idx-in-ae attribute.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2fc695a1bb00141a0f5df74e7a19e125f4babaa5 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:15 2016 +0800
Documentation: Bindings: Update DT binding for separating dsaf dev support
Because debug dsaf port was separated from service dsaf port, this patch updates the related information of DT binding.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0d768fc62def08628affa4a2abe4f319926027a9 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:14 2016 +0800
net: hns: add attribute port-mode-offset for dsaf port node
Port mode offset for each dsaf port is different. The current code is not so readability. This patch adds configuration named port-mode-offset to make the code simple and more readability. If port-mode-offset isn't exists, default value 0 will be used.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang Yisen.Zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:13 2016 +0800
net: hns: add attribute port-rst-offset for dsaf port node
The reset offset for each port in a dsaf is different. The current code is not so readability. This patch adds configuration named port-rst-offset to make the code simple and more readability. If this attribute doesn't exist, default value of this attribute is equal to its port index.
Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 31d4446dca9112ce7b9eada8e6d631a7580e2feb Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:12 2016 +0800
net: hns: add attribute cpld_ctrl for dsaf port node
This patch adds attribute cpld_ctrl for dsaf port node, parses the syscon for mac_cb from dts, and changes the method of access the cpld related registers through syscon.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 831d828bf2cc8535b74fa33c705a6f83e2e34eec Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:11 2016 +0800
net: hns: separate debug dsaf device from service dsaf device
There are two kinds of dsaf device in hns, one is for service ports, contains crossbar in it, can work under different mode. Another is for debug port, only can work under "single-port" mode. The current code only declared a dsaf device for both service ports and debug ports. This patch separate it to three platform devices.
Here is the diagram of all port in one platform device(old): CPU | | DSAF(one platform device) -------------------------------------------------------------- / | | | | | / | PPE PPE PPE | / | | | | | / | | | | | / | crossbar | | | / | | | | |/ | ----------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | MAC MAC MAC MAC MAC MAC MAC MAC | | | | | | | | | | | -------------------------------------------------------------- | | | | | | | | PHY PHY PHY PHY PHY PHY PHY PHY
Here is the diagram of separate all ports to three platform(new): CPU | ----------------------------------- | | | ---------------------------------------------- --------- --------- | | | | | | | | | PPE | | PPE | | PPE | | | | | | | | | | | | | | | | | | | | crossbar | | | | | | | | | | | | | | | | | ---------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAC MAC MAC MAC MAC MAC | | MAC | | MAC | | | | | | | | | | | | | | | ---------------------------------------------- --------- --------- | | | | | | \ / | / | PHY PHY PHY PHY PHY PHY \ / PHY / PHY \ / / \ / / DSAF(three platform device)
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2e2591b130c43dd241e7aa8b0f2d74dbf3cc334b Author: Daode Huang huangdaode@hisilicon.com Date: Sat Apr 23 17:05:10 2016 +0800
net: hns: sort the header file by alphabetical order
This patch tunes the header file by the alphabetical order.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 86897c960b490e62714f4b123b7d20b04945d773 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:09 2016 +0800
net: hns: add syscon operation for dsaf
This patch provides the read/write function for dsaf to access the registers through syscon methods.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 422c3107ed2cc6297f051109f3d4b6d855eaae14 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:08 2016 +0800
net: hns: add attribute reset-field-offset for dsaf node
Add the subctrl reset offset for dsaf, this property is used to reset xge/ge ports for different dsaf. If this attribute is not present, default value 0 will be used.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 406adee9a9fc38c11671f26180e694976f45237c Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:07 2016 +0800
net: hns: add attribute port-idx-in-ae in enet node.
This patch parse port-idx-in-ae in enet node. In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram: +-----+---------------+ | CPU | +-+-+-+---+-+-+-+-+-+-+ | | | | | | | | debug debug service port port port (0) (0) (0-5)
In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical ports connect to a LAN Switch while the CPU side assume itself have one single NIC connect to this switch. In this case, the port-idx-in-ae will be 0 only. +-----+-----+------+------+ | CPU | +-+-+-+-+-+-+-+-+-+-+-+-+-+ | | service| port(0) debug debug +------------+ port port | switch | (0) (0) +-+-+-+-+-+-++ | | | | | | external port
when port-idx-in-ae is not exists, old attribute port-id will be used (only for compatible purpose, not recommended to use port-id in new code).
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit a542458cb7211a5e092c6a3cd6150404a5b1aa46 Author: Daode Huang huangdaode@hisilicon.com Date: Sat Apr 23 17:05:06 2016 +0800
net: hns: set debug port irq index to 0
As debug ports are moved from service dsaf to debug dsaf, the interrupts offset should start from 0, So this patch re-defines the offset index of debug ports.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 89a440932b6f2eb7fee78dbde05870e2b95e6151 Author: Yisen.Zhuang(Zhuangyuzeng) Yisen.Zhuang@huawei.com Date: Sat Apr 23 17:05:05 2016 +0800
net: hns: add a new dsaf mode for debug port
This patch adds a new dsaf mode named "single-port" mode for debug port. This mode only contains one debug port. This patch also changes the method of distinguishing the port type.
Signed-off-by: Daode Huang huangdaode@hisilicon.com Signed-off-by: Yisen Zhuang yisen.zhuang@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 55441070ca1cbd47ce1ad2959bbf4b47aed9b83b Author: Glenn Ruben Bakke glennrubenbakke@nordicsemi.no Date: Fri Apr 22 18:06:11 2016 +0200
Bluetooth: 6lowpan: Fix memory corruption of ipv6 destination address
The memcpy of ipv6 header destination address to the skb control block (sbk->cb) in header_create() results in currupted memory when bt_xmit() is issued. The skb->cb is "released" in the return of header_create() making room for lower layer to minipulate the skb->cb.
The value retrieved in bt_xmit is not persistent across header creation and sending, and the lower layer will overwrite portions of skb->cb, making the copied destination address wrong.
The memory corruption will lead to non-working multicast as the first 4 bytes of the copied destination address is replaced by a value that resolves into a non-multicast prefix.
This fix removes the dependency on the skb control block between header creation and send, by moving the destination address memcpy to the send function path (setup_create, which is called from bt_xmit).
Signed-off-by: Glenn Ruben Bakke glenn.ruben.bakke@nordicsemi.no Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org Cc: stable@vger.kernel.org # 4.5+
commit 5a5f0792e98bdc8d2db89d1d49cb078fd836c1fa Merge: 557fc4a 947d275 Author: David S. Miller davem@davemloft.net Date: Mon Apr 25 16:54:15 2016 -0400
Merge branch 'pskb_extract'
Sowmini Varadhan says:
==================== pskb_extract() helper function.
This patchset follows up on the discussion in https://www.mail-archive.com/netdev@vger.kernel.org/msg105090.html
For RDS-TCP, we have to deal with the full gamut of nonlinear sk_buffs, including all the frag_list variants. Also, the parent skb has to remain unchanged, while the clone is queued for Rx on the PF_RDS socket.
Patch 1 of this patchset adds a pskb_extract() function that does all this without the redundant memcpy's in pskb_expand_head() and __pskb_pull_tail().
v2: Marcelo Leitner review comments ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 947d2756cddec83c72af99b02010002ddc57aeb3 Author: Sowmini Varadhan sowmini.varadhan@oracle.com Date: Fri Apr 22 18:36:36 2016 -0700
RDS: TCP: Call pskb_extract() helper function
rds-stress experiments with request size 256 bytes, 8K acks, using 16 threads show a 40% improvment when pskb_extract() replaces the {skb_clone(..); pskb_pull(..); pskb_trim(..);} pattern in the Rx path, so we leverage the perf gain with this commit.
Signed-off-by: Sowmini Varadhan sowmini.varadhan@oracle.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6fa01ccd883021105e9f8af7d04b9f156fa3494a Author: Sowmini Varadhan sowmini.varadhan@oracle.com Date: Fri Apr 22 18:36:35 2016 -0700
skbuff: Add pskb_extract() helper function
A pattern of skb usage seen in modules such as RDS-TCP is to extract `to_copy' bytes from the received TCP segment, starting at some offset `off' into a new skb `clone'. This is done in the ->data_ready callback, where the clone skb is queued up for rx on the PF_RDS socket, while the parent TCP segment is returned unchanged back to the TCP engine.
The existing code uses the sequence clone = skb_clone(..); pskb_pull(clone, off, ..); pskb_trim(clone, to_copy, ..); with the intention of discarding the first `off' bytes. However, skb_clone() + pskb_pull() implies pksb_expand_head(), which ends up doing a redundant memcpy of bytes that will then get discarded in __pskb_pull_tail().
To avoid this inefficiency, this commit adds pskb_extract() that creates the clone, and memcpy's only the relevant header/frag/frag_list to the start of `clone'. pskb_trim() is then invoked to trim clone down to the requested to_copy bytes.
Signed-off-by: Sowmini Varadhan sowmini.varadhan@oracle.com Signed-off-by: David S. Miller davem@davemloft.net
commit 557fc4a098039cf296fe33f118bab99a925fd881 Author: Michal Kazior michal.kazior@tieto.com Date: Fri Apr 22 14:20:13 2016 +0200
fq: add fair queuing framework
This works on the same implementation principle as codel*.h, i.e. there's a generic header with structures and macros and a implementation header carrying function definitions to include in given, e.g. driver or module.
The fairness logic comes from net/sched/sch_fq_codel.c but is generalized so it is more flexible and easier to re-use.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: David S. Miller davem@davemloft.net
commit 05d82c42509c2936e328a6b8b1e1cd5684f427ac Merge: e425974 d068ca2 Author: David S. Miller davem@davemloft.net Date: Mon Apr 25 16:44:28 2016 -0400
Merge branch 'reusable-codel'
Michal Kazior says:
==================== codel: make it reuseable beyond qdiscs
There's an ongoing effort in fixing wireless bufferbloat. As part of that fq_codel is being ported into mac80211. To prevent code duplication codel.h needs to be slightly modified before it can be used in mac80211 (or other drivers FWIW).
For more background please see:
https://www.spinics.net/lists/linux-wireless/msg149976.html ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit d068ca2ae2e614b9a418fb3b5f1fd4cf996ff032 Author: Michal Kazior michal.kazior@tieto.com Date: Fri Apr 22 14:15:59 2016 +0200
codel: split into multiple files
It was impossible to include codel.h for the purpose of having access to codel_params or codel_vars structure definitions and using them for embedding in other more complex structures.
This splits allows codel.h itself to be treated like any other header file while codel_qdisc.h and codel_impl.h contain function definitions with logic that was previously in codel.h.
This copies over copyrights and doesn't involve code changes other than adding a few additional include directives to net/sched/sch*codel.c.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: David S. Miller davem@davemloft.net
commit 79bdc4c862af7cf11a135a6fdf8093622043c862 Author: Michal Kazior michal.kazior@tieto.com Date: Fri Apr 22 14:15:58 2016 +0200
codel: generalize the implementation
This strips out qdisc specific bits from the code and makes it slightly more reusable. Codel will be used by wireless/mac80211 in the future.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: David S. Miller davem@davemloft.net
commit e425974feaa545575135f04e646f0495439b4c54 Author: Phil Sutter phil@nwl.cc Date: Fri Apr 22 14:02:42 2016 +0200
macsec: Convert to using IFF_NO_QUEUE
Signed-off-by: Phil Sutter phil@nwl.cc Acked-by: Sabrina Dubroca sd@queasysnail.net Signed-off-by: David S. Miller davem@davemloft.net
commit 0868e2538e45a9ed68e2b14adc42b020a36aae1d Author: Jiri Benc jbenc@redhat.com Date: Fri Apr 22 12:40:02 2016 +0200
route: move lwtunnel state to a single place
Commit 751a587ac9f9 ("route: fix breakage after moving lwtunnel state") moved lwtstate to the end of dst_entry for 32bit archs. This makes it share the cacheline with __refcnt which had an unkown effect on performance. For this reason, the pointer was kept in place for 64bit archs.
However, later performance measurements showed this is of no concern. It turns out that every performance sensitive path that accesses lwtstate accesses also struct rtable or struct rt6_info which share the same cache line.
Thus, to get rid of a few #ifdefs, move the field to the end of the struct also for 64bit.
Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6a025a50b523478b7c8112643cc94f5fd3d312ce Merge: 960a262 a43f235 Author: David S. Miller davem@davemloft.net Date: Mon Apr 25 15:59:17 2016 -0400
Merge branch 'qed-next'
Yuval Mintz says:
==================== qed*: driver updates
[Was previous termed 'eeprom access et al.', but seemed a bit inappropriate given we've dropped the eeprom patch for now. Still waiting for some inputs on that one, BTW]
This patch series contains some ethtool-related enhancements. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit a43f235f12e9da60a7e181f6a9524ea1e212e39d Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Fri Apr 22 08:41:04 2016 +0300
qed: add support for link pause configuration.
The APIs for making this sort of configuration [e.g., via ethtool] are already present in qede, but the current configuration flow in qed doesn't respect it.
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit fe7cd2bfdac4d8739bc8665eef040e668e6b428f Author: Yuval Mintz Yuval.Mintz@qlogic.com Date: Fri Apr 22 08:41:03 2016 +0300
qed*: Conditions for changing link
There's some inconsistency in current logic determining whether the link settings of a given interface can be changed; I.e., in all modes other than the so-called `deault' mode the interfaces are forbidden from changing the configuration - but even this rule is not applied to all user APIs that may change the configuration.
Instead, let the core-module [qed] decide whether an interface can change the configuration by supporting a new API function. We also revise the current rule, allowing all interfaces to change their configurations while laying the infrastructure for future modes where an interface would be blocked from making such a configuration.
Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit f3e72109f04c36ee45e62c0e6e1323179287c3e4 Author: Yuval Mintz Yuval.Mintz@qlogic.com Date: Fri Apr 22 08:41:02 2016 +0300
qede: Add support for ethtool private flags
Adds a getter for the interfaces private flags. The only parameter currently supported is whether the interface is a coupled function [required for supporting 100g].
Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit d4967cf38fbd62467b8fb5cab63d7da1f5907ed7 Author: Yuval Mintz Yuval.Mintz@qlogic.com Date: Fri Apr 22 08:41:01 2016 +0300
qed*: Align statistics names
There's a difference in statsitics' names starting at qed and propagating to qede, where egress counters indicate ranges while ingress counters indiciate high-end. Align all statistcs to follow the same conventions - name indicates range.
Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 960a26282f5b1f084313c59d22f76026e6637995 Author: Eric Dumazet edumazet@google.com Date: Thu Apr 21 22:27:32 2016 -0700
net: better drop monitoring in ip{6}_recv_error()
We should call consume_skb(skb) when skb is properly consumed, or kfree_skb(skb) when skb must be dropped in error case.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0aea76d35c9651d55bbaf746e7914e5f9ae5a25d Author: Eric Dumazet edumazet@google.com Date: Thu Apr 21 22:13:01 2016 -0700
tcp: SYN packets are now simply consumed
We now have proper per-listener but also per network namespace counters for SYN packets that might be dropped.
We replace the kfree_skb() by consume_skb() to be drop monitor [1] friendly, and remove an obsolete comment. FastOpen SYN packets can carry payload in them just fine.
[1] perf record -a -g -e skb:kfree_skb sleep 1; perf report
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1bc7fe64b60b40d50e42ba4bb870bbfb95d64e21 Merge: e7157f2 d4f90d9 Author: David S. Miller davem@davemloft.net Date: Mon Apr 25 15:12:06 2016 -0400
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 10GbE Intel Wired LAN Driver Updates 2016-04-25
This series contains updates to ixgbe and ixgbevf.
Emil provides several patches, starting with the consolidation of the logic behind configuring spoof checking. Fixed an issue which was causing link issues for backplane devices because x550em_a/x devices did not have a default value for mac->ops.setup_link. Refactored the ethtool stats to bring the logic closer to how ixgbe handles stats and sets up per-queue stats for ixgbevf.
Mark adds a new register to wait for previous register writes to complete before issuing a register read, which is needed when slower links are in use. Fixed the flow control setup for x550em_a, the incorrect fc_setup function was being used.
Don added a workaround for empty SFP+ cage crosstalk, since on some systems the crosstalk could lead to link flap on empty SFP+ cages.
Jake converts ixgbe and ixgbevf to use the BIT() macro.
Alex Duyck adds support for partial GSO segmentation in the case of tunnels for ixgbe and ixgbevf. Then preps for HyperV by moving the API negotiation into mac_ops.
Arnd Bergmann provides a fix for the ARM compile warnings in linux-next by converting the use of a udelay() to msleep(). ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit e7157f28ced492accf6e665ba0f748162757779f Merge: d296ba6 2dad624 Author: David S. Miller davem@davemloft.net Date: Mon Apr 25 15:09:12 2016 -0400
Merge branch 'nla_align-set-2'
Nicolas Dichtel says:
==================== netlink: align attributes when needed (patchset #2)
This is the continuation (series #2) of the work done to align netlink attributes when these attributes contain some 64-bit fields.
In patch #3, I didn't modify the function ila_encap_nlsize(). I was waiting feedback for this patch: http://patchwork.ozlabs.org/patch/613766/ If it's approved, there will be an update to switch nla_total_size() to nla_total_size_64bit() after the merge of net in net-next. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 2dad624e6dd65c6048a9bbe0e16559fce182c87c Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:22 2016 +0200
wireless: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit cbdeafd7e18b77d147fc1f6c000d4126e53d48bb Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:21 2016 +0200
netfilter/ipvs: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit a558da0916b90c330940a106105d0a6a67cb77f7 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:20 2016 +0200
ieee802154: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1c714a92833674c040e03be067accfb2b322221e Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:19 2016 +0200
l2tp: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 12a0faa3bd76157b9dc096758d6818ff535e4586 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:18 2016 +0200
bridge: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0238b7204b7ff1bad1d2d4489f010d670cbd89f2 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:17 2016 +0200
ovs: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit f13a82d87b21a3b7c2c3e3c75fe9cf810c332a09 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:16 2016 +0200
ipv6: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2a51c1e8ecdcedfcb6f84efb3756822d0d0dfb36 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:15 2016 +0200
sched: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 343a6d8e4955f298206d83ae764acf60d146b898 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Mon Apr 25 10:25:14 2016 +0200
rtnl: use nla_put_u64_64bit()
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit ffc03c331a1e7cafac3beb4f89c40fa7d6213d6e Author: Bjorn Andersson bjorn.andersson@linaro.org Date: Mon Apr 18 22:00:56 2016 -0700
wcn36xx: Fill in capability list
Fill in the capability list with more values from the downstream driver.
Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 23c2aabb93c9c8efb7b8991707e2db59f7346783 Author: Bjorn Andersson bjorn.andersson@linaro.org Date: Mon Apr 18 22:00:55 2016 -0700
wcn36xx: Correct remove bss key response encoding
The WCN36XX_HAL_RMV_BSSKEY_RSP carries a single u32 with "status", so we can use the standard status check function for decoding the result.
This is the last user of the v2 status checker, so remove the struct and helper function.
Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 5443918d050a1a1e5766544e3b895e98671adeef Author: Bjorn Andersson bjorn.andersson@linaro.org Date: Mon Apr 18 22:00:54 2016 -0700
wcn36xx: Delete BSS before idling link
When disabling the beacon we must delete the bss before idling the link.
Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6770559b8f614d3569ced7a7e3a8e846115e77af Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:53 2016 -0700
wcn36xx: Use correct command struct for EXIT_BMPS_REQ
EXIT_BMPS_REQ was using the command struct for ENTER_BMPS_REQ. I spotted this when looking at command dumps.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 20a779ede344a0b9778b7d5d9af76453d14474fc Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:52 2016 -0700
wcn36xx: Implement multicast filtering
Pass the multicast list to FW.
This patch also adds a way to build the smd command in place. This is needed because the MC list command is too big for the stack.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com [bjorn: dropped FIF_PROMISC_IN_BSS usage] Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 043ce546190243bd9de05dbb6c82c9099b01a3a2 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:51 2016 -0700
wcn36xx: Track association state
Knowing the association state is needed for mc filtering.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 2716a8ac655f17d17a7040f99f306a6244b08802 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:50 2016 -0700
wcn36xx: Clear encrypt_type when deleting bss key
This fixes a problem connecting to an open network after being connected to an encrypted network.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6d9cf123cd79277c65605faff8d25dbdd1b6ca64 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:49 2016 -0700
wcn36xx: Use allocated self sta index instead of hard coded
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit df98c3294bdf1fc3094f5466accf6423ce968a74 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:48 2016 -0700
wcn36xx: Copy all members in config_sta v1 conversion
When converting to version 1 of the config_sta struct not all members where copied. This fixes the problem of multicast frames not being delivered on an encrypted network.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 16be1ac55944412e8d132b1db26f994b368c5742 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:47 2016 -0700
wcn36xx: Parse trigger_ba response properly
This message does not follow the canonical format and needs it's own parser.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 25a44da26f2901308440a047b27a3a0054ea4a71 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:46 2016 -0700
wcn36xx: Remove sta pointer in private vif struct
This does not work with multiple sta's in a vif.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 81c69263757788d77537fefdd9a55b05ed83c87b Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:45 2016 -0700
wcn36xx: Fetch private sta data from sta entry instead of from vif
For consistency with other code.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit a92e4696292199714d47d8e52c4bf0318324f77f Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:44 2016 -0700
wcn36xx: Add helper macros to cast sta to priv
While poking at this I also change two related things. I rename one variable to make the names consistent. I also move one assignment of priv_sta to the declaration to save a few lines.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 90023c034fefe51cf67c719065434b0e43e9baf9 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:43 2016 -0700
wcn36xx: Use define for invalid index and fix typo
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 657a49be13eda5a3befc161d1d499d413c348762 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:42 2016 -0700
wcn36xx: Use consistent name for private vif
Some code used priv_vif and some used vif_priv. Convert all to vif_priv for consistency.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit ce75877f6c3da01cd5efe41683dd32beee1b4b33 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:41 2016 -0700
wcn36xx: Add helper macros to cast vif to private vif and vice versa
Makes the code a little easier to read.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 91c3eeba45e13ab7edfb50610df8672d52809394 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:40 2016 -0700
wcn36xx: Pad TIM PVM if needed
The wcn36xx FW expects a fixed size TIM PVM in the beacon template. If supplied with a shorter than expected PVM it will overwrite the IE following the TIM.
Squashed with fix from Jason Mobarak jam@cozybit.com: Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh beaconing. The field tim_off is always 0 for mesh mode, and thus pvm_len (referring to the TIM length field) and pad are both incorrectly calculated. Thus, msg_body.beacon_length is incorrectly calculated for mesh mode. Fix this.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com Signed-off-by: Jason Mobarak jam@cozybit.com [bjorn: squashed in Jason's fixup] Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 25d217d6e0723481bf90db1d8be02ab475d16002 Author: Pontus Fuchs pontus.fuchs@gmail.com Date: Mon Apr 18 22:00:39 2016 -0700
wcn36xx: Clean up wcn36xx_smd_send_beacon
Needed for coming improvements. No functional changes.
Signed-off-by: Pontus Fuchs pontus.fuchs@gmail.com [bjorn: restored BEACON_TEMPLATE_SIZE define to 0x180] Signed-off-by: Bjorn Andersson bjorn.andersson@linaro.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 0f9edcdd88a993914fa1d1dc369b35dc503979db Author: Vittorio Gambaletta (VittGam) linux-wireless@vittgam.net Date: Mon Apr 11 04:48:55 2016 +0200
ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.
The Wistron DNMA-92 and Compex WLM200NX have inverted LED polarity (active high instead of active low).
The same PCI Subsystem ID is used by both cards, which are based on the same Atheros MB92 design.
Cc: linux-wireless@vger.kernel.org Cc: ath9k-devel@qca.qualcomm.com Cc: ath9k-devel@lists.ath9k.org Cc: stable@vger.kernel.org Signed-off-by: Vittorio Gambaletta linuxbugs@vittgam.net Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit cd84042ce9040ad038e958bc67a46fcfc015c736 Author: Vittorio Gambaletta (VittGam) linux-wireless@vittgam.net Date: Mon Apr 11 04:48:54 2016 +0200
ath9k: Add a module parameter to invert LED polarity.
The LED can be active high instead of active low on some hardware.
Add the led_active_high module parameter. It defaults to -1 to obey platform data as before.
Setting the parameter to 1 or 0 will force the LED respectively active high or active low.
Cc: linux-wireless@vger.kernel.org Cc: ath9k-devel@qca.qualcomm.com Cc: ath9k-devel@lists.ath9k.org Cc: stable@vger.kernel.org Signed-off-by: Vittorio Gambaletta linuxbugs@vittgam.net Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit d296ba60d8e2de23a350796a567a3aa90fe1cb6e Author: Craig Gallek kraig@google.com Date: Mon Apr 25 10:42:12 2016 -0400
soreuseport: Resolve merge conflict for v4/v6 ordering fix
d894ba18d4e4 ("soreuseport: fix ordering for mixed v4/v6 sockets") was merged as a bug fix to the net tree. Two conflicting changes were committed to net-next before the above fix was merged back to net-next: ca065d0cf80f ("udp: no longer use SLAB_DESTROY_BY_RCU") 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood")
These changes switched the datastructure used for TCP and UDP sockets from hlist_nulls to hlist. This patch applies the necessary parts of the net tree fix to net-next which were not automatic as part of the merge.
Fixes: 1602f49b58ab ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Craig Gallek kraig@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5e91f6ce4c584d231763437a3ea3aded8e672363 Author: Eric Dumazet edumazet@google.com Date: Mon Apr 25 06:34:09 2016 -0700
sock: relax WARN_ON() in sock_owned_by_user()
Valdis reported tons of stack dumps caused by WARN_ON() in sock_owned_by_user()
This test needs to be relaxed if/when lockdep disables itself.
Note that other lockdep_sock_is_held() callers are all from rcu_dereference_protected() sections which already are disabled if/when lockdep has been disabled.
Fixes: fafc4e1ea1a4 ("sock: tigthen lockdep checks for sock_owned_by_user") Reported-by: Valdis Kletnieks Valdis.Kletnieks@vt.edu Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit d4f90d9dca26efef7a1112a8f4258c90b73bb37f Author: Arnd Bergmann arnd@arndb.de Date: Sat Apr 16 22:35:08 2016 +0200
ixgbe: use msleep for long delays
The newly added x550em_a support causes a link failure on ARM because of an overly long time passed into udelay():
ERROR: "__bad_udelay" [drivers/net/ethernet/intel/ixgbe/ixgbe.ko] undefined!
There are multiple variants of the ixgbe_acquire_swfw_sync_*() function, and the other ones all use msleep(), so we can safely assume that all callers are allowed to sleep, which makes msleep() a better replacement than mdelay().
Signed-off-by: Arnd Bergmann arnd@arndb.de Fixes: 49425dfc7451 ("ixgbe: Add support for x550em_a 10G MAC type") Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 7921f4dc4c36e736d7a5b45dfa7b6a755a4fc012 Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 20:37:15 2016 -0400
ixgbevf: Move API negotiation function into mac_ops
This patch moves API negotiation into mac_ops. The general idea here is that with HyperV on the way we need to make certain that anything that will have different versions between HyperV and a standard VF needs to be abstracted enough so that we can have a separate function between the two so we can avoid changes in one breaking something in the other.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b83e30104bd9635765c562bd46b2e436350bd652 Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 17:19:31 2016 -0400
ixgbe/ixgbevf: Add support for GSO partial
This patch adds support for partial GSO segmentation in the case of tunnels. Specifically with this change the driver an perform segmentation as long as the frame either has IPv6 inner headers, or we are allowed to mangle the IP IDs on the inner header. This is needed because we will not be modifying any fields from the start of the start of the outer transport header to the start of the inner transport header as we are treating them like they are just a block of IP options.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 8d055cc0c8be92cd6a77193460117f0ab0a05286 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:24 2016 -0700
ixgbevf: make use of BIT() macro to avoid shift of signed values
Also cleanup a case where we're bit shifting a value into place, and use an unsigned constant. Make use of the unsigned postfix in places where BIT() macro is not appropriate.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3e973dc4b93da06e38b263c9bd7e239d8f3f251f Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:23 2016 -0700
ixgbe: resolve shift of negative value warning
Make use of GENMASK instead of open coding the equivalent operation incorrectly.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b4f47a483045a6e6b31be8ade76cdfef7091f18b Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Apr 13 16:08:22 2016 -0700
ixgbe: use BIT() macro
Several areas of ixgbe were written before widespread usage of the BIT(n) macro. With the impending release of GCC 6 and its associated new warnings, some usages such as (1 << 31) have been noted within the ixgbe driver source. Fix these wholesale and prevent future issues by simply using BIT macro instead of hand coded bit shifts.
Also fix a few shifts that are shifting values into place by using the 'u' prefix to indicate unsigned. It doesn't strictly matter in these cases because we're not shifting by too large a value, but these are all unsigned values and should be indicated as such.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4319a7976722f6925b5bbbdac417d87a0cbde859 Author: Don Skidmore donald.c.skidmore@intel.com Date: Tue Apr 12 19:25:10 2016 -0400
ixgbe: Add work around for empty SFP+ cage crosstalk
It is possible on some systems that crosstalk could lead to link flap on empty SFP+ cages. A new NVM bit was defined to let SW know it needs to implement the work around which consists of verifying that there is a module in the cage before acting on the LSC.
Signed-off-by: Don Skidmore donald.c.skidmore@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a0254a70b4f91396ad04b1225dd7c10a680d38ff Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 8 16:19:29 2016 -0700
ixgbe: Use correct FC setup function for x550em_a
Somehow the wrong fc_setup function was used for x550em_a, so correct that. Also set setup_link to NULL as its value is determined later, just like it is with X550EM_x.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a02a5a53418a6039893f5d5a9373cf18080fded2 Author: Emil Tantilov emil.s.tantilov@intel.com Date: Thu Apr 7 15:58:44 2016 -0700
ixgbevf: add support for per-queue ethtool stats
Implement per-queue statistics for packets, bytes and busy poll specific counters.
Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d72d6c19b583afc09ace22baf80b29b11139a8f3 Author: Emil Tantilov emil.s.tantilov@intel.com Date: Thu Apr 7 15:58:39 2016 -0700
ixgbevf: refactor ethtool stats handling
This brings the logic closer to how we handle the stats in ixgbe and it sets us up for introducing per-queue stats.
Use IXGBEVF_STAT and IXGBEVF_NETDEV_STAT for accessing the driver and netdev stats respectively. This way we don't have to calculate the stats based on register values which could lead to the counters not being initialized properly when the interface is down.
IXGBEVF_QUEUE_STATS_LEN is set to include the number of queues.
Also some defines were renamed to use the IXGBEVF prefix.
Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 2f2219bea21118511c23d24dba5f2145f870a7db Author: Mark Rustad mark.d.rustad@intel.com Date: Thu Apr 7 10:43:50 2016 -0700
ixgbe: Add register wait for slow links
Use a new register to wait for previous register writes to complete before issuing a register read. This is needed when slower links are in use.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 15cfd40771e18a4e9b788c64c9db2606f958b93d Author: Haiyang Zhang haiyangz@microsoft.com Date: Thu Apr 21 16:13:01 2016 -0700
hv_netvsc: Fix the list processing for network change event
RNDIS_STATUS_NETWORK_CHANGE event is handled as two "half events" -- media disconnect & connect. The second half should be added to the list head, not to the tail. So all events are processed in normal order.
Signed-off-by: Haiyang Zhang haiyangz@microsoft.com Reviewed-by: K. Y. Srinivasan kys@microsoft.com Reviewed-by: Vitaly Kuznetsov vkuznets@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2a9ed5d1fc5e7e88a22da2d85bbaf6fc5b4c2fb8 Author: Sridhar Samudrala sridhar.samudrala@intel.com Date: Fri Apr 1 10:34:38 2016 -0700
ixgbe: make 'action' field in struct ixgbe_fdir_filter a u64 value
This field is used to record the RX queue index for a redirect action passed via ring_cookie field in struct ethtool_rx_flow_spec which is a u64 value.
For ex: after adding a filter rule to redirect to a VF using ethtool # echo 4 > /sys/class/net/p4p1/device/sriov_numvfs # ethtool -N p4p1 flow-type ip4 src-ip 192.168.0.1 action 0x100000000
querying for the rule shows the Action as 'Direct to queue 0'
# ethtool -n p4p1 4 RX rings available Total 1 rules
Filter: 2045 Rule Type: Raw IPv4 Src IP addr: 192.168.0.1 mask: 0.0.0.0 Dest IP addr: 0.0.0.0 mask: 255.255.255.255 TOS: 0x0 mask: 0xff Protocol: 0 mask: 0xff L4 bytes: 0x0 mask: 0xffffffff VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x0 mask: 0xffff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 0
With this fix, ethtool will report the right queue index even for VFs. Action: Direct to queue 4294967296
Here 4294967296 corresponds to 0x100000000. We need to update 'ethtool' to report the queue index as a Hex value so that it is more user friendly and matches with the 'action' value that is passed when adding the rule.
Signed-off-by: Sridhar Samudrala sridhar.samudrala@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4695886c644e48a02ca9d4c146a7ec4de8f2d2d8 Author: Emil Tantilov emil.s.tantilov@intel.com Date: Thu Mar 24 09:58:40 2016 -0700
ixgbe: fix default mac->ops.setup_link for X550EM
X550EM_a/x did not have a default value for mac->ops.setup_link which was causing link issues for backplane devices.
This patch sets mac->ops.setup_link to ixgbe_setup_mac_link_X540 for X550EM_a/x which is also default for X550. This will result in mac->ops.setup_link calling the link setup function for the respective PHY type in case we do not need a special function to deal with it.
Reported-by: Ken Cox jkc@redhat.com Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d3dec7c7c03351ae006f698501b523e7b1a38b3d Author: Emil Tantilov emil.s.tantilov@intel.com Date: Fri Mar 18 16:11:19 2016 -0700
ixgbe: set VLAN spoof checking unconditionally
Previously the PF driver would only set VLAN spoof checking if the VF had created VLANs. This was done by setting and checking a counter (vlan_count) whenever a VLAN was created by the VF. However it is possible for the vlan_count to be !=0 while there are no VLANs assigned to the VF due to the count incrementing every time a VLAN 0 is added on ifdown/up, which resulted in VLAN spoofing always being set for those VFs.
This patch cleans up the logic by unconditionally setting VLAN based on how the VF is configured (via ip link set ethX vf Y spoofchk on/off). This change also resolves an issue where the VLAN spoofing can remain set even after being disabled by the user due to the driver enabling VLAN spoof checking every time a VLAN is added to the VF, but would only allow changes in the setting if vlan_count != 0.
Also default_vf_vlan_id and vlans_enabled were removed from the vf_data_storage structure since they are not being used in the driver.
Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 77f192af721440a9d91365438be6ecb98edd0310 Author: Emil Tantilov emil.s.tantilov@intel.com Date: Fri Mar 18 16:11:14 2016 -0700
ixgbe: consolidate the configuration of spoof checking
Consolidate the logic behind configuring spoof checking:
Move the setting of the MAC, VLAN and Ethertype spoof checking into ixgbe_ndo_set_vf_spoofchk().
Change ixgbe_set_mac_anti_spoofing() to set MAC spoofing per VF similar to the VLAN and Ethertype functions - this allows us to call the helper functions in ixgbe_ndo_set_vf_spoofchk() for all spoof check types and only disable MAC spoof checking when creating MACVLAN.
Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 10d3be569243def8d92ac3722395ef5a59c504e6 Author: Eric Dumazet edumazet@google.com Date: Thu Apr 21 10:55:23 2016 -0700
tcp-tso: do not split TSO packets at retransmit time
Linux TCP stack painfully segments all TSO/GSO packets before retransmits.
This was fine back in the days when TSO/GSO were emerging, with their bugs, but we believe the dark age is over.
Keeping big packets in write queues, but also in stack traversal has a lot of benefits. - Less memory overhead, because write queues have less skbs - Less cpu overhead at ACK processing. - Better SACK processing, as lot of studies mentioned how awful linux was at this ;) - Less cpu overhead to send the rtx packets (IP stack traversal, netfilter traversal, drivers...) - Better latencies in presence of losses. - Smaller spikes in fq like packet schedulers, as retransmits are not constrained by TCP Small Queues.
1 % packet losses are common today, and at 100Gbit speeds, this translates to ~80,000 losses per second. Losses are often correlated, and we see many retransmit events leading to 1-MSS train of packets, at the time hosts are already under stress.
Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Yuchung Cheng ycheng@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8cee83dd29dea4e7d27fda3b170381059f628868 Author: Parthasarathy Bhuvaragan parthasarathy.bhuvaragan@ericsson.com Date: Thu Apr 21 15:51:13 2016 +0200
tipc: fix stale links after re-enabling bearer
Commit 42b18f605fea ("tipc: refactor function tipc_link_timeout()"), introduced a bug which prevents sending of probe messages during link synchronization phase. This leads to hanging links, if the bearer is disabled/enabled after links are up.
In this commit, we send the probe messages correctly.
Fixes: 42b18f605fea ("tipc: refactor function tipc_link_timeout()") Acked-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: Parthasarathy Bhuvaragan parthasarathy.bhuvaragan@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6a74c1965ac8128da5feadccf739456c6586ad91 Merge: 11afbff 2de8023 Author: David S. Miller davem@davemloft.net Date: Sun Apr 24 14:06:56 2016 -0400
Merge branch 'tcp-tcstamp_ack-frag-coalesce'
Martin KaFai Lau says:
==================== tcp: Handle txstamp_ack when fragmenting/coalescing skbs
This patchset is to handle the txstamp-ack bit when fragmenting/coalescing skbs.
The second patch depends on the recently posted series for the net branch: "tcp: Merge timestamp info when coalescing skbs"
A BPF prog is used to kprobe to sock_queue_err_skb() and print out the value of serr->ee.ee_data. The BPF prog (run-able from bcc) is attached here:
BPF prog used for testing: ~~~~~
from __future__ import print_function from bcc import BPF
bpf_text = """
int trace_err_skb(struct pt_regs *ctx) { struct sk_buff *skb = (struct sk_buff *)ctx->si; struct sock *sk = (struct sock *)ctx->di; struct sock_exterr_skb *serr; u32 ee_data = 0;
if (!sk || !skb) return 0;
serr = SKB_EXT_ERR(skb); bpf_probe_read(&ee_data, sizeof(ee_data), &serr->ee.ee_data); bpf_trace_printk("ee_data:%u\n", ee_data);
return 0; }; """
b = BPF(text=bpf_text) b.attach_kprobe(event="sock_queue_err_skb", fn_name="trace_err_skb") print("Attached to kprobe") b.trace_print() ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 2de8023e7bb288e0bfbe0325a7690d32dc670873 Author: Martin KaFai Lau kafai@fb.com Date: Tue Apr 19 22:50:48 2016 -0700
tcp: Merge txstamp_ack in tcp_skb_collapse_tstamp
When collapsing skbs, txstamp_ack also needs to be merged.
Retrans Collapse Test: ~~~~~~ 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
0.200 write(4, ..., 730) = 730 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 730) = 730 +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0 0.200 write(4, ..., 11680) = 11680
0.200 > P. 1:731(730) ack 1 0.200 > P. 731:1461(730) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:13141(4380) ack 1
0.300 < . 1:1(0) ack 1 win 257 <sack 1461:2921,nop,nop> 0.300 < . 1:1(0) ack 1 win 257 <sack 1461:4381,nop,nop> 0.300 < . 1:1(0) ack 1 win 257 <sack 1461:5841,nop,nop> 0.300 > P. 1:1461(1460) ack 1 0.400 < . 1:1(0) ack 13141 win 257
BPF Output Before: ~~~~~ <No output due to missing SCM_TSTAMP_ACK timestamp>
BPF Output After: ~~~~~ <...>-2027 [007] d.s. 79.765921: : ee_data:1459
Sacks Collapse Test: ~~~~~ 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
0.200 write(4, ..., 1460) = 1460 +0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 13140) = 13140 +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0
0.200 > P. 1:1461(1460) ack 1 0.200 > . 1461:8761(7300) ack 1 0.200 > P. 8761:14601(5840) ack 1
0.300 < . 1:1(0) ack 1 win 257 <sack 1461:14601,nop,nop> 0.300 > P. 1:1461(1460) ack 1 0.400 < . 1:1(0) ack 14601 win 257
BPF Output Before: ~~~~~ <No output due to missing SCM_TSTAMP_ACK timestamp>
BPF Output After: ~~~~~ <...>-2049 [007] d.s. 89.185538: : ee_data:14599
Signed-off-by: Martin KaFai Lau kafai@fb.com Cc: Eric Dumazet edumazet@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Soheil Hassas Yeganeh soheil@google.com Cc: Willem de Bruijn willemb@google.com Cc: Yuchung Cheng ycheng@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Tested-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b51e13faf73fcc799a41ed085069f07203d8e7b7 Author: Martin KaFai Lau kafai@fb.com Date: Tue Apr 19 22:50:47 2016 -0700
tcp: Carry txstamp_ack in tcp_fragment_tstamp
When a tcp skb is sliced into two smaller skbs (e.g. in tcp_fragment() and tso_fragment()), it does not carry the txstamp_ack bit to the newly created skb if it is needed. The end result is a timestamping event (SCM_TSTAMP_ACK) will be missing from the sk->sk_error_queue.
This patch carries this bit to the new skb2 in tcp_fragment_tstamp().
BPF Output Before: ~~~~~~ <No output due to missing SCM_TSTAMP_ACK timestamp>
BPF Output After: ~~~~~~ <...>-2050 [000] d.s. 100.928763: : ee_data:14599
Packetdrill Script: ~~~~~~ +0 `sysctl -q -w net.ipv4.tcp_min_tso_segs=10` +0 `sysctl -q -w net.ipv4.tcp_no_metrics_save=1` +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 +0 bind(3, ..., ...) = 0 +0 listen(3, 1) = 0
0.100 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 0.100 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 7> 0.200 < . 1:1(0) ack 1 win 257 0.200 accept(3, ..., ...) = 4 +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
+0 setsockopt(4, SOL_SOCKET, 37, [2688], 4) = 0 0.200 write(4, ..., 14600) = 14600 +0 setsockopt(4, SOL_SOCKET, 37, [2176], 4) = 0
0.200 > . 1:7301(7300) ack 1 0.200 > P. 7301:14601(7300) ack 1
0.300 < . 1:1(0) ack 14601 win 257
0.300 close(4) = 0 0.300 > F. 14601:14601(0) ack 1 0.400 < F. 1:1(0) ack 16062 win 257 0.400 > . 14602:14602(0) ack 2
Signed-off-by: Martin KaFai Lau kafai@fb.com Cc: Eric Dumazet edumazet@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Soheil Hassas Yeganeh soheil@google.com Cc: Willem de Bruijn willemb@google.com Cc: Yuchung Cheng ycheng@google.com Acked-by: Soheil Hassas Yeganeh soheil@google.com Tested-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 11afbff86168bc2ce11ae9d64ff687567a2352de Merge: 8d9ea16 a163f2cb Author: David S. Miller davem@davemloft.net Date: Sun Apr 24 00:12:08 2016 -0400
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says:
==================== Netfilter updates for net-next
The following patchset contains Netfilter updates for your net-next tree, mostly from Florian Westphal to sort out the lack of sufficient validation in x_tables and connlabel preparation patches to add nf_tables support. They are:
1) Ensure we don't go over the ruleset blob boundaries in mark_source_chains().
2) Validate that target jumps land on an existing xt_entry. This extra sanitization comes with a performance penalty when loading the ruleset.
3) Introduce xt_check_entry_offsets() and use it from {arp,ip,ip6}tables.
4) Get rid of the smallish check_entry() functions in {arp,ip,ip6}tables.
5) Make sure the minimal possible target size in x_tables.
6) Similar to #3, add xt_compat_check_entry_offsets() for compat code.
7) Check that standard target size is valid.
8) More sanitization to ensure that the target_offset field is correct.
9) Add xt_check_entry_match() to validate that matches are well-formed.
10-12) Three patch to reduce the number of parameters in translate_compat_table() for {arp,ip,ip6}tables by using a container structure.
13) No need to return value from xt_compat_match_from_user(), so make it void.
14) Consolidate translate_table() so it can be used by compat code too.
15) Remove obsolete check for compat code, so we keep consistent with what was already removed in the native layout code (back in 2007).
16) Get rid of target jump validation from mark_source_chains(), obsoleted by #2.
17) Introduce xt_copy_counters_from_user() to consolidate counter copying, and use it from {arp,ip,ip6}tables.
18,22) Get rid of unnecessary explicit inlining in ctnetlink for dump functions.
19) Move nf_connlabel_match() to xt_connlabel.
20) Skip event notification if connlabel did not change.
21) Update of nf_connlabels_get() to make the upcoming nft connlabel support easier.
23) Remove spinlock to read protocol state field in conntrack. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 8d9ea1606f6c3a1046abae5c2c85eb0e02e43db3 Merge: 1602f49 80df554 Author: David S. Miller davem@davemloft.net Date: Sat Apr 23 20:13:29 2016 -0400
Merge branch 'nla_align-more'
Nicolas Dichtel says:
==================== netlink: align attributes when needed (patchset #1)
This is the continuation of the work done to align netlink attributes when these attributes contain some 64-bit fields.
David, if the third patch is too big (or maybe the series), I can split it. Just tell me what you prefer. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 80df554275c21edca22ece02448bdb378c2ee9f1 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:24 2016 +0200
taskstats: use the libnl API to align nlattr on 64-bit
Goal of this patch is to use the new libnl API to align netlink attribute when needed. The layout of the netlink message will be a bit different after the patch, because the padattr (TASKSTATS_TYPE_STATS) will be inside the nested attribute instead of before it.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit de95c4a46a6e608444ccaf541087594553c7df11 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:23 2016 +0200
xfrm: align nlattr properly when needed
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 73520786b0793c612ef4de3e9addb2ec411bea20 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:22 2016 +0200
libnl: add nla_put_u64_64bit() helper
With this function, nla_data() is aligned on a 64-bit area.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2175d87cc3561c02e605bc8ac81ee5d875a51b9e Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:21 2016 +0200
libnl: nla_put_msecs(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 756a2f59b73cd6ed8afae3f6e8efb3fb829e4600 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:20 2016 +0200
libnl: nla_put_s64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area. In fact, there is no user of this function.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit e9bbe898cbe89b17ad3993c136aa13d0431cd537 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:19 2016 +0200
libnl: nla_put_net64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area.
The temporary function nla_put_be64_32bit() is removed in this patch.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit b46f6ded906ef0be52a4881ba50a084aeca64d7e Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:18 2016 +0200
libnl: nla_put_be64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area.
A temporary version (nla_put_be64_32bit()) is added for nla_put_net64(). This function is removed in the next patch.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit e7479122befd7026cf0fb3b3740f17ebd9c64d35 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:17 2016 +0200
libnl: nla_put_le64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area.
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 11a99573079e15f11499ae8d21b07e3e3257fff1 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Fri Apr 22 17:31:16 2016 +0200
libnl: fix help of _64bit functions
Fix typo and describe 'padattr'.
Fixes: 089bf1a6a924 ("libnl: add more helpers to align attributes on 64-bit") Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1602f49b58abcb0d34a5f0a29d68e7c1769547aa Merge: 22d37b6 5f44abd Author: David S. Miller davem@davemloft.net Date: Sat Apr 23 18:26:24 2016 -0400
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were two cases of simple overlapping changes, nothing serious.
In the UDP case, we need to add a hlist_add_tail_rcu() to linux/rculist.h, because we've moved UDP socket handling away from using nulls lists.
Signed-off-by: David S. Miller davem@davemloft.net
commit 5c0e03cd9f10d541b69b667a2b1b8980f196f432 Author: Johan Hedberg johan.hedberg@intel.com Date: Fri Apr 22 15:59:25 2016 +0300
Bluetooth: Add defines for SPI and I2C
Extend the set of possible HCI bus types with SPI and I2C.
Signed-off-by: Johan Hedberg johan.hedberg@intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit e9fc71649b5361b8ac608898342c8904167cb63d Author: Dan Carpenter dan.carpenter@oracle.com Date: Fri Apr 22 13:02:55 2016 +0300
Bluetooth: ath3k: Silence uninitialized variable warning
We could print an uninitialized value in the error message.
Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 22d37b6b0058365a80378ee6198d21e7f6c86327 Merge: 7f348a6 681e683 Author: David S. Miller davem@davemloft.net Date: Thu Apr 21 15:36:04 2016 -0400
Merge branch 'geneve-vxlan-deps'
Hannes Frederic Sowa says:
==================== net: network drivers should not depend on geneve/vxlan
This patchset removes the dependency of network drivers on vxlan or geneve, so those don't get autoloaded when the nic driver is loaded.
Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port are not called without rtnl lock. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 681e683ff30ada19f73c17c38a528528dd8824f1 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:48 2016 +0200
geneve: break dependency with netdev drivers
Equivalent to "vxlan: break dependency with netdev drivers", don't autoload geneve module in case the driver is loaded. Instead make the coupling weaker by using netdevice notifiers as proxy.
Cc: Jesse Gross jesse@kernel.org Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit b7aade15485a660cbf5161962c284131324a9534 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:47 2016 +0200
vxlan: break dependency with netdev drivers
Currently all drivers depend and autoload the vxlan module because how vxlan_get_rx_port is linked into them. Remove this dependency:
By using a new event type in the netdevice notifier call chain we proxy the request from the drivers to flush and resetup the vxlan ports not directly via function call but by the already existing netdevice notifier call chain.
I added a separate new event type, NETDEV_OFFLOAD_PUSH_VXLAN, to do so. We don't need to save those ids, as the event type field is an unsigned long and using specialized event types for this purpose seemed to be a more elegant way. This also comes in beneficial if in future we want to add offloading knobs for vxlan.
Cc: Jesse Gross jesse@kernel.org Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 50d65d78897ff9785b7debbdca0030967cd5772d Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:46 2016 +0200
qlcnic: protect qlicnic_attach_func with rtnl_lock
qlcnic_attach_func requires rtnl_lock to be held.
Cc: Dept-GELinuxNICDev@qlogic.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit b1f99a787e8239da3ea859709f5fb60b3fd02c13 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:45 2016 +0200
ixgbe: protect vxlan_get_rx_port in ixgbe_service_task with rtnl_lock
vxlan_get_rx_port requires rtnl_lock to be held.
Cc: Jeff Kirsher jeffrey.t.kirsher@intel.com Cc: Jesse Brandeburg jesse.brandeburg@intel.com Cc: Shannon Nelson shannon.nelson@intel.com Cc: Carolyn Wyborny carolyn.wyborny@intel.com Cc: Don Skidmore donald.c.skidmore@intel.com Cc: Bruce Allan bruce.w.allan@intel.com Cc: John Ronciak john.ronciak@intel.com Cc: Mitch Williams mitch.a.williams@intel.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 0c5c3252c43cc935bef05c2211fc7cb32facddf7 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:44 2016 +0200
mlx4: protect mlx4_en_start_port in mlx4_en_restart with rtnl_lock
mlx4_en_start_port requires rtnl_lock to be held.
Cc: Eugenia Emantayev eugenia@mellanox.com Cc: Yishai Hadas yishaih@mellanox.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 41419b9303f085e8912406140355e45230fed22f Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:43 2016 +0200
fm10k: protect fm10k_open in fm10k_io_resume with rtnl_lock
fm10k_open requires rtnl_lock to be held.
Cc: Jeff Kirsher jeffrey.t.kirsher@intel.com Cc: Jesse Brandeburg jesse.brandeburg@intel.com Cc: Shannon Nelson shannon.nelson@intel.com Cc: Carolyn Wyborny carolyn.wyborny@intel.com Cc: Don Skidmore donald.c.skidmore@intel.com Cc: Bruce Allan bruce.w.allan@intel.com Cc: John Ronciak john.ronciak@intel.com Cc: Mitch Williams mitch.a.williams@intel.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 08d9910c3408531473766ec4d8b288e8ee2fe500 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Mon Apr 18 21:19:42 2016 +0200
benet: be_resume needs to protect be_open with rtnl_lock
be_open calls down to functions which expects rtnl lock to be held.
Cc: Sathya Perla sathya.perla@broadcom.com Cc: Ajit Khaparde ajit.khaparde@broadcom.com Cc: Padmanabh Ratnakar padmanabh.ratnakar@broadcom.com Cc: Sriharsha Basavapatna sriharsha.basavapatna@broadcom.com Cc: Somnath Kotur somnath.kotur@broadcom.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 7f348a60762afd4cd0e4e7fa14cfa66331b7c30e Author: Alexander Duyck aduyck@mirantis.com Date: Wed Apr 20 16:51:00 2016 -0400
net: Add support for IP ID mangling TSO in cases that require encapsulation
This patch adds support for NETIF_F_TSO_MANGLEID if a given tunnel supports NETIF_F_TSO. This way if needed a device can then later enable the TSO with IP ID mangling and the tunnels on top of that device can then also make use of the IP ID mangling as well.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1df845be658edfaa7ca6c09a43fea551cb0565b9 Merge: b8fd789 5498440 Author: David S. Miller davem@davemloft.net Date: Thu Apr 21 15:09:06 2016 -0400
Merge branch 'mlx5-next'
Saeed Mahameed says:
==================== Mellanox 100G mlx5 driver receive path optimizations
Changes from V2: - Rebased to 46e7b8d8d53b ("net: dsa: kill circular reference with slave priv") - Updated: ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)") * Per Eric Dumazet comment we changed the driver memory handling scheme to work with order-0 pages rather than order-5 via split_page(). * This means that now a mlx5e rx skb can hold one or (more in case of HW LRO) skb frag each pointing to a 4K order-0 page rather than one frag with order-5 page. - Updated: ("net/mlx5e: Add fragmented memory support for RX multi packet WQE") * Code refactoring and code reuse due the split_page() mechanism, now the MPWQE and fragmented MPWQE handling almost look the same, and share most of the code. - In some cases we see 2%-3% packet rate degradation in comparison to the order-5 pages approach, due to split_page() cpu consumption, but still we do see 3%-10% improvement in comparison to the current linear SKB approach. - We do believe that now the driver memory scheme is significantly less vulnerable to the memory DOS attack Eric pointed at.
Changes from V1: - Rebased to efde611b0afa ("Merge branch 'nfp-next'") - Dropped: ("net/mlx5: Refactor mlx5_core_mr to mkey") Already merged into 4.6 from rdma tree. - Dropped: ("net/mlx5_core: Add ConnectX-5 to list of supported devices") Will be pushed to net as we want it in 4.6 release. - Dropped: ("net/mlx5e: Change RX moderation period to be based on CQE") Will be pushed in a later series with full software based adaptive moderation. - Added: ("net/mlx5e: Delay skb->data access") Small trivial optimization. - Updated: ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)") Changed Striding RQ defaults to: > NUM WQEs = 16 > Strides Per WQE = 1024 > Stride Size = 128 - Updated: ("net/mlx5e: Use napi_alloc_skb for RX SKB allocations") Consider the IP packet alignment already done in napi_alloc_skb.
Changes from V0: - Fixed a typo in commit message reported by Sergei - Align SKB fragments truesize to stride size - Use skb_add_rx_frag and remove the use of SKB_TRUESIZE - Fix: # MTTs alignment on Power PC - Fix: Free original (unaligned) pointer of MTT array - Use dev_alloc_pages and dev_alloc_page - Extend the stats.buff_alloc_err counter - Reform the copying of packet header into skb linear data - Add compiler hints for conditional statements - Prefetch skd->data prior to copying packet header into it - Rework: mlx5e_complete_rx_fragmented_mpwqe - Handle SKB fragments before linear data - Dropped ("net/mlx5e: Prefetch next RX CQE") for now - Added a small patch that Adds ConnectX-5 devices to the list of supported devices - Rebased to 1cdba5505555 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next")
This series includes Some RX modifications and optimizations for the mlx5 Ethernet driver.
From Rana, we have one patch that adds the support for Connectx-4 queue counters.
From Tariq, several patches that are centralized around improving RX path message rate, CPU and Memory utilization, in each patch commit message you will find the performance improvements numbers related to that specific patch.
In the 2nd patch we used a queue counter to report "out of buffer" dropped packet count, "Dropped packets due to lack of software resources"
3rd patch modifies the driver's to RSS default value to be spread along the close NUMA node cores only for better out of the box experience.
In the 4th and 5th patches we utilized the use of RX multi-packet WQE (Striding RQ) for better memory utilization especially in case of hardware LRO is enabled and for better message rate for small packets.
In the 6th and 7th patches we added a fallback mechanism to use fragmented memory when allocating large WQE strides fails, using UMR (User Memory Registration) and ICO (Internal Control Operations) SQs.
In the 8th to 11th patches we did some small modification which show some small extra improvements. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 54984407564ef6b35488f52654f828c17b9d6fa8 Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:19 2016 +0300
net/mlx5e: Add ethtool counter for RX buffer allocation failures
Counts the number of RX buffer allocation failures and shows it in ethtool statistics.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit e20a0db30454a07f03f3a34a79e9f35881cfaa9d Author: Saeed Mahameed saeedm@mellanox.com Date: Wed Apr 20 22:02:18 2016 +0300
net/mlx5e: Delay skb->data access
Move mlx5e_handle_csum and eth_type_trans to the end of mlx5e_build_rx_skb to gain some more time before accessing skb->data, to reduce cache misses.
Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1bfec31627bf9b351b93b8cef4520b90f48ca276 Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:17 2016 +0300
net/mlx5e: Remove redundant barrier
The bit-op operation one line before is an explicit barrier by itself.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit c5adb96f6c4a22aceff2e8220612c5b9239ffeb2 Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:16 2016 +0300
net/mlx5e: Use napi_alloc_skb for RX SKB allocations
Instead of netdev_alloc_skb, we use the napi_alloc_skb function which is designated to allocate skbuff's for RX in a channel-specific NAPI instance, and implies the IP packet alignment.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit bc77b240b3c57236cdcc08d64ca390655d3a16ff Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:15 2016 +0300
net/mlx5e: Add fragmented memory support for RX multi packet WQE
If the allocation of a linear (physically continuous) MPWQE fails, we allocate a fragmented MPWQE.
This is implemented via device's UMR (User Memory Registration) which allows to register multiple memory fragments into ConnectX hardware as a continuous buffer. UMR registration is an asynchronous operation and is done via ICO SQs.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d3c9bc2743dc95b273ed0e6a3394a71ca314813c Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:14 2016 +0300
net/mlx5e: Added ICO SQs
Added ICO (Internal Control Operations) SQ per channel to be used for driver internal operations such as memory registration for fragmented memory and nop requests upon ifconfig up.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 461017cb006aa1b39b0f647ae0ee2d9d84eef05b Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:13 2016 +0300
net/mlx5e: Support RX multi-packet WQE (Striding RQ)
Introduce the feature of multi-packet WQE (RX Work Queue Element) referred to as (MPWQE or Striding RQ), in which WQEs are larger and serve multiple packets each.
Every WQE consists of many strides of the same size, every received packet is aligned to a beginning of a stride and is written to consecutive strides within a WQE.
In the regular approach, each regular WQE is big enough to be capable of serving one received packet of any size up to MTU or 64K in case of device LRO is enabled, making it very wasteful when dealing with small packets or device LRO is enabled.
For its flexibility, MPWQE allows a better memory utilization (implying improvements in CPU utilization and packet rate) as packets consume strides according to their size, preserving the rest of the WQE to be available for other packets.
MPWQE default configuration: Num of WQEs = 16 Strides Per WQE = 2048 Stride Size = 64 byte
The default WQEs memory footprint went from 1024*mtu (~1.5MB) to 16 * 2048 * 64 = 2MB per ring. However, HW LRO can now be supported at no additional cost in memory footprint, and hence we turn it on by default and get an even better performance.
Performance tested on ConnectX4-Lx 50G. To isolate the feature under test, the numbers below were measured with HW LRO turned off. We verified that the performance just improves when LRO is turned back on.
* Netperf single TCP stream: - BW raised by 10-15% for representative packet sizes: default, 64B, 1024B, 1478B, 65536B.
* Netperf multi TCP stream: - No degradation, line rate reached.
* Pktgen: packet rate raised by 2-10% for traffic of different message sizes: 64B, 128B, 256B, 1024B, and 1500B.
* Pktgen: packet loss in bursts of small messages (64byte), single stream: - | num packets | packets loss before | packets loss after | 2K | ~ 1K | 0 | 8K | ~ 6K | 0 | 16K | ~13K | 0 | 32K | ~28K | 0 | 64K | ~57K | ~24K
As expected as the driver can receive as many small packets (<=64B) as the number of total strides in the ring (default = 2048 * 16) vs. 1024 (default ring size regardless of packets size) before this feature.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Achiad Shochat achiad@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2f48af128d9aa64dd4e8c6fe97491b0bde3681b2 Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:12 2016 +0300
net/mlx5e: Use function pointers for RX data path handling
In preparation for Striding RQ feature, which will need its own RX handlers. This patch does not change any functionality.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Achiad Shochat achiad@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d8c9660dac6287490ef450bc892593f05d364531 Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:11 2016 +0300
net/mlx5e: Use only close NUMA node for default RSS
Distribute default RSS table uniformly over the rings of the close NUMA node, instead of all available channels. This way we enforce the preference of close rings over far ones.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 593cf33829adfd3d5c75d42879cc42afded1b626 Author: Rana Shahout ranas@mellanox.com Date: Wed Apr 20 22:02:10 2016 +0300
net/mlx5e: Allocate set of queue counters per netdev
Connect all netdev RQs to this set of queue counters. Also, add an "rx_out_of_buffer" counter to ethtool, which indicates RX packet drops due to lack of receive buffers.
Signed-off-by: Rana Shahout ranas@mellanox.com Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 237cd218099ce96edf2890a49aa191b38b84c2fc Author: Tariq Toukan tariqt@mellanox.com Date: Wed Apr 20 22:02:09 2016 +0300
net/mlx5: Introduce device queue counters
A queue counter can collect several statistics for one or more hardware queues (QPs, RQs, etc ..) that the counter is attached to.
For Ethernet it will provide an "out of buffer" counter which collects the number of all packets that are dropped due to lack of software buffers.
Here we add device commands to alloc/query/dealloc queue counters.
Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Rana Shahout ranas@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b8fd789afb293002b11086e6ae417b7c523d2bdc Merge: c57107c c82f47e Author: David S. Miller davem@davemloft.net Date: Thu Apr 21 15:06:05 2016 -0400
Merge branch 'bcmsysport-napi-updates'
Florian Fainelli says:
==================== net: bcmsysport: utilize newer NAPI APIs
These two patches are very analoguous to what was already submitted for BCMGENET and switch the SYSTEMPORT driver to utilizing __napi_schedule_irqoff() and napi_complete_done for the RX NAPI context. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit c82f47efa021697722b1cfc84e48f72d45c9f5b2 Author: Florian Fainelli f.fainelli@gmail.com Date: Wed Apr 20 11:37:09 2016 -0700
net: bcmsysport: use napi_complete_done()
By using napi_complete_done(), we allow fine tuning of /sys/class/net/ethX/gro_flush_timeout for higher GRO aggregation efficiency for a Gbit NIC.
Check commit 24d2e4a50737 ("tg3: use napi_complete_done()") for details.
Signed-off-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit ba90950c94713f294e8778e891eef4143183957c Author: Florian Fainelli f.fainelli@gmail.com Date: Wed Apr 20 11:37:08 2016 -0700
net: bcmsysport: use __napi_schedule_irqoff()
Both bcm_sysport_tx_isr() and bcm_sysport_rx_isr() run in hard irq context, we do not need to block irq again.
Signed-off-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit c57107c7f59fe438f8c5bb0ce50af857505276b8 Merge: 732912d7 3d6b66c Author: David S. Miller davem@davemloft.net Date: Thu Apr 21 14:22:14 2016 -0400
Merge branch 'nlattr_align'
Nicolas Dichtel says:
==================== libnl: enhance API to ease 64bit alignment for attribute
Here is a proposal to add more helpers in the libnetlink to manage 64-bit alignment issues. Note that this series was only tested on x86 by tweeking CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS and adding some traces.
The first patch adds helpers for 64bit alignment and other patches use them.
We could also add helpers for nla_put_u64() and its variants if needed.
v1 -> v2: - remove patch #1 - split patch #2 (now #1 and #2) - add nla_need_padding_for_64bit() ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 3d6b66c1d1a8d348928996ca333730f258fbb838 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Thu Apr 21 18:58:27 2016 +0200
ip6mr: align RTA_MFC_STATS on 64-bit
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit a9a080422ef7b0c7e69925e4a1474ad93f0f0117 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Thu Apr 21 18:58:26 2016 +0200
ipmr: align RTA_MFC_STATS on 64-bit
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 58414d32a37e4c2f79da91aebc2d2365918a1562 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Thu Apr 21 18:58:25 2016 +0200
rtnl: use the new API to align IFLA_STATS*
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 089bf1a6a924b97a7e9f920bae6253a8ad581cf3 Author: Nicolas Dichtel nicolas.dichtel@6wind.com Date: Thu Apr 21 18:58:24 2016 +0200
libnl: add more helpers to align attributes on 64-bit
Signed-off-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 732912d727cd6deb3c1a05a8baa74b8ce8d510ac Author: Alexander Duyck aduyck@mirantis.com Date: Tue Apr 19 14:02:26 2016 -0400
veth: Update features to include all tunnel GSO types
This patch adds support for the checksum enabled versions of UDP and GRE tunnels. With this change we should be able to send and receive GSO frames of these types over the veth pair without needing to segment the packets.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit b1c20f0b97b4e565fa50cde1e6b44c2fd327a1e0 Author: Alexander Duyck aduyck@mirantis.com Date: Tue Apr 19 14:02:19 2016 -0400
netdev_features: Fold NETIF_F_ALL_TSO into NETIF_F_GSO_SOFTWARE
This patch folds NETIF_F_ALL_TSO into the bitmask for NETIF_F_GSO_SOFTWARE. The idea is to avoid duplication of defines since the only difference between the two was the GSO_UDP bit.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1ba64facae5739d91884f8f34f25fef1cb66d930 Author: Dan Carpenter dan.carpenter@oracle.com Date: Tue Apr 19 17:30:56 2016 +0300
geneve: testing the wrong variable in geneve6_build_skb()
We intended to test "err" and not "skb".
Fixes: aed069df099c ('ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb') Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Acked-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit f937572925d8d7beb5aca1cf180e8b9af623a903 Author: Peter Heise mail@pheise.de Date: Tue Apr 19 13:34:28 2016 +0200
NLA_BINARY misuse bug in HSR
Removed .type field from NLA to do proper length checking. Reported by Daniel Borkmann and Julia Lawall.
Signed-off-by: Peter Heise peter.heise@airbus.com Signed-off-by: David S. Miller davem@davemloft.net
commit b7de529c793c9131e58ddca37d49fd26866aa867 Author: Xin Long lucien.xin@gmail.com Date: Tue Apr 19 15:10:01 2016 +0800
net: use jiffies_to_msecs to replace EXPIRES_IN_MS in inet/sctp_diag
EXPIRES_IN_MS macro comes from net/ipv4/inet_diag.c and dates back to before jiffies_to_msecs() has been introduced.
Now we can remove it and use jiffies_to_msecs().
Suggested-by: Jakub Sitnicki jkbs@redhat.com Signed-off-by: Xin Long lucien.xin@gmail.com Acked-by: Jakub Sitnicki jkbs@redhat.com Acked-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 85b67bcb7e4a23ced05e7020bf5843b9857f6881 Author: Alexei Starovoitov ast@fb.com Date: Mon Apr 18 20:11:50 2016 -0700
perf, bpf: minimize the size of perf_trace_() tracepoint handler
move trace_call_bpf() into helper function to minimize the size of perf_trace_*() tracepoint handlers. text data bss dec hex filename 10541679 5526646 2945024 19013349 1221ee5 vmlinux_before 10509422 5526646 2945024 18981092 121a0e4 vmlinux_after
It may seem that perf_fetch_caller_regs() can also be moved, but that is incorrect, since ip/sp will be wrong.
bpf+tracepoint performance is not affected, since perf_swevent_put_recursion_context() is now inlined. export_symbol_gpl can also be dropped.
No measurable change in normal perf tracepoints.
Suggested-by: Steven Rostedt rostedt@goodmis.org Signed-off-by: Alexei Starovoitov ast@kernel.org Acked-by: Peter Zijlstra (Intel) peterz@infradead.org Acked-by: Steven Rostedt rostedt@goodmis.org Signed-off-by: David S. Miller davem@davemloft.net
commit c60c9840423f32117a5422511c53c39df0b4d1dd Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Mon Apr 18 18:24:04 2016 -0400
net: dsa: remove tag_protocol from dsa_switch
Having the tag protocol in dsa_switch_driver for setup time and in dsa_switch_tree for runtime is enough. Remove dsa_switch's one.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2dabf0c4d0348f6f0b1ce0e0efcbcedef6a72045 Merge: 10c9ead dc1b4c2 Author: David S. Miller davem@davemloft.net Date: Thu Apr 21 11:52:05 2016 -0400
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 100GbE Intel Wired LAN Driver Updates 2016-04-20
This series contains updates to fm10k only.
Jacob provides majority of the changes in this series, starting with the addition of helper functions to reduce code duplication and the amount of code indentation. Fixed the use or should we say abuse of the ethtool stats API, which could result in corrupt memory or misleading statistic output. Added the appropriate rtnl_lock() and rtnl_unlock() to avoid RCU warnings during AER events. Come to find out, the PTP/1588 support is not working with the current version of switch management software and possibly never worked, so just remove support for PTP/1588 for now. Fixed how error responses from the switch manager after a LPORT_MAP request are handled, originally which were silently being ignored. Fixed up code documentation to hopefully ease the code and comment comprehension. Fixed a possible NULL pointer dereference after a kcalloc(), where when writing a new default redirection table, and we needed to populate a new RSS table using ethtool_rxfh_indir_default(). We populate this table into a region of memory allocated using kcalloc() but never check it for NULL.
Alex adds support for bulk transmit cleanup for fm10k, like he did for all of our other drivers.
Ngai-Mint fixes a number of issues with the unicast and multicast address syncs. Where an issue would occur when the netdev is pre-configured to either multicast mode and is enabled for the first time. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 06d05463ee337e85e42c6073b6f2f46fbfb05b96 Author: Arnd Bergmann arnd@arndb.de Date: Mon Apr 18 23:59:31 2016 +0200
rtl8xxxu: hide unused tables
The references to some arrays in the rtl8xxxu driver were moved inside of an #ifdef, but the symbols remain outside, resulting in build warnings:
rtl8xxxu/rtl8xxxu.c:1506:33: error: 'rtl8188ru_radioa_1t_highpa_table' defined but not used rtl8xxxu/rtl8xxxu.c:1431:33: error: 'rtl8192cu_radioa_1t_init_table' defined but not used rtl8xxxu/rtl8xxxu.c:1407:33: error: 'rtl8192cu_radiob_2t_init_table' defined but not used rtl8xxxu/rtl8xxxu.c:1332:33: error: 'rtl8192cu_radioa_2t_init_table' defined but not used rtl8xxxu/rtl8xxxu.c:239:35: error: 'rtl8192c_power_base' defined but not used rtl8xxxu/rtl8xxxu.c:217:35: error: 'rtl8188r_power_base' defined but not used
This adds an extra #ifdef around them to shut up the warnings.
Signed-off-by: Arnd Bergmann arnd@arndb.de Fixes: 2fc0b8e5a17d ("rtl8xxxu: Add TX power base values for gen1 parts") Fixes: 4062b8ffec36 ("rtl8xxxu: Move PHY RF init into device specific functions") Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit dc1b4c2b88b976a7882922e55666b20e28477c57 Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Apr 7 08:52:53 2016 -0700
fm10k: fix incorrect IPv6 extended header checksum
Check for and handle IPv6 extended headers so that Tx checksum offload can be done. Also use skb_checksum_help for unexpected cases. This was originally discovered in ixgbe.
Reported-by: Mark Rustad mark.d.rustad@intel.com Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 86641094678a90af278d1f44c0e47f817c9ba46e Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Apr 7 08:21:21 2016 -0700
fm10k: consistently use Intel(R) for driver names
Update every header file and other locations to consistently use Intel(R) instead of just Intel. Also update copyright year of files which we modified.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 540a5d859010a239a99aba02a9fed7b255c0033e Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Apr 7 08:21:20 2016 -0700
fm10k: fix possible null pointer deref after kcalloc
When writing a new default redirection table, we needed to populate a new RSS table using ethtool_rxfh_indir_default. We populated this table into a region of memory allocated using kcalloc, but never checked this for NULL. Fix this by moving the default table generation into fm10k_write_reta. If this function is passed a table, use it. Otherwise, generate the default table using ethtool_rxfh_indir_default, 4 at at time.
Fixes: 0ea7fae44094 ("fm10k: use ethtool_rxfh_indir_default for default redirection table") Signed-off-by: Jacob Keller jacob.e.keller@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 11ec36a974f59c99e8a4ff7040026569a43ab567 Author: Ngai-Mint Kwan ngai-mint.kwan@intel.com Date: Fri Apr 1 16:17:39 2016 -0700
fm10k: Reset multicast mode when deleting lport
Deleting lport when multicast mode is configured to FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will result in generating orphaned multicast-group entries in the switch manager. Before deleting the lport, reset multicast mode to FM10K_XCAST_MODE_NONE to flush out these multicast-group entries.
Signed-off-by: Ngai-Mint Kwan ngai-mint.kwan@intel.com Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit fb6515c8f03bbfdc99cff156becd5e14df1dd601 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:38 2016 -0700
fm10k: update comment regarding reserved bits check
The original comment may be read incorrectly as referring to checking the *entire* length is zero. However, it merely checks only the reserved bits of both length and reserved in a small amount of code. Update the comment to indicate this is a clever trick and clearly spell out that it only checks the reserve bits.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5c69df8a33408c82ac633c521be0acf71a690d43 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:37 2016 -0700
fm10k: use different name than FM10K_VLAN_CLEAR for override bit
Use a new #define FM10K_VLAN_OVERRIDE even though we're using the exact same bit. The reason for this is clarity in the code, otherwise you can read FM10K_VLAN_CLEAR and think it should be removed. Also add a comment explaining why the FM10K_VLAN_OVERRIDE bit is set.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d057d9a9446636293b4884d1a0da6ad5a7ef4e13 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:36 2016 -0700
fm10k: use 8bit notation instead of 10bit notation for diagram
The diagram represents bit layout of the multi-bit VLAN update message format. Typically these diagrams are drawn using some power of 2 as the base, to more easily grasp where fields split. Although the numbers above can make it somewhat easy to understand which bit you're looking at, it makes the break points not line up. Re-draw the numbers using base 8, and mark the bit values every 8 bits at the top. This should make it more easy to grasp the table quickly.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4e160f2a59cec8f705583edfaa11ce5f3b3ef4a6 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:35 2016 -0700
fm10k: fix documentation of fm10k_tlv_parse_attr
fm10k_tlv_parse_attr is supposed to return FM10K_NOT_IMPLEMENTED for any TLV who's attribute id lies outside the range of results. It does not do this today. In addition, the documentation does not indicate that other attributes which are not implemented for a given TLV will be silently ignored. Fix this. Clean up the logic so that we don't rely on the fact that FM10K_NOT_IMPLEMENTED is greater than zero, as this can easily cause confusion.
A future extension could look into some way of reporting unknown TLVs in order to make issues more easily discoverable. We can't just return FM10K_NOT_IMPLEMENTED here because we don't want to drop the entire message if it has an unknown TLV.
While here, update the copyright year.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3417415c3a86d6bae8bfee495ce634f4d24e16b8 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:34 2016 -0700
fm10k: do not disable PCI device in fm10k_io_error_detected
fm10k_io_error_detected() does not need to call pci_disable_device(). In the cases where the reset needs to occur, the stack flow will result in calling fm10k_remove() which already disables the PCI device. If we leave the pci_disable_device(), we result in a warning about disabling an already disabled device.
Many PCI drivers do call pci_disable_device() in their .error_detected() routines, but it does not appear to be required. In addition, these drivers have a check "is_pci_enabled()" call in their remove routines, which is how they chose to handle the duplicate device disable.
This seems incorrect, since the PCI device structure is reference counted. It is very possible that the reference count for the PCI device could be greater than 1. In this case, you would remove the PCI device within the error_detected routine, reducing count to 1, then remove it again in the remove function, reducing it to zero. This would result in yet another disable somewhere else failing. Thus, we shouldn't be using is_pci_enabled() to check for this issue. Instead, just remove the extraneous pci_device_disable() found within the error_detected routine.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:33 2016 -0700
fm10k: correctly handle LPORT_MAP error
Currently, any error responses from the switch manager after an LPORT_MAP request are silently ignored. At most the mailbox message will be reported as an error. This can result in unexpected behavior when the switch manager has configured a port with zero bandwidth. Add support for reading the fm10k_swapi_error structure from LPORT_MAP responses.
If the message contains the necessary TLV and has a non-zero error code, report link down, clear the dglort_map, and delay the next get_host_state call by a reasonable delay. Also log an error message indicating that the LPORT_MAP request failed.
The delay ensures preventing an interrupt storm on the switch manager, and reduces the number of mailbox messages we send in this scenario drastically.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 8998763a7b57583ef2e07f68ea6a7d05bcfc1cfa Author: Ngai-Mint Kwan ngai-mint.kwan@intel.com Date: Fri Apr 1 16:17:32 2016 -0700
fm10k: Fix multicast mode sync issues
Multicast mode checking is no longer a requirement to perform unicast and multicast address syncs. Specifically, a device operating in promiscuous and/or all multicast mode is not excluded. The issue occurs when the netdev is pre-configured to either multicast mode and is enabled for the first time. The multicast-group table in the Switch Manager will be missing obvious multicast entries associated to this netdev.
Changes were also made to disallow unicast and multicast syncs with VLAN 0. The Switch Manager considers VLAN 0 to be an invalid entry. Requests with VLAN 0 by the netdev are only generated when the driver is freshly installed and the default VID is not set.
Signed-off-by: Ngai-Mint Kwan ngai-mint.kwan@intel.com Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 9de6a1a6b8ed889ecd3ae13bb0a2459485d90a24 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 16:17:31 2016 -0700
fm10k: drop 1588 support
The 1588 support within fm10k does not work correctly with the current version of the switch management software, and likely never worked correctly to begin with. Remove support for PTP/1588. Update copyright year for all these files while we're touching them.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1e4c32f3ede19bdb738aec2cc3cf69439d7b9310 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Mar 11 09:52:32 2016 -0800
fm10k: prevent RCU issues during AER events
During an AER action response, we were calling fm10k_close without holding the rtnl_lock() which could lead to possible RCU warnings being produced due to 64bit stat updates among other causes. Similarly, we need rtnl_lock() around fm10k_open during fm10k_io_resume. Follow the same pattern elsewhere in the driver and protect the entire open/close sequence.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 2d0f76bedbddaacc465c7a3ebdc9f8c13f68d931 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Mar 9 16:36:08 2016 -0800
fm10k: use DRV_SUMMARY to reduce code duplication
Use DRV_SUMMARY, similar to DRV_VERSION so that we don't have to duplicate the driver summary in multiple places.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 144d8305585a00467aaedc86d039a4ab036a9bcc Author: Alexander Duyck aduyck@mirantis.com Date: Mon Mar 7 09:30:15 2016 -0800
fm10k: Add support for bulk Tx cleanup & cleanup boolean logic
This patch enables bulk free in Tx cleanup for fm10k and cleans up the boolean logic in the polling routines for fm10k in the hopes of avoiding any mix-ups similar to what occurred with i40e and i40evf.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3ef2f563267892230681b1b8890d8f759d39e64d Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Mar 4 15:37:48 2016 -0800
fm10k: remove debug-statistics support
This change fixes an (ab)use of the ethtool stats API, which could result in corrupt memory or misleading stat output. The ethtool stats API is not robust enough to handle varying number of statistics due to how it requests the size and allocates memory. Remove the poorly conceived support originally added for extra debug statistics. In the future, a new stats API may open up the ability to display these statistics.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 09401ae25191039f4aa45c13718595f550745c68 Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Apr 1 11:15:09 2016 -0700
fm10k: add helper functions to set strings and data for ethtool stats
Reduce duplicate code and the amount of indentation by adding fm10k_add_stat_strings and fm10k_add_ethtool_stats functions which help add fm10k_stat structures to the ethtool stats callbacks. This helps increase ease of use for future stat additions, and increases code readability.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 151c37bc29bcbc4b34450c76a8125a5b155520e7 Author: Stefan Schmidt stefan@osg.samsung.com Date: Tue Apr 19 16:28:55 2016 +0200
ieee802154: atusb: update my copyright years for this driver
Signed-off-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 308dbb7afde27f9ba359624e6cc1dcba9c93f49a Author: Stefan Schmidt stefan@osg.samsung.com Date: Tue Apr 19 16:28:54 2016 +0200
ieee802154: atusb: implement .set_cca_mode ops callback
Catching up with the stack here and implement CCA mode setting.
Signed-off-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 0f4715c87031fb6a128103f8e640c4ce4dfdea9a Author: Stefan Schmidt stefan@osg.samsung.com Date: Tue Apr 19 16:28:53 2016 +0200
ieee802154: atusb: implement .set_cca_ed_level ops callback
Catching up with the stack here and implement CCA ED level setting.
Signed-off-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit fb7c579ab01f010a353d117e484edb05e6f3745c Author: Stefan Schmidt stefan@osg.samsung.com Date: Tue Apr 19 16:28:52 2016 +0200
ieee802154: atusb: implement .set_csma_params ops callback
Catching up with the stack here and implement CSMA parameter setting.
Signed-off-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 10c9ead9f3c6bb24bddc9a96681f7d58e6623966 Author: Roopa Prabhu roopa@cumulusnetworks.com Date: Wed Apr 20 08:43:43 2016 -0700
rtnetlink: add new RTM_GETSTATS message to dump link stats
This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stats from userspace is a common operation.
RTM_GETSTATS is an attempt to provide a light weight netlink message to explicity query only link stats from the kernel on an interface. The idea is to also keep it extensible so that new kinds of stats can be added to it in the future.
This patch adds the following attribute for NETDEV stats: struct nla_policy ifla_stats_policy[IFLA_STATS_MAX + 1] = { [IFLA_STATS_LINK_64] = { .len = sizeof(struct rtnl_link_stats64) }, };
Like any other rtnetlink message, RTM_GETSTATS can be used to get stats of a single interface or all interfaces with NLM_F_DUMP.
Future possible new types of stat attributes: link af stats: - IFLA_STATS_LINK_IPV6 (nested. for ipv6 stats) - IFLA_STATS_LINK_MPLS (nested. for mpls/mdev stats) extended stats: - IFLA_STATS_LINK_EXTENDED (nested. extended software netdev stats like bridge, vlan, vxlan etc) - IFLA_STATS_LINK_HW_EXTENDED (nested. extended hardware stats which are available via ethtool today)
This patch also declares a filter mask for all stat attributes. User has to provide a mask of stats attributes to query. filter mask can be specified in the new hdr 'struct if_stats_msg' for stats messages. Other important field in the header is the ifindex.
This api can also include attributes for global stats (eg tcp) in the future. When global stats are included in a stats msg, the ifindex in the header must be zero. A single stats message cannot contain both global and netdev specific stats. To easily distinguish them, netdev specific stat attributes name are prefixed with IFLA_STATS_LINK_
Without any attributes in the filter_mask, no stats will be returned.
This patch has been tested with mofified iproute2 ifstat.
Suggested-by: Jamal Hadi Salim jhs@mojatatu.com Signed-off-by: Roopa Prabhu roopa@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit e6f268ef3687862b0e9f01f7b3706b54f75b82ab Author: David S. Miller davem@davemloft.net Date: Wed Apr 20 15:32:54 2016 -0400
net: nla_align_64bit() needs to test the right pointer.
Netlink messages are appended, one object at a time, to the end of the SKB. Therefore we need to test skb_tail_pointer() not skb->data for alignment.
Fixes: 35c5845957c7 ("net: Add helpers for 64-bit aligning netlink attributes.") Signed-off-by: David S. Miller davem@davemloft.net
commit 1fe63c9ca8913eb7af6c428cf81abad29e0bc9d6 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:46:16 2016 +0300
ath10k: remove enum ath10k_swap_code_seg_bin_type
It's not needed for anything so just get rid of it.
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 9dfe240b4d684f17efa861e92e45dc949b0049ed Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:46:01 2016 +0300
ath10k: switch testmode to use ath10k_core_fetch_firmware_api_n()
Now that all firmware-N.bin related are within struct ath10k_fw_file we can switch to use ath10k_core_fetch_firmware_api_n() and delete almost identical ath10k_tm_fetch_utf_firmware_api_2().
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 77561f9394f8553cce487b12b15b4879ecbaf6d7 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:45:47 2016 +0300
ath10k: move htt_op_version to struct ath10k_fw_file
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n().
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit bf3c13ab49965f0517b579dc490d612d074d535a Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:45:33 2016 +0300
ath10k: move wmi_op_version to struct ath10k_fw_file
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n().
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c4cdf753ed4287467248126a4fac072fbba53b31 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:45:18 2016 +0300
ath10k: move fw_features to struct ath10k_fw_file
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n().
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 453173550256542c20b24a8d85b806941b77ac76 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:45:05 2016 +0300
ath10k: move fw_version inside struct ath10k_fw_file
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n().
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7ebf721d0d47150f6e327a6ae2692779495a2c2a Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:44:51 2016 +0300
ath10k: refactor firmware images to struct ath10k_fw_components
To make it easier to share ath10k_core_fetch_board_data_api_n() with testmode.c refactor all firmware components to struct ath10k_fw_components. This structure will hold firmware related files, for example firmware-N.bin and board-N.bin.
For firmware-N.bin create a new struct ath10k_fw_file which contains the actual firmware image as well as the parsed data from the image.
Modify ath10k_core_start() to take struct ath10k_fw_components() as an argument which makes it possible in following patches to drop some ugly hacks from testmode.c.
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 3fb55c79d092d085bddd4fc94f250acfc1275f3d Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 20 19:44:36 2016 +0300
ath10k: remove deprecated firmware API 1 support
This has ben deprecated years ago, I haven't heard anyone using it since and most likely it won't even work anymore. So just remove all of it.
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit cca1d81574d266d4a3aa33f3947297564525e127 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 20 07:31:31 2016 -0700
net: fix HAVE_EFFICIENT_UNALIGNED_ACCESS typos
HAVE_EFFICIENT_UNALIGNED_ACCESS needs CONFIG_ prefix.
Also add a comment in nla_align_64bit() explaining we have to add a padding if current skb->data is aligned, as it certainly can be confusing.
Fixes: 35c5845957c7 ("net: Add helpers for 64-bit aligning netlink attributes.") Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b84e93077fe926bc65e23d887b54fc46be60b76e Author: Peter Heise mail@pheise.de Date: Wed Apr 20 09:08:29 2016 +0200
net/hsr: Fixed version field in ENUM
New field (IFLA_HSR_VERSION) was added in the middle of an existing ENUM and would break kernel ABI, therefore moved to the end. Reported by Stephen Hemminger.
Signed-off-by: Peter Heise peter.heise@airbus.com Signed-off-by: David S. Miller davem@davemloft.net
commit c7c999cb18da88a881e10e07f0724ad0bfaff770 Author: Takashi Iwai tiwai@suse.de Date: Thu Apr 14 17:32:19 2016 +0200
Bluetooth: vhci: Fix race at creating hci device
hci_vhci driver creates a hci device object dynamically upon each HCI_VENDOR_PKT write. Although it checks the already created object and returns an error, it's still racy and may build multiple hci_dev objects concurrently when parallel writes are performed, as the device tracks only a single hci_dev object.
This patch introduces a mutex to protect against the concurrent device creations.
Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 60f5f5d3a106dc5385b39348d13b20b15ac9cbf9 Author: Alexander Aring aar@pengutronix.de Date: Tue Apr 19 15:34:22 2016 +0200
at86rf230: increase sleep to off timings
I expierenced when setting channel while sleep mode it didn't changed the channel inside the hardware registers. Then I got another report of an user which has similar issues.
I increased the sleep to off state change timing, which is according at86rf233 at maximum 1000 us. After this change I got no similar effects again.
I tried another option to wait on AWAKE_END irq, which can be used to wait until the transceiver is awaked. I tested it and the IRQ took 4 seconds after starting state change. I don't believe it takes 4 seconds to go into the TRX_OFF state from SLEEP state. The alternative is to increase the timings which seems to work.
Cc: Oleg Hahm oliver.hahm@inria.fr Signed-off-by: Alexander Aring aar@pengutronix.de Reviewed-by: Stefan Schmidtstefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 46e7b8d8d53bcde075dca6da3a3816a663073499 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Mon Apr 18 16:10:24 2016 -0400
net: dsa: kill circular reference with slave priv
The dsa_slave_priv structure does not need a pointer to its net_device. Kill it.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9f4ab6ec7ee3b4971231d0b9078062f99decfa13 Merge: 553bc08 bd570ff Author: David S. Miller davem@davemloft.net Date: Tue Apr 19 20:26:11 2016 -0400
Merge branch 'bpf_event_output'
Daniel Borkmann says:
==================== BPF updates
This minor set adds a new helper bpf_event_output() for eBPF cls/act program types which allows to pass events to user space applications. For details, please see individual patches.
v1 -> v2: - Address kbuild bot found compile issue in patch 2 - Rest as is ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit bd570ff970a54df653b48ed0cfb373f2ebed083d Author: Daniel Borkmann daniel@iogearbox.net Date: Mon Apr 18 21:01:24 2016 +0200
bpf: add event output helper for notifications/sampling/logging
This patch adds a new helper for cls/act programs that can push events to user space applications. For networking, this can be f.e. for sampling, debugging, logging purposes or pushing of arbitrary wake-up events. The idea is similar to a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") and 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example").
The eBPF program utilizes a perf event array map that user space populates with fds from perf_event_open(), the eBPF program calls into the helper f.e. as skb_event_output(skb, &my_map, BPF_F_CURRENT_CPU, raw, sizeof(raw)) so that the raw data is pushed into the fd f.e. at the map index of the current CPU.
User space can poll/mmap/etc on this and has a data channel for receiving events that can be post-processed. The nice thing is that since the eBPF program and user space application making use of it are tightly coupled, they can define their own arbitrary raw data format and what/when they want to push.
While f.e. packet headers could be one part of the meta data that is being pushed, this is not a substitute for things like packet sockets as whole packet is not being pushed and push is only done in a single direction. Intention is more of a generically usable, efficient event pipe to applications. Workflow is that tc can pin the map and applications can attach themselves e.g. after cls/act setup to one or multiple map slots, demuxing is done by the eBPF program.
Adding this facility is with minimal effort, it reuses the helper introduced in a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") and we get its functionality for free by overloading its BPF_FUNC_ identifier for cls/act programs, ctx is currently unused, but will be made use of in future. Example will be added to iproute2's BPF example files.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 1e33759c788c78f31d4d6f65bac647b23624734c Author: Daniel Borkmann daniel@iogearbox.net Date: Mon Apr 18 21:01:23 2016 +0200
bpf, trace: add BPF_F_CURRENT_CPU flag for bpf_perf_event_output
Add a BPF_F_CURRENT_CPU flag to optimize the use-case where user space has per-CPU ring buffers and the eBPF program pushes the data into the current CPU's ring buffer which saves us an extra helper function call in eBPF. Also, make sure to properly reserve the remaining flags which are not used.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 553bc087caf052458dc9f92bc42710027740caa9 Author: Julia Lawall julia.lawall@lip6.fr Date: Mon Apr 18 16:55:35 2016 +0200
arcnet: com90xx: add __init attribute
Add __init attribute on a function that is only called from other __init functions and that is not inlined, at least with gcc version 4.8.4 on an x86 machine with allyesconfig. Currently, the function is put in the .text.unlikely segment. Declaring it as __init will cause it to be put in the .init.text and to disappear after initialization.
The result of objdump -x on the function before the change is as follows:
0000000000000000 l F .text.unlikely 00000000000000bf check_mirror
And after the change it is as follows:
0000000000000000 l F .init.text 00000000000000ba check_mirror
Done with the help of Coccinelle. The semantic patch checks for local static non-init functions that are called from an __init function and are not called from any other function.
Signed-off-by: Julia Lawall Julia.Lawall@lip6.fr Acked-by: Michael Grzeschik mgr@pengutronix.de Signed-off-by: David S. Miller davem@davemloft.net
commit 5df1f77f65e11f2d7454de70998a68c42293397a Author: Konstantin Khlebnikov khlebnikov@yandex-team.ru Date: Mon Apr 18 14:41:17 2016 +0300
net/ipv6/addrconf: fix sysctl table indentation
Separated from previous patch for readability.
Signed-off-by: Konstantin Khlebnikov khlebnikov@yandex-team.ru Signed-off-by: David S. Miller davem@davemloft.net
commit 607ea7cda6315be0ad8be2f98bc9de6f2d656ae6 Author: Konstantin Khlebnikov khlebnikov@yandex-team.ru Date: Mon Apr 18 14:41:10 2016 +0300
net/ipv6/addrconf: simplify sysctl registration
Struct ctl_table_header holds pointer to sysctl table which could be used for freeing it after unregistration. IPv4 sysctls already use that. Remove redundant NULL assignment: ndev allocated using kzalloc.
This also saves some bytes: sysctl table could be shorter than DEVCONF_MAX+1 if some options are disable in config.
Signed-off-by: Konstantin Khlebnikov khlebnikov@yandex-team.ru Signed-off-by: David S. Miller davem@davemloft.net
commit 35c5845957c7982dac1f525ff3412f8acf0a0385 Author: David S. Miller davem@davemloft.net Date: Tue Apr 19 19:49:29 2016 -0400
net: Add helpers for 64-bit aligning netlink attributes.
Suggested-by: Eric Dumazet eric.dumazet@gmail.com Suggested-by: Nicolas Dichtel nicolas.dichtel@6wind.com Signed-off-by: David S. Miller davem@davemloft.net
commit 18402843bf88c2e9674e1a3a05c73b7d9b09ee05 Author: David S. Miller davem@davemloft.net Date: Tue Apr 19 14:30:10 2016 -0400
net: Align IFLA_STATS64 attributes properly on architectures that need it.
Since the nlattr header is 4 bytes in size, it can cause the netlink attribute payload to not be 8-byte aligned.
This is particularly troublesome for IFLA_STATS64 which contains 64-bit statistic values.
Solve this by creating a dummy IFLA_PAD attribute which has a payload which is zero bytes in size. When HAVE_EFFICIENT_UNALIGNED_ACCESS is false, we insert an IFLA_PAD attribute into the netlink response when necessary such that the IFLA_STATS64 payload will be properly aligned.
With help and suggestions from Eric Dumazet.
Signed-off-by: David S. Miller davem@davemloft.net
commit a163f2cb393d9d71cad57bfe6a8c7f452a478fb4 Author: Florian Westphal fw@strlen.de Date: Mon Apr 11 21:14:29 2016 +0200
netfilter: conntrack: don't acquire lock during seq_printf
read access doesn't need any lock here.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 47f58b1ebe3739dad1ddeb5cd1f1e718648b4d24 Author: Colin Ian King colin.king@canonical.com Date: Sun Apr 10 12:25:31 2016 +0100
ath9k: remove duplicate assignment of variable ah
ah is written twice with the same value, remove one of the redundant assignments to ah.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 71f5137bf010c6faffab50c0ec15374c59c4a411 Author: Zefir Kurtisi zefir.kurtisi@neratec.com Date: Fri Apr 1 11:37:08 2016 +0200
ath9k: interpret requested txpower in EIRP domain
Tx power limitations at upper layers are interpreted in the EIRP domain. When the user requests a given maximum txpower, e.g. with: 'iw phy0 set txpower fixed 1500', he expects the EIRP to be at or below 15dBm.
In ath9k_hw_apply_txpower(), the interpretation is different: the antenna-gain is capped against the current txpower limit in the regulatory, but not against the user set value. It ensures that the resulting EIRP is below the limit defined by the active countrycode, but not below the value the user requested.
In a scenario like e.g. a) antenna_gain=6 b) countrycode limits to eirp=18 c) user set txpower=15 this will cause a setting for AR_PHY_POWER_TX_RATE regs resulting in an EIRP > 15.
This patch ensures that antenna-gain is considered whenever the txpower limit is adjusted and with that the user set limits are kept.
Signed-off-by: Zefir Kurtisi zefir.kurtisi@neratec.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit f286dd899b4f1445279af6b5965c335ae6f998f7 Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Jan 1 19:09:32 2016 +0100
ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel()
Replace an explicit initialisation for one local variable at the beginning by a conditional assignment.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Reviewed-by: Oleksij Rempel linux@rempel-privat.de Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7e247a9e88dc811d0b7b6a70af1d741054772bc4 Author: Raja Mani rmani@qti.qualcomm.com Date: Tue Apr 12 20:15:53 2016 +0530
ath10k: add dynamic tx mode switch config support for qca4019
push-pull mode needs certain amount the host driver involvement for managing queues in the host memory and packet delivery to firmware. qca4019 wifi firmware has an option to stay in push mode for less number of active traffic flow and then switch to push-pull mode when the active traffic flow goes beyond the certain limit.
The advantage of staying in push mode for less active traffic is, the host cpu consumption is reduced. qca4019 firmware supports this flexibility of the mode switch. It takes the host driver interest (LOW_PERF/HIGH_PERF) via WMI_EXT_RESOURCE_CFG_CMDID,
LOW_PERF - fw would stay in push mode and switch to push-pull based on demand. HIGH_PERF - fw would stay in push-pull mode from the boot.
To make this configuration generic, new WMI services WMI_SERVICE_TX_MODE_PUSH_ONLY, WMI_SERVICE_TX_MODE_PUSH_PULL, WMI_SERVICE_TX_MODE_DYNAMIC are introduced to take dynamic tx mode switch support availability in firmware. Based on WMI_SERVICE_TX_MODE_DYNAMIC, LOW_PERF or HIGHT_PERF is configured to the firmware.
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Tamizh chelvam c_traja@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit de72a20dc3714918b208430dd426c9f6a23ffaec Author: Dan Carpenter dan.carpenter@oracle.com Date: Mon Apr 11 11:15:20 2016 +0300
ath10k: add some sanity checks to peer_map_event() functions
Smatch complains that since "ev->peer_id" comes from skb->data that means we can't trust it and have to do a bounds check on it to prevent an array overflow.
Fixes: 6942726f7f7b ('ath10k: add fast peer_map lookup') Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 1ce8c1484e80010a6e4b9611c65668ff77556f45 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Thu Apr 7 12:11:54 2016 +0530
ath10k: fix rx_channel during hw reconfigure
Upon firmware assert, restart work will be triggered so that mac80211 will reconfigure the driver. An issue is reported that after restart work, survey dump data do not contain in-use (SURVEY_INFO_IN_USE) info for operating channel. During reconfigure, since mac80211 already has valid channel context for given radio, channel context iteration return num_chanctx > 0. Hence rx_channel is always NULL. Fix this by assigning channel context to rx_channel when driver restart is in progress.
Cc: stable@vger.kernel.org Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 87be054a30de1d48a4c9850543080b8cc9854d2c Author: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Date: Tue Apr 5 20:58:26 2016 +0530
ath10k: fix return value for btcoex and peer stats debugfs
Return value is incorrect for btcoex and peer stats debugfs 'write' entries if the user provides a value that matches with the already available debugfs entry, this results in the debugfs entry getting stuck and the operation has to be terminated manually. Fix this by returning the appropriate return 'count' as we do it for other debugfs entries like pktlog etc.
Fixes: cc61a1bbbc0e ("ath10k: enable debugfs provision to enable Peer Stats feature") Fixes: c28e6f06ff40 ("ath10k: fix sanity check on enabling btcoex via debugfs") Signed-off-by: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b67d1df5ad0c227adc89d2913e933ed4addc5dab Author: Arnd Bergmann arnd@arndb.de Date: Mon Apr 18 23:58:30 2016 +0200
net: w5100: don't build spi driver without w5100
The w5100-spi driver front-end only makes sense when the w5100 core driver is enabled, not for a configuration that only has w5300:
drivers/net/built-in.o: In function `w5100_spi_remove': drivers/net/ethernet/wiznet/w5100-spi.c:277: undefined reference to `w5100_remove' drivers/net/built-in.o: In function `w5100_spi_probe': drivers/net/ethernet/wiznet/w5100-spi.c:272: undefined reference to `w5100_probe' drivers/net/built-in.o: In function `w5200_spi_init': drivers/net/ethernet/wiznet/w5100-spi.c:125: undefined reference to `w5100_ops_priv' drivers/net/built-in.o: In function `w5200_spi_readbulk': drivers/net/ethernet/wiznet/w5100-spi.c:125: undefined reference to `w5100_ops_priv' drivers/net/built-in.o: In function `w5200_spi_writebulk': drivers/net/ethernet/wiznet/w5100-spi.c:125: undefined reference to `w5100_ops_priv' drivers/net/built-in.o:(.data+0x3ed1c): undefined reference to `w5100_pm_ops'
This adds an appropriate Kconfig dependency.
Signed-off-by: Arnd Bergmann arnd@arndb.de Fixes: 630cf09751fe ("net: w5100: support SPI interface mode") Signed-off-by: David S. Miller davem@davemloft.net
commit 266a0a790fb545fa1802a899ac44f61b1d6335a7 Author: Arnd Bergmann arnd@arndb.de Date: Sat Apr 16 22:29:33 2016 +0200
bpf: avoid warning for wrong pointer cast
Two new functions in bpf contain a cast from a 'u64' to a pointer. This works on 64-bit architectures but causes a warning on all 32-bit architectures:
kernel/trace/bpf_trace.c: In function 'bpf_perf_event_output_tp': kernel/trace/bpf_trace.c:350:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] u64 ctx = *(long *)r1;
This changes the cast to first convert the u64 argument into a uintptr_t, which is guaranteed to be the same size as a pointer.
Signed-off-by: Arnd Bergmann arnd@arndb.de Fixes: 9940d67c93b5 ("bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs") Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit b520bd07595b117a08871ebc0a16452cc798d35b Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 17 01:05:19 2016 +0300
of_mdio: make of_mdiobus_register_{device|phy}() *void*
The results of of_mdiobus_register_{device|phy}() are never checked, so we can make both these functions *void*...
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4a96300cec88729415683db8a2b909563b09fbaa Author: Pablo Neira Ayuso pablo@netfilter.org Date: Fri Apr 15 12:24:57 2016 +0200
netfilter: ctnetlink: restore inlining for netlink message size calculation
Calm down gcc warnings:
net/netfilter/nf_conntrack_netlink.c:529:15: warning: 'ctnetlink_proto_size' defined but not used [-Wunused-function] static size_t ctnetlink_proto_size(const struct nf_conn *ct) ^ net/netfilter/nf_conntrack_netlink.c:546:15: warning: 'ctnetlink_acct_size' defined but not used [-Wunused-function] static size_t ctnetlink_acct_size(const struct nf_conn *ct) ^ net/netfilter/nf_conntrack_netlink.c:556:12: warning: 'ctnetlink_secctx_size' defined but not used [-Wunused-function] static int ctnetlink_secctx_size(const struct nf_conn *ct) ^ net/netfilter/nf_conntrack_netlink.c:572:15: warning: 'ctnetlink_timestamp_size' defined but not used [-Wunused-function] static size_t ctnetlink_timestamp_size(const struct nf_conn *ct) ^
So gcc compiles them out when CONFIG_NF_CONNTRACK_EVENTS and CONFIG_NETFILTER_NETLINK_GLUE_CT are not set.
Fixes: 4054ff45454a9a4 ("netfilter: ctnetlink: remove unnecessary inlining") Reported-by: Stephen Rothwell sfr@canb.auug.org.au Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org Acked-by: Arnd Bergmann arnd@arndb.de
commit e7600449bef0650ee7818be6de26955e81579d13 Author: Govindarajulu Varadarajan _govind@gmx.com Date: Sat Apr 16 00:40:43 2016 +0530
enic: set netdev->vlan_features
Driver sets vlan_feature to netdev->features as hardware supports all of them on vlan interface.
Signed-off-by: Govindarajulu Varadarajan _govind@gmx.com Signed-off-by: David S. Miller davem@davemloft.net
commit 84bf9cefb162b197da20a0f4388929f4b5ba5db4 Author: KY Srinivasan kys@microsoft.com Date: Thu Apr 14 16:31:54 2016 -0700
hv_netvsc: Implement support for VF drivers on Hyper-V
Support VF drivers on Hyper-V. On Hyper-V, each VF instance presented to the guest has an associated synthetic interface that shares the MAC address with the VF instance. Typically these are bonded together to support live migration. By default, the host delivers all the incoming packets on the synthetic interface. Once the VF is up, we need to explicitly switch the data path on the host to divert traffic onto the VF interface. Even after switching the data path, broadcast and multicast packets are always delivered on the synthetic interface and these will have to be injected back onto the VF interface (if VF is up). This patch implements the necessary support in netvsc to support Linux VF drivers.
Signed-off-by: K. Y. Srinivasan kys@microsoft.com Reviewed-by: Haiyang Zhang haiyangz@microsoft.com Signed-off-by: David S. Miller davem@davemloft.net
commit 52e36c4da4d863d020df1e989514819349fd73f8 Merge: 2a2bbf1 54846f5 Author: David S. Miller davem@davemloft.net Date: Mon Apr 18 14:45:09 2016 -0400
Merge branch 'fec-ksettings'
Philippe Reynes says:
==================== fec: ethtool: move to new api {get|set}_link_ksettings
Ethtool has a new api {get|set}_link_ksettings that deprecate the old api {get|set}_settings. We update the fec driver to use this new ethtool api.
For this first version, I've converted old u32 value in phy structure to link_modes structure. Another way would be to replace u32 in phy structure to use DECLARE_LINK_MODE_MASK for advertising, .... ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 54846f5838d871ad69ebe6eb1999cae3867dabc7 Author: Philippe Reynes tremyfr@gmail.com Date: Fri Apr 15 00:35:01 2016 +0200
fec: move to new ethtool api {get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated. We move the fec driver to new api {get|set}_link_ksettings.
Signed-off-by: Philippe Reynes tremyfr@gmail.com Acked-by: Fugang Duan fugang.duan@nxp.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2d55173e71b06c5a369489852d972304e14189fd Author: Philippe Reynes tremyfr@gmail.com Date: Fri Apr 15 00:35:00 2016 +0200
phy: add generic function to support ksetting support
The old ethtool api (get_setting and set_setting) has generic phy functions phy_ethtool_sset and phy_ethtool_gset. To supprt the new ethtool api (get_link_ksettings and set_link_ksettings), we add generic phy function phy_ethtool_ksettings_get and phy_ethtool_ksettings_set.
Signed-off-by: Philippe Reynes tremyfr@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6d62b4d5fac620ee0ca65dc6d99b0306d96bc541 Author: Philippe Reynes tremyfr@gmail.com Date: Fri Apr 15 00:34:59 2016 +0200
net: ethtool: export conversion function between u32 and link mode
The function convert_legacy_u32_to_link_mode and convert_link_mode_to_legacy_u32 may be used outside of ethtool.c. We rename them to ethtool_convert_... and export them, so we could use them in others drivers and modules.
Signed-off-by: Philippe Reynes tremyfr@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit adff6c65600000ec2bb71840c943ee12668080f5 Author: Florian Westphal fw@strlen.de Date: Tue Apr 12 18:14:25 2016 +0200
netfilter: connlabels: change nf_connlabels_get bit arg to 'highest used'
nf_connlabel_set() takes the bit number that we would like to set. nf_connlabels_get() however took the number of bits that we want to support.
So e.g. nf_connlabels_get(32) support bits 0 to 31, but not 32. This changes nf_connlabels_get() to take the highest bit that we want to set.
Callers then don't have to cope with a potential integer wrap when using nf_connlabels_get(bit + 1) anymore.
Current callers are fine, this change is only to make folloup nft ct label set support simpler.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 5a8145f7b22269adaf9e98b160a20486d1ad5669 Author: Florian Westphal fw@strlen.de Date: Tue Apr 12 18:14:24 2016 +0200
netfilter: labels: don't emit ct event if labels were not changed
make the replace function only send a ctnetlink event if the contents of the new set is different.
Otherwise 'ct label set ct label | bar'
will cause netlink event storm since we "replace" labels for each packet.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit b4ef159927150bf1d63f36330bbb5239516ceb69 Author: Florian Westphal fw@strlen.de Date: Tue Apr 12 18:14:23 2016 +0200
netfilter: connlabels: move helpers to xt_connlabel
Currently labels can only be set either by iptables connlabel match or via ctnetlink.
Before adding nftables set support, clean up the clabel core and move helpers that nft will not need after all to the xtables module.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 2a2bbf170054e2525f11e08bb36d4027d76b7bff Author: Paolo Abeni pabeni@redhat.com Date: Thu Apr 14 18:39:39 2016 +0200
tun: don't require serialization lock on tx
The current tun_net_xmit() implementation don't need any external lock since it relies on rcu protection for the tun data structure and on socket queue lock for skb queuing.
This patch set the NETIF_F_LLTX feature bit in the tun device, so that on xmit, in absence of qdisc, no serialization lock is acquired by the caller.
The user space can remove the default tun qdisc with:
tc qdisc replace dev <tun device name> root noqueue
Signed-off-by: Paolo Abeni pabeni@redhat.com Acked-by: Hannes Frederic Sowa hannes@stressinduktion.org Acked-by: Eric Dumazet edumazet@google.com Acked-by: Michael S. Tsirkin mst@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 110361f41c17d1f565e2fd03a0af044c29e6513a Author: Dan Carpenter dan.carpenter@oracle.com Date: Mon Apr 18 11:44:49 2016 +0300
udp: fix if statement in SIOCINQ ioctl
We deleted a line of code and accidentally made the "return put_user()" part of the if statement when it's supposed to be unconditional.
Fixes: 9f9a45beaa96 ('udp: do not expect udp headers on ioctl SIOCINQ') Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Acked-by: Eric Dumazet edumazet@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 550bce59baf3f3059cd4ae1e268f08f2d2cb1d5c Author: Roopa Prabhu roopa@cumulusnetworks.com Date: Fri Apr 15 20:36:25 2016 -0700
rtnetlink: rtnl_fill_stats: avoid an unnecssary stats copy
This patch passes netlink attr data ptr directly to dev_get_stats thus elimiating a stats copy.
Suggested-by: David Miller davem@davemloft.net Signed-off-by: Roopa Prabhu roopa@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit ccd37cffe39d7d4f1c1efcd42ec829ec16c7db66 Merge: efde611 d967ecb Author: David S. Miller davem@davemloft.net Date: Sun Apr 17 18:54:15 2016 -0400
Merge branch 'dsa-mv88e6xxx-switch-factorization'
Vivien Didelot says:
==================== net: dsa: mv88e6xxx: factorize switch info
This patchset factorizes the mv88e6xxx code by sharing a new extendable info structure to store static data such as switch family, product number, number of ports, number of databases and the name.
The next step is to add a "flags" bitmap member to the info structure in order to simplify the shared code with a feature-based logic instead of checking their family/ID.
This is a step forward having a single mv88e6xxx driver supporting many similar devices, like any usual Linux driver.
Changes v3 -> v4: - constify probed name in DSA - rebase patchset above conflicting commit 48ace4e
Changes v2 -> v3: - update commit messages and add Andrew's tags - keep the info lookup code in a separated function - split the single switch ID reading in probe in a new commit
Changes v1 -> v2: - define PORT_SWITCH_ID_PROD_NUM_* values - use plain struct mv88e6xxx_info - remove non used yet ps->rev ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit d967ecbc0b875081624857f27df4ed23c5eca106 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:24:03 2016 -0400
net: dsa: mv88e6xxx: remove switch ID from ps
ps->id is not needed anymore, so remove it as well as the related defined values.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit cd5a2c82bad9e59f2674befc07c12effa0aea49d Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:24:02 2016 -0400
net: dsa: mv88e6xxx: add number of db to info
Add the number of databases to the info structure.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 009a2b9843bf0b1a85fbf79f76e1de4995de527c Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:24:01 2016 -0400
net: dsa: mv88e6xxx: add number of ports to info
Drop the ps->num_ports variable in favor of a new member of the info structure. This removes the need to assign it at setup time.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 22356476a86fc569c34cbf209d3a247c01e0ef6d Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:24:00 2016 -0400
net: dsa: mv88e6xxx: add family to info
Add an mv88e6xxx_family enum to the info structure for better family indentification.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit f6271e676b7f62a609f8ee5523a6a8ed47c0f333 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:23:59 2016 -0400
net: dsa: mv88e6xxx: add switch info
Add a new switch info structure which is meant to store switch models static information, such as product number, name, number of ports, number of databases, etc.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit a439c0612d7bdbd5ce8ea868e6a1084f0d7300dc Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:23:58 2016 -0400
net: dsa: mv88e6xxx: read switch ID in probe
Read the switch ID only once, at probe time, to avoid multiple read accesses and MII bus checking.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 54c6f4bda7dabab7a7a9eeb8f1ced4b0b5fc4fd0 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:23:57 2016 -0400
net: dsa: mv88e6xxx: drop revision probing
There is no point in having a special case for the revision when probing a switch model. The code gets cluttered with unnecessary defines, and leads to errors when code such as mv88e6131_setup compares PORT_SWITCH_ID_6131_B2 to ps->id which masks the revision.
Drop every revision definition, and lookup only the product number.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit b346204737fafce585f62543ed7691fb4a72789d Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:23:56 2016 -0400
net: dsa: mv88e6xxx: drop double ds assignment
Every driver assigns ps->ds even though it gets assigned in the shared mv88e6xxx_setup_common function. Kill redundancy.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 0209d144e3097fee1fe5d38532e6f0919c80d1ea Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Sun Apr 17 13:23:55 2016 -0400
net: dsa: constify probed name
Change the dsa_switch_driver.probe function to return a const char *.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit efde611b0afa47e64f2a329f4430830b91d77ea2 Merge: 7a7c170 3d780b9 Author: David S. Miller davem@davemloft.net Date: Sat Apr 16 22:34:40 2016 -0400
Merge branch 'nfp-next'
Jakub Kicinski says
==================== nfp: cleanups and improvements
Main purpose of this set is to get rid of doing potentially long mdelay()s but it also contains some trivial changes I've accumulated. First two patches fix harmless copy-paste errors, next two clean up the documentation and remove unused defines. Patch 5 clarifies the interpretation of RX descriptor fields. Patch 6, by far the biggest, adds ability to perform FW reconfig asynchronously thanks to which we can stop using mdelay(). ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 3d780b926a12dd798417446d733d457f1be1cc73 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:54 2016 +0100
nfp: add async reconfiguration mechanism
Some callers of nfp_net_reconfig() are in atomic context so we used to busy wait for commands to complete. In worst case scenario that means locking up a core for up to 5 seconds when a command times out. Lets add a timer-based mechanism of asynchronously checking whether reconfiguration completed successfully for atomic callers to use. Non-atomic callers can now just sleep.
The approach taken is quite simple because (1) synchronous reconfigurations always happen under RTNL (or before device is registered); (2) we can coalesce pending reconfigs. There is no need for request queues, timer which eventually takes a look at reconfiguration result to report errors is good enough.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 180012dc05e565260a25696767c8f5b2df5fc50e Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:53 2016 +0100
nfp: remove buggy RX buffer length validation
Meaning of data_len and meta_len RX WB descriptor fields is slightly confusing. Add a comment with a diagram clarifying the layout. Also remove the buffer length validation: (a) it's imprecise for static rx-offsets; (b) if firmware is buggy enough to DMA past the end of the buffer WARN_ON_ONCE() doesn't seem like a strong enough response. skb_put() will do the checking for us anyway.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2db221cd444bf356243c57b653b6bf84c3491806 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:52 2016 +0100
nfp: remove unused suspicious mask defines
NFP_NET_RXR_MASK sounds like a mask which could be used on NFP_NET_CFG_RXRS_ENABLE register but its value is quite strange. In fact there are no users of this define so let's just remove it. Same for TX rings.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6ffa622d8567de1daab2e0ca23b99520ad504215 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:51 2016 +0100
nfp: correct names of constants in comments
Documentation in comments lacks CFG in some names.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit c160692e8665880c844bebdee219ed9cdcb2346b Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:50 2016 +0100
nfp: remove unnecessary static
There is no reason for those local variables to be static.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5b161096f0515b61b72156cd0c1e5c72e77cfed8 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Sat Apr 16 11:25:49 2016 +0100
nfp: check the right pointer for errors
Correct checking error condition on wrong pointer - copy/paste mistake most likely.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7a7c1705dc6c629e3b1dce1c0c1ecc0af87486ac Merge: 89764d5 4272cc5 Author: David S. Miller davem@davemloft.net Date: Sat Apr 16 22:02:14 2016 -0400
Merge branch 'IFF_NO_QUEUE-followups'
Phil Sutter says:
==================== Minor IFF_NO_QUEUE conversion follow-up
The following series converts two further drivers away from setting 'tx_queue_len = 0' to adding IFF_NO_QUEUE to priv_flags instead.
The first one, rtl8188eu in staging didn't exist back when all drivers were converted. The second one, openvswitch seems to have slipped through my grep'ing back then, no idea why. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 4272cc51a6dcf2c086863372fd593809ffced7d5 Author: Phil Sutter phil@nwl.cc Date: Fri Apr 15 19:14:20 2016 +0200
openvswitch: Convert to using IFF_NO_QUEUE
Cc: Pravin Shelar pshelar@nicira.com Signed-off-by: Phil Sutter phil@nwl.cc Signed-off-by: David S. Miller davem@davemloft.net
commit 9e7399173200934612edf2153b93a8f232b88e4b Author: Phil Sutter phil@nwl.cc Date: Fri Apr 15 19:14:19 2016 +0200
staging: rtl8188eu: Convert to using IFF_NO_QUEUE
Cc: Jakub Sitnicki jsitnicki@gmail.com Signed-off-by: Phil Sutter phil@nwl.cc Signed-off-by: David S. Miller davem@davemloft.net
commit 89764d59d237480ad930866dcf248b5e930454b9 Merge: f66bc94 8f180fa Author: David S. Miller davem@davemloft.net Date: Sat Apr 16 21:51:01 2016 -0400
Merge branch 'fjes-next'
Taku Izumi says:
==================== FUJITSU Extended Socket driver version 1.1
This patchsets update FUJITSU Extended Socket network driver into version 1.1. This mainly includes some improvements and minor bugfix.
v1->v2: - Remove ioctl and debugfs facility according to David comment ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 8f180fadb521ce440af82b5fa12ed56845110f15 Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:52 2016 +0900
fjes: Update fjes driver version : 1.1
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit bd5a256991f9a9cc0b7f6385dd1d8cfc90559b12 Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:46 2016 +0900
fjes: Introduce spinlock for rx_status
This patch introduces spinlock of rx_status for proper excusive control.
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit 16bbec3a50efec46b679c3408c8be09f09dbcb7e Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:40 2016 +0900
fjes: Enhance changing MTU related work
This patch enhances the fjes_change_mtu() method by introducing new flag named FJES_RX_MTU_CHANGING_DONE in rx_status. At the same time, default MTU value is changed into 65510 bytes.
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit 19a0a7fd55af4658414de955f401cddaffc1f0ba Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:34 2016 +0900
fjes: fix bitwise check bug in fjes_raise_intr_rxdata_task
In fjes_raise_intr_rxdata_task(), there's a bug of bitwise check because of missing "& FJES_RX_POLL_WORK". This patch fixes this bug.
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3c3bd4a91ec12ad7c140bb3fd04b199e411760cb Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:27 2016 +0900
fjes: fix incorrect statistics information in fjes_xmit_frame()
There are bugs of acounting statistics in fjes_xmit_frame(). Accounting self stats is wrong. accounting stats of other EPs to be transmitted is right. This patch fixes this bug.
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit da5a2383c9a2de88550841f6c100f991a6850230 Author: Taku Izumi izumi.taku@jp.fujitsu.com Date: Fri Apr 15 11:25:21 2016 +0900
fjes: optimize timeout value
This patch optimizes the following timeout value. - FJES_DEVICE_RESET_TIMEOUT - FJES_COMMAND_REQ_TIMEOUT - FJES_COMMAND_REQ_BUFF_TIMEOUT
Signed-off-by: Taku Izumi izumi.taku@jp.fujitsu.com Signed-off-by: David S. Miller davem@davemloft.net
commit f66bc94174e850a4de4adbe7a08fc37507051185 Author: Dinh Nguyen dinguyen@opensource.altera.com Date: Thu Apr 14 20:42:29 2016 -0500
stmmac: socfpga: remove extra call to socfpga_dwmac_setup
In the socfpga_dwmac_probe function, we have a call to socfpga_dwmac_setup, which is already called from socfpga_dwmac_init later in the probe function. Remove this extra call to socfpga_dwmac_setup.
Also we should not be calling socfpga_dwmac_setup() directly without wrapping it around the proper reset assert/deasserts. That is because the socfpga_dwmac_setup() is setting up PHY modes in the system manager, and it is requires the EMAC's to be in reset during the PHY setup.
Reported-by: Matthew Gerlach mgerlach@opensource.altera.com Signed-off-by: Dinh Nguyen dinguyen@opensource.altera.com Signed-off-by: David S. Miller davem@davemloft.net
commit 48ace4ef4c3f99ebf6f801c9a8326a4a39f31dbf Author: Andrew Lunn andrew@lunn.ch Date: Thu Apr 14 23:47:12 2016 +0200
dsa: mv88e6xxx: Kill the REG_READ and REG_WRITE macros
These macros hide a ds variable and a return statement on error, which can lead to locking issues. Kill them off.
Signed-off-by: Andrew Lunn andrew@lunn.ch Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 756ca874417695f77941948a77e9b8562635cc0a Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 17:04:34 2016 -0400
netdev_features: Add NETIF_F_TSO_MANGLEID to NETIF_F_ALL_TSO
I realized that when I added NETIF_F_TSO_MANGLEID as a TSO type I forgot to add it to NETIF_F_ALL_TSO. This patch corrects that so the flag will be included correctly.
The result should be minor as it was only used by a few drivers and in a few specific cases such as when NETIF_F_SG was not supported on a device so the TSO flags were cleared.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit ac979929eaeaf82c3ba30161320b3f928d136de9 Merge: ec9dcd3 3a80e1f Author: David S. Miller davem@davemloft.net Date: Sat Apr 16 19:09:14 2016 -0400
Merge branch 'ipv6-gre-offloads'
Alexander Duyck says:
==================== Add support for offloads with IPv6 GRE tunnels
This patch series enables the use of segmentation and checksum offloads with IPv6 based GRE tunnels.
In order to enable this series I had to make a change to iptunnel_handle_offloads so that it would no longer free the skb. This was necessary as there were multiple paths in the IPv6 GRE code that required the skb to still be present so it could be freed. As it turned out I believe this actually fixes a bug that was present in FOU/GUE based tunnels anyway.
Below is a quick breakdown of the performance gains seen with a simple netperf test passing traffic through a ip6gretap tunnel and then an i40e interface:
Throughput Throughput Local Local Result Units CPU Service Tag Util Demand % 3544.93 10^6bits/s 6.30 4.656 "before" 13081.75 10^6bits/s 3.75 0.752 "after" ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 3a80e1facd3c825c5ac804bc2efe118872832e33 Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 15:34:04 2016 -0400
ip6gre: Add support for GSO
This patch adds code borrowed from bits and pieces of other protocols to the IPv6 GRE path so that we can support GSO over IPv6 based GRE tunnels. By adding this support we are able to significantly improve the throughput for GRE tunnels as we are able to make use of GSO.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit e0c20967c8a653d0213238621381e224d8f065fc Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 15:33:58 2016 -0400
GRE: Add support for GRO/GSO of IPv6 GRE traffic
Since GRE doesn't really care about L3 protocol we can support IPv4 and IPv6 using the same offloads. With that being the case we can add a call to register the offloads for IPv6 as a part of our GRE offload initialization.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit ac4eb009e4776e9ef4c0484865c2f5a3786eecae Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 15:33:51 2016 -0400
ip6gre: Add support for basic offloads offloads excluding GSO
This patch adds support for the basic offloads we support on most devices. Specifically with this patch set we can support checksum offload, basic scatter-gather, and highdma.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit a9e242ca43b13e5a5d176f97dfd2481c339934b7 Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 15:33:45 2016 -0400
ip6gretap: Fix MTU to allow for Ethernet header
When we were creating an ip6gretap interface the MTU was about 6 bytes short of what was needed. It turns out we were not taking the Ethernet header into account and as a result we were eating into the 8 bytes reserved for the encap limit.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit aed069df099cd1a27900acb56bb892ec24c66ac4 Author: Alexander Duyck aduyck@mirantis.com Date: Thu Apr 14 15:33:37 2016 -0400
ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb
This patch updates the IP tunnel core function iptunnel_handle_offloads so that we return an int and do not free the skb inside the function. This actually allows us to clean up several paths in several tunnels so that we can free the skb at one point in the path without having to have a secondary path if we are supporting tunnel offloads.
In addition it should resolve some double-free issues I have found in the tunnels paths as I believe it is possible for us to end up triggering such an event in the case of fou or gue.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit ec9dcd3507f055f025a7692a1ff90ce105f84c1b Merge: 544a773 0c165ff Author: David S. Miller davem@davemloft.net Date: Sat Apr 16 18:30:27 2016 -0400
Merge branch 'w5100-spi-and-w5200-support'
Akinobu Mita says:
==================== net: w5100: add support W5100/W5200 for SPI interface
This series add support for Wiznet W5100 and W5200 for SPI interface.
We can easily find the ethernet modules and shield for Arduino with these chips for purchase. I've tested them with BeagleBone.
Wiznet W5100 for mmio access has already supported by w5100 driver.
In order to share the code between mmio mode and SPI mode, this series firstly adds ability to support another register access interface to the existing w5100 driver. This ground work also requires to introduce workqueue and threaded irq because SPI transfers are callable only from contexts that can sleep unlike mmio access.
The latter part of this series adds w5100-spi driver which actually support W5100 and W5200 for SPI interface. Supporting W5100 is straight forward because it only required to add a register access interface by the SPI transfer. W5100 and W5200 have similar memory map which justifies adding W5200 support to w5100 driver.
* Changes from v2 to v3 - Add comment for reg_lock - Add ability to allocate ops specific data structure - Allocate w5200 ops specific data structure to put DMA-safe buffer - Add missing chip_id assignment for w5100_*_ops
* Changes from v1 to v2 - Use a plain single pointer instead of SKB queue, spotted by David S. Miller - Correct timeout period in w5100_command - Use spi_write_then_read instead of spi_write which needs DMA-safe buffer - Support W5200 ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 0c165ff2d8db575efa41f2586c2de193850dec48 Author: Akinobu Mita akinobu.mita@gmail.com Date: Fri Apr 15 00:11:33 2016 +0900
net: w5100: support W5200
This adds support for W5200 chip.
W5100 and W5200 have similar memory map although some of their offsets are different. The register access sequences between them are different but w5100 driver has abstraction layer for difference bus interface modes so it is easy to add W5200 support to w5100 and w5100-spi drivers.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit 630cf09751fe166ffc25d1ae35ce804bf58eb3c7 Author: Akinobu Mita akinobu.mita@gmail.com Date: Fri Apr 15 00:11:32 2016 +0900
net: w5100: support SPI interface mode
This adds new w5100-spi driver which shares the bus interface independent code with existing w5100 driver.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit bf2c6b90b385c163ad9c48fe97f5dc6af0091de6 Author: Akinobu Mita akinobu.mita@gmail.com Date: Fri Apr 15 00:11:31 2016 +0900
net: w5100: enable to support sleepable register access interface
SPI transfer routines are callable only from contexts that can sleep.
This adds ability to tell the core driver that the interface mode cannot access w5100 register on atomic contexts. In this case, workqueue and threaded irq are required.
This also corrects timeout period waiting for command register to be automatically cleared because the latency of the register access with SPI transfer can be interfered by other contexts.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit 850576cfede986f0683bed25e34bc15712ffb463 Author: Akinobu Mita akinobu.mita@gmail.com Date: Fri Apr 15 00:11:30 2016 +0900
net: w5100: add ability to support other bus interface
The w5100 driver currently only supports direct and indirect bus interface mode which use MMIO space for accessing w5100 registers.
In order to support SPI interface mode which is supported by W5100 chip, this makes the bus interface abstraction layer more generic so that separated w5100-spi driver can use w5100 driver as core module.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit d6586d2ef4608f113df16ca8ca757563891389ce Author: Akinobu Mita akinobu.mita@gmail.com Date: Fri Apr 15 00:11:29 2016 +0900
net: w5100: move mmiowb into register access callbacks
Instead of sprinkle mmiowb over the driver code, move it into primary register write callbacks. (w5100_write, w5100_write16, w5100_writebuf)
This is a preparation for supporting SPI interface which doesn't use MMIO for accessing w5100 registers.
Signed-off-by: Akinobu Mita akinobu.mita@gmail.com Cc: Mike Sinkovsky msink@permonline.ru Cc: David S. Miller davem@davemloft.net Signed-off-by: David S. Miller davem@davemloft.net
commit 544a773a01828e3cc3b553721f68d880d0d27a97 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Sat Apr 9 12:46:23 2016 +0200
vxlan: reduce usage of synchronize_net in ndo_stop
We only need to do the synchronize_net dance once for both, ipv4 and ipv6 sockets, thus removing one synchronize_net in case both sockets get dismantled.
Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 0412bd931f5f94d1054e958415c4a945d8ee62f4 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Fri Apr 8 22:55:01 2016 +0200
vxlan: synchronously and race-free destruction of vxlan sockets
Due to the fact that the udp socket is destructed asynchronously in a work queue, we have some nondeterministic behavior during shutdown of vxlan tunnels and creating new ones. Fix this by keeping the destruction process synchronous in regards to the user space process so IFF_UP can be reliably set.
udp_tunnel_sock_release destroys vs->sock->sk if reference counter indicates so. We expect to have the same lifetime of vxlan_sock and vxlan_sock->sock->sk even in fast paths with only rcu locks held. So only destruct the whole socket after we can be sure it cannot be found by searching vxlan_net->sock_list.
Cc: Eric Dumazet eric.dumazet@gmail.com Cc: Jiri Benc jbenc@redhat.com Cc: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit f48256efededaa87f475c0d6330d83f853cb064a Author: wangweidong wangweidong1@huawei.com Date: Thu Apr 14 15:43:52 2016 +0800
phy: make some bits preserved while setup forced mode
When tested the PHY SGMII Loopback: 1.set the LOOPBACK bit, 2.set the autoneg to AUTONEG_DISABLE, it calls the genphy_setup_forced which will clear the bit.
The BMCR_LOOPBACK bit should be preserved.
As Florian pointed out that other bits should be preserved too. So I make the BMCR_ISOLATE and BMCR_PDOWN as well.
Signed-off-by: Weidong Wang wangweidong1@huawei.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4e811b1e11d5bc9e25ca1a30ce6654add2b571e3 Merge: 311b217 53fa103 Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 17:29:37 2016 -0400
Merge branch 'sctp-diag'
Xin Long says:
==================== sctp: support sctp_diag in kernel
This patchset will add sctp_diag module to implement diag interface on sctp in kernel.
For a listening sctp endpoint, we will just dump it's ep info. For a sctp connection, we will the assoc info and it's ep info.
The ss dump will looks like:
[iproute2]# ./misc/ss --sctp -n -l State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 172.16.254.254:8888 *:* LISTEN 0 5 127.0.0.1:1234 *:* LISTEN 0 5 127.0.0.1:1234 *:* - ESTAB 0 0 127.0.0.1%lo:1234 127.0.0.1:4321 LISTEN 0 128 172.16.254.254:8888 *:* - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.253.253:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.1.1:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.1.2:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.2.1:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.2.2:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.3.1:8888 - ESTAB 0 0 172.16.254.254%eth1:8888 172.16.3.2:8888 LISTEN 0 0 127.0.0.1:4321 *:* - ESTAB 0 0 127.0.0.1%lo:4321 127.0.0.1:1234
The entries with '- ESTAB' are the assocs, some of them may belong to the same endpoint. So we will dump the parent endpoint first, like the entry with 'LISTEN'. then dump the assocs. ep and assocs entries will be dumped in right order so that ss can show them in tree format easily.
Besides, this patchset also simplifies sctp proc codes, cause it has some similar codes with sctp diag in sctp transport traversal.
v1->v2: 1. inet_diag_get_handler needs to return it as const. 2. merge 5/7 into 2/7 of v1.
v2->v3: do some improvements and fixes in patch 1-4, see the details in each patch's comment. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 53fa10369c45a51947f06e8b622d2fa2cc64fda1 Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:35 2016 +0800
sctp: fix some rhashtable functions using in sctp proc/diag
When rhashtable_walk_init return err, no release function should be called, and when rhashtable_walk_start return err, we should only invoke rhashtable_walk_exit to release the source.
But now when sctp_transport_walk_start return err, we just call rhashtable_walk_stop/exit, and never care about if rhashtable_walk_init or start return err, which is so bad.
We will fix it by calling rhashtable_walk_exit if rhashtable_walk_start return err in sctp_transport_walk_start, and if sctp_transport_walk_start return err, we do not need to call sctp_transport_walk_stop any more.
For sctp proc, we will use 'iter->start_fail' to decide if we will call rhashtable_walk_stop/exit.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit b5e2f4e6998a2b999da8fa0290b692f0bd85c8b7 Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:34 2016 +0800
sctp: merge the seq_start/next/exits in remaddrs and assocs
In sctp proc, these three functions in remaddrs and assocs are the same. we should merge them into one.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8f840e47f190cbe61a96945c13e9551048d42cef Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:33 2016 +0800
sctp: add the sctp_diag.c file
This one will implement all the interface of inet_diag, inet_diag_handler. which includes sctp_diag_dump, sctp_diag_dump_one and sctp_diag_get_info.
It will work as a module, and register inet_diag_handler when loading.
v2->v3: - fix the mistake in inet_assoc_attr_size().
- change inet_diag_msg_laddrs_fill() name to inet_diag_msg_sctpladdrs_fill.
- change inet_diag_msg_paddrs_fill() name to inet_diag_msg_sctpaddrs_fill.
- add inet_diag_msg_sctpinfo_fill() to make asoc/ep fill code clearer.
- add inet_diag_msg_sctpasoc_fill() to make asoc fill code clearer.
- merge inet_asoc_diag_fill() and inet_ep_diag_fill() to inet_sctp_diag_fill().
- call sctp_diag_get_info() directly, instead by handler, cause the caller is in the same file with it.
- call lock_sock in sctp_tsp_dump_one() to make sure we call get sctp info safely.
- after lock_sock(sk), we should check sk != assoc->base.sk.
- change mem[SK_MEMINFO_WMEM_ALLOC] to asoc->sndbuf_used for asoc dump when asoc->ep->sndbuf_policy is set. don't use INET_DIAG_MEMINFO attr any more.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit cb2050a7b8131a9a9f3f97276df1feaae8987dc8 Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:32 2016 +0800
sctp: export some functions for sctp_diag in inet_diag
inet_diag_msg_common_fill is used to fill the diag msg common info, we need to use it in sctp_diag as well, so export it.
inet_diag_msg_attrs_fill is used to fill some common attrs info between sctp diag and tcp diag.
v2->v3: - do not need to define and export inet_diag_get_handler any more. cause all the functions in it are in sctp_diag.ko, we just call them in sctp_diag.ko.
- add inet_diag_msg_attrs_fill to make codes clear.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 626d16f50f39bb9c44f98fd256cae2b864900a01 Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:31 2016 +0800
sctp: export some apis or variables for sctp_diag and reuse some for proc
For some main variables in sctp.ko, we couldn't export it to other modules, so we have to define some api to access them.
It will include sctp transport and endpoint's traversal.
There are some transport traversal functions for sctp_diag, we can also use it for sctp_proc. cause they have the similar situation to traversal transport.
v2->v3: - rhashtable_walk_init need the parameter gfp, because of recent upstrem update
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 52c52a61a39fb319c14a582f8631619e5d5f55bf Author: Xin Long lucien.xin@gmail.com Date: Thu Apr 14 15:35:30 2016 +0800
sctp: add sctp_info dump api for sctp_diag
sctp_diag will dump some important details of sctp's assoc or ep, we use sctp_info to describe them, sctp_get_sctp_info to get them, and export it to sctp_diag.ko.
v2->v3: - we will not use list_for_each_safe in sctp_get_sctp_info, cause all the callers of it will use lock_sock.
- fix the holes in struct sctp_info with __reserved* field. because sctp_diag is a new feature, and sctp_info is just for now, it may be changed in the future.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 311b21774f1389f9c34eac4da90c43c95fc2b62b Author: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Date: Wed Apr 13 19:12:29 2016 -0300
sctp: simplify sk_receive_queue locking
SCTP already serializes access to rcvbuf through its sock lock: sctp_recvmsg takes it right in the start and release at the end, while rx path will also take the lock before doing any socket processing. On sctp_rcv() it will check if there is an user using the socket and, if there is, it will queue incoming packets to the backlog. The backlog processing will do the same. Even timers will do such check and re-schedule if an user is using the socket.
Simplifying this will allow us to remove sctp_skb_list_tail and get ride of some expensive lockings. The lists that it is used on are also mangled with functions like __skb_queue_tail and __skb_unlink in the same context, like on sctp_ulpq_tail_event() and sctp_clear_pd(). sctp_close() will also purge those while using only the sock lock.
Therefore the lockings performed by sctp_skb_list_tail() are not necessary. This patch removes this function and replaces its calls with just skb_queue_splice_tail_init() instead.
The biggest gain is at sctp_ulpq_tail_event(), because the events always contain a list, even if it's queueing a single skb and this was triggering expensive calls to spin_lock_irqsave/_irqrestore for every data chunk received.
As SCTP will deliver each data chunk on a corresponding recvmsg, the more effective the change will be. Before this patch, with chunks with 30 bytes: netperf -t SCTP_STREAM -H 192.168.1.2 -cC -l 60 -- -m 30 -S 400000 400000 -s 400000 400000 on a 10Gbit link with 1500 MTU:
SCTP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.1 () port 0 AF_INET Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB
425984 425984 30 60.00 137.45 7.34 7.36 52.504 52.608
With it:
SCTP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.1 () port 0 AF_INET Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % S us/KB us/KB
425984 425984 30 60.00 179.10 7.97 6.70 43.740 36.788
Signed-off-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 936d4b41b08f566d0901e81321e4f51ae35c1f45 Merge: 993feee 7d5e142 Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 17:21:10 2016 -0400
Merge branch 'mlx5_ifc-updates'
Saeed Mahameed says:
==================== mlx5_core: mlx5_ifc updates
This series include mlx5_core updates for both net-next and rdma trees for 4.7 kernel cycle. This is the only shared code planned for 4.7 between rdma and net trees. Hopefully, this will prevent future conflicts when merging between ib-next and net-next once 4.7 cycle is over and merge window is opened.
Both Mellanox rdma and net submissions will proceed once this series is applied into both trees.
Future shared code will be sent to both maintainers as pull requests from Mellanox's kernel.org tree.
We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 7d5e14237a551a5de3d287f2e8db2d044ee81a1a Author: Saeed Mahameed saeedm@mellanox.com Date: Mon Apr 11 23:10:22 2016 +0300
net/mlx5: Update mlx5_ifc hardware features
Adding the needed mlx5_ifc hardware bits and structs for the following feature:
* Add vport to steering commands for SRIOV ACL support * Add mlcr, pcmr and mcia registers for dump module EEPROM * Add support for FCS, baeacon led and disable_link bits to hca caps * Add CQE period mode bit in CQ context for CQE based CQ moderation support * Add umr SQ bit for fragmented memory registration * Add needed bits and caps for Striding RQ support
Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: Matan Barak matanb@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit e1c9c62b9a3a761b56359a7437215ae2e9253821 Author: Tariq Toukan tariqt@mellanox.com Date: Mon Apr 11 23:10:21 2016 +0300
net/mlx5: Fix mlx5 ifc cmd_hca_cap bad offsets
All reserved fields after early_vf_enable are off by 1, since early_vf_enable was not explicitly declared as array of size 1.
Reserved field before cqe_zip had a wrong size, it should be 0x80 + 0x3f.
Fixes: b0844444590e ("net/mlx5_core: Introduce access function to read internal timer ") Fixes: b4ff3a36d3e4 ("net/mlx5: Use offset based reserved field names in the IFC header file") Signed-off-by: Tariq Toukan tariqt@mellanox.com Signed-off-by: Saeed Mahameed saeedm@mellanox.com Signed-off-by: Matan Barak matanb@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 993feee9795bb8f5368207ce075a9060bcb2c649 Merge: ee1c279 14db81d Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 17:08:09 2016 -0400
Merge branch 'qed-tunneling-offload'
Manish Chopra says:
==================== qed/qede: Add tunneling support
This patch series adds support for VXLAN, GRE and GENEVE tunnels to be used over this driver. With this support, adapter can perform TSO offload, inner/outer checksums offloads on TX and RX for encapsulated packets.
V1->V2 [ Comments from Jesse Gross incorporated ] * Drop general infrastructure change patch. "net: Make vxlan/geneve default udp ports public" * Remove by default Linux default UDP ports configurations in driver. Instead, use general registration APIs for UDP port configurations * Removing .ndo_features_check - we will add it later with proper change.
Please consider applying this series to net-next. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 14db81defa1fb6dd2ff154fb9facb4243ad63b95 Author: Manish Chopra manish.chopra@qlogic.com Date: Thu Apr 14 01:38:33 2016 -0400
qede: Add fastpath support for tunneling
This patch enables netdev tunneling features and adds TX/RX fastpath support for tunneling in driver.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Ariel Elior Ariel.Elior@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit f7985869209b6d0c71c2cb1fd6fba0522d2c2b61 Author: Manish Chopra manish.chopra@qlogic.com Date: Thu Apr 14 01:38:32 2016 -0400
qed: Enable GRE tunnel slowpath configuration
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Ariel Elior Ariel.Elior@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9a109dd073582f69eba591888e64aa617340da6f Author: Manish Chopra manish.chopra@qlogic.com Date: Thu Apr 14 01:38:31 2016 -0400
qed/qede: Add GENEVE tunnel slowpath configuration support
This patch enables GENEVE tunnel on the adapter and add support for driver hooks to configure UDP ports for GENEVE tunnel offload to be performed by the adapter.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Ariel Elior Ariel.Elior@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit b18e170cac62cb7c46d6778c50d7335e01ce566f Author: Manish Chopra manish.chopra@qlogic.com Date: Thu Apr 14 01:38:30 2016 -0400
qed/qede: Add VXLAN tunnel slowpath configuration support
This patch enables VXLAN tunnel on the adapter and add support for driver hooks to configure UDP ports for VXLAN tunnel offload to be performed by the adapter.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Ariel Elior Ariel.Elior@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 464f664501816ef5fbbc00b8de96f4ae5a1c9325 Author: Manish Chopra manish.chopra@qlogic.com Date: Thu Apr 14 01:38:29 2016 -0400
qed: Add infrastructure support for tunneling
This patch adds various structure/APIs needed to configure/enable different tunnel [VXLAN/GRE/GENEVE] parameters on the adapter.
Signed-off-by: Manish Chopra manish.chopra@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: Ariel Elior Ariel.Elior@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit ee1c27977284907d40f7f72c2d078d709f15811f Author: Peter Heise mail@pheise.de Date: Wed Apr 13 13:52:22 2016 +0200
net/hsr: Added support for HSR v1
This patch adds support for the newer version 1 of the HSR networking standard. Version 0 is still default and the new version has to be selected via iproute2.
Main changes are in the supervision frame handling and its ethertype field.
Signed-off-by: Peter Heise peter.heise@airbus.com Signed-off-by: David S. Miller davem@davemloft.net
commit 125c8d1233b7dd4688f14dd992d724c20d055dee Merge: ac18dd9 8804b27 Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 16:45:45 2016 -0400
Merge branch 'tcp-synflood-perf'
Eric Dumazet says:
==================== tcp: final work on SYNFLOOD behavior
In the first patch, I remove the costly association of SYNACK+COOKIES to a listener. I believe other parts of the stack should be ready.
The second patch removes a useless write into listener socket in tcp_rcv_state_process(), incurring false sharing in tcp_conn_request()
Performance under SYNFLOOD goes from 3.2 Mpps to 6 Mpps.
Test was using a single TCP listener, on a host with 8 RX queues on the NIC, and 24 cores (48 ht) ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 8804b2722dc5d6f9b7ba0a9e812eae9ee5ce95bc Author: Eric Dumazet edumazet@google.com Date: Wed Apr 13 22:05:40 2016 -0700
tcp: remove false sharing in tcp_rcv_state_process()
Last known hot point during SYNFLOOD attack is the clearing of rx_opt.saw_tstamp in tcp_rcv_state_process()
It is not needed for a listener, so we move it where it matters.
Performance while a SYNFLOOD hits a single listener socket went from 5 Mpps to 6 Mpps on my test server (24 cores, 8 NIC RX queues)
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b3d051477cf94e9d71d6acadb8a90de15237b9c1 Author: Eric Dumazet edumazet@google.com Date: Wed Apr 13 22:05:39 2016 -0700
tcp: do not mess with listener sk_wmem_alloc
When removing sk_refcnt manipulation on synflood, I missed that using skb_set_owner_w() was racy, if sk->sk_wmem_alloc had already transitioned to 0.
We should hold sk_refcnt instead, but this is a big deal under attack. (Doing so increase performance from 3.2 Mpps to 3.8 Mpps only)
In this patch, I chose to not attach a socket to syncookies skb.
Performance is now 5 Mpps instead of 3.2 Mpps.
Following patch will remove last known false sharing in tcp_rcv_state_process()
Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit ac18dd9e842294377dbaf1e8d169493567a81fa1 Author: Amitoj Kaur Chawla amitoj1606@gmail.com Date: Sat Apr 9 17:27:45 2016 +0530
qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
Replace deprecated create_singlethread_workqueue with alloc_ordered_workqueue.
Work items include getting tx/rx frame sizes, resetting MPI processor, setting asic recovery bit so ordering seems necessary as only one work item should be in queue/executing at any given time, hence the use of alloc_ordered_workqueue.
WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in memory reclaim path, so to guarantee forward progress regardless of memory pressure.
Signed-off-by: Amitoj Kaur Chawla amitoj1606@gmail.com Acked-by: Tejun Heo tj@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 0818556cd0afe4104139eb094f4112f9781c0f7e Merge: 25fb0b6 34b9cd6 Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 16:09:07 2016 -0400
Merge branch 'tipc-link-setup-improvements'
Jon Maloy says:
==================== tipc: improvements to the link setup algorithm
This series addresses some smaller issues regarding the link setup algorithm. The first commit fixes a rare bug we have discovered during testing; the second one may have some future impact on cluster scalabilty, while remaining ones can be regarded as cosmetic in a wider sense of the word. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 34b9cd64c889d41eb990aec33fc185cab706c9b0 Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Fri Apr 15 13:33:07 2016 -0400
tipc: let first message on link be a state message
According to the link FSM, a received traffic packet can take a link from state ESTABLISHING to ESTABLISHED, but the link can still not be fully set up in one atomic operation. This means that even if the the very first packet on the link is a traffic packet with sequence number 1 (one), it has to be dropped and retransmitted.
This can be avoided if we let the mentioned packet be preceded by a LINK_PROTOCOL/STATE message, which takes up the endpoint before the arrival of the traffic.
We add this small feature in this commit.
This is a fully compatible change.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit de7e07f9ee14f47d05aa43046404c2904f0247dc Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Fri Apr 15 13:33:06 2016 -0400
tipc: ensure that first packets on link are sent in order
In some link establishment scenarios we see that packet #2 may be sent out before packet #1, forcing the receiver to demand retransmission of the missing packet. This is harmless, but may cause confusion among people tracing the packet flow.
Since this is extremely easy to fix, we do so by adding en extra send call to the bearer immediately after the link has come up.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 42b18f605feaf7aa1825b35656bb7d6fdc132b45 Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Fri Apr 15 13:33:05 2016 -0400
tipc: refactor function tipc_link_timeout()
The function tipc_link_timeout() is unnecessary complex, and can easily be made more readable.
We do that with this commit. The only functional change is that we remove a redundant test for whether the broadcast link is up or not.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 88e8ac7000dc7ccf99975cc4070907e26a1027f9 Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Fri Apr 15 13:33:04 2016 -0400
tipc: reduce transmission rate of reset messages when link is down
When a link is down, it will continuously try to re-establish contact with the peer by sending out a RESET or an ACTIVATE message at each timeout interval. The default value for this interval is currently 375 ms. This is wasteful, and may become a problem in very large clusters with dozens or hundreds of nodes being down simultaneously.
We now introduce a simple backoff algorithm for these cases. The first five messages are sent at default rate; thereafter a message is sent only each 16th timer interval.
This will cover the vast majority of link recycling cases, since the endpoint starting last will transmit at the higher speed, and the link should normally be established well be before the rate needs to be reduced.
The only case where we will see a degradation of link re-establishment times is when the endpoints remain intact, and a glitch in the transmission media is causing the link reset. We will then experience a worst-case re-establishing time of 6 seconds, something we deem acceptable.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 634696b197411e7a95b346d6e5c21841f29fcedd Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Fri Apr 15 13:33:03 2016 -0400
tipc: guarantee peer bearer id exchange after reboot
When a link endpoint is going down locally, e.g., because its interface is being stopped, it will spontaneously send out a RESET message to its peer, informing it about this fact. This saves the peer from detecting the failure via probing, and hence gives both speedier and less resource consuming failure detection on the peer side.
According to the link FSM, a receiver of a RESET message, ignoring the reason for it, must now consider the sender ready to come back up, and starts periodically sending out ACTIVATE messages to the peer in order to re-establish the link. Also, according to the FSM, the receiver of an ACTIVATE message can now go directly to state ESTABLISHED and start sending regular traffic packets. This is a well-proven and robust FSM.
However, in the case of a reboot, there is a small possibilty that link endpoint on the rebooted node may have been re-created with a new bearer identity between the moment it sent its (pre-boot) RESET and the moment it receives the ACTIVATE from the peer. The new bearer identity cannot be known by the peer according to this scenario, since traffic headers don't convey such information. This is a problem, because both endpoints need to know the correct value of the peer's bearer id at any moment in time in order to be able to produce correct link events for their users.
The only way to guarantee this is to enforce a full setup message exchange (RESET + ACTIVATE) even after the reboot, since those messages carry the bearer idientity in their header.
In this commit we do this by introducing and setting a "stopping" bit in the header of the spontaneously generated RESET messages, informing the peer that the sender will not be immediately ready to re-establish the link. A receiver seeing this bit must act as if this were a locally detected connectivity failure, and hence has to go through a full two- way setup message exchange before any link can be re-established.
Although never reported, this problem seems to have always been around.
This protocol addition is fully backwards compatible.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 171a900c4eb7b34667e64ffed316a50425b45581 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:21 2016 -0400
rtl8xxxu: MAINTAINERS: Update to point to the active devel branch
Update the MAINTAINERS info to reflect active development of the rtl8xxxu driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 265697eb2f1b6c472c4b09ff7e008bc8ab145b4f Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:20 2016 -0400
rtl8xxxu: Pause TX before calling disable_rf()
All the disable_rf() functions were setting REG_TXPAUSE to 0xff to stop transmission. Do it centrally before calling disable_rf() instead.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ae5c01fd2fd816486169787440bf900d1b703230 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:19 2016 -0400
rtl8xxxu: Implement rtl8192e_enable_rf()
This implements an 8192eu specific enable_rf() function. The 8192eu is not a combo device, so no need for doing the BT specific bits needed by the 8723bu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 6a62f9d5273dbc8ec776717a73a8a223b9e5f38e Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:18 2016 -0400
rtl8xxxu: Fix OOPS if user tries to add device via /sys
This driver relies on driver_info in struct usb_device_id, so allowing adding a device via /sys/bus/usb/drivers/rtl8xxxu/new_id will cause a NULL pointer dereference.
Set .no_dynamic_id = 1 to disable hot add of USB IDs.
Reported-by: Xose Vazquez Perez xose.vazquez@gmail.com Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit cabb550e2b97b8ea42124a93d4665ca052f3e3ff Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:17 2016 -0400
rtl8xxxu: Fix 8188RU support
The 8188RU does not like PAPE to be enabled, while all the other gen1 parts seem to require it.
This makes the RTL8188RU able to associate for me.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2fc0b8e5a17dc415508d918eeeb1aa47443ae642 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:16 2016 -0400
rtl8xxxu: Add TX power base values for gen1 parts
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b9f9d6992f8338e919c977e4e18473f57dcb874d Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:15 2016 -0400
rtl8xxxu: Set register 0xfe10 on rtl8192cu based parts
This register is undocumented in the vendor code, but it is set unconditionally for all 8192cu/8188cu/8188ru parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit eb18806261da3de958b5569fb6d93ed0d773028b Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:14 2016 -0400
rtl8xxxu: Update copyright statement to include 2016
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8cae2f1da87c82b2a0031f4d19c142e7bc22f1d7 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:13 2016 -0400
rtl8xxxu: Unregister from mac80211 before shutting down the device
This fixes a long standing bug where mac80211 would send disconnect packets to the device, after we had shut down the device.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8e25496090431553ce2200f53bbe194b9e0a19d2 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:12 2016 -0400
rtl8xxxu: Match 8723bu power down sequence to vendor driver
In particular set APS_FSMCO_WLON_RESET in the right register, and do not overwrite too much of REG_CR.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8d95c8084f5621240006f730986a3346b7794863 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:11 2016 -0400
rtl8xxxu: Use rtl_chip == RTL8188R to identify high PA parts
This is simpler than checking for RTL8188C && hi_pa.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 78a8421959af5e13dd96493e3b74d8d7c7406609 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:10 2016 -0400
rtl8xxxu: Apply 8188RU workaround for UMC B cut parts correctly
This patch was being missed since rtl_chip will never match RTL8188C if hi_pa is true.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b591e982bc44baf79f6ebb963eb47fe5e223e8e7 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:09 2016 -0400
rtl8xxxu: For devices with external PA (8188RU), limit CCK TX power
Per the vendor driver, devices with an external PA needs limiting it's TX power to 0x20.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 4062b8ffec36df80d808d3bc3352e0f9c9abd3de Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:08 2016 -0400
rtl8xxxu: Move PHY RF init into device specific functions
Load the RF table in init_phy_rf(), which allows for applying device specific RF hacks in the same place. Getting rid of more ugly if () clutter.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 37ba4b6265ea0aa6c3369e4cf736ecbac31c40c9 Author: Colin Ian King colin.king@canonical.com Date: Thu Apr 14 16:37:07 2016 -0400
rtl8xxxu: fix uninitialized return value in ret
several functions are not initializing a return status in ret resulting in garbage to be returned instead of 0 for success. Currently, the calls to these functions are not checking the return, however, it seems prudent to return the correct status in case they are to be checked at a later date.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e1d70c9b04000ee122c450627ed0614c676339a5 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 16:37:06 2016 -0400
rtl8xxxu: Mark 0x050d:0x1004 as tested
This dongle was tested successfully by Andrea Merello
Reported-by: Andrea Merello andrea.merello@gmail.com Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a39b683966559902dab4ea7d24b3223102d6971f Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:07 2016 -0400
Re-enable 8192eu support
Revert "rtl8xxxu: Temporarily disable 8192eu device init"
This reverts commit ccfe1e85322090649d2fae599e55300c1512bf15.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 46b378318de9e8e9d3b479e6adb2cec55c01c2ef Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:06 2016 -0400
rtl8xxxu: 8192eu Fix bug in LDPC RX hang fix
Write the adjusted value back to the correct register
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 31133da702e4229acbd813350660f3053daa57c6 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:05 2016 -0400
rtl8xxxu: Remove unneeded 8192eu hack
This removes an unneeded hack for 8192eu, and allows for initializing REG_FPGA0_XAB_RF_SW_CTRL at the same point as it is done for all other parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 747bf237592cd7237e52692772a3fe3abeca0872 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:04 2016 -0400
rtl8xxxu: Split USB quirks into gen1 and gen2 quirks
This removes a bunch of if () spaghetti and re-applies the USB bus quirks for 8188/8192 that had gotten lost.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 9b323ee97af6e0c982b57ba0a21db14728dd4476 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:03 2016 -0400
rtl8xxxu: Make PBP tuning a fileops parameter
Rather than scattering the code with #ifdefs, use the fileops structure to hold device specific PBP values.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a77372069119061313b4815d119b5fbde0676dbb Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:02 2016 -0400
rtl8xxxu: Do not backup RF_MODE_AG when it's never being used
This was expired by the vendor driver, but we never ended up using the backed up value.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 24e8e7ec331d04c329048d3b85034c54d23f4fab Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:01 2016 -0400
rtl8xxxu: Store device specific TRXFF boundary in the fileops
This removes another case of ugly if () clutter
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b84cac16f0f42b9b3f6210984c939f712c471026 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:59:00 2016 -0400
rtl8xxxu: REG_LDOA15_CTRL is only used on gen1 parts
Move setting it to rtl8723au_init_phy_bb()
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c82f8d113e354588fe3351b10e0c1ea154f5c600 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:59 2016 -0400
rtl8xxxu: Move loading of AGC table to device specific function
This moves the loading of the AGC table into init_phy_bb() and reduces the if() clutter.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ade0dedde11923e1d1f17bd81395b627821ad49c Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:58 2016 -0400
rtl8xxxu: Load AGC table before patching for 1T2R parts
This should get the order right and avoid patching something that is later overwritten.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit cb8772504a27d7ada67840efe5439f3df3621e13 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:57 2016 -0400
rtl8xxxu: Split rtl8xxxu_init_phy_bb() into device specific functions
This reduces the if () clutter. Longer term it probably makes sense to split this between gen1 (8723au/8188cu/8192cu) and gen2 (8192eu/8723bu) devices.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit bd8fe40cc4f30f3f0982345135d97a676d1d3652 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:56 2016 -0400
rtl8xxxu: Use descriptive bits for setting RX paths for 1T2R parts
This reduce the use of magic values a little.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 9068308ad185a3c2c5d7beb77146b6df7b96b9c6 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:55 2016 -0400
rtl8xxxu: Correctly mask what was read from REG_CCK0_AFE_SETTING
The old code incorrectly wiped out bits 0-23 by mistake when setting the RX path for 1T parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 15f9dc99237df4b29f000464c35925bb0a56ead7 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:54 2016 -0400
rtl8xxxu: Remove unused 8723bu path B IQ calibration code
The 8723bu is a combo WiFi/BT dongle, and path B is not used for WiFi, so no point in calibrating it.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit fe62171fb5cac42d0ff665e61b2735965e9efd45 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:53 2016 -0400
rtl8xxxu: Remove misleading warning from rtl8192eu_phy_iqcalibrate()
No actual code flow change, but no need to warn about something that isn't a prioblem.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a49c7ce183cd78c9786348f8dea3d8027cee8177 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:52 2016 -0400
rtl8xxxu: Name RX descriptor types rxdesc16/rxdesc24
This caught a bug where too little memory was allocated for RX urbs for parts using 24 byte RX descriptors
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2cb79eb74f08f0217a6c4f21ddc42627016771ff Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:51 2016 -0400
rtl8xxxu: byteswap the entire RX descriptor for 24 byte RX descriptors
This shouldn't affect little endian system, but may have prevented the driver working on big endian systems for devices with the larger 24 byte RX descriptors.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 55c0b6ae1e7b1a402f23ca8fafa1874f854b4834 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:50 2016 -0400
rtl8xxxu: Use has_s0s1 for REG_S0S1 issues only
Instead use tx_desc_size() to distinguish between gen1 (8723a/8192c/8188c) and gen2 (8723b/8192e) parts.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 57e42a21a941decc15f1198db64fe3959b066096 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:49 2016 -0400
rtl8xxxu: Implment rtl8192e_set_tx_power()
8192eu is a 2T part, so setting TX power for path A only, as done by rtl8723bu_set_tx_power() is not sufficient.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 5bdb6b0859887bad5c83639ca9fb2d5fd0d5a8a0 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:48 2016 -0400
rtl8xxxu: Do not try to set REG_LEDCFG2 on 8192eu
Presumably 8192eu devices do not have leds, so do not enable them.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b816901b3d20e9e2941b130139d440953c3b0ba8 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:47 2016 -0400
rtl8xxxu: Do not init FPGA0_TX_INFO on 8192eu
Like the 8723bu, the vendor driver does not set FPGA0_TX_INFO for 8192eu in the init sequence.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2e7c7b347d93e41a2c4adf9350da6a351f585810 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:46 2016 -0400
rtl8xxxu: Do not set REG_PBP on 8192eu
The vendor driver does not set REG_PBP on 8192eu. Whether this is due to the device not supporting it or simply an oversight in the vendor driver is not clear.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 0486e80b2a447fc94687505ca106091b15e61651 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:45 2016 -0400
rtl8xxxu: Reorder chip quirks to follow flow of 8192eu driver
Another flow order change to match the vendor driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 89c2a097df34362a5e8373749a2f81ca2503b598 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:44 2016 -0400
rtl8xxxu: Implement generic init_queue_reserved_page() function
Longer term we should switch all the chips over to use this function instead of the random chip specific ifdef hacks.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 59b24dad20d41c00b51f5ca549a9e83a53671bc9 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:43 2016 -0400
rtl8xxxu: Reorg more code to match the flow of the 8192eu vendor driver
This further reorganizes the init code flow to match that of the 8192eu vendor driver. This helps diffing the register write log against that of the vendor driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c157863d99797f6fed60e6e56d53afeb0bc3b436 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 14 14:58:42 2016 -0400
rtl8xxxu: Reorder parts of init code to match the 8192eu vendor code flow
In order to debug 8192eu support, reorder some init code to match the flow of the vendor driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 85abfb1239ecda32222c161670667c7b2f6832be Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:11 2016 +0100
mwifiex: make mwifiex_insert_cmd_to_free_q local static
after factoring out mwifiex_cancel_pending_scan_cmd the function is not called outside of cmdevt file moved function to head of file to avoid forward declaration, also moved mwifiex_recycle_cmd_node since they are very similar
Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c70ca8cb9a7c6722d5bb6d428b6571921998c48d Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:10 2016 +0100
mwifiex: factor out mwifiex_cancel_pending_scan_cmd
Releasing the scan_pending lock in mwifiex_check_next_scan_command introduces a short window where pending scan commands can be removed or added before removing them all in mwifiex_cancel_pending_scan_cmd. I think this is safe, since the worst thing to happen is that a pending scan cmd is removed by the command handler. Adding new scan commands is not possible while one is pending, see scan_processing flag. Since all commands are removed from the queue anyway, we don't care if some commands are removed by a different code path earlier, the final state remains the same. I assume, that the critical section needed for the check has been extended over clearing the pending scan queue out of convenience. The lock was already held and releasing it and grab it again was just more work. It doesn't seem to be necessary because of concurrency.
Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 948ad6b34943a1247653392d59bcfc9896da8fe7 Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:09 2016 +0100
mwifiex: scan: replace pointer arithmetic with array access
improves readability
Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 679b687bc96ddf2ef077ca4aa755924032bd18a8 Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:08 2016 +0100
mwifiex: scan: factor out dbg_security_flags
merge copy/paste code
Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2ccf7cef0cf984241d0b6932ed1cfb1e0d6587d5 Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:07 2016 +0100
mwifiex: scan: simplify ternary operators using gnu extension
"x ? x : y" can be simplified as "x ? : y" https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals
Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 38329568c3f7075c7751984a65e16a9c7fc186bd Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:06 2016 +0100
mwifiex: scan: factor out has_ieee_hdr/has_vendor_hdr
Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 0a233c98a8e933a65aec07663d3a2953c7642bbc Author: Andreas Fenkart afenkart@gmail.com Date: Thu Mar 10 09:44:05 2016 +0100
mwifiex: scan: simplify dereference of bss_desc fields
given this structure: struct foo { struct bar { int baz; } }
these accesses are equivalent: (*(foo->bar)).baz foo->bar->baz
Signed-off-by: Andreas Fenkart afenkart@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 25fb0b6c73122a4718cf218a164e468b11449a2d Merge: de33efd b94cdab Author: David S. Miller davem@davemloft.net Date: Fri Apr 15 13:02:43 2016 -0400
Merge branch 'mlxsw-next'
Jiri Pirko says:
==================== mlxsw: spectrum_buffers: couple of cosmetic patches
As suggested by David Laight ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit b94cdabbf174a197020632748339392b494494e5 Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 15 15:09:38 2016 +0200
mlxsw: spectrum_buffers: Use MLXSW_SP_PB_UNUSED define for unused pb
Suggested-by: David Laight David.Laight@ACULAB.COM Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit ce78f020429c649b206e2fd7d44411fbc1ec920e Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 15 15:09:37 2016 +0200
mlxsw: spectrum_buffers: Use designated initializers for mlxsw_sp_pbs
Suggested-by: David Laight David.Laight@ACULAB.COM Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit de33efd0fb7f923cd41671b1f743c3a0d44dd953 Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 15 09:17:08 2016 +0200
devlink: fix sb register stub in case devlink is disabled
Reported-by: kbuild test robot fengguang.wu@intel.com Fixes: bf7974710a40 ("devlink: add shared buffer configuration") Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 608b9977260f67d8b032ea170666a6174a48e2f1 Author: Paolo Abeni pabeni@redhat.com Date: Wed Apr 13 10:52:20 2016 +0200
tun: use per cpu variables for stats accounting
Currently the tun device accounting uses dev->stats without applying any kind of protection, regardless that accounting happens in preemptible process context. This patch move the tun stats to a per cpu data structure, and protect the updates with u64_stats_update_begin()/u64_stats_update_end() or this_cpu_inc according to the stat type. The per cpu stats are aggregated by the newly added ndo_get_stats64 ops.
Signed-off-by: Paolo Abeni pabeni@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 548aacdd742b963983f13c523dad8c169c406a19 Merge: 486bdee 3f2050e Author: David S. Miller davem@davemloft.net Date: Thu Apr 14 21:40:53 2016 -0400
Merge branch 'bpf-ARG_PTR_TO_RAW_STACK'
Merge branch 'bpf-ARG_PTR_TO_RAW_STACK'
Daniel Borkmann says:
==================== BPF updates
This series adds a new verifier argument type called ARG_PTR_TO_RAW_STACK and converts related helpers to make use of it. Basic idea is that we can save init of stack memory when the helper function is guaranteed to fully fill out the passed buffer in every path. Series also adds test cases and converts samples. For more details, please see individual patches. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 3f2050e20e6f3a762eb08397db651dcec9498998 Author: Daniel Borkmann daniel@iogearbox.net Date: Wed Apr 13 00:10:54 2016 +0200
bpf, samples: add test cases for raw stack
This adds test cases mostly around ARG_PTR_TO_RAW_STACK to check the verifier behaviour.
[...] #84 raw_stack: no skb_load_bytes OK #85 raw_stack: skb_load_bytes, no init OK #86 raw_stack: skb_load_bytes, init OK #87 raw_stack: skb_load_bytes, spilled regs around bounds OK #88 raw_stack: skb_load_bytes, spilled regs corruption OK #89 raw_stack: skb_load_bytes, spilled regs corruption 2 OK #90 raw_stack: skb_load_bytes, spilled regs + data OK #91 raw_stack: skb_load_bytes, invalid access 1 OK #92 raw_stack: skb_load_bytes, invalid access 2 OK #93 raw_stack: skb_load_bytes, invalid access 3 OK #94 raw_stack: skb_load_bytes, invalid access 4 OK #95 raw_stack: skb_load_bytes, invalid access 5 OK #96 raw_stack: skb_load_bytes, invalid access 6 OK #97 raw_stack: skb_load_bytes, large access OK Summary: 98 PASSED, 0 FAILED
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 02413cabd6b67f1444f153ea85d44076deae2056 Author: Daniel Borkmann daniel@iogearbox.net Date: Wed Apr 13 00:10:53 2016 +0200
bpf, samples: don't zero data when not needed
Remove the zero initialization in the sample programs where appropriate. Note that this is an optimization which is now possible, old programs still doing the zero initialization are just fine as well. Also, make sure we don't have padding issues when we don't memset() the entire struct anymore.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 074f528eed408b467516e142fa4c45e5b0d2ba16 Author: Daniel Borkmann daniel@iogearbox.net Date: Wed Apr 13 00:10:52 2016 +0200
bpf: convert relevant helper args to ARG_PTR_TO_RAW_STACK
This patch converts all helpers that can use ARG_PTR_TO_RAW_STACK as argument type. For tc programs this is bpf_skb_load_bytes(), bpf_skb_get_tunnel_key(), bpf_skb_get_tunnel_opt(). For tracing, this optimizes bpf_get_current_comm() and bpf_probe_read(). The check in bpf_skb_load_bytes() for MAX_BPF_STACK can also be removed since the verifier already makes sure we stay within bounds on stack buffers.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 435faee1aae9c1ac231f89e4faf0437bfe29f425 Author: Daniel Borkmann daniel@iogearbox.net Date: Wed Apr 13 00:10:51 2016 +0200
bpf, verifier: add ARG_PTR_TO_RAW_STACK type
When passing buffers from eBPF stack space into a helper function, we have ARG_PTR_TO_STACK argument type for helpers available. The verifier makes sure that such buffers are initialized, within boundaries, etc.
However, the downside with this is that we have a couple of helper functions such as bpf_skb_load_bytes() that fill out the passed buffer in the expected success case anyway, so zero initializing them prior to the helper call is unneeded/wasted instructions in the eBPF program that can be avoided.
Therefore, add a new helper function argument type called ARG_PTR_TO_RAW_STACK. The idea is to skip the STACK_MISC check in check_stack_boundary() and color the related stack slots as STACK_MISC after we checked all call arguments.
Helper functions using ARG_PTR_TO_RAW_STACK must make sure that every path of the helper function will fill the provided buffer area, so that we cannot leak any uninitialized stack memory. This f.e. means that error paths need to memset() the buffers, but the expected fast-path doesn't have to do this anymore.
Since there's no such helper needing more than at most one ARG_PTR_TO_RAW_STACK argument, we can keep it simple and don't need to check for multiple areas. Should in future such a use-case really appear, we have check_raw_mode() that will make sure we implement support for it first.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 33ff9823c569f3aceb071071914919177a6bed6a Author: Daniel Borkmann daniel@iogearbox.net Date: Wed Apr 13 00:10:50 2016 +0200
bpf, verifier: add bpf_call_arg_meta for passing meta data
Currently, when the verifier checks calls in check_call() function, we call check_func_arg() for all 5 arguments e.g. to make sure expected types are correct. In some cases, we collect meta data (here: map pointer) to perform additional checks such as checking stack boundary on key/value sizes for subsequent arguments. As we're going to extend the meta data, add a generic struct bpf_call_arg_meta that we can use for passing into check_func_arg().
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 486bdee0134cf21c3714ded809d5933d2b8dfb81 Author: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Date: Tue Apr 12 18:11:31 2016 -0300
sctp: add support for RPS and RFS
This patch adds what's missing to properly support RPS and RFS on SCTP, as some of it is already implemented in common calls.
Having support for RPS and RFS allows better scaling specially because not all NICs support hashing SCTP headers.
Save the hash right when we dequeue a skb from inqueue so we do it only once per skb instead of per chunk. New sockets will then inherit the hash through sctp_copy_sock().
Signed-off-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit d21fd63ea3856208c3a1cb9b26d81898a2ccf71b Author: Eric Dumazet edumazet@google.com Date: Tue Apr 12 21:50:07 2016 -0700
net: validate_xmit_skb() changes
skbs given to validate_xmit_skb() should not have a next pointer anymore.
Also if a packet is dropped, increment dev->tx_dropped __dev_queue_xmit() no longer has to change tx_dropped in this case.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit da37845fdce24e174f44d020bc4085ddd1c8a6bd Author: Weongyo Jeong weongyo.linux@gmail.com Date: Thu Apr 14 14:10:04 2016 -0700
packet: uses kfree_skb() for errors.
consume_skb() isn't for error cases that kfree_skb() is more proper one. At this patch, it fixed tpacket_rcv() and packet_rcv() to be consistent for error or non-error cases letting perf trace its event properly.
Signed-off-by: Weongyo Jeong weongyo.linux@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 333f796235a52727db7e0a13888045f3aa3d5335 Author: Parthasarathy Bhuvaragan parthasarathy.bhuvaragan@ericsson.com Date: Tue Apr 12 13:05:21 2016 +0200
tipc: fix a race condition leading to subscriber refcnt bug
Until now, the requests sent to topology server are queued to a workqueue by the generic server framework. These messages are processed by worker threads and trigger the registered callbacks. To reduce latency on uniprocessor systems, explicit rescheduling is performed using cond_resched() after MAX_RECV_MSG_COUNT(25) messages.
This implementation on SMP systems leads to an subscriber refcnt error as described below: When a worker thread yields by calling cond_resched() in a SMP system, a new worker is created on another CPU to process the pending workitem. Sometimes the sleeping thread wakes up before the new thread finishes execution. This breaks the assumption on ordering and being single threaded. The fault is more frequent when MAX_RECV_MSG_COUNT is lowered.
If the first thread was processing subscription create and the second thread processing close(), the close request will free the subscriber and the create request oops as follows:
[31.224137] WARNING: CPU: 2 PID: 266 at include/linux/kref.h:46 tipc_subscrb_rcv_cb+0x317/0x380 [tipc] [31.228143] CPU: 2 PID: 266 Comm: kworker/u8:1 Not tainted 4.5.0+ #97 [31.228377] Workqueue: tipc_rcv tipc_recv_work [tipc] [...] [31.228377] Call Trace: [31.228377] [<ffffffff812fbb6b>] dump_stack+0x4d/0x72 [31.228377] [<ffffffff8105a311>] __warn+0xd1/0xf0 [31.228377] [<ffffffff8105a3fd>] warn_slowpath_null+0x1d/0x20 [31.228377] [<ffffffffa0098067>] tipc_subscrb_rcv_cb+0x317/0x380 [tipc] [31.228377] [<ffffffffa00a4984>] tipc_receive_from_sock+0xd4/0x130 [tipc] [31.228377] [<ffffffffa00a439b>] tipc_recv_work+0x2b/0x50 [tipc] [31.228377] [<ffffffff81071925>] process_one_work+0x145/0x3d0 [31.246554] ---[ end trace c3882c9baa05a4fd ]--- [31.248327] BUG: spinlock bad magic on CPU#2, kworker/u8:1/266 [31.249119] BUG: unable to handle kernel NULL pointer dereference at 0000000000000428 [31.249323] IP: [<ffffffff81099d0c>] spin_dump+0x5c/0xe0 [31.249323] PGD 0 [31.249323] Oops: 0000 [#1] SMP
In this commit, we - rename tipc_conn_shutdown() to tipc_conn_release(). - move connection release callback execution from tipc_close_conn() to a new function tipc_sock_release(), which is executed before we free the connection. Thus we release the subscriber during connection release procedure rather than connection shutdown procedure.
Signed-off-by: Parthasarathy Bhuvaragan parthasarathy.bhuvaragan@ericsson.com Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: David S. Miller davem@davemloft.net
commit edd93cd72741b80633969c247a2f86f177242cfb Merge: cb68926 f7a6272 Author: David S. Miller davem@davemloft.net Date: Thu Apr 14 16:23:42 2016 -0400
Merge branch 'gro-fixed-id-gso-partial'
Alexander Duyck says:
==================== GRO Fixed IPv4 ID support and GSO partial support
This patch series sets up a few different things.
First it adds support for GRO of frames with a fixed IP ID value. This will allow us to perform GRO for frames that go through things like an IPv6 to IPv4 header translation.
The second item we add is support for segmenting frames that are generated this way. Most devices only support an incrementing IP ID value, and in the case of TCP the IP ID can be ignored in many cases since the DF bit should be set. So we can technically segment these frames using existing TSO if we are willing to allow the IP ID to be mangled. As such I have added a matching feature for the new form of GRO/GSO called TCP IPv4 ID mangling. With this enabled we can assemble and disassemble a frame with the sequence number fixed and the only ill effect will be that the IPv4 ID will be altered which may or may not have any noticeable effect. As such I have defaulted the feature to disabled.
The third item this patch series adds is support for partial GSO segmentation. Partial GSO segmentation allows us to split a large frame into two pieces. The first piece will have an even multiple of MSS worth of data and the headers before the one pointed to by csum_start will have been updated so that they are correct for if the data payload had already been segmented. By doing this we can do things such as precompute the outer header checksums for a frame to be segmented allowing us to perform TSO on devices that don't support tunneling, or tunneling with outer header checksums.
This patch set is based on the net-next tree, but I included "net: remove netdevice gso_min_segs" in my tree as I assume it is likely to be applied before this patch set will and I wanted to avoid a merge conflict.
v2: Fixed items reported by Jesse Gross fixed missing GSO flag in MPLS check adding DF check for MANGLEID Moved extra GSO feature checks into gso_features_check Rebased batches to account for "net: remove netdevice gso_min_segs"
Driver patches from the first patch set should still be compatible. However I do have a few changes in them so I will submit a v2 of those to Jeff Kirsher once these patches are accepted into net-next.
Example driver patches for i40e, ixgbe, and igb: https://patchwork.ozlabs.org/patch/608221/ https://patchwork.ozlabs.org/patch/608224/ https://patchwork.ozlabs.org/patch/608225/ ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit f7a6272bf3cbd2576165dba020e0329c9ca67c1f Author: Alexander Duyck aduyck@mirantis.com Date: Sun Apr 10 21:45:09 2016 -0400
Documentation: Add documentation for TSO and GSO features
This document is a starting point for defining the TSO and GSO features. The whole thing is starting to get a bit messy so I wanted to make sure we have notes somwhere to start describing what does and doesn't work.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit 802ab55adc39a06940a1b384e9fd0387fc762d7e Author: Alexander Duyck aduyck@mirantis.com Date: Sun Apr 10 21:45:03 2016 -0400
GSO: Support partial segmentation offload
This patch adds support for something I am referring to as GSO partial. The basic idea is that we can support a broader range of devices for segmentation if we use fixed outer headers and have the hardware only really deal with segmenting the inner header. The idea behind the naming is due to the fact that everything before csum_start will be fixed headers, and everything after will be the region that is handled by hardware.
With the current implementation it allows us to add support for the following GSO types with an inner TSO_MANGLEID or TSO6 offload: NETIF_F_GSO_GRE NETIF_F_GSO_GRE_CSUM NETIF_F_GSO_IPIP NETIF_F_GSO_SIT NETIF_F_UDP_TUNNEL NETIF_F_UDP_TUNNEL_CSUM
In the case of hardware that already supports tunneling we may be able to extend this further to support TSO_TCPV4 without TSO_MANGLEID if the hardware can support updating inner IPv4 headers.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1530545ed64b42e87acb43c0c16401bd1ebae6bf Author: Alexander Duyck aduyck@mirantis.com Date: Sun Apr 10 21:44:57 2016 -0400
GRO: Add support for TCP with fixed IPv4 ID field, limit tunnel IP ID values
This patch does two things.
First it allows TCP to aggregate TCP frames with a fixed IPv4 ID field. As a result we should now be able to aggregate flows that were converted from IPv6 to IPv4. In addition this allows us more flexibility for future implementations of segmentation as we may be able to use a fixed IP ID when segmenting the flow.
The second thing this does is that it places limitations on the outer IPv4 ID header in the case of tunneled frames. Specifically it forces the IP ID to be incrementing by 1 unless the DF bit is set in the outer IPv4 header. This way we can avoid creating overlapping series of IP IDs that could possibly be fragmented if the frame goes through GRO and is then resegmented via GSO.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit cbc53e08a793b073e79f42ca33f1f3568703540d Author: Alexander Duyck aduyck@mirantis.com Date: Sun Apr 10 21:44:51 2016 -0400
GSO: Add GSO type for fixed IPv4 ID
This patch adds support for TSO using IPv4 headers with a fixed IP ID field. This is meant to allow us to do a lossless GRO in the case of TCP flows that use a fixed IP ID such as those that convert IPv6 header to IPv4 headers.
In addition I am adding a feature that for now I am referring to TSO with IP ID mangling. Basically when this flag is enabled the device has the option to either output the flow with incrementing IP IDs or with a fixed IP ID regardless of what the original IP ID ordering was. This is useful in cases where the DF bit is set and we do not care if the original IP ID value is maintained.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit 518f213dddb3375e8cf0fcb791dda4c7d1ce4c74 Author: Alexander Duyck aduyck@mirantis.com Date: Sun Apr 10 21:44:44 2016 -0400
ethtool: Add support for toggling any of the GSO offloads
The strings were missing for several of the GSO offloads that are available. This patch provides the missing strings so that we can toggle or query any of them via the ethtool command.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: David S. Miller davem@davemloft.net
commit cb689269acc8cf911a2b28d22da155ee83f8dbdc Merge: f38ba95 2d0ed39 Author: David S. Miller davem@davemloft.net Date: Thu Apr 14 16:22:12 2016 -0400
Merge branch 'mlxsw-devlink-shared-buffers'
Jiri Pirko says:
==================== devlink + mlxsw: add support for config and control of shared buffers
ASICs implement shared buffer for packet forwarding purposes and enable flexible partitioning of the shared buffer for different flows and ports, enabling non-blocking progress of different flows as well as separation of lossy traffic from loss-less traffic when using Per-Priority Flow Control (PFC). The shared buffer optimizes the buffer utilization for better absorption of packet bursts.
This patchset implements API which is based on the model SAI uses. That is aligned with multiple ASIC vendors so this API should be vendor neutral.
Userspace counterpart patchset for devlink iproute2 tool can be found here: https://github.com/jpirko/iproute2_mlxsw/tree/devlink_sb
Couple of examples of usage:
switch$ devlink sb help Usage: devlink sb show [ DEV [ sb SB_INDEX ] ] devlink sb pool show [ DEV [ sb SB_INDEX ] pool POOL_INDEX ] devlink sb pool set DEV [ sb SB_INDEX ] pool POOL_INDEX size POOL_SIZE thtype { static | dynamic } devlink sb port pool show [ DEV/PORT_INDEX [ sb SB_INDEX ] pool POOL_INDEX ] devlink sb port pool set DEV/PORT_INDEX [ sb SB_INDEX ] pool POOL_INDEX th THRESHOLD devlink sb tc bind show [ DEV/PORT_INDEX [ sb SB_INDEX ] tc TC_INDEX ] devlink sb tc bind set DEV/PORT_INDEX [ sb SB_INDEX ] tc TC_INDEX type { ingress | egress } pool POOL_INDEX th THRESHOLD devlink sb occupancy show { DEV | DEV/PORT_INDEX } [ sb SB_INDEX ] devlink sb occupancy snapshot DEV [ sb SB_INDEX ] devlink sb occupancy clearmax DEV [ sb SB_INDEX ]
switch$ devlink sb show pci/0000:03:00.0: sb 0 size 16777216 ing_pools 4 eg_pools 4 ing_tcs 8 eg_tcs 8
switch$ devlink sb pool show pci/0000:03:00.0: sb 0 pool 0 type ingress size 12400032 thtype dynamic pci/0000:03:00.0: sb 0 pool 1 type ingress size 0 thtype dynamic pci/0000:03:00.0: sb 0 pool 2 type ingress size 0 thtype dynamic pci/0000:03:00.0: sb 0 pool 3 type ingress size 200064 thtype dynamic pci/0000:03:00.0: sb 0 pool 4 type egress size 13220064 thtype dynamic pci/0000:03:00.0: sb 0 pool 5 type egress size 0 thtype dynamic pci/0000:03:00.0: sb 0 pool 6 type egress size 0 thtype dynamic pci/0000:03:00.0: sb 0 pool 7 type egress size 0 thtype dynamic
switch$ devlink sb port pool show sw0p7 pool 0 sw0p7: sb 0 pool 0 threshold 16
switch$ sudo devlink sb port pool set sw0p7 pool 0 th 15
switch$ devlink sb port pool show sw0p7 pool 0 sw0p7: sb 0 pool 0 threshold 15
switch$ devlink sb tc bind show sw0p7 tc 0 type ingress sw0p7: sb 0 tc 0 type ingress pool 0 threshold 10
switch$ sudo devlink sb tc bind set sw0p7 tc 0 type ingress pool 0 th 9
switch$ devlink sb tc bind show sw0p7 tc 0 type ingress sw0p7: sb 0 tc 0 type ingress pool 0 threshold 9
switch$ sudo devlink sb occupancy snapshot pci/0000:03:00.0
switch$ devlink sb occupancy show sw0p7 sw0p7: pool: 0: 82944/3217344 1: 0/0 2: 0/0 3: 0/0 4: 0/384 5: 0/0 6: 0/0 7: 0/0 itc: 0(0): 96768/3217344 1(0): 0/0 2(0): 0/0 3(0): 0/0 4(0): 0/0 5(0): 0/0 6(0): 0/0 7(0): 0/0 etc: 0(4): 0/384 1(4): 0/0 2(4): 0/0 3(4): 0/0 4(4): 0/0 5(4): 0/0 6(4): 0/0 7(4): 0/0
switch$ sudo devlink sb occupancy clearmax pci/0000:03:00.0 ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 2d0ed39fbdee64835dc710b4ee3897f2bb9f8cf4 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:30 2016 +0200
mlxsw: spectrum_buffers: Implement occupancy monitoring
Implement occupancy API introduced in devlink and mlxsw core. This is done by accessing SBPM register for Port-Pool and SBSR for Port-TC current and max occupancy values. Max clear is implemented using the same registers.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit caf7297e7ab5f8aa9d482200748a066adbfa5775 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:29 2016 +0200
mlxsw: core: Introduce support for asynchronous EMAD register access
So far it was possible to have one EMAD register access at a time, locked by mutex. This patch extends this interface to allow multiple EMAD register accesses to be in fly at once. That allows faster processing on firmware side avoiding unused time in between EMADs. Measured speedup is ~30% for shared occupancy snapshot operation.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit dd9bdb04d2d7c428b0203b5e4e435abc229fa656 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:28 2016 +0200
mlxsw: core: Add mlxsw specific workqueue and use it for FDB notif. processing
Follow-up patch is going to need to use delayed work as well and frequently. The FDB notification processing is already using that and also quite frequently. It makes sense to create separate workqueue just for mlxsw driver in this case and do not pollute system_wq.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 42a7f1d7747904d89e9831fb85a678add00facf3 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:27 2016 +0200
mlxsw: reg: Extend SBPM register for occupancy control
Since it is not possible to get and clear Port-Pool occupancy data using SBSR register, there's a need to implement that using SBPM. Extend pack helper and add unpack helper to get occupancy values.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 26176def3c1e7933601d04de3d4980199c1c87d1 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:26 2016 +0200
mlxsw: reg: Add Shared Buffer Status register definition
This register allows to query HW for current and maximal buffer usage.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1ceecc88d29bbbb0f8d0e49e3bf6d020dc582934 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:25 2016 +0200
mlxsw: core: Add devlink shared buffer occupancy callbacks
Add middle layer in mlxsw core code to forward shared buffer occupancy calls into specific ASIC drivers.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0f433fa0ecc59c1d0792937a26436bec8dd42b6d Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:24 2016 +0200
mlxsw: spectrum_buffers: Implement shared buffer configuration
Implement previously introduced mlxsw core shared buffer API. For Spectrum, that is done utilizing registers SBPR, SBCM and SBPM.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 325f2f197d730bb7f6f1af2ce93fedfd728e3eed Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:23 2016 +0200
mlxsw: core: Add mlxsw_core_port_driver_priv helper
Needed in following patch.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit c30a53c7de5e52249cd5381078f84082449ecc86 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:22 2016 +0200
mlxsw: spectrum_buffers: Get max_buff defaults into limits exposed to user
Although the device supports max_buff magic values 0 and 0xff, these are not exposed to the user via devlink. Therefore, adjust the default values to be within configurable range.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit bc872506f58c21d1ee44b1303a5f5d00354e72c5 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:21 2016 +0200
mlxsw: spectrum_buffers: Change initialization of PG 9
As explained in commit ff6551ec0c27 ("mlxsw: spectrum: Correctly configure headroom size") control packets are directed to priority group buffer 9 (PG9) in the ports' headroom buffers.
Since we don't want to drop control packets in case they can't be admitted to the switch's shared buffer we bind PG9 to a different ingress pool from the one used by all other PGs.
Unlike other PGs, we currently don't expose the binding between PG9 to a pool and leave it fixed.
Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5408f7cba341b26edf2fa5bcaaa37e52301830e2 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:20 2016 +0200
mlxsw: spectrum_buffers: Remove eg pool 3 default init and CPU port TC binding to it
Since there is no congestion control for CPU port traffic, we can change the CPU port TC binding to pool 0 with min_buff and max_buff zeroed. Remove initialization for pool egress pool 3 since it is no longer used by dafault.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 078f9c7132cbbe12c2484a817ca5f477d1641b61 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:19 2016 +0200
mlxsw: spectrum_buffers: Cache shared buffer configuration
In order to achieve faster dumping of current setting and also in order to provide possibility to get pool mode without a need to query hardware, do cache the configuration in driver.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit aa99bc70bac1bb6815ad30248d0e34b14cdec575 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:18 2016 +0200
mlxsw: spectrum_buffers: Rename "pool" to "pr" in initialization
Be consintent with rest of the registers (pm, cm) and use "pr" here.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b11c3b4018e630dfcbdc2b9fe7aaffce5da8cfd7 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:17 2016 +0200
mlxsw: spectrum_buffers: Push out indexes and direction out of SB structs
Structs are in arrays so use array index as pool/tc/prio index. With that, there is need to maintain separate arrays for ingress and egress.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 94266e3278ef862bb422575a31ceb166dab1b406 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:16 2016 +0200
mlxsw: spectrum_buffers: Push out shared buffer register writes
Pushed them into helper functions.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit a6179bf0d17a4d71075bad2a0b17a752fc973b64 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:15 2016 +0200
mlxsw: core: Add devlink shared buffer callbacks
Add middle layer in mlxsw core code to forward shared buffer calls into specific ASIC drivers.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit df38dafd255954ee7012785c62e615f595d5cb3c Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:14 2016 +0200
devlink: implement shared buffer occupancy monitoring interface
User needs to monitor shared buffer occupancy. For that, he issues a snapshot command in order to instruct hardware to catch current and maximal occupancy values, and clear command in order to clear the historical maximal values.
Also port-pool and tc-pool-bind command response messages are extended to carry occupancy values.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit bf7974710a40aaeb69dee7f62d91048bdaf79c76 Author: Jiri Pirko jiri@mellanox.com Date: Thu Apr 14 18:19:13 2016 +0200
devlink: add shared buffer configuration
Define userspace API and drivers API for configuration of shared buffers. Four basic objects are defined: shared buffer - attributes are size, number of pools and TCs pool - chunk of sharedbuffer definition, it has some size and either static or dynamic threshold port pool threshold - to set per-port threshold for each pool port tc threshold bind - to bind port and TC to specified pool with threshold.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4d16544d0bde4b19da30789a8715635fd9c3889d Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 13 14:14:16 2016 +0300
ath10k: fix parenthesis alignment
Found by checkpatch:
drivers/net/wireless/ath/ath10k/mac.c:6800: Alignment should match open parent
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 8f4ffb7de9630065040e8142d651708e85eeb863 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 13 14:14:02 2016 +0300
ath10k: prefer ether_addr_copy() over memcpy()
Fixes checkpatch warning:
drivers/net/wireless/ath/ath10k/wmi.c:5800: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c178da58c7aa73d1442ce10cc61df41224115d19 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 13 14:13:49 2016 +0300
ath10k: prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
Fixes checkpatch warnings:
drivers/net/wireless/ath/ath10k/mac.c:452: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() drivers/net/wireless/ath/ath10k/mac.c:455: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() drivers/net/wireless/ath/ath10k/txrx.c:133: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit beeb1a302f783b0ddeabafebf03f30d589df15eb Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 13 14:13:35 2016 +0300
ath10k: prefer kernel type 'u64' over 'u_int64_t'
Fixes checkpatch warnings:
drivers/net/wireless/ath/ath10k/htt.h:1477: Prefer kernel type 'u64' over 'u_int64_t' drivers/net/wireless/ath/ath10k/htt.h:1480: Prefer kernel type 'u64' over 'u_int64_t'
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 14e105cd4085c7bbf42f0eef8c677ad6c7d78a83 Author: Kalle Valo kvalo@qca.qualcomm.com Date: Wed Apr 13 14:13:21 2016 +0300
ath10k: fix checkpatch warnings related to spaces
Fix checkpatch warnings about use of spaces with operators:
spaces preferred around that '*' (ctx:VxV)
This has been recently added to checkpatch.
Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 84349698f05dc7ed6df6772d43175eb3703ed8dc Author: Vishal Thanki vishalthanki@gmail.com Date: Thu Apr 7 23:37:12 2016 +0200
mwifiex: fix the incorrect WARN_ON during suspend
During system suspend, there is a kernel WARNING issued if there is a pending command present. By marking the wait queue disabled after calling the command completion routine fixes it.
Signed-off-by: Vishal Thanki vishalthanki@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit bcc920e8f08336cbbdcdba7c4449c27137e6b4b9 Author: Amitkumar Karwar akarwar@marvell.com Date: Mon Apr 11 07:52:41 2016 -0700
mwifiex: fix incorrect ht capability problem
IEEE80211_CHAN_NO_HT40PLUS and IEEE80211_CHAN_NO_HT40PLUS channel flags tell if HT40 operation is allowed on a channel or not.
This patch ensures ht_capability information is modified accordingly so that we don't end up creating a HT40 connection when it's not allowed for current regulatory domain.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Cathy Luo cluo@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c3ec0ff6425b86655aa34b5c6cb0f7b6d559c6b2 Author: Xinming Hu huxm@marvell.com Date: Mon Apr 11 07:52:40 2016 -0700
mwifiex: do not wait on semaphore during card removal
Host hang is observed if card is removed before firmware download gets completed. In this case, firmware will be failed to download and adapter structure gets freed.
In other thread, mwifiex_remove_card() waits on semaphore until the firmware download fails. This wait is not necessary and may result in invalid adapter access.
This patch uses down_trylock to return immediately so that hang issue won't occur.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b9db397879333c272f2bc888cd713773e7d2604f Author: Shengzhen Li szli@marvell.com Date: Mon Apr 11 07:52:39 2016 -0700
mwifiex: add default setting for pcie firmware download
This patch adds default setting for pcie firmware download name in case that there are newer chipset version.
Signed-off-by: Shengzhen Li szli@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e87650bce9a5499f133341db99c9293bfb8a0282 Author: Shengzhen Li szli@marvell.com Date: Mon Apr 11 07:52:38 2016 -0700
mwifiex: add pcie usb/uart firmware download support
This patch adds support for downloading usb/uart firmware for 8997 chipset by reading the chip version.
Signed-off-by: Shengzhen Li szli@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c865a70098d9419d154f6d1ad97cd0150af968d1 Author: Amitkumar Karwar akarwar@marvell.com Date: Mon Apr 11 07:52:37 2016 -0700
mwifiex: missing break statement
This patch adds missing break statement at the end of PCIE_DEVICE_ID_MARVELL_88W8897 switch section.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c462ebcdfe425a132aaba950d114ac32de3cdf44 Author: Arend van Spriel arend@broadcom.com Date: Mon Apr 11 11:35:28 2016 +0200
brcmfmac: create common function for handling brcmf_proto_hdrpull()
In receive path brcmf_proto_hdrpull() needs to be called and handled similar in brcmf_rx_frame() and brcmf_rx_event(). Move that duplicated code in separate function.
Reviewed-by: Hante Meuleman hante.meuleman@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Reviewed-by: Franky Lin franky.lin@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 9c349892ccc90c6de2baaa69cc78449f58082273 Author: Arend van Spriel arend@broadcom.com Date: Mon Apr 11 11:35:27 2016 +0200
brcmfmac: revise handling events in receive path
Move event handling out of brcmf_netif_rx() avoiding the need to pass a flag. This flag is only ever true for USB hosts as other interface use separate brcmf_rx_event() function.
Reviewed-by: Hante Meuleman hante.meuleman@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Reviewed-by: Franky Lin franky.lin@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit bbd1f932e7c45ef173468ae2b49edefe52a8c835 Author: Arend van Spriel arend@broadcom.com Date: Mon Apr 11 11:35:26 2016 +0200
brcmfmac: cleanup ampdu-rx host reorder code
The code for ampdu-rx host reorder is related to the firmware signalling supported in BCDC protocol. This change moves the code to fwsignal module.
Reviewed-by: Hante Meuleman hante.meuleman@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Reviewed-by: Franky Lin franky.lin@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c56caa9db8abbbfb9e31325e0897705aa897db37 Author: Franky Lin franky.lin@broadcom.com Date: Mon Apr 11 11:35:25 2016 +0200
brcmfmac: screening firmware event packet
Firmware uses asynchronized events as a communication method to the host. The event packets are marked as ETH_P_LINK_CTL protocol type. For SDIO and PCIe bus, this kind of packets are delivered through virtual event channel not data channel. This patch adds a screening logic to make sure the event handler only processes the events coming from the correct channel.
Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Signed-off-by: Franky Lin franky.lin@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2aec2c9d42aa9ac4b31583cf4e1c7774e040e57d Author: Hante Meuleman hante.meuleman@broadcom.com Date: Mon Apr 11 11:35:24 2016 +0200
brcmfmac: fix p2p scan abort null pointer exception
When p2p connection setup is performed without having ever done an escan a null pointer exception can occur. This is because the ifp to abort scanning is taken from escan struct while it was never initialized. Fix this by using the primary ifp for scan abort. The abort should still be performed and all scan related commands are performed on primary ifp.
Reviewed-by: Arend Van Spriel arend@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Signed-off-by: Hante Meuleman hante.meuleman@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 46f2b38a91b08ec7faf1839c3cdcec3cfcc6ad50 Author: Hante Meuleman hante.meuleman@broadcom.com Date: Mon Apr 11 11:35:23 2016 +0200
brcmfmac: insert default boardrev in nvram data if missing
Some nvram files/stores come without the boardrev information, but firmware requires this to be set. When not found in nvram then add a default boardrev string to the nvram data.
Reported-by: Rafal Milecki zajec5@gmail.com Reviewed-by: Arend Van Spriel arend@broadcom.com Reviewed-by: Franky (Zhenhui) Lin franky.lin@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Signed-off-by: Hante Meuleman hante.meuleman@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 28b285a6129d0c19bcf9e40bb7767da0fd62974f Author: Hante Meuleman hante.meuleman@broadcom.com Date: Mon Apr 11 11:35:22 2016 +0200
brcmfmac: fix clearing wowl wake indicators
Newer firmwares require the usage of the wowl wakeind struct as size for the iovar to clear the wake indicators. Older firmwares do not care, so change the used size.
Reviewed-by: Arend Van Spriel arend@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Signed-off-by: Hante Meuleman hante.meuleman@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 7fde010d473d7eb98a2af3dd91e83838a1f24cdf Author: Hante Meuleman hante.meuleman@broadcom.com Date: Mon Apr 11 11:35:21 2016 +0200
brcmfmac: clear eventmask array before using it
When the event_msgs iovar is set an array is used to configure the enabled events. This arrays needs to nulled before configuring otherwise unhandled events will be enabled. This solves a problem where in case of wowl the host got woken by an incorrectly enabled event.
Reviewed-by: Pieter-Paul Giesberts pieter-paul.giesberts@broadcom.com Reviewed-by: Arend Van Spriel arend@broadcom.com Signed-off-by: Hante Meuleman hante.meuleman@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 28e460b02c66116354ced05b570503d252b996e9 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:33 2016 -0400
rtl8xxxu: Adjust AFE crystal value on 8192eu
Adjust AFE before enabling PLL on 8192eu, probably also needed for 8723bu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit f991f4e9147b1b7c9546c08f80d8d8f0aa53df2e Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:32 2016 -0400
rtl8xxxu: Implement IQK calibration for 8192eu
8192eu has it's own IQK calibration procedure, and notably uses undocumented RF register 0x56 in the process.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 70bc1e24d9e2df3002d714348ca600db83de4c64 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:31 2016 -0400
rtl8xxxu: Use proper register name for REG_PAD_CTRL1
Fixup another case where the hard coded register value was used instead of the name.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b052b7fc7d25f7c783ffcd87c42b767f6c166724 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:30 2016 -0400
rtl8xxxu: Implement 8192eu device specific quirks
Set REG_QUEUE_CTRL and REG_ACLK_MON for 8192eu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e1394fe5f98638ac0231063245614bb20e94e57f Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:29 2016 -0400
rtl8xxxu: Fix LDPC RX hang issue on 8192eu
Implement workaround for LDPC RX hands on 8192eu. This was inspired by workaround found in the 8192eu vendor driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 3021e51f2b2f62a2fa6f49c2d14d103b5a8c331c Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:28 2016 -0400
rtl8xxxu: Set REG_USB_HRPWM for 8192eu
The vendor driver set register 0xfe58 REG_USB_HWPWM in it's init sequence for 8192eu. Do the same here.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 57e5e2e650fb7ad1fe32e1c5e5b1bd01faa238fc Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:27 2016 -0400
rtl8xxxu: Set correct interrupt masking registers on 8192eu
Set HIMR[01] on 8192eu instead of HISR/HIMR. It's not obvious this really matters for USB devices, but this matches the register writes performed by the vendor driver.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8a59485c8ee911e77ace1622520976321aaf3820 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:26 2016 -0400
rtl8xxxu: Handle XTAL value setting on 8192eu
Set REG_AFE_XTAL_CTRL on 8192eu to the vendor driver value, and do not skip setting REG_MAX_AGGR_NUM on 8192eu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2949b9ee77b819b90d23096ef44744244283e630 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:25 2016 -0400
rtl8xxxu: Provide special handling when writing RF regs on 8192eu
The 8192eu requires clearing/restoring bit 17 in REG_FPGA0_POWER_SAVE before/after writing RF registers.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 444004bd134990456329267ac6365e71d73aeb85 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:24 2016 -0400
rtl8xxxu: Handle BB init for 8192eu
The 8192eu does not use REG_AFE_PLL_CTRL in it's BB init sequence, so provide device specific handling.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 9e24772ae222a867f98efc5502a5a01b3916db83 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:23 2016 -0400
rtl8xxxu: Correctly parse 8192eu efuse
The 8192eu efuse only has power data for path A and B. It follows the same layout as 8723bu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit abd71bdb94c3c4cd6bf4837ce568cb189fdb7f7a Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:22 2016 -0400
rtl8xxxu: Pick PHY init table based on chip version first
Pick PHY init table based on device before distinguishing between 1T/2T/high PA tables. The latter is only currently used for 8188cu/8192cu/8188ru.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ae14c5d20dc9e5e66681a7e3045b61eb9348d9f4 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:21 2016 -0400
rtl8xxxu: Add 8192eu PHY init table
The 8192eu also requires it's own PHY init table.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e293278debe7c1d3112aa8ec10373d73f171d75d Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:20 2016 -0400
rtl8xxxu: Add 8192eu AGC tables
A device specific AGC table is required for the 8192eu as well.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 19102f8419342a3cdd0efb25539a268f2d095319 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:19 2016 -0400
rtl8xxxu: Add radio init tables for 8192eu
Add the required radio init tables for 8192eu devices.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 80805aa5f33e315df23b6420c64f96a28dfcbb9a Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:18 2016 -0400
rtl8xxxu: Set TX page boundaries for 8192eu
The 8192eu also has it's own TRXFF boundary value to set.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2ca73dc786c4ffb9c618e7b868d69d9faf5a755d Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:17 2016 -0400
rtl8xxxu: Do not mess with AFE_XTAL_CTRL on 8192eu
To match the vendor driver, do not mess with AFE_XTAL_CTRL on 8192eu.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c606e662a5c8e9caa7183e7d88b7c24dadb3adea Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Apr 7 14:19:16 2016 -0400
rtl8xxxu: Add MAC init table for 8192eu
The 8192eu requires a different MAC init table. Add the missing table and specify the table to use in the fileops structure.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit f38ba953bee01887d520f7abba536721a1d16477 Author: stephen hemminger stephen@networkplumber.org Date: Wed Apr 13 17:02:21 2016 -0700
gre: eliminate holes in ip_tunnel
The structure can be packed denser by doing minor rearrangement of existing elements.
Signed-off-by: Stephen Hemminger stephen@networkplumber.org Signed-off-by: David S. Miller davem@davemloft.net
commit d0988a5f77e7a399ac579e629f1dcc23059246e9 Author: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Date: Sun Apr 10 23:55:15 2016 +0300
ravb: make ravb_ptp_interrupt() *void*
When we have the ISS.CGIS bit set, we already know that gPTP interrupt has happened, so an extra GIS register check at the end of ravb_ptp_interrupt() seems superfluous. We can model the gPTP interrupt handler like all other dedicated interrupt handlers in the driver and make it *void*.
Signed-off-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Signed-off-by: David S. Miller davem@davemloft.net
commit b9aa78d4fbf94cbf62954ce164aadda81b16d7d0 Merge: 6c61403d 7c2d7d7 Author: David S. Miller davem@davemloft.net Date: Thu Apr 14 00:43:21 2016 -0400
Merge branch 'qed-ethtool-rss'
Yuval Mintz says:
==================== qed*: [mostly] Ethtool RSS configuration
Most of the content [code-wise] in this series is for allowing various RSS-related configuration via ethtool.
In addition, this also removed an unnecessary versioning scheme between the drivers and bump the driver version. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 7c2d7d7438c9808cff1c34decc80c49f87a764e7 Author: Yuval Mintz Yuval.Mintz@qlogic.com Date: Sun Apr 10 12:43:02 2016 +0300
qed* - bump driver versions to 8.7.1.20
Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 961acdeafd8f369a9e99b3d08f66eec5d8f93a8e Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Sun Apr 10 12:43:01 2016 +0300
qede: add Rx flow hash/indirection support.
Adds support for the following via ethtool: - UDP configuration of RSS based on 2-tuple/4-tuple. - RSS hash key. - RSS indirection table.
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8c5ebd0c792a097fcc0e526debbe0887ee378ae5 Author: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Date: Sun Apr 10 12:43:00 2016 +0300
qed: add Rx flow hash/indirection support.
Adds the required API for passing RSS-related configuration from qede.
Signed-off-by: Sudarsana Reddy Kalluru sudarsana.kalluru@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 95114344ea78649b1797d00ab6e88147bef66fa4 Author: Rahul Verma rahul.verma@qlogic.com Date: Sun Apr 10 12:42:59 2016 +0300
qed*: remove version dependency
Inbox drivers don't need versioning scheme in order to guarantee compatibility, as both qed and qede are compiled from same codebase.
Signed-off-by: Rahul Verma rahul.verma@qlogic.com Signed-off-by: Yuval Mintz Yuval.Mintz@qlogic.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6c61403daea578dcfe84f187c204db1a3fa3d6ae Merge: 743b03a 2da6290 Author: David S. Miller davem@davemloft.net Date: Thu Apr 14 00:39:15 2016 -0400
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
commit 743b03a83297690f0bd38c452a3bbb47d2be300a Author: Eric Dumazet edumazet@google.com Date: Sat Apr 9 11:29:58 2016 -0700
net: remove netdevice gso_min_segs
After introduction of ndo_features_check(), we believe that very specific checks for rare features should not be done in core networking stack.
No driver uses gso_min_segs yet, so we revert this feature and save few instructions per tx packet in fast path.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit cfe2f14c72b0266a9f3573427f206a98ad3d409c Author: Julia Lawall julia.lawall@lip6.fr Date: Sat Apr 9 10:49:22 2016 +0200
qdisc: constify meta_type_ops structures
The meta_type_ops structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall Julia.Lawall@lip6.fr Signed-off-by: David S. Miller davem@davemloft.net
commit e178c8c2306ebff13aee365de703e6b8b2bea066 Author: Petri Gynther pgynther@google.com Date: Sat Apr 9 00:20:36 2016 -0700
net: bcmgenet: add BQL support
Add Byte Queue Limits (BQL) support to bcmgenet driver.
Signed-off-by: Petri Gynther pgynther@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit dac916f8fbd1ea514a61f4dcecaa97a5e7bac4c0 Author: Florian Fainelli f.fainelli@gmail.com Date: Fri Apr 8 22:30:56 2016 -0700
net: bcmgenet: use __napi_schedule_irqoff()
bcmgenet_isr1() and bcmgenet_isr0() run in hard irq context, we do not need to block irq again.
Signed-off-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: Eric Dumazet edumazet@google.com Acked-by: Petri Gynther pgynther@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit eb96ce01bab7af55d983feaae069c18792d427ef Author: Eric Dumazet edumazet@google.com Date: Fri Apr 8 22:06:40 2016 -0700
net: bcmgenet: use napi_complete_done()
By using napi_complete_done(), we allow fine tuning of /sys/class/net/ethX/gro_flush_timeout for higher GRO aggregation efficiency for a Gbit NIC.
Check commit 24d2e4a50737 ("tg3: use napi_complete_done()") for details.
Signed-off-by: Eric Dumazet edumazet@google.com Cc: Petri Gynther pgynther@google.com Cc: Florian Fainelli f.fainelli@gmail.com Acked-by: Florian Fainelli f.fainelli@gmail.com Acked-by: Petri Gynther pgynther@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit dfb6cbf693536937fc49a7c5822dd39ef9d1a8e5 Merge: ea01964 fb586f2 Author: David S. Miller davem@davemloft.net Date: Wed Apr 13 23:04:44 2016 -0400
Merge branch 'sctp-delayed-wakeups'
Marcelo Ricardo Leitner says:
==================== sctp: delay calls to sk_data_ready() as much as possible
1st patch is a preparation for the 2nd. The idea is to not call ->sk_data_ready() for every data chunk processed while processing packets but only once before releasing the socket.
v2: patchset re-checked, small changelog fixes v3: on patch 2, make use of local vars to make it more readable ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit fb586f25300f4587c7ebd097a604bf269b25bfa7 Author: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Date: Fri Apr 8 16:41:28 2016 -0300
sctp: delay calls to sk_data_ready() as much as possible
Currently processing of multiple chunks in a single SCTP packet leads to multiple calls to sk_data_ready, causing multiple wake up signals which are costy and doesn't make it wake up any faster.
With this patch it will note that the wake up is pending and will do it before leaving the state machine interpreter, latest place possible to do it realiably and cleanly.
Note that sk_data_ready events are not dependent on asocs, unlike waking up writers.
v2: series re-checked v3: use local vars to cleanup the code, suggested by Jakub Sitnicki Signed-off-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 250eb1f8815303f71c94a5680f8e4f2dcfa25cf5 Author: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Date: Fri Apr 8 16:41:27 2016 -0300
sctp: compress bit-wide flags to a bitfield on sctp_sock
It wastes space and gets worse as we add new flags, so convert bit-wide flags to a bitfield.
Currently it already saves 4 bytes in sctp_sock, which are left as holes in it for now. The whole struct needs packing, which should be done in another patch.
Note that do_auto_asconf cannot be merged, as explained in the comment before it.
Signed-off-by: Marcelo Ricardo Leitner marcelo.leitner@gmail.com Acked-by: Neil Horman nhorman@tuxdriver.com Signed-off-by: David S. Miller davem@davemloft.net
commit ea019649c37b8aa0d1ac5727d122b2e8ed74f536 Author: Denys Vlasenko dvlasenk@redhat.com Date: Fri Apr 8 20:39:47 2016 +0200
drivers/net/ethernet/jme.c: Deinline jme_reset_mac_processor, save 2816 bytes
This function compiles to 895 bytes of machine code.
Clearly, this isn't a time-critical function. For one, it has a number of udelay(1) calls.
Signed-off-by: Denys Vlasenko dvlasenk@redhat.com CC: David S. Miller davem@davemloft.net CC: linux-kernel@vger.kernel.org CC: netdev@vger.kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 079adf6c53e8b791ca569314ebee631bb68fbb31 Merge: f9a7cbb bf871ad Author: David S. Miller davem@davemloft.net Date: Wed Apr 13 22:42:33 2016 -0400
Merge branch 'bridge-sysfs-rtnl-notifications'
Xin Long says:
==================== bridge: support sending rntl info when we set attributes through sysfs/ioctl
This patchset is used to support sending rntl info to user in some places, and ensure that whenever those attributes change internally or from sysfs, that a netlink notification is sent out to listeners.
It also make some adjustment in bridge sysfs so that we can implement this easily.
I've done some tests on this patchset, like: [br_sysfs] 1. change all the attribute values of br or brif: $ echo $value > /sys/class/net/br0/bridge/{*} $ echo $value > /sys/class/net/br0/brif/eth1/{*}
2. meanwhile, on another terminal to observe the msg: $ bridge monitor
[br_ioctl] 1. in bridge-utils package, do some changes in br_set, let brctl command use ioctl to set attribute: if ((ret = set_sysfs(path, value)) < 0) { --> if (1) {
$ brctl set*
2. meanwhile, on another terminal to observe the msg: $ bridge monitor
This test covers all the attributes that brctl and sysfs support to set. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit bf871ad792e3c9f5dda0ef5bd519e0a2f1564001 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:33 2016 +0800
bridge: a netlink notification should be sent when those attributes are changed by ioctl
Now when we change the attributes of bridge or br_port by netlink, a relevant netlink notification will be sent, but if we change them by ioctl or sysfs, no notification will be sent.
We should ensure that whenever those attributes change internally or from sysfs/ioctl, that a netlink notification is sent out to listeners.
Also, NetworkManager will use this in the future to listen for out-of-band bridge master attribute updates and incorporate them into the runtime configuration.
This patch is used for ioctl.
Signed-off-by: Xin Long lucien.xin@gmail.com Reviewed-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit bdaf0d5d98e1c42d3a48c5ce6db9d013cb882781 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:32 2016 +0800
bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_if
Now when we change the attributes of bridge or br_port by netlink, a relevant netlink notification will be sent, but if we change them by ioctl or sysfs, no notification will be sent.
We should ensure that whenever those attributes change internally or from sysfs/ioctl, that a netlink notification is sent out to listeners.
Also, NetworkManager will use this in the future to listen for out-of-band bridge master attribute updates and incorporate them into the runtime configuration.
This patch is used for br_sysfs_if, and we also move br_ifinfo_notify out of store_flag.
Signed-off-by: Xin Long lucien.xin@gmail.com Reviewed-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 047831a9b9c3e34410025df84f629c005f437e42 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:31 2016 +0800
bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_br
Now when we change the attributes of bridge or br_port by netlink, a relevant netlink notification will be sent, but if we change them by ioctl or sysfs, no notification will be sent.
We should ensure that whenever those attributes change internally or from sysfs/ioctl, that a netlink notification is sent out to listeners.
Also, NetworkManager will use this in the future to listen for out-of-band bridge master attribute updates and incorporate them into the runtime configuration.
This patch is used for br_sysfs_br. and we also need to remove some rtnl_trylock in old functions so that we can call it in a common one.
For group_addr_store, we cannot make it use store_bridge_parm, because it's not a string-to-long convert, we will add notification on it individually.
Signed-off-by: Xin Long lucien.xin@gmail.com Signed-off-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4436156b6fbec746108d45431a9f1885de810ec1 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:30 2016 +0800
bridge: simplify the stp_state_store by calling store_bridge_parm
There are some repetitive codes in stp_state_store, we can remove them by calling store_bridge_parm.
Signed-off-by: Xin Long lucien.xin@gmail.com Reviewed-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 347db6b49ec0ba5ee3c9d946d45b7db59cf40480 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:29 2016 +0800
bridge: simplify the forward_delay_store by calling store_bridge_parm
There are some repetitive codes in forward_delay_store, we can remove them by calling store_bridge_parm.
Signed-off-by: Xin Long lucien.xin@gmail.com Reviewed-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 14f31bb39f5d4b69c179d219833d7edb9b36ebd9 Author: Xin Long lucien.xin@gmail.com Date: Sat Apr 9 00:03:28 2016 +0800
bridge: simplify the flush_store by calling store_bridge_parm
There are some repetitive codes in flush_store, we can remove them by calling store_bridge_parm, also, it would send rtnl notification after we add it in store_bridge_parm in the following patches.
Signed-off-by: Xin Long lucien.xin@gmail.com Reviewed-by: Nikolay Aleksandrov nikolay@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit f9a7cbbf18f1640907d6ca345b8337e4b50ea56f Author: Denys Vlasenko dvlasenk@redhat.com Date: Fri Apr 8 17:51:54 2016 +0200
net: force inlining of netif_tx_start/stop_queue, sock_hold, __sock_put
Sometimes gcc mysteriously doesn't inline very small functions we expect to be inlined. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 Arguably, gcc should do better, but gcc people aren't willing to invest time into it, asking to use __always_inline instead.
With this .config: http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, the following functions get deinlined many times.
netif_tx_stop_queue: 207 copies, 590 calls: 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 80 8f e0 01 00 00 01 lock orb $0x1,0x1e0(%rdi) 5d pop %rbp c3 retq
netif_tx_start_queue: 47 copies, 111 calls 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 80 a7 e0 01 00 00 fe lock andb $0xfe,0x1e0(%rdi) 5d pop %rbp c3 retq
sock_hold: 39 copies, 124 calls 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 ff 87 80 00 00 00 lock incl 0x80(%rdi) 5d pop %rbp c3 retq
__sock_put: 6 copies, 13 calls 55 push %rbp 48 89 e5 mov %rsp,%rbp f0 ff 8f 80 00 00 00 lock decl 0x80(%rdi) 5d pop %rbp c3 retq
This patch fixes this via s/inline/__always_inline/.
Code size decrease after the patch is ~2.5k:
text data bss dec hex filename 56719876 56364551 36196352 149280779 8e5d80b vmlinux_before 56717440 56364551 36196352 149278343 8e5ce87 vmlinux
Signed-off-by: Denys Vlasenko dvlasenk@redhat.com CC: David S. Miller davem@davemloft.net CC: linux-kernel@vger.kernel.org CC: netdev@vger.kernel.org CC: netfilter-devel@vger.kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit bf91795e4a77eb75602702e4c4d9b98b155039e9 Author: Masanari Iida standby24x7@gmail.com Date: Sat Apr 9 00:00:25 2016 +0900
Doc: networking: Fix typo in dsa
This patch fix typos in Documentation/networking/dsa.
Signed-off-by: Masanari Iida standby24x7@gmail.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 47e27d5e92c46a3a62d4dfd8895b1ddb8613f531 Author: Daniel Borkmann daniel@iogearbox.net Date: Fri Apr 8 15:55:00 2016 +0200
ipv6, token: allow for clearing the current device token
The original tokenized iid support implemented via f53adae4eae5 ("net: ipv6: add tokenized interface identifier support") didn't allow for clearing a device token as it was intended that this addressing mode was the only one active for globally scoped IPv6 addresses. Later we relaxed that restriction via 617fe29d45bd ("net: ipv6: only invalidate previously tokenized addresses"), and we should also allow for clearing tokens as there's no good reason why it shouldn't be allowed.
Fixes: 617fe29d45bd ("net: ipv6: only invalidate previously tokenized addresses") Reported-by: Robin H. Johnson robbat2@gentoo.org Signed-off-by: Daniel Borkmann daniel@iogearbox.net Cc: Hannes Frederic Sowa hannes@stressinduktion.org Acked-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit fafc4e1ea1a4c1eb13a30c9426fb799f5efacbc3 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Fri Apr 8 15:11:27 2016 +0200
sock: tigthen lockdep checks for sock_owned_by_user
sock_owned_by_user should not be used without socket lock held. It seems to be a common practice to check .owned before lock reclassification, so provide a little help to abstract this check away.
Cc: linux-cifs@vger.kernel.org Cc: linux-bluetooth@vger.kernel.org Cc: linux-nfs@vger.kernel.org Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 18b46810eb61f1d1a66c5511d12e84ea8cb7f35c Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 8 11:18:03 2016 +0200
net: ethernet: stmmac: GMAC4.xx: Fix TX descriptor preparation
On GMAC4.xx each descriptor contains 2 buffers of 16KB (each). Initially, those 2 buffers was filled in dwmac4_rd_prepare_tx_desc but it is actually not needed. Indeed, stmmac driver supports frame up to 9000 bytes (jumbo). So only one buffer is needed.
Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit fbf405e80c8af9ba0a9eb6f52d3bb8cddacd6036 Merge: 99717bd 31c2e49 Author: David S. Miller davem@davemloft.net Date: Wed Apr 13 22:24:52 2016 -0400
Merge branch 'udp-hdrs-fixes'
Willem de Bruijn says:
==================== fix two more udp pull header issues
Follow up patches to the fixes to RxRPC and SunRPC. A scan of the code showed two other interfaces that expect UDP packets to have a udphdr when queued: read packet length with ioctl SIOCINQ and receive payload checksum with socket option IP_CHECKSUM. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 31c2e4926fe912f88388bcaa8450fcaa8f2ece47 Author: Willem de Bruijn willemb@google.com Date: Thu Apr 7 18:12:59 2016 -0400
udp: do not expect udp headers in recv cmsg IP_CMSG_CHECKSUM
On udp sockets, recv cmsg IP_CMSG_CHECKSUM returns a checksum over the packet payload. Since commit e6afc8ace6dd pulled the headers, taking skb->data as the start of transport header is incorrect. Use the transport header pointer.
Also, when peeking at an offset from the start of the packet, only return a checksum from the start of the peeked data. Note that the cmsg does not subtract a tail checkum when reading truncated data.
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9f9a45beaa96188085d52d273c2ecb052c7d8d27 Author: Willem de Bruijn willemb@google.com Date: Thu Apr 7 18:12:58 2016 -0400
udp: do not expect udp headers on ioctl SIOCINQ
On udp sockets, ioctl SIOCINQ returns the payload size of the first packet. Since commit e6afc8ace6dd pulled the headers, the result is incorrect when subtracting header length. Remove that operation.
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4054ff45454a9a4652e29ac750a6600f6fdcc216 Author: Pablo Neira Ayuso pablo@netfilter.org Date: Tue Apr 12 23:32:34 2016 +0200
netfilter: ctnetlink: remove unnecessary inlining
Many of these functions are called from control plane path. Move ctnetlink_nlmsg_size() under CONFIG_NF_CONNTRACK_EVENTS to avoid a compilation warning when CONFIG_NF_CONNTRACK_EVENTS=n.
Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit d7591f0c41ce3e67600a982bab6989ef0f07b3ce Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 15:37:59 2016 +0200
netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit aded9f3e9fa8db559c5b7661bbb497754270e754 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:36 2016 +0200
netfilter: x_tables: remove obsolete check
Since 'netfilter: x_tables: validate targets of jumps' change we validate that the target aligns exactly with beginning of a rule, so offset test is now redundant.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 95609155d7fa08cc2e71d494acad39f72f0b4495 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:35 2016 +0200
netfilter: x_tables: remove obsolete overflow check for compat case too
commit 9e67d5a739327c44885adebb4f3a538050be73e4 ("[NETFILTER]: x_tables: remove obsolete overflow check") left the compat parts alone, but we can kill it there as well.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 09d9686047dbbe1cf4faa558d3ecc4aae2046054 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:34 2016 +0200
netfilter: x_tables: do compat validation via translate_table
This looks like refactoring, but its also a bug fix.
Problem is that the compat path (32bit iptables, 64bit kernel) lacks a few sanity tests that are done in the normal path.
For example, we do not check for underflows and the base chain policies.
While its possible to also add such checks to the compat path, its more copy&pastry, for instance we cannot reuse check_underflow() helper as e->target_offset differs in the compat case.
Other problem is that it makes auditing for validation errors harder; two places need to be checked and kept in sync.
At a high level 32 bit compat works like this: 1- initial pass over blob: validate match/entry offsets, bounds checking lookup all matches and targets do bookkeeping wrt. size delta of 32/64bit structures assign match/target.u.kernel pointer (points at kernel implementation, needed to access ->compatsize etc.)
2- allocate memory according to the total bookkeeping size to contain the translated ruleset
3- second pass over original blob: for each entry, copy the 32bit representation to the newly allocated memory. This also does any special match translations (e.g. adjust 32bit to 64bit longs, etc).
4- check if ruleset is free of loops (chase all jumps)
5-first pass over translated blob: call the checkentry function of all matches and targets.
The alternative implemented by this patch is to drop steps 3&4 from the compat process, the translation is changed into an intermediate step rather than a full 1:1 translate_table replacement.
In the 2nd pass (step #3), change the 64bit ruleset back to a kernel representation, i.e. put() the kernel pointer and restore ->u.user.name .
This gets us a 64bit ruleset that is in the format generated by a 64bit iptables userspace -- we can then use translate_table() to get the 'native' sanity checks.
This has two drawbacks:
1. we re-validate all the match and target entry structure sizes even though compat translation is supposed to never generate bogus offsets. 2. we put and then re-lookup each match and target.
THe upside is that we get all sanity tests and ruleset validations provided by the normal path and can remove some duplicated compat code.
iptables-restore time of autogenerated ruleset with 300k chains of form -A CHAIN0001 -m limit --limit 1/s -j CHAIN0002 -A CHAIN0002 -m limit --limit 1/s -j CHAIN0003
shows no noticeable differences in restore times: old: 0m30.796s new: 0m31.521s 64bit: 0m25.674s
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 0188346f21e6546498c2a0f84888797ad4063fc5 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:33 2016 +0200
netfilter: x_tables: xt_compat_match_from_user doesn't need a retval
Always returned 0.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 8dddd32756f6fe8e4e82a63361119b7e2384e02f Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:32 2016 +0200
netfilter: arp_tables: simplify translate_compat_table args
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 329a0807124f12fe1c8032f95d8a8eb47047fb0e Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:31 2016 +0200
netfilter: ip6_tables: simplify translate_compat_table args
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 7d3f843eed29222254c9feab481f55175a1afcc9 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:30 2016 +0200
netfilter: ip_tables: simplify translate_compat_table args
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 13631bfc604161a9d69cd68991dff8603edd66f9 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:29 2016 +0200
netfilter: x_tables: validate all offsets and sizes in a rule
Validate that all matches (if any) add up to the beginning of the target and that each match covers at least the base structure size.
The compat path should be able to safely re-use the function as the structures only differ in alignment; added a BUILD_BUG_ON just in case we have an arch that adds padding as well.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit ce683e5f9d045e5d67d1312a42b359cb2ab2a13c Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:28 2016 +0200
netfilter: x_tables: check for bogus target offset
We're currently asserting that targetoff + targetsize <= nextoff.
Extend it to also check that targetoff is >= sizeof(xt_entry). Since this is generic code, add an argument pointing to the start of the match/target, we can then derive the base structure size from the delta.
We also need the e->elems pointer in a followup change to validate matches.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 7ed2abddd20cf8f6bd27f65bd218f26fa5bf7f44 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:27 2016 +0200
netfilter: x_tables: check standard target size too
We have targets and standard targets -- the latter carries a verdict.
The ip/ip6tables validation functions will access t->verdict for the standard targets to fetch the jump offset or verdict for chainloop detection, but this happens before the targets get checked/validated.
Thus we also need to check for verdict presence here, else t->verdict can point right after a blob.
Spotted with UBSAN while testing malformed blobs.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit fc1221b3a163d1386d1052184202d5dc50d302d1 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:26 2016 +0200
netfilter: x_tables: add compat version of xt_check_entry_offsets
32bit rulesets have different layout and alignment requirements, so once more integrity checks get added to xt_check_entry_offsets it will reject well-formed 32bit rulesets.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit a08e4e190b866579896c09af59b3bdca821da2cd Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:25 2016 +0200
netfilter: x_tables: assert minimum target size
The target size includes the size of the xt_entry_target struct.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit aa412ba225dd3bc36d404c28cdc3d674850d80d0 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:24 2016 +0200
netfilter: x_tables: kill check_entry helper
Once we add more sanity testing to xt_check_entry_offsets it becomes relvant if we're expecting a 32bit 'config_compat' blob or a normal one.
Since we already have a lot of similar-named functions (check_entry, compat_check_entry, find_and_check_entry, etc.) and the current incarnation is short just fold its contents into the callers.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 7d35812c3214afa5b37a675113555259cfd67b98 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:23 2016 +0200
netfilter: x_tables: add and use xt_check_entry_offsets
Currently arp/ip and ip6tables each implement a short helper to check that the target offset is large enough to hold one xt_entry_target struct and that t->u.target_size fits within the current rule.
Unfortunately these checks are not sufficient.
To avoid adding new tests to all of ip/ip6/arptables move the current checks into a helper, then extend this helper in followup patches.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 36472341017529e2b12573093cc0f68719300997 Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:22 2016 +0200
netfilter: x_tables: validate targets of jumps
When we see a jump also check that the offset gets us to beginning of a rule (an ipt_entry).
The extra overhead is negible, even with absurd cases.
300k custom rules, 300k jumps to 'next' user chain: [ plus one jump from INPUT to first userchain ]:
Before: real 0m24.874s user 0m7.532s sys 0m16.076s
After: real 0m27.464s user 0m7.436s sys 0m18.840s
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit f24e230d257af1ad7476c6e81a8dc3127a74204e Author: Florian Westphal fw@strlen.de Date: Fri Apr 1 14:17:21 2016 +0200
netfilter: x_tables: don't move to non-existent next rule
Ben Hawkes says:
In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset.
Base chains enforce absolute verdict.
User defined chains are supposed to end with an unconditional return, xtables userspace adds them automatically.
But if such return is missing we will move to non-existent next rule.
Reported-by: Ben Hawkes hawkes@google.com Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 99717bdfdbeaaf387ba6ecbf7eba7fbb7a47e50a Merge: 71bbe25 c156913 Author: David S. Miller davem@davemloft.net Date: Wed Apr 13 18:15:24 2016 -0400
Merge branch 'dsa-refactoring-set-1'
Andrew Lunn says:
==================== DSA refactoring: set 1
There has been a long running effort to refractor DSA probing to make the switches true linux devices. Here are a small collection of patches moving in this direction. Most have been seen before.
We take a little step forward by passing the dsa device point to the driver, thus allowing it to perform resource allocations using the normal mechanisms. This device structure will later be replaced by the devices own device structure.
Future patches will add a true driver probe function, so we rename the current probe function, cleaning up the namespace.
phys_port_mask continually confuses me, thinking it is about PHYs. But it is actually about ports enabled to the outside world. So rename it to enabled_port_mask.
Lots more patches yet to follow, this is just doing some ground work.
v2: enabled_port_mask instread of user_port_masks Added Tested-by's and Reviewed-by. ====================
Tested-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit c156913b5d62cbaa0e3be29409de562b7d2e006e Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:45 2016 +0200
dsa: mv88e6xxx: Use bus in mv88e6xxx_lookup_name()
mv88e6xxx_lookup_name() returns the model name of a switch at a given address on an MII bus. Using mii_bus to identify the bus rather than the host device is more logical, so change the parameter.
Signed-off-by: Andrew Lunn andrew@lunn.ch Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 74c3e2a54b7d9eb57f23fb0e157b90bb6dae629f Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:44 2016 +0200
dsa: Rename phys_port_mask to enabled_port_mask
The phys in phys_port_mask suggests this mask is about PHYs. In fact, it means physical ports. Rename to enabled_port_mask, indicating external enabled ports of the switch, which is hopefully less confusing.
Signed-off-by: Andrew Lunn andrew@lunn.ch Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit e49bad319630dedeeda3a638a707ec7b5d402ad5 Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:43 2016 +0200
net: dsa: Rename DSA probe function.
Rename the function called from the DSA to perform a probe for the switch. This makes the normal _probe() name available for a standard Linux device driver probe function.
Signed-off-by: Andrew Lunn andrew@lunn.ch Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit a77d43f1e9d59791b138b9903c58b89fffb0df97 Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:42 2016 +0200
net: dsa: Keep the mii bus and address in the private structure
Rather than looking up the mii bus and address every time, do it once at probe, and keep it in the private structure. Centralise this probe code in mv88e6xxx.
Signed-off-by: Andrew Lunn andrew@lunn.ch Acked-by: Florian Fainelli f.fainelli@gmail.com Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5feebd0a8a799fe076c606b7c3bc267ae8c4344a Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:41 2016 +0200
net: dsa: Remove allocation of driver private memory
The drivers now allocate their own memory for private usage. Remove the allocation from the core code.
Signed-off-by: Andrew Lunn andrew@lunn.ch Acked-by: Florian Fainelli f.fainelli@gmail.com Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7543a6d5359e371ce9434955dbe6a79f548ea321 Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:40 2016 +0200
net: dsa: Have the switch driver allocate there own private memory
Now the switch devices have a dev pointer, make use of it for allocating the drivers private data structures using a devm_kzalloc().
Signed-off-by: Andrew Lunn andrew@lunn.ch Acked-by: Florian Fainelli f.fainelli@gmail.com Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit bbb8d793994c894eef2a48a35fac6de3c6b4fa93 Author: Andrew Lunn andrew@lunn.ch Date: Wed Apr 13 02:40:39 2016 +0200
net: dsa: Pass the dsa device to the switch drivers
By passing a device structure to the switch devices, it allows them to use devm_* methods for resource management.
Signed-off-by: Andrew Lunn andrew@lunn.ch Acked-by: Florian Fainelli f.fainelli@gmail.com Tested-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 71bbe25d01fa4f35551ff7bffc3e03ddd3e960cd Merge: 7d45a04 57fbcce Author: David S. Miller davem@davemloft.net Date: Wed Apr 13 17:58:51 2016 -0400
Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
==================== To synchronize with Kalle, here's just a big change that affects all drivers - removing the duplicated enum ieee80211_band and replacing it by enum nl80211_band. On top of that, just a small documentation update. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 7d45a04cbc2683f9552572850f1c711d9b96dd26 Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Wed Apr 13 11:45:47 2016 -0400
tipc: remove remnants of old broadcast code
We remove a couple of leftover fields in struct tipc_bearer. Those were used by the old broadcast implementation, and are not needed any longer. There is no functional changes in this commit.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit edc73417d8f33a1dd329295275168923298d9a7b Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:24 2016 +0200
6lowpan: move mac802154 header
In case of link-layer specific handling for 802.15.4 we need to cast to 802.15.4 sepcific structures. Simple add this header when include the 6lowpan header.
Signed-off-by: Alexander Aring aar@pengutronix.de Reviewed-by: Stefan Schmidtstefan@osg.samsung.com Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 2732363181766533af65e9ced3dc04a30502c5d1 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:23 2016 +0200
6lowpan: add lowpan_is_ll function
This patch adds the lowpan_is_ll function, which can be used to make a special 6lowpan linklayer handling for a specific 6lowpan linklayer type.
Signed-off-by: Alexander Aring aar@pengutronix.de Reviewed-by: Stefan Schmidtstefan@osg.samsung.com Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit a5862f2aba4ba53d461450685a67ae252935ab94 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:22 2016 +0200
6lowpan: move eui64 uncompress function
This function will be use in later functionality in other branches than generic 6lowpan, so we move it to the global 6lowpan header.
Signed-off-by: Alexander Aring aar@pengutronix.de Reviewed-by: Stefan Schmidtstefan@osg.samsung.com Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 2bc068c3d6e1212d09c11169c699560747ef8c2b Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:21 2016 +0200
6lowpan: iphc: remove unnecessary zero data
This patch removes unnecessary zero data for a stack variable.
Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 7115a968b75e9f81f6f8f45b2f97b1b43e024703 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:20 2016 +0200
6lowpan: iphc: rename add lowpan prefix
This patch adds a lowpan prefix to each functions which doesn't have such prefix currently.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 353c224e28eb73e65720e5b2be224052569c0764 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:19 2016 +0200
6lowpan: move lowpan_802154_dev to 6lowpan
This patch moves the 802.15.4 link layer specific structures to generic 6lowpan. This is necessary for special 802.15.4 6lowpan handling in 6lowpan generic layer.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 2e4d60cbcfc2d16a2a2efaae3fe08f2e457d59a1 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:18 2016 +0200
6lowpan: change naming for lowpan private data
This patch changes the naming for interface private data for lowpan intefaces. The current private data scheme is:
------------------------------------------------- | 6LoWPAN Generic | LinkLayer 6LoWPAN | -------------------------------------------------
the current naming schemes are:
- 6LoWPAN Generic: - lowpan_priv - LinkLayer 6LoWPAN: - BTLE - lowpan_dev - 802.15.4: - lowpan_dev_info
the new naming scheme with this patch will be:
- 6LoWPAN Generic: - lowpan_dev - LinkLayer 6LoWPAN: - BTLE - lowpan_btle_dev - 802.15.4: - lowpan_802154_dev
Signed-off-by: Alexander Aring aar@pengutronix.de Reviewed-by: Stefan Schmidtstefan@osg.samsung.com Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 5a7f97e570fbe0ae7e6fd035f7af0cd6a1a9baa1 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:17 2016 +0200
ieee802154: 6lowpan: fix short addr hash
The short address is unique in combination with the panid. This patch will add the panid for generating an ieee802154 address hash.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 9e3b71f3436415f917eb569cde792b223cceebc0 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:16 2016 +0200
nl802154: avoid address change while running lowpan
The generation of autoconfigured IPv6 link-local addresses starts with a notification on interface up.
To handle autoconfiguration according to RFC 4944 requires pan id and short address to generate an autoconfigured link-local address. This patch will avoid changing of these link-layer address configuration while lowpan interface is up.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 118a5cf8ae236cdfa1eb4f21530843a8494722ef Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:15 2016 +0200
ieee802154: add short address helpers
This patch introduce some short address handling functionality into ieee802154 headers.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit b7594148c73cb506487b5f00a6574beceea0e3a0 Author: Alexander Aring aar@pengutronix.de Date: Mon Apr 11 11:04:14 2016 +0200
ieee802154: cleanups for ieee802154.h
This patch removes some const from non-pointer types and fixes the function name for the ieee802154_is_valid_extended_unicast_addr comment.
Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 87820441c402f5fde42a84ae96ffb4cbd4109510 Author: Alexandre Macabies web+oss@zopieux.com Date: Tue Apr 12 18:53:02 2016 +0200
mrf24j40: apply the security-enabled bit on secured outbound frames
We set the TXNSECEN bit of register TXNCON to on when transmitting a security-enabled frame, as described in section 3.12.2 of the MRF datasheet.
Signed-off-by: Alexander Aring aar@pengutronix.de Signed-off-by: Alexandre Macabies web+oss@zopieux.com Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Acked-by: Alan Ott alan@signal11.us Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 5a62f3c6de73bd0b4ac40a33674d20f1bfb586d5 Author: Alexandre Macabies web+oss@zopieux.com Date: Tue Apr 12 18:53:01 2016 +0200
mrf24j40: fix security-enabled processing on inbound frames
When receiving a security-enabled IEEE 802.15.4 frame, the MRF24J40 triggers a SECIF interrupt that needs to be handled for RX processing to keep functioning properly.
This patch enables the SECIF interrupt and makes the MRF ignores all hardware processing of security-enabled frames, that is handled by the ieee802154 stack instead.
Signed-off-by: Alexander Aring aar@pengutronix.de Signed-off-by: Alexandre Macabies web+oss@zopieux.com Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Acked-by: Alan Ott alan@signal11.us Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit bc405cd69a728d0a82bae8395fe43ec7b0afd1c6 Author: Alexandre Macabies web+oss@zopieux.com Date: Tue Apr 12 18:53:00 2016 +0200
ieee802154: add security bit check function
ieee802154_is_secen checks if the 802.15.4 security bit is set in the frame control field.
Signed-off-by: Alexander Aring aar@pengutronix.de Signed-off-by: Alexandre Macabies web+oss@zopieux.com Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Acked-by: Alan Ott alan@signal11.us Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit b30d27f5bba2c65fb571ad7448b18dfee2fd63ae Merge: da0caad 369f045 Author: David S. Miller davem@davemloft.net Date: Tue Apr 12 22:41:33 2016 -0400
Merge branch 'mediatek-stress-test-fixes'
John Crispin says:
==================== net: mediatek: make the driver pass stress tests
While testing the driver we managed to get the TX path to stall and fail to recover. When dual MAC support was added to the driver, the whole queue stop/wake code was not properly adapted. There was also a regression in the locking of the xmit function. The fact that watchdog_timeo was not set and that the tx_timeout code failed to properly reset the dma, irq and queue just made the mess complete.
This series make the driver pass stress testing. With this series applied the testbed has been running for several days and still has not locked up. We have a second setup that has a small hack patch applied to randomly stop irqs and/or one of the queues and successfully manages to recover from these simulated tx stalls. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 369f04531f80c5e5d194a193a2b9e7676a77328d Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:11 2016 +0200
net: mediatek: do not set the QID field in the TX DMA descriptors
The QID field gets set to the mac id. This made the DMA linked list queue the traffic of each MAC on a different internal queue. However during long term testing we found that this will cause traffic stalls as the multi queue setup requires a more complete initialisation which is not part of the upstream driver yet.
This patch removes the code setting the QID field, resulting in all traffic ending up in queue 0 which works without any special setup.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit 7c78b4ad9bbdbe0bb4fbc98841ad9d904ee116e9 Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:10 2016 +0200
net: mediatek: move the pending_work struct to the device generic struct
The worker always touches both netdevs. It is ethernet core and not MAC specific. We only need one worker, which belongs into the ethernets core struct.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit e7d425dcea032f1d0b44b6fa4c6735f13882de6e Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:09 2016 +0200
net: mediatek: fix mtk_pending_work
The driver supports 2 MACs. Both run on the same DMA ring. If we hit a TX timeout we need to stop both netdevs before restarting them again. If we don't do this, mtk_stop() wont shutdown DMA and the consecutive call to mtk_open() wont restart DMA and enable IRQs.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit 34c2e4c9e9b3e434a31f67eecf603dc1496c8cc9 Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:08 2016 +0200
net: mediatek: fix TX locking
Inside the TX path there is a lock inside the tx_map function. This is however too late. The patch moves the lock to the start of the xmit function right before the free count check of the DMA ring happens. If we do not do this, the code becomes racy leading to TX stalls and dropped packets. This happens as there are 2 netdevs running on the same physical DMA ring.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit 13c822f6d468ca5a16da4d9432b067d54245c5b9 Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:07 2016 +0200
net: mediatek: fix stop and wakeup of queue
The driver supports 2 MACs. Both run on the same DMA ring. If we go above/below the TX rings threshold value, we always need to wake/stop the queue of both devices. Not doing to can cause TX stalls and packet drops on one of the devices.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit 13439eec7af24b0800e654ee03c57ab985083ae4 Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:06 2016 +0200
net: mediatek: remove superfluous reset call
HW reset is triggered in the mtk_hw_init() function. There is no need to also reset the core during probe.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit beeb4ca466fa1c399d69e34c30ddf04e0b7cbefd Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:05 2016 +0200
net: mediatek: mtk_cal_txd_req() returns bad value
The code used to also support the PDMA engine, which had 2 packet pointers per descriptor. Because of this we had to divide the result by 2 and round it up. This is no longer needed as the code only supports QDMA.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit 82500aa01ad12eff41a9a68ad01f1d40db8921f9 Author: John Crispin blogic@openwrt.org Date: Fri Apr 8 00:54:04 2016 +0200
net: mediatek: watchdog_timeo was not set
The original commit failed to set watchdog_timeo. This patch sets watchdog_timeo to HZ.
Signed-off-by: John Crispin blogic@openwrt.org Signed-off-by: David S. Miller davem@davemloft.net
commit da0caadf0a05945bf2ef017d43e4eae1e2859b92 Merge: 69fb781 ecdfb48 Author: David S. Miller davem@davemloft.net Date: Tue Apr 12 22:34:56 2016 -0400
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says:
==================== Netfilter updates for net-next
The following patchset contains the first batch of Netfilter updates for your net-next tree.
1) Define pr_fmt() in nf_conntrack, from Weongyo Jeong.
2) Define and register netfilter's afinfo for the bridge family, this comes in preparation for native nfqueue's bridge for nft, from Stephane Bryant.
3) Add new attributes to store layer 2 and VLAN headers to nfqueue, also from Stephane Bryant.
4) Parse new NFQA_VLAN and NFQA_L2HDR nfqueue netlink attributes coming from userspace, from Stephane Bryant.
5) Use net->ipv6.devconf_all->hop_limit instead of hardcoded hop_limit in IPv6 SYNPROXY, from Liping Zhang.
6) Remove unnecessary check for dst == NULL in nf_reject_ipv6, from Haishuang Yan.
7) Deinline ctnetlink event report functions, from Florian Westphal. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit ecdfb48cddfd1096343148113d5b1bd789033aa8 Author: Florian Westphal fw@strlen.de Date: Mon Apr 11 21:52:36 2016 +0200
netfilter: conntrack: move expectation event helper to ecache.c
Not performance critical, it is only invoked when an expectation is added/destroyed.
While at it, kill unused nf_ct_expect_event() wrapper.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 3c435e2e414e82ec6c0e96a1dfc2be3ddc3c23b4 Author: Florian Westphal fw@strlen.de Date: Mon Apr 11 21:52:35 2016 +0200
netfilter: conntrack: de-inline nf_conntrack_eventmask_report
Way too large; move it to nf_conntrack_ecache.c. Reduces total object size by 1216 byte on my machine.
Signed-off-by: Florian Westphal fw@strlen.de Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit cfe9011a05a8de56f97d15a24977639fe6534e9c Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Thu Apr 7 12:10:58 2016 +0530
ath10k: remove MSI range support
MSI-X is never well-tested, might contain bugs and generally isn't really all that useful to maintain. Also ath10k is mainly used with shared/singly-MSI interrupt systems. Hence removing MSI range support. This change will be useful for further cleanup in copy engine lock and to add NAPI support.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit a606c0ee9d5c12eb1a0e86837db622969956b825 Author: Peter Oh poh@qca.qualcomm.com Date: Mon Apr 4 16:19:16 2016 -0700
ath10k: enable set_tsf vdev command to WMI 10.4
10.4 firmware has addeded set_tsf vdev parameter, hence enable it. set_tsf function can be used to shift TBTT that will help avoid its clockdrift which happens when beacons are collided.
Signed-off-by: Peter Oh poh@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 4857dd14ec3720d25c33ea0186c55b849d891b0f Author: Peter Oh poh@qca.qualcomm.com Date: Mon Apr 4 16:19:15 2016 -0700
ath10k: update 10.4 WMI vdev parameters
Update 10.4 WMI vdev param to sync to current 10.4 firmware as of 2/23/2016.
Signed-off-by: Peter Oh poh@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 9f0b7e7dea7c3cedba315d44816070fcc692c748 Author: Peter Oh poh@qca.qualcomm.com Date: Mon Apr 4 16:19:14 2016 -0700
ath10k: add a support of set_tsf on vdev interface
10.2.4.70.24 firmware introduces new feature to set TSF via vdev parameter, hence implement relevant function. set_tsf function can be used to shift TBTT that will help avoid its clockdrift which happens when beacons are collided.
Signed-off-by: Peter Oh poh@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 169ff6db3a81fad3011e4c0b0114dbe9de1cd517 Author: Ben Greear greearb@candelatech.com Date: Fri Feb 5 15:10:02 2016 -0800
ath10k: Document alloc_frag_desc_for_data_pkt config option.
This will help anyone trying to use the ack-rssi reporting feature with the host-specified TX-rate option in 10.4 firmware.
Signed-off-by: Ben Greear greearb@candelatech.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 69fb78121bf86c87490ea1453e310a39c320a70a Merge: 9a6f2b0 8805eea Author: David S. Miller davem@davemloft.net Date: Tue Apr 12 11:57:53 2016 -0400
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:
==================== pull request: bluetooth-next 2016-04-12
Here's a set of Bluetooth & 802.15.4 patches intended for the 4.7 kernel:
- Fix for race condition in vhci driver - Memory leak fix for ieee802154/adf7242 driver - Improvements to deal with single-mode (LE-only) Bluetooth controllers - Fix for allowing the BT_SECURITY_FIPS security level - New BCM2E71 ACPI ID - NULL pointer dereference fix fox hci_ldisc driver
Let me know if there are any issues pulling. Thanks. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 57fbcce37be7c1d2622b56587c10ade00e96afa3 Author: Johannes Berg johannes.berg@intel.com Date: Tue Apr 12 15:56:15 2016 +0200
cfg80211: remove enum ieee80211_band
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 35eb8f7b1a37013d7a38466ae58c39fbd2c57faa Author: Jouni Malinen jouni@qca.qualcomm.com Date: Wed Apr 6 17:38:44 2016 +0300
cfg80211: Improve Connect/Associate command documentation
The roaming cases for the Connect command were not fully covered and neither Connect nor Associate command uses of the prev_bssid parameter were very clear. Add details to describe how the prev_bssid argument is supposed to be used and when the driver should use association or reassociation.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 9a6f2b0113c8fce815db7c9d23754bdea4b428a0 Author: Andrew Lunn andrew@lunn.ch Date: Mon Apr 11 21:40:05 2016 +0200
net: mdio: Fix lockdep falls positive splat
MDIO devices can be stacked upon each other. The current code supports two levels, which until recently has been enough for a DSA mdio bus on top of another bus. Now we have hardware which has an MDIO mux in the middle.
Define an MDIO MUTEX class with three levels.
Signed-off-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 7c3da7d0d4f3506ef70d9cf148a22400477854d0 Merge: c64a73d e0e4d82 Author: David S. Miller davem@davemloft.net Date: Mon Apr 11 15:34:42 2016 -0400
Merge branch 'rprpc-2nd-rewrite-part-1'
David Howells says:
==================== RxRPC: 2nd rewrite part 1
Okay, I'm in the process of rewriting the RxRPC rewrite. The primary aim of this second rewrite is to strictly control the number of active connections we know about and to get rid of connections we don't need much more quickly.
On top of this, there are fixes to the protocol handling which will all occur in later parts.
Here's the first set of patches from the second go, aimed at net-next. These are all fixes and cleanups preparatory to the main event.
Notable parts of this set include:
(1) A fix for the AFS filesystem to wait for outstanding calls to complete before closing the RxRPC socket.
(2) Differentiation of local and remote abort codes. At a future point userspace will get to see this via control message data on recvmsg().
(3) Absorb the rxkad module into the af_rxrpc module to prevent a dependency loop.
(4) Create a null security module and unconditionalise calls into the security module that's in force (there will always be a security module applied to a connection, even if it's just the null one). ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit e0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:58 2016 +0100
rxrpc: Create a null security type and get rid of conditional calls
Create a null security type for security index 0 and get rid of all conditional calls to the security operations. We expect normally to be using security, so this should be of little negative impact.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 648af7fca15901740c7aaafd55904ebd54d01860 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:51 2016 +0100
rxrpc: Absorb the rxkad security module
Absorb the rxkad security module into the af_rxrpc module so that there's only one module file. This avoids a circular dependency whereby rxkad pins af_rxrpc and cached connections pin rxkad but can't be manually evicted (they will expire eventually and cease pinning).
With this change, af_rxrpc can just be unloaded, despite having cached connections.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6dd050f88d702e2718bd856ea014487563207756 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:44 2016 +0100
rxrpc: Don't assume transport address family and size when using it
Don't assume transport address family and size when using the peer address to send a packet. Instead, use the start of the transport address rather than any particular element of the union and use the transport address length noted inside the sockaddr_rxrpc struct.
This will be necessary when IPv6 support is introduced.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 843099cac0dbe421d7c3ea1f8662251fd7065731 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:37 2016 +0100
rxrpc: Don't pass gfp around in incoming call handling functions
Don't pass gfp around in incoming call handling functions, but rather hard code it at the points where we actually need it since the value comes from within the rxrpc driver and is always the same.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit dc44b3a09aec9ac57c1e7410677c87c0e6453624 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:30 2016 +0100
rxrpc: Differentiate local and remote abort codes in structs
In the rxrpc_connection and rxrpc_call structs, there's one field to hold the abort code, no matter whether that value was generated locally to be sent or was received from the peer via an abort packet.
Split the abort code fields in two for cleanliness sake and add an error field to hold the Linux error number to the rxrpc_call struct too (sometimes this is generated in a context where we can't return it to userspace directly).
Furthermore, add a skb mark to indicate a packet that caused a local abort to be generated so that recvmsg() can pick up the correct abort code. A future addition will need to be to indicate to userspace the difference between aborts via a control message.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5b3e87f19e71b7a2f789c40de04704886932b5cf Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:23 2016 +0100
rxrpc: Static arrays of strings should be const char *const[]
Static arrays of strings should be const char *const[].
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8e688d9c166671bb4a6977384de2fe7f46a31ba4 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:16 2016 +0100
rxrpc: Move some miscellaneous bits out into their own file
Move some miscellaneous bits out into their own file to make it easier to split the call handling.
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8f7e6e75d3074dd1856a6105f7511249ee2f2ffd Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:09 2016 +0100
rxrpc: Disable a debugging statement that has been left enabled.
Disable a debugging statement that has been left enabled
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2f02f7aea7b6c9a9312846c006e076ae6ad026a4 Author: David Howells dhowells@redhat.com Date: Thu Apr 7 17:23:03 2016 +0100
afs: Wait for outstanding async calls before closing rxrpc socket
The afs filesystem needs to wait for any outstanding asynchronous calls (such as FS.GiveUpCallBacks cleaning up the callbacks lodged with a server) to complete before closing the AF_RXRPC socket when unloading the module.
This may occur if the module is removed too quickly after unmounting all filesystems. This will produce an error report that looks like:
AFS: Assertion failed 1 == 0 is false 0x1 == 0x0 is false ------------[ cut here ]------------ kernel BUG at ../fs/afs/rxrpc.c:135! ... RIP: 0010:[<ffffffffa004111c>] afs_close_socket+0xec/0x107 [kafs] ... Call Trace: [<ffffffffa004a160>] afs_exit+0x1f/0x57 [kafs] [<ffffffff810c30a0>] SyS_delete_module+0xec/0x17d [<ffffffff81610417>] entry_SYSCALL_64_fastpath+0x12/0x6b
Signed-off-by: David Howells dhowells@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit c64a73d584cc344915baee1183c791c0d0c42d79 Merge: a6db449 4d0fc73 Author: David S. Miller davem@davemloft.net Date: Mon Apr 11 15:31:34 2016 -0400
Merge branch 'udp-pull'
Willem de Bruijn says:
==================== net: fix udp pull header breakage
Commit e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") modified udp receive processing to pull headers before enqueue and to not expect them on dequeue.
The patch missed protocols on top of udp with in-kernel implementations that have their own skb_recv_datagram calls and dequeue logic. Modify these datapaths to also no longer expect a udp header at skb->data.
Sunrpc and rxrpc are the only two protocols that call this function and contain references to udphr (some others, like tipc, are based on encap_rcv, which acts before enqueue, before the the header pull). ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 4d0fc73ebe94ac984a187f21fbf4f3a1ac846f5a Author: Willem de Bruijn willemb@google.com Date: Thu Apr 7 11:44:59 2016 -0400
rxrpc: do not pull udp headers on receive
Commit e6afc8ace6dd modified the udp receive path by pulling the udp header before queuing an skbuff onto the receive queue.
Rxrpc also calls skb_recv_datagram to dequeue an skb from a udp socket. Modify this receive path to also no longer expect udp headers.
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Signed-off-by: Willem de Bruijn willemb@google.com Tested-by: Thierry Reding treding@nvidia.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1da8c681d5c122afe9fbadc02e92a0f9e3f7af44 Author: Willem de Bruijn willemb@google.com Date: Thu Apr 7 11:44:58 2016 -0400
sunrpc: do not pull udp headers on receive
Commit e6afc8ace6dd modified the udp receive path by pulling the udp header before queuing an skbuff onto the receive queue.
Sunrpc also calls skb_recv_datagram to dequeue an skb from a udp socket. Modify this receive path to also no longer expect udp headers.
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Reported-by: Franklin S Cooper Jr. fcooper@ti.com Signed-off-by: Willem de Bruijn willemb@google.com Tested-by: Thierry Reding treding@nvidia.com Signed-off-by: David S. Miller davem@davemloft.net
commit a6db4494d218c2e559173661ee972e048dc04fdd Author: David Ahern dsa@cumulusnetworks.com Date: Thu Apr 7 07:21:00 2016 -0700
net: ipv4: Consider failed nexthops in multipath routes
Multipath route lookups should consider knowledge about next hops and not select a hop that is known to be failed.
Example:
[h2] [h3] 15.0.0.5 | | 3| 3| [SP1] [SP2]--+ 1 2 1 2 | | /-------------+ | | \ / | | X | | / \ | | / ---------------\ | 1 2 1 2 12.0.0.2 [TOR1] 3-----------------3 [TOR2] 12.0.0.3 4 4 \ / \ / \ / -------| |-----/ 1 2 [TOR3] 3| | [h1] 12.0.0.1
host h1 with IP 12.0.0.1 has 2 paths to host h3 at 15.0.0.5:
root@h1:~# ip ro ls ... 12.0.0.0/24 dev swp1 proto kernel scope link src 12.0.0.1 15.0.0.0/16 nexthop via 12.0.0.2 dev swp1 weight 1 nexthop via 12.0.0.3 dev swp1 weight 1 ...
If the link between tor3 and tor1 is down and the link between tor1 and tor2 then tor1 is effectively cut-off from h1. Yet the route lookups in h1 are alternating between the 2 routes: ping 15.0.0.5 gets one and ssh 15.0.0.5 gets the other. Connections that attempt to use the 12.0.0.2 nexthop fail since that neighbor is not reachable:
root@h1:~# ip neigh show ... 12.0.0.3 dev swp1 lladdr 00:02:00:00:00:1b REACHABLE 12.0.0.2 dev swp1 FAILED ...
The failed path can be avoided by considering known neighbor information when selecting next hops. If the neighbor lookup fails we have no knowledge about the nexthop, so give it a shot. If there is an entry then only select the nexthop if the state is sane. This is similar to what fib_detect_death does.
To maintain backward compatibility use of the neighbor information is based on a new sysctl, fib_multipath_use_neigh.
Signed-off-by: David Ahern dsa@cumulusnetworks.com Reviewed-by: Julian Anastasov ja@ssi.bg Signed-off-by: David S. Miller davem@davemloft.net
commit 0b0e30c650e4345a50c417c397c7ecb63206a611 Merge: 61618ee 71a2cbb Author: David S. Miller davem@davemloft.net Date: Mon Apr 11 15:12:00 2016 -0400
Merge branch 'cpsw-host_port'
Grygorii Strashko says:
==================== drivers: net: cpsw: fix ale calls and drop host_port field from cpsw_priv
This clean up series intended to: - fix port_mask parameters in ale calls and drop unnecessary shifts - drop host_port field from struct cpsw_priv ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 71a2cbb72a2bcbf3f1c1b14031870e37ad5e8109 Author: Grygorii Strashko grygorii.strashko@ti.com Date: Thu Apr 7 15:16:44 2016 +0300
drivers: net: cpsw: drop host_port field from struct cpsw_priv
The host_port field is constantly assigned to 0 and this value has never changed (since time when cpsw driver was introduced. More over, if this field will be assigned to non 0 value it will break current driver functionality.
Hence, there are no reasons to continue maintaining this host_port field and it can be removed, and the HOST_PORT_NUM and ALE_PORT_HOST defines can be used instead.
Signed-off-by: Grygorii Strashko grygorii.strashko@ti.com Signed-off-by: David S. Miller davem@davemloft.net
commit 61f1cef90a18122ff9832a897dc75738c14e710a Author: Grygorii Strashko grygorii.strashko@ti.com Date: Thu Apr 7 15:16:43 2016 +0300
drivers: net: cpsw: fix port_mask parameters in ale calls
ALE APIs expect to receive port masks as input values for arguments port_mask, untag, reg_mcast, unreg_mcast. But there are few places in code where port masks are passed left-shifted by cpsw_priv->host_port, like below:
cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan, ALE_ALL_PORTS << priv->host_port, ALE_ALL_PORTS << priv->host_port, 0, 0);
and cpsw is still working just because priv->host_port == 0 and has never ever been changed.
Hence, fix port_mask parameters in ALE APIs calls and drop "<< priv->host_port" from all places where it's used to shift valid port mask.
Signed-off-by: Grygorii Strashko grygorii.strashko@ti.com Signed-off-by: David S. Miller davem@davemloft.net
commit 61618eeac3e6165684895481c4f58ea879c3d616 Author: Jiri Benc jbenc@redhat.com Date: Mon Apr 11 17:06:08 2016 +0200
vxlan: fix incorrect type
The protocol is 16bit, not 32bit.
Fixes: e1e5314de08ba ("vxlan: implement GPE") Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit e0897ae3ec720b1653d4ff9aaf48b532c276ab63 Author: Vaishali Thakkar vaishali.thakkar@oracle.com Date: Mon Apr 11 15:58:17 2016 +0530
net: fjes: Use resource_size
Use the function resource_size instead of explicit computation.
Problem found using Coccinelle.
Signed-off-by: Vaishali Thakkar vaishali.thakkar@oracle.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3484f44c0873652ad16a69a0f20088343a281982 Merge: bddf590 8cbde11 Author: David S. Miller davem@davemloft.net Date: Mon Apr 11 14:58:45 2016 -0400
Merge branch 'bnxt_en-next'
Michael Chan says:
==================== bnxt_en: Update for net-next
Misc. changes for link speed and VF MAC address change. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 8cbde1175e3c8565edbb777cd09cbfdb93c78397 Author: Michael Chan michael.chan@broadcom.com Date: Mon Apr 11 04:11:14 2016 -0400
bnxt_en: Add async event handling for speed config changes.
On some dual port cards, link speeds on both ports have to be compatible. Firmware will inform the driver when a certain speed is no longer supported if the other port has linked up at a certain speed. Add logic to handle this event by logging a message and getting the updated list of supported speeds.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 84c33dd342ad596a271a61da0119bf34e80bb1c5 Author: Michael Chan michael.chan@broadcom.com Date: Mon Apr 11 04:11:13 2016 -0400
bnxt_en: Call firmware to approve VF MAC address change.
Some hypervisors (e.g. ESX) require the VF MAC address to be forwarded to the PF for approval. In Linux PF, the call is not forwarded and the firmware will simply check and approve the MAC address if the PF has not previously administered a valid MAC address for this VF.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 33f7d55f07ab964055d73d38774346f8d4821f00 Author: Michael Chan michael.chan@broadcom.com Date: Mon Apr 11 04:11:12 2016 -0400
bnxt_en: Shutdown link when device is closed.
Let firmware know that the driver is giving up control of the link so that it can be shutdown if no management firmware is running.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 03efbec03198a0f505c2a6c93268c3c5df321c90 Author: Michael Chan michael.chan@broadcom.com Date: Mon Apr 11 04:11:11 2016 -0400
bnxt_en: Disallow forced speed for 10GBaseT devices.
10GBaseT devices must autonegotiate to determine master/slave clocking. Disallow forced speed in ethtool .set_settings() for these devices.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit bddf59046d804638d998f9015246d4990f1cab09 Merge: 4923ec0 20ac1b3 Author: David S. Miller davem@davemloft.net Date: Mon Apr 11 11:58:12 2016 -0400
Merge tag 'wireless-drivers-next-for-davem-2016-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says:
==================== wireless-drivers patches for 4.7
Major changes:
iwlwifi
* support for Link Quality measurement * more work 9000 devices and MSIx * continuation of the Dynamic Queue Allocation work * make the paging less memory hungry * 9000 new Rx path * removal of IWLWIFI_UAPSD Kconfig option
ath10k
* implement push-pull tx model using mac80211 software queuing support * enable scan in AP mode (NL80211_FEATURE_AP_SCAN)
wil6210
* add basic PBSS (Personal Basic Service Set) support * add initial P2P support * add oob_mode module parameter ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 4923ec0b10d998349c2ac4b38aa4674e539e6f92 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 19:39:21 2016 -0700
bpf: simplify verifier register state assignments
verifier is using the following structure to track the state of registers: struct reg_state { enum bpf_reg_type type; union { int imm; struct bpf_map *map_ptr; }; }; and later on in states_equal() does memcmp(&old->regs[i], &cur->regs[i],..) to find equivalent states. Throughout the code of verifier there are assignements to 'imm' and 'map_ptr' fields and it's not obvious that most of the assignments into 'imm' don't need to clear extra 4 bytes (like mark_reg_unknown_value() does) to make sure that memcmp doesn't go over junk left from 'map_ptr' assignment.
Simplify the code by converting 'int' into 'long'
Suggested-by: Daniel Borkmann daniel@iogearbox.net Signed-off-by: Alexei Starovoitov ast@kernel.org Acked-by: Daniel Borkmann daniel@iogearbox.net Signed-off-by: David S. Miller davem@davemloft.net
commit ae95d7126104591348d37aaf78c8325967e02386 Merge: 03c5b53 183c948 Author: David S. Miller davem@davemloft.net Date: Sat Apr 9 17:41:41 2016 -0400
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
commit 03c5b534185f9844c1b5fcfdbae2adc32821ec42 Author: Eric Dumazet edumazet@google.com Date: Sat Apr 9 08:01:13 2016 -0700
ipv6: fix inet6_lookup_listener()
A stupid refactoring bug in inet6_lookup_listener() needs to be fixed in order to get proper SO_REUSEPORT behavior.
Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") Signed-off-by: Eric Dumazet edumazet@google.com Reported-by: Maciej Żenczykowski maze@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 498cd8e49509c761b39dab26be7f739d95940e16 Author: John Allen jallen@linux.vnet.ibm.com Date: Wed Apr 6 11:49:55 2016 -0500
ibmvnic: Enable use of multiple tx/rx scrqs
Enables the use of multiple transmit and receive scrqs allowing the ibmvnic driver to take advantage of multiqueue functionality. To achieve this, the driver must implement the process of negotiating the maximum number of queues allowed by the server. Initially, the driver will attempt to login with the maximum number of tx and rx queues supported by the server. If the server fails to allocate the requested number of scrqs, it will return partial success in the login response. In this case, we must reinitiate the login process from the request capabilities stage and attempt to login requesting fewer scrqs.
Signed-off-by: John Allen jallen@linux.vnet.ibm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8805eea2494a2837983bc4aaaf6842c89666ec25 Author: Maxim Zhukov mussitantesmortem@gmail.com Date: Fri Apr 8 23:54:51 2016 +0300
Bluetooth: hci_bcsp: fix code style
This commit fixed: trailing "*/" trailing spaces mixed indent space between ~ and (
Signed-off-by: Maxim Zhukov mussitantesmortem@gmail.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit e013b7780c41b471c4269ac9ccafb65ba7c9ec86 Merge: f453939 4d5770b Author: David S. Miller davem@davemloft.net Date: Fri Apr 8 16:50:41 2016 -0400
Merge branch 'dsa-voidify-ops'
Vivien Didelot says:
==================== net: dsa: voidify STP setter and FDB/VLAN add ops
Neither the DSA layer nor the bridge code (see br_set_state) really care about eventual errors from STP state setters, so make it void.
The DSA layer separates the prepare and commit phases of switchdev in two different functions. Logical errors must not happen in commit routines, so make them void.
Changes v1 -> v2: - rename port_stp_update to port_stp_state_set - don't change code flow of bcm_sf2_sw_br_set_stp_state - prefer netdev_err over netdev_warn ====================
Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 4d5770b39710180644f655b2c6cb0c880d108c63 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Wed Apr 6 11:55:05 2016 -0400
net: dsa: make the VLAN add function return void
The switchdev design implies that a software error should not happen in the commit phase since it must have been previously reported in the prepare phase. If an hardware error occurs during the commit phase, there is nothing switchdev can do about it.
The DSA layer separates port_vlan_prepare and port_vlan_add for simplicity and convenience. If an hardware error occurs during the commit phase, there is no need to report it outside the driver itself.
Make the DSA port_vlan_add routine return void for explicitness.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8497aa618dd605b084fae86e676ea23ca85558b5 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Wed Apr 6 11:55:04 2016 -0400
net: dsa: make the FDB add function return void
The switchdev design implies that a software error should not happen in the commit phase since it must have been previously reported in the prepare phase. If an hardware error occurs during the commit phase, there is nothing switchdev can do about it.
The DSA layer separates port_fdb_prepare and port_fdb_add for simplicity and convenience. If an hardware error occurs during the commit phase, there is no need to report it outside the DSA driver itself.
Make the DSA port_fdb_add routine return void for explicitness.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 43c44a9f655170fb92536167b95b1c6ae8b732cb Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Wed Apr 6 11:55:03 2016 -0400
net: dsa: make the STP state function return void
The DSA layer doesn't care about the return code of the port_stp_update routine, so make it void in the layer and the DSA drivers.
Replace the useless dsa_slave_stp_update function with a dsa_slave_stp_state function used to reply to the switchdev SWITCHDEV_ATTR_ID_PORT_STP_STATE attribute.
In the meantime, rename port_stp_update to port_stp_state_set to explicit the state change.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit f453939c1a4a758312f799748b344bacd1db701f Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Wed Apr 6 11:06:20 2016 -0400
net: dsa: document missing functions
Add description for the missing port_vlan_prepare, port_fdb_prepare, port_fdb_dump functions in the DSA documentation.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 1089ac69776795074edb48ac15b8f6a36933bc0e Merge: 0701615 4ce2bd9 Author: David S. Miller davem@davemloft.net Date: Fri Apr 8 16:42:31 2016 -0400
Merge tag 'mac80211-next-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
==================== For the 4.7 cycle, we have a number of changes: * Bob's mesh mode rhashtable conversion, this includes the rhashtable API change for allocation flags * BSSID scan, connect() command reassoc support (Jouni) * fast (optimised data only) and support for RSS in mac80211 (myself) * various smaller changes ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 07016151a446d25397b24588df4ed5cf777a69bb Author: Daniel Borkmann daniel@iogearbox.net Date: Tue Apr 5 22:33:17 2016 +0200
bpf, verifier: further improve search pruning
The verifier needs to go through every path of the program in order to check that it terminates safely, which can be quite a lot of instructions that need to be processed f.e. in cases with more branchy programs. With search pruning from f1bca824dabb ("bpf: add search pruning optimization to verifier") the search space can already be reduced significantly when the verifier detects that a previously walked path with same register and stack contents terminated already (see verifier's states_equal()), so the search can skip walking those states.
When working with larger programs of > ~2000 (out of max 4096) insns, we found that the current limit of 32k instructions is easily hit. For example, a case we ran into is that the search space cannot be pruned due to branches at the beginning of the program that make use of certain stack space slots (STACK_MISC), which are never used in the remaining program (STACK_INVALID). Therefore, the verifier needs to walk paths for the slots in STACK_INVALID state, but also all remaining paths with a stack structure, where the slots are in STACK_MISC, which can nearly double the search space needed. After various experiments, we find that a limit of 64k processed insns is a more reasonable choice when dealing with larger programs in practice. This still allows to reject extreme crafted cases that can have a much higher complexity (f.e. > ~300k) within the 4096 insns limit due to search pruning not being able to take effect.
Furthermore, we found that a lot of states can be pruned after a call instruction, f.e. we were able to reduce the search state by ~35% in some cases with this heuristic, trade-off is to keep a bit more states in env->explored_states. Usually, call instructions have a number of preceding register assignments and/or stack stores, where search pruning has a better chance to suceed in states_equal() test. The current code marks the branch targets with STATE_LIST_MARK in case of conditional jumps, and the next (t + 1) instruction in case of unconditional jump so that f.e. a backjump will walk it. We also did experiments with using t + insns[t].off + 1 as a marker in the unconditionally jump case instead of t + 1 with the rationale that these two branches of execution that converge after the label might have more potential of pruning. We found that it was a bit better, but not necessarily significantly better than the current state, perhaps also due to clang not generating back jumps often. Hence, we left that as is for now.
Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 1fc2257e837f86c2688fdcc5c8810b73c133794d Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:12:48 2016 +0200
devlink: share user_ptr pointer for both devlink and devlink_port
Ptr to devlink structure can be easily obtained from devlink_port->devlink. So share user_ptr[0] pointer for both and leave user_ptr[1] free for other users.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 67b5b21f389502c3fb18b46d4fa9d02c38982fce Merge: 24d390b 9efc8f6 Author: David S. Miller davem@davemloft.net Date: Fri Apr 8 15:38:43 2016 -0400
Merge branch 'mlxsw-next'
Jiri Pirko says:
==================== mlxsw: small driver update + one tiny devlink dependency
Cosmetics, in preparation to sharedbuffer patchset. First patch is here to allow patch number two. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 9efc8f655c8488c6ee2f7d5034826880bf5b4bba Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:25 2016 +0200
mlxsw: reg: Fix SBPM register name
Fix copy&paste error and state the name of SBPM register correctly.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 497e8592c6d22772d0ad100c1f08e601dc417ed5 Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:24 2016 +0200
mlxsw: reg: Share direction enum between SBPR, SBCM, SBPM
Same field, same values, so share the same enum.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b2f10571b96414986f7293b06847d202f2d1d0ca Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:23 2016 +0200
mlxsw: Do not pass around driver_priv directly
Instead of that, pass mlxsw_core and use a helper to get driver priv from driver code. Looks much cleaner that way.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 307c2431abf0974996356c13b67432f4b35e5f2f Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:22 2016 +0200
mlxsw: Pass mlxsw_core as a param of mlxsw_core_skb_transmit*
Instead of passing around driver priv, pass struct mlxsw_core * directly.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 932762b69a282d3fa12febc1a02628f0fb79a1b8 Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:21 2016 +0200
mlxsw: Move devlink port registration into common core code
Remove devlink port reg/unreg from spectrum and switchx2 code and rather do the common work in core. That also ensures code separation where devlink is only used in core.c.
Signed-off-by: Jiri Pirko jiri@mellanox.com Reviewed-by: Ido Schimmel idosch@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit a9844881ba19d15d274bd684d4de0758bbd71c90 Author: Jiri Pirko jiri@mellanox.com Date: Fri Apr 8 19:11:20 2016 +0200
devlink: remove implicit type set in port register
As we rely on caller zeroing or correctly set the struct before the call, this implicit type set is either no-op (DEVLINK_PORT_TYPE_NOTSET is 0) or it rewrites wanted value. So remove this.
Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 24d390b2acea6c8cd7c95a9204f23eb15cec8269 Merge: 70f767d cc7c033 Author: David S. Miller davem@davemloft.net Date: Fri Apr 8 15:26:07 2016 -0400
Merge branch 'nfp-mtu-buffer-reconfig'
Jakub Kicinski says:
==================== MTU/buffer reconfig changes
I re-discussed MPLS/MTU internally, dropped it from the patch 1, re-tested everything, found out I forgot about debugfs pointers, fixed that as well.
v5: - don't reserve space in RX buffers for MPLS label stack (patch 1); - fix debugfs pointers to ring structures (patch 5). v4: - cut down on unrelated patches; - don't "close" the device on error path.
--- v4 cover letter
Previous series included some not entirely related patches, this one is cut down. Main issue I'm trying to solve here is that .ndo_change_mtu() in nfpvf driver is doing full close/open to reallocate buffers - which if open fails can result in device being basically closed even though the interface is started. As suggested by you I try to move towards a paradigm where the resources are allocated first and the MTU change is only done once I'm certain (almost) nothing can fail. Almost because I need to communicate with FW and that can always time out.
Patch 1 fixes small issue. Next 10 patches reorganize things so that I can easily allocate new rings and sets of buffers while the device is running. Patches 13 and 15 reshape the .ndo_change_mtu() and ethtool's ring-resize operation into desired form. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit cc7c033330fd67dd9d66a1ccb8c9d42381107bcd Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:48 2016 +0100
nfp: allow ring size reconfiguration at runtime
Since much of the required changes have already been made for changing MTU at runtime let's use it for ring size changes as well.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit a98cb2581211023539887a11f8391dd615409ab8 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:47 2016 +0100
nfp: pass ring count as function parameter
Soon ring resize will call this functions with values different than the current configuration we need to explicitly pass the ring count as parameter.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 36a857e4f2c9783cd573c948df022011cb386aa4 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:46 2016 +0100
nfp: convert .ndo_change_mtu() to prepare/commit paradigm
When changing MTU on running device first allocate new rings and buffers and once it succeeds proceed with changing MTU.
Allocation of new rings is not really necessary for this operation - it's done to keep the code simple and because size of the extra ring memory is quite small compared to the size of buffers.
Operation can still fail midway through if FW communication times out. In that case we retry with old MTU (rings).
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 30d2117191b7437b5b6ce2f09eddf86f203c7a37 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:45 2016 +0100
nfp: propagate list buffer size in struct rx_ring
Free list buffer size needs to be propagated to few functions as a parameter and added to struct nfp_net_rx_ring since soon some of the functions will be reused to manage rings with buffers of size different than nn->fl_bufsz.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit aba52df80b1a2d15fe1745dfe187e9823821f5c0 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:44 2016 +0100
nfp: sync ring state during FW reconfiguration
FW reconfiguration in .ndo_open()/.ndo_stop() should reset/ restore queue state. Since we need IRQs to be disabled when filling rings on RX path we have to move disable_irq() from .ndo_open() all the way up to IRQ allocation.
nfp_net_start_vec() becomes trivial now so it's inlined.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1cd0cfc498f7e928c5ff8e9ced537d41fa46df50 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:43 2016 +0100
nfp: slice .ndo_open() and .ndo_stop() up
Divide .ndo_open() and .ndo_stop() into logical, callable chunks. No functional changes.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit ca40feab8f3d46a69bde7a13d652db2c9246c067 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:42 2016 +0100
nfp: move filling ring information to FW config
nfp_net_[rt]x_ring_{alloc,free} should only allocate or free ring resources without touching the device. Move setting parameters in the BAR to separate functions. This will make it possible to reuse alloc/free functions to allocate new rings while the device is running.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 114bdef0be28aa9aa71e291d133e79edd514f8dc Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:41 2016 +0100
nfp: preallocate RX buffers early in .ndo_open
We want the .ndo_open() to have following structure: - allocate resources; - configure HW/FW; - enable the device from stack perspective. Therefore filling RX rings needs to be moved to the beginning of .ndo_open().
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1934680f5582b69a708181741cd77473a0d530ed Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:40 2016 +0100
nfp: reorganize initial filling of RX rings
Separate allocation of buffers from giving them to FW, thanks to this it will be possible to move allocation earlier on .ndo_open() path and reuse buffers during runtime reconfiguration.
Similar to TX side clean up the spill of functionality from flush to freeing the ring. Unlike on TX side, RX ring reset does not free buffers from the ring. Ring reset means only that FW pointers are zeroed and buffers on the ring must be placed in [0, cnt - 1) positions.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 827deea9bcd8fec3b6c0acf0178a5c508f3dfbe1 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:39 2016 +0100
nfp: cleanup tx ring flush and rename to reset
Since we never used flush without freeing the ring later the functionality of the two operations is mixed. Rename flush to ring reset and move there all the things which have to be done after FW ring state is cleared. While at it do some clean-ups.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 73725d9dfd99c5bb1da4d25bbe980231aa48d251 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:38 2016 +0100
nfp: allocate ring SW structs dynamically
To be able to switch rings more easily on config changes allocate them dynamically, separately from nfp_net structure.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit d79737c25e4a170e7cd75866e45042de746934d8 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:37 2016 +0100
nfp: make *x_ring_init do all the init
nfp_net_[rt]x_ring_init functions used to be called from probe path only and some of their functionality was spilled to the call site. In order to reuse them for ring reconfiguration we need them to do all the init.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0afbfb183bf5e1029ecc644acbc487d22e095b14 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:36 2016 +0100
nfp: break up nfp_net_{alloc|free}_rings
nfp_net_{alloc|free}_rings contained strange mix of allocations and vector initialization. Remove it, declare vector init as a separate function and handle allocations explicitly.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0ba40af963f01b557a4d7a0a6c550a51b0fb8d34 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:35 2016 +0100
nfp: move link state interrupt request/free calls
We need to be able to disable the link state interrupt when the device is brought down. We used to just free the IRQ at the beginning of .ndo_stop(). As we now move towards more ordered .ndo_open()/.ndo_stop() paths LSC allocation should be placed in the "allocate resource" section.
Since the IRQ can't be freed early in .ndo_stop(), it is disabled instead.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit ff1b68ab2daf292c0f0897f9c155a6ddc8484693 Author: Jakub Kicinski jakub.kicinski@netronome.com Date: Thu Apr 7 19:39:34 2016 +0100
nfp: correct RX buffer length calculation
When calculating the RX buffer length we need to account for up to 2 VLAN tags. Rounding up to 1k is an relic of a distant past and can be removed. While at it also remove trivial print statement.
Signed-off-by: Jakub Kicinski jakub.kicinski@netronome.com Signed-off-by: David S. Miller davem@davemloft.net
commit cd9d7213d5f546d9c0795fdcffe4ce5bf63445fd Author: Sudip Mukherjee sudipm.mukherjee@gmail.com Date: Thu Apr 7 16:46:04 2016 +0530
ieee802154/adf7242: fix memory leak of firmware
If the firmware upload or the firmware verification fails then we printed the error message and exited but we missed releasing the firmware.
Signed-off-by: Sudip Mukherjee sudip.mukherjee@codethink.co.uk Acked-by: Michael Hennerich michael.hennerich@analog.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit feb2add3235ca81dc5cd5d975490c707a24c9889 Author: Alexander Aring aar@pengutronix.de Date: Wed Mar 16 13:52:41 2016 +0100
6lowpan: iphc: fix handling of link-local compression
This patch fixes handling in case of link-local address compression. A IPv6 link-local address is defined as fe80::/10 prefix which is also what ipv6_addr_type checks for link-local addresses.
But IPHC compression for link-local addresses are for fe80::/64 types only. This patch adds additional checks for zero padded bits in case of link-local address compression to match on a fe80::/64 address only.
Signed-off-by: Alexander Aring aar@pengutronix.de Acked-by: Jukka Rissanen jukka.rissanen@linux.intel.com Reviewed-by: Stefan Schmidt stefan@osg.samsung.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 13407376b255325fa817798800117a839f3aa055 Author: Jiri Slaby jslaby@suse.cz Date: Sat Mar 19 11:49:43 2016 +0100
Bluetooth: vhci: purge unhandled skbs
The write handler allocates skbs and queues them into data->readq. Read side should read them, if there is any. If there is none, skbs should be dropped by hdev->flush. But this happens only if the device is HCI_UP, i.e. hdev->power_on work was triggered already. When it was not, skbs stay allocated in the queue when /dev/vhci is closed. So purge the queue in ->release.
Program to reproduce: #include <err.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/types.h> #include <sys/uio.h>
int main() { char buf[] = { 0xff, 0 }; struct iovec iov = { .iov_base = buf, .iov_len = sizeof(buf), }; int fd;
while (1) { fd = open("/dev/vhci", O_RDWR); if (fd < 0) err(1, "open");
usleep(50);
if (writev(fd, &iov, 1) < 0) err(1, "writev");
usleep(50);
close(fd); }
return 0; }
Result: kmemleak: 4609 new suspected memory leaks unreferenced object 0xffff88059f4d5440 (size 232): comm "vhci", pid 1084, jiffies 4294912542 (age 37569.296s) hex dump (first 32 bytes): 20 f0 23 87 05 88 ff ff 20 f0 23 87 05 88 ff ff .#..... .#..... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: ... [<ffffffff81ece010>] __alloc_skb+0x0/0x5a0 [<ffffffffa021886c>] vhci_create_device+0x5c/0x580 [hci_vhci] [<ffffffffa0219436>] vhci_write+0x306/0x4c8 [hci_vhci]
Fixes: 23424c0d31 (Bluetooth: Add support creating virtual AMP controllers) Signed-off-by: Jiri Slaby jslaby@suse.cz Signed-off-by: Marcel Holtmann marcel@holtmann.org Cc: stable 3.13+ stable@vger.kernel.org
commit 373a32c848ae3a1c03618517cce85f9211a6facf Author: Jiri Slaby jslaby@suse.cz Date: Sat Mar 19 11:05:18 2016 +0100
Bluetooth: vhci: fix open_timeout vs. hdev race
Both vhci_get_user and vhci_release race with open_timeout work. They both contain cancel_delayed_work_sync, but do not test whether the work actually created hdev or not. Since the work can be in progress and _sync will wait for finishing it, we can have data->hdev allocated when cancel_delayed_work_sync returns. But the call sites do 'if (data->hdev)' *before* cancel_delayed_work_sync.
As a result: * vhci_get_user allocates a second hdev and puts it into data->hdev. The former is leaked. * vhci_release does not release data->hdev properly as it thinks there is none.
Fix both cases by moving the actual test *after* the call to cancel_delayed_work_sync.
This can be hit by this program: #include <err.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/types.h>
int main(int argc, char **argv) { int fd;
srand(time(NULL));
while (1) { const int delta = (rand() % 200 - 100) * 100;
fd = open("/dev/vhci", O_RDWR); if (fd < 0) err(1, "open");
usleep(1000000 + delta);
close(fd); }
return 0; }
And the result is: BUG: KASAN: use-after-free in skb_queue_tail+0x13e/0x150 at addr ffff88006b0c1228 Read of size 8 by task kworker/u13:1/32068 ============================================================================= BUG kmalloc-192 (Tainted: G E ): kasan: bad access detected -----------------------------------------------------------------------------
Disabling lock debugging due to kernel taint INFO: Allocated in vhci_open+0x50/0x330 [hci_vhci] age=260 cpu=3 pid=32040 ... kmem_cache_alloc_trace+0x150/0x190 vhci_open+0x50/0x330 [hci_vhci] misc_open+0x35b/0x4e0 chrdev_open+0x23b/0x510 ... INFO: Freed in vhci_release+0xa4/0xd0 [hci_vhci] age=9 cpu=2 pid=32040 ... __slab_free+0x204/0x310 vhci_release+0xa4/0xd0 [hci_vhci] ... INFO: Slab 0xffffea0001ac3000 objects=16 used=13 fp=0xffff88006b0c1e00 flags=0x5fffff80004080 INFO: Object 0xffff88006b0c1200 @offset=4608 fp=0xffff88006b0c0600 Bytes b4 ffff88006b0c11f0: 09 df 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff88006b0c1200: 00 06 0c 6b 00 88 ff ff 00 00 00 00 00 00 00 00 ...k............ Object ffff88006b0c1210: 10 12 0c 6b 00 88 ff ff 10 12 0c 6b 00 88 ff ff ...k.......k.... Object ffff88006b0c1220: c0 46 c2 6b 00 88 ff ff c0 46 c2 6b 00 88 ff ff .F.k.....F.k.... Object ffff88006b0c1230: 01 00 00 00 01 00 00 00 e0 ff ff ff 0f 00 00 00 ................ Object ffff88006b0c1240: 40 12 0c 6b 00 88 ff ff 40 12 0c 6b 00 88 ff ff @..k....@..k.... Object ffff88006b0c1250: 50 0d 6e a0 ff ff ff ff 00 02 00 00 00 00 ad de P.n............. Object ffff88006b0c1260: 00 00 00 00 00 00 00 00 ab 62 02 00 01 00 00 00 .........b...... Object ffff88006b0c1270: 90 b9 19 81 ff ff ff ff 38 12 0c 6b 00 88 ff ff ........8..k.... Object ffff88006b0c1280: 03 00 20 00 ff ff ff ff ff ff ff ff 00 00 00 00 .. ............. Object ffff88006b0c1290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object ffff88006b0c12a0: 00 00 00 00 00 00 00 00 00 80 cd 3d 00 88 ff ff ...........=.... Object ffff88006b0c12b0: 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 . .............. Redzone ffff88006b0c12c0: bb bb bb bb bb bb bb bb ........ Padding ffff88006b0c13f8: 00 00 00 00 00 00 00 00 ........ CPU: 3 PID: 32068 Comm: kworker/u13:1 Tainted: G B E 4.4.6-0-default #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20151112_172657-sheep25 04/01/2014 Workqueue: hci0 hci_cmd_work [bluetooth] 00000000ffffffff ffffffff81926cfa ffff88006be37c68 ffff88006bc27180 ffff88006b0c1200 ffff88006b0c1234 ffffffff81577993 ffffffff82489320 ffff88006bc24240 0000000000000046 ffff88006a100000 000000026e51eb80 Call Trace: ... [<ffffffff81ec8ebe>] ? skb_queue_tail+0x13e/0x150 [<ffffffffa06e027c>] ? vhci_send_frame+0xac/0x100 [hci_vhci] [<ffffffffa0c61268>] ? hci_send_frame+0x188/0x320 [bluetooth] [<ffffffffa0c61515>] ? hci_cmd_work+0x115/0x310 [bluetooth] [<ffffffff811a1375>] ? process_one_work+0x815/0x1340 [<ffffffff811a1f85>] ? worker_thread+0xe5/0x11f0 [<ffffffff811a1ea0>] ? process_one_work+0x1340/0x1340 [<ffffffff811b3c68>] ? kthread+0x1c8/0x230 ... Memory state around the buggy address: ffff88006b0c1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88006b0c1180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88006b0c1200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88006b0c1280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88006b0c1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
Fixes: 23424c0d31 (Bluetooth: Add support creating virtual AMP controllers) Signed-off-by: Jiri Slaby jslaby@suse.cz Signed-off-by: Marcel Holtmann marcel@holtmann.org Cc: Dmitry Vyukov dvyukov@google.com Cc: stable 3.13+ stable@vger.kernel.org
commit a164cee111085f9ee77f6038f006658249073523 Author: Patrik Flykt patrik.flykt@linux.intel.com Date: Thu Mar 24 16:04:15 2016 +0200
Bluetooth: Allow setting BT_SECURITY_FIPS with setsockopt
Update the security level check to allow setting BT_SECURITY_FIPS for an L2CAP socket.
Signed-off-by: Patrik Flykt patrik.flykt@linux.intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 84cb3df02aea4b00405521e67c4c67c2d525c364 Author: Loic Poulain loic.poulain@intel.com Date: Mon Apr 4 10:48:13 2016 +0200
Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
HCI_UART_PROTO_SET flag is set before hci_uart_set_proto call. If we receive data from tty layer during this procedure, proto pointer may not be assigned yet, leading to null pointer dereference in rx method hci_uart_tty_receive.
This patch fixes this issue by introducing HCI_UART_PROTO_READY flag in order to avoid any proto operation before proto opening and assignment.
Signed-off-by: Loic Poulain loic.poulain@intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 1dbfc59a931495b2e7bdc4e85886162a0b03235b Author: Loic Poulain loic.poulain@intel.com Date: Mon Apr 4 11:31:12 2016 +0200
Bluetooth: hci_bcm: Add BCM2E71 ACPI ID
This ID is used at least by Asus T100-CHI.
Signed-off-by: Loic Poulain loic.poulain@intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 56b40fbf61a247e23b50e426971148b2e50262e0 Author: Johan Hedberg johan.hedberg@intel.com Date: Thu Apr 7 21:01:27 2016 +0300
Bluetooth: Ignore unknown advertising packet types
In case of buggy controllers send advertising packet types that we don't know of we should simply ignore them instead of trying to react to them in some (potentially wrong) way.
Signed-off-by: Johan Hedberg johan.hedberg@intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit f18ba58f538e44a701ad0b86d47bb57b917d7c0a Author: Johan Hedberg johan.hedberg@intel.com Date: Wed Apr 6 13:09:05 2016 +0300
Bluetooth: Fix setting NO_BREDR advertising flag
If we're dealing with a single-mode controller or BR/EDR is disable for a dual-mode one, the NO_BREDR flag needs to be unconditionally present in the advertising data. This patch moves it out from behind an extra condition to be always set in the create_instance_adv_data() function if BR/EDR is disabled.
Signed-off-by: Johan Hedberg johan.hedberg@intel.com Signed-off-by: Marcel Holtmann marcel@holtmann.org
commit 70f767d3afa9b2cd447b3dfc33c2751833dce931 Merge: f871165 10ef00f Author: David S. Miller davem@davemloft.net Date: Fri Apr 8 12:13:30 2016 -0400
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 10GbE Intel Wired LAN Driver Updates 2016-04-07
This series contains updates to ixgbe and ixgbevf.
This entire series (except for one patch from Alex) comes from Mark and is mainly to add support for our new MAC (x550em_a).
So let's get Alex's patch out of the way first before we cover Mark's many changes. Alex does his enable bulk free in transmit cleanup for ixgbe and ixgbevf, like his has done for all of our other drivers.
First Mark cleans up registers that were not being used, so do some house cleaning. Then to avoid casting lan_id and func fields, just make them u8 since they only hold small values anyways. Found and fixed an issue where on read operations it could be possible to modify locations beyond the length passed in, so change the check to round up in the same way. Cleaned up the interface for issuing firmware commands to use a void * instead of a u32 * which eliminates a number of casts. Added support for the new MAC and provided method pointers and use them to access IOSF-attached devices, since the new MAC will also need a new access method. Added support for SFPs with an external retimer and for an SGMII backplane interface. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit f8711655f862eabc0cb03e2bccd871069399c53e Merge: b33b0a1 e3edfde Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 21:04:27 2016 -0400
Merge branch 'bpf-tracepoints'
Alexei Starovoitov says:
==================== allow bpf attach to tracepoints
Hi Steven, Peter,
v1->v2: addressed Peter's comments: - fixed wording in patch 1, added ack - refactored 2nd patch into 3: 2/10 remove unused __perf_addr macro which frees up an argument in perf_trace_buf_submit 3/10 split perf_trace_buf_prepare into alloc and update parts, so that bpf programs don't have to pay performance penalty for update of struct trace_entry which is not going to be accessed by bpf 4/10 actual addition of bpf filter to perf tracepoint handler is now trivial and bpf prog can be used as proper filter of tracepoints
v1 cover: last time we discussed bpf+tracepoints it was a year ago [1] and the reason we didn't proceed with that approach was that bpf would make arguments arg1, arg2 to trace_xx(arg1, arg2) call to be exposed to bpf program and that was considered unnecessary extension of abi. Back then I wanted to avoid the cost of buffer alloc and field assign part in all of the tracepoints, but looks like when optimized the cost is acceptable. So this new apporach doesn't expose any new abi to bpf program. The program is looking at tracepoint fields after they were copied by perf_trace_xx() and described in /sys/kernel/debug/tracing/events/xxx/format We made a tool [2] that takes arguments from /sys/.../format and works as: $ tplist.py -v random:urandom_read int got_bits; int pool_left; int input_left; Then these fields can be copy-pasted into bpf program like: struct urandom_read { __u64 hidden_pad; int got_bits; int pool_left; int input_left; }; and the program can use it: SEC("tracepoint/random/urandom_read") int bpf_prog(struct urandom_read *ctx) { return ctx->pool_left > 0 ? 1 : 0; } This way the program can access tracepoint fields faster than equivalent bpf+kprobe program, which is the main goal of these patches.
Patch 1-4 are simple changes in perf core side, please review. I'd like to take the whole set via net-next tree, since the rest of the patches might conflict with other bpf work going on in net-next and we want to avoid cross-tree merge conflicts. Alternatively we can put patches 1-4 into both tip and net-next.
Patch 9 is an example of access to tracepoint fields from bpf prog. Patch 10 is a micro benchmark for bpf+kprobe vs bpf+tracepoint.
Note that for actual tracing tools the user doesn't need to run tplist.py and copy-paste fields manually. The tools do it automatically. Like argdist tool [3] can be used as: $ argdist -H 't:block:block_rq_complete():u32:nr_sector' where 'nr_sector' is name of tracepoint field taken from /sys/kernel/debug/tracing/events/block/block_rq_complete/format and appropriate bpf program is generated on the fly.
[1] http://thread.gmane.org/gmane.linux.kernel.api/8127/focus=8165 [2] https://github.com/iovisor/bcc/blob/master/tools/tplist.py [3] https://github.com/iovisor/bcc/blob/master/tools/argdist.py ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit e3edfdec04d43aa6276db639d3721e073161d2c2 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:31 2016 -0700
samples/bpf: add tracepoint vs kprobe performance tests
the first microbenchmark does fd=open("/proc/self/comm"); for() { write(fd, "test"); } and on 4 cpus in parallel: writes per sec base (no tracepoints, no kprobes) 930k with kprobe at __set_task_comm() 420k with tracepoint at task:task_rename 730k
For kprobe + full bpf program manully fetches oldcomm, newcomm via bpf_probe_read. For tracepint bpf program does nothing, since arguments are copied by tracepoint.
2nd microbenchmark does: fd=open("/dev/urandom"); for() { read(fd, buf); } and on 4 cpus in parallel: reads per sec base (no tracepoints, no kprobes) 300k with kprobe at urandom_read() 279k with tracepoint at random:urandom_read 290k
bpf progs attached to kprobe and tracepoint are noop.
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 3c9b16448cf6924c203e3c01696c87fcbfb71fc6 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:30 2016 -0700
samples/bpf: tracepoint example
modify offwaketime to work with sched/sched_switch tracepoint instead of kprobe into finish_task_switch
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit c07660409ec954403776200cec1dd04b2db851f8 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:29 2016 -0700
samples/bpf: add tracepoint support to bpf loader
Recognize "tracepoint/" section name prefix and attach the program to that tracepoint.
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 32bbe0078afe86a8bf4c67c6b3477781b15e94dc Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:28 2016 -0700
bpf: sanitize bpf tracepoint access
during bpf program loading remember the last byte of ctx access and at the time of attaching the program to tracepoint check that the program doesn't access bytes beyond defined in tracepoint fields
This also disallows access to __dynamic_array fields, but can be relaxed in the future.
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 9940d67c93b5bb7ddcf862b41b1847cb728186c4 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:27 2016 -0700
bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs
needs two wrapper functions to fetch 'struct pt_regs *' to convert tracepoint bpf context into kprobe bpf context to reuse existing helper functions
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 9fd82b610ba3351f05a59c3e9117cfefe82f7751 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:26 2016 -0700
bpf: register BPF_PROG_TYPE_TRACEPOINT program type
register tracepoint bpf program type and let it call the same set of helper functions as BPF_PROG_TYPE_KPROBE
Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit 98b5c2c65c2951772a8fc661f50d675e450e8bce Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:25 2016 -0700
perf, bpf: allow bpf programs attach to tracepoints
introduce BPF_PROG_TYPE_TRACEPOINT program type and allow it to be attached to the perf tracepoint handler, which will copy the arguments into the per-cpu buffer and pass it to the bpf program as its first argument. The layout of the fields can be discovered by doing 'cat /sys/kernel/debug/tracing/events/sched/sched_switch/format' prior to the compilation of the program with exception that first 8 bytes are reserved and not accessible to the program. This area is used to store the pointer to 'struct pt_regs' which some of the bpf helpers will use: +---------+ | 8 bytes | hidden 'struct pt_regs *' (inaccessible to bpf program) +---------+ | N bytes | static tracepoint fields defined in tracepoint/format (bpf readonly) +---------+ | dynamic | __dynamic_array bytes of tracepoint (inaccessible to bpf yet) +---------+
Not that all of the fields are already dumped to user space via perf ring buffer and broken application access it directly without consulting tracepoint/format. Same rule applies here: static tracepoint fields should only be accessed in a format defined in tracepoint/format. The order of fields and field sizes are not an ABI.
Signed-off-by: Alexei Starovoitov ast@kernel.org Acked-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: David S. Miller davem@davemloft.net
commit 1e1dcd93b468901e114f279c94a0b356adc5e7cd Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:24 2016 -0700
perf: split perf_trace_buf_prepare into alloc and update parts
split allows to move expensive update of 'struct trace_entry' to later phase. Repurpose unused 1st argument of perf_tp_event() to indicate event type.
While splitting use temp variable 'rctx' instead of '*rctx' to avoid unnecessary loads done by the compiler due to -fno-strict-aliasing
Signed-off-by: Alexei Starovoitov ast@kernel.org Acked-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: David S. Miller davem@davemloft.net
commit e93735be6a1898dd9f8de8f55254cc76309777ce Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:23 2016 -0700
perf: remove unused __addr variable
now all calls to perf_trace_buf_submit() pass 0 as 4th argument which will be repurposed in the next patch which will change the meaning of 1st arg of perf_tp_event() to event_type
Signed-off-by: Alexei Starovoitov ast@kernel.org Acked-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: David S. Miller davem@davemloft.net
commit ec5e099d6e941668d121ea9ca7057f4fa00830b0 Author: Alexei Starovoitov ast@fb.com Date: Wed Apr 6 18:43:22 2016 -0700
perf: optimize perf_fetch_caller_regs
avoid memset in perf_fetch_caller_regs, since it's the critical path of all tracepoints. It's called from perf_sw_event_sched, perf_event_task_sched_in and all of perf_trace_##call with this_cpu_ptr(&__perf_regs[..]) which are zero initialized by perpcu init logic and subsequent call to perf_arch_fetch_caller_regs initializes the same fields on all archs, so we can safely drop memset from all of the above cases and move it into perf_ftrace_function_call that calls it with stack allocated pt_regs.
Acked-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: Alexei Starovoitov ast@kernel.org Signed-off-by: David S. Miller davem@davemloft.net
commit b33b0a1bf69faff89693df49519fa7b459f5d807 Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 20:40:25 2016 -0400
net: Fix build failure due to lockdep_sock_is_held().
Needs to be protected with CONFIG_LOCKDEP.
Based upon a patch by Hannes Frederic Sowa.
Signed-off-by: David S. Miller davem@davemloft.net
commit 10ef00fe539a387ded9e0d710012500896589dbb Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:51 2016 -0700
ixgbe: Bump version number
Update ixgbe version number.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit f572b2c4c86dcebe6b8684cbab03d9b2ea0d2ad6 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:46 2016 -0700
ixgbe: Add KR backplane support for x550em_a
Add support for x550em_a-based KR backplane devices.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 200157c2e31a5931d0d825e9fddb44d10888e6b3 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:40 2016 -0700
ixgbe: Add support for SGMII backplane interface
Add support for an SGMII backplane interface.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 2d40cd1720cb6eb4406b80866c08d97b92595dfe Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:35 2016 -0700
ixgbe: Add support for SFPs with retimer
Add support for SFPs with an external retimer.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit e84db7272798ed8abb2760a3fcd9c6d89abf99a5 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:30 2016 -0700
ixgbe: Introduce function to control MDIO speed
Move code that controls MDIO speed into a new function because there will be more MACs that need the control.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 537cc5df4fcb82c0ee1f1dc4751357929a135bbc Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:25 2016 -0700
ixgbe: Read and parse NW_MNG_IF_SEL register
Read the IXGBE_NW_MNG_IF_SEL register and use it to set interface attributes.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c898fe280457dcdf500fc1001ee73cb1adedc4d2 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:20 2016 -0700
ixgbe: Read and set instance id
Read the instance number from EEPROM and save it for later use.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d31afc8f5ca11249a3b15dafa5972fc76e4099cf Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:14 2016 -0700
ixgbe: Use new methods for PHY access
Now x550em_a devices will use a new method for PHY access that will get the firmware token for each access.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 49425dfc74512bef9cf15eafb5de0fc98f024e20 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:09 2016 -0700
ixgbe: Add support for x550em_a 10G MAC type
Add support for x550em_a 10G MAC type to the ixgbe driver. The new MAC includes new firmware commands that need to be used to control PHY and IOSF access, so that support is also added. The interface supported is a native SFP+ interface.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 9a5c27e6ef9166612f95564bc2fc69506d1be2b3 Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:18:04 2016 -0700
ixgbe: Use method pointer to access IOSF devices
Provide method pointers and use them to access IOSF-attached devices. A new MAC will introduce a new access method.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 207969b94cf2736f4f2f51aec287a6a0ea7d5dbd Author: Mark Rustad mark.d.rustad@intel.com Date: Fri Apr 1 12:17:59 2016 -0700
ixgbe: Add definitions for x550em_a 10G MAC
Add definitions for a x550em_a 10G MAC device with a native SFP interface.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a711ad89a887f7cb2ecbea591a58b6102ad9be7a Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 21 11:21:31 2016 -0700
ixgbe: Add support for single-port X550 device
Add support for a single-port X550 device.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 8220bbc12d39175964cb56e100fabcedd59c48da Author: Alexander Duyck aduyck@mirantis.com Date: Mon Mar 7 09:30:09 2016 -0800
ixgbe/ixgbevf: Add support for bulk free in Tx cleanup & cleanup boolean logic
This patch enables bulk free in Tx cleanup for ixgbevf and cleans up the boolean logic in the polling routines for ixgbe and ixgbevf in the hopes of avoiding any mix-ups similar to what occurred with i40e and i40evf.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit af7419017626b93ccdf76b12c2b1dc8fe17da4ad Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 14 11:06:02 2016 -0700
ixgbe: Take manageability semaphore for firmware commands
We need to take the manageability semaphore when issuing firmware commands to avoid problems. With this in place, the semaphore is no longer taken in the ixgbe_set_fw_drv_ver_generic function, since it will now always be taken by the ixgbe_host_interface_command function.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5cffde309cb3f6f7aaaa459abd3eba245a863f8a Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 14 11:05:57 2016 -0700
ixgbe: Clean up interface for firmware commands
Clean up the interface for issuing firmware commands to use a void * instead of a u32 *. This eliminates a number of casts. Also clean up ixgbe_host_interface_command in a few other ways, eliminating comparisons with 0, redundant parens and minor formatting issues.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 73457165d71d5ce0e41c0adb7bfa484702c36248 Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 14 11:05:51 2016 -0700
ixgbe: Correct length check for round up
The function ixgbe_host_interface_command actually uses a multiple of word sized buffer to do its business, but only checks against the actual length passed in. This means that on read operations it could be possible to modify locations beyond the length passed in. Change the check to round up in the same way, just to avoid any possible hazard.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3775b814d5380a25ed89b881d845f79f81bc5547 Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 14 11:05:46 2016 -0700
ixgbe: Change the lan_id and func fields to a u8 to avoid casts
Since the lan_id and func fields only ever hold small values, make them u8 to avoid casts used to silence warnings.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 832ac592149f542052e387f17dfcfa7ebea50aaf Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Mar 14 11:05:40 2016 -0700
ixgbe: Delete some unused register definitions
I noticed the SRAMREL registers are not referenced for any device, so delete the definitions.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 03be98226c14d787939381b9f42d81764ea8eedc Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Thu Apr 7 23:53:35 2016 +0200
sock: make lockdep_sock_is_held static inline
I forgot to add inline to lockdep_sock_is_held, so it generated all kinds of build warnings if not build with lockdep support.
Reported-by: kbuild test robot fengguang.wu@intel.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 889750bd2e08a94d52a116056d462b3a8e5616a7 Merge: ba35855 5b7066c Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 17:00:14 2016 -0400
Merge branch 'tipc-next'
Jon Maloy says:
==================== tipc: some small fixes
When fix a minor buffer leak, and ensure that bearers filter packets correctly while they are being shut down.
v2: Corrected typos in commit #3, as per feedback from S. Shtylyov v3: Removed commit #3 from the series. Improved version will be re-submitted later. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 5b7066c3dd24c7d538e5ee402eb24bb182c16dab Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Thu Apr 7 10:09:14 2016 -0400
tipc: stricter filtering of packets in bearer layer
Resetting a bearer/interface, with the consequence of resetting all its pertaining links, is not an atomic action. This becomes particularly evident in very large clusters, where a lot of traffic may happen on the remaining links while we are busy shutting them down. In extreme cases, we may even see links being re-created and re-established before we are finished with the job.
To solve this, we now introduce a solution where we temporarily detach the bearer from the interface when the bearer is reset. This inhibits all packet reception, while sending still is possible. For the latter, we use the fact that the device's user pointer now is zero to filter out which packets can be sent during this situation; i.e., outgoing RESET messages only. This filtering serves to speed up the neighbors' detection of the loss event, and saves us from unnecessary probing.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4e801fa14f68223d36480bced975ebf0c5f9a284 Author: Jon Paul Maloy jon.maloy@ericsson.com Date: Thu Apr 7 10:09:13 2016 -0400
tipc: eliminate buffer leak in bearer layer
When enabling a bearer we create a 'neigbor discoverer' instance by calling the function tipc_disc_create() before the bearer is actually registered in the list of enabled bearers. Because of this, the very first discovery broadcast message, created by the mentioned function, is lost, since it cannot find any valid bearer to use. Furthermore, the used send function, tipc_bearer_xmit_skb() does not free the given buffer when it cannot find a bearer, resulting in the leak of exactly one send buffer each time a bearer is enabled.
This commit fixes this problem by introducing two changes:
1) Instead of attemting to send the discovery message directly, we let tipc_disc_create() return the discovery buffer to the calling function, tipc_enable_bearer(), so that the latter can send it when the enabling sequence is finished.
2) In tipc_bearer_xmit_skb(), as well as in the two other transmit functions at the bearer layer, we now free the indicated buffer or buffer chain when a valid bearer cannot be found.
Acked-by: Ying Xue ying.xue@windriver.com Signed-off-by: Jon Maloy jon.maloy@ericsson.com Signed-off-by: David S. Miller davem@davemloft.net
commit ba35855e24d12d872e6173692bc34d48d96db39c Merge: 1fbbe1a 46aa2f3 Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 16:53:37 2016 -0400
Merge branch 'gro-in-udp'
Tom Herbert says:
==================== udp: GRO in UDP sockets
This patch set adds GRO functions (gro_receive and gro_complete) to UDP sockets and removes udp_offload infrastructure.
Add GRO functions (gro_receive and gro_complete) to UDP sockets. In udp_gro_receive and udp_gro_complete a socket lookup is done instead of looking up the port number in udp_offloads. If a socket is found and there are GRO functions for it then those are called. This feature allows binding GRO functions to more than just a port number. Eventually, we will be able to use this technique to allow application defined GRO for an application protocol by attaching BPF porgrams to UDP sockets for doing GRO.
In order to implement these functions, we added exported udp6_lib_lookup_skb and udp4_lib_lookup_skb functions in ipv4/udp.c and ipv6/udp.c. Also, inet_iif and references to skb_dst() were changed to check that dst is set in skbuf before derefencing. In the GRO path there is now a UDP socket lookup performed before dst is set, to the get the device in that case we simply use skb->dev.
Tested:
Ran various combinations of VXLAN and GUE TCP_STREAM and TCP_RR tests. Did not see any material regression. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 46aa2f30aa7fe03a4dcd732b009284c02ff4f093 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:56 2016 -0700
udp: Remove udp_offloads
Now that the UDP encapsulation GRO functions have been moved to the UDP socket we not longer need the udp_offload insfrastructure so removing it.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4a0090a98e5f6e7813d807c883abf362df4b0507 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:55 2016 -0700
geneve: change to use UDP socket GRO
Adapt geneve_gro_receive, geneve_gro_complete to take a socket argument. Set these functions in tunnel_config. Don't set udp_offloads any more.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit d92283e338f6d6503b7417536bf3478f466cbc01 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:54 2016 -0700
fou: change to use UDP socket GRO
Adapt gue_gro_receive, gue_gro_complete to take a socket argument. Don't set udp_offloads any more.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5602c48cf87562c2f95b831d690631935e834295 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:53 2016 -0700
vxlan: change vxlan to use UDP socket GRO
Adapt vxlan_gro_receive, vxlan_gro_complete to take a socket argument. Set these functions in tunnel_config. Don't set udp_offloads any more.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 38fd2af24fcfda93f9fea3e53f26e48775ae9e09 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:52 2016 -0700
udp: Add socket based GRO and config
Add gro_receive and gro_complete to struct udp_tunnel_sock_cfg.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit a6024562ffd7e0f31bc6671817840ad1e91de7b4 Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:51 2016 -0700
udp: Add GRO functions to UDP socket
This patch adds GRO functions (gro_receive and gro_complete) to UDP sockets. udp_gro_receive is changed to perform socket lookup on a packet. If a socket is found the related GRO functions are called.
This features obsoletes using UDP offload infrastructure for GRO (udp_offload). This has the advantage of not being limited to provide offload on a per port basis, GRO is now applied to whatever individual UDP sockets are bound to. This also allows the possbility of "application defined GRO"-- that is we can attach something like a BPF program to a UDP socket to perfrom GRO on an application layer protocol.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 63058308cd55182bbfd7a87970bd57883fcfbd2e Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:50 2016 -0700
udp: Add udp6_lib_lookup_skb and udp4_lib_lookup_skb
Add externally visible functions to lookup a UDP socket by skb. This will be used for GRO in UDP sockets. These functions also check if skb->dst is set, and if it is not skb->dev is used to get dev_net. This allows calling lookup functions before dst has been set on the skbuff.
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0340d0b9e0e2dc340acb664f19d6550940b22cde Author: Tom Herbert tom@herbertland.com Date: Tue Apr 5 08:22:49 2016 -0700
net: Checks skb_dst to be NULL in inet_iif
In inet_iif check if skb_rtable is NULL for the skb and return skb->skb_iif if it is.
This change allows inet_iif to be called before the dst information has been set in the skb (e.g. when doing socket based UDP GRO).
Signed-off-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1fbbe1a8a9b195c4ac856540dfaef49d663c2e91 Merge: 8501786 8ced425 Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 16:44:15 2016 -0400
Merge branch 'sock-lockdep-tightening'
Hannes Frederic Sowa says:
==================== sock: lockdep tightening
First patch is from Eric Dumazet and improves lockdep accuracy for socket locks. After that, second patch introduces lockdep_sock_is_held and uses it. Final patch reverts and reworks the lockdep fix from Daniel in the filter code, as we now have tighter lockdep support. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 8ced425ee630c03beea06c1dfa35190bf8395d07 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Tue Apr 5 17:10:16 2016 +0200
tun: use socket locks for sk_{attach,detatch}_filter
This reverts commit 5a5abb1fa3b05dd ("tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filter") and replaces it to use lock_sock around sk_{attach,detach}_filter. The checks inside filter.c are updated with lockdep_sock_is_held to check for proper socket locks.
It keeps the code cleaner by ensuring that only one lock governs the socket filter instead of two independent locks.
Cc: Daniel Borkmann daniel@iogearbox.net Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 1e1d04e678cf72442f57ce82803c7a407769135f Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Tue Apr 5 17:10:15 2016 +0200
net: introduce lockdep_is_held and update various places to use it
The socket is either locked if we hold the slock spin_lock for lock_sock_fast and unlock_sock_fast or we own the lock (sk_lock.owned != 0). Check for this and at the same time improve that the current thread/cpu is really holding the lock.
Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 61881cfb5ad80c1d0a46ca6d08b7e271892b2ff6 Author: Hannes Frederic Sowa hannes@stressinduktion.org Date: Tue Apr 5 17:10:14 2016 +0200
sock: fix lockdep annotation in release_sock
During release_sock we use callbacks to finish the processing of outstanding skbs on the socket. We actually are still locked, sk_locked.owned == 1, but we already told lockdep that the mutex is released. This could lead to false positives in lockdep for lockdep_sock_is_held (we don't hold the slock spinlock during processing the outstanding skbs).
I took over this patch from Eric Dumazet and tested it.
Signed-off-by: Eric Dumazet eric.dumazet@gmail.com Signed-off-by: Hannes Frederic Sowa hannes@stressinduktion.org Signed-off-by: David S. Miller davem@davemloft.net
commit 20ac1b325d8d526211b1276ecf9b64b7e8369f50 Merge: 4646968 689de38 Author: Kalle Valo kvalo@codeaurora.org Date: Thu Apr 7 21:44:37 2016 +0300
Merge ath-next from ath.git
ath.git patches for 4.7. Major changes:
ath10k
* implement push-pull tx model using mac80211 software queuing support * enable scan in AP mode (NL80211_FEATURE_AP_SCAN)
wil6210
* add basic PBSS (Personal Basic Service Set) support * add initial P2P support * add oob_mode module parameter
commit 85f1e7c29a46360b1b5f9cf87af6b27066c345fd Author: Haishuang Yan yanhaishuang@cmss.chinamobile.com Date: Sun Apr 3 22:03:33 2016 +0800
netfilter: ipv6: unnecessary to check whether ip6_route_output() returns NULL
ip6_route_output() never returns NULL, so it is not appropriate to check if the return value is NULL.
Signed-off-by: Haishuang Yan yanhaishuang@cmss.chinamobile.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 4646968b94bdf88ae3c507c347d03acd5798939d Author: Xinming Hu huxm@marvell.com Date: Tue Apr 5 01:04:40 2016 -0700
mwifiex: dump pcie scratch registers
This patch prints pcie scratch registers during firmware dump. They will be useful for analysing firmware status.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit bf00dc22bc7a72d58fd1945814321b30948dc83b Author: Xinming Hu huxm@marvell.com Date: Tue Apr 5 01:04:39 2016 -0700
mwifiex: AMSDU Rx frame handling in AP mode
This patch processes sub AMSDU frame received in AP mode.
If a packet is multicast/broadcast, it is sent to kernel/upper layer as well as queued back to AP TX queue so that it can be sent to other associated stations.
If a packet is unicast and RA is present in associated station list, it is again requeued into AP TX queue.
If a packet is unicast and RA is not in associated station list, packet is forwarded to kernel to handle routing logic.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Cathy Luo cluo@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ad5ca845e3d194703be82ad4a2f3042f2e198e2b Author: Xinming Hu huxm@marvell.com Date: Tue Apr 5 01:04:38 2016 -0700
mwifiex: schedule main workqueue for transmitting bridge packets
Bridge packets are enqueued to wmm tx queue, but will not be sent until main workqeue is scheduled for new interrupt or other reason. This adds unnecessary delay during traffic.
We will schedule main workqueue when bridge packet is queued.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 00c5478049683b15599339e36cae7fffc1e62844 Author: Xinming Hu huxm@marvell.com Date: Tue Apr 5 01:04:37 2016 -0700
mwifiex: remove redundant GFP_DMA flag
skb forwarded to TCP/IP stack doesn't need to allocate in DMA ZONE. This patch removes GFP_DMA flag in this case to save precious DMA memory.
Signed-off-by: Xinming Hu huxm@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a362e16b83e1823746874485710c7515eb5ee369 Author: Shengzhen Li szli@marvell.com Date: Tue Apr 5 01:04:36 2016 -0700
mwifiex: check revision id while choosing PCIe firmware
Some of the chipsets have two revisions. This patch selects appropriate firmware by checking revision id.
Signed-off-by: Shengzhen Li szli@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8fa0a0dc634ba1bcf7678db296902d9c4e5025e0 Author: Ganapathi Bhat gbhat@marvell.com Date: Tue Apr 5 01:04:35 2016 -0700
mwifiex: add support for wakeup on GTK rekey failure
User can configure wakeup on GTK rekey fail with wowlan. Added corresponding wakeup reason.
Signed-off-by: Ganapathi Bhat gbhat@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit f6b1cbe029f6828bbdac8b54bdcbdc35420e842e Author: Ganapathi Bhat gbhat@marvell.com Date: Tue Apr 5 01:04:34 2016 -0700
mwifiex: add support for GTK rekey offload
Added driver functionality to offload GTK rekey to firmware. When AP sends new GTK, firmware will update it.
Signed-off-by: Ganapathi Bhat gbhat@marvell.com Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a069caa3c30fc9744a82a6b83503ed93e00e723c Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:42 2016 -0400
rtl8xxxu: Do not set LDOA15 / LDOV12 on 8192eu
Per the vendor driver, it looks like the 8192eu doesn't have LDOA15 / LDOV12 registers.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 91cbe4e73197859498fba9920890979296b842e6 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:41 2016 -0400
rtl8xxxu: Use correct H2C calls for 8192eu
The 8192eu uses the same H2C API as the 8723bu. Call the correct functions for update_rate_mask() and report_connect().
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit af13faff851b49fb99c9b930c823a5362aeb80a1 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:40 2016 -0400
rtl8xxxu: Identify 8192eu rev A/B parts correctly
8192eu A/B cut parts were incorrectly identified as 8192cu devices.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ba17d824783805235f317f79f2871b17bd679956 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:39 2016 -0400
rtl8xxxu: Use enums for chip version numbers
With support for more chips being added, use an enum to specify the chip version.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 931d9278259a91a601c93fe62979c7db53678abb Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:38 2016 -0400
rtl8xxxu: Update some register definitions
Improve descriptive names of some registers and add some additional registers only found on nextgen chips.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit f3fc251162f9390baabcbf812766b074e404d29a Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:37 2016 -0400
rtl8xxxu: 8192eu uses txdesc40
8192eu uses the new TX descriptor format
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 1df1de348572dff0fa7fb9c447d991c8dc1348f8 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:36 2016 -0400
rtl8xxxu: TXDESC_SHORT_GI is txdesc32 only
This is no short GI bit in the txdesc40 format.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 169bc5cb0b8162d271c8fd38ff3d90b098241e16 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:35 2016 -0400
rtl8xxxu: Correct txdesc40 gid definition
txdesc40 dword2 gid is a 6 bit field, not a single bit
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 33f3724948422bc594ffd976ec4272b653562414 Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:34 2016 -0400
rtl8xxxu: Rename TX descriptor bits to map them to 32/40 byte descriptors
With the size based naming of TX descriptors. Change the bit definition namings to indicate which descriptor format they match, rather than having a device name in the bit name.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit dbb2896b485e79be55bacd891db60c85f010045f Author: Jes Sorensen Jes.Sorensen@redhat.com Date: Thu Mar 31 17:08:33 2016 -0400
rtl8xxxu: Change name of struct tx_desc to be more decriptive
There are two major types of TX descriptor formats for the RTL parts, the old 32 byte descriptor, and the newer 40 byte descriptor used by the 8723bu, 8192eu, and 88xx series.
Signed-off-by: Jes Sorensen Jes.Sorensen@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit a5c92f0b6a88a8abe3840869425f1372591a762c Author: Wei-Ning Huang wnhuang@chromium.org Date: Wed Mar 30 18:14:55 2016 +0800
mwifiex: fix NULL pointer dereference error
In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing its member. This sometimes cause kernel panic when suspend/resume.
Signed-off-by: Wei-Ning Huang wnhuang@chromium.org Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 001351881da1822b06e5d92e1fa2bf4920318e8c Author: Colin Ian King colin.king@canonical.com Date: Mon Mar 28 16:53:33 2016 +0100
mwifiex: ie_list is an array, so no need to check if NULL
ap_ie->ie_list is an array of struct mwifiex_ie and can never be null, so the null check on this array is redundant and can be removed.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 84d17a2a5a0f9e19e25d0472f0528996d945826e Author: Julian Calaby julian.calaby@gmail.com Date: Fri Mar 18 13:29:11 2016 +1100
iwl4965: Fix more memory leaks in __il4965_up()
In some of the non-success return paths, the memory allocated by iwl4965_sta_alloc_lq() in iwl4965_alloc_bcast_station() is not freed.
In particular: - if the card isn't ready after il4965_prepare_card_hw() - if the card is hardware-rfkilled
In the hardware rfkilled path, the driver enables the rfkill interrupt. When the card is unrfkilled and this interrupt is raised we end up calling il4965_bg_restart() which calls __il4965_up() which calls iwl4965_alloc_bcast_station() again.
Suggested-by: Jia-Ju Bai baijiaju1990@163.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Acked-by: Stanislaw Gruszka sgruszka@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c2fd34469d1623111e3c3db65cde533f3bddc26e Author: Jia-Ju Bai baijiaju1990@163.com Date: Fri Mar 18 13:28:33 2016 +1100
iwl4965: Fix a memory leak in error handling code of __il4965_up
When il4965_hw_nic_init in __il4965_up fails, the memory allocated by iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed.
This patches adds il_dealloc_bcast_stations in the error handling code of __il4965_up to fix this problem.
This patch has been tested in real device, and it actually fixes the bug.
Signed-off-by: Jia-Ju Bai baijiaju1990@163.com Acked-by: Stanislaw Gruszka sgruszka@redhat.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 37190b2694911552c09119e2b23e65049bf47a1e Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:27:31 2016 +1100
rsi: Move variable initialisation into error code
In rsi_send_data_pkt(), it's a little more logical to assign 'status' in the actual error handling code as opposed to at the top of the functon.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net [Deleted controversial bits, rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ab2ef1d68f62d9e2ec6e494668f288fc000fe886 Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:25:33 2016 +1100
rsi: Delete unnecessary variable initialisation
In rsi_send_data_pkt(), the following variables are assigned to before they're used:
* tmp_hdr - Assigned on line 47, first used on line 48 * bss - Assigned on line 41, first used on line 44 * extnd_size - Assigned on line 50, first used on line 52 * seq_num - Assigned on line 48, first used on line 96
Signed-off-by: Markus Elfring elfring@users.sourceforge.net [Rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8b28310efe241339248e875400c6da16f5d91c1f Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:25:13 2016 +1100
rsi: Delete unnecessary variable initialisation
In rsi_send_mgmt_pkt(), the following variables are assigned to before they're used:
* wh - Assigned on line 161, first used on line 180 * bss - Assigned on line 160, first used on line 196 * msg - Assigned on line 168, first used on line 175 * extnd_size - Assigned on line 139, first used on line 142
Signed-off-by: Markus Elfring elfring@users.sourceforge.net [Rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 1c76b4902c26c73283bb3578829dd0cfe53ce10a Author: Jia-Ju Bai baijiaju1990@163.com Date: Fri Mar 18 13:24:51 2016 +1100
rtl818x_pci: Disable pci device in error handling code
When pci_request_regions in rtl8180_probe fails, pci_disable_device is not called to disable the device which is enabled by pci_enbale_device.
This patch fixes the problem by adding a new lable in error handling code.
Signed-off-by: Jia-Ju Bai baijiaju1990@163.com Acked-by: Andrea Merello andrea.merello@gmail.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 96838d61102a0fca20a7bda7289e0492aaf11896 Author: Jia-Ju Bai baijiaju1990@163.com Date: Fri Mar 18 13:24:28 2016 +1100
b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init
The memory allocated by kzalloc in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init is not freed. This patch fixes the bug by adding kfree in b43_ssb_remove, b43_bcma_remove and error handling code of b43_bcma_probe.
Thanks Michael for his suggestion.
Signed-off-by: Jia-Ju Bai baijiaju1990@163.com Tested-by: Sudip Mukherjee sudip.mukherjee@codethink.co.uk Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit fe9b47944edff9b6244c4f5e81bd7b50574dc22b Author: Jia-Ju Bai baijiaju1990@163.com Date: Fri Mar 18 13:24:06 2016 +1100
iwl4965: Fix a null pointer dereference in il_tx_queue_free and il_cmd_queue_free
If "txq->cmd = kzalloc(...)" in il_tx_queue_init fails, "kfree(txq->cmd[i])" in il_tx_queue_free and il_cmd_queue_free in iwl4965_hw_txq_ctx_free will causes a null pointer dereference, because txq->cmd is NULL at that time.
This patch fixes this problem by adding a if-check before kfree. To avoid double free in il_tx_queue_free and il_cmd_queue_free caused by the fixing, txq->meta and txq->cmd in error handling code of il_tx_queue_init are assigned null values. Otherwise, a double free will occur.
This patch has been tested in real device, and it actually fixes the bug. Thanks Stanislaw for his suggestion.
Signed-off-by: Jia-Ju Bai baijiaju1990@163.com Acked-by: Stanislaw Gruszka sgruszka@redhat.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit fb9693f04544068e6176051ce5b96e4574730107 Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:23:46 2016 +1100
iwlegacy: Return directly if allocation fails in il_eeprom_init()
Also remove an unused label.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Acked-by: Stanislaw Gruszka sgruszka@redhat.com [Rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 9e12904a953c46abc87b0ea157be8de90205b70d Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:23:24 2016 +1100
brcmfmac: Delete unnecessary variable initialisation
In brcmf_sdio_download_firmware(), bcmerror is set by the call to brcmf_sdio_download_code_file(), before it's checked in the following line.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Acked-by: Arend van Spriel arend@broadcom.com [Rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit cfbfbd13695c8f9a93b1ad3edeeedacbb86dbe5c Author: Markus Elfring elfring@users.sourceforge.net Date: Fri Mar 18 13:22:52 2016 +1100
ath9k_htc: Delete unnecessary variable initialisation
In ath9k_hif_usb_rx_stream(), i is initialised in the for loop it's used in.
Signed-off-by: Markus Elfring elfring@users.sourceforge.net Reviewed-by: Oleksij Rempel linux@rempel-privat.de [Rewrote commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 4679f41322012cf69b1035cde3de81151d2aefec Author: Geliang Tang geliangtang@163.com Date: Fri Mar 18 13:22:24 2016 +1100
rtlwifi: use to_delayed_work()
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang geliangtang@163.com [Update commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Acked-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit d1162f0283f0b4421d1098dd048a5e3cf8b2abb6 Author: Geliang Tang geliangtang@163.com Date: Fri Mar 18 13:22:03 2016 +1100
wl1251: use to_delayed_work()
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang geliangtang@163.com [Update commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 61383412f00d5917a28f388c59ebd78cf7c9d909 Author: Geliang Tang geliangtang@163.com Date: Fri Mar 18 13:21:28 2016 +1100
wlcore: use to_delayed_work()
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang geliangtang@163.com [Update commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit ea544aab42dbf35c7b8e80f931db400f4b5add60 Author: Geliang Tang geliangtang@163.com Date: Fri Mar 18 13:20:59 2016 +1100
ipw2x00: use to_pci_dev()
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang geliangtang@163.com Signed-off-by: Julian Calaby julian.calaby@gmail.com Acked-by: Stanislav Yakovlev stas.yakovlev@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 0fef3c768037169f656fc4ae89cf88ff7175e586 Author: Ivan Safonov insafonov@gmail.com Date: Fri Mar 18 13:16:26 2016 +1100
ath9k: Remove unnecessary ?: operator
"(thermometer < 0) ? 0 : (thermometer == X)" is equivalent to "thermometer == X" for X >= 0.
Signed-off-by: Ivan Safonov insafonov@gmail.com [Updated commit message] Signed-off-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8501786929de4616b10b8059ad97abd304a7dddf Author: Eric Dumazet edumazet@google.com Date: Wed Apr 6 22:07:34 2016 -0700
tcp/dccp: fix inet_reuseport_add_sock()
David Ahern reported panics in __inet_hash() caused by my recent commit.
The reason is inet_reuseport_add_sock() was still using sk_nulls_for_each_rcu() instead of sk_for_each_rcu(). SO_REUSEPORT enabled listeners were causing an instant crash.
While chasing this bug, I found that I forgot to clear SOCK_RCU_FREE flag, as it is inherited from the parent at clone time.
Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood") Signed-off-by: Eric Dumazet edumazet@google.com Reported-by: David Ahern dsa@cumulusnetworks.com Tested-by: David Ahern dsa@cumulusnetworks.com Signed-off-by: David S. Miller davem@davemloft.net
commit 94ab1ea94c71b7ba3e835315d69880a8086d7ab1 Merge: de6099e d99e366 Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 11:50:30 2016 -0400
Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 1GbE Intel Wired LAN Driver Updates 2016-04-06
This series contains updates to e1000, e1000e, igb and Kconfig.
Alex fixes igb where we were casting the MAC address as __beXX and then passing it into le32_to_cpu, when we could simply cast as __lexx to maintain consistency since it is already little endian. Then enabled bulk free in transmit cleanup for igb.
John Holland enables igb to pickup the MAC address from a device tree blob when CONFIG_OF has been enabled.
Doron Shikmoni fixes a bug in the output of "ethtool -m ethX" where the data byte appeared duplicated.
Stefan fixes up e1000 and e1000e ethtool offline tests which were calling dev_close() which causes IFF_UP to be cleared which removes teh interface routes and some addresses, so use ndo_stop() instead.
Jiri Benc cleans up some old links in the Kconfig for Intel drivers where we referred to a URL which is no longer valid. I am so glad Jiri has the time in his day to spend clicking on and testing all the URL links in the the kernel.
Arika Chen reverts the addition of a 'rtnl_unlock()' which had a unmatched 'rtnl_lock()' call before it. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 689de38e37179c6f524dd003e1dae92042f8f5cd Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Thu Apr 7 12:07:31 2016 +0530
ath10k: fix unconditional num_mpdus_ready subtraction
Decrement num_mpdus_ready only when rx amsdu is processed successfully. Not doing so, will result in leak and impact stabilty under low memory cases. Also commit 3128b3d8a2b9 ("ath10k: speedup htt rx descriptor processing for rx_ind") missed to removed unused skb list rx_q.
Fixes: 3128b3d8a2b9 ("ath10k: speedup htt rx descriptor processing for rx_ind") Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit dd7c280f9bf5ee6c7c46f03b2064f9f8fb617183 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Thu Apr 7 12:07:30 2016 +0530
ath10k: remove unnecessary warning for probe response drops
qca99x0 and qca4019 solutions limit probe responses transmissions. Logging warning message for each probe response drop is flooding kernel log unnecessary with " failed to increase tx mgmt pending count: -16, dropping". Hence reducing log level to debug.
Reported-by: Sebastian Gottschall s.gottschall@dd-wrt.com Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b131129d96575479e2447d134cb1797cf430b3a4 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Thu Apr 7 12:07:29 2016 +0530
ath10k: fix calibration init sequence of qca99x0
pre-calibration is meant for qca4019 which contains only caldata whereas calibration file is used by ar9888 and qca99x0 that contains both board data and caldata. So by definition both pre-cal-file and cal-file can not coexist. Keeping them in shared memory (union), is breaking boot sequence of qca99x0. Fix it by storing both binaries in separate memories. This issue is reported in ipq8064 platform which includes caldata in flash memory.
Fixes: 3d9195ea19e4 ("ath10k: incorporate qca4019 cal data download sequence") Reported-by: Sebastian Gottschall s.gottschall@dd-wrt.com Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit de6099e27ef33086d7a967bbfce078952312b74d Merge: 58a01d4 ba6cc7f Author: David S. Miller davem@davemloft.net Date: Thu Apr 7 00:06:38 2016 -0400
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 40GbE Intel Wired LAN Driver Updates 2016-04-06
This series contains updates to i40e and i40evf.
Deepthi adds a debug message to display the MSIx vector count for hardware capabilities.
Shannon removed the setting of debug_mask at startup to take care of an issue where all the device capabilities getting printed when we had not asked for it. Moved the NVM status out of the admin queue structure, since it should really stay with the other NVM data structures.
Akeem added the flush routine to the end of the reset flow to avoid problems in the pass-through routines.
Jesse moves a local variable deeper into the depths of the driver where the light is low and the context is great. Then cleaned up the tx_ring argument since it was not making good arguments. Improved performance by not "checking for FCoE" by re-ordering the FCoE checks.
Anjali adds the support for changing a VF from non-trusted to trusted and vice-versa.
Mitch adds opcodes and structures to support RSS configuration by PF driver on behalf of the VF driver. Fixed how the VLAN feature flags are set.
Kiran added defines for RSS, flow director, flexible payload and IPv6. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit d99e366fc90c9b6e6197584ecd3a185441452b0c Author: Arika Chen arika.chen@huawei.com Date: Wed Apr 6 21:02:11 2016 -0700
Revert "igb: Fix a deadlock in igb_sriov_reinit"
This reverts commit 3eb14ea8d958 ("igb: Fix a deadlock in igb_sriov_reinit") It is the same as commit f468adc944ef ("igb: missing rtnl_unlock in igb_sriov_reinit()") There is no rtnl_lock() in igb_resume before, rtnl_unlock will cause a deadlock.
Signed-off-by: Arika Chen arika.chen@huawei.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5bd0c0202aca1003a244b13792c09b40f73eadc0 Author: Jiri Benc jbenc@redhat.com Date: Tue Apr 5 16:25:07 2016 +0200
net: intel: remove dead links
The Kconfig for Intel NICs references two different URLs for the "Adapter & Driver ID Guide". Neither of those two links works. The current URL seems to be http://www.intel.com/content/www/us/en/support/network-and-i-o/ethernet-prod... but given it's apparently constantly changing, there's no point in having it in the help text.
Just keep a generic pointer to http://support.intel.com. Hopefully, this one will have a longer live. It still works, at least.
Furthermore, remove a link to "the latest Intel PRO/100 network driver for Linux", this has no place in the mainline kernel and the latest Linux driver it offers is from 2006, anyway.
Signed-off-by: Jiri Benc jbenc@redhat.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit ba6cc7f6f194e3645368f87d951bedd7e3b75f39 Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Apr 1 13:34:31 2016 -0700
i40evf: properly handle VLAN features
Correctly set the VLAN feature flags after setting the rest of the netdev flags. And don't set them in hw_features, because these can't be controlled by the VF driver.
Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 47c46778e1905721433a413b2522a8e2b3d6c354 Author: Harshitha Ramamurthy harshitha.ramamurthy@intel.com Date: Fri Apr 1 03:56:13 2016 -0700
i40e/i40evf: Bump patch from 1.5.2 to 1.5.5
Signed-off-by: Harshitha Ramamurthy harshitha.ramamurthy@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 17a035be959ef0316ec86adb0c82ed3f057a853b Author: Kiran Patil kiran.patil@intel.com Date: Mon Apr 4 07:01:10 2016 -0700
i40e: Input set mask constants for RSS, flow director, and flex bytes
Add defines for input set mask (RSS, flow director, flexible payload), including defines specific to IPv6.
Change-ID: Ie95ef7d0916a4d6ca011c194283f959774c8dce9 Signed-off-by: Kiran Patil kiran.patil@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit bab2fb60dcdd0f9d8715749d056ddd6c465b1875 Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Apr 1 03:56:11 2016 -0700
i40e: Move NVM event wait check to NVM code
The logic that checks AQ events for NVM done events is better kept in nvm.c with the rest of the nvmupdate handling code.
Change-ID: I2ea58980df8ecaa3726b28a37bff3dfcb8df03dc Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 585954f8b808def857771037392c1621f167fa92 Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Apr 1 03:56:10 2016 -0700
i40e: Add RSS configuration to virtual channel
Add opcodes and structures to support RSS configuration by PF driver on behalf of the VF drivers. This reduces complexity in the VF driver and allows us to support future hardware designs without modifying the VF driver.
Change-ID: I8c75765c630eacb71f95967f1109a198542593ac Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 437f82a2290ed94f0d6a86b749101f1ad5ed6231 Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Apr 1 03:56:09 2016 -0700
i40e: Move NVM variable out of AQ struct
The NVM update status info should stay collected together, not spread across different structs.
Change-ID: Ic16f9e9fd79945d865bb7226184c889884585025 Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 14c5f5d264c3ee28e8ec9fd4dffb29f5d1ea1d02 Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Apr 1 03:56:08 2016 -0700
i40e: Restrict VF poll mode to only single function mode devices
The VFs can request their queues to be set up into polling mode, rather than interrupt mode, which works well for supporting things like DPDK, but this should not be available when working in an multi-function support device.
Change-ID: Id36792e4e7422db8f2033336507211f68f14ff6f Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c3bbbd2002b9565475721bb17b17f48ef5927498 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Fri Apr 1 03:56:07 2016 -0700
i40e: Patch to support trusted VF
This patch adds hook to support changing a VF from not-trusted to trusted and vice-versa. Fixed the wrappers and function prototype. Changed the dmesg to reflex the current state better. This patch also disables turning on/off trusted VF in MFP mode.
Change-ID: Ibcd910935c01f0be1f3fdd6d427230291ee92ebe Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1f15d66712bb64e39fe2c23b1b32f68f9e1d4ee7 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Fri Apr 1 03:56:06 2016 -0700
i40e/i40evf: Faster RX via avoiding FCoE
As it turns out, calling into other files from hot path hurts performance a lot. In this case the majority of the time we call "check FCoE" and the packet is *not* FCoE, but this call was taking 5% of our total cycles spent on receive.
Change-ID: I080552c26e7060bc7b78504dc2763f6f0b3d8c76 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 84b079928a10559ebc6679e1e973a3ee5b20ba83 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Fri Apr 1 03:56:05 2016 -0700
i40e/i40evf: Drop unused tx_ring argument
Some of the tx_ring arguments can be deleted since they are not used.
Change-ID: I99275b0f191d7f63ec2f05061919904940c36f31 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d1bd743b5b4d675e739b574284d1412ba996fe07 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Fri Apr 1 03:56:04 2016 -0700
i40e/i40evf: Move stack var deeper
A local variable could move down inside the context where it is used.
Change-ID: I9caba9e1eacf921037077f2665cbce83fd8e95d6 Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 30728c5bdf2ac6618eebf6949a2e59b3c4cf640f Author: Akeem G Abodunrin akeem.g.abodunrin@intel.com Date: Fri Apr 1 03:56:03 2016 -0700
i40e: Move HW flush
This patch moves the HW flush routine to the end of the reset flow, after the completion of writing to the device VFLR registers- the benefit is to avoid problems in the passthrough routines.
Change-ID: Ieb56866f21895e6c1fc514b7328c3df79807a57c Signed-off-by: Akeem G Abodunrin akeem.g.abodunrin@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 89dd05512b79ee9ba0950f1ba1fb8077ec898ea2 Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Apr 1 03:56:02 2016 -0700
i40e: Leave debug_mask cleared at init
Don't set our internal debug_mask at startup unless we get specific signal to from the debug module parameter.
This should take care of the issue with all the device capabilities getting printed even when we hadn't asked for the debug info.
Change-ID: I7fbc6bd8b11ed9b0631ec018ff36015a04100b6c Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 453e16e8e8b96821111e8d90252f4df8ec418eea Author: Deepthi Kavalur deepthi.kavalur@intel.com Date: Fri Apr 1 03:56:01 2016 -0700
i40e: Inserting a HW capability display info
Display MSIx vector count for HW capabilities.
Change-ID: I4b41e9b50360cf660e7fbcb85b9390fedcf313b1 Signed-off-by: Deepthi Kavalur deepthi.kavalur@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1f2f83f838489d386ecad9d0c77c3d6ec983102c Author: Stefan Assmann sassmann@kpanic.de Date: Wed Feb 3 09:20:51 2016 +0100
e1000: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all.
Signed-off-by: Stefan Assmann sassmann@kpanic.de Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 58a01d4dc43e60208b70ce08604b5bcbb907f0d1 Merge: 92b6d35 d81a6bd Author: David S. Miller davem@davemloft.net Date: Wed Apr 6 17:24:21 2016 -0400
Merge branch 'mlxsw-dcb'
Jiri Pirko says:
==================== mlxsw: Introduce support for Data Center Bridging
Ido says:
This patchset introduces support for Quality of Service (QoS) as part of the IEEE Data Center Bridiging (DCB) standards.
Patches 1-9 do the required device initialization. Specifically, patches 1-6 initialize the ports' headroom buffers, which are used at ingress to store incoming packets while they go through the switch's pipeline. Patches 7-9 complete them by initializing the egress scheduling.
The pipeline mentioned above determines the packet's egress port(s) and traffic class. Ideally, once out of the pipeline the packet moves to the switch's shared buffer (to be introduced in Jiri's patchset, currently default values are used) and scheduled for transmission according to its traffic class. The egress scheduling is configured according to the 802.1Qaz standard, which is part of the DCB infrastructure supported by Linux. This is introduced in patches 10-12.
Even after going through the pipeline packets are not always eligible to enter the shared buffer. This is determined by the amount of available space and the quotas associated with the packet. However, if flow control is enabled and the packet is associated with the lossless flow, then it will stay in the headroom and won't be discarded. This is introduced in patches 13-17.
Please check individual commit messages for more info, as I tried to keep them pretty detailed. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit d81a6bdb87ce75337b453169ee39cdccb3286ddf Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:16 2016 +0200
mlxsw: spectrum: Add IEEE 802.1Qbb PFC support
Implement the appropriate DCB ops and allow a user to configure certain traffic classes as lossless.
The operation configures PFC for both the egress (respecting PFC frames) and ingress (sending PFC frames) parts of the port.
At egress, when a PFC frame is received for a PFC enabled priority, then all the priorities mapped to the same TC are stopped.
At ingress, the priority group (PG) buffers to which the enabled PFC priorities are mapped are configured to be lossless. PFC frames will be transmitted when the Xoff threshold is crossed.
The user-supplied delay parameter is used to determine the PG's size according to the following formula:
PG_SIZE = PG_SIZE_LOSSY + delay * CELL_FACTOR + MTU
In the worst case scenario the delay will be made up of packets that are all of size CELL_SIZE + 1, which means each packet will require almost twice its true size when buffered in the switch. We therefore multiply this value by the "cell factor", which is close to 2.
Another MTU is added in case the transmitting host already started transmitting a maximum length frame when the PFC packet was received.
As with PAUSE enabled ports, when the port's MTU is changed both the PGs' size and threshold are adjusted accordingly.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 34dba0a59d072201171be1aeb9e52d1148d7c365 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:15 2016 +0200
mlxsw: reg: Introduce per priority counters
We are going to add support for PFC as part of DCB ops, which requires us to report the number of PFC frames sent and received per priority.
Add per priority counters in order to report number of PFC frames sent and received per priority.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9f7ec052b75e1fd8a4cc876349a665f5b76669d5 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:14 2016 +0200
mlxsw: spectrum: Add support for PAUSE frames
When a packet ingress the switch it's placed in its assigned priority group (PG) buffer in the port's headroom buffer while it goes through the switch's pipeline. After going through the pipeline - which determines its egress port(s) and traffic class - it's moved to the switch's shared buffer awaiting transmission.
However, some packets are not eligible to enter the shared buffer due to exceeded quotas or insufficient space. Marking their associated PGs as lossless will cause the packets to accumulate in the PG buffer. Another reason for packets accumulation are complicated pipelines (e.g. involving a lot of ACLs).
To prevent packets from being dropped a user can enable PAUSE frames on the port. This will mark all the active PGs as lossless and set their size according to the maximum delay, as it's not configured by user.
+----------------+ + | | | | | | | | | | | | | | | | | | Delay | | | | | | | | | | | | | | | Xon/Xoff threshold +----------------+ + | | | | | | 2 * MTU | | | +----------------+ +
The delay (612 [Cells]) was calculated according to worst-case scenario involving maximum MTU and 100m cables.
After marking the PGs as lossless the device is configured to respect incoming PAUSE frames (Rx PAUSE) and generate PAUSE frames (Tx PAUSE) according to user's settings.
Whenever the port's headroom configuration changes we take into account the PAUSE configuration, so that we correctly set the PG's type (lossy / lossless), size and threshold. This can happen when:
a) The port's MTU changes, as it directly affects the PG's size.
b) A PG is created following user configuration, by binding a priority to it.
Note that the relevant SUPPORTED flags were already mistakenly set by the driver before this commit.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 155f9de2e09547ed510b86a4b463c2980e7df46a Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:13 2016 +0200
mlxsw: reg: Add lossless settings for PBMC register
When configuring PAUSE frames and PFC we'll need to configure the Xon/Xoff threshold for the priority group (PG) buffers.
Add the Xon/Xoff threshold fields to the PBMC register so that we can configure these when needed.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6f253d8381e9e7b8a254e7384b7d32ea5784e6e8 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:12 2016 +0200
mlxsw: reg: Add Port Flow Control Configuration register
Add the Port Flow Control Configuration (PFCC) register, which configures both flow control and Priority-based Flow Control (PFC).
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit cc7cf5175807daa9cb51f6e0eb034f60ced6b251 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:11 2016 +0200
mlxsw: spectrum: Allow setting maximum rate for a TC
Allow a user to set maximum rate for a particular TC using DCB ops.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 8e8dfe9fdf063cd61f35ed82f5be463791a613a5 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:10 2016 +0200
mlxsw: spectrum: Add IEEE 802.1Qaz ETS support
Implement the appropriate DCB ops and allow a user to configure: * Priority to traffic class (TC) mapping with a total of 8 supported TCs * Transmission selection algorithm (TSA) for each TC and the corresponding weights in case of weighted round robin (WRR)
As previously explained, we treat the priority group (PG) buffer in the port's headroom as the ingress counterpart of the egress TC. Therefore, when a certain priority to TC mapping is configured, we also configure the port's headroom buffer.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit f00817df2b428ec13711bd27729f992b8c3af054 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:09 2016 +0200
mlxsw: spectrum: Introduce support for Data Center Bridging (DCB)
Introduce basic infrastructure for DCB and add the missing ops in following patches.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 90183b980d0af77df2369dee924fff13c792dcc5 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:08 2016 +0200
mlxsw: spectrum: Initialize egress scheduling
Before introducing support for DCB ops we should first make sure we initialize the relevant parts in the device correctly. Specifically, the egress scheduling.
The device supports a superset of the 802.1Qaz standard with 4 hierarchy levels that can be linked to each other in multiple ways and with different transmission selection algorithms (TSA) employed between them.
However, since we only intend to support the 802.1Qaz standard we flatten the hierarchies and let the user configure via DCB ops the TSA and max rate shaper at the subgroup hierarchy (see figure below) and the mapping between switch priority to traffic class. By default, all switch priorities are mapped to traffic class 0, strict priority is employed and max shaper is disabled.
Default configuration:
switch priority 0 ... switch priority 7 + + | | +----------------------------------+ | +--v--+ +-----+ Traffic Class | | | | Hierarchy | TC0 | ... | TC7 | | | | | +--+--+ +--+--+ | | +--v--+ +--v--+ Subgroup | SG0 | | SG7 | Hierarchy | | | | +-----+ +-----+ | TSA | | TSA | +-----+ ... +-----+ | MAX | | MAX | +--+--+ +--+--+ | | +---------------+----------------+ | +--v--+ Group | | Hierarchy | GR0 | | | +--+--+ | +--v--+ Port | | Hierarchy | PR0 | | | +-----+
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2c63a555e8495f3d6db443ca73094a6a3508df4a Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:07 2016 +0200
mlxsw: reg: Add QoS Switch Traffic Class Table register
As part of DCB ops we'll have to configure the priority to traffic class mapping of a port.
Add the QoS Switch Traffic Class Table (QTCT) register, which configures the mapping between the packet switch priority and traffic class on the transmit port.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b9b7cee405797cc395f699d8dee4747b96b1e0a8 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:06 2016 +0200
mlxsw: reg: Add QoS ETS Element Configuration register
We are going to introduce support for DCB, so we need to be able to configure the traffic selection algorithm (TSA) used by each traffic class (TC), as well as the bandwidth percentage allocated to each TC in case of ETS.
Add the QoS ETS Element Configuration register, which controls the above parameters.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d6b7c13b018f1785743150f079638bb3ed69fff1 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:05 2016 +0200
mlxsw: spectrum: Set port's shared buffer size to 0
In addition to the priority group (PG) buffers in the headroom, the device enables the allocation of headroom shared buffer, which can be shared between different PGs.
However, we are not going to use the headroom shared buffer and instead allow the user to use its size for PGs or the switch's shared buffer.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7ad7cd6113bacace67c55cadef6459eb0e74403d Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:04 2016 +0200
mlxsw: reg: Use correct PBMC register length
The last field of the PBMC register is at offset 0x64 and its size is 0x8, so the correct register's length is 0x6C bytes.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit ff6551ec0c2748a31087878f00bcaf6db2f82116 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:03 2016 +0200
mlxsw: spectrum: Correctly configure headroom size
When packets ingress the switch they are assigned a switch priority and directed to the corresponding priority group (PG) buffer in the port's headroom buffer.
Since we now map all switch priorities to priority group 0 (PG0) by default, there is no need to allocate the other priority groups during initialization. The only exception is PG9, which is used for control traffic.
At minimum, the PG should be able to store the currently classified packet (pipeline latency isn't 0) and also the packets arriving during the classification time. However, an incoming packet will not be buffered if there is no available MTU-sized buffer space for storing it.
The buffer needed to accommodate for pipeline latency is variable and needs to take into account both the current link speed and current latency of the pipeline, which is time-dependent. Testing showed that setting the PG's size to twice the current MTU is optimal.
Since PG9 is used strictly for control packets and not subject to flow control, we are not going to resize it according to user configuration, so we simply set it according to worst case scenario, which is twice the maximum MTU.
In any case, later patches in the series will allow a user to direct lossless flows to other PGs than PG0 and set their size to accommodate for round-trip propagation delay.
The above change also requires us to resize the PG buffer whenever the port's MTU is changed.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 1a1984490f5c123ee62394bc435a2c09db15cc18 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:02 2016 +0200
mlxsw: spectrum: Add bytes to cells helper
Buffers in the switch store packets in units called buffer cells. Add a helper to convert from bytes to cells, so that the actual number of cells required (result is round up) is returned.
Also, drop the SB (shared buffer) acronym from the BYTES_PER_CELL macro, as this unit is also used in the ports' buffers and not only the switch's shared buffer.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit dd6cb0f9fdb31c4bf89e482031cd098bf5f706d4 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:01 2016 +0200
mlxsw: spectrum: Map all switch priorities to priority group 0
During transmission, the skb's priority is used to map the skb to a traffic class, where the idea is to group priorities with similar characteristics (e.g. lossy, lossless) to the same traffic class. By default, all priorities are mapped to traffic class 0.
In the device, we model the skb's priority as the switch priority, which is assigned to a packet according to its PCP value and ingress port (untagged packets are assigned the port's default switch priority - 0).
At ingress, the packet is directed to a priority group (PG) buffer in the port's headroom buffer according to the packet's switch priority and switch priority to buffer mapping.
While it's possible to configure the egress mapping between skb's priority (switch priority) and traffic class, there is no mechanism to configure the ingress mapping to a PG.
In order to keep things simple and since grouping certain priorities into a traffic class at egress also implies they should be grouped the same at ingress, treat a PG as the ingress counterpart of an egress traffic class.
Having established the above, during initialization map all the switch priorities to PG0 in accordance with the Linux defaults for traffic class mapping.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b98ff151b659b08f71cc2e21ce7044da6662b314 Author: Ido Schimmel idosch@mellanox.com Date: Wed Apr 6 17:10:00 2016 +0200
mlxsw: reg: Add Port Prio To Buffer register
When packets ingress the switch they are assigned a switch priority number that dictates the packet's priority group (PG) buffer in the port's headroom buffer.
Add the Port Prio To Buffer (PPTB) register, which configures the switch priority to PG mapping.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit d5ea45da1f04a3443710306e16db3b3aeae92918 Author: Stefan Assmann sassmann@kpanic.de Date: Wed Feb 3 09:20:52 2016 +0100
e1000e: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all.
Signed-off-by: Stefan Assmann sassmann@kpanic.de Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 92b6d35fac3f15fa9f8e833030e3c743e04fb0e5 Merge: 6f55563 24d41e5 Author: David S. Miller davem@davemloft.net Date: Wed Apr 6 17:03:35 2016 -0400
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 40GbE Intel Wired LAN Driver Updates 2016-04-05
This series contains updates to i40e and i40evf only.
Colin Ian King cleaned up a redundant NULL check which was found by static analysis.
Anjali enables geneve receive offload for XL710/X710 devices.
Mitch cleans up unused variable in i40e_vc_get_vf_resources_msg(). Fixed the driver to actually be able to adjust VLAN tagging features through ethtool, as expected. Fixed a problem where VF resets would get lost by the PF preventing the VF driver from initializing. Also put users mind at ease by lowering some message levels since many of these conditions can happen any time VFs are enabled or disabled and are not really indicative a fatal problems, unless they happen continuously.
Shannon disables the link polling to lessen the admin queue traffic especially since the link event mask usage has been fixed recently.
Alex Duyck fixes the i40e and i40evf drivers to correctly update checksums for frames up to 16776960 in length which should be more than large enough for all possible TSO frames in the near future. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 6f5556356a1ed288fd24f0521a9c606632ad9e1f Merge: 8a21ec4 e1e5314 Author: David S. Miller davem@davemloft.net Date: Wed Apr 6 16:50:33 2016 -0400
Merge branch 'vxlan-gpe'
Jiri Benc says:
==================== vxlan: implement Generic Protocol Extension (GPE)
v3: just rebased on top of the current net-next, no changes
This patchset implements VXLAN-GPE. It follows the same model as the tun/tap driver: depending on the chosen mode, the vxlan interface is created either as ARPHRD_ETHER (non-GPE) or ARPHRD_NONE (GPE).
Note that the internal fdb control plane cannot be used together with VXLAN-GPE and attempt to configure it will be rejected by the driver. In fact, COLLECT_METADATA is required to be set for now. This can be relaxed in the future by adding support for static PtP configuration; it will be backward compatible and won't affect existing users.
The previous version of the patchset supported two GPE modes, L2 and L3. The L2 mode (now called "ether mode" in the code) was removed from this version. It can be easily added later if there's demand. The L3 mode is now called "raw mode" and supports also encapsulated Ethernet headers (via ETH_P_TEB).
The only limitation of not having "ether mode" for GPE is for ip route based encapsulation: with such setup, only IP packets can be encapsulated. Meaning no Ethernet encapsulation. It seems there's not much use for this, though. If it turns out to be useful, we'll add it. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit e1e5314de08ba6003b358125eafc9ad9e75a950c Author: Jiri Benc jbenc@redhat.com Date: Tue Apr 5 14:47:13 2016 +0200
vxlan: implement GPE
Implement VXLAN-GPE. Only COLLECT_METADATA is supported for now (it is possible to support static configuration, too, if there is demand for it).
The GPE header parsing has to be moved before iptunnel_pull_header, as we need to know the protocol.
v2: Removed what was called "L2 mode" in v1 of the patchset. Only "L3 mode" (now called "raw mode") is added by this patch. This mode does not allow Ethernet header to be encapsulated in VXLAN-GPE when using ip route to specify the encapsulation, IP header is encapsulated instead. The patch does support Ethernet to be encapsulated, though, using ETH_P_TEB in skb->protocol. This will be utilized by other COLLECT_METADATA users (openvswitch in particular).
If there is ever demand for Ethernet encapsulation with VXLAN-GPE using ip route, it's easy to add a new flag switching the interface to "Ethernet mode" (called "L2 mode" in v1 of this patchset). For now, leave this out, it seems we don't need it.
Disallowed more flag combinations, especially RCO with GPE. Added comment explaining that GBP and GPE cannot be set together.
Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit a6d5bbf34efa8330af7b0b1dba0f38148516ed97 Author: Jiri Benc jbenc@redhat.com Date: Tue Apr 5 14:47:12 2016 +0200
ip_tunnel: implement __iptunnel_pull_header
Allow calling of iptunnel_pull_header without special casing ETH_P_TEB inner protocol.
Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 47e5d1b06305e73afc917f47b65490adb06c7194 Author: Jiri Benc jbenc@redhat.com Date: Tue Apr 5 14:47:11 2016 +0200
vxlan: move fdb code to common location in vxlan_xmit
Handle VXLAN_F_COLLECT_METADATA before VXLAN_F_PROXY. The latter does not make sense with the former, as it needs populated fdb which does not happen in metadata mode.
After this cleanup, the fdb code in vxlan_xmit is moved to a common location and can be later skipped for VXLAN-GPE which does not necessarily carry inner Ethernet header.
v2: changed commit description to not reference L3 mode
Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0c867c9bf84ce2a998f83725bd363f66ce84d548 Author: Jiri Benc jbenc@redhat.com Date: Tue Apr 5 14:47:10 2016 +0200
vxlan: move Ethernet initialization to a separate function
This will allow to initialize vxlan in ARPHRD_NONE mode based on the passed rtnl attributes.
v2: renamed "l2mode" to "ether".
Signed-off-by: Jiri Benc jbenc@redhat.com Signed-off-by: David S. Miller davem@davemloft.net
commit efea95d45e6ab4a30df9801f8e9bf68007ee9b43 Author: Doron Shikmoni doron.shikmoni@gmail.com Date: Wed Feb 17 09:34:25 2016 +0200
igb: Garbled output for "ethtool -m"
Garbled output for "ethtool -m ethX", in igb-driven NICs with module / plugin EEPROM (i.e. SFP information). Each output data byte appears duplicated.
In igb_ethtool.c, igb_get_module_eeprom() is reading the EEPROM via i2c; the eeprom offset for each word that's read via igb_read_phy_reg_i2c() was passed in #words, whereas it needs to be a byte offset. This patches fixes the bug.
Signed-off-by: Doron Shikmoni doron.shikmoni@gmail.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 8a21ec4e0abb99884ef2da3e4f950025f3bf7fd3 Author: Hariprasad Shenai hariprasad@chelsio.com Date: Tue Apr 5 09:52:21 2016 +0530
cxgb4/cxgb4vf: Deprecate module parameter dflt_msg_enable
Message level can be set through ethtool, so deprecate module parameter which is used to set the same.
Signed-off-by: Hariprasad Shenai hariprasad@chelsio.com Signed-off-by: David S. Miller davem@davemloft.net
commit 806ffb1d504927d1449397377eac63bb63489266 Author: John Holland jotihojr@gmail.com Date: Thu Feb 18 12:10:52 2016 +0100
igb: allow setting MAC address on i211 using a device tree blob
The Intel i211 LOM PCIe Ethernet controllers' iNVM operates as an OTP and has no external EEPROM interface [1]. The following allows the driver to pickup the MAC address from a device tree blob when CONFIG_OF has been enabled.
[1] http://www.intel.com/content/www/us/en/embedded/products/networking/i211-eth...
Signed-off-by: John Holland jotihojr@gmail.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 7f0ba845607364c76009e396a31651fa3a24bd1c Author: Alexander Duyck aduyck@mirantis.com Date: Mon Mar 7 09:30:21 2016 -0800
igb: Add support for bulk Tx cleanup & cleanup boolean logic
This patch enables bulk free in Tx cleanup for igb and cleans up the boolean logic in the polling routines for igb in the hopes of avoiding any mix-ups similar to what occurred with i40e and i40evf.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 415cd2a645b2573f173cc52419049f9caacf9a47 Author: Alexander Duyck aduyck@mirantis.com Date: Fri Mar 18 16:06:53 2016 -0700
igb: Fix sparse warning about passing __beXX into leXX_to_cpup
We were casting the addr as __beXX and then passing it into le32_to_cpu because the device expects the MAC address to be in network order even though the register set is little endian. Instead of casting it as __beXX we can just cast it as __leXX in order to maintain consistency since the region of memory is already in little endian order as far as we are concerned.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Aaron Brown aaron.f.brown@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d9f5725fb00b87f99d6fc876d27f7d54ab351669 Author: Amitkumar Karwar akarwar@marvell.com Date: Tue Mar 22 12:09:56 2016 +0800
mwifiex: advertise low priority scan feature
Low priority scan handling code which delays or aborts scan operation based on Tx traffic is removed recently. The reason is firmware already takes care of it in our new feature scan channel gap. Hence we should advertise low priority scan support to cfg80211.
This patch fixes a problem in which OBSS scan request from wpa_supplicant was being rejected by cfg80211.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Wei-Ning Huang wnhuang@chromium.org Tested-by: Wei-Ning Huang wnhuang@chromium.org Acked-by: Amitkumar Karwar akarwar@marvell.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 3d43e031840057f9609da3c546787f05cd6c5518 Author: Colin Ian King colin.king@canonical.com Date: Sun Mar 20 17:34:52 2016 +0000
brcmfmac: sdio: remove unused variable retry_limit
retry_limit has never been used during the life of this driver, so we may as well remove it as it is redundant.
Signed-off-by: Colin Ian King colin.king@canonical.com Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 8b4c0009313f3d42e2540e3e1f776097dd0db73d Author: Vishal Thanki vishalthanki@gmail.com Date: Sat Mar 19 11:41:01 2016 +0100
rt2x00usb: Use usb anchor to manage URB
With current driver, it is observed that a URB is not completed while the USB disconnect is initiated. Due to that, the URB completion handler is trying to access the resource which was freed as a part of USB disconnect. Managing the URBs with anchor will make sure that all the URBs are handled gracefully before device gets disconnected.
Signed-off-by: Vishal Thanki vishalthanki@gmail.com Acked-by: Stanislaw Gruszka sgruszka@redhat.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit e32993eb3aed598790ba0c581796c357898bd8f0 Author: Colin Ian King colin.king@canonical.com Date: Fri Mar 18 16:20:48 2016 +0000
wl12xx: remove redundant null check on wl->scan.ssid
ssid is an array of u8, so it can never be null, so the null check on wl->scan.ssid is redundant and can be removed.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 466414a084a90a15b81601bdde0c5803dc061ecd Author: Joe Perches joe@perches.com Date: Thu Mar 17 17:00:21 2016 -0700
rtlwifi: btcoexist: Convert BTC_PRINTK to btc_<foo>_dbg
Use a more common logging style.
Miscellanea:
o Add specific logging macros for ALGORITHM and INTERFACE types o Output the messages at KERN_DEBUG o Coalesce formats o Align arguments o Whitespace style adjustments for only these changes
Signed-off-by: Joe Perches joe@perches.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 1e812458206e3b787951868d6f8acaae5e3f4aca Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:41:04 2016 -0500
rtlwifi: rtl8821ae: Fix Smatch warnings
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:1960 rtl8812ae_dm_txpower_tracking_callback_thermalmeter() warn: inconsistent indenting CHECK drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:455 phy_get_tx_swing_8812A() warn: inconsistent indenting drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:517 phy_get_tx_swing_8812A() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit b3c4201bce5e32a353e68e1daf2aed213b8495e7 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:41:03 2016 -0500
rtlwifi: rtl8723be: Fix Smatch warnings
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:1726 _rtl8723be_phy_path_a_rx_iqk() warn: inconsistent indenting drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2304 _rtl8723be_phy_lc_calibrate() warn: inconsistent indenting drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2609 _rtl8723be_phy_set_rf_power_state() warn: inconsistent indenting CHECK drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.c drivers/net/wireless/realtek/rtlwifi/rtl8723be/rf.c:306 _rtl8723be_get_txpower_writeval_by_regulatory() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 154fb486df3d8e2fb346dfb9777abe20b23e1d6f Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:41:02 2016 -0500
rtlwifi: rtl8723ae: Fix Smatch warning
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c:137 rtl8723e_dm_bt_need_to_dec_bt_pwr() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c42ceccec17056940d0c97da79ff14d71062cc28 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:41:01 2016 -0500
rtlwifi: rtl8192se: Fix Smatch warning
Smatch lists the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c:648 rtl92s_phy_set_rf_power_state() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 05d9e1bba43b3b9e722ca06fc45b79d93374be18 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:41:00 2016 -0500
rtlwifi: rtl8192ee: Fix Smatch warning
Smatch lists the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c:371 rtl92ee_rx_query_desc() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit de8a9a6eeb572f7f0e8a87df9f29264c04503af4 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:40:59 2016 -0500
rtlwifi: rtl8192c-common: Fix Smatch warning
Smatch lists the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c:243 rtl92c_dm_false_alarm_counter_statistics() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 844026f609fc35918228cbb9ff2fd48e373504f7 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:40:58 2016 -0500
rtlwifi: rtl8188ee: Fix Smatch warnings
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c:1140 rtl88e_dm_check_txpower_tracking() warn: inconsistent indenting CHECK drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1906 _rtl88e_phy_lc_calibrate() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 2e074fab347e1231bc1da156a12b37b6f746712c Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:40:57 2016 -0500
rtlwifi: btcoexist: Fix Smatch warning
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3078 btc8723b2ant_run_coexist_mechanism() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 37c52934c66810205707ddeb42eb08b06a5af4c4 Author: Larry Finger Larry.Finger@lwfinger.net Date: Thu Mar 17 13:40:56 2016 -0500
rtlwifi: Fix Smatch warnings
Smatch reports the following:
CHECK drivers/net/wireless/realtek/rtlwifi/pci.c drivers/net/wireless/realtek/rtlwifi/pci.c:366 rtl_pci_check_buddy_priv() error: we previously assumed 'tpriv' could be null (see line 368) drivers/net/wireless/realtek/rtlwifi/pci.c:1216 _rtl_pci_init_struct() warn: inconsistent indenting
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit baa1702290953295e421f0f433e2b1ff4815827c Author: Larry Finger Larry.Finger@lwfinger.net Date: Wed Mar 16 13:33:35 2016 -0500
rtlwifi: btcoexist: Implement antenna selection
The previous patch added an option to rtl8723be to manually select the antenna for those cases when only a single antenna is present, and the on-board EEPROM is incorrectly programmed. This patch implements the necessary changes in the Bluetooth coexistence driver.
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Cc: Stable stable@vger.kernel.org [V4.0+] Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit c18d8f5095715c56bb3cd9cba64242542632054b Author: Larry Finger Larry.Finger@lwfinger.net Date: Wed Mar 16 13:33:34 2016 -0500
rtlwifi: rtl8723be: Add antenna select module parameter
A number of new laptops have been delivered with only a single antenna. In principle, this is OK; however, a problem arises when the on-board EEPROM is programmed to use the other antenna connection. The option of opening the computer and moving the connector is not always possible as it will void the warranty in some cases. In addition, this solution breaks the Windows driver when the box dual boots Linux and Windows.
A fix involving a new module parameter has been developed. This commit adds the new parameter and implements the changes needed for the driver.
Signed-off-by: Larry Finger Larry.Finger@lwfinger.net Cc: Stable stable@vger.kernel.org [V4.0+] Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 0026b32d723e958bac8f335ba3f47825b11b7287 Author: Amitkumar Karwar akarwar@marvell.com Date: Wed Mar 16 07:46:16 2016 -0700
mwifiex: fix Tx timeout issue during suspend test
Call netif_carrier_off/on while stoping/starting netdev queues. This fixes netdev watchdog warning and ->ndo_tx_timeout() invocation during suspend resume stress test.
Signed-off-by: Amitkumar Karwar akarwar@marvell.com Fixes: 54f008497b9f09f ('mwifiex: Empty Tx queue during suspend') Tested-by: Wei-Ning Huang wnhuang@chromium.org Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 977bc523000d51693c4b083463dc93bbb692a662 Author: Dan Carpenter dan.carpenter@oracle.com Date: Tue Mar 15 10:06:10 2016 +0300
brcmfmac: uninitialized "ret" variable
There is an error path where "ret" isn't initialized.
Signed-off-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit f8df33da2c9bbea3a72dff5326bb5de2ef8392d6 Author: Geert Uytterhoeven geert+renesas@glider.be Date: Mon Mar 14 16:31:10 2016 +0100
mwifiex: Spelling s/minmum/minimum/, s/bandwidth/bandwith/
Signed-off-by: Geert Uytterhoeven geert+renesas@glider.be Signed-off-by: Kalle Valo kvalo@codeaurora.org
commit 97b9b84464086f97b7b5399ede45bdb64da7a017 Merge: 4da46ce 46167a8 Author: Kalle Valo kvalo@codeaurora.org Date: Wed Apr 6 21:16:01 2016 +0300
Merge tag 'iwlwifi-next-for-kalle-2016-03-30' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
* Support for Link Quality measurement (Aviya) * Improvements in thermal (Chaya Rachel) * Various cleanups (many people) * Improvements in firmware error dump (Golan) * More work 9000 devices and MSIx (Haim) * Continuation of the Dynamic Queue Allocation work (Liad) * Scan timeout to cope with buggy firmware (Luca) * D0i3 improvements (Luca) * Make the paging less memory hungry (Matti) * 9000 new Rx path (Sara)
commit 4ce2bd9c4c1dfb416206ff1ad5283f6d24af4031 Author: Jouni Malinen jouni@qca.qualcomm.com Date: Tue Mar 29 13:53:28 2016 +0300
cfg80211: Allow reassociation to be requested with internal SME
If the user space issues a NL80211_CMD_CONNECT with NL80211_ATTR_PREV_BSSID when there is already a connection, allow this to proceed as a reassociation instead of rejecting the new connect command with EALREADY.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com [validate prev_bssid] Signed-off-by: Johannes Berg johannes.berg@intel.com
commit ba6fbacf9c073effaedf0c52fe7e52e2baf67725 Author: Jouni Malinen jouni@qca.qualcomm.com Date: Tue Mar 29 13:53:27 2016 +0300
cfg80211: Add option to specify previous BSSID for Connect command
This extends NL80211_CMD_CONNECT to allow the NL80211_ATTR_PREV_BSSID attribute to be used similarly to way this was already allowed with NL80211_CMD_ASSOCIATE. This allows user space to request reassociation (instead of association) when already connected to an AP. This provides an option to reassociate within an ESS without having to disconnect and associate with the AP.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 918fe04b288b3784f4ca90d3dff12fc23dc2751f Author: Felix Fietkau nbd@openwrt.org Date: Thu Mar 3 22:59:01 2016 +0100
mac80211: minstrel_ht: set A-MSDU tx limits based on selected max_prob_rate
Prevents excessive A-MSDU aggregation at low data rates or bad conditions.
Signed-off-by: Felix Fietkau nbd@openwrt.org Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 6e0456b5454561c4e9fa9e8a4acea405e6d56c80 Author: Felix Fietkau nbd@openwrt.org Date: Thu Mar 3 22:59:00 2016 +0100
mac80211: add A-MSDU tx support
Requires software tx queueing and fast-xmit support. For good performance, drivers need frag_list support as well. This avoids the need for copying data of aggregated frames. Running without it is only supported for debugging purposes.
To avoid performance and packet size issues, the rate control module or driver needs to limit the maximum A-MSDU size by setting max_rc_amsdu_len in struct ieee80211_sta.
Signed-off-by: Felix Fietkau nbd@openwrt.org [fix locking issue] Signed-off-by: Johannes Berg johannes.berg@intel.com
commit c9c5962b56c10c34d8fedc20cd6d6ebdaa2383c6 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:11 2016 +0300
mac80211: enable collecting station statistics per-CPU
If the driver advertises the new HW flag USE_RSS, make the station statistics on the fast-rx path per-CPU. This will enable calling the RX in parallel, only hitting locking or shared cachelines when the fast-RX path isn't available.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 49ddf8e6e2347cffdcf83d1ca2d04ff929820178 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:10 2016 +0300
mac80211: add fast-rx path
The regular RX path has a lot of code, but with a few assumptions on the hardware it's possible to reduce the amount of code significantly. Currently the assumptions on the driver are the following: * hardware/driver reordering buffer (if supporting aggregation) * hardware/driver decryption & PN checking (if using encryption) * hardware/driver did de-duplication * hardware/driver did A-MSDU deaggregation * AP_LINK_PS is used (in AP mode) * no client powersave handling in mac80211 (in client mode)
of which some are actually checked per packet: * de-duplication * PN checking * decryption and additionally packets must * not be A-MSDU (have been deaggregated by driver/device) * be data packets * not be fragmented * be unicast * have RFC 1042 header
Additionally dynamically we assume: * no encryption or CCMP/GCMP, TKIP/WEP/other not allowed * station must be authorized * 4-addr format not enabled
Some data needed for the RX path is cached in a new per-station "fast_rx" structure, so that we only need to look at this and the packet, no other memory when processing packets on the fast RX path.
After doing the above per-packet checks, the data path collapses down to a pretty simple conversion function taking advantage of the data cached in the small fast_rx struct.
This should speed up the RX processing, and will make it easier to reason about parallelizing RX (for which statistics will need to be per-CPU still.)
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 0f9c5a61d4b2330b12c59126aa5a9108dbfce555 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:09 2016 +0300
mac80211: fix RX u64 stats consistency on 32-bit platforms
On 32-bit platforms, the 64-bit counters we keep need to be protected to be consistently read. Use the u64_stats_sync mechanism to do that.
In order to not end up with overly long lines, refactor the tidstats assignments a bit.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 4f6b1b3daaf167bf927174224e07efd17ed95984 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:08 2016 +0300
mac80211: fix last RX rate data consistency
When storing the last_rate_* values in the RX code, there's nothing to guarantee consistency, so a concurrent reader could see, e.g. last_rate_idx on the new value, but last_rate_flag still on the old, getting completely bogus values in the end.
To fix this, I lifted the sta_stats_encode_rate() function from my old rate statistics code, which encodes the entire rate data into a single 16-bit value, avoiding the consistency issue.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit b8da6b6a99b4b0d8d464b621ba7dcbcb08172b7d Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:07 2016 +0300
mac80211: add separate last_ack variable
Instead of touching the rx_stats.last_rx from the status path, introduce and use a status_stats.last_ack variable. This will make rx_stats.last_rx indicate when the last frame was received, making it available for real "last_rx" and statistics gathering; statistics, when done per-CPU, will need to figure out which place was updated last for those items where the "last" value is exposed.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 2df8bfd7240117b91241a01e3f50f2e83827ccab Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:06 2016 +0300
mac80211: remove rx_stats.last_rx update after sta alloc
There's no need to update rx_stats.last_rx after allocating a station since it's already updated during allocation.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 0be6ed133835b1a5e492f86099ce372b5a2e2296 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:05 2016 +0300
mac80211: move averaged values out of rx_stats
Move the averaged values out of rx_stats and into rx_stats_avg, to cleanly split them out. The averaged ones cannot be supported for parallel RX in a per-CPU fashion, while the other values can be collected per CPU and then combined/selected when needed.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 8ebaa5b0a791631dddbb3a215b342fabb2a5307b Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:04 2016 +0300
mac80211: move semicolon out of CALL_RXH macro
Move the semicolon, people typically assume that and once line already put a semicolon behind the "call".
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit de8f18d3a80bee94ee8a2d3c511707390dad88d6 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:03 2016 +0300
mac80211: count MSDUs in A-MSDU properly
For the RX MSDU statistics, we need to count the number of MSDUs created and accepted from an A-MSDU. Right now, all frames in any A-MSDUs were completely ignored. Fix this by moving the RX MSDU statistics accounting into the deliver function.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit d63b548fffdbd239a5e65bb89424be19229048ba Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 31 20:02:02 2016 +0300
mac80211: allow passing transmitter station on RX
Sometimes drivers already looked up, or know out-of-band from their device, which station transmitted a given RX frame. Allow them to pass the station pointer to mac80211 to save the extra lookup.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 24d41e5e2c9afe99b0584832206ba8779dfb783e Author: Alexander Duyck aduyck@mirantis.com Date: Fri Mar 18 16:06:47 2016 -0700
i40e/i40evf: Fix TSO checksum pseudo-header adjustment
With IPv4 and IPv6 now using the same format for checksums based on the length of the frame we need to update the i40e and i40evf drivers so that they correctly account for lengths greater than or equal to 64K.
With this patch the driver should now correctly update checksums for frames up to 16776960 in length which should be more than large enough for all possible TSO frames in the near future.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 066439ce791b5d8533556a89836c0849589c2b41 Author: Avinash Dayanand avinash.dayanand@intel.com Date: Fri Mar 18 12:18:16 2016 -0700
i40e/i40evf: Bump patch from 1.5.1 to 1.5.2
Signed-off-by: Avinash Dayanand avinash.dayanand@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 867a79e37ed9a3a5a2051cc11df21a57a8a00bfe Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Mar 18 12:18:15 2016 -0700
i40e: Request PHY media event at reset time
Add the Media Not Available flag to the link event mask. It seems that event comes first if you have a DA cable pulled out, but there's no follow-up event for Link Down; if you're not looking for MEDIA_NA you will get no event, even though there's now no Link.
Change-ID: cb3340a2849805bb881f64f6f2ae810eef46eba7 Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 18b7af57d9c1165c2b8f13ec4668d6d7f51708cf Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Mar 18 12:18:14 2016 -0700
i40e: Lower some message levels
These conditions can happen any time VFs are enabled or disabled and are not really indicative of fatal problems unless they happen continuously.
Lower the log level so that people don't get scared.
Change-ID: I1ceb4adbd10d03cbeed54d1f5b7f20d60328351d Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 16badc34695ff489a39e450b4e4e5a241ac85a31 Author: Avinash Dayanand avinash.dayanand@intel.com Date: Fri Mar 18 12:18:13 2016 -0700
i40e: Fix for supported link modes in 10GBaseT PHY's
100baseT/Full is now listed and supported link mode for 10GBaseT PHY. This is a fix to list all the supported link modes of 10GBaseT PHY.
Change-ID: If2be3212ef0fef85fd5d6e4550c7783de2f915e9 Signed-off-by: Avinash Dayanand avinash.dayanand@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 539a379c50220d6ac19c7300671fe25819bd3f1b Author: Catherine Sullivan catherine.sullivan@intel.com Date: Fri Mar 18 12:18:12 2016 -0700
i40evf: Fix get_rss_aq
We were passing in the seed where we should just be passing false because we want the VSI table not the pf table.
Change-ID: I9b633ab06eb59468087f0c0af8539857e99f9495 Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 8c806b676d21a49628250731f4e30a8a071d080c Author: Shannon Nelson shannon.nelson@intel.com Date: Fri Mar 18 12:18:11 2016 -0700
i40e: Disable link polling
Periodic link polling was added when the link events were found not to be trustworthy. This was the case early on, but was likely because the link event mask was being used incorrectly. As this has been fixed in recent code, we can disable the link polling to lessen the AQ traffic.
Change-ID: Id890b5ee3c2d04381fc76ffa434777644f5d8eb0 Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 22ead37f8af83b4fa32c15cc21d3541e74661339 Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Mar 18 12:18:10 2016 -0700
i40evf: Add longer wait after remove module
Upon module remove, wait a little longer after requesting a reset before checking to see if the firmware responded. This change prevents double resets when the firmware is busy.
Change-ID: Ieedc988ee82fac1f32a074bf4d9e4dba426bfa58 Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 7369ca8745499d001663e1dccf15064a3eb34b4d Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Mar 18 12:18:09 2016 -0700
i40e: Make VF resets more reliable
Clear the VFLR bit immediately after triggering a reset instead of waiting until after cleanup is complete. Make sure to trigger a reset every time, not just if the PF is up.
These changes fix a problem where VF resets would get lost by the PF, preventing the VF driver from initializing.
Change-ID: I5945cf2884095b7b0554867c64df8617e71d9d29 Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d6bf58c2e88f9e0cfc029c158e1182eb1f07d7eb Author: Catherine Sullivan catherine.sullivan@intel.com Date: Fri Mar 18 12:18:08 2016 -0700
i40e: Add new device ID for X722
The new device ID is 0x37D3 and it should follow the same flows and branding string as for 0x37D0.
Change-ID: Ia5ad4a1910268c4666a3fd46a7afffbec55b4fc2 Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c4445aedfe092907c2e792ff76ed4338d9a1cd52 Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Mar 18 12:18:07 2016 -0700
i40evf: Fix VLAN features
Users of ethtool were being given the mistaken impression that this driver was able to change its VLAN tagging features, and were disappointed that this was not actually the case. Implement ndo_fix_features method so that we can adjust these flags as needed to avoid false impressions.
Change-ID: I08584f103a4fa73d6a4128d472e4ef44dcfda57f Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 442b25e455f5e693c23f9d3a32b208ca9ab25cf0 Author: Mitch Williams mitch.a.williams@intel.com Date: Fri Mar 18 12:18:06 2016 -0700
i40e: Remove unused variable
This variable is vestigial, a remnant of the primordial code from which this driver spawned. We can safely remove it.
Change-ID: I24e0fe338e7c7c50d27dc5515564f33caefbb93a Signed-off-by: Mitch Williams mitch.a.williams@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 3845ccea34df30680b5be7ec119f5c74ab57fdc0 Author: Anjali Singhai Jain anjali.singhai@intel.com Date: Fri Mar 18 12:18:05 2016 -0700
i40e: Enable Geneve offload for FW API ver > 1.4 for XL710/X710 devices
This patch enables the Capability for XL710/X710 devices with FW API version higher than 1.4 to do geneve Rx offload.
Change-ID: I9a8f87772c48d7d67dc85e3701d2e0b845034c0b Signed-off-by: Anjali Singhai Jain anjali.singhai@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit afb8ece4326f2151771f4c40b8d9f799cee5ae6e Author: Colin King colin.king@canonical.com Date: Sat Feb 13 23:57:16 2016 +0000
i40e: remove redundant check on vsi->active_vlans
active_vlans is an unsigned long array, hence a null check on this array is superfluous and can be removed.
Detected with static analysis by smatch:
drivers/net/ethernet/intel/i40e/i40e_debugfs.c:386 i40e_dbg_dump_vsi_seid() warn: this array is probably non-NULL. 'vsi->active_vlans'
Signed-off-by: Colin Ian King colin.king@canonical.com Acked-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4da46cebbd3b4dc445195a9672c99c1353af5695 Author: Aaron Conole aconole@bytheb.org Date: Sat Apr 2 15:26:43 2016 -0400
net/core/dev: Warn on a too-short GRO frame
When signaling that a GRO frame is ready to be processed, the network stack correctly checks length and aborts processing when a frame is less than 14 bytes. However, such a condition is really indicative of a broken driver, and should be loudly signaled, rather than silently dropped as the case is today.
Convert the condition to use net_warn_ratelimited() to ensure the stack loudly complains about such broken drivers.
Signed-off-by: Aaron Conole aconole@bytheb.org Signed-off-by: David S. Miller davem@davemloft.net
commit 9be02cdfa601776f9e65013d9f1b949d5024f457 Author: Thomas Falcon tlfalcon@linux.vnet.ibm.com Date: Fri Apr 1 17:20:35 2016 -0500
ibmvnic: enable RX checksum offload
Enable RX Checksum offload feature in the ibmvnic driver.
Signed-off-by: Thomas Falcon tlfalcon@linux.vnet.ibm.com Cc: John Allen jallen@linux.vnet.ibm.com Signed-off-by: David S. Miller davem@davemloft.net
commit ad7775dc7b8b0b5585ff114b04d5ad50737c423e Author: Thomas Falcon tlfalcon@linux.vnet.ibm.com Date: Fri Apr 1 17:20:34 2016 -0500
ibmvnic: map L2/L3/L4 header descriptors to firmware
Allow the VNIC driver to provide descriptors containing L2/L3/L4 headers to firmware. This feature is needed for greater hardware compatibility and enablement of checksum and TCP offloading features.
A new function is included for the hypervisor call, H_SEND_SUBCRQ_INDIRECT, allowing a DMA-mapped array of SCRQ descriptor elements to be sent to the VNIC server.
These additions will help fully enable checksum offloading as well as other features as they are included later.
Signed-off-by: Thomas Falcon tlfalcon@linux.vnet.ibm.com Cc: John Allen jallen@linux.vnet.ibm.com Signed-off-by: David S. Miller davem@davemloft.net
commit 590ddaa49519e083cab5e030fd845015628757ac Merge: 66f8779 7ee4062 Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 19:33:52 2016 -0400
Merge branch 'bcmgenet-cleanups'
Petri Gynther says:
==================== bcmgenet cleanups
Three cleanup patches for bcmgenet. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 7ee4062562bae8f248f0aa72dfb3023ddea65942 Author: Petri Gynther pgynther@google.com Date: Tue Apr 5 14:00:01 2016 -0700
net: bcmgenet: cleanup for dmadesc_set()
dmadesc_set() is used for setting the Tx buffer DMA address, length, and status bits on a Tx ring descriptor when a frame is being Tx'ed.
Always set the Tx buffer DMA address first, before updating the length and status bits, i.e. giving the Tx descriptor to the hardware.
The reason this is a cleanup rather than a fix is that the hardware won't transmit anything from a Tx ring until the TDMA producer index has been incremented. As long as the dmadesc_set() writes complete before the TDMA producer index write, life is good.
Signed-off-by: Petri Gynther pgynther@google.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 824ba603573d910e32df75fe6a5e7d7ec2a0a6a7 Author: Petri Gynther pgynther@google.com Date: Tue Apr 5 14:00:00 2016 -0700
net: bcmgenet: cleanup for bcmgenet_xmit_frag()
Add frag_size = skb_frag_size(frag) and use it when needed.
Signed-off-by: Petri Gynther pgynther@google.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit f5a9ec20b3b2adf03a0b01902cda913b05abd382 Author: Petri Gynther pgynther@google.com Date: Tue Apr 5 13:59:59 2016 -0700
net: bcmgenet: cleanup for bcmgenet_xmit()
1. Readability: Move nr_frags assignment a few lines down in order to bundle index -> ring -> txq calculations together. 2. Readability: Add parentheses around nr_frags + 1. 3. Minor fix: Stop the Tx queue and throw the error message only if the Tx queue hasn't already been stopped.
Signed-off-by: Petri Gynther pgynther@google.com Acked-by: Florian Fainelli f.fainelli@gmail.com Signed-off-by: David S. Miller davem@davemloft.net
commit 66f87790361c2c33dd7948a618da0cb632eed20d Merge: e43d15c 627d2d6 Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 16:29:38 2016 -0400
Merge branch 'udp-peek'
Willem de Bruijn says:
==================== udp: support SO_PEEK_OFF
Support peeking at a non-zero offset for UDP sockets. Match the existing behavior on Unix datagram sockets.
1/3 makes the sk_peek_offset functions safe to use outside locks 2/3 removes udp headers before enqueue, to simplify offset arithmetic 3/3 introduces SO_PEEK_OFFSET support, with Unix socket peek semantics.
Changes v1->v2 - squash patches 3 and 4 ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 627d2d6b550094d88f9e518e15967e7bf906ebbf Author: samanthakumar samanthakumar@google.com Date: Tue Apr 5 12:41:16 2016 -0400
udp: enable MSG_PEEK at non-zero offset
Enable peeking at UDP datagrams at the offset specified with socket option SOL_SOCKET/SO_PEEK_OFF. Peek at any datagram in the queue, up to the end of the given datagram.
Implement the SO_PEEK_OFF semantics introduced in commit ef64a54f6e55 ("sock: Introduce the SO_PEEK_OFF sock option"). Increase the offset on peek, decrease it on regular reads.
When peeking, always checksum the packet immediately, to avoid recomputation on subsequent peeks and final read.
The socket lock is not held for the duration of udp_recvmsg, so peek and read operations can run concurrently. Only the last store to sk_peek_off is preserved.
Signed-off-by: Sam Kumar samanthakumar@google.com Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac Author: samanthakumar samanthakumar@google.com Date: Tue Apr 5 12:41:15 2016 -0400
udp: remove headers from UDP packets before queueing
Remove UDP transport headers before queueing packets for reception. This change simplifies a follow-up patch to add MSG_PEEK support.
Signed-off-by: Sam Kumar samanthakumar@google.com Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit b9bb53f3836f4eb2bdeb3447be11042bd29c2408 Author: Willem de Bruijn willemb@google.com Date: Tue Apr 5 12:41:14 2016 -0400
sock: convert sk_peek_offset functions to WRITE_ONCE
Make the peek offset interface safe to use in lockless environments. Use READ_ONCE and WRITE_ONCE to avoid race conditions between testing and updating the peek offset.
Suggested-by: Eric Dumazet edumazet@google.com Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit e43d15c8d3c8680fbf142360e5958f2ddd437047 Merge: f1cc809 50f26a5 Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 16:26:31 2016 -0400
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 40GbE Intel Wired LAN Driver Updates 2016-04-05
This series contains updates to i40e and i40evf only.
Stefan converts dev_close() to ndo_stop() for ethtool offline self test, since dev_close() causes IFF_UP to be cleared which will remove the interface routes and addresses.
Alex bumps up the size of the transmit data buffer to 12K rather than 8K, which provides a gain in throughput and a reduction in overhead for putting together the frame. Fixed an issue in the polling routines where we were using bitwise operators to avoid the side effects of the logical operators. Then added support for bulk transmit clean for skbs.
Jesse fixed a sparse issue in the type casting in the transmit code and fixed i40e_aq_set_phy_debug() to use i40e_status as a return code.
Catherine cleans up duplicated code.
Shannon fixed the cleaning up of the interrupt handling to clean up the IRQs only if we actually got them set up. Also fixed up the error scenarios where we were trying to remove a non-existent timer or worktask, which causes the kernel heartburn.
Mitch changes the notification of resets to the reset interrupt handler, instead of the actual reset initiation code. This allows the VFs to get properly notified for all resets, including resets initiated by different PFs on the same physical device. Also moved the clearing of VFLR bit after reset processing, instead of before which could lead to double resets on VF init. Fixed code comment to match the actual function name. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit f1cc8094de7b04dda6f3c5c776f7202dbe6c20ea Merge: 04c85bf 29c262f Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 16:20:49 2016 -0400
Merge branch 'bnxt_en-next'
Michael Chan says:
==================== bnxt_en: Updates for net-next.
Update to latest firmware interface, add EEE feature, unsupported SFP+ module warning, and ethtool -s improvements.
v2: Removed the GEEPROM patch and added more comments to the get_eee patch. ====================
commit 29c262fed4067c52977ba279cf71520f9991a050 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:09:03 2016 -0400
bnxt_en: Improve ethtool .get_settings().
If autoneg is off, we should always report the speed and duplex settings even if it is link down so the user knows the current settings. The unknown speed and duplex should only be used for autoneg when link is down.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9d9cee08fc9f5c4df84ef314158fd19c013bcec6 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:09:02 2016 -0400
bnxt_en: Check for valid forced speed during ethtool -s.
Check that the forced speed is a valid speed supported by firmware. If not supported, return -EINVAL.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 4bb13abf208cb484a9b9d1af9233b0ef850c2fe7 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:09:01 2016 -0400
bnxt_en: Add unsupported SFP+ module warnings.
Add the PORT_CONN_NOT_ALLOWED async event handling logic. The driver will print an appropriate warning to reflect the SFP+ module enforcement policy done in the firmware.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 25be862370031056989ee76e3c48c3ac8ff67fd4 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:09:00 2016 -0400
bnxt_en: Set async event bits when registering with the firmware.
Currently, the driver only sets bit 0 of the async_event_fwd fields. To be compatible with the latest spec, we need to set the appropriate event bits handled by the driver. We should be handling link change and PF driver unload events, so these 2 bits should be set.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 72b34f04e0b00956dd679ae18bf2163669df8b56 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:08:59 2016 -0400
bnxt_en: Add get_eee() and set_eee() ethtool support.
Allow users to get|set EEE parameters.
v2: Added comment for preserving the tx_lpi_timer value in get_eee.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 939f7f0ca442187db2a4ec7a40979c711b0c939e Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:08:58 2016 -0400
bnxt_en: Add EEE setup code.
1. Add bnxt_hwrm_set_eee() function to setup EEE firmware parameters based on the bp->eee settings. 2. The new function bnxt_eee_config_ok() will check if EEE parameters need to be modified due to autoneg changes. 3. bnxt_hwrm_set_link() has added a new parameter to update EEE. If the parameter is set, it will call bnxt_hwrm_set_eee().
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 170ce01301a2a1a87808765531d938fa0b023641 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:08:57 2016 -0400
bnxt_en: Add basic EEE support.
Get EEE capability and the initial EEE settings from firmware. Add "EEE is active | not active" to link up dmesg.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit c9ee9516c161da2d072e035907aa35a35dfa68a8 Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:08:56 2016 -0400
bnxt_en: Improve flow control autoneg with Firmware 1.2.1 interface.
Make use of the new AUTONEG_PAUSE bit in the new interface to better control autoneg flow control settings, independent of RX and TX advertisement settings.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 11f15ed394782dd018d60a0bb550616a8571b43c Author: Michael Chan michael.chan@broadcom.com Date: Tue Apr 5 14:08:55 2016 -0400
bnxt_en: Update to Firmware 1.2.2 spec.
Use new field names in API structs and stop using deprecated fields auto_link_speed and auto_duplex in phy_cfg/phy_qcfg structs.
Update copyright year to 2016.
Signed-off-by: Michael Chan michael.chan@broadcom.com Signed-off-by: David S. Miller davem@davemloft.net
commit 04c85bfb4f75d1dd02bc6e82698db701dd5ea8a9 Merge: 265bee7 0ea7fae Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 16:08:02 2016 -0400
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 100GbE Intel Wired LAN Driver Updates 2016-04-05
This series contains updates to fm10k only.
Bruce provides nearly half of the patches in the series, most of which do general cleanup of the driver. These include semantic cleanups, checkpatch.pl fixes, update driver to use BIT() kernel macro, use BUILD_BUG_ON() where appropriate and use ether_addr_copy() instead of memcpy().
Jake provides the remaining patches in the series, starting with a fix for a possible NULL pointer deference. Next delays initialization of the service timer and service task until late in probe(). If we do not wait, failures in probe do not properly cleanup the service timer or service task items which result in a kernel panic. Added better reporting during error conditions. Fixed another possible kernel panic where we were clearing the interrupt scheme before we freed the mailbox IRQ. Added helper functions for setting strings and data for ethtool stats. Fixed comment mis-spelled words.
v2: Dropped patch 3 from the original submission, until a better solution can be worked up based on feedback from Joe Perches and David Miller. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 0ea7fae44094b4ca06ea68105457a7dc64041bd3 Author: Jacob Keller jacob.e.keller@intel.com Date: Tue Feb 16 16:19:24 2016 -0800
fm10k: use ethtool_rxfh_indir_default for default redirection table
The fm10k driver used its own code for generating a default indirection table on device load, which was not the same as the default generated by ethtool when indir_size of 0 is passed to SRXFH. Take advantage of ethtool_rxfh_indir_default() and simplify code to write the redirection table to reduce some code duplication.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d8ec92f2cdcc7f2d06dd0a40b600b6da7d9d1070 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Feb 10 14:45:51 2016 -0800
fm10k: fix a minor typo in some comments
s/funciton/function to resolve a typo, and cleanup grammar on a few comments regarding processing the VF mailboxes.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4be37c42a40cec94b0381b42e5796d3316f96c32 Author: Jacob Keller jacob.e.keller@intel.com Date: Wed Feb 10 14:45:50 2016 -0800
fm10k: correctly clean up when init_queueing_scheme fails
Fix a kernel panic that occurs during surprise removal. Clear the interface queue counts upon fm10k_init_msix_capability failure. This prevents further code (fm10k_update_stats etc.) from attempting to access unallocated queue vector or ring memory.
[ 628.692648] BUG: unable to handle kernel NULL pointer dereference at 0000000000000068 [ 628.692805] IP: [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k] [ 628.693173] PGD 0 [ 628.693759] Oops: 0000 [#1] SMP [ 628.699321] CPU: 10 PID: 8164 Comm: kworker/10:0 Tainted: G OE ------------ 3.10.0-327.el7.x86_64 #1 [ 628.700096] Hardware name: Supermicro X9DAi/X9DAi, BIOS 3.2 05/09/2015 [ 628.700894] Workqueue: pciehp-1 pciehp_power_thread [ 628.701686] task: ffff88086559c500 ti: ffff8808593c0000 task.ti: ffff8808593c0000 [ 628.702493] RIP: 0010:[<ffffffffa0475caf>] [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k] [ 628.703310] RSP: 0018:ffff8808593c3b00 EFLAGS: 00010282 [ 628.704132] RAX: 0000000000000000 RBX: ffff880860760000 RCX: 0000000000000000 [ 628.704963] RDX: ffff880860760b08 RSI: 0000000000000000 RDI: 0000000000000000 [ 628.705794] RBP: ffff8808593c3b40 R08: 0000000000000000 R09: 0000000000000000 [ 628.706604] R10: 0000000000000000 R11: ffff880860760c40 R12: 0000000000000080 [ 628.707420] R13: ffff8808607608c0 R14: ffff880860779ec0 R15: ffff880860779f40 [ 628.708238] FS: 0000000000000000(0000) GS:ffff88086f000000(0000) knlGS:0000000000000000 [ 628.709071] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 628.709923] CR2: 0000000000000068 CR3: 000000000194a000 CR4: 00000000001407e0 [ 628.710752] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 628.711596] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 628.712438] Stack: [ 628.713255] ffff880860764458 ffff8808607608c0 ffff880860760000 ffff880860760000 [ 628.714088] 0000000000000080 ffff8808607608c0 ffff880860779ec0 ffff880860779f40 [ 628.714925] ffff8808593c3b88 ffffffffa04780c5 ffff880860764458 0000000a8163cb5b [ 628.715752] Call Trace: [ 628.716560] [<ffffffffa04780c5>] fm10k_down+0x155/0x1f0 [fm10k] [ 628.717367] [<ffffffffa0479958>] fm10k_close+0x28/0xd0 [fm10k] [ 628.718184] [<ffffffff81526365>] __dev_close_many+0x85/0xd0 [ 628.718986] [<ffffffff815264d8>] dev_close_many+0x98/0x120 [ 628.719764] [<ffffffff81527ab8>] rollback_registered_many+0xa8/0x230 [ 628.720527] [<ffffffff81527c80>] rollback_registered+0x40/0x70 [ 628.721294] [<ffffffff81529198>] unregister_netdevice_queue+0x48/0x80 [ 628.722052] [<ffffffff815291ec>] unregister_netdev+0x1c/0x30 [ 628.722816] [<ffffffffa04762b8>] fm10k_remove+0xd8/0xe0 [fm10k] [ 628.723581] [<ffffffff81328c7b>] pci_device_remove+0x3b/0xb0 [ 628.724340] [<ffffffff813f5fbf>] __device_release_driver+0x7f/0xf0 [ 628.725088] [<ffffffff813f6053>] device_release_driver+0x23/0x30 [ 628.725814] [<ffffffff81321fe4>] pci_stop_bus_device+0x94/0xa0 [ 628.726535] [<ffffffff813220d2>] pci_stop_and_remove_bus_device+0x12/0x20 [ 628.727249] [<ffffffff8133de40>] pciehp_unconfigure_device+0xb0/0x1b0 [ 628.727964] [<ffffffff8133d822>] pciehp_disable_slot+0x52/0xd0 [ 628.728664] [<ffffffff8133d98a>] pciehp_power_thread+0xea/0x150 [ 628.729358] [<ffffffff8109d5fb>] process_one_work+0x17b/0x470 [ 628.730036] [<ffffffff8109e3cb>] worker_thread+0x11b/0x400 [ 628.730730] [<ffffffff8109e2b0>] ? rescuer_thread+0x400/0x400 [ 628.731385] [<ffffffff810a5aef>] kthread+0xcf/0xe0 [ 628.732036] [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140 [ 628.732674] [<ffffffff81645858>] ret_from_fork+0x58/0x90 [ 628.733289] [<ffffffff810a5a20>] ? kthread_create_on_node+0x140/0x140 [ 628.733883] Code: 83 e8 01 48 8d 97 40 02 00 00 45 31 c0 4c 8d 9c c7 48 02 0 [ 628.735202] RIP [<ffffffffa0475caf>] fm10k_update_stats+0x7f/0x2c0 [fm10k] [ 628.735732] RSP <ffff8808593c3b00> [ 628.736285] CR2: 0000000000000068 [ 628.736846] ---[ end trace 9156088b311aff42 ]---
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c4114e3db6429c665adc3db871685c474a467efe Author: Bruce Allan bruce.w.allan@intel.com Date: Wed Feb 10 14:45:47 2016 -0800
fm10k: prevent possibly uninitialized variable
If 'attr_flag < (1 << (2 * FM10K_TEST_MSG_NESTED))' is ever false, err will be used uninitialized.
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d2e0721b18f320232dc36a0e4cc7beb620e8c9bd Author: Jacob Keller jacob.e.keller@intel.com Date: Fri Feb 5 10:43:08 2016 -0800
fm10k: add helper functions to set strings and data for ethtool stats
Reduce duplicate code and the amount of indentation by adding fm10k_add_stat_strings and fm10k_add_ethtool_stats functions which help add fm10k_stat structures to the ethtool stats callbacks. This helps increase ease of use for future stat additions, and increases code readability. Skip handling of the per-queue stats as these will be reworked in a following patch.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c8ed563bebeabbf0b1085b52916dd2fb6e219276 Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Feb 4 10:47:58 2016 -0800
fm10k: free MBX IRQ before clearing interrupt scheme
During fm10k_io_error_detected we were clearing the interrupt scheme before we freed the MBX IRQ. This causes a kernel panic because the MBX IRQ are assigned after MSI-X initialization. Clearing the interrupt scheme results in removing the MSI-X entry table. Fix this by freeing the MBX IRQ before we clear the interrupt scheme, as we do elsewhere in the driver.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 61e0217e83353cf895f8b2d0a187804171d119ca Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Feb 4 10:47:57 2016 -0800
fm10k: print error message when stop_hw fails
fm10k_stop_hw_generic calls fm10k_disable_queues_generic, which may return an error code indicating that the queues were not stopped within the time limit. Notify the user by displaying a message in the kernel message ring, in a similar way to how we notify the user when reset_hw fails. There isn't much we can do to recover from this error, so currently nothing else is done.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b3525696adba1ecddff3d667680461cc533e63a4 Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Feb 4 10:47:56 2016 -0800
fm10k: base queue scheme covered by RSS
In fm10k_set_num_queues, we previously assigned the base template. This would always be overwritten by either fm10k_set_qos_queues or fm10k_set_rss_queues. In either case, we don't need the base values, so we can just remove them.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit e72319bba814b115c47785b3b88f7263d0b8a1b8 Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Feb 4 10:47:55 2016 -0800
fm10k: don't initialize service task until later in probe
Delay initialization of the service timer and service task until late probe. If we don't wait, failures in probe do not properly cleanup the service timer or service task items, which results in the kernel panic below, potentially freezing the whole system. In addition, ensure that the SERVICE_DISABLE bit is set before we request the MBX IRQ since the MBX interrupt attempts to schedule the service task otherwise. This prevents a similar trace from occurring after this change.
We didn't notice this issue before because probe almost always completes successfully. I discovered it due to a mis-ordered mailbox handler array, which resulted in the following failure when requesting mailbox interrupt.
[ 555.325619] ------------[ cut here ]------------ [ 555.325628] WARNING: CPU: 0 PID: 4941 at lib/list_debug.c:33 __list_add+0xa0/0xd0() [ 555.325631] list_add corruption. prev->next should be next (ffffffff81f46648), but was (null). (prev=ffff8807fad5d0e8). <snip> [ 555.325722] CPU: 0 PID: 4941 Comm: insmod Tainted: G OE 4.0.4-303.fc22.x86_64 #1 [ 555.325725] Hardware name: Intel Corporation S2600CO/S2600CO, BIOS SE5C600.86B.02.03.8x23.060520140825 06/05/2014 [ 555.325727] 0000000000000000 00000000b4f161b3 ffff88081a21f8e8 ffffffff81783124 [ 555.325734] 0000000000000000 ffff88081a21f940 ffff88081a21f928 ffffffff8109c66a [ 555.325740] 0000000064000000 ffff8807fad5d0e8 ffff8807fad5d0e8 ffffffff81f46648 [ 555.325746] Call Trace: [ 555.325752] [<ffffffff81783124>] dump_stack+0x45/0x57 [ 555.325757] [<ffffffff8109c66a>] warn_slowpath_common+0x8a/0xc0 [ 555.325759] [<ffffffff8109c6f5>] warn_slowpath_fmt+0x55/0x70 [ 555.325763] [<ffffffff813ba270>] __list_add+0xa0/0xd0 [ 555.325768] [<ffffffff81102d1d>] __internal_add_timer+0x9d/0x110 [ 555.325771] [<ffffffff81102dbf>] internal_add_timer+0x2f/0xc0 [ 555.325774] [<ffffffff81104e5a>] mod_timer+0x12a/0x230 [ 555.325782] [<ffffffffa03d54ca>] fm10k_probe+0x69a/0xc80 [fm10k] [ 555.325787] [<ffffffff813e8355>] local_pci_probe+0x45/0xa0 [ 555.325791] [<ffffffff8129cf42>] ? sysfs_do_create_link_sd.isra.2+0x72/0xc0 [ 555.325794] [<ffffffff813e96b9>] pci_device_probe+0xf9/0x150 [ 555.325799] [<ffffffff814d7e73>] driver_probe_device+0xa3/0x400 [ 555.325802] [<ffffffff814d82ab>] __driver_attach+0x9b/0xa0 [ 555.325805] [<ffffffff814d8210>] ? __device_attach+0x40/0x40 [ 555.325808] [<ffffffff814d5bd3>] bus_for_each_dev+0x73/0xc0 [ 555.325811] [<ffffffff814d78ce>] driver_attach+0x1e/0x20 [ 555.325815] [<ffffffff814d7480>] bus_add_driver+0x180/0x250 [ 555.325819] [<ffffffffa03b2000>] ? 0xffffffffa03b2000 [ 555.325823] [<ffffffff814d8aa4>] driver_register+0x64/0xf0 [ 555.325826] [<ffffffff813e7bec>] __pci_register_driver+0x4c/0x50 [ 555.325832] [<ffffffffa03d6ca3>] fm10k_register_pci_driver+0x23/0x30 [fm10k] [ 555.325838] [<ffffffffa03b2080>] fm10k_init_module+0x80/0x1000 [fm10k] [ 555.325843] [<ffffffff81002128>] do_one_initcall+0xb8/0x200 [ 555.325848] [<ffffffff811e10d2>] ? __vunmap+0xa2/0x100 [ 555.325852] [<ffffffff811fe239>] ? kmem_cache_alloc_trace+0x1b9/0x240 [ 555.325855] [<ffffffff8178230e>] ? do_init_module+0x28/0x1cb [ 555.325858] [<ffffffff81782346>] do_init_module+0x60/0x1cb [ 555.325862] [<ffffffff8112168e>] load_module+0x205e/0x26b0 [ 555.325866] [<ffffffff8111d110>] ? store_uevent+0x70/0x70 [ 555.325870] [<ffffffff812234b0>] ? kernel_read+0x50/0x80 [ 555.325873] [<ffffffff81121f3e>] SyS_finit_module+0xbe/0xf0 [ 555.325878] [<ffffffff81789749>] system_call_fastpath+0x12/0x17 [ 555.325880] ---[ end trace 9e0f58d071eafd2a ]---
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit de66c610a6adade32bf955f67b4f4f4aaeeeff85 Author: Jacob Keller jacob.e.keller@intel.com Date: Thu Feb 4 10:47:54 2016 -0800
fm10k: prevent null pointer dereference of msix_entries table
According to the C standard dereferencing a variable before it is checked invokes undefined behavior, and thus compilers are free to assume the check for NULL isn't necessary. Prevent this by re-ordering the NULL check of msix_entries in fm10k_free_mbx_irq.
Signed-off-by: Jacob Keller jacob.e.keller@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 11c49f79b294081010f7e13a95c6b40c4d36b1de Author: Bruce Allan bruce.w.allan@intel.com Date: Mon Dec 28 18:00:30 2015 -0800
fm10k: use ether_addr_copy to copy MAC address
Cleanup the remaining instances of using memcpy() instead of the preferred ether_addr_copy().
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1905add427cdee1b52380241574ab1339b1df413 Author: Bruce Allan bruce.w.allan@intel.com Date: Tue Dec 22 14:55:26 2015 -0800
fm10k: cleanup SPACE_BEFORE_TAB checkpatch warning
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 838e6102920a288a88f5bba10784ab10b2f2eb3e Author: Bruce Allan bruce.w.allan@intel.com Date: Tue Dec 22 14:55:20 2015 -0800
fm10k: demote BUG_ON() to WARN_ON() where appropriate
We don't need to crash the kernel in this instance so just warn about the condition and play on.
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit fcdb0a9951d8a5edfc47e89a7fe62457c25e18c4 Author: Bruce Allan bruce.w.allan@intel.com Date: Tue Dec 22 13:43:49 2015 -0800
fm10k: cleanup remaining right-bit-shifted 1
Use BIT() macro instead.
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1aab144c507a9849d5b4557d6d78db185ceaef37 Author: Bruce Allan bruce.w.allan@intel.com Date: Tue Dec 22 13:43:44 2015 -0800
fm10k: Move constants to the right of binary operators
The semantic patch that makes this change is available in scripts/coccinelle/misc/compare_const_fl.cocci.
More information about semantic patching is available at http://coccinelle.lip6.fr/
Signed-off-by: Bruce Allan bruce.w.allan@intel.com Tested-by: Krishneil Singh Krishneil.k.singh@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit e596af827960c41a6051d4e719bafcfb7da11b64 Author: Bob Copeland me@bobcopeland.com Date: Sat Mar 26 11:27:19 2016 -0400
mac80211: mesh: flush paths outside of plink lock
Lockdep warned of a lock dependency between the mesh_plink lock and the internal lock for the rhashtable. The problem is that the rhashtable code uses a spin lock with softirqs enabled, while mesh_plink_timer executes a walk (to flush paths on a state change) inside a softirq with the plink lock held.
This leads to the following deadlock if the timer fires while rht lock is held on this CPU, and plink lock is held on another CPU:
CPU0 CPU1 ---- ---- lock(&(&ht->lock)->rlock); local_irq_disable(); lock(&(&sta->mesh->plink_lock)->rlock); lock(&(&ht->lock)->rlock); <Interrupt> lock(&(&sta->mesh->plink_lock)->rlock); *** DEADLOCK ***
Fix by waiting until we drop the plink lock to flush paths.
Fixes: d48a1b7cd439 ("mac80211: mesh: convert path table to rhashtable") Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 0371a08fbb3e557f19db41e47a199ad8300c9c97 Author: Bob Copeland me@bobcopeland.com Date: Sat Mar 26 11:27:18 2016 -0400
mac80211: mesh: fix cleanup for mesh pathtable
The mesh path table needs to be around for the entire time the interface is in mesh mode, as users can perform an mpath dump at any time. The existing path table lifetime is instead tied to the mesh BSS which can cause crashes when different MBSSes are joined in the context of a single interface, or when the path table is dumped when no MBSS is joined.
Introduce a new function to perform the final teardown of the interface and perform path table cleanup there. We already free the individual path elements when the leaving the mesh so no additional cleanup is needed there. This fixes the following crash:
[ 47.753026] BUG: unable to handle kernel paging request at fffffff0 [ 47.753026] IP: [<c0239765>] kthread_data+0xa/0xe [ 47.753026] *pde = 00741067 *pte = 00000000 [ 47.753026] Oops: 0000 [#4] PREEMPT [ 47.753026] Modules linked in: ppp_generic slhc 8021q garp mrp sch_fq_codel iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip_tables ath9k_htc ath5k 8139too ath10k_pci ath10k_core arc4 ath9k ath9k_common ath9k_hw mac80211 ath cfg80211 cpufreq_powersave br_netfilter bridge stp llc ipw usb_wwan sierra_net usbnet af_alg natsemi via_rhine mii iTCO_wdt iTCO_vendor_support gpio_ich sierra coretemp pcspkr i2c_i801 lpc_ich ata_generic ata_piix libata ide_pci_generic piix e1000e igb i2c_algo_bit ptp pps_core [last unloaded: 8139too] [ 47.753026] CPU: 0 PID: 12 Comm: kworker/u2:1 Tainted: G D W 4.5.0-wt-V3 #6 [ 47.753026] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016 11/07/2014 [ 47.753026] task: f645a0c0 ti: f6462000 task.ti: f6462000 [ 47.753026] EIP: 0060:[<c0239765>] EFLAGS: 00010002 CPU: 0 [ 47.753026] EIP is at kthread_data+0xa/0xe [ 47.753026] EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000 [ 47.753026] ESI: f645a0c0 EDI: f645a2fc EBP: f6463a80 ESP: f6463a78 [ 47.753026] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 [ 47.753026] CR0: 8005003b CR2: 00000014 CR3: 353e5000 CR4: 00000690 [ 47.753026] Stack: [ 47.753026] c0236866 00000000 f6463aac c05768b4 00000009 f6463ba8 f6463ab0 c0247010 [ 47.753026] 00000000 f645a0c0 f6464000 00000009 f6463ba8 f6463ab8 c0576eb2 f645a0c0 [ 47.753026] f6463aec c0228be4 c06335a4 f6463adc f6463ad0 c06c06d4 f6463ae4 c02471b0 [ 47.753026] Call Trace: [ 47.753026] [<c0236866>] ? wq_worker_sleeping+0xb/0x78 [ 47.753026] [<c05768b4>] __schedule+0xda/0x587 [ 47.753026] [<c0247010>] ? vprintk_default+0x12/0x14 [ 47.753026] [<c0576eb2>] schedule+0x72/0x89 [ 47.753026] [<c0228be4>] do_exit+0xb8/0x71d [ 47.753026] [<c02471b0>] ? kmsg_dump+0xa9/0xae [ 47.753026] [<c0203576>] oops_end+0x69/0x70 [ 47.753026] [<c021dcdb>] no_context+0x1bb/0x1c5 [ 47.753026] [<c021de1b>] __bad_area_nosemaphore+0x136/0x140 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021de32>] bad_area_nosemaphore+0xd/0x10 [ 47.753026] [<c021e0a1>] __do_page_fault+0x26c/0x320 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021e2fa>] do_page_fault+0xb/0xd [ 47.753026] [<c05798f8>] error_code+0x58/0x60 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c0239765>] ? kthread_data+0xa/0xe [ 47.753026] [<c0236866>] ? wq_worker_sleeping+0xb/0x78 [ 47.753026] [<c05768b4>] __schedule+0xda/0x587 [ 47.753026] [<c0247010>] ? vprintk_default+0x12/0x14 [ 47.753026] [<c0576eb2>] schedule+0x72/0x89 [ 47.753026] [<c0228be4>] do_exit+0xb8/0x71d [ 47.753026] [<c02471b0>] ? kmsg_dump+0xa9/0xae [ 47.753026] [<c0203576>] oops_end+0x69/0x70 [ 47.753026] [<c021dcdb>] no_context+0x1bb/0x1c5 [ 47.753026] [<c021de1b>] __bad_area_nosemaphore+0x136/0x140 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021de32>] bad_area_nosemaphore+0xd/0x10 [ 47.753026] [<c021e0a1>] __do_page_fault+0x26c/0x320 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021e2fa>] do_page_fault+0xb/0xd [ 47.753026] [<c05798f8>] error_code+0x58/0x60 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c0239765>] ? kthread_data+0xa/0xe [ 47.753026] [<c0236866>] ? wq_worker_sleeping+0xb/0x78 [ 47.753026] [<c05768b4>] __schedule+0xda/0x587 [ 47.753026] [<c0391e32>] ? put_io_context_active+0x6d/0x95 [ 47.753026] [<c0576eb2>] schedule+0x72/0x89 [ 47.753026] [<c02291f8>] do_exit+0x6cc/0x71d [ 47.753026] [<c0203576>] oops_end+0x69/0x70 [ 47.753026] [<c021dcdb>] no_context+0x1bb/0x1c5 [ 47.753026] [<c021de1b>] __bad_area_nosemaphore+0x136/0x140 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021de32>] bad_area_nosemaphore+0xd/0x10 [ 47.753026] [<c021e0a1>] __do_page_fault+0x26c/0x320 [ 47.753026] [<c03b9160>] ? debug_smp_processor_id+0x12/0x16 [ 47.753026] [<c02015e2>] ? __switch_to+0x24/0x40e [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c021e2fa>] do_page_fault+0xb/0xd [ 47.753026] [<c05798f8>] error_code+0x58/0x60 [ 47.753026] [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a [ 47.753026] [<c03b59d2>] ? rhashtable_walk_init+0x5c/0x93 [ 47.753026] [<f9843221>] mesh_path_tbl_expire.isra.24+0x19/0x82 [mac80211] [ 47.753026] [<f984408b>] mesh_path_expire+0x11/0x1f [mac80211] [ 47.753026] [<f9842bb7>] ieee80211_mesh_work+0x73/0x1a9 [mac80211] [ 47.753026] [<f98207d1>] ieee80211_iface_work+0x2ff/0x311 [mac80211] [ 47.753026] [<c0235fa3>] process_one_work+0x14b/0x24e [ 47.753026] [<c0236313>] worker_thread+0x249/0x343 [ 47.753026] [<c02360ca>] ? process_scheduled_works+0x24/0x24 [ 47.753026] [<c0239359>] kthread+0x9e/0xa3 [ 47.753026] [<c0578e50>] ret_from_kernel_thread+0x20/0x40 [ 47.753026] [<c02392bb>] ? kthread_parkme+0x18/0x18 [ 47.753026] Code: 6b c0 85 c0 75 05 e8 fb 74 fc ff 89 f8 84 c0 75 08 8d 45 e8 e8 34 dd 33 00 83 c4 28 5b 5e 5f 5d c3 55 8b 80 10 02 00 00 89 e5 5d <8b> 40 f0 c3 55 b9 04 00 00 00 89 e5 52 8b 90 10 02 00 00 8d 45 [ 47.753026] EIP: [<c0239765>] kthread_data+0xa/0xe SS:ESP 0068:f6463a78 [ 47.753026] CR2: 00000000fffffff0 [ 47.753026] ---[ end trace 867ca0bdd0767790 ]---
Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh") Reported-by: Fred Veldini fred.veldini@gmail.com Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 68bb54b47ea1130e57049d86d172d0e098edb3f4 Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:11:32 2016 -0400
mac80211: mesh: fix mesh path kerneldoc
Several of the mesh path fields are undocumented and some of the documentation is no longer correct or relevant after the switch to rhashtable. Clean up the kernel doc accordingly and reorder some fields to match the structure layout.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 3257523bed496316dad95d5a341bfd49ac16624b Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:11:31 2016 -0400
mac80211: mesh: reorder structure members
Reduce padding waste in struct mesh_table and struct rmc_entry by moving the smaller fields to the end.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 18b27ff7d2e232b0f07f2f51aa8052ff2a617908 Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:11:30 2016 -0400
mac80211: mesh: embed gates hlist head directly
Since we have converted the mesh path tables to rhashtable, we are no longer swapping out the entire mesh_pathtbl pointer with RCU. As a result, we no longer need indirection to the hlist head for the gates list and can simply embed it, saving a pair of pointer-sized allocations.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 47a0489ce1e518f4936c7fedb93b3d2abd7ccd2e Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:11:29 2016 -0400
mac80211: mesh: use hlist for rmc cache
The RMC cache has 256 list heads plus a u32, which puts it at the unfortunate size of 4104 bytes with padding. kmalloc() will then round this up to the next power-of-two, so we wind up actually using two pages here where most of the second is wasted.
Switch to hlist heads here to reduce the structure size down to fit within a page.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 0aa7fabbd5d9da1f8a8fdc3e2837c532bcfa5664 Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:11:28 2016 -0400
mac80211: mesh: handle failed alloc for rmc cache
In the unlikely case that mesh_rmc_init() fails with -ENOMEM, the rmc pointer will be left as NULL but the interface is still operational because ieee80211_mesh_init_sdata() is not allowed to fail.
If this happens, we would blindly dereference rmc when checking whether a multicast frame is in the cache. Instead just drop the frames in the forwarding path.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 749329594b5e0fb612b2de642a692323ddf661dd Author: Bob Copeland me@bobcopeland.com Date: Fri Mar 18 22:03:24 2016 -0400
mac80211: mesh: fix crash in mesh_path_timer
The mesh_path_reclaim() function, called from an rcu callback, cancels the mesh_path_timer associated with a mesh path. Unfortunately, this call can happen much later, perhaps after the hash table itself is destroyed.
Such a situation led to the following crash in mesh_path_send_to_gates() when dereferencing the tbl pointer:
[ 23.901661] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 23.905516] IP: [<ffffffff814c910b>] mesh_path_send_to_gates+0x2b/0x740 [ 23.908757] PGD 99ca067 PUD 99c4067 PMD 0 [ 23.910789] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 23.913485] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.5.0-rc6-wt+ #43 [ 23.916675] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 23.920471] task: ffffffff81685500 ti: ffffffff81678000 task.ti: ffffffff81678000 [ 23.922619] RIP: 0010:[<ffffffff814c910b>] [<ffffffff814c910b>] mesh_path_send_to_gates+0x2b/0x740 [ 23.925237] RSP: 0018:ffff88000b403d30 EFLAGS: 00010286 [ 23.926739] RAX: 0000000000000000 RBX: ffff880009bc0d20 RCX: 0000000000000102 [ 23.928796] RDX: 000000000000002e RSI: 0000000000000001 RDI: ffff880009bc0d20 [ 23.930895] RBP: ffff88000b403e18 R08: 0000000000000001 R09: 0000000000000001 [ 23.932917] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880009c20940 [ 23.936370] R13: ffff880009bc0e70 R14: ffff880009c21c40 R15: ffff880009bc0d20 [ 23.939823] FS: 0000000000000000(0000) GS:ffff88000b400000(0000) knlGS:0000000000000000 [ 23.943688] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 23.946429] CR2: 0000000000000008 CR3: 00000000099c5000 CR4: 00000000000006b0 [ 23.949861] Stack: [ 23.950840] 000000000000002e ffff880009c20940 ffff88000b403da8 ffffffff8109e551 [ 23.954467] ffffffff82711be2 000000000000002e 0000000000000000 ffffffff8166a5f5 [ 23.958141] 0000000000685ce8 0000000000000246 ffff880009bc0d20 ffff880009c20940 [ 23.961801] Call Trace: [ 23.962987] <IRQ> [ 23.963963] [<ffffffff8109e551>] ? vprintk_emit+0x351/0x5e0 [ 23.966782] [<ffffffff8109e8ff>] ? vprintk_default+0x1f/0x30 [ 23.969529] [<ffffffff810ffa41>] ? printk+0x48/0x50 [ 23.971956] [<ffffffff814ceef3>] mesh_path_timer+0x133/0x160 [ 23.974707] [<ffffffff814cedc0>] ? mesh_nexthop_resolve+0x230/0x230 [ 23.977775] [<ffffffff810b04ee>] call_timer_fn+0xce/0x330 [ 23.980448] [<ffffffff810b0425>] ? call_timer_fn+0x5/0x330 [ 23.983126] [<ffffffff814cedc0>] ? mesh_nexthop_resolve+0x230/0x230 [ 23.986091] [<ffffffff810b097c>] run_timer_softirq+0x22c/0x390
Instead of cancelling in the RCU callback, set a new flag to prevent the timer from being rearmed, and then cancel the timer synchronously when freeing the mesh path. This leaves mesh_path_reclaim() doing nothing but kfree, so switch to kfree_rcu().
Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh") Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 52cfa1d6146c5aa48360b02533fc7e039a66086e Author: Ayala Beker ayala.beker@intel.com Date: Thu Mar 17 15:41:39 2016 +0200
mac80211: track and tell driver about GO client P2P PS abilities
Legacy clients don't support P2P power save mechanism, and thus if a P2P GO has a legacy client connected to it, it should disable P2P PS mechanisms. Let the driver know about this with a new bss_conf parameter.
Signed-off-by: Ayala Beker ayala.beker@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 17b942478643c5a90c06d978479bd326040bfa19 Author: Ayala Beker ayala.beker@intel.com Date: Thu Mar 17 15:41:38 2016 +0200
cfg80211: allow userspace to specify client P2P PS support
Legacy clients don't support P2P power save mechanisms, and thus if a P2P GO has a legacy client connected to it, it has to make some changes in the PS behavior.
To handle this, add an attribute to specify whether a station supports P2P PS or not. If the attribute was not specified cfg80211 will assume that station supports it for P2P GO interface, and does NOT support it for AP interface, matching the current assumptions in the code.
Signed-off-by: Ayala Beker ayala.beker@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit b100e5d622aa8719cc2e776c397817afe24b1f3b Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 17 15:41:37 2016 +0200
mac80211: avoid useless memory write on each frame RX
In the likely case that probe_count is 0, don't write to the memory there.
Also use ifmgd consistently in the function, instead of using sdata->u.mgd as well.
Signed-off-by: Johannes Berg johannes.berg@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 50f26a507664499ccef017607a29cc1456695343 Author: Catherine Sullivan catherine.sullivan@intel.com Date: Thu Mar 10 14:59:51 2016 -0800
i40e/i40evf: Bump patch from 1.4.25 to 1.5.1
Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 55f7d7233bd15c8a3fcf7051c681b05de5980a18 Author: Mitch Williams mitch.a.williams@intel.com Date: Thu Mar 10 14:59:50 2016 -0800
i40e: Change comment to reflect correct function name
Minor correction in the comment to reflect the correct function name
Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 19b73d8efaa459a66665b5e0a3e7acedd05f4901 Author: Mitch Williams mitch.a.williams@intel.com Date: Thu Mar 10 14:59:49 2016 -0800
i40evf: Add additional check for reset
If the driver happens to read a register during the time in which the device is undergoing reset, it will receive a value of 0xdeadbeef instead of a valid value. Unfortunately, the driver may misinterpret this as a valid value, especially if it's just looking for individual bits.
Add an explicit check for this value when we are looking for admin queue errors, and trigger reset recovery if we find it.
Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 56e5ca688f3d334ddc2acab27cb7efa83b238557 Author: Shannon Nelson shannon.nelson@intel.com Date: Thu Mar 10 14:59:48 2016 -0800
i40e: Change unknown event error msg to ignore message
There's no real error in an unknown event from the Firmware, we're just posting a useful FYI notice, so this patch simply removes the "Error" word.
Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 7e5a313ed9b18ba9f35df2523eb9e386a195a2c4 Author: Mitch Williams mitch.a.williams@intel.com Date: Thu Mar 10 14:59:47 2016 -0800
i40e: Added code to prevent double resets
Clear the VFLR bit after reset processing, instead of before. This prevents double resets on VF init.
Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d3ce57344100023faa8f514eb66dfb110b53629c Author: Mitch Williams mitch.a.williams@intel.com Date: Thu Mar 10 14:59:46 2016 -0800
i40e: Notify VFs of all resets
Notify VFs in the reset interrupt handler, instead of the actual reset initiation code. This allows the VFs to get properly notified for all resets, including resets initiated by different PFs on the same physical device.
Signed-off-by: Mitch Williams mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c99abb4cb8227bf8172c085213c91bf155c6618a Author: Shannon Nelson shannon.nelson@intel.com Date: Thu Mar 10 14:59:45 2016 -0800
i40e: Remove timer and task only if created
In some error scenarios, we may find ourselves trying to remove a non-existent timer or worktask. This causes the kernel some bit of consternation, so don't do it.
Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 265bee7290fd68118e6eec3206d5632a097b59d8 Merge: 15f41e2 2bf9a58 Author: David S. Miller davem@davemloft.net Date: Tue Apr 5 15:07:55 2016 -0400
Merge branch 'mlxsw-next'
Jiri Pirko says:
==================== mlxsw: small driver update, including switchdev doc update
Ido Schimmel (3): mlxsw: spectrum: Reduce number of supported 802.1D bridges switchdev: Use switch ID in suggested udev rule mlxsw: spectrum: Add support for physical port names ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 2bf9a58675c5d6d37cdcb4301e6320009d299080 Author: Ido Schimmel idosch@mellanox.com Date: Tue Apr 5 10:20:04 2016 +0200
mlxsw: spectrum: Add support for physical port names
Export to userspace the front panel name of the port, so that udev can rename the ports accordingly. The convention suggested by switchdev documentation is used:
1) Non-split: pX 2) Split: pXsY
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 75f3a1018f0103025558caa60e24132a4cc9ce8f Author: Ido Schimmel idosch@mellanox.com Date: Tue Apr 5 10:20:03 2016 +0200
switchdev: Use switch ID in suggested udev rule
Since there can be multiple switch ASICs on the same system we should use the switch ID in order to differentiate between them and set the switch name (e.g. swX) accordingly.
Also, replace the order of the "Switch ID" and "Port Netdev Naming" sections following the above change.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit b555cf4a50c17a9714715a2d7c8574dca1a7b356 Author: Ido Schimmel idosch@mellanox.com Date: Tue Apr 5 10:20:02 2016 +0200
mlxsw: spectrum: Reduce number of supported 802.1D bridges
Resources allocated for these bridges at init time cannot be later used for other purposes. While current number is supported by the device, it's mostly theoretical with regards to any real use case, which leads to poor utilization of device's resources. Solve that by reducing the number.
The long term plan is to make this value (along with others) user configurable via devlink and write it to NVRAM, so that it can be used during the next init. Until then we must hardcode such values.
Signed-off-by: Ido Schimmel idosch@mellanox.com Signed-off-by: Jiri Pirko jiri@mellanox.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2c61cf9c56cbc4e0a4475232659ac30bb4c28674 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 17 15:02:55 2016 +0200
mac80211: fix cipher scheme function name
The code is only used with iwlwifi, but still should have proper mac80211 naming scheme; fix that.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit c84387d2f2c83d1d49a8dfefed13a8b39f017230 Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 17 15:02:54 2016 +0200
mac80211: clean up station flags debugfs
Avoid the really strange %s%s%s expression, use an array of flag names and check that all flags are present.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 3c5bcb2e1930bdbccd14a49660895f014349b51d Author: Avraham Stern avraham.stern@intel.com Date: Thu Mar 17 15:02:53 2016 +0200
ieee80211: support parsing Fine Timing Measurement action frame
Add definition for Fine Timing Measurement (FTM) frame format as defined in IEEE802.11-REVmcD5.0 section 9.6.8.33
Signed-off-by: Avraham Stern avraham.stern@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 602fae425cf3ade41a4787f8ddf850af418faa3b Author: Johannes Berg johannes.berg@intel.com Date: Thu Mar 17 15:02:52 2016 +0200
mac80211: don't start dynamic PS timer if not needed
If the device implements dynamic PS itself, there's no need to ever start the dynamic powersave timer on RX.
While at it, fix up some indentation in this code.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit de03d2b0ef6520cf9da2e429cd7afb534782b737 Author: Shannon Nelson shannon.nelson@intel.com Date: Thu Mar 10 14:59:44 2016 -0800
i40e: Assure that adminq is alive in debug mode
When dropping into debug mode in a failed probe, make sure that the AdminQ is left alive for possible hand debug of driver and firmware states.
Move the mutex_init calls earlier in probe so that if init fails, the admin queue interface is still available for debugging purposes.
Signed-off-by: Shannon Nelson shannon.nelson@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit fc4a25c5b741ecb4ef4d0f1802775e8a88d7e0a7 Author: Johannes Berg johannes.berg@intel.com Date: Tue Apr 5 11:59:05 2016 +0200
mac80211: remove sta_info debugfs sub-struct
Since the previous patch, the struct only has a single member, so remove the struct and leave just the single member.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 96f321c9d42a61aa1e2760a47a574f286b028be2 Author: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Date: Sat Mar 19 19:59:43 2016 +0530
mac80211: Remove unused variable in per STA debugfs struct
Remove unused variable in per STA debugfs structure, 'commit 34e895075e21 ("mac80211: allow station add/remove to sleep")' removed the only user of 'add_has_run'.
Signed-off-by: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 692783980ad6163e8586baa36c066cd0d22fc7ce Author: Shannon Nelson shannon.nelson@intel.com Date: Thu Mar 10 14:59:43 2016 -0800
i40e: Remove MSIx only if created
When cleaning up the interrupt handling, clean up the IRQs only if we actually got them set up. There are a couple of error recovery paths that were violating this and causing the kernel a bit of indigestion.
Signed-off-by: Shannon Nelson shannon.nelson@intel.com Reviewed-by: Williams, Mitch A mitch.a.williams@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 618290262e960469758d4ab67457fcb2ea356d51 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Thu Mar 10 14:59:42 2016 -0800
i40e: Fix up return code
The i40e_common.c typically uses i40e_status as a return code, but got missed this one case.
Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit b6caccaccf749dddd296f3056111d6c4b94500c1 Author: Kevin Scott kevin.c.scott@intel.com Date: Thu Mar 10 14:59:41 2016 -0800
i40e: Save off VSI resource count when updating VSI
When updating a VSI, save off the number of allocated and unallocated VSIs as we do when adding a VSI.
Signed-off-by: Kevin Scott kevin.c.scott@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1e0bbebaae660f27c24cbd9c3e693420234115ff Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 9 13:27:09 2016 +0200
mac80211: enable starting BA session with custom timeout
Currently the debugfs entry for starting aggregation session starts it with timeout of 5 seconds. Allow opening a session with a custom timeout (according to spec 0 is no timeout). while at it, refactor the function and remove the magic numbers.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit e03521232d2f808b1b593f44565665efb7b242b1 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 9 13:27:08 2016 +0200
mac80211: add NETIF_F_RXCSUM to features white list
NETIF_F_RXCSUM is not in the white list, though some drivers may want to set it in order to enable seeing the actual RX checksum status in ethtool.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit f278ce4ffaaa2ee3adb957add3df7b41e6ecc1b3 Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Wed Mar 9 10:08:27 2016 +0200
mac80211: Set global RRM capability
Allow publishing RRM capabilities for features that are not HW dependent.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 2aa4d45635ad09fbd7ff6b6155d2d50b2b31cf90 Author: Akira Moroo retrage01@gmail.com Date: Tue Mar 8 23:17:42 2016 +0900
cfg80211: fix kernel-doc struct name
This patch fix a structure name mismatch in cfg80211.h.
Signed-off-by: Moroo Akira retrage01@gmail.com Reviewed-by: Julian Calaby julian.calaby@gmail.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 06171e9c0bd54bd7dde67dfb2fa4cced23cff880 Author: Felix Fietkau nbd@openwrt.org Date: Thu Mar 3 23:25:42 2016 +0100
mac80211: minstrel_ht: improve sample rate skip logic
There were a few issues that were slowing down the process of finding the optimal rate, especially on devices with multi-rate retry limitations:
When max_tp_rate[0] was slower than max_tp_rate[1], the code did not sample max_tp_rate[1], which would often allow it to switch places with max_tp_rate[0] (e.g. if only the first sampling attempts were bad, but the rate is otherwise good).
Also, sample attempts of rates between max_tp_rate[0] and [1] were being ignored in this case, because the code only checked if the rate was slower than [1].
Fix this by checking against the fastest / second fastest max_tp_rate instead of assuming a specific order between the two.
In my tests this patch significantly reduces the time until minstrel_ht finds the optimal rate right after assoc
Signed-off-by: Felix Fietkau nbd@openwrt.org Signed-off-by: Johannes Berg johannes.berg@intel.com
commit b7c359376429953dc1672224dbc9845eadf2a29c Author: Catherine Sullivan catherine.sullivan@intel.com Date: Thu Mar 10 14:59:40 2016 -0800
i40e/i40evf: Remove I40E_MAX_USER_PRIORITY define
This patch removes the duplicate definition of I40E_MAX_USER_PRIORITY in i40e.h that is not needed.
Signed-off-by: Catherine Sullivan catherine.sullivan@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4ea623922d1d73c162da53e02cce1d0d3fd55893 Author: Jesse Brandeburg jesse.brandeburg@intel.com Date: Thu Mar 10 14:59:39 2016 -0800
i40e/i40evf: Fix casting in transmit code
Simple cast to fix a sparse warning.
Fixes: commit 5453205cd097 ("i40e/i40evf: Enable support for SKB_GSO_UDP_TUNNEL_CSUM")
Signed-off-by: Jesse Brandeburg jesse.brandeburg@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a619afe814453300684f1d5a6478d67f791bc723 Author: Alexander Duyck aduyck@mirantis.com Date: Mon Mar 7 09:30:03 2016 -0800
i40e/i40evf: Add support for bulk free in Tx cleanup
This patch enables bulk Tx clean for skbs. In order to enable it we need to pass the napi_budget value as that is used to determine if we are truly running in NAPI mode or if we are simply calling the routine from netpoll with a budget of 0. In order to avoid adding too many more variables I thought it best to pass the VSI directly in a fashion similar to what we do on igb and ixgbe with the q_vector.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 07310a63147164eaf44a68932fbe9dbbde0fa82b Author: Felix Fietkau nbd@openwrt.org Date: Wed Mar 2 15:54:51 2016 +0100
mac80211: do not pass injected frames without a valid rate to the driver
Fall back to rate control if the requested bitrate was not found.
Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames") Signed-off-by: Felix Fietkau nbd@openwrt.org Signed-off-by: Johannes Berg johannes.berg@intel.com
commit f66b60f6524c970d43af7a68dd50dcce289887e7 Author: Sven Eckelmann sven@narfation.org Date: Wed Feb 24 16:25:49 2016 +0100
mac80211: fix parsing of 40Mhz in injected radiotap header
The MCS bandwidth part of the radiotap header is 2 bits wide. The full 2 bit have to compared against IEEE80211_RADIOTAP_MCS_BW_40 and not only if the first bit is set. Otherwise IEEE80211_RADIOTAP_MCS_BW_40 can be confused with IEEE80211_RADIOTAP_MCS_BW_20U.
Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 38de03d2a28925b489c11546804e2f5418cc17a4 Author: Arend van Spriel arend@broadcom.com Date: Wed Mar 2 20:37:18 2016 +0100
nl80211: add feature for BSS selection support
Introducing a new feature that the driver can use to indicate the driver/firmware supports configuration of BSS selection criteria upon CONNECT command. This can be useful when multiple BSS-es are found belonging to the same ESS, ie. Infra-BSS with same SSID. The criteria can then be used to offload selection of a preferred BSS.
Reviewed-by: Hante Meuleman meuleman@broadcom.com Reviewed-by: Franky (Zhenhui) Lin frankyl@broadcom.com Reviewed-by: Pieter-Paul Giesberts pieterpg@broadcom.com Reviewed-by: Lei Zhang leizh@broadcom.com Signed-off-by: Arend van Spriel arend@broadcom.com [move wiphy support check into parse_bss_select()] Signed-off-by: Johannes Berg johannes.berg@intel.com
commit f59374eb427fb1377fdb7b8b3691c48e0c77a3c4 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 2 23:46:14 2016 +0200
mac80211: synchronize driver rx queues before removing a station
Some devices, like iwlwifi, have RSS queues. This may cause a situation where a disassociation is handled in control path and results in station removal while there are prior RX frames that were still not processed in other queues. When they will be processed the station will be gone, and the frames will be dropped. Add a synchronization interface to avoid that. When driver returns from the synchronization mac80211 may remove the station.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 60854fd94573f0d3b80b55b40cf0140a0430f3ab Author: Bob Copeland me@bobcopeland.com Date: Wed Mar 2 10:09:20 2016 -0500
mac80211: mesh: convert path table to rhashtable
In the time since the mesh path table was implemented as an RCU-traversable, dynamically growing hash table, a generic RCU hashtable implementation was added to the kernel.
Switch the mesh path table over to rhashtable to remove some code and also gain some features like automatic shrinking.
Cc: Thomas Graf tgraf@suug.ch Cc: netdev@vger.kernel.org Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 Author: Bob Copeland me@bobcopeland.com Date: Wed Mar 2 10:09:19 2016 -0500
rhashtable: accept GFP flags in rhashtable_walk_init
In certain cases, the 802.11 mesh pathtable code wants to iterate over all of the entries in the forwarding table from the receive path, which is inside an RCU read-side critical section. Enable walks inside atomic sections by allowing GFP_ATOMIC allocations for the walker state.
Change all existing callsites to pass in GFP_KERNEL.
Acked-by: Thomas Graf tgraf@suug.ch Signed-off-by: Bob Copeland me@bobcopeland.com [also adjust gfs2/glock.c and rhashtable tests] Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 947c2a0eccec29fcd30e717787e65792b1e607ed Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:03:59 2016 -0500
mac80211: mesh: embed known gates list in struct mesh_path
The mesh path table uses a struct mesh_node in its hlists in order to support a resizable hash table: the mesh_node provides an indirection to the actual mesh path so that two different bucket lists can point to the same path entry.
However, for the known gates list, we don't need this indirection because there is ever only one list. So we can just embed the hlist_node in the mesh path itself, which simplifies things a bit and saves a linear search whenever we need to find an item in the list.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit b15dc38b9817729d3d4962f8c84bbda0eccb3532 Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:03:58 2016 -0500
mac80211: mesh: factor out common mesh path allocation code
Remove duplicate code to allocate and initialize a mesh path or mesh proxy path.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 443954815b63b36f09623d74170520e6554f5fac Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:03:57 2016 -0500
mac80211: mesh: don't hash sdata in mpath tables
Now that the sdata pointer is the same for all entries of a path table, hashing it is pointless, so hash only the address.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 2bdaf386f99c4a82788812e583ff59c6714ae4d6 Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:03:56 2016 -0500
mac80211: mesh: move path tables into if_mesh
The mesh path and mesh gate hashtables are global, containing all of the mpaths for every mesh interface, but the paths are all tied logically to a single interface. The common case is just a single mesh interface, so optimize for that by moving the global hashtable into the per-interface struct.
Doing so allows us to drop sdata pointer comparisons inside the lookups and also saves a few bytes of BSS and data.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 12880d169471fb14c46d6f323f31127702a6d5e6 Author: Jouni Malinen jouni@qca.qualcomm.com Date: Fri Feb 26 22:12:49 2016 +0200
mac80211_hwsim: Support a hw scan request for a specific BSSID
If the hw scan request specifies a single BSSID, use that value instead of the wildcard BSSID in the Probe Request frames.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit e345f44f2b7c6a77c1c0677b7c8606a0bb1c5c5c Author: Jouni Malinen jouni@qca.qualcomm.com Date: Fri Feb 26 22:12:48 2016 +0200
mac80211: Support a scan request for a specific BSSID
If the cfg80211 scan trigger operation specifies a single BSSID, use that value instead of the wildcard BSSID in the Probe Request frames.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 818965d3917774955fad52f87b59d690d8be9e8b Author: Jouni Malinen jouni@qca.qualcomm.com Date: Fri Feb 26 22:12:47 2016 +0200
cfg80211: Allow a scan request for a specific BSSID
This allows scans for a specific BSSID to be optimized by the user space application by requesting the driver to set the Probe Request frame BSSID field (Address 3) to the specified BSSID instead of the wildcard BSSID. This prevents other APs from replying which reduces airtime need and latency in getting the response from the target AP through.
This is an optimization and as such, it is acceptable for some of the drivers not to support the mechanism. If not supported, the wildcard BSSID will be used and more responses may be received.
Signed-off-by: Jouni Malinen jouni@qca.qualcomm.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit f2edaaaa392bc21c24f532ea9bcc952a54a22367 Author: Alexander Duyck aduyck@mirantis.com Date: Mon Mar 7 09:29:57 2016 -0800
i40e/i40evf: Fix handling of boolean logic in polling routines
In the polling routines for i40e and i40evf we were using bitwise operators to avoid the side effects of the logical operators, specifically the fact that if the first case is true with "||" we skip the second case, or if it is false with "&&" we skip the second case. This fixes an earlier patch that converted the bitwise operators over to the logical operators and instead replaces the entire thing with just an if statement since it should be more readable what we are trying to do this way.
Fixes: 1a36d7fadd14 ("i40e/i40evf: use logical operators, not bitwise") Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5c05803a3e2054257d7e8e737a6efaf2c7f6b725 Author: Sven Eckelmann sven@narfation.org Date: Wed Feb 24 16:25:48 2016 +0100
mac80211: document only injected *_RADIOTAP_* flags
Not the internal flags but the radiotap flags are parsed when the monitor injected frames are prepared for transmission. Thus the documentation should only document these.
Reported-by: Lorenzo Bianconi lorenzo.bianconi83@gmail.com Reported-by: Johannes Berg johannes@sipsolutions.net Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames") Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Johannes Berg johannes.berg@intel.com
commit f980ebc058c2fa2a552e495db1de0b330082ab70 Author: Sara Sharon sara.sharon@intel.com Date: Wed Feb 24 11:49:45 2016 +0200
mac80211: allow not sending MIC up from driver for HW crypto
When HW crypto is used, there's no need for the CCMP/GCMP MIC to be available to mac80211, and the hardware might have removed it already after checking. The MIC is also useless to have when the frame is already decrypted, so allow indicating that it's not present.
Since we are running out of bits in mac80211_rx_flags, make the flags field a u64.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 162dd6a7253ab009c6335c21ce6b80cf227ddda4 Author: Johannes Berg johannes.berg@intel.com Date: Tue Feb 23 23:05:06 2016 +0200
mac80211: allow drivers to report CLOCK_BOOTTIME for scan results
This was requested by Android, and the appropriate cfg80211 API had been added by Dmitry. Support it in mac80211, allowing drivers to provide the timestamp.
Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 646e76bb5daf4ca38438c69ffb72cccb605f3466 Author: Lorenzo Bianconi lorenzo.bianconi83@gmail.com Date: Tue Feb 23 15:43:35 2016 +0100
mac80211: parse VHT info in injected frames
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver
Signed-off-by: Lorenzo Bianconi lorenzo.bianconi83@gmail.com Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 1948b2a2ec132115b422ae1feba1a3f5598f4acd Author: João Paulo Rechi Vita jprvita@gmail.com Date: Mon Feb 22 11:36:39 2016 -0500
rfkill: Use switch to demux userspace operations
Using a switch to handle different ev.op values in rfkill_fop_write() makes the code easier to extend, as out-of-range values can always be handled by the default case.
Signed-off-by: João Paulo Rechi Vita jprvita@endlessm.com [roll in fix for RFKILL_OP_CHANGE from Jouni] Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 98bd147d7903580ca5d5dfa0bc39c2d16714d84e Author: Johannes Berg johannes.berg@intel.com Date: Wed Mar 16 14:29:08 2016 +0100
wext: unregister_pernet_subsys() on notifier registration failure
If register_netdevice_notifier() fails (which in practice it can't right now), we should call unregister_pernet_subsys(). Do that.
Reported-by: Ben Hutchings ben@decadent.org.uk Signed-off-by: Johannes Berg johannes.berg@intel.com
commit 311f23e9a4314f62fed6c13e112c998b07e37e63 Author: Alan Cox alan@linux.intel.com Date: Tue Mar 1 16:02:15 2016 -0800
i40evf: remove dead code
The only error case is when the malloc fails, in which case the clean up loop does nothing at all, so remove it
Signed-off-by: Alan Cox alan@linux.intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 5c4654daf2e2f25dfbd7fa572c59937ea6d4198b Author: Alexander Duyck aduyck@mirantis.com Date: Fri Feb 19 12:17:08 2016 -0800
i40e/i40evf: Allow up to 12K bytes of data per Tx descriptor instead of 8K
From what I can tell the practical limitation on the size of the Tx data buffer is the fact that the Tx descriptor is limited to 14 bits. As such we cannot use 16K as is typically used on the other Intel drivers. However artificially limiting ourselves to 8K can be expensive as this means that we will consume up to 10 descriptors (1 context, 1 for header, and 9 for payload, non-8K aligned) in a single send.
I propose that we can reduce this by increasing the maximum data for a 4K aligned block to 12K. We can reduce the descriptors used for a 32K aligned block by 1 by increasing the size like this. In addition we still have the 4K - 1 of space that is still unused. We can use this as a bit of extra padding when dealing with data that is not aligned to 4K.
By aligning the descriptors after the first to 4K we can improve the efficiency of PCIe accesses as we can avoid using byte enables and can fetch full TLP transactions after the first fetch of the buffer. This helps to improve PCIe efficiency. Below is the results of testing before and after with this patch:
Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB Before: 87380 16384 16384 10.00 33682.24 20.27 -1.00 0.592 -1.00 After: 87380 16384 16384 10.00 34204.08 20.54 -1.00 0.590 -1.00
So the net result of this patch is that we have a small gain in throughput due to a reduction in overhead for putting together the frame.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 08ca38742b63ae3825096e943de371a3b372c4a0 Author: Stefan Assmann sassmann@kpanic.de Date: Wed Feb 3 09:20:47 2016 +0100
i40e: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the interfaces routes and some addresses. That's probably not what the user intended when running the offline selftest. Besides this does not happen if the interface is brought down before the test, so the current behaviour is inconsistent. Instead call the net_device_ops ndo_stop function directly and avoid touching IFF_UP at all.
Signed-off-by: Stefan Assmann sassmann@kpanic.de Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 15f41e2ba13a6726632e44b1180e805a61e470ad Merge: 43e2dfb 4ce7e93 Author: David S. Miller davem@davemloft.net Date: Mon Apr 4 22:11:21 2016 -0400
Merge branch 'tcp-udp-misc'
Eric Dumazet says:
==================== net: various udp/tcp changes
First round of patches for linux-4.7
Add a generic facility for sockets to be freed after an RCU grace period, if they need to.
Then UDP stack is changed to no longer use SLAB_DESTROY_BY_RCU, in order to speedup rx processing for traffic encapsulated in UDP. It gives a 17 % speedup for normal UDP reception in stress conditions.
Then TCP listeners are changed to use SOCK_RCU_FREE as well to avoid touching sk_refcnt in synflood case : I got up to 30 % performance increase for a mono listener.
Then three patches add SK_MEMINFO_DROPS to sock_diag and add per socket rx drops accounting to TCP.
Last patch adds rate limiting on ACK sent on behalf of SYN_RECV to better resist to SYNFLOOD targeting one or few flows. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 4ce7e93cb3fe87db5b700050172dc41def9834b3 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:22 2016 -0700
tcp: rate limit ACK sent by SYN_RECV request sockets
Attackers like to use SYNFLOOD targeting one 5-tuple, as they hit a single RX queue (and cpu) on the victim.
If they use random sequence numbers in their SYN, we detect they do not match the expected window and send back an ACK.
This patch adds a rate limitation, so that the effect of such attacks is limited to ingress only.
We roughly double our ability to absorb such attacks.
Signed-off-by: Eric Dumazet edumazet@google.com Cc: Willem de Bruijn willemb@google.com Cc: Neal Cardwell ncardwell@google.com Cc: Maciej Żenczykowski maze@google.com Acked-by: Neal Cardwell ncardwell@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit a9d6532b567489196dac4ce60c62343e43228759 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:21 2016 -0700
ipv4: tcp: set SOCK_USE_WRITE_QUEUE for ip_send_unicast_reply()
TCP uses per cpu 'sockets' to send some packets : - RST packets ( tcp_v4_send_reset()) ) - ACK packets for SYN_RECV and TIMEWAIT sockets
By setting SOCK_USE_WRITE_QUEUE flag, we tell sock_wfree() to not call sk_write_space() since these internal sockets do not care.
This gives a small performance improvement, merely by allowing cpu to properly predict the sock_wfree() conditional branch, and avoiding one atomic operation.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 9caad864151e525929d323de96cad382da49c3b2 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:20 2016 -0700
tcp: increment sk_drops for listeners
Goal: packets dropped by a listener are accounted for.
This adds tcp_listendrop() helper, and clears sk_drops in sk_clone_lock() so that children do not inherit their parent drop count.
Note that we no longer increment LINUX_MIB_LISTENDROPS counter when sending a SYNCOOKIE, since the SYN packet generated a SYNACK. We already have a separate LINUX_MIB_SYNCOOKIESSENT
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 532182cd610782db8c18230c2747626562032205 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:19 2016 -0700
tcp: increment sk_drops for dropped rx packets
Now ss can report sk_drops, we can instruct TCP to increment this per socket counter when it drops an incoming frame, to refine monitoring and debugging.
Following patch takes care of listeners drops.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 15239302edd46b184e758048253541fb211e315e Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:18 2016 -0700
sock_diag: add SK_MEMINFO_DROPS
Reporting sk_drops to user space was available for UDP sockets using /proc interface.
Add this to sock_diag, so that we can have the same information available to ss users, and we'll be able to add sk_drops indications for TCP sockets as well.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3b24d854cb35383c30642116e5992fd619bdc9bc Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:17 2016 -0700
tcp/dccp: do not touch listener sk_refcnt under synflood
When a SYNFLOOD targets a non SO_REUSEPORT listener, multiple cpus contend on sk->sk_refcnt and sk->sk_wmem_alloc changes.
By letting listeners use SOCK_RCU_FREE infrastructure, we can relax TCP_LISTEN lookup rules and avoid touching sk_refcnt
Note that we still use SLAB_DESTROY_BY_RCU rules for other sockets, only listeners are impacted by this change.
Peak performance under SYNFLOOD is increased by ~33% :
On my test machine, I could process 3.2 Mpps instead of 2.4 Mpps
Most consuming functions are now skb_set_owner_w() and sock_wfree() contending on sk->sk_wmem_alloc when cooking SYNACK and freeing them.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3a5d1c0e7cb5ba91aabbd7e28626e3cc925f8093 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:16 2016 -0700
inet: reqsk_alloc() needs to take care of dead listeners
We'll soon no longer take a refcount on listeners, so reqsk_alloc() can not assume a listener refcount is not zero. We need to use atomic_inc_not_zero()
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2d331915a04144dad738e725769d8fac06ef6155 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:15 2016 -0700
tcp/dccp: use rcu locking in inet_diag_find_one_icsk()
RX packet processing holds rcu_read_lock(), so we can remove pairs of rcu_read_lock()/rcu_read_unlock() in lookup functions if inet_diag also holds rcu before calling them.
This is needed anyway as __inet_lookup_listener() and inet6_lookup_listener() will soon no longer increment refcount on the found listener.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit ee3cf32a4a5e6cf5ccc0f0de9865fda3ebc46436 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:14 2016 -0700
tcp/dccp: remove BH disable/enable in lookup
Since linux 2.6.29, lookups only use rcu locking.
Signed-off-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit ca065d0cf80fa547724440a8bf37f1e674d917c0 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:13 2016 -0700
udp: no longer use SLAB_DESTROY_BY_RCU
Tom Herbert would like not touching UDP socket refcnt for encapsulated traffic. For this to happen, we need to use normal RCU rules, with a grace period before freeing a socket. UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern.
This actually removes a lot of complexity in UDP stack.
Multicast receives no longer need to hold a bucket spinlock.
Note that ip early demux still needs to take a reference on the socket.
Same remark for functions used by xt_socket and xt_PROXY netfilter modules, but this might be changed later.
Performance for a single UDP socket receiving flood traffic from many RX queues/cpus.
Simple udp_rx using simple recvfrom() loop : 438 kpps instead of 374 kpps : 17 % increase of the peak rate.
v2: Addressed Willem de Bruijn feedback in multicast handling - keep early demux break in __udp4_lib_demux_lookup()
Signed-off-by: Eric Dumazet edumazet@google.com Cc: Tom Herbert tom@herbertland.com Cc: Willem de Bruijn willemb@google.com Tested-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit a4298e4522d687a79af8f8fbb7eca68399ab2d81 Author: Eric Dumazet edumazet@google.com Date: Fri Apr 1 08:52:12 2016 -0700
net: add SOCK_RCU_FREE socket flag
We want a generic way to insert an RCU grace period before socket freeing for cases where RCU_SLAB_DESTROY_BY_RCU is adding too much overhead.
SLAB_DESTROY_BY_RCU strict rules force us to take a reference on the socket sk_refcnt, and it is a performance problem for UDP encapsulation, or TCP synflood behavior, as many CPUs might attempt the atomic operations on a shared sk_refcnt
UDP sockets and TCP listeners can set SOCK_RCU_FREE so that their lookup can use traditional RCU rules, without refcount changes. They can set the flag only once hashed and visible by other cpus.
Signed-off-by: Eric Dumazet edumazet@google.com Cc: Tom Herbert tom@herbertland.com Tested-by: Tom Herbert tom@herbertland.com Signed-off-by: David S. Miller davem@davemloft.net
commit 43e2dfb23eb8f3698718ec1e3936c76912de1c30 Merge: 6e33804 0c5a616 Author: David S. Miller davem@davemloft.net Date: Mon Apr 4 22:01:44 2016 -0400
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
==================== 10GbE Intel Wired LAN Driver Updates 2016-04-04
This series contains updates to ixgbe and ixgbevf.
Pavel Tikhomirov fixes a typo where we were incrementing transmit stats instead of receive stats on the receive side.
Emil updates the ixgbevf driver to use bit operations for setting and checking the adapter state.
Chas Williams adds the new NDO trust feature check so that the VF guest has the ability to set the unicast address of the interface, if it is a trusted VF.
Alex cleans up the driver to that the only time we add a PF entry to the VLVF is either for VLAN 0 or if the PF has requested a VLAN that a VF is already using. Also adds support for generic transmit checksums, giving the added advantage is that we can support inner checksum offloads for tunnels and MPLS while still being able to transparently insert VLAN tags. Lastly, changed ixgbe so that we can use the ethtool rx-vlan-filter flag to toggle receive VLAN filtering on and off.
Mark cleans up the ixgbe driver by making all op structures that do not change constants. Also fixed flow control for Xeon D KR backplanes, since we cannot use auto-negotiation to determine the mode, we have to use whatever the user configured.
Sowmini Varadhan updates ixgbe to use eth_platform_get_mac_address() instead of the arch specific solution that was added by a previous commit.
Don fixed an issue where it was possible that a system reset could occur when we were holding the SWFW semaphore lock, which the next time the driver loaded would see it incorrectly as locked.
v2: updated patch 8 of the series to include a minor flags issue where we had lost NETIF_F_HW_TC and we were setting NETIF_F_SCTP_CRC in two different areas, when we only needed/wanted it in one spot. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 6e3380488a4769edba0da3b582bb6c070121d784 Merge: 9ef280c 26892ff Author: David S. Miller davem@davemloft.net Date: Mon Apr 4 21:31:35 2016 -0400
Merge branch 'mv88e6131-hw-bridging-6185'
Vivien Didelot says:
==================== net: dsa: mv88e6131: HW bridging support for 6185
All packets passing through a switch of the 6185 family are currently all directed to the CPU port. This means that port bridging is software driven.
To enable hardware bridging for this switch family, we need to implement the port mapping operations, the FDB operations, and optionally the VLAN operations (for 802.1Q and VLAN filtering aware systems).
However this family only has 256 FDBs indexed by 8-bit identifiers, opposed to 4096 FDBs with 12-bit identifiers for other families such as 6352. It also doesn't have dedicated FID registers for ATU and VTU operations.
This patchset fixes these differences, and enable hardware bridging for 6185.
Changes v1 -> v2: - Describe the different numbers of databases and prefer a feature-based logic over the current ID/family-based logic. ====================
Tested-by: Andrew Lunn andrew@lunn.ch Signed-off-by: David S. Miller davem@davemloft.net
commit 26892ffc80b4276f6f0d61232a769100023b38ab Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:46 2016 -0400
net: dsa: mv88e6131: enable hardware bridging
By adding support for bridge operations, FDB operations, and optionally VLAN operations (for 802.1Q and VLAN filtering aware systems), the switch bridges ports correctly, the CPU is able to populate the hardware address databases, and thus hardware bridging becomes functional within the 88E6185 family of switches.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit f93dd042de08633ff481d092245f2d9b4a3cdb6a Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:45 2016 -0400
net: dsa: mv88e6xxx: map destination addresses for 6185
The 88E6185 switch also has a MapDA bit in its Port Control 2 register. When this bit is cleared, all frames are sent out to the CPU port.
Set this bit to rely on address databases (ATU) hits and direct frames out of the correct ports, and thus allow hardware bridging.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 11ea809f1a74b006f08e7dad0b257e06c817f313 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:44 2016 -0400
net: dsa: mv88e6xxx: support 256 databases
The 6185 family of devices has only 256 address databases. Their 8-bit FID for ATU and VTU operations are split into ATU Control and ATU/VTU Operation registers.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit f74df0be82d7d29747bfd68d955f4f573f9e5691 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:43 2016 -0400
net: dsa: mv88e6xxx: variable number of databases
Marvell switch chips have different number of address databases.
The code currently only supports models with 4096 databases. Such switch has dedicated FID registers for ATU and VTU operations. Models with fewer databases have their FID split in several registers.
List them all but only support models with 4096 databases at the moment.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit b426e5f7fe4cd7041b3d8bed58f1e60bba1d11bf Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:42 2016 -0400
net: dsa: mv88e6xxx: protect FID registers access
Only switch families with 4096 address databases have dedicated FID registers for ATU and VTU operations.
Factorize the access to the GLOBAL_ATU_FID register and introduce a mv88e6xxx_has_fid_reg() helper function to protect the access to GLOBAL_ATU_FID and GLOBAL_VTU_FID.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2e7bd5ef98030999eaf4bf101707e595432fc8c2 Author: Vivien Didelot vivien.didelot@savoirfairelinux.com Date: Thu Mar 31 16:53:41 2016 -0400
net: dsa: mv88e6xxx: protect SID register access
Introduce a mv88e6xxx_has_stu() helper to protect the access to the GLOBAL_VTU_SID register, instead of checking switch families.
Signed-off-by: Vivien Didelot vivien.didelot@savoirfairelinux.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0c5a616650a08b766e529511348274c1914ef4bf Author: Alexander Duyck aduyck@mirantis.com Date: Thu Mar 10 10:01:10 2016 -0800
ixgbe: Add support for toggling VLAN filtering flag via ethtool
This change makes it so that we can use the ethtool rx-vlan-filter flag to toggle Rx VLAN filtering on and off. This is basically just an extension of the existing VLAN promisc work in that it just adds support for the additional ethtool flag.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 4ae7834221679bff2d7f75ba80a20673cecb38ad Author: Amritha Nambiar amritha.nambiar@intel.com Date: Wed Mar 9 18:32:16 2016 -0500
ixgbe: Extend cls_u32 offload to support UDP headers
Added support to match on UDP fields in the transport layer. Extended core logic to support multiple headers.
Verified with the following filters :
handle 1: u32 divisor 1 u32 ht 800: order 1 link 1: \ offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff u32 ht 1: order 2 \ match tcp src 1024 ffff match tcp dst 23 ffff action drop handle 2: u32 divisor 1 u32 ht 800: order 3 link 2: \ offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 17 ff u32 ht 2: order 4 \ match udp src 1025 ffff match udp dst 24 ffff action drop
Signed-off-by: Amritha Nambiar amritha.nambiar@intel.com Acked-by: John Fastabend john.r.fastabend@intel.com Acked-by: Sridhar Samudrala sridhar.samudrala@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit dbd15b8f9cc3f0f8d665d048a31c0f4b5c9150a5 Author: Don Skidmore donald.c.skidmore@intel.com Date: Wed Mar 9 16:45:00 2016 -0500
ixgbe: Place SWFW semaphore in known valid state at probe
It is possible on some HW that a system reset could occur when we are holding the SWFW semaphore lock. So next time the driver was loaded we would see it incorrectly as locked. This patch will recover from that state by: Attempting to acquire the semaphore and then regardless of whether or not it was acquire we immediately release it. This will force us into a known good state.
Signed-off-by: Don Skidmore donald.c.skidmore@intel.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c04f90e592431489df114971ff025265d429e48f Author: Rostislav Pehlivanov atomnuker@gmail.com Date: Wed Jan 27 18:33:30 2016 +0000
ixgbe: add a callback to set the maximum transmit bitrate
This commit adds a callback which allows to adjust the maximum transmit bitrate the card can output. This makes it possible to get a smooth traffic instead of the default burst-y behaviour when trying to output e.g. a video stream.
Much of the logic needed to get a correct bcnrc_val was taken from the ixgbe_set_vf_rate_limit() function.
Signed-off-by: Rostislav Pehlivanov atomnuker@gmail.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit afdc71e4d6dc46d0f5bea7461ce356e6056f5ba8 Author: Mark Rustad mark.d.rustad@intel.com Date: Mon Jan 25 16:32:10 2016 -0800
ixgbe: Fix flow control for Xeon D KR backplane
Xeon D KR backplane is different from other backplanes, in that we can't use auto-negotiation to determine the mode. Instead, use whatever the user configured.
Signed-off-by: Mark Rustad mark.d.rustad@intel.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit cb2b3edbece804d9836647c1ca51282ad384d425 Author: Alexander Duyck aduyck@mirantis.com Date: Wed Jan 13 07:31:17 2016 -0800
ixgbevf: Add support for generic Tx checksums
This patch adds support for generic Tx checksums to the ixgbevf driver. It turns out this is actually pretty easy after going over the datasheet as we were doing a number of steps we didn't need to.
In order to perform a Tx checksum for an L4 header we need to fill in the following fields in the Tx descriptor: MACLEN (maximum of 127), retrieved from: skb_network_offset() IPLEN (maximum of 511), retrieved from: skb_checksum_start_offset() - skb_network_offset() TUCMD.L4T indicates offset and if checksum or crc32c, based on: skb->csum_offset
The added advantage to doing this is that we can support inner checksum offloads for tunnels and MPLS while still being able to transparently insert VLAN tags.
I also took the opportunity to clean-up many of the feature flag configuration bits to make them a bit more consistent between drivers. In the case of the VF drivers this meant adding support for SCTP CRCs, and inner checksum offloads for MPLS and various tunnel types.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 49763de0425560eed50a186428010189eae69372 Author: Alexander Duyck aduyck@mirantis.com Date: Wed Jan 13 07:31:11 2016 -0800
ixgbe: Add support for generic Tx checksums
This patch adds support for generic Tx checksums to the ixgbe driver. It turns out this is actually pretty easy after going over the datasheet as we were doing a number of steps we didn't need to.
In order to perform a Tx checksum for an L4 header we need to fill in the following fields in the Tx descriptor: MACLEN (maximum of 127), retrieved from: skb_network_offset() IPLEN (maximum of 511), retrieved from: skb_checksum_start_offset() - skb_network_offset() TUCMD.L4T indicates offset and if checksum or crc32c, based on: skb->csum_offset
The added advantage to doing this is that we can support inner checksum offloads for tunnels and MPLS while still being able to transparently insert VLAN tags.
I also took the opportunity to clean-up many of the feature flag configuration bits to make them a bit more consistent between drivers.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit c7374b5a767cb6c7d9acbfc82656dc89afeae257 Author: Sowmini Varadhan sowmini.varadhan@oracle.com Date: Tue Jan 12 19:32:30 2016 -0800
ixgbe: use eth_platform_get_mac_address()
This commit converts commit c762dff24c06 ("ixgbe: Look up MAC address in Open Firmware or IDPROM") to use eth_platform_get_mac_address() added by commit c7f5d105495a ("net: Add eth_platform_get_mac_address() helper.")
Signed-off-by: Sowmini Varadhan sowmini.varadhan@oracle.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 37689010da28c6dfd9f59e60d7f42c47b775171c Author: Mark Rustad mark.d.rustad@intel.com Date: Thu Jan 7 10:13:03 2016 -0800
ixgbe: Make all unchanging ops structures const
The source for the ops structure contents are const, so make them so. Copy them in place with structure assignments instead of memcpys. Make the mbx_ops accessed by reference instead of making a copy of the source structure. Update copyright date on the touched files.
Reported-by: Julia Lawall Julia.Lawall@lip6.fr Signed-off-by: Mark Rustad mark.d.rustad@intel.com Acked-by: Julia Lawall julia.lawall@lip6.fr Tested-by: Andrew Bowers andrewx.bowers@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 06bb1c39d8be0b2ee60b5bc9384fdac6e19bc270 Author: Alexander Duyck aduyck@mirantis.com Date: Wed Jan 6 22:48:50 2016 -0800
ixgbe: Avoid adding VLAN 0 twice to VLVF and VFTA
We were adding VLAN 0 twice each time we restored the VLAN configuration. Instead of doing it twice we can just start working through the active VLANs from ID 1 on and skip the double write.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 9ef280c6c28f0c01aa9d909263ad47c796713a8e Author: Simon Horman horms+renesas@verge.net.au Date: Mon Apr 4 10:44:39 2016 +0900
irda: sh_irda: remove driver
Remove the sh-irda driver as it appears to be unused since c0bb9b302769 ("ARCH: ARM: shmobile: Remove ag5evm board support").
Signed-off-by: Simon Horman horms+renesas@verge.net.au Signed-off-by: David S. Miller davem@davemloft.net
commit acf195a9f5228dbc529e023f035c2359cb6d2a19 Merge: f51bdc2 88023be Author: David S. Miller davem@davemloft.net Date: Mon Apr 4 16:16:36 2016 -0400
Merge branch 'macb-coding-style'
Moritz Fischer says:
==================== macb: Codingstyle cleanups
resending almost unchanged v2 here:
Changes from v2: * Rebased onto net-next * Changed 5th patches commit message * Added Nicholas' and Michal's Acked-Bys
Changes from v1: * Backed out variable scope changes * Separated out ether_addr_copy into it's own commit * Fixed typo in comments as suggested by Joe ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 88023beb2a467dcfd9aa958138f0f3b5e1c432e0 Author: Moritz Fischer moritz.fischer@ettus.com Date: Tue Mar 29 19:11:15 2016 -0700
net: macb: Fix simple typo
Acked-by: Michal Simek michal.simek@xilinx.com Acked-by: Nicolas Ferre nicolas.ferre@atmel.com Signed-off-by: Moritz Fischer moritz.fischer@ettus.com Signed-off-by: David S. Miller davem@davemloft.net
commit eefb52d1ec8eb1354ff1bf55811a0da74bffccb8 Author: Moritz Fischer moritz.fischer@ettus.com Date: Tue Mar 29 19:11:14 2016 -0700
net: macb: Use ether_addr_copy over memcpy
Checkpatch suggests using ether_addr_copy over memcpy to copy the mac address.
Acked-by: Michal Simek michal.simek@xilinx.com Acked-by: Nicolas Ferre nicolas.ferre@atmel.com Signed-off-by: Moritz Fischer moritz.fischer@ettus.com Signed-off-by: David S. Miller davem@davemloft.net
commit aa50b55262d459f69c7b32eb7ce38cde84cc089b Author: Moritz Fischer moritz.fischer@ettus.com Date: Tue Mar 29 19:11:13 2016 -0700
net: macb: Fix coding style suggestions
This commit deals with a bunch of checkpatch suggestions that without changing behavior make checkpatch happier.
Acked-by: Michal Simek michal.simek@xilinx.com Acked-by: Nicolas Ferre nicolas.ferre@atmel.com Signed-off-by: Moritz Fischer moritz.fischer@ettus.com Signed-off-by: David S. Miller davem@davemloft.net
commit 64ec42fe272322c73ee159c68f7fb31896f65d1a Author: Moritz Fischer moritz.fischer@ettus.com Date: Tue Mar 29 19:11:12 2016 -0700
net: macb: Fix coding style warnings
This commit takes care of the coding style warnings that are mostly due to a different comment style and lines over 80 chars, as well as a dangling else.
Acked-by: Nicolas Ferre nicolas.ferre@atmel.com Signed-off-by: Moritz Fischer moritz.fischer@ettus.com Signed-off-by: David S. Miller davem@davemloft.net
commit 96ec6310908a5f02450b18206d85e531f08cfa97 Author: Moritz Fischer moritz.fischer@ettus.com Date: Tue Mar 29 19:11:11 2016 -0700
net: macb: Fix coding style error message
checkpatch.pl gave the following error:
ERROR: space required before the open parenthesis '(' + for(; p < end; p++, offset += 4)
Acked-by: Nicolas Ferre nicolas.ferre@atmel.com Acked-by: Michal Simek michal.simek@xilinx.com Signed-off-by: Moritz Fischer moritz.fischer@ettus.com Signed-off-by: David S. Miller davem@davemloft.net
commit f51bdc236b6c5835fa5e0df772acc234288b8af2 Author: Kazuya Mizuguchi kazuya.mizuguchi.ks@renesas.com Date: Sun Apr 3 23:54:38 2016 +0900
ravb: Add dma queue interrupt support
This patch supports the following interrupts.
- One interrupt for multiple (timestamp, error, gPTP) - One interrupt for emac - Four interrupts for dma queue (best effort rx/tx, network control rx/tx)
This patch improve efficiency of the interrupt handler by adding the interrupt handler corresponding to each interrupt source described above. Additionally, it reduces the number of times of the access to EthernetAVB IF. Also this patch prevent this driver depends on the whim of a boot loader.
[ykaneko0929@gmail.com: define bit names of registers] [ykaneko0929@gmail.com: add comment for gen3 only registers] [ykaneko0929@gmail.com: fix coding style] [ykaneko0929@gmail.com: update changelog] [ykaneko0929@gmail.com: gen3: fix initialization of interrupts] [ykaneko0929@gmail.com: gen3: fix clearing interrupts] [ykaneko0929@gmail.com: gen3: add helper function for request_irq()] [ykaneko0929@gmail.com: gen3: remove IRQF_SHARED flag for request_irq()] [ykaneko0929@gmail.com: revert ravb_close() and ravb_ptp_stop()] [ykaneko0929@gmail.com: avoid calling free_irq() to non-hooked interrupts] [ykaneko0929@gmail.com: make NC/BE interrupt handler a function] [ykaneko0929@gmail.com: make timestamp interrupt handler a function] [ykaneko0929@gmail.com: timestamp interrupt is handled in multiple interrupt handler instead of dma queue interrupt handler] Signed-off-by: Kazuya Mizuguchi kazuya.mizuguchi.ks@renesas.com Signed-off-by: Yoshihiro Kaneko ykaneko0929@gmail.com Acked-by: Sergei Shtylyov sergei.shtylyov@cogentembedded.com Signed-off-by: David S. Miller davem@davemloft.net
commit 18be4fce00fef206dc6f104a6a258b193e9871cf Author: Alexander Duyck aduyck@mirantis.com Date: Wed Jan 6 22:48:44 2016 -0800
ixgbe: Do not allow PF to add VLVF entry unless it actually needs it
While doing the work on igb I realized there were a few cases where we were still adding VLANs to the VLVF entries for the PF when they were not needed. This patch cleans that up so that the only time we add a PF entry to the VLVF is either for VLAN 0 or if the PF has requested a VLAN that a VF is already using.
Signed-off-by: Alexander Duyck aduyck@mirantis.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 1d96cf9822bf801b1a93a0817e45dd02af5ac0e6 Author: chas williams 3chas3@gmail.com Date: Tue Jan 5 17:30:39 2016 -0500
ixgbe: Extend trust to allow guest to set unicast address
When running certain routing protocols like VRRP, VF guests need the ability to set the unicast address of the interface. Extend the new ndo trust feature to let the hypervisor trust a guest to set/update its own unicast address.
Signed-off-by: Chas Williams 3chas3@gmail.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit d5dd7c3fa4dbff70fc25acf54acb63cf971fd6e9 Author: Emil Tantilov emil.s.tantilov@intel.com Date: Thu Dec 17 17:32:55 2015 -0800
ixgbevf: use bit operations for setting and checking resets
Move the reset flags to adapter->state in order to make use of bit operations.
This is an alternative patch to the one previously submitted by John Greene.
Suggested-by: Alexander Duyck aduyck@mirantis.com Reported-by: Scott Otto otts62@yahoo.com Reported-by: John Greene jogreene@redhat.com Signed-off-by: Emil Tantilov emil.s.tantilov@intel.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit 9d2355ba30942ec28fb56510a8228050cbfcc6a6 Merge: 833716e fd91e12 Author: David S. Miller davem@davemloft.net Date: Mon Apr 4 15:50:31 2016 -0400
Merge branch 'cmsg_timestamp'
Soheil Hassas Yeganeh says:
==================== add TX timestamping via cmsg
This patch series aim at enabling TX timestamping via cmsg.
Currently, to occasionally sample TX timestamping on a socket, applications need to call setsockopt twice: first for enabling timestamps and then for disabling them. This is an unnecessary overhead. With cmsg, in contrast, applications can sample TX timestamps per sendmsg().
This patch series adds the code for processing SO_TIMESTAMPING for cmsg's of the SOL_SOCKET level, and adds the glue code for TCP, UDP, and RAW for both IPv4 and IPv6. This implementation supports overriding timestamp generation flags (i.e., SOF_TIMESTAMPING_TX_*) but not timestamp reporting flags. Applications must still enable timestamp reporting via setsockopt to receive timestamps.
This series does not change existing timestamping behavior for applications that are using socket options.
I will follow up with another patch to enable timestamping for active TFO (client-side TCP Fast Open) and also setting packet mark via cmsgs.
Thanks!
Changes in v2: - Replace u32 with __u32 in the documentation.
Changes in v3: - Fix the broken build for L2TP (due to changes in IPv6). ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit fd91e12f594b40fdb2dad530e8b895cc5c07db21 Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:13 2016 -0400
sock: document timestamping via cmsg in Documentation
Update docs and add code snippet for using cmsg for timestamping.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit c14ac9451c34832554db33386a4393be8bba3a7b Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:12 2016 -0400
sock: enable timestamping using control messages
Currently, SOL_TIMESTAMPING can only be enabled using setsockopt. This is very costly when users want to sample writes to gather tx timestamps.
Add support for enabling SO_TIMESTAMPING via control messages by using tsflags added in `struct sockcm_cookie` (added in the previous patches in this series) to set the tx_flags of the last skb created in a sendmsg. With this patch, the timestamp recording bits in tx_flags of the skbuff is overridden if SO_TIMESTAMPING is passed in a cmsg.
Please note that this is only effective for overriding the recording timestamps flags. Users should enable timestamp reporting (e.g., SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_OPT_ID) using socket options and then should ask for SOF_TIMESTAMPING_TX_* using control messages per sendmsg to sample timestamps for each write.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit ad1e46a837163a3e7160a1250825bcfafd2e714b Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:11 2016 -0400
ipv6: process socket-level control messages in IPv6
Process socket-level control messages by invoking __sock_cmsg_send in ip6_datagram_send_ctl for control messages on the SOL_SOCKET layer.
This makes sure whenever ip6_datagram_send_ctl is called for udp and raw, we also process socket-level control messages.
This is a bit uglier than IPv4, since IPv6 does not have something like ipcm_cookie. Perhaps we can later create a control message cookie for IPv6?
Note that this commit interprets new control messages that were ignored before. As such, this commit does not change the behavior of IPv6 control messages.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 24025c465f77c3585f73450bab19501b2edd6fba Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:10 2016 -0400
ipv4: process socket-level control messages in IPv4
Process socket-level control messages by invoking __sock_cmsg_send in ip_cmsg_send for control messages on the SOL_SOCKET layer.
This makes sure whenever ip_cmsg_send is called in udp, icmp, and raw, we also process socket-level control messages.
Note that this commit interprets new control messages that were ignored before. As such, this commit does not change the behavior of IPv4 control messages.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 3dd17e63f5131bf2528f34aa5e3e57758175af92 Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:09 2016 -0400
sock: accept SO_TIMESTAMPING flags in socket cmsg
Accept SO_TIMESTAMPING in control messages of the SOL_SOCKET level as a basis to accept timestamping requests per write.
This implementation only accepts TX recording flags (i.e., SOF_TIMESTAMPING_TX_HARDWARE, SOF_TIMESTAMPING_TX_SOFTWARE, SOF_TIMESTAMPING_TX_SCHED, and SOF_TIMESTAMPING_TX_ACK) in control messages. Users need to set reporting flags (e.g., SOF_TIMESTAMPING_OPT_ID) per socket via socket options.
This commit adds a tsflags field in sockcm_cookie which is set in __sock_cmsg_send. It only override the SOF_TIMESTAMPING_TX_* bits in sockcm_cookie.tsflags allowing the control message to override the recording behavior per write, yet maintaining the value of other flags.
This patch implements validating the control message and setting tsflags in struct sockcm_cookie. Next commits in this series will actually implement timestamping per write for different protocols.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6b084928baac562ed61866f540a96120e9c9ddb7 Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:08 2016 -0400
tcp: use one bit in TCP_SKB_CB to mark ACK timestamps
Currently, to avoid a cache line miss for accessing skb_shinfo, tcp_ack_tstamp skips socket that do not have SOF_TIMESTAMPING_TX_ACK bit set in sk_tsflags. This is implemented based on an implicit assumption that the SOF_TIMESTAMPING_TX_ACK is set via socket options for the duration that ACK timestamps are needed.
To implement per-write timestamps, this check should be removed and replaced with a per-packet alternative that quickly skips packets missing ACK timestamps marks without a cache-line miss.
To enable per-packet marking without a cache line miss, use one bit in TCP_SKB_CB to mark a whether a SKB might need a ack tx timestamp or not. Further checks in tcp_ack_tstamp are not modified and work as before.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 6db8b963a7a31047573f229492ff6fc0f51cc377 Author: Soheil Hassas Yeganeh soheil@google.com Date: Sat Apr 2 23:08:07 2016 -0400
tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO
SOF_TIMESTAMPING_OPT_ID is set to get data-independent IDs to associate timestamps with send calls. For TCP connections, tp->snd_una is used as the starting point to calculate relative IDs.
This socket option will fail if set before the handshake on a passive TCP fast open connection with data in SYN or SYN/ACK, since setsockopt requires the connection to be in the ESTABLISHED state.
To address these, instead of limiting the option to the ESTABLISHED state, accept the SOF_TIMESTAMPING_OPT_ID option as long as the connection is not in LISTEN or CLOSE states.
Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Acked-by: Willem de Bruijn willemb@google.com Acked-by: Yuchung Cheng ycheng@google.com Acked-by: Eric Dumazet edumazet@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 39771b127b412377d6354893c7d43ee8f2edecfd Author: Willem de Bruijn willemb@google.com Date: Sat Apr 2 23:08:06 2016 -0400
sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop
To process cmsg's of the SOL_SOCKET level in addition to cmsgs of another level, protocols can call sock_cmsg_send(). This causes a double walk on the cmsghdr list, one for SOL_SOCKET and one for the other level.
Extract the inner demultiplex logic from the loop that walks the list, to allow having this called directly from a walker in the protocol specific code.
Signed-off-by: Willem de Bruijn willemb@google.com Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 75b6462e965dc76d16254b5fcb3f41ca97f6fef0 Author: Pavel Tikhomirov ptikhomirov@virtuozzo.com Date: Fri Dec 11 17:05:14 2015 +0300
ixgbe: on recv increment rx.ring->stats.yields
It seem to be non intentionally changed to Tx in commit adc810900a70 ("ixgbe: Refactor busy poll socket code to address multiple issues")
Lock is taken from ixgbe_low_latency_recv, and there under this lock we use ixgbe_clean_rx_irq so it looks wrong for me to increment Tx counter.
Yield stats can be shown through ethtool: ethtool -S enp129s0 | grep yield
Signed-off-by: Pavel Tikhomirov ptikhomirov@virtuozzo.com Tested-by: Phil Schmitt phillip.j.schmitt@intel.com Signed-off-by: Jeff Kirsher jeffrey.t.kirsher@intel.com
commit a2cb3d5f043e4cc646c396a3e188a171b38c15a0 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Mar 18 17:54:56 2016 +0800
ath9k: fix rng high cpu load
If no valid ADC randomness output, ath9k rng will continuously reading ADC, which will cause high CPU load. So increase the delay to wait for ADC ready.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114261 Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 69218a48005d0c93b8e9ec483f42ead481a43034 Author: Lior David qca_liord@qca.qualcomm.com Date: Mon Mar 21 22:01:11 2016 +0200
wil6210: allow empty WMI commands in debugfs wmi_send
There are many valid WMI commands with only header without any additional payload. Such WMI commands could not be sent using the debugfs wmi_send facility. Fix the code to allow sending of such commands.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7b9bc799a445aea95f64f15e0083cb19b5789abe Author: Joseph Salisbury joseph.salisbury@canonical.com Date: Mon Mar 14 14:51:48 2016 -0400
ath5k: Change led pin configuration for compaq c700 laptop
BugLink: http://bugs.launchpad.net/bugs/972604
Commit 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop") added a pin configuration for the Compaq c700 laptop. However, the polarity of the led pin is reversed. It should be red for wifi off and blue for wifi on, but it is the opposite. This bug was reported in the following bug report: http://pad.lv/972604
Fixes: 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop") Signed-off-by: Joseph Salisbury joseph.salisbury@canonical.com Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7d5efd0888331a0f7ed2e1d5a6977a32b7e9bfb7 Author: Peter Oh poh@qca.qualcomm.com Date: Tue Mar 22 15:44:53 2016 -0700
ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4
Check and parse Rx MAC timestamp when firmware sets its flag to status variable. 10.4 firmware adds it in Rx beacon frame only at this moment. Drivers and mac80211 may utilize it to detect such clockdrift or beacon collision and use the result for beacon collision avoidance.
Signed-off-by: Peter Oh poh@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 5c86d97bcc1d42ce7f75685a61be4dad34ee8183 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:19 2016 +0530
ath10k: combine txrx and replenish task
Since tx completion and rx indication processing are moved out of txrx tasklet and rx ring lock contention also removed from txrx for rx_ind messages, it would be efficient to combine both replenish and txrx tasks. Refill threshold is adjusted for both AP135 and AP148 (low and high end systems). With this adjustment in AP135, TCP DL is improved from 603 Mbps to 620 Mbps and UDP DL is improved from 758 Mbps to 803 Mbps. Also no watchdog are observed on UDP BiDi.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 128abd09134a5b415fef4373841ea6d3fb7b680f Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:18 2016 +0530
ath10k: reuse copy engine 5 (htt rx) descriptors
Whenever htt rx indication i.e target to host messages are received on rx copy engine (CE5), the message will be freed after processing the response. Then CE 5 will be refilled with new descriptors at post rx processing. This memory alloc and free operations can be avoided by reusing the same descriptors.
During CE pipe allocation, full ring is not initialized i.e n-1 entries are filled up. So for CE 5 full ring should be filled up to reuse descriptors. Moreover CE 5 write index will be updated in single shot instead of incremental access. This could avoid multiple pci_write and ce_ring access. From experiments, It improves CPU usage by ~3% in IPQ4019 platform.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 24d9ef5eff5057bb6339ed1cf852a2b2a7be324d Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:17 2016 +0530
ath10k: cleanup copy engine receive next completion
The physical address necessary to unmap DMA ('bufferp') is stored in ath10k_skb_cb as 'paddr'. For diag register read and write operations, 'paddr' is stored in transfer context. ath10k doesn't rely on the meta/transfer_id. So the unused output arguments {bufferp, nbytesp and transfer_idp} are removed from CE recv_next completion.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit e3a91f877c60ce8b29d8cd180c23f3de33a7d7e1 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:16 2016 +0530
ath10k: register ath10k_htt_htc_t2h_msg_handler
Except qca61x4 family chips (qca6164, qca6174), copy engine 5 is used for receiving target to host htt messages. In follow up patch, CE5 descriptors will be reused. In such case, same API can not be used as htc layer callback where the response messages will be freed at the end. Hence register new API for HTC layer that free up received message and keep the message handler common for both HTC and HIF layers.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 3128b3d8a2b97ba8fe38b21c3ed70c2c66cc7a9e Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:15 2016 +0530
ath10k: speedup htt rx descriptor processing for rx_ind
In follow up patch, htt rx descriptors will be reused instead of dealloc and refill. To achieve that htt rx indication messages should not be deferred and should be processed in pci tasklet itself. Also from rx indication message, mpdu_count alone is used. So it is maintained as atomic variable and all rx amsdu handlers are done processed from txrx tasklet. This change get rid of rx_compl_q usage.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 18235664e7f9a5664cbef25d23b222ff2faf55bc Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:14 2016 +0530
ath10k: cleanup amsdu processing for rx indication
Make amsdu handlers (i.e amsdu_pop and rx_h_handler) common to both rx_ind and frag_ind htt events. It is sufficient to hold rx_ring lock for amsdu_pop alone and no need to hold it until the packets are delivered to mac80211. This helps to reduce rx_lock contention as well.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6b61d6632a358bc72e14de03ba491907d871c94e Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:13 2016 +0530
ath10k: remove unused fw_desc processing
The fw descriptor was never used and probably never will be. It makes little sense to maintain support for it. Remove it and simplify rx processing. This will make it easier to optimize rx processing later as well.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b2fdbccd15a27d1115a780dcbdcc874e0c9f4abe Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:12 2016 +0530
ath10k: copy tx fetch indication message
To optmize CPU usage htt rx descriptors will be reused instead of refilling it for htt rx copy engine (CE5). To support that all htt rx indications should be proecssed at same context. Instead of queueing actual indication message, queue copied message for txrx processing.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 59465fe46ef1c2caf2c1beca828c4f29d28b98ca Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 22 17:22:11 2016 +0530
ath10k: speedup htt rx descriptor processing for tx completion
To optimize CPU usage htt rx descriptors will be reused instead of refilling it for htt rx copy engine (CE5). To support that all htt rx indications should be processed at same context. FIFO queue is used to maintain tx completion status for each msdu. This helps to retain the order of tx completion.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit f9575793d44ce68b574d9d8ffb9813eb05c3fd2b Author: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Date: Wed Mar 16 18:13:34 2016 +0530
ath10k: enable parsing per station rx duration for 10.4
Rx duration support for per station is part of extended peer stats, enable provision to parse the same and provide backward compatibility based on the 'stats_id' event
Signed-off-by: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 47771902a9beb23859805721f1d98d03dee5da7c Author: Raja Mani rmani@qti.qualcomm.com Date: Wed Mar 16 18:13:33 2016 +0530
ath10k: introduce Extended Resource Config support for 10.4
Add API support for Extended Resource Configuration for 10.4. This is useful to enable new features like Peer Stats, LTEU etc if the firmware advertises support for the service. This is also done to provide backward compatibility with older firmware. Also for clarity send default host platform type as 'WMI_HOST_PLATFORM_HIGH_PERF', though this should not make any difference in functionality
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 833716e0ed026c1abc7dd0e85a6932b855a8e56b Merge: 5ada37b 91979b9 Author: David S. Miller davem@davemloft.net Date: Sat Apr 2 20:23:10 2016 -0400
Merge branch 'stmmac-GMAC4.x'
Alexandre TORGUE says:
==================== Enhance stmmac driver to support GMAC4.x IP
This is a subset of patch to enhance current stmmac driver to support new GMAC4.x chips. New set of callbacks is defined to support this new family: descriptors, dma, core.
One of main changes of GMAC 4.xx IP is descriptors management. -descriptors are only used in ring mode. -A descriptor is composed of 4 32bits registers (no more extended descriptors) -descriptor mechanism (Tx for example, but it is exactly the same for RX): -useful registers: -DMA_CH#_TxDesc_Ring_Len: length of transmit descriptor ring -DMA_CH#_TxDesc_List_Address: start address of the ring -DMA_CH#_TxDesc_Tail_Pointer: address of the last descriptor to send + 1. -DMA_CH#_TxDesc_Current_App_TxDesc: address of the current descriptor
-The descriptor Tail Pointer register contains the pointer to the descriptor address (N). The base address and the current descriptor decide the address of the current descriptor that the DMA can process. The descriptors up to one location less than the one indicated by the descriptor tail pointer (N-1) are owned by the DMA. The DMA continues to process the descriptors until the following condition occurs: "current descriptor pointer == Descriptor Tail pointer"
Then the DMA goes into suspend mode. The application must perform a write to descriptor tail pointer register and update the tail pointer to have the following condition and to start a new transfer: "current descriptor pointer < Descriptor tail pointer"
The DMA automatically wraps around the base address when the end of ring is reached.
New features are available on IP: -TSO (TCP Segmentation Offload) for TX only -Split header: to have header and payload in 2 different buffers (not yet implemented)
Below some throughput figures obtained on some boxes:
iperf (mbps) -------------------------------------- tcp udp tx rx tx rx ----------------- GMAC4.x 935 930 750 800
Note: There is a change in 4.10a databook on bitfield mapping of DMA_CHANx_INTR_ENA register. This requires to have é diffrent set of callbacks between IP 4.00a and 4.10a. ====================
Signed-off-by: David S. Miller davem@davemloft.net
commit 91979b9db86340d7cd49392a498663fb1ac74639 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:37 2016 +0200
stmmac: update MAINTAINERS
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 06bce7dd1507c9b943fb20c845e02c6f4c172a55 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:36 2016 +0200
stmmac: update version to Jan_2016
This patch just updates the driver to the version fully tested on STi platforms. This version is Jan_2016.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 0b7a43d37633614113ac54af73c193862dff4e50 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:35 2016 +0200
Documentation: networking: update stmmac
Update stmmac driver documentation according to new GMAC 4.x family.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit f748be531d7012c456b97f66091d86b3675c5fef Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:34 2016 +0200
stmmac: support new GMAC4
This patch adds the whole GMAC4 support inside the stmmac d.d. now able to use the new HW and some new features i.e.: TSO. It is missing the multi-queue and split Header support at this stage. This patch also updates the driver version and the stmmac.txt.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit ee2ae1ed46251dcbdcc2c59b5e30f664ddfbacb1 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:33 2016 +0200
stmmac: add new DT platform entries for GMAC4
This is to support the snps,dwmac-4.00 and snps,dwmac-4.10a and related features on the platform driver. See binding doc for further details.
Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 36ff7c1e94a5d43a0ea2d386b211087f77669017 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:32 2016 +0200
stmmac: enhance mmc counter management
For gmac3, the MMC addr map is: 0x100 - 0x2fc For gmac4, the MMC addr map is: 0x700 - 0x8fc
So instead of adding 0x600 to the IO address when setup the mmc, the RMON base address is saved inside the private structure and then used to manage the counters.
Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 477286b53f5576ddec0a4df0f3d0c4bd7a0ed165 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:31 2016 +0200
stmmac: add GMAC4 core support
This is the initial support for GMAC4 that includes the main callbacks to setup the core module: including Csum, basic filtering, mac address and interrupt (MMC, MTL, PMT) No LPI added.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 48863ce5940fa5420096c8beba44e5e1bc0c8ca1 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:30 2016 +0200
stmmac: add DMA support for GMAC 4.xx
DMA behavior is linked to descriptor management:
-descriptor mechanism (Tx for example, but it is exactly the same for RX): -useful registers: -DMA_CH#_TxDesc_Ring_Len: length of transmit descriptor ring -DMA_CH#_TxDesc_List_Address: start address of the ring -DMA_CH#_TxDesc_Tail_Pointer: address of the last descriptor to send + 1. -DMA_CH#_TxDesc_Current_App_TxDesc: address of the current descriptor
-The descriptor Tail Pointer register contains the pointer to the descriptor address (N). The base address and the current descriptor decide the address of the current descriptor that the DMA can process. The descriptors up to one location less than the one indicated by the descriptor tail pointer (N-1) are owned by the DMA. The DMA continues to process the descriptors until the following condition occurs: "current descriptor pointer == Descriptor Tail pointer"
Then the DMA goes into suspend mode. The application must perform a write to descriptor tail pointer register and update the tail pointer to have the following condition and to start a new transfer: "current descriptor pointer < Descriptor tail pointer"
The DMA automatically wraps around the base address when the end of ring is reached.
Up to 8 DMA could be use but currently we only use one (channel0)
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 35f74c0c5dce138bd9000d98abf4959af782a96d Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:29 2016 +0200
stmmac: add GMAC4 DMA/CORE Header File
This is the main header file to define all the macro used for GMAC4 DMA and CORE parts.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 753a71090f3325b4c34622daccbb71ed574cca73 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:28 2016 +0200
stmmac: add descriptors function for GMAC 4.xx
One of main changes of GMAC 4.xx IP is descriptors management. -descriptors are only used in ring mode. -A descriptor is composed of 4 32bits registers (no more extended descriptors) -descriptor mechanism (Tx for example, but it is exactly the same for RX): -useful registers: -DMA_CH#_TxDesc_Ring_Len: length of transmit descriptor ring -DMA_CH#_TxDesc_List_Address: start address of the ring -DMA_CH#_TxDesc_Tail_Pointer: address of the last descriptor to send + 1. -DMA_CH#_TxDesc_Current_App_TxDesc: address of the current descriptor
-The descriptor Tail Pointer register contains the pointer to the descriptor address (N). The base address and the current descriptor decide the address of the current descriptor that the DMA can process. The descriptors up to one location less than the one indicated by the descriptor tail pointer (N-1) are owned by the DMA. The DMA continues to process the descriptors until the following condition occurs: "current descriptor pointer == Descriptor Tail pointer"
Then the DMA goes into suspend mode. The application must perform a write to descriptor tail pointer register and update the tail pointer to have the following condition and to start a new transfer: "current descriptor pointer < Descriptor tail pointer"
The DMA automatically wraps around the base address when the end of ring is reached.
-New features are available on IP: -TSO (TCP Segmentation Offload) for TX only -Split header: to have header and payload in 2 different buffers
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit c623d149b18cbdb7e9f782ced0c859b1836ef3cd Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:27 2016 +0200
stmmac: rework synopsys id read, moved to dwmac setup
synopsys_uid is only used once after setup, to get synopsys_id by using shitf/mask operation. It's no longer used then. So, remove this temporary variable and directly compute synopsys_id from setup routine.
Acked-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: Fabrice Gasnier fabrice.gasnier@st.com Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit d0225e7de6229068df99ba8dacebc826d27e1cd5 Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:26 2016 +0200
stmmac: rework the routines to show the ring status
To avoid lot of check in stmmac_main for display ring management and support the GMAC4 chip, the display_ring function is moved into dedicated descriptor file.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit f10a6a3541b4f79f6a4d9f0d4f8f16b92f8f1cfc Author: Alexandre TORGUE alexandre.torgue@st.com Date: Fri Apr 1 11:37:25 2016 +0200
stmmac: rework get_hw_feature function
On next GMAC IP generation (4.xx), the way to get hw feature is not the same than on previous 3.xx. As it is hardware dependent, the way to get hw capabilities should be defined in dma ops of each MAC IP. It will avoid also a huge computation of hw capabilities in stmmac_main.
Signed-off-by: Alexandre TORGUE alexandre.torgue@st.com Signed-off-by: Giuseppe Cavallaro peppe.cavallaro@st.com Signed-off-by: David S. Miller davem@davemloft.net
commit 5ada37b53ea2b310df143b2c7d6c48fbf14d5cb8 Author: Lisheng lisheng011@huawei.com Date: Thu Mar 31 21:00:09 2016 +0800
net: hns: add support of pause frame ctrl for HNS V2
The patch adds support of pause ctrl for HNS V2, and this feature is lost by HNS V1: 1) service ports can disable rx pause frame, 2) debug ports can open tx/rx pause frame.
And this patch updates the REGs about the pause ctrl when updated status function called by upper layer routine.
Signed-off-by: Lisheng lisheng011@huawei.com Signed-off-by: Yisen Zhuang Yisen.Zhuang@huawei.com Reviewed-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Signed-off-by: David S. Miller davem@davemloft.net
commit 7822ce73e659ab0c5dd8289f077efbcc4cd03164 Author: Haishuang Yan yanhaishuang@cmss.chinamobile.com Date: Thu Mar 31 18:21:38 2016 +0800
netlink: use nla_get_in_addr and nla_put_in_addr for ipv4 address
Since nla_get_in_addr and nla_put_in_addr were implemented, so use them appropriately.
Signed-off-by: Haishuang Yan yanhaishuang@cmss.chinamobile.com Signed-off-by: David S. Miller davem@davemloft.net
commit 2349262397b89a421adfd142aad2a7dd33710f26 Author: Yuchung Cheng ycheng@google.com Date: Wed Mar 30 14:54:20 2016 -0700
tcp: remove cwnd moderation after recovery
For non-SACK connections, cwnd is lowered to inflight plus 3 packets when the recovery ends. This is an optional feature in the NewReno RFC 2582 to reduce the potential burst when cwnd is "re-opened" after recovery and inflight is low.
This feature is questionably effective because of PRR: when the recovery ends (i.e., snd_una == high_seq) NewReno holds the CA_Recovery state for another round trip to prevent false fast retransmits. But if the inflight is low, PRR will overwrite the moderated cwnd in tcp_cwnd_reduction() later regardlessly. So if a receiver responds bogus ACKs (i.e., acking future data) to speed up transfer after recovery, it can only induce a burst up to a window worth of data packets by acking up to SND.NXT. A restart from (short) idle or receiving streched ACKs can both cause such bursts as well.
On the other hand, if the recovery ends because the sender detects the losses were spurious (e.g., reordering). This feature unconditionally lowers a reverted cwnd even though nothing was lost.
By principle loss recovery module should not update cwnd. Further pacing is much more effective to reduce burst. Hence this patch removes the cwnd moderation feature.
v2 changes: revised commit message on bogus ACKs and burst, and missing signature
Signed-off-by: Matt Mathis mattmathis@google.com Signed-off-by: Neal Cardwell ncardwell@google.com Signed-off-by: Soheil Hassas Yeganeh soheil@google.com Signed-off-by: Yuchung Cheng ycheng@google.com Signed-off-by: David S. Miller davem@davemloft.net
commit 46167a8fd4248533ad15867e6988ff20e76de641 Author: Colin Ian King colin.king@canonical.com Date: Mon Mar 28 12:33:44 2016 +0100
iwlwifi: pcie: remove duplicate assignment of variable isr_stats
isr_stats is written twice with the same value, remove one of the redundant assignments to isr_stats.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 489c546dcecbddbadcbef25472d8fb4d693850e2 Author: Luca Coelho luciano.coelho@intel.com Date: Thu Mar 24 11:10:12 2016 +0200
iwlwifi: mvm: allow setting the thermal state in D0i3
We were not allowing the thermal state to be set when we were in D0i3 mode. It was not very clearly specified how it should work, but now a decision was made to allow the state to be set in D0i3 (which will cause a brief wake up). Remove the check in the set_cur_state operation.
Signed-off-by: Luca Coelho luciano.coelho@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit d2515a99b2da2bf08d5a1decb7b365e25adbccea Author: Liad Kaufman liad.kaufman@intel.com Date: Wed Mar 23 16:31:08 2016 +0200
iwlwifi: mvm: fix inconsistent lock in dqa mode
When working in DQA mode, there is a lockdep log warning about an inconsistent state of the mvmsta->lock and the mvm->queue_info_lock. Fix this. This mode is not activated for now.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit a6017b9030f280ced61b825757b26f042e0785da Author: Golan Ben-Ami golan.ben.ami@intel.com Date: Mon Mar 14 12:24:20 2016 +0200
iwlwifi: store fw memory segments length and addresses in run-time
Currently reading the fw memory segments is done according to addresses and data length that are hard-coded. Lately a new tlv was appended to the ucode, that contains the data type, length and address. Parse this tlv, and in run-time store the memory segments length and addresses that would be dumped upon a fw error.
Signed-off-by: Golan Ben-Ami golan.ben.ami@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 8d80717a12c138f3d765d91feab0c08190a21d85 Author: Haim Dreyfuss haim.dreyfuss@intel.com Date: Sun Mar 27 12:56:13 2016 +0300
iwlwifi: pcie: Fix index iteration on free_irq in MSIX mode
In MSIX mode we iterate over the allocated interrupt vectors and register them to an handler. In case of registration failure, we free all the allocated irq. we use the outer index mistakenly instead of the inner one.
Signed-off-by: Haim Dreyfuss haim.dreyfuss@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 9d9b21d1b61647d5a37241571c0e3eb7cc04b348 Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Thu Mar 24 08:44:57 2016 +0200
iwlwifi: remove IWL_*_UCODE_API_OK
_UCODE_API_OK was a intermediate version between MIN and MAX. If a user had a firmware below _OK but above _MIN, the driver would work but the user would get a warning in the kernel log telling him to update his firmware. This is not needed since most users won't look for these messages in the kernel log if their wifi is working.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 5e6a98dc4863e50a010ebdf09fa63c1e11929a85 Author: Sara Sharon sara.sharon@intel.com Date: Thu Mar 10 17:40:56 2016 +0200
iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family
Declare and enable support of RX and TX checksum for 9000 family. Configure offload_assist in the TX cmd accordingly to support TX csum.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 728e825f81b1fe29eb177148fcabfa55a7f4c1bb Author: Luca Coelho luciano.coelho@intel.com Date: Fri Mar 11 09:20:37 2016 +0200
iwlwifi: mvm: add a scan timeout for regular scans
If something goes wrong with the firmware and we never get a scan complete notification, we stay stuck forever. In order to avoid this situation, add a timeout and trigger an NMI if it expires before receiving the notification., so we can clean things up.
Signed-off-by: Luca Coelho luciano.coelho@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 097129c9e62540122b63cba79c1843a2602bec37 Author: Liad Kaufman liad.kaufman@intel.com Date: Sun Aug 9 18:28:43 2015 +0300
iwlwifi: mvm: move cmd queue to be #0 in dqa mode
Change the CMD queue to be queue #0 (rather than queue #9) when working in DQA mode.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 0e0e44205c14b557606b498ff0fcad53c7c2430a Author: Liad Kaufman liad.kaufman@intel.com Date: Tue Aug 4 15:13:38 2015 +0300
iwlwifi: mvm: allocate dedicated queue for cab in dqa mode
In DQA mode, allocate a dedicated queue (#3) for content after beacon (AKA "CaB").
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit f02669be45b44ffbb70d2f721f47544629f7a9a4 Author: Liad Kaufman liad.kaufman@intel.com Date: Sun Feb 28 16:15:07 2016 +0200
iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd
Set the correct sta_id in the SCD_QUEUE_CONFIG command sent to the FW when enabling/disabling queues. This is needed in DQA-mode to allow the FW to associate between queue and STA.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit d5216a28936add0a9c34bdc7d4f03c2e0a2261c2 Author: Liad Kaufman liad.kaufman@intel.com Date: Sun Aug 9 15:50:51 2015 +0300
iwlwifi: mvm: use bss client queue for bss station
Use the reserved BSS Client queue when connecting to an AP in DQA mode.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 0e32d5904ccad13a8fb6a5b0519ae43eef0e0a75 Author: Oren Givon oren.givon@intel.com Date: Thu Mar 24 10:20:28 2016 +0200
iwlwifi: edit the 9000 series PCI IDs
Edit some of the 9560 series and 5165 series PCI IDs. These devices do not exist yet.
Signed-off-by: Oren Givon oren.givon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 854d773e4ab5869200004af4ca5d851730849903 Author: Sara Sharon sara.sharon@intel.com Date: Tue Mar 22 15:55:58 2016 +0200
iwlwifi: mvm: improve RSS configuration
Improve current RSS configuration: * Use netdev_rss_key instead of keeping a local copy. * Configure also UDP hashing to have UDP traffic spread across queues. * Do not direct RSS traffic to our fallback queue.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 013a67ea69d7caac094e6d144507246f10f24d9a Author: Sara Sharon sara.sharon@intel.com Date: Tue Mar 22 16:04:53 2016 +0200
iwlwifi: pcie: request one more interrupt vector
We want to request an interrupt vector for RSS queue per CPU, one vector for fallback queue, and one for non-rx interrupts. Future patch will make sure that no RSS traffic is directed to fallback queue. This will enable us to enable fast path on traffic that otherwise would have been received on the fallback queue.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 0df1391feee699a79b36f284fa6e19ab26344d25 Author: Chaya Rachel Ivgi chaya.rachel.ivgi@intel.com Date: Thu Mar 17 13:01:37 2016 +0200
iwlwifi: mvm: remove uneeded D0I3 checking
The driver can read the current state during D0I3, therefore there is no reason not to do it.
Signed-off-by: Chaya Rachel Ivgi chaya.rachel.ivgi@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 2a2e9d100739d79531d1109d7b768b3aaf681c06 Author: Liad Kaufman liad.kaufman@intel.com Date: Thu Mar 17 10:13:57 2016 +0200
iwlwifi: trans: fix iwl_trans_txq_scd_cfg.sta_id sign
For some reason, this was defined as a signed variable. Make it unsigned.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 5db81fd401bd8bba4bcc4a615c60961a792d4df9 Author: David Spinadel david.spinadel@intel.com Date: Sun Mar 20 10:35:10 2016 +0200
iwlwifi: mvm: set aux STA ID in scan config
Auxilary station ID in flag in scan config command wasn't set although we set the station ID. Add the flag.
Signed-off-by: David Spinadel david.spinadel@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit b238be07375e1d3aa976564397109fe9898d6123 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 16 13:57:50 2016 +0200
iwlwifi: mvm: report checksum is done also for IPv6 packets
Currently the code checks if hardware reported both L4 and L3 checksums as valid, and only then reports it as validated to the stack. However, IPv6 does not have checksum at all and the L3 checksum valid bit is always off for IPv6 packets, with the result of the stack re-validating L4 checksum. Fix code to set CHECKSUM_UNNECESSARY also for IPv6 packets whose TCP/UDP checksum was verified.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit b429a773c193ee7cb752144e590181a1b8cc8fb5 Author: Eva Rachel Retuya eraretuya@gmail.com Date: Sat Mar 19 05:15:47 2016 +0000
iwlwifi: dvm: use alloc_ordered_workqueue()
Use alloc_ordered_workqueue() to allocate the workqueue instead of create_singlethread_workqueue() since the latter is deprecated and is scheduled for removal.
There are work items doing related operations that shouldn't be swapped when queued in a certain order hence preserve the strict execution ordering of a single threaded (ST) workqueue by switching to alloc_ordered_workqueue().
WQ_MEM_RECLAIM flag is not needed since the worker is not depended during memory reclaim.
Signed-off-by: Eva Rachel Retuya eraretuya@gmail.com Acked-by: Tejun Heo tj@kernel.org Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 97f95c93c8ed5177371e75275f236513152fa308 Author: Sara Sharon sara.sharon@intel.com Date: Mon Mar 7 16:55:20 2016 +0200
iwlwifi: remove support for fw older than -16.ucode
API version lower than 16 is not supported anymore - don't load older ucode. Remove code handling older versions.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit a0b09f13036cedfd67c9cb4b9d05138e7022723d Author: Ayala Beker ayala.beker@intel.com Date: Wed Feb 3 15:36:52 2016 +0200
iwlwifi: mvm: update GSCAN capabilities
Gscan capabilities were updated with new capabilities supported by the device. Update GSCAN capabilities TLV.
Signed-off-by: Ayala Beker ayala.beker@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 3a171386f9f1bdbe0d9835c4e68dcaadefdc872a Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Mon Mar 14 15:21:06 2016 +0200
iwlwifi: remove IWLWIFI_UAPSD Kconfig
We have a module parameter, this is enough. per platform customizations will be done through the init script of the platform.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 0f851bbc28c3752440b9db334d65511909a4d427 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 16 16:28:42 2016 +0200
iwlwifi: pcie: write to legacy register also in MQ
Due to hardware bug, upon any shadow free-queue register write access, a legacy RBD shadow register must be written as well. This is required in order to trigger a copy of the shadow registers values after MAC exits sleep state. Specifically, the driver has to write (any value) to the legacy RBD register each time FRBDCB is accessed.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 24afba7690e49714795a1e8ee25e617ea0fb566b Author: Liad Kaufman liad.kaufman@intel.com Date: Tue Jul 28 18:56:08 2015 +0300
iwlwifi: mvm: support bss dynamic alloc/dealloc of queues
"DQA" is shorthand for "dynamic queue allocation". This enables on-demand allocation of queues per RA/TID rather than statically allocating per vif, thus allowing a potential benefit of various factors.
Please refer to the DOC section this patch adds to sta.h to see a more in-depth explanation of this feature.
There are many things to take into consideration when working in DQA mode, and this patch is only one in a series. Note that default operation mode is non-DQA mode, unless the FW indicates that it supports DQA mode.
This patch enables support of DQA for a station connected to an AP, and works in a non-aggregated mode.
When a frame for an unused RA/TID arrives at the driver, it isn't TXed immediately, but deferred first until a suitable queue is first allocated for it, and then TXed by a worker that both allocates the queues and TXes deferred traffic.
When a STA is removed, its queues goes back into the queue pools for reuse as needed.
Signed-off-by: Liad Kaufman liad.kaufman@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 7ec54716e71a846dddf6aa1e33a12e1dcca6d276 Author: Johannes Berg johannes.berg@intel.com Date: Wed Mar 16 09:29:48 2016 +0100
iwlwifi: mvm: remove is_data_qos variable in TX
"is_data_qos == true" is equivalent to "tid < IWL_MAX_TID_COUNT" since tid is only assigned (and range-checked) in that case.
This removes a (harmless) smatch warning that occurs because it can't seem to follow the above logic from the code.
Signed-off-by: Johannes Berg johannes.berg@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 2d3d31b562dd060cbc7a163fd824421d0ebeaadf Author: Haim Dreyfuss haim.dreyfuss@intel.com Date: Tue Mar 15 10:51:40 2016 +0200
iwlwifi: 9000: update device id and FW serial number
Update device id and FW serial number for 2X2 antenna devices in 9000 generation product. These will not be available on the market in the coming year.
Signed-off-by: Haim Dreyfuss haim.dreyfuss@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 11dee0b4946bc8b0b4adc804f2110361fed81f08 Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Tue Mar 15 11:04:29 2016 +0200
iwlwifi: make uapsd_disable module param a bitmap
This allows to disable uapsd for BSS only, or P2P client separately. Remove the now unneeded IWL_MVM_P2P_UAPSD_STANDALONE constant.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit a2a57a3548b94222e36a01db893b8f4788501150 Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Tue Mar 15 15:36:36 2016 +0200
iwlwifi: add missing mutex_destroy statements
iwlwifi / iwlmvm didn't destroy their mutexes. Fix that.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit d8fe484470dd72638613c42df3008ec118f24de9 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 9 10:12:45 2016 +0200
iwlwifi: mvm: add support for new TX CMD API
TX CMD API has changed to support offload assist. Currently we do not enable checksum yet, but must set the padding indication, to avoid FW errors. Set other amsdu flag as well. The rest of the flags will be configured only if HW csum is enabled and will be set in future patches. This change is backward compatible.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit c772a3d3fa01048ae7992663e877e0a5f05a6d36 Author: Sara Sharon sara.sharon@intel.com Date: Sun Mar 13 17:19:38 2016 +0200
iwlwifi: pcie: do not pad QoS AMSDU
We insert padding if the MAC header's size is not a multiple of 4 to ensure that the SNAP header is DWORD aligned. When we do so, we let the firmware know by setting a bit in Tx command (TX_CMD_FLG_MH_PAD) which will instruct the firmware to drop those 2 bytes before sending the frame. However, this is not needed for AMSDU as the sub frame header (14B) complements the MAC header (26B) so that the SNAP header is DWORD aligned without adding any pad.
Until 9000, the firmware didn't check the TX_CMD_FLG_MH_PAD bit but rather checked the length of the MAC header itself and assumed the entity that enqueued the frame (driver or internal firmware code) added the pad. Since the driver inserted the pad even for AMSDU this logic applied. Note that the padding is a DMA optimization but it's not strictly needed, so we could pad even if it was not needed.
However, the CSUM hardware introduced for the 9000 devices requires to not pad AMSDU as it is not needed, and will fail if such a pad exists. Due to older FW not checking the padding bit but checking the mac header size itself - we cannot do this adjustments for older generations. Do not align the size if it is an AMSDU and HW checksum is enabled - which will only happen on 9000 devices and on.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 6e2611f324a51dc63a8afa9ced58723e498bbf16 Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Tue Mar 15 11:12:20 2016 +0200
iwlwifi: mvm: modify the max SP to infinite
This makes u-APSD work with more peers.
Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 6ed5e4d64a5020ac7535762bdb1c840baeb5b5ff Author: Emmanuel Grumbach emmanuel.grumbach@intel.com Date: Mon Mar 14 19:53:57 2016 +0200
iwlwifi: pcie: print error value as signed int
Bjorn pointed out that printing an error value as an hexadecimal isn't very convenient. Change that.
Reported-by: Bjorn Helgaas bhelgaas@google.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit ec77a33ee59723613d1e3ed6f02e5f9a1c898ce1 Author: Chaya Rachel Ivgi chaya.rachel.ivgi@intel.com Date: Sun Mar 13 11:39:53 2016 +0200
iwlwifi: mvm: handle async temperature notification with unlocked mutex
Use RX_HANDLER_ASYNC_UNLOCKED instead of unlock and re-lock the mutex independently.
Signed-off-by: Chaya Rachel Ivgi chaya.rachel.ivgi@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 5d93f3a278b387e3a2ec568c1f03d236bfdbef81 Author: Luca Coelho luciano.coelho@intel.com Date: Fri Mar 4 15:25:47 2016 +0200
iwlwifi: pcie: refcounting is not necessary anymore
We don't use the refcount value anymore, all the refcounting is done in the runtime PM usage_count value. Remove it.
Signed-off-by: Luca Coelho luciano.coelho@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 18dcb9a90cd5c49ec23130d64dd7921998068002 Author: Sara Sharon sara.sharon@intel.com Date: Sun Mar 13 21:48:35 2016 +0200
iwlwifi: pcie: enable interrupts explicitly on resume
When entering suspend the driver calls iwl_disable_interrupts() and then iwl_pcie_disable_ict(). On resume the driver calls only iwl_pcie_reset_ict() without calling explicitly to iwl_enable_interrupts(). This mostly works since iwl_pcie_reset_ict is calling to iwl_enable_interrupts, but it doesn't work when there is no ict_table in MSIx mode. The result is that driver tries to resume but fails since it doesn't get the RX interrupt from FW indicating that d0i3 exit was completed. Fix it by adding an explicit call to enable interrupts.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 431469259df6ebc8e022b268bbb2d9bc5562f920 Author: Sara Sharon sara.sharon@intel.com Date: Mon Mar 14 13:11:47 2016 +0200
iwlwifi: pcie: fix global table size
My patch resized the pool size, but neglected to resize the global table, which is obviously wrong since the global table maps the pool's rxb to vid one to one. This results in a panic in 9000 devices. Add a build bug to avoid such a case in the future.
Fixes: 7b5424361ec9 ("iwlwifi: pcie: fine tune number of rxbs") Reported-by: Haim Dreyfuss haim.dreyfuss@intel.com Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit dedfc0f3dba0713734d42efb8300760b27c5a54a Author: Aviya Erenfeld aviya.erenfeld@intel.com Date: Sun Mar 13 15:58:59 2016 +0200
iwlwifi: add a debugfs hook for LQM
Add debugfs entry named lqm_send_cmd for kicking a measurement. This hook takes the duration and the timeout as parameter.
Signed-off-by: Aviya Erenfeld aviya.erenfeld@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 03098268a30d75188f15dd8fda8f0c896d2846e5 Author: Aviya Erenfeld aviya.erenfeld@intel.com Date: Thu Feb 18 14:09:33 2016 +0200
iwlwifi: mvm: add LQM vendor command and notification
LQM stands for Link Quality Measurement. The firmware will collect a defined set of statitics (see the notification for details) that allow to know how busy the medium is. The driver issues a request to the firmware that includes the duration of the measurement (the firmware needs to be on channel for that amount of time) and the timeout (in case the firmware has a lot of offchannel activities). If the timeout elapses, the firmware will send partial results which are still valuable. In case of disassociation / channel switch and alike, the driver is in charge of stopping the measurements and the firmware will reply with partial results.
The user space API for now is debugfs only and will be implmemented in an upcoming patch.
Signed-off-by: Aviya Erenfeld aviya.erenfeld@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 8fef24ca90fb79de8454e26e9f3eae6cc610de1a Author: Liping Zhang liping.zhang@spreadtrum.com Date: Mon Mar 28 22:27:27 2016 +0800
netfilter: ip6t_SYNPROXY: remove magic number for hop_limit
Replace '64' with the per-net ipv6_devconf_all's hop_limit when building the ipv6 header.
Signed-off-by: Liping Zhang liping.zhang@spreadtrum.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 8d45ff22f1b43249f0cf1baafe0262ca10d1666e Author: Stephane Bryant stephane.ml.bryant@gmail.com Date: Sat Mar 26 08:42:12 2016 +0100
netfilter: bridge: nf queue verdict to use NFQA_VLAN and NFQA_L2HDR
This makes nf queues use NFQA_VLAN and NFQA_L2HDR in verdict to modify the original skb
Signed-off-by: Stephane Bryant stephane.ml.bryant@gmail.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 15824ab29f364abd3299ecd17ea48473d971aa79 Author: Stephane Bryant stephane.ml.bryant@gmail.com Date: Sat Mar 26 08:42:11 2016 +0100
netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues to userspace
- This creates 2 netlink attribute NFQA_VLAN and NFQA_L2HDR. - These are filled up for the PF_BRIDGE family on the way to userspace. - NFQA_VLAN is a nested attribute, with the NFQA_VLAN_PROTO and the NFQA_VLAN_TCI carrying the corresponding vlan_proto and vlan_tci fields from the skb using big endian ordering (and using the CFI bit as the VLAN_TAG_PRESENT flag in vlan_tci as in the skb)
Signed-off-by: Stephane Bryant stephane.ml.bryant@gmail.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit ac28634456867b23b95faccba7997a62ec430603 Author: Stephane Bryant stephane.ml.bryant@gmail.com Date: Sat Mar 26 08:42:10 2016 +0100
netfilter: bridge: add nf_afinfo to enable queuing to userspace
This just adds and registers a nf_afinfo for the ethernet bridge, which enables queuing to userspace for the AF_BRIDGE family. No checksum computation is done.
Signed-off-by: Stephane Bryant stephane.ml.bryant@gmail.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit 2da62906b1e298695e1bb725927041cd59942c98 Author: Al Viro viro@zeniv.linux.org.uk Date: Sat Mar 14 21:13:46 2015 -0400
[net] drop 'size' argument of sock_recvmsg()
all callers have it equal to msg_data_left(msg).
Signed-off-by: Al Viro viro@zeniv.linux.org.uk
commit ccd63c20fe834a3f98f46f0447e5f106c4ffa2a4 Author: Weongyo Jeong weongyo.linux@gmail.com Date: Tue Mar 15 10:57:44 2016 -0700
netfilter: nf_conntrack: Uses pr_fmt() for logging.
Uses pr_fmt() macro for debugging messages of nf_conntrack module.
Signed-off-by: Weongyo Jeong weongyo.linux@gmail.com Signed-off-by: Pablo Neira Ayuso pablo@netfilter.org
commit cc61a1bbbc0ebbda3cc155bcbe164f4609fd62f6 Author: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Date: Wed Mar 16 18:13:32 2016 +0530
ath10k: enable debugfs provision to enable Peer Stats feature
Provide a debugfs entry to enable/ disable Peer Stats feature. Peer Stats feature is for developers/users who are more interested in studying in Rx/Tx stats with multiple clients connected, hence disable this by default. Enabling this feature by default results in unneccessary processing of Peer Stats event for every 500ms and updating peer_stats list (allocating memory) and cleaning it up ifexceeds the higher limit and this can be an unnecessary overhead during long run stress testing.
Signed-off-by: Mohammed Shafi Shajakhan mohammed@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 3d9195ea19e4854d7daa11688b01905e244aead9 Author: Raja Mani rmani@qti.qualcomm.com Date: Fri Mar 18 11:44:22 2016 +0200
ath10k: incorporate qca4019 cal data download sequence
qca4019 calibration data is stored in the host memory and it's mandatory to download it even before reading board id and chip id from the target. Also, there is a need to execute otp (download and run) twice, one after cal data download and another one after board data download.
Existing cal data file name 'cal-<bus>-<id>.bin' and device tree entry 'qcom,ath10k-calibration-data' used in ath10k has assumption that it carries other data (like board data) also along with the calibration data. But, qca4019 cal data contains pure calibration data (doesn't include any other info). So, using existing same cal file name and DT entry in qca4019 case would alter the purpose of it. To avoid this, new cal file name 'pre-cal-<bus>-<id>.bin' and new device tree entry name 'qcom,ath10k-pre-calibration-data are introduced.
Overall qca4019's firmware download sequence would look like,
1) Download cal data (either from a file or device tree entry) at the address specified by target in the host interest area member "hi_board_data".
2) Download otp and run with 0x10 (PARAM_GET_EEPROM_BOARD_ID) as a argument.
At this point, otp will take back up of downloaded cal data content in another location in the target and return valid board id and chip id to the host.
3) Download board data at the address specified by target in host interest area member "hi_board_data".
4) Download otp and run with 0x10000 (PARAM_FLASH_SECTION_ALL) as a argument.
Now otp will apply cal data content from it's backup on top of board data download in step 3 and prepare final data base.
5) Download code swap and athwlan binary content.
Above sequences are implemented (step 1 to step 4) in the name of pre calibration configuration.
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 0b8e3c4ca29fe2c0efd3d41a76e34a657b9f17a4 Author: Raja Mani rmani@qti.qualcomm.com Date: Fri Mar 18 11:44:22 2016 +0200
ath10k: move cal data len to hw_params
ath10k_download_cal_dt() compares obtained cal data content length against QCA988X_CAL_DATA_LEN (2116 bytes). It was written by keeping qca988x in mind. In fact, cal data length is more chip specific. To make ath10k_download_cal_dt() more generic and reusable for other chipsets (like qca4019), cal data length is moved to hw_params.
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit f454add47adb4133f297e1b7af07bf07b3983044 Author: Raja Mani rmani@qti.qualcomm.com Date: Fri Mar 18 11:44:21 2016 +0200
ath10k: pass cal data location as an argument to ath10k_download_cal_{file|dt}
Both ath10k_download_cal_file() and ath10k_download_cal_dt() uses hard coded file pointer (ar->cal_file) and device tree entry (qcom,ath10k-calibration-data) respectively to get calibration data content.
There is a need to use those two functions in qca4019 calibration download sequence with different file pointer and device tree entry name. Modify those two functions to take cal data location as an argument. So that it can serve the purpose for other file pointer and device tree entry.
This is just preparation before adding actual qca4019 calibration download sequence. No functional changes.
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit a47aaa69de88913d1640c4bd28c67fad142c61a3 Author: Raja Mani rmani@qti.qualcomm.com Date: Fri Mar 18 11:44:21 2016 +0200
dt: bindings: add new dt entry for pre calibration in qcom, ath10k.txt
There two things done in this patch,
1) Existing device tree entry 'qcom,ath10k-calibration-data' carries not only calibration data, it carries board specific data too. So, make appropriate update in doc.
2) ipq4019 wifi needs new devie tree entry to carry calibration data alone (called pre cal data, it doesn't include any other info). Using 'qcom,ath10k-calibration-data' for ipq4019 would alter the purpose of it. Hence, add new device tree entry called 'qcom,ath10k-pre-calibration-data' to carry only pre calibration data.
Signed-off-by: Raja Mani rmani@qti.qualcomm.com Acked-by: Rob Herring robh@kernel.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 8866c727440d5b059637cb97927e383548099e8c Author: Michal Kazior michal.kazior@tieto.com Date: Thu Mar 17 10:52:08 2016 +0100
ath10k: fix null deref if device crashes early
If device failed to init during early probing (which is quite rare) it triggered driver to compute crc before ar->firmware was ready causing an oops.
Fixes: 3e58044b61a9 ("ath10k: print crc32 checksums for firmware and board files") Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 750eeed89cf3c466df302e4707491b015531e26c Author: Michal Kazior michal.kazior@tieto.com Date: Thu Mar 17 10:51:05 2016 +0100
ath10k: fix pull-push tx threshold handling
This prevents tx hangs or hiccups if pull-push supporting firmware defines per-txq thresholds or switches modes dynamically.
Fixes: 299468782d94 ("ath10k: implement wake_tx_queue") Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 9d71d47eed20f34620e54e29bcc90f959d5873b8 Author: Michal Kazior michal.kazior@tieto.com Date: Thu Mar 17 10:51:04 2016 +0100
ath10k: fix tx hang
The wake_tx_queue/push_pending logic had a bug which could stop queues indefinitely effectivelly breaking traffic.
Fixes: 299468782d94 ("ath10k: implement wake_tx_queue") Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 5b086414293f906d8c5692cbbfa3500458982e5d Author: Golan Ben-Ami golan.ben.ami@intel.com Date: Tue Feb 9 12:57:16 2016 +0200
iwlwifi: mvm: support dumping UMAC internal txfifos
In case of FW error, support dumping the UMAC internal txfifos. To do so, support version 2 of shared memory cfg command, which contains the sizes of the internal txfifos, and move the command to the system group.
Signed-off-by: Golan Ben-Ami golan.ben.ami@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit cd47a3d3c72825b5feeb31c1974b0dc875692481 Author: Matti Gottlieb matti.gottlieb@intel.com Date: Thu Mar 10 16:18:26 2016 +0200
iwlwifi: mvm: make sure FW contains the right amount of paging sections
Paging contains 3 sections in the fw. The first for the paging separator, The second for the CSS block, the third with the paging data.
Currently if the driver finds the paging separator, and there is only section left (CSS), once reading the CSS section, the driver will attempt to read the paging data and will go out of the arrays bounds.
Make sure that the FW image contains the right amount of sections for paging.
Signed-off-by: Matti Gottlieb matti.gottlieb@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit c94d7996db64582770103b178ea4060516d7e646 Author: Matti Gottlieb matti.gottlieb@intel.com Date: Wed Mar 9 10:54:10 2016 +0200
iwlwifi: mvm: Decrease size of the paging download buffer
Currently the driver has 2 buffers for paging: 1. paging db - this contains all of the pages that were in the FW image, that the driver stores for the FW. This is allocated for each block separately (not contiguous). 2. download buffer - we need to provide this empty buffer for the iwl_sdio_load_fw_chunk function to copy the requested pages to the shared memory. This is one big buffer of contiguous memory whose size is the size of all the blocks that the fw paging section can contain.
This download buffer size is too big, and causes the allocation to fail sometimes. Since the driver allocates memory for each block separately, it is not possible for the FW to request all of the pages in one request (the FW gives an address and size, so blocks need to be contiguous for this to happen), therefore the FW is limited to request only one block.
Decrease the size of the paging download buffer to be the size of a paging block.
Signed-off-by: Matti Gottlieb matti.gottlieb@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit 01d11cd12d85e88518eb884891e115cb4bf696a2 Author: Sara Sharon sara.sharon@intel.com Date: Wed Mar 9 17:38:47 2016 +0200
iwlwifi: pcie: clear trans reference on queue stop
Currently when stop flow is performed, there might be transport TX RTPM references that are not freed in case we unmap a queue that still has packets not reclaimed. Fix that.
Signed-off-by: Sara Sharon sara.sharon@intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumbach@intel.com
commit bf031bc4d6a168029b8a640373fd00837746b47d Author: Vasanthakumar Thiagarajan vthiagar@qti.qualcomm.com Date: Tue Mar 15 15:25:53 2016 +0530
ath10k: advertise force AP scan feature
Results obtained from scan can be used for spectrum management by doing something like building information of preferred channel lists and sharing them with stations around. It is to be noted that traffic to the connected stations would be affected during the scan.
Signed-off-by: Vasanthakumar Thiagarajan vthiagar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 9ddc486aa09a3413a6c492fcf160ce61bfccb7b1 Author: Anilkumar Kolli akolli@qti.qualcomm.com Date: Fri Mar 11 11:46:39 2016 +0530
ath10k: fix debugfs pktlog_filter write
It is observed that, we are disabling the packet log if we write same value to the pktlog_filter for the second time. Always enable pktlogs on non zero filter.
Fixes: 90174455ae05 ("ath10k: add support to configure pktlog filter") Cc: stable@vger.kernel.org Signed-off-by: Anilkumar Kolli akolli@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b9c191be3fbdd9d78be11160dd7a3ddb9fdc6d42 Author: Raja Mani rmani@qti.qualcomm.com Date: Thu Mar 10 10:25:07 2016 +0530
ath10k: free cached fw bin contents when get board id fails
ath10k_core_probe_fw() simply returns error without freeing cached firmware file content when get board id operation fails. Free cached fw bin data in failure case to avoid memory leak.
Fixes: db0984e51a18 ("ath10k: select board data based on BMI chip id and board id") Signed-off-by: Raja Mani rmani@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit cac085524cf16434ac1d42427a8644cf532d3e87 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Wed Mar 9 20:25:46 2016 +0530
ath10k: move mgmt descriptor limit handle under mgmt_tx
Frames that are transmitted via MGMT_TX are using reserved descriptor slots in firmware. This limitation is for the htt_mgmt_tx path itself, not for mgmt frames per se. In 16 MBSSID scenario, these reserved slots will be easy exhausted due to frequent probe responses. So for 10.4 based solutions, probe responses are limited by a threshold (24).
management tx path is separate for all except tlv based solutions. Since tlv solutions (qca6174 & qca9377) do not support 16 AP interfaces, it is safe to move management descriptor limitation check under mgmt_tx function. Though CPU improvement is negligible, unlikely conditions or never hit conditions in hot path can be avoided on data transmission.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 2ce9b25cefa64f11bcb21b21cf4a5e8c58c6d0af Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Tue Mar 8 22:57:23 2016 +0530
ath10k: handle channel change htt event
Whenever firmware is configuring operating channel during scan or home channel, channel change event will be indicated to host. In some cases (device probe/ last vdev down), target will be configured to default channel whereas host is unaware of target's operating channel. This leads to packet drop due to unknown channel and kernel log will be filled up with "no channel configured; ignoring frame(s)!". Fix that by handling HTT_T2H_MSG_TYPE_CHAN_CHANGE event.
Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 181c007dedacefaaf634b72b1f52c3b0415f87c1 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Tue Mar 8 11:19:37 2016 +0800
ath9k: fix reg dump data bus error
Changes: - restrict only dump MAC registers - skip the register memory holes
Data bus error, epc == 831d4040, ra == 831d403c Oops[#1]: CPU: 0 PID: 1536 Comm: cat Not tainted 3.14.0 #3 task: 82f87840 ti: 82f88000 task.ti: 82f88000 $ 0 : 00000000 00000001 deadc0de 1000fc03 $ 4 : b8100200 00000200 831e0000 80218788 $ 8 : 00000030 00000003 00000001 09524547 $12 : 00000000 810594f4 00000000 3a206d61 $16 : 831dd3c0 00000081 00000a00 c05ff000 $20 : 00005af6 00000200 00071b39 00071139 $24 : 00000001 80217760 $28 : 82f88000 82f89c60 c05ffa00 831d403c Hi : 00000000 Lo : 453c0000 epc : 831d4040 ath_ahb_exit+0x2198/0x2904 [ath9k] Not tainted ra : 831d403c ath_ahb_exit+0x2194/0x2904 [ath9k] Status: 1000fc03 KERNEL EXL IE Cause : 4080801c PrId : 00019374 (MIPS 24Kc) Stack : 00000001 00000000 0000000e 80475c60 0000000e 800a8ebc 00000000 00000000 00000001 00000007 00000000 800a9678 00000000 00000004 00000002 00000010 00000000 00000000 00000000 00000000 80475c60 0000000e 000009ec c05ff000 831dd3c0 00000080 00000a00 c05ff000 00005af6 00000200 00071b39 0007114d c05ff9ec 800a9904 831dd3c0 82f89d10 00000001 81082194 831d8f0c 82f89d14 ... Call Trace: [<831d4040>] ath_ahb_exit+0x2198/0x2904 [ath9k] [<831d403c>] ath_ahb_exit+0x2194/0x2904 [ath9k]
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c9b260a684d0493238433e08fc2ac7865a89aece Author: Steve deRosier derosier@gmail.com Date: Mon Mar 7 16:58:50 2016 -0800
ath6kl: ignore WMI_TXE_NOTIFY_EVENTID based on fw capability flags
Certain 6004 firmware releases redefine the WMI_TXE_NOTIFY_EVENTID event number and sends the new event frequently. However it doesn't have the tx-err-notify feature and thus this firmware capability flag isn't set on the firmware package. By guarding the processing of this event by the same method we guard the sending of the WMI_SET_TXE_NOTIFY_CMDID command, we can ignore the spurious event that we don't know how to process.
Without this change we call cfg80211_cqm_txe_notify() with possibly bad data.
Signed-off-by: Steve deRosier steve.derosier@lairdtech.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c7212b7136ba69efb9785df68b669381cb893920 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:21 2016 +0800
ath9k: fix BTCoex configuration for SOC chips
Allow to set wl_active_time and wl_qc_time for SOC chips, also adjust bt_time_extend and bt_first_slot_time.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit dfcf02cd2998e2240b2bc7b4f4412578b8070bdb Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:20 2016 +0800
ath9k: fix BTCoex access invalid registers for SOC chips
The registers of AR_GPIO_INPUT_MUX1 and AR_GPIO_PDPU were removed from SOC chips, fix invalid accessing
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 668ae0a3e48ac6811f431915b466514bf167e2f4 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:19 2016 +0800
ath9k: add bits definition of BTCoex MODE2/3 for SOC chips
Add bits definition for AR_BT_COEX_MODE2 and AR_BT_COEX_MODE3, which needed by SOC chips (AR9340, AR9531, AR9550, AR9561).
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c8770bcf5cefa8cbfae21c07c4fe3428f5a9d42a Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:18 2016 +0800
ath9k: Allow platform override BTCoex pin
Add new platform data to allow override BTCoex default pin.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 79d4db1214a0c7b1818aaf64d0606b17ff1acea7 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:17 2016 +0800
ath9k: cleanup led_pin initial
Make ath_init_leds() and ath_deinit_leds() pairs as the only API to set leds, also removed direction configuration from ath9k_start() and ath9k_stop(). So the initial is more clear now.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit db2221901fbded787daed153281ed875de489692 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:16 2016 +0800
ath9k: free GPIO resource for SOC GPIOs
For SOC GPIOs, should call ath9k_hw_gpio_free() to release the GPIO resource.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b2d70d4944c1789bc64376ad97a811f37e230c87 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:15 2016 +0800
ath9k: make GPIO API to support both of WMAC and SOC
commit 61b559dea40e ("ath9k: add extra GPIO led support") added ath9k to support access SOC's GPIOs, but implemented in a separated API: ath9k_hw_request_gpio().
So this patch make the APIs more common, to support both of WMAC and SOC GPIOs. The new APIs as below,
void ath9k_hw_gpio_request_in(); void ath9k_hw_gpio_request_out(); void ath9k_hw_gpio_free();
NOTE, the BSP of the SOC chips(AR9340, AR9531, AR9550, AR9561) should set the corresponding MUX registers correctly.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit a01ab81b09c55025365c1de1345b941a18e05529 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Mon Mar 7 10:38:14 2016 +0800
ath9k: define correct GPIO numbers and bits mask
Define correct GPIO numbers and MASK bits to indicate the WMAC GPIO resource.
Allow SOC chips(AR9340, AR9531, AR9550, AR9561) to access all GPIOs which rely on gpiolib framework. But restrict SOC AR9330 only to access WMAC GPIO which has the same design with the old chips.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c8c91b02a8ddb802259b712245ee97f9c3067a7f Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:07:57 2016 -0500
ath9k_htc: fix up indents with spaces
Use tabs here. Found by smatch.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 1451a3634ff5a443e256eb693627ffb1e34cd337 Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:07:56 2016 -0500
ath9k: fix a misleading indentation
These lines belong inside the if-statement above, not in the main body of the switch.
Found by smatch.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 0eb69ef355c3b77f8ce8f54b61759909ad3abcf8 Author: Bob Copeland me@bobcopeland.com Date: Sun Feb 28 20:07:55 2016 -0500
ath5k: fix incorrect indentation
smatch said:
drivers/net/wireless/ath/ath5k/phy.c:1449 ath5k_hw_channel() warn: inconsistent indenting drivers/net/wireless/ath/ath5k/reset.c:637 ath5k_hw_on_hold() warn: inconsistent indenting drivers/net/wireless/ath/ath5k/reset.c:702 ath5k_hw_nic_wakeup() warn: inconsistent indenting
All of these lines were indented a tabstop too far.
Signed-off-by: Bob Copeland me@bobcopeland.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 1f64252d0b731d55f262a80f8eef914240334d17 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:43 2016 +0800
ath9k: set correct peak detect threshold
Set QCA9561 peak detect threshold to 11.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 9c8ec9951d1e30f1339bcde8d324996412a3586b Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:42 2016 +0800
ath9k: use AR_SREV_9003_PCOEM to identify PCOEM chips
commit f49c90db4d23 ("ath9k: Add a macro to identify PCOEM chips") defined AR_SREV_9003_PCOEM macro, its more clear to use the macro instead of checking one by one. Also removed PCOEM chips checking in the callback of ar9003_hw_do_pcoem_manual_peak_cal() which only for PCOEM chips.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 27ae9cd258a84ce7259afbee38dbe7841e723a68 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:41 2016 +0800
ath9k: enable manual peak cal for all ar9300 chips
HW peak detect calibration would fail, enable all ar9300 chips manual peak calibration instead.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit fcf5dfda6e520813323559eeaa66ea9f31b10736 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:40 2016 +0800
ath9k: Update AR9580 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 628bb7056bfb9156e53e1bcb5486cb15623ee43a Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:39 2016 +0800
ath9k: Update QCA956x initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit f294b096c6cfb89b2d1baac8314a7dc49daab995 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:38 2016 +0800
ath9k: Update AR9565 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 836ff650eb4a1505a65bfc0d22ae51d478415e4f Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:37 2016 +0800
ath9k: Update AR955x initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 93edb3addad8d1648c66b84673a10eb4905a1fb7 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:36 2016 +0800
ath9k: Update AR9485 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 63a0bc0e6f16e1f25eeb2f730de76ef1b072b876 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:35 2016 +0800
ath9k: Update AR9462 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7b5c904ddc777f704d794c1e28942b0f35e7db32 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:34 2016 +0800
ath9k: Update AR9340 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 7da1ddddd55fdf478f712643e145e5d343f4ba46 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:33 2016 +0800
ath9k: Update AR933x initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 137ef139b523a4e5f2582be0f58adbcce9996fe3 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:32 2016 +0800
ath9k: Update AR9003 2.2 initvals
HW peak detect calibration would fail for AR9300 chips and we went for implementing the SW way of doing it instead of HW doing the peak detect calibration.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 33ea008db7569686310268d60232f284ad213982 Author: Miaoqing Pan miaoqing@codeaurora.org Date: Fri Feb 26 16:08:31 2016 +0800
ath9k: Update QCA953x initvals
commit 14c5932805eb ("ath9k: Update QCA953x initvals") disabled HW peak detect calibartion on QCA953x 1.0, which should also be applied on 2.0.
Signed-off-by: Miaoqing Pan miaoqing@codeaurora.org Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 8d130963d38a5677dfd30a2fda83e5cd0b9f4f69 Author: Peter Oh poh@qca.qualcomm.com Date: Tue Mar 1 09:52:49 2016 -0800
ath10k: set MAC timestamp in management Rx frame
Check and set Rx MAC timestamp when firmware indicates it. Firmware adds it in Rx beacon frame only at this moment. Driver and mac80211 may utilize it to detect such clockdrift or beacon collision and use the result for beacon collision avoidance.
Signed-off-by: Peter Oh poh@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 60549cab2ea5ffa100076cb06d49579e05edd966 Author: Grzegorz Bajorski grzegorz.bajorski@tieto.com Date: Mon Nov 30 13:56:59 2015 +0100
ath10k: deliver mgmt frames from htt to monitor vifs only
Until now only WMI originating mgmt frames were reported to mac80211. Management frames on HTT were basically dropped (except frames which looked like management but had FCS error).
To allow sniffing all frames (including offloaded frames) without interfering with mac80211 operation and states a new rx_flag was introduced and is not being used to distinguish frames and classify them for mac80211.
Signed-off-by: Grzegorz Bajorski grzegorz.bajorski@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 1f1a361abf73edfb94ca010c51587de378bc7c68 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:18 2016 +0200
wil6210: add oob_mode module parameter
Add module parameter oob_mode. Takes effect the next time the interface is brought up and FW is loaded. Puts the FW in special "out of the box" (OOB) mode which is used for diagnostics and certification.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b4944f2c081ea0e2fa7bc8bb510e1e6e5667f30b Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:17 2016 +0200
wil6210: pass is_go flag to firmware
When starting a PCP, pass the is_go flag to firmware in wmi_pcp_start. This flag indicates whether we started a PCP which is also a GO(P2P group owner) or just a regular PCP.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 375a173fc1524eb569c7e8f9cf331126a9d29033 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:16 2016 +0200
wil6210: fix no_fw_recovery mode with change_virtual_intf
When FW crashed with no_fw_recovery mode enabled, user space could still call wil_cfg80211_change_iface quickly to change interface type, and this would cause recovery to proceed and FW crash logs may be lost. Fix this problem by not resetting the FW in case no_fw_recovery is enabled.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6777e71ca91ea488488362a919900488e0ade3f2 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:15 2016 +0200
wil6210: clean ioctl debug message
Fix a debug message related to IOCTL that was incorrectly logged with the MISC category, and move it inside wil_ioctl so it will always be logged even if we call wil_ioctl from other places.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 280ab987ef21d1c196acb3af4663a99f94d9da00 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:14 2016 +0200
wil6210: fix race conditions in p2p listen and search
Fix 2 race conditions found during test runs of P2P discovery: 1. Because wil_p2p_cancel_listen was not protected, user space could start a new P2P listen/search before wmi_stop_discovery completed. This caused a crash in the firmware. 2. In P2P listen, when listen timer expires and user space calls cancel_remain_on_channel at the same time, code could send the cfg80211_remain_on_channel_expired notification twice.
Added protections with wil->mutex to several places that call wmi_stop_discovery.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 4332cac17b5c0cb80d8b99fda33a0faad3238b0e Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:13 2016 +0200
wil6210: P2P_DEVICE virtual interface support
Added support for the P2P_DEVICE virtual interface. This interface is intended for P2P management operations such as discovery and GO negotiation. Normally it is implemented by drivers to allow a separate interface for P2P management with its own MAC address, but for 11ad drivers it is needed to support P2P search, since it cannot otherwise be separated from normal scan.
Since we only support a single interface/MAC address, we can't easily separate between primary and P2P_DEVICE interfaces. For example when a management packet arrives we can't tell for which interface it is intended. To work around this, we store a pointer to the interface where the last "radio operation" was triggered such as scan or remain on channel, and we forward management packets and scan results to this interface.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit e6d68341e7286386451adf14cebb635a52b0effe Author: Dedy Lansky qca_dlansky@qca.qualcomm.com Date: Tue Mar 1 19:18:12 2016 +0200
wil6210: p2p initial support
supporting p2p_find, p2p_listen and p2p_connect Use updated cfg80211_get_bss API (additional argument)
Signed-off-by: Dedy Lansky qca_dlansky@qca.qualcomm.com Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 5f0823ef8b76f446ab8b187fabfb4e7560bc33a1 Author: Maya Erez qca_merez@qca.qualcomm.com Date: Tue Mar 1 19:18:11 2016 +0200
wil6210: add support for platform specific notification events
Add the ability to notify the platform driver on different events, such as FW crash, pre reset and FW ready.
Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit eabb03b4a37cc7945ca62453402c74a0622e5a05 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:10 2016 +0200
wil6210: basic PBSS/PCP support
PBSS (Personal Basic Service Set) is a new BSS type for DMG networks. It is similar to infrastructure BSS, having an AP-like entity called PCP (PBSS Control Point), but it has few differences. For example, stations inside a PBSS can communicate directly, and the PCP role can be transferred between stations.
This change adds PBSS support, and has 2 main parts: 1. When starting an AP, add an option to start as a PCP instead. This is implemented by a new PBSS flag which is passed as part of the cfg80211_ap_settings structure. 2. When connecting to a BSS, add an option to connect to a PCP instead of an AP. This is again implemented by a new PBSS flag, added to the cfg80211_connect_params structure.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b874ddecae0a087aee024ef808c63060434a2d50 Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:09 2016 +0200
wil6210: switch to generated wmi.h
Switch to auto-generated version of wmi.h which is maintained by FW team. This will allow better sync between teams in the future and avoid bugs because of unexpected API changes. The wmi.h will have many differences but most are cosmetic. It also includes these real differences: 1. is_go parameter added to BCON_CTRL and START_PCP commands. 2. max_rx_pl_per_desc added to CFG_RX_CHAIN command. 3. various small API updates that are not currently used by driver.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 74997a53d257e327699e359b78b3ecfd33f80cab Author: Lior David qca_liord@qca.qualcomm.com Date: Tue Mar 1 19:18:08 2016 +0200
wil6210: add support for discovery mode during scan
Add support for discovery mode during scan. When discovery mode is active, station transmits special beacons while scanning. This can optimize the scan mainly when there is only one AP/PCP around. Discovery mode is implicitly used by firmware during P2P search. Since there is currently no use case where user space has a reason to directly control discovery mode, we expose it only through a debugfs flag. Also fix name confusion in the wmi_scan_type enumeration. The type previously called WMI_LONG_SCAN is actually WMI_ACTIVE_SCAN.
Signed-off-by: Lior David qca_liord@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 58527421489dcc1110f6bcfd3b50d479199af4e0 Author: Vladimir Kondratiev qca_vkondrat@qca.qualcomm.com Date: Tue Mar 1 19:18:07 2016 +0200
wil6210: replay attack detection
Check PN for encrypted frames. Maintain PN data for Rx keys, pairwise per TID and group. Print PN's in the debugfs "stations" entry, like:
[0] 04:ce:14:0a:3c:3d connected [ 0] ([32] 0 TU) 0x0fe [____________________________|___] total 252 drop 0 (dup 0 + old 0) last 0x000 [ 0] PN [0+]000000000000 [1-]000000000000 [2-]000000000000 [3-]000000000000 [GR] PN [0-]000000000000 [1+]000000000000 [2+]000000000000 [3-]000000000000 Rx invalid frame: non-data 0, short 0, large 0, replay 0 Rx/MCS: 0 110 65 65 65 0 12 0 0 0 0 0 0 [1] 00:00:00:00:00:00 unused [2] 00:00:00:00:00:00 unused [3] 00:00:00:00:00:00 unused [4] 00:00:00:00:00:00 unused [5] 00:00:00:00:00:00 unused [6] 00:00:00:00:00:00 unused [7] 00:00:00:00:00:00 unused
Signed-off-by: Vladimir Kondratiev qca_vkondrat@qca.qualcomm.com Signed-off-by: Hamad Kadmany qca_hkadmany@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit b42f11963f7bd8c54d0a28d679c13d9e83b85357 Author: Hamad Kadmany qca_hkadmany@qca.qualcomm.com Date: Tue Mar 1 19:18:06 2016 +0200
wil6210: Set permanent MAC address to wiphy
MAC address of wil6210 was not set in wiphy
Signed-off-by: Hamad Kadmany qca_hkadmany@qca.qualcomm.com Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 3d287fb398c03189a1394778162f6404e4d44ad2 Author: Maya Erez qca_merez@qca.qualcomm.com Date: Tue Mar 1 19:18:05 2016 +0200
wil6210: AP: prevent connecting to already connected station
wmi_evt_connect doesn't check if the connect event is received for an already connected station. This can lead to memory leak as a new vring is allocated without freeing the previously allocated vring and to unexpected behavior of nl80211 layer due to unexpected notification of a new station.
Add a check in wmi_evt_connect in AP mode to verify that the requested CID is not associated to an already connected station.
Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 361486b27c7e57dab657dbffd1e17818c7911c72 Author: Maya Erez qca_merez@qca.qualcomm.com Date: Tue Mar 1 19:18:04 2016 +0200
wil6210: remove BACK RX and TX workers
WMI synchronous handling has changed and WMI calls that provide a buffer for the reply are completed in the WMI interrupt context. This allows sending the RX and TX BACK commands from the WMI event handler without the need for the worker thread. This is a better approach as it can decrease the handshake time in the connect flow and prevent race conditions in case of fast disconnects. An example for such a race is handling of wil_back_rx_handle during a disconnect event, as wil_back_rx_handle is not protected by the wil mutex and a disconnect can be handled after sta->status is verified as connected.
Signed-off-by: Maya Erez qca_merez@qca.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 8a75fc54745fd3ce9062ab1cc6429a9da9ac2a68 Author: Rajkumar Manoharan rmanohar@qti.qualcomm.com Date: Wed Mar 2 20:13:52 2016 +0530
ath10k: fix firmware assert in monitor mode
commit 166de3f1895d ("ath10k: remove supported chain mask") had revealed an issue on monitor mode. Configuring NSS upon monitor interface creation is causing target assert in all qca9888x and qca6174 firmware. Firmware assert issue can be reproduced by below sequence even after reverting commit 166de3f1895d ("ath10k: remove supported chain mask").
ip link set wlan0 down iw wlan0 set type monitor iw phy0 set antenna 7 ip link set wlan0 up
This issue is originally reported on qca9888 with 10.1 firmware.
Fixes: 5572a95b4b ("ath10k: apply chainmask settings to vdev on creation") Cc: stable@vger.kernel.org Reported-by: Janusz Dziedzic janusz.dziedzic@tieto.com Signed-off-by: Rajkumar Manoharan rmanohar@qti.qualcomm.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 99ad1cba313fc86797bca55d64e7c6c809098511 Author: Michal Kazior michal.kazior@tieto.com Date: Tue Mar 1 13:16:11 2016 +0100
ath10k: change htt tx desc/qcache peer limit config
The number of HTT Tx descriptors and qcache peer limit aren't hw-specific. In fact they are firmware specific and should not be placed in hw_params.
The QCA4019 limits were submitted with the peer flow control firmware only and to my understanding there's no non-peer-flow-ctrl QCA4019 firmware.
However QCA99X0 is planned to run firmware supporting the feature as well. Therefore this patch enables QCA99X0 to use 2500 tx descriptors whenever possible instead of just 1424.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 43c9e3846ba30ca3d657bd82f1005d1573bb3a6d Author: Michal Kazior michal.kazior@tieto.com Date: Tue Mar 1 13:16:10 2016 +0100
ath10k: fix HTT Tx CE ring size
QCA4019 can queue up to 2500 frames at a time. This means it requires roughly 5000 entires on the ring to work properly. Otherwise random tx failure may occur.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 426e10eaf76d7229ed6c2978f0d473d04ba0b377 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:43 2016 +0200
ath10k: implement push-pull tx
The current/old tx path design was that host, at its own leisure, pushed tx frames to the device. For HTT there was ~1000-1400 msdu queue depth.
After reaching that limit the driver would request mac80211 to stop queues. There was little control over what packets got in there as far as DA/RA was considered so it was rather easy to starve per-station traffic flows.
With MU-MIMO this became a significant problem because the queue depth was insufficient to buffer frames from multiple clients (which could have different signal quality and capabilities) in an efficient fashion.
Hence the new tx path in 10.4 was introduced: a pull-push mode.
Firmware and host can share tx queue state via DMA. The state is logically a 2 dimensional array addressed via peer_id+tid pair. Each entry is a counter (either number of bytes or packets. Host keeps it updated and firmware uses it for scheduling Tx pull requests to host.
This allows MU-MIMO to become a lot more effective with 10+ clients.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 3cc0fef6170dce8e7d4ec29afb4f34267fb9bf14 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:41 2016 +0200
ath10k: keep track of queue depth per txq
This will be necessary for later.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit dd4717b6f45e70b609d4282667eb0a89f9660268 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:39 2016 +0200
ath10k: store txq in skb_cb
This will be necessary for later.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit c1a43d9720d8dcde1eb735f6cbdba181e564ec20 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:36 2016 +0200
ath10k: implement updating shared htt txq state
Firmware 10.4.3 onwards can support a pull-push Tx model where it shares a Tx queue state with the host.
The host updates the DMA region it pointed to during HTT setup whenever number of software queued from (on host) changes. Based on this information firmware issues fetch requests to the host telling the host how many frames from a list of given stations/tids should be submitted to the firmware.
The code won't be called because not all appropriate HTT events are processed yet.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 299468782d94331f99a7eeb6e0d56598863be9fe Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:34 2016 +0200
ath10k: implement wake_tx_queue
This implements very basic support for software queueing. It also contains some knobs that will be patched later.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 839ae6371e56594f06ef05a64fc90cd156007232 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:32 2016 +0200
ath10k: add new htt message generation/parsing logic
This merely adds some parsing, generation and sanity checks with placeholders for real code/functionality to be added later.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6942726f7f7bfc3c197795befe84c8e3c57435a0 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:30 2016 +0200
ath10k: add fast peer_map lookup
The pull-push functionality of 10.4 will be based on peer_id and tid. These will need to be mapped, eventually, to ieee80211_txq to be used with ieee80211_tx_dequeue().
Iterating over existing stations every time peer_id needs to be mapped to a station would be inefficient wrt CPU time.
The new firmware, which will be the only user of the code flow-wise, will guarantee to use low peer_ids first so despite peer_map's apparent huge size d-cache thrashing should not be a problem.
Older firmware hot paths will effectively not use peer_map.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit bb8f0c6af83f2217aebbe45540e81d31b754b805 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:27 2016 +0200
ath10k: maintain peer_id for each sta and vif
The 10.4.3 firmware with congestion control guarantees that each peer has only a single peer_id mapping.
The 1:1 mapping isn't the case for older firmwares (e.g. 10.4.1, 10.2, 10.1) but it should not matter. This 1:1 mapping is going to be only used by future code which inherently (flow-wise) is for 10.4.3.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit 6421969f248fdf9d8cd38353a617ed7cc5ddab94 Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:25 2016 +0200
ath10k: refactor tx pending management
Tx pending counter logic assumed that the sk_buff is already known and hence was performed in HTT functions themselves.
However, for the sake of future wake_tx_queue() usage the driver must be able to tell whether it can submit more frames to firmware before it dequeues frame from ieee80211_txq (and thus long before HTT Tx functions are called) because once a frame is dequeued it cannot be requeud back to mac80211.
This prepares the driver for future changes.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit a30c7d009ed56df43f09ab9af11e0bdd3a3f2a3f Author: Michal Kazior michal.kazior@tieto.com Date: Sun Mar 6 16:14:23 2016 +0200
ath10k: unify txpath decision
Some future changes will need to determine final tx method early on. Prepare the code.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
commit f2f6ecabebddcbc54485cf3fca544e985457c0f4 Author: Michal Kazior michal.kazior@tieto.com Date: Tue Mar 1 11:32:46 2016 +0100
ath10k: refactor tx code
This prepares the code for future reuse with ieee80211_txq and wake_tx_queue() in mind.
Signed-off-by: Michal Kazior michal.kazior@tieto.com Signed-off-by: Kalle Valo kvalo@qca.qualcomm.com
-----------------------------------------------------------------------