]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agotipc: convert legacy nl link stat to nl compat
Richard Alpe [Mon, 9 Feb 2015 08:50:06 +0000 (09:50 +0100)]
tipc: convert legacy nl link stat to nl compat

Add functionality for safely appending string data to a TLV without
keeping write count in the caller.

Convert TIPC_CMD_SHOW_LINK_STATS to compat dumpit.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotipc: convert legacy nl bearer enable/disable to nl compat
Richard Alpe [Mon, 9 Feb 2015 08:50:05 +0000 (09:50 +0100)]
tipc: convert legacy nl bearer enable/disable to nl compat

Introduce a framework for transcoding legacy nl action into actions
(.doit) calls from the new nl API. This is done by converting the
incoming TLV data into netlink data with nested netlink attributes.
Unfortunately due to the randomness of the legacy API we can't do this
generically so each legacy netlink command requires a specific
transcoding recipe. In this case for bearer enable and bearer disable.

Convert TIPC_CMD_ENABLE_BEARER and TIPC_CMD_DISABLE_BEARER into doit
compat calls.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotipc: convert legacy nl bearer dump to nl compat
Richard Alpe [Mon, 9 Feb 2015 08:50:04 +0000 (09:50 +0100)]
tipc: convert legacy nl bearer dump to nl compat

Introduce a framework for dumping netlink data from the new netlink
API and formatting it to the old legacy API format. This is done by
looping the dump data and calling a format handler for each entity, in
this case a bearer.

We dump until either all data is dumped or we reach the limited buffer
size of the legacy API. Remember, the legacy API doesn't scale.

In this commit we convert TIPC_CMD_GET_BEARER_NAMES to use the compat
layer.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotipc: move and rename the legacy nl api to "nl compat"
Richard Alpe [Mon, 9 Feb 2015 08:50:03 +0000 (09:50 +0100)]
tipc: move and rename the legacy nl api to "nl compat"

The new netlink API is no longer "v2" but rather the standard API and
the legacy API is now "nl compat". We split them into separate
start/stop and put them in different files in order to further
distinguish them.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'wireless-drivers-next-for-davem-2015-02-07' of git://git.kernel.org/pub...
David S. Miller [Mon, 9 Feb 2015 20:07:20 +0000 (12:07 -0800)]
Merge tag 'wireless-drivers-next-for-davem-2015-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Major changes:

iwlwifi:

* more work for new devices (4165 / 8260)
* cleanups / improvemnts in rate control
* fixes for TDLS
* major statistics work from Johannes - more to come
* improvements for the fw error dump infrastructure
* usual amount of small fixes here and there (scan, D0i3 etc...)
* add support for beamforming
* enable stuck queue detection for iwlmvm
* a few fixes for EBS scan
* fixes for various failure paths
* improvements for TDLS Offchannel

wil6210:

* performance tuning
* some AP features

brcm80211:

* rework some code in SDIO part of the brcmfmac driver related to
  suspend/resume that were found doing stress testing
* in PCIe part scheduling of worker thread needed to be relaxed
* minor fixes and exposing firmware revision information to
  user-space, ie. ethtool.

mwifiex:

* enhancements for change virtual interface handling
* remove coupling between netdev and FW supported interface
  combination, now conversion from any type of supported interface
  types to any other type is possible
* DFS support in AP mode

ath9k:

* fix calibration issues on some boards
* Wake-on-WLAN improvements

ath10k:

* add support for qca6174 hardware
* enable RX batching to reduce CPU load

Conflicts:
drivers/net/wireless/rtlwifi/pci.c

Conflict resolution is to get rid of the 'end' label and keep
the rest.

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet:rfs: adjust table size checking
Eric Dumazet [Mon, 9 Feb 2015 04:39:13 +0000 (20:39 -0800)]
net:rfs: adjust table size checking

Make sure root user does not try something stupid.

Also make sure mask field in struct rps_sock_flow_table
does not share a cache line with the potentially often dirtied
flow table.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 567e4b79731c ("net: rfs: add hash collision detection")
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Fix trace observed while dumping clip_tbl
Hariprasad Shenai [Mon, 9 Feb 2015 04:17:10 +0000 (09:47 +0530)]
cxgb4: Fix trace observed while dumping clip_tbl

Handle clip_tbl debugfs entry, when clip_tbl isn't allocated.
In commit b5a02f503caa0837 ("cxgb4: Update ipv6 address handling api") wrong
argument was passed for single_open for clip_tbl debugfs entry, which led to
below trace. Fixing it.

======
call Trace:
 [<ffffffffa073c606>] clip_tbl_open+0x16/0x30 [cxgb4]
 [<ffffffff8119e2fa>] do_dentry_open+0x21a/0x370
 [<ffffffff8119e499>] vfs_open+0x49/0x50
 [<ffffffff811b0d0e>] do_last+0x21e/0x800
 [<ffffffff811b1382>] path_openat+0x92/0x470
 [<ffffffff8110569f>] ? rb_reserve_next_event+0xaf/0x380
 [<ffffffff8110569f>] ? rb_reserve_next_event+0xaf/0x380
 [<ffffffff811b189a>] do_filp_open+0x4a/0xa0
 [<ffffffff811bdc5d>] ? __alloc_fd+0xcd/0x140
 [<ffffffff8119fa4a>] do_sys_open+0x11a/0x230
 [<ffffffff8101219f>] ? syscall_trace_enter_phase2+0xaf/0x1b0
 [<ffffffff8119fb9e>] SyS_open+0x1e/0x20
 [<ffffffff815bf6f0>] tracesys_phase2+0xd4/0xd9
Code: 89 e5 66 66 66 66 90 48 8b 47 e0 48 8b 40 30 48 8b 40 58 c9 c3 66 0f 1f
84 00 00 00 00 00 55 48 89 e5 66 66 66 66 90 48 8b 47 e0 <48> 8b 40 58 c9 c3 66
66 66 66 2e 0f 1f 84 00 00 00 00 00 55 48
RIP  [<ffffffff8120898d>] PDE_DATA+0xd/0x20
 RSP <ffff8800b08c3c48>
CR2: 0000000000000058

=====

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: using ERR_PTR requires linux/err.h
Stephen Rothwell [Mon, 9 Feb 2015 03:04:03 +0000 (14:04 +1100)]
rhashtable: using ERR_PTR requires linux/err.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoDriver: Vmxnet3: Change the hex constant to its decimal equivalent
Shrikrishna Khare [Fri, 6 Feb 2015 21:48:28 +0000 (13:48 -0800)]
Driver: Vmxnet3: Change the hex constant to its decimal equivalent

The hex constant chosen for VMXNET3_REV1_MAGIC is offensive,
replace it with its decimal equivalent.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Reviewed-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: rfs: add hash collision detection
Eric Dumazet [Fri, 6 Feb 2015 20:59:01 +0000 (12:59 -0800)]
net: rfs: add hash collision detection

Receive Flow Steering is a nice solution but suffers from
hash collisions when a mix of connected and unconnected traffic
is received on the host, when flow hash table is populated.

Also, clearing flow in inet_release() makes RFS not very good
for short lived flows, as many packets can follow close().
(FIN , ACK packets, ...)

This patch extends the information stored into global hash table
to not only include cpu number, but upper part of the hash value.

I use a 32bit value, and dynamically split it in two parts.

For host with less than 64 possible cpus, this gives 6 bits for the
cpu number, and 26 (32-6) bits for the upper part of the hash.

Since hash bucket selection use low order bits of the hash, we have
a full hash match, if /proc/sys/net/core/rps_sock_flow_entries is big
enough.

If the hash found in flow table does not match, we fallback to RPS (if
it is enabled for the rxqueue).

This means that a packet for an non connected flow can avoid the
IPI through a unrelated/victim CPU.

This also means we no longer have to clear the table at socket
close time, and this helps short lived flows performance.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fix a typo in skb_checksum_validate_zero_check
Sabrina Dubroca [Fri, 6 Feb 2015 17:54:19 +0000 (18:54 +0100)]
net: fix a typo in skb_checksum_validate_zero_check

Remove trailing underscore.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agogre/ipip: use be16 variants of netlink functions
Sabrina Dubroca [Fri, 6 Feb 2015 16:22:22 +0000 (17:22 +0100)]
gre/ipip: use be16 variants of netlink functions

encap.sport and encap.dport are __be16, use nla_{get,put}_be16 instead
of nla_{get,put}_u16.

Fixes the sparse warnings:

warning: incorrect type in assignment (different base types)
   expected restricted __be32 [addressable] [usertype] o_key
   got restricted __be16 [addressable] [usertype] i_flags
warning: incorrect type in assignment (different base types)
   expected restricted __be16 [usertype] sport
   got unsigned short
warning: incorrect type in assignment (different base types)
   expected restricted __be16 [usertype] dport
   got unsigned short
warning: incorrect type in argument 3 (different base types)
   expected unsigned short [unsigned] [usertype] value
   got restricted __be16 [usertype] sport
warning: incorrect type in argument 3 (different base types)
   expected unsigned short [unsigned] [usertype] value
   got restricted __be16 [usertype] dport

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotipc: fix bug in socket reception function
Jon Paul Maloy [Sun, 8 Feb 2015 16:10:50 +0000 (11:10 -0500)]
tipc: fix bug in socket reception function

In commit c637c1035534867b85b78b453c38c495b58e2c5a ("tipc: resolve race
problem at unicast message reception") we introduced a time limit
for how long the function tipc_sk_eneque() would be allowed to execute
its loop. Unfortunately, the test for when this limit is passed was put
in the wrong place, resulting in a lost message when the test is true.

We fix this by moving the test to before we dequeue the next buffer
from the input queue.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agort6_probe_deferred: Do not depend on struct ordering
Michael Büsch [Sun, 8 Feb 2015 09:14:07 +0000 (10:14 +0100)]
rt6_probe_deferred: Do not depend on struct ordering

rt6_probe allocates a struct __rt6_probe_work and schedules a work handler rt6_probe_deferred.
But rt6_probe_deferred kfree's the struct work_struct instead of struct __rt6_probe_work.
This works, because struct work_struct is the first element of struct __rt6_probe_work.

Change it to kfree struct __rt6_probe_work to not implicitly depend on
struct work_struct being the first element.

This does not affect the generated code.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'tcp_ack_loops'
David S. Miller [Sun, 8 Feb 2015 09:03:26 +0000 (01:03 -0800)]
Merge branch 'tcp_ack_loops'

Neal Cardwellsays:

====================
tcp: mitigate TCP ACK loops due to out-of-window validation dupacks

This patch series mitigates "ack loop" DoS scenarios by rate-limiting
outgoing duplicate ACKs sent in response to incoming "out of window"
segments.

Background
-----------

There are several cases in which the TCP RFCs specify that a TCP
endpoint should send a pure duplicate ACK in response to a pure
duplicate ACK that appears to be invalid due to being "out of window":

(1) RFC 793 (section 3.9, page 69) specifies that endpoints should
    send a duplicate ACK in response to an ACK when the incoming
    sequence number is invalid due to being outside the receive
    window: "If an incoming segment is not acceptable, an
    acknowledgment should be sent in reply".

(2) RFC 793 (section 3.9, page 72) says: "If the ACK acknowledges
    something not yet sent (SEG.ACK > SND.NXT) then send an ACK".

(3) RFC 1323 (section 4.2.1, page 18) specifies that endpoints should
    send a duplicate ACK in response to an ACK when the PAWS check for
    the incoming timestamp value fails: "If .... SEG.TSval < TS.Recent
    and if TS.Recent is valid ... Send an acknowledgement in reply"

The problem
------------

Normally, this is not a problem. However, a buggy middlebox or
malicious man-in-the-middle can inject a few packets into the
conversation that advance each endpoint's notion of the current window
(sequence, ACK, or timestamp), without either side noticing. In this
case, from then on each side can think the other is sending invalid
segments. Thus an infinite feedback loop of duplicate ACKs can ensue,
as each endpoint receives a duplicate ACK, decides that it is invalid
(due to sequence number, ACK number, or timestamp), and then sends a
dupack in reply, which the other side decides is invalid, responding
with a dupack... ad infinitum. This ping-pong feedback loop can happen
at a very high rate.

This phenomenon can and does happen in practice. It has been seen in
datacenter and Internet contexts at Google, and has been documented by
Anil Agarwal in the Nov 2013 tcpm thread "TCP mismatched sequence
numbers issue", and Avery Fay in the Feb 2015 Linux netdev thread
"Invalid timestamp? causing tight ack loop (hundreds of thousands of
packets / sec)".

This patch series
------------------

This patch series mitigates such ack loops by rate-limiting outgoing
duplicate ACKs sent in response to incoming TCP packets that are for
an existing connection but that are invalid due to any of the reasons
mentioned above: sequence number (1), ACK field (2), or timestamp
value (3). The rate limit for such duplicate ACKs is specified by a
new sysctl, tcp_invalid_ratelimit, which specifies the minimal space
between such outbound duplicate ACKs, in milliseconds. The default is
500 (500ms), and 0 disables the mechanism.

We rate-limit these duplicate ACK responses rather than blocking them
entirely or resetting the connection, because legitimate connections
can rely on dupacks in response to some out-of-window segments. For
example, zero window probes are typically sent with a sequence number
that is below the current window, and ZWPs thus expect to thus elicit
a dupack in response.

Testing: this approach has been in use at Google for a while.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: mitigate ACK loops for connections as tcp_timewait_sock
Neal Cardwell [Fri, 6 Feb 2015 21:04:41 +0000 (16:04 -0500)]
tcp: mitigate ACK loops for connections as tcp_timewait_sock

Ensure that in state FIN_WAIT2 or TIME_WAIT, where the connection is
represented by a tcp_timewait_sock, we rate limit dupacks in response
to incoming packets (a) with TCP timestamps that fail PAWS checks, or
(b) with sequence numbers that are out of the acceptable window.

We do not send a dupack in response to out-of-window packets if it has
been less than sysctl_tcp_invalid_ratelimit (default 500ms) since we
last sent a dupack in response to an out-of-window packet.

Reported-by: Avery Fay <avery@mixpanel.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: mitigate ACK loops for connections as tcp_sock
Neal Cardwell [Fri, 6 Feb 2015 21:04:40 +0000 (16:04 -0500)]
tcp: mitigate ACK loops for connections as tcp_sock

Ensure that in state ESTABLISHED, where the connection is represented
by a tcp_sock, we rate limit dupacks in response to incoming packets
(a) with TCP timestamps that fail PAWS checks, or (b) with sequence
numbers or ACK numbers that are out of the acceptable window.

We do not send a dupack in response to out-of-window packets if it has
been less than sysctl_tcp_invalid_ratelimit (default 500ms) since we
last sent a dupack in response to an out-of-window packet.

There is already a similar (although global) rate-limiting mechanism
for "challenge ACKs". When deciding whether to send a challence ACK,
we first consult the new per-connection rate limit, and then the
global rate limit.

Reported-by: Avery Fay <avery@mixpanel.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: mitigate ACK loops for connections as tcp_request_sock
Neal Cardwell [Fri, 6 Feb 2015 21:04:39 +0000 (16:04 -0500)]
tcp: mitigate ACK loops for connections as tcp_request_sock

In the SYN_RECV state, where the TCP connection is represented by
tcp_request_sock, we now rate-limit SYNACKs in response to a client's
retransmitted SYNs: we do not send a SYNACK in response to client SYN
if it has been less than sysctl_tcp_invalid_ratelimit (default 500ms)
since we last sent a SYNACK in response to a client's retransmitted
SYN.

This allows the vast majority of legitimate client connections to
proceed unimpeded, even for the most aggressive platforms, iOS and
MacOS, which actually retransmit SYNs 1-second intervals for several
times in a row. They use SYN RTO timeouts following the progression:
1,1,1,1,1,2,4,8,16,32.

Reported-by: Avery Fay <avery@mixpanel.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: helpers to mitigate ACK loops by rate-limiting out-of-window dupacks
Neal Cardwell [Fri, 6 Feb 2015 21:04:38 +0000 (16:04 -0500)]
tcp: helpers to mitigate ACK loops by rate-limiting out-of-window dupacks

Helpers for mitigating ACK loops by rate-limiting dupacks sent in
response to incoming out-of-window packets.

This patch includes:

- rate-limiting logic
- sysctl to control how often we allow dupacks to out-of-window packets
- SNMP counter for cases where we rate-limited our dupack sending

The rate-limiting logic in this patch decides to not send dupacks in
response to out-of-window segments if (a) they are SYNs or pure ACKs
and (b) the remote endpoint is sending them faster than the configured
rate limit.

We rate-limit our responses rather than blocking them entirely or
resetting the connection, because legitimate connections can rely on
dupacks in response to some out-of-window segments. For example, zero
window probes are typically sent with a sequence number that is below
the current window, and ZWPs thus expect to thus elicit a dupack in
response.

We allow dupacks in response to TCP segments with data, because these
may be spurious retransmissions for which the remote endpoint wants to
receive DSACKs. This is safe because segments with data can't
realistically be part of ACK loops, which by their nature consist of
each side sending pure/data-less ACKs to each other.

The dupack interval is controlled by a new sysctl knob,
tcp_invalid_ratelimit, given in milliseconds, in case an administrator
needs to dial this upward in the face of a high-rate DoS attack. The
name and units are chosen to be analogous to the existing analogous
knob for ICMP, icmp_ratelimit.

The default value for tcp_invalid_ratelimit is 500ms, which allows at
most one such dupack per 500ms. This is chosen to be 2x faster than
the 1-second minimum RTO interval allowed by RFC 6298 (section 2, rule
2.4). We allow the extra 2x factor because network delay variations
can cause packets sent at 1 second intervals to be compressed and
arrive much closer.

Reported-by: Avery Fay <avery@mixpanel.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoopenvswitch: Initialize unmasked key and uid len
Pravin B Shelar [Fri, 6 Feb 2015 19:17:13 +0000 (11:17 -0800)]
openvswitch: Initialize unmasked key and uid len

Flow alloc needs to initialize unmasked key pointer. Otherwise
it can crash kernel trying to free random unmasked-key pointer.

general protection fault: 0000 [#1] SMP
3.19.0-rc6-net-next+ #457
Hardware name: Supermicro X7DWU/X7DWU, BIOS  1.1 04/30/2008
RIP: 0010:[<ffffffff8111df0e>] [<ffffffff8111df0e>] kfree+0xac/0x196
Call Trace:
 [<ffffffffa060bd87>] flow_free+0x21/0x59 [openvswitch]
 [<ffffffffa060bde0>] ovs_flow_free+0x21/0x23 [openvswitch]
 [<ffffffffa0605b4a>] ovs_packet_cmd_execute+0x2f3/0x35f [openvswitch]
 [<ffffffffa0605995>] ? ovs_packet_cmd_execute+0x13e/0x35f [openvswitch]
 [<ffffffff811fe6fb>] ? nla_parse+0x4f/0xec
 [<ffffffff8139a2fc>] genl_family_rcv_msg+0x26d/0x2c9
 [<ffffffff8107620f>] ? __lock_acquire+0x90e/0x9aa
 [<ffffffff8139a3be>] genl_rcv_msg+0x66/0x89
 [<ffffffff8139a358>] ? genl_family_rcv_msg+0x2c9/0x2c9
 [<ffffffff81399591>] netlink_rcv_skb+0x3e/0x95
 [<ffffffff81399898>] ? genl_rcv+0x18/0x37
 [<ffffffff813998a7>] genl_rcv+0x27/0x37
 [<ffffffff81399033>] netlink_unicast+0x103/0x191
 [<ffffffff81399382>] netlink_sendmsg+0x2c1/0x310
 [<ffffffff811007ad>] ? might_fault+0x50/0xa0
 [<ffffffff8135c773>] do_sock_sendmsg+0x5f/0x7a
 [<ffffffff8135c799>] sock_sendmsg+0xb/0xd
 [<ffffffff8135cacf>] ___sys_sendmsg+0x1a3/0x218
 [<ffffffff8113e54b>] ? get_close_on_exec+0x86/0x86
 [<ffffffff8115a9d0>] ? fsnotify+0x32c/0x348
 [<ffffffff8115a720>] ? fsnotify+0x7c/0x348
 [<ffffffff8113e5f5>] ? __fget+0xaa/0xbf
 [<ffffffff8113e54b>] ? get_close_on_exec+0x86/0x86
 [<ffffffff8135cccd>] __sys_sendmsg+0x3d/0x5e
 [<ffffffff8135cd02>] SyS_sendmsg+0x14/0x16
 [<ffffffff81411852>] system_call_fastpath+0x12/0x17

Fixes: 74ed7ab9264("openvswitch: Add support for unique flow IDs.")
CC: Joe Stringer <joestringer@nicira.com>
Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'cxgb4'
David S. Miller [Sun, 8 Feb 2015 06:53:03 +0000 (22:53 -0800)]
Merge branch 'cxgb4'

Hariprasad Shenai says:

====================
Add support to dump some hw debug info

This patch series adds support to dump sensor info, dump Transport Processor
event trace, dump Upper Layer Protocol RX module command trace, dump mailbox
contents and dump Transport Processor congestion control configuration.

Will send a separate patch series for all the hw stats patches, by moving them
to ethtool.

The patches series is 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.

V2: Dopped all hw stats related patches. Added a new patch which adds support to
dump congestion control table.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Add support in debugfs to dump the congestion control table
Hariprasad Shenai [Fri, 6 Feb 2015 14:02:55 +0000 (19:32 +0530)]
cxgb4: Add support in debugfs to dump the congestion control table

Dump Transport Processor modules congestion control configuration

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Add support to dump mailbox content in debugfs
Hariprasad Shenai [Fri, 6 Feb 2015 14:02:54 +0000 (19:32 +0530)]
cxgb4: Add support to dump mailbox content in debugfs

Adds support to dump the current contents of mailbox and the driver which owns
it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Add support for ULP RX logic analyzer output in debugfs
Hariprasad Shenai [Fri, 6 Feb 2015 14:02:53 +0000 (19:32 +0530)]
cxgb4: Add support for ULP RX logic analyzer output in debugfs

Dump Upper Layer Protocol RX module command trace

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Added support in debugfs to display TP logic analyzer output
Hariprasad Shenai [Fri, 6 Feb 2015 14:02:52 +0000 (19:32 +0530)]
cxgb4: Added support in debugfs to display TP logic analyzer output

Dump Transport Processor event trace.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agocxgb4: Add support in debugfs to display sensor information
Hariprasad Shenai [Fri, 6 Feb 2015 14:02:51 +0000 (19:32 +0530)]
cxgb4: Add support in debugfs to display sensor information

Dump out various chip sensor information. Currently Chip Temperature
and Core Voltage.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'be2net'
David S. Miller [Sun, 8 Feb 2015 06:51:02 +0000 (22:51 -0800)]
Merge branch 'be2net'

Sathya Perla says:

====================
be2net: patch set

Hi Dave, pls consider applying the following patch-set to the
net-next tree. It has 5 code/style cleanup patches and 4 patches that
add functionality to the driver.

Patch 1 moves routines that were not needed to be in be.h to the respective
src files, to avoid unnecessary compilation.

Patch 2 replaces (1 << x) with BIT(x) macro

Patch 3 refactors code that checks if a FW flash file is compatible
with the adapter. The code is now refactored into 2 routines, the first one
gets the file type from the image file and the 2nd routine checks if the
file type is compatible with the adapter.

Patch 4 adds compatibility checks for flashing a FW image on the new
Skyhawk P2 HW revision.

Patch 5 adds support for a new "offset based" flashing scheme, wherein
the driver informs the FW of the offset at which each component in the flash
file is to be flashed at. This helps flashing components that were
previously not recognized by the running FW.

Patch 6 simplifies the be_cmd_rx_filter() routine, by passing to it the
filter flags already used in the FW cmd, instead of the netdev flags that
were converted to the FW-cmd flags.

Patch 7 introduces helper routines in be_set_rx_mode() and be_vid_config()
to improve code readability.

Patch 8 adds processing of port-misconfig async event sent by the FW.

Patch 9 removes unnecessary swapping of a field in the TX desc.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: avoid unncessary swapping of fields in eth_tx_wrb
Sathya Perla [Fri, 6 Feb 2015 13:18:43 +0000 (08:18 -0500)]
be2net: avoid unncessary swapping of fields in eth_tx_wrb

The 32-bit fields of a tx-wrb are little endian. The driver is currently
using be_dws_le_to_cpu() routine to swap (cpu to le) all the fields of
a tx-wrb. So, the rsvd field is also unnecessarily swapped.

This patch fixes this by individually swapping the required fields.
Also, the type of the fields in eth_tx_wrb{} is now changed to __le32
from u32 to avoid sparse warnings.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: process port misconfig async event
Vasundhara Volam [Fri, 6 Feb 2015 13:18:42 +0000 (08:18 -0500)]
be2net: process port misconfig async event

This patch adds support for processing the port misconfigure async
event generated by the FW. This event is generated typically when an
optical module is incorrectly installed or is faulty.

This patch also moves the port_name field to the adapter struct for
logging the event. As the be_cmd_query_port_name() call is now moved
to be_get_config(), it is modified to use the mailbox instead of MCCQ

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: refactor be_set_rx_mode() and be_vid_config() for readability
Sathya Perla [Fri, 6 Feb 2015 13:18:41 +0000 (08:18 -0500)]
be2net: refactor be_set_rx_mode() and be_vid_config() for readability

This patch re-factors the filter setting (uc-list, mc-list, promisc, vlan)
code in be_set_rx_mode() and be_vid_config() to make it more readable
and reduce code duplication.
This patch adds a separate field to track the state/mode of filtering,
along with moving all the filtering related fields to one place in be
be_adapter structure.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: remove duplicate code in be_cmd_rx_filter()
Sathya Perla [Fri, 6 Feb 2015 13:18:40 +0000 (08:18 -0500)]
be2net: remove duplicate code in be_cmd_rx_filter()

This patch passes BE_IF_FLAGS_XXX flags to be_cmd_rx_filter() routine
instead of the IFF_XXX flags. Doing this gets rid of the code to convert
the IFF_XXX flags to the BE_IF_FLAGS_XXX used by the FW cmd. The patch
also removes code for setting if_flags_mask that was duplicated for each
filter mode.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: use offset based FW flashing for Skyhawk chip
Vasundhara Volam [Fri, 6 Feb 2015 13:18:39 +0000 (08:18 -0500)]
be2net: use offset based FW flashing for Skyhawk chip

While sending FW update cmds to the FW, the driver specifies the "type"
of each component that needs to be flashed. The FW then picks the offset
in the flash area at which the componnet is to be flashed. This doesn't work
when new components that the current FW doesn't recognize, need to be
flashed. Recent FWs (10.2 and above) support a scheme of FW-update wherein
the "offset" of the component in the flash area can be specified instead
of the "type". This patch uses the "offset" based FW-update mechanism and
only when it fails, it fallsback to the old "type" based update.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: avoid flashing SH-B0 UFI image on SH-P2 chip
Vasundhara Volam [Fri, 6 Feb 2015 13:18:38 +0000 (08:18 -0500)]
be2net: avoid flashing SH-B0 UFI image on SH-P2 chip

Skyhawk-B0 FW UFI is not compatible to flash on Skyhawk-P2 ASIC.
But, Skyhawk-P2 FW UFI is compatible with both B0 and P2 chips.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: refactor code that checks flash file compatibility
Vasundhara Volam [Fri, 6 Feb 2015 13:18:37 +0000 (08:18 -0500)]
be2net: refactor code that checks flash file compatibility

This patch re-factors the code that checks for flash file compatibility with
the chip type, for better readability, as follows:
- be_get_ufi_type() returns the UFI type from the flash file
- be_check_ufi_compatibility() checks if the UFI type is compatible
  with the adapter/chip that is being flashed

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: replace (1 << x) with BIT(x)
Vasundhara Volam [Fri, 6 Feb 2015 13:18:36 +0000 (08:18 -0500)]
be2net: replace (1 << x) with BIT(x)

BIT(x) is the preffered usage.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobe2net: move un-exported routines from be.h to respective src files
Sathya Perla [Fri, 6 Feb 2015 13:18:35 +0000 (08:18 -0500)]
be2net: move un-exported routines from be.h to respective src files

Routines that are called only inside one src file must remain in that
file itself. Including them in a header file that is used for exporting
routine/struct definitions, causes unnecessary compilation of other
src files, when such a routine is modified.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agobridge: add missing bridge port check for offloads
Roopa Prabhu [Fri, 6 Feb 2015 06:24:45 +0000 (22:24 -0800)]
bridge: add missing bridge port check for offloads

This patch fixes a missing bridge port check caught by smatch.

setlink/dellink of attributes like vlans can come for a bridge device
and there is no need to offload those today. So, this patch adds a bridge
port check. (In these cases however, the BRIDGE_SELF flags will always be set
and we may not hit a problem with the current code).

smatch complaint:

The patch 68e331c785b8: "bridge: offload bridge port attributes to
switch asic if feature flag set" from Jan 29, 2015, leads to the
following Smatch complaint:

net/bridge/br_netlink.c:552 br_setlink()
 error: we previously assumed 'p' could be null (see line 518)

net/bridge/br_netlink.c
   517
   518 if (p && protinfo) {
                    ^
Check for NULL.

Reported-By: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sun, 8 Feb 2015 06:48:50 +0000 (22:48 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-02-05

This series contains updates to fm10k, ixgbe and ixgbevf.

Matthew fixes an issue where fm10k does not properly drop the upper-most four
bits on of the VLAN ID due to type promotion, so resolve the issue by not
masking off the bits, but by throwing an error if the VLAN ID is out-of-bounds.
Then cleans up two cases where variables were not being used, but were
being set, so just remove the unused variables.

Don cleans up sparse errors in the x550 family file for ixgbe.  Fixed up
a redundant setting of the default value for set_rxpba, which was done
twice accidentally.  Cleaned up the probe routine to remove a redundant
attempt to identify the PHY, which could lead to a panic on x550.  Added
support for VXLAN receive checksum offload in x550 hardware.  Added the
Ethertype Anti-spoofing feature for affected devices.

Emil enables ixgbe and ixgbevf to allow multiple queues in SRIOV mode.
Adds RSS support for x550 per VF.  Fixed up a couple of issues introduced
in commit 2b509c0cd292 ("ixgbe: cleanup ixgbe_ndo_set_vf_vlan"), fixed
setting of the VLAN inside ixgbe_enable_port_vlan() and disable the
"hide VLAN" bit in PFQDE when port VLAN is disabled.  Cleaned up the
setting of vlan_features by enabling all features at once.  Fixed the
ordering of the shutdown patch so that we attempt to shutdown the rings
more gracefully.  We shutdown the main Rx filter in the case of Rx and we
set the carrier_off state in the case of Tx so that packets stop being
delivered from outside the driver.  Then we shutdown interrupts and NAPI,
then finally stop the rings from performing DMA and clean them.  Added
code to allow for Tx hang checking to provide more robust debug info in
the event of a transmit unit hang in ixgbevf.  Cleaned up ixgbevf logic
dealing with link up/down by breaking down the link detection and up/down
events into separate functions, similar to how these events are handled
in other drivers.  Combined the ixgbevf reset and watchdog tasks into a
single task so that we can avoid multiple schedules of the reset task when
we have a reset event needed due to either the mailbox going down or
transmit packets being present on a link down.

v2: Fixed up patch #03 of the series to remove the variable type change
    based on feedback from David Laight
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'r8152'
David S. Miller [Sun, 8 Feb 2015 06:46:34 +0000 (22:46 -0800)]
Merge branch 'r8152'

Hayes Wang says:

====================
r8152: adjust the code

V2:
Correct the subject of patch #5. Replace "link feed" with "line feed".

v1:
Code adjustment.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: use BIT macro
hayeswang [Fri, 6 Feb 2015 03:30:51 +0000 (11:30 +0800)]
r8152: use BIT macro

Use BIT macro to replace (1 << bits).

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: replace get_protocol with vlan_get_protocol
hayeswang [Fri, 6 Feb 2015 03:30:50 +0000 (11:30 +0800)]
r8152: replace get_protocol with vlan_get_protocol

vlan_get_protocol() has been defined and use it to replace
get_protocol().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: adjust the line feed for hw_features
hayeswang [Fri, 6 Feb 2015 03:30:49 +0000 (11:30 +0800)]
r8152: adjust the line feed for hw_features

Keep NETIF_F_HW_VLAN_CTAG_RX and NETIF_F_HW_VLAN_CTAG_TX at the
same line.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: check RTL8152_UNPLUG for rtl8152_close
hayeswang [Fri, 6 Feb 2015 03:30:48 +0000 (11:30 +0800)]
r8152: check RTL8152_UNPLUG for rtl8152_close

It is unnecessary to accress the hw register if the device is unplugged.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: check linking status with netif_carrier_ok
hayeswang [Fri, 6 Feb 2015 03:30:47 +0000 (11:30 +0800)]
r8152: check linking status with netif_carrier_ok

Replace (tp->speed & LINK_STATUS) with netif_carrier_ok().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: adjust lpm timer
hayeswang [Fri, 6 Feb 2015 03:30:46 +0000 (11:30 +0800)]
r8152: adjust lpm timer

Set LPM timer to 500us, except for RTL_VER_04 which doesn't link at
USB 3.0.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agor8152: adjust rx_bottom
hayeswang [Fri, 6 Feb 2015 03:30:45 +0000 (11:30 +0800)]
r8152: adjust rx_bottom

If a error occurs when submitting rx, skip the remaining submissions
and try to submit them again next time.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agords: Make rds_message_copy_from_user() return 0 on success.
Sowmini Varadhan [Thu, 5 Feb 2015 22:41:43 +0000 (17:41 -0500)]
rds: Make rds_message_copy_from_user() return 0 on success.

Commit 083735f4b01b ("rds: switch rds_message_copy_from_user() to iov_iter")
breaks rds_message_copy_from_user() semantics on success, and causes it
to return nbytes copied, when it should return 0.  This commit fixes that bug.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: rds: Remove repeated function names from debug output
Rasmus Villemoes [Thu, 5 Feb 2015 22:17:20 +0000 (23:17 +0100)]
net: rds: Remove repeated function names from debug output

The macro rdsdebug is defined as

  pr_debug("%s(): " fmt, __func__ , ##args)

Hence it doesn't make sense to include the name of the calling
function explicitly in the format string passed to rdsdebug.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: openvswitch: Support masked set actions.
Jarno Rajahalme [Thu, 5 Feb 2015 21:40:49 +0000 (13:40 -0800)]
net: openvswitch: Support masked set actions.

OVS userspace already probes the openvswitch kernel module for
OVS_ACTION_ATTR_SET_MASKED support.  This patch adds the kernel module
implementation of masked set actions.

The existing set action sets many fields at once.  When only a subset
of the IP header fields, for example, should be modified, all the IP
fields need to be exact matched so that the other field values can be
copied to the set action.  A masked set action allows modification of
an arbitrary subset of the supported header bits without requiring the
rest to be matched.

Masked set action is now supported for all writeable key types, except
for the tunnel key.  The set tunnel action is an exception as any
input tunnel info is cleared before action processing starts, so there
is no tunnel info to mask.

The kernel module converts all (non-tunnel) set actions to masked set
actions.  This makes action processing more uniform, and results in
less branching and duplicating the action processing code.  When
returning actions to userspace, the fully masked set actions are
converted back to normal set actions.  We use a kernel internal action
code to be able to tell the userspace provided and converted masked
set actions apart.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'dsa-next'
David S. Miller [Sun, 8 Feb 2015 06:38:45 +0000 (22:38 -0800)]
Merge branch 'dsa-next'

Florian Fainelli says:

====================
net: dsa: bcm_sf2: GPHY power down

This patch series implement GPHY power up and down in the SF2 switch
driver in order to conserve power whenever possible (e.g: port is brought
down or unused during Wake-on-LAN).
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: dsa: bcm_sf2: implement GPHY power down
Florian Fainelli [Thu, 5 Feb 2015 19:40:42 +0000 (11:40 -0800)]
net: dsa: bcm_sf2: implement GPHY power down

Implement the power on/off recommended procedure for the Single GPHY we
have on our Starfighter 2 switch. In order to make sure we get proper
LED link/activity signaling during suspend, switch the link indication
from the Switch/MAC to the PHY.

Finally, since the GPHY needs to be reset to be put in low power mode,
we will loose any context applied to it: workarounds, EEE etc.. so we
need to call phy_init_hw() to get our fixups re-applied successfully.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: dsa: bcm_sf2: move GPHY enabling to its own function
Florian Fainelli [Thu, 5 Feb 2015 19:40:41 +0000 (11:40 -0800)]
net: dsa: bcm_sf2: move GPHY enabling to its own function

Move the code that touches the single GPHY register from
bcm_sf2_sw_resume() to a separate function since we will have to
enable/disable the GPHY from different locations, and we want the code
to be self-contained.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'nfc-next-3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
David S. Miller [Sun, 8 Feb 2015 06:22:25 +0000 (22:22 -0800)]
Merge tag 'nfc-next-3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

NFC: 3.20 second pull request

This is the second NFC pull request for 3.20.

It brings:

- NCI NFCEE (NFC Execution Environment, typically an embedded or
  external secure element) discovery and enabling/disabling support.
  In order to communicate with an NFCEE, we also added NCI's logical
  connections support to the NCI stack.

- HCI over NCI protocol support. Some secure elements only understand
  HCI and thus we need to send them HCI frames when they're part of
  an NCI chipset.

- NFC_EVT_TRANSACTION userspace API addition. Whenever an application
  running on a secure element needs to notify its host counterpart,
  we send an NFC_EVENT_SE_TRANSACTION event to userspace through the
  NFC netlink socket.

- Secure element and HCI transaction event support for the st21nfcb
  chipset.

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Fix remove logic to avoid cross references between buckets
Thomas Graf [Fri, 6 Feb 2015 16:08:43 +0000 (16:08 +0000)]
rhashtable: Fix remove logic to avoid cross references between buckets

The remove logic properly searched the remaining chain for a matching
entry with an identical hash but it did this while searching from both
the old and new table. Instead in order to not leave stale references
behind we need to:

 1. When growing and searching from the new table:
    Search remaining chain for entry with same hash to avoid having
    the new table directly point to a entry with a different hash.

 2. When shrinking and searching from the old table:
    Check if the element after the removed would create a cross
    reference and avoid it if so.

These bugs were present from the beginning in nft_hash.

Also, both insert functions calculated the hash based on the mask of
the new table. This worked while growing. Wwhile shrinking, the mask
of the inew table is smaller than the mask of the old table. This lead
to a bit not being taken into account when selecting the bucket lock
and thus caused the wrong bucket to be locked eventually.

Fixes: 7e1e77636e36 ("lib: Resizable, Scalable, Concurrent Hash Table")
Fixes: 97defe1ecf86 ("rhashtable: Per bucket locks & deferred expansion/shrinking")
Reported-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'rhashtable-next'
David S. Miller [Fri, 6 Feb 2015 23:18:39 +0000 (15:18 -0800)]
Merge branch 'rhashtable-next'

Thomas Graf says:

====================
rhashtable fixes

This series fixes all remaining known issues with rhashtable that
have been reported. In particular the race condition reported by
Ying Xue.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Avoid bucket cross reference after removal
Thomas Graf [Thu, 5 Feb 2015 01:03:36 +0000 (02:03 +0100)]
rhashtable: Avoid bucket cross reference after removal

During a resize, when two buckets in the larger table map to
a single bucket in the smaller table and the new table has already
been (partially) linked to the old table. Removal of an element
may result the bucket in the larger table to point to entries
which all hash to a different value than the bucket index. Thus
causing two buckets to point to the same sub chain after unzipping.
This is not illegal *during* the resize phase but after it has
completed.

Keep the old table around until all of the unzipping is done to
allow the removal code to only search for matching hashed entries
during this special period.

Reported-by: Ying Xue <ying.xue@windriver.com>
Fixes: 97defe1ecf86 ("rhashtable: Per bucket locks & deferred expansion/shrinking")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Add more lock verification
Thomas Graf [Thu, 5 Feb 2015 01:03:35 +0000 (02:03 +0100)]
rhashtable: Add more lock verification

Catch hash miscalculations which result in hard to track down race
conditions.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Dump bucket tables on locking violation under PROVE_LOCKING
Thomas Graf [Thu, 5 Feb 2015 01:03:34 +0000 (02:03 +0100)]
rhashtable: Dump bucket tables on locking violation under PROVE_LOCKING

This simplifies debugging of locking violations if compiled with
CONFIG_PROVE_LOCKING.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Wait for RCU readers after final unzip work
Thomas Graf [Thu, 5 Feb 2015 01:03:33 +0000 (02:03 +0100)]
rhashtable: Wait for RCU readers after final unzip work

We need to wait for all RCU readers to complete after the last bit of
unzipping has been completed. Otherwise the old table is freed up
prematurely.

Fixes: 7e1e77636e36 ("lib: Resizable, Scalable, Concurrent Hash Table")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: Use a single bucket lock for sibling buckets
Thomas Graf [Thu, 5 Feb 2015 01:03:32 +0000 (02:03 +0100)]
rhashtable: Use a single bucket lock for sibling buckets

rhashtable currently allows to use a bucket lock per bucket. This
requires multiple levels of complicated nested locking because when
resizing, a single bucket of the smaller table will map to two
buckets in the larger table. So far rhashtable has explicitly locked
both buckets in the larger table.

By excluding the highest bit of the hash from the bucket lock map and
thus only allowing locks to buckets in a ratio of 1:2, the locking
can be simplified a lot without losing the benefits of multiple locks.
Larger tables which benefit from multiple locks will not have a single
lock per bucket anyway.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorhashtable: key_hashfn() must return full hash value
Thomas Graf [Thu, 5 Feb 2015 01:03:31 +0000 (02:03 +0100)]
rhashtable: key_hashfn() must return full hash value

The value computed by key_hashfn() is used by rhashtable_lookup_compare()
to traverse both tables during a resize. key_hashfn() must therefore
return the hash value without the buckets mask applied so it can be
masked to the size of each individual table.

Fixes: 97defe1ecf86 ("rhashtable: Per bucket locks & deferred expansion/shrinking")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge ath-next from ath.git
Kalle Valo [Fri, 6 Feb 2015 14:14:11 +0000 (16:14 +0200)]
Merge ath-next from ath.git

Major changes in ath10k:

* add support for qca6174 hardware
* enable RX batching to reduce CPU load

9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-02-03' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Fri, 6 Feb 2015 06:57:37 +0000 (08:57 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-02-03' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* Add support for beamforming
* Enable stuck queue detection for iwlmvm
* A few fixes for EBS scan
* Fixes for various failure paths
* Improvements for TDLS Offchannel

9 years agobrcm80211: Delete unnecessary checks before two function calls
Markus Elfring [Wed, 4 Feb 2015 19:28:49 +0000 (20:28 +0100)]
brcm80211: Delete unnecessary checks before two function calls

The functions brcmu_pkt_buf_free_skb() and usb_free_urb() test whether
their argument is NULL and then return immediately. Thus the test around
the call is not needed.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agohostap: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Wed, 4 Feb 2015 19:06:39 +0000 (20:06 +0100)]
hostap: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Wed, 4 Feb 2015 18:53:11 +0000 (19:53 +0100)]
orinoco: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Delete an unnecessary check before the function call "relay_close"
Markus Elfring [Wed, 4 Feb 2015 17:48:28 +0000 (18:48 +0100)]
ath9k: Delete an unnecessary check before the function call "relay_close"

The relay_close() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: Less function calls in cw1200_load_firmware_cw1200() after error detection
Markus Elfring [Wed, 4 Feb 2015 16:28:41 +0000 (17:28 +0100)]
cw1200: Less function calls in cw1200_load_firmware_cw1200() after error detection

The functions kfree() and release_firmware() were called in a few cases
by the cw1200_load_firmware_cw1200() function during error handling even if
the passed variables contained still a null pointer.

Corresponding implementation details could be improved by adjustments for
jump targets.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: Delete an unnecessary check before the function call "release_firmware"
Markus Elfring [Wed, 4 Feb 2015 15:32:15 +0000 (16:32 +0100)]
cw1200: Delete an unnecessary check before the function call "release_firmware"

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_tmd use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:41 +0000 (03:07 -0500)]
orinoco: orinoco_tmd use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_pci use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:40 +0000 (03:07 -0500)]
orinoco: orinoco_pci use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_plx use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:39 +0000 (03:07 -0500)]
orinoco: orinoco_plx use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 07:39:49 +0000 (02:39 -0500)]
cw1200: use msecs_to_jiffies for conversion

This is only an API consolidation to make things more readable.
Instances of  HZ / CONST  are replaced by appropriate msecs_to_jiffies().

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath5k: fix spontaneus AR5312 freezes
Sergey Ryazanov [Tue, 3 Feb 2015 21:21:13 +0000 (00:21 +0300)]
ath5k: fix spontaneus AR5312 freezes

Sometimes while CPU have some load and ath5k doing the wireless
interface reset the whole WiSoC completely freezes. Set of tests shows
that using atomic delay function while we wait interface reset helps to
avoid such freezes.

The easiest way to reproduce this issue: create a station interface,
start continous scan with wpa_supplicant and load CPU by something. Or
just create multiple station interfaces and put them all in continous
scan.

This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use
usleep_range where possible"), which replaces initial udelay()
by usleep_range().

I do not know actual source of this issue, but all looks like that HW
freeze is caused by transaction on internal SoC bus, while wireless
block is in reset state.

Also I should note that I do not know how many chips are affected, but I
did not see this issue with chips, other than AR5312.

CC: Jiri Slaby <jirislaby@gmail.com>
CC: Nick Kossifidis <mickflemm@gmail.com>
CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible")
Reported-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Eric Bree <ebree@nltinc.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Choose correct rate for 2GHz channel
Sujith Manoharan [Mon, 2 Feb 2015 12:51:13 +0000 (18:21 +0530)]
ath9k: Choose correct rate for 2GHz channel

Set the transmit rate for the keep-alive frames
as 1M/CCK when the current channel is in the
2GHz band.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Clear TSF2 properly
Sujith Manoharan [Mon, 2 Feb 2015 12:51:12 +0000 (18:21 +0530)]
ath9k: Clear TSF2 properly

Chips in the AR9003 family have a second TSF, which
needs to be cleared when putting the card to
sleep.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Program AR_WA correctly
Sujith Manoharan [Mon, 2 Feb 2015 12:51:11 +0000 (18:21 +0530)]
ath9k: Program AR_WA correctly

Setting the required configuration in the PCIE
WorkAround register needs to be done after all the
WoW parameters have been set.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix issues with WoW enable
Sujith Manoharan [Mon, 2 Feb 2015 12:51:10 +0000 (18:21 +0530)]
ath9k: Fix issues with WoW enable

This patch addresses several issues with the
ath9k_hw_wow_enable() routine:

* The usage of set/clr variables is removed. Writing
  the required values to registers is cleaner.

* The shift value of 28 for the contention window field
  in AR_WOW_PATTERN is incorrect, change it to 27.

* Disabling Keep Alive needs to be done based on the
  LINK_CHANGE option. This is done unconditionally now,
  fix this.

* The workaround for the D1/D3 issue is required only
  for AR9462.

* The bitfield for enabling pattern matching for packets
  less than 256 bytes has expanded for new chips, handle
  this accordingly.

* General cleanup.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Register correct WOW details with mac80211
Sujith Manoharan [Mon, 2 Feb 2015 12:51:09 +0000 (18:21 +0530)]
ath9k: Register correct WOW details with mac80211

Since the number of user patterns is higher for
newer chips, make sure that this is registered
during initialization.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add support for more WOW patterns
Sujith Manoharan [Mon, 2 Feb 2015 12:51:08 +0000 (18:21 +0530)]
ath9k: Add support for more WOW patterns

Newer chips like WB222, WB335 support more than
8 user-configurable patterns. This patch adds
support for it by setting up the correct HW
registers.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix problems with calculating free space in FIFO
Larry Finger [Tue, 3 Feb 2015 17:15:18 +0000 (11:15 -0600)]
rtlwifi: rtl8192ee: Fix problems with calculating free space in FIFO

This driver utilizes a FIFO buffer for RX descriptors. There are four places
in the code where it calculates the number of free slots. Several of those
locations do the calculation incorrectly. To fix these and to prevent future
mistakes, a common inline routine is created.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix handling of new style descriptors
Troy Tan [Tue, 3 Feb 2015 17:15:17 +0000 (11:15 -0600)]
rtlwifi: rtl8192ee: Fix handling of new style descriptors

The hardware and firmware for the RTL8192EE utilize a FIFO list of
descriptors. There were some problems with the initial implementation.
The worst of these failed to detect that the FIFO was becoming full,
which led to the device needing to be power cycled. As this condition
is not relevant to most of the devices supported by rtlwifi, a callback
routine was added to detect this situation. This patch implements the
necessary changes in the pci handler, and the linkage into the appropriate
rtl8192ee routine.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoixgbe: add Tx anti spoofing support
Don Skidmore [Wed, 28 Jan 2015 07:03:38 +0000 (07:03 +0000)]
ixgbe: add Tx anti spoofing support

This patch enables the ethertype Anti-Spoofing feature for affected
devices. It is configured such that LLDP packets sent by a VF will
be dropped.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbevf: combine all of the tasks into a single service task
Emil Tantilov [Wed, 28 Jan 2015 03:21:34 +0000 (03:21 +0000)]
ixgbevf: combine all of the tasks into a single service task

This change combines the reset and watchdog tasklets into a single task.

The advantage of this is that we can avoid multiple schedules of the reset
task when we have a reset event needed due to either the mailbox going down
or transmit packets being present on a link down.

CC: Alexander Duyck <alexander.h.duyck@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>
9 years agoixgbevf: rewrite watchdog task to function similar to igbvf
Emil Tantilov [Wed, 28 Jan 2015 03:21:29 +0000 (03:21 +0000)]
ixgbevf: rewrite watchdog task to function similar to igbvf

This patch cleans up the logic dealing with link down/up by breaking down the
link detection and up/down events into separate functions - similar to how these
events are handled in other drivers.

CC: Alexander Duyck <alexander.h.duyck@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>
9 years agoixgbevf: Add code to check for Tx hang
Emil Tantilov [Wed, 28 Jan 2015 03:21:24 +0000 (03:21 +0000)]
ixgbevf: Add code to check for Tx hang

This patch adds code to allow for Tx hang checking.  The idea is to provide
more robust debug info in the event of a transmit unit hang. Similar to the
logic in ixgbe.

CC: Alexander Duyck <alexander.h.duyck@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>
9 years agoixgbevf: Fix ordering of shutdown to correctly disable Rx and Tx
Emil Tantilov [Wed, 28 Jan 2015 03:21:18 +0000 (03:21 +0000)]
ixgbevf: Fix ordering of shutdown to correctly disable Rx and Tx

This patch updates the ordering of the shutdown path so that we attempt to
shutdown the rings more gracefully. Basically the big changes are that we
shutdown the main Rx filter in the case of Rx and we set the carrier_off
state in the case of Tx so that packets stop being delivered from outside
the driver.  Then we shut down interrupts and NAPI.  Finally we stop the
rings from performing DMA and clean them.  This is a bit more graceful than
the previous path.

CC: Alexander Duyck <alexander.h.duyck@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>
9 years agoixgbevf: set vlan_features in a single write instead of several ORs
Emil Tantilov [Wed, 28 Jan 2015 03:21:13 +0000 (03:21 +0000)]
ixgbevf: set vlan_features in a single write instead of several ORs

Clean up the setting of vlan_features by enabling all features at once.

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>
9 years agoixgbe: add VXLAN offload support for X550 devices
Don Skidmore [Tue, 23 Dec 2014 07:40:34 +0000 (07:40 +0000)]
ixgbe: add VXLAN offload support for X550 devices

Add support VXLAN receive checksum offload in X550 hardware.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: Cleanup probe to remove redundant attempt to ID PHY
Don Skidmore [Fri, 12 Dec 2014 05:37:30 +0000 (05:37 +0000)]
ixgbe: Cleanup probe to remove redundant attempt to ID PHY

We always identify the PHY in our reset_hw path anyway so there is
no need to do it in get_invariants().  The reason I even noticed this
is that for new hardware (X550em) we don't assign some methods until
later in probe and calling phy.ops.read_reg could lead to a panic.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: cleanup redundant default method set_rxpba
Don Skidmore [Wed, 10 Dec 2014 07:26:14 +0000 (07:26 +0000)]
ixgbe: cleanup redundant default method set_rxpba

My original patch 6a14ee0cfb19 "ixgbe: Add X550 support function pointers"
accidental set a default value for this structure member twice.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: fix setting port VLAN
Emil Tantilov [Wed, 10 Dec 2014 05:28:51 +0000 (05:28 +0000)]
ixgbe: fix setting port VLAN

This patch fixes couple of issues introduced by
commit 2b509c0cd292 ("ixgbe: cleanup ixgbe_ndo_set_vf_vlan")

- fix setting of the VLAN inside ixgbe_enable_port_vlan()
- disable the "hide VLAN" bit in PFQDE when port VLAN is disabled

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbevf: add RSS support for X550
Emil Tantilov [Sat, 6 Dec 2014 09:19:09 +0000 (09:19 +0000)]
ixgbevf: add RSS support for X550

X550 provides RSS registers for configuring RSS per VF.

This patch introduces ixgbevf_setup_vfmrqc() which uses the VFRETA,
VFRSSRK and VFMRQC registers to configure RSS on X550.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbevf: enable multiple queue support
Emil Tantilov [Sat, 6 Dec 2014 09:19:02 +0000 (09:19 +0000)]
ixgbevf: enable multiple queue support

This patch enables multiple queues and RSS support for the VF.
Maximum of 2 queues are supported due to available vectors.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: allow multiple queues in SRIOV mode
Emil Tantilov [Sat, 6 Dec 2014 09:18:57 +0000 (09:18 +0000)]
ixgbe: allow multiple queues in SRIOV mode

ixgbe_set_sriov_queues() has the logic to allow multiple queues, this patch
just removes the limitation.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agoixgbe: cleanup sparse errors in new ixgbe_x550.c file
Don Skidmore [Sat, 6 Dec 2014 05:59:21 +0000 (05:59 +0000)]
ixgbe: cleanup sparse errors in new ixgbe_x550.c file

This patch cleans up prototypes that should have been defined
as static.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: Resolve compile warnings with W=1
Matthew Vick [Tue, 27 Jan 2015 03:39:25 +0000 (03:39 +0000)]
fm10k: Resolve compile warnings with W=1

Fix two cases where variables are being set but not used.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh<Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agofm10k: Validate VLAN ID in fm10k_update_xc_addr_pf
Matthew Vick [Tue, 27 Jan 2015 02:33:26 +0000 (02:33 +0000)]
fm10k: Validate VLAN ID in fm10k_update_xc_addr_pf

Currently, fm10k_update_xc_addr_pf has an issue where it does not
properly drop the upper-most four bits of the VLAN ID due to type
promotion. Resolve the issue not by masking off the bits, but by
throwing an error if the VLAN ID is out-of-bounds.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
9 years agovxge: fix sparse warning
Lad, Prabhakar [Thu, 5 Feb 2015 13:56:09 +0000 (13:56 +0000)]
vxge: fix sparse warning

this patch fixes following sparse warning:

vxge-config.c:4640:30: warning: Using plain integer as NULL pointer

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoxen-netback: fix sparse warning
Lad, Prabhakar [Thu, 5 Feb 2015 13:38:07 +0000 (13:38 +0000)]
xen-netback: fix sparse warning

this patch fixes following sparse warning:

interface.c:83:5: warning: symbol 'xenvif_poll' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>