Fan Du [Fri, 3 Jan 2014 03:18:28 +0000 (11:18 +0800)]
{pktgen, xfrm} Add statistics counting when transforming
so /proc/net/xfrm_stat could give user clue about what's
wrong in this process.
Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Fan Du [Fri, 3 Jan 2014 03:18:27 +0000 (11:18 +0800)]
{pktgen, xfrm} Correct xfrm state lock usage when transforming
xfrm_state lock protects its state, i.e., VALID/DEAD and statistics,
not the transforming procedure, as both mode/type output functions
are reentrant.
Another issue is state lock can be used in BH context when state timer
alarmed, after transformation in pktgen, update state statistics acquiring
state lock should disabled BH context for a moment. Otherwise LOCKDEP
critisize this:
[ 62.354339] pktgen: Packet Generator for packet performance testing. Version: 2.74
[ 62.655444]
[ 62.655448] =================================
[ 62.655451] [ INFO: inconsistent lock state ]
[ 62.655455] 3.13.0-rc2+ #70 Not tainted
[ 62.655457] ---------------------------------
[ 62.655459] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
[ 62.655463] kpktgend_0/2764 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 62.655466] (&(&x->lock)->rlock){+.?...}, at: [<
ffffffffa00886f6>] pktgen_thread_worker+0x1796/0x1860 [pktgen]
[ 62.655479] {IN-SOFTIRQ-W} state was registered at:
[ 62.655484] [<
ffffffff8109a61d>] __lock_acquire+0x62d/0x1d70
[ 62.655492] [<
ffffffff8109c3c7>] lock_acquire+0x97/0x130
[ 62.655498] [<
ffffffff81774af6>] _raw_spin_lock+0x36/0x70
[ 62.655505] [<
ffffffff816dc3a3>] xfrm_timer_handler+0x43/0x290
[ 62.655511] [<
ffffffff81059437>] __tasklet_hrtimer_trampoline+0x17/0x40
[ 62.655519] [<
ffffffff8105a1b7>] tasklet_hi_action+0xd7/0xf0
[ 62.655523] [<
ffffffff81059ac6>] __do_softirq+0xe6/0x2d0
[ 62.655526] [<
ffffffff8105a026>] irq_exit+0x96/0xc0
[ 62.655530] [<
ffffffff8177fd0a>] smp_apic_timer_interrupt+0x4a/0x60
[ 62.655537] [<
ffffffff8177e96f>] apic_timer_interrupt+0x6f/0x80
[ 62.655541] [<
ffffffff8100b7c6>] arch_cpu_idle+0x26/0x30
[ 62.655547] [<
ffffffff810ace28>] cpu_startup_entry+0x88/0x2b0
[ 62.655552] [<
ffffffff81761c3c>] rest_init+0xbc/0xd0
[ 62.655557] [<
ffffffff81ea5e5e>] start_kernel+0x3c4/0x3d1
[ 62.655583] [<
ffffffff81ea55a8>] x86_64_start_reservations+0x2a/0x2c
[ 62.655588] [<
ffffffff81ea569f>] x86_64_start_kernel+0xf5/0xfc
[ 62.655592] irq event stamp: 77
[ 62.655594] hardirqs last enabled at (77): [<
ffffffff810ab7f2>] vprintk_emit+0x1b2/0x520
[ 62.655597] hardirqs last disabled at (76): [<
ffffffff810ab684>] vprintk_emit+0x44/0x520
[ 62.655601] softirqs last enabled at (22): [<
ffffffff81059b57>] __do_softirq+0x177/0x2d0
[ 62.655605] softirqs last disabled at (15): [<
ffffffff8105a026>] irq_exit+0x96/0xc0
[ 62.655609]
[ 62.655609] other info that might help us debug this:
[ 62.655613] Possible unsafe locking scenario:
[ 62.655613]
[ 62.655616] CPU0
[ 62.655617] ----
[ 62.655618] lock(&(&x->lock)->rlock);
[ 62.655622] <Interrupt>
[ 62.655623] lock(&(&x->lock)->rlock);
[ 62.655626]
[ 62.655626] *** DEADLOCK ***
[ 62.655626]
[ 62.655629] no locks held by kpktgend_0/2764.
[ 62.655631]
[ 62.655631] stack backtrace:
[ 62.655636] CPU: 0 PID: 2764 Comm: kpktgend_0 Not tainted 3.13.0-rc2+ #70
[ 62.655638] Hardware name: innotek GmbH VirtualBox, BIOS VirtualBox 12/01/2006
[ 62.655642]
ffffffff8216b7b0 ffff88001be43ab8 ffffffff8176af37 0000000000000007
[ 62.655652]
ffff88001c8d4fc0 ffff88001be43b18 ffffffff81766d78 0000000000000000
[ 62.655663]
ffff880000000001 ffff880000000001 ffffffff8101025f ffff88001be43b18
[ 62.655671] Call Trace:
[ 62.655680] [<
ffffffff8176af37>] dump_stack+0x46/0x58
[ 62.655685] [<
ffffffff81766d78>] print_usage_bug+0x1f1/0x202
[ 62.655691] [<
ffffffff8101025f>] ? save_stack_trace+0x2f/0x50
[ 62.655696] [<
ffffffff81099f8c>] mark_lock+0x28c/0x2f0
[ 62.655700] [<
ffffffff810994b0>] ? check_usage_forwards+0x150/0x150
[ 62.655704] [<
ffffffff8109a67a>] __lock_acquire+0x68a/0x1d70
[ 62.655712] [<
ffffffff81115b09>] ? irq_work_queue+0x69/0xb0
[ 62.655717] [<
ffffffff810ab7f2>] ? vprintk_emit+0x1b2/0x520
[ 62.655722] [<
ffffffff8109cec5>] ? trace_hardirqs_on_caller+0x105/0x1d0
[ 62.655730] [<
ffffffffa00886f6>] ? pktgen_thread_worker+0x1796/0x1860 [pktgen]
[ 62.655734] [<
ffffffff8109c3c7>] lock_acquire+0x97/0x130
[ 62.655741] [<
ffffffffa00886f6>] ? pktgen_thread_worker+0x1796/0x1860 [pktgen]
[ 62.655745] [<
ffffffff81774af6>] _raw_spin_lock+0x36/0x70
[ 62.655752] [<
ffffffffa00886f6>] ? pktgen_thread_worker+0x1796/0x1860 [pktgen]
[ 62.655758] [<
ffffffffa00886f6>] pktgen_thread_worker+0x1796/0x1860 [pktgen]
[ 62.655766] [<
ffffffffa0087a79>] ? pktgen_thread_worker+0xb19/0x1860 [pktgen]
[ 62.655771] [<
ffffffff8109cf9d>] ? trace_hardirqs_on+0xd/0x10
[ 62.655777] [<
ffffffff81775410>] ? _raw_spin_unlock_irq+0x30/0x40
[ 62.655785] [<
ffffffff8151faa0>] ? e1000_clean+0x9d0/0x9d0
[ 62.655791] [<
ffffffff81094310>] ? __init_waitqueue_head+0x60/0x60
[ 62.655795] [<
ffffffff81094310>] ? __init_waitqueue_head+0x60/0x60
[ 62.655800] [<
ffffffffa0086f60>] ? mod_cur_headers+0x7f0/0x7f0 [pktgen]
[ 62.655806] [<
ffffffff81078f84>] kthread+0xe4/0x100
[ 62.655813] [<
ffffffff81078ea0>] ? flush_kthread_worker+0x170/0x170
[ 62.655819] [<
ffffffff8177dc6c>] ret_from_fork+0x7c/0xb0
[ 62.655824] [<
ffffffff81078ea0>] ? flush_kthread_worker+0x170/0x170
Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Weilong Chen [Tue, 24 Dec 2013 01:43:50 +0000 (09:43 +0800)]
xfrm: checkpatch erros with inline keyword position
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Weilong Chen [Tue, 24 Dec 2013 01:43:49 +0000 (09:43 +0800)]
xfrm: fix checkpatch error
Fix that "else should follow close brace '}'".
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Weilong Chen [Tue, 24 Dec 2013 01:43:48 +0000 (09:43 +0800)]
xfrm: checkpatch erros with space prohibited
Fix checkpatch error "space prohibited xxx".
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Weilong Chen [Tue, 24 Dec 2013 01:43:47 +0000 (09:43 +0800)]
xfrm: checkpatch errors with foo * bar
This patch clean up some checkpatch errors like this:
ERROR: "foo * bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Weilong Chen [Tue, 24 Dec 2013 01:43:46 +0000 (09:43 +0800)]
xfrm: checkpatch errors with space
This patch cleanup some space errors.
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
David S. Miller [Fri, 20 Dec 2013 00:27:34 +0000 (19:27 -0500)]
Merge branch 'bridge_cleanups'
Tan Xiaojun says:
====================
bridge: cleanup and fix checkpatch errors
Clean up and fix some checkpatch errors in bridge driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
tanxiaojun [Thu, 19 Dec 2013 05:28:14 +0000 (13:28 +0800)]
bridge: change the position of '{' to the pre line
That open brace { should be on the previous line.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tanxiaojun [Thu, 19 Dec 2013 05:28:13 +0000 (13:28 +0800)]
bridge: change "foo* bar" to "foo *bar"
"foo * bar" should be "foo *bar".
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tanxiaojun [Thu, 19 Dec 2013 05:28:12 +0000 (13:28 +0800)]
bridge: add space before '(/{', after ',', etc.
Spaces required before the open parenthesis '(', before the open
brace '{', after that ',' and around that '?/:'.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tanxiaojun [Thu, 19 Dec 2013 05:28:11 +0000 (13:28 +0800)]
bridge: remove unnecessary parentheses
Return is not a function, parentheses are not required.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tanxiaojun [Thu, 19 Dec 2013 05:28:10 +0000 (13:28 +0800)]
bridge: remove unnecessary condition judgment
Because err is always negative, remove unnecessary condition
judgment.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Thu, 19 Dec 2013 16:59:08 +0000 (08:59 -0800)]
bnx2x: cleanup skb_set_hash
Save pkt_hash_types in tpa structure.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 20 Dec 2013 00:10:14 +0000 (19:10 -0500)]
Merge branch 'sh_eth'
Sergei Shtylyov says:
====================
Add PHY IRQ support to the 'sh_eth' driver
This patchset adds support for passing PHY's IRQ to the 'sh_eth' driver from
the platform code and removes now useless code that hinders the PHY IRQ handing
by philib.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Sergei Shtylyov [Thu, 19 Dec 2013 22:41:12 +0000 (01:41 +0300)]
sh_eth: do not reset PHY needlessly
There's no need anymore to call phy_init_hw() to reset/resume the PHY from the
driver, as the call chain in phylib already has reached it, and so reset/resumed
the PHY (even resuming it twice). This duplicate reset is not only needless, it
e.g. clears the PHY's interrupt enables just setup by phylib and so prevents the
expected IRQs from the PHY.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sergei Shtylyov [Thu, 19 Dec 2013 22:39:52 +0000 (01:39 +0300)]
sh_eth: add PHY IRQ to platform data
Allow the platform code to pass PHY's IRQ to the driver. Print this IRQ along
with the other PHY datails in sh_eth_phy_init().
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 20 Dec 2013 00:05:15 +0000 (19:05 -0500)]
Merge branch 'mlx4'
Amir Vadai says:
====================
net/mlx4: Mellanox driver update 08-12-2013
This patchset contains:
1. Support in ndo_get_phys_port_id added by Hadar.
2. Change the driver to use by default CQE/EQE size of 64 bytes done by Eyal.
This doubles the packet-rate of the NIC.
3. Configure the XPS queue mapping on driver load - added by Ido.
4. Fixes for some small bugs done by Jenny and Matan
Patchset was applied and tested against commit: "2372175 lib: hash: follow-up
fixups for arch hash"
Changes from V1:
- Removed Patch 10 "net/mlx4_en: Fix Supported/Advertised link mode reported by
ethtool". This patch is needed to be rewritten from scratch and I wouldn't
like it to block the rest of the patches in this set.
Also, fix to Kconfig suggested by Ben will be sent in next patchset.
Changes from V0:
- Found some issues in "Reuse memory in RX flow" patch from V0.
Removing this patch from the patchset till analyzed and fixed.
- Fix some coding style issues in patch 6 "Configure the XPS queue mapping on
driver load"
- Changed patch 9 "Add NAPI support for transmit side" to use NAPI_POLL_WEIGHT
instead of MLX4_EN_TX_BUDGET
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Matan Barak [Thu, 19 Dec 2013 19:20:18 +0000 (21:20 +0200)]
net/mlx4_core: Check port number for validity before accessing data
Need to validate port number at mlx4_promisc_qp() before use.
Since port number is extracted from gid, as a cooked or corrupted gid
could lead to a crash.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Thu, 19 Dec 2013 19:20:17 +0000 (21:20 +0200)]
net/mlx4_en: Add NAPI support for transmit side
Add NAPI for TX side,
implement its support and provide NAPI callback.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Thu, 19 Dec 2013 19:20:16 +0000 (21:20 +0200)]
net/mlx4_en: Ignore irrelevant hypervisor events
MLX4_DEV_EVENT_SLAVE_INIT and MLX4_DEV_EVENT_SLAVE_SHUTDOWN
events used by Hypervisor to inform the PPF IB driver that
IB para-virtualization must be initialized/destroyed for a slave.
If this event is catched by ETH VF annoying but harmless error message
is printed into dmesg. Remove dmesg prints for these events.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eyal Perry [Thu, 19 Dec 2013 19:20:15 +0000 (21:20 +0200)]
net/mlx4_core: Set CQE/EQE size to 64B by default
To achieve out of the box performance default is to use 64 byte CQE/EQE.
In tests that we conduct in our labs, we achieved a performance
improvement of twice the message rate. For older VF/libmlx4 support,
enable_64b_cqe_eqe must be set to 0 (disabled).
Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Shamay [Thu, 19 Dec 2013 19:20:14 +0000 (21:20 +0200)]
net/mlx4_en: Configure the XPS queue mapping on driver load
Only TX rings of User Piority 0 are mapped.
TX rings of other UP's are using UP 0 mapping.
XPS is not in use when num_tc is set.
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 19 Dec 2013 19:20:13 +0000 (21:20 +0200)]
net/mlx4_en: Implement ndo_get_phys_port_id
Use the port GUID read from the firmware to identify the physical port.
This port identifier is available via ndo_get_phys_port_id for both PF
and VF net-devices.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 19 Dec 2013 19:20:12 +0000 (21:20 +0200)]
net/mlx4_core: Expose physical port id as PF/VF capability
Add the infrastructure needed to support ndo_get_phys_port_id which
allows users to identify to which physical port a net-device is connected
to by reading a unique port id.
This will work for VFs and PFs.
The driver uses a new device capability - phys_port_id, The PF driver
reads the port phys_port_id from Firmware and stores it. The VF driver
reads the port phys_port_id from the PF using QUERY_FUNC_CAP command.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 19 Dec 2013 19:20:11 +0000 (21:20 +0200)]
net/mlx4_core: Introduce nic_info new flag in QUERY_FUNC_CAP
Set nic_info field in QUERY_FUNC_CAP, which designates
supplementary NIC information is provided by the hypervisor.
When set, the following fields are valid: nic_num_rings,
nic_indirection_tbl_sz, cur_mac and phys_port_id.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 19 Dec 2013 19:20:10 +0000 (21:20 +0200)]
net/mlx4_core: Rename QUERY_FUNC_CAP fields
Use correct names for QUERY_FUNC_CAP fields: flags0 and flags1.
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hadar Hen Zion [Thu, 19 Dec 2013 19:20:09 +0000 (21:20 +0200)]
net/mlx4_core: Remove zeroed out of explicit QUERY_FUNC_CAP fields
All mailboxes are already zeroed by commit:
571b8b9 net/mlx4_core: Initialize all mailbox buffers to zero before use
Remove explicit zero set for force mac and force vlan fields in
mlx4_QUERY_FUNC_CAP_wrapper
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 18 Dec 2013 14:46:23 +0000 (06:46 -0800)]
rps: NUMA flow limit allocations
Given we allocate memory for each cpu, we can do this
using NUMA affinities, instead of using NUMA policies
of the process changing flow_limit_cpu_bitmap value.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:55:34 +0000 (14:25 +0530)]
drivers: net: Mark functions as static in debug.c
This patch marks the function il_clear_traffic_stats() in debug.c as
static because they are not used outside this file.
Thus, it also removes the following warnings in
wireless/iwlegacy/debug.c:
drivers/net/wireless/iwlegacy/debug.c:35:1: warning: no previous prototype for ‘il_clear_traffic_stats’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:54:38 +0000 (14:24 +0530)]
drivers: net: Mark functions as static in 4965-debug.c
This patch marks the function il4965_ucode_rx_stats_read(),
il4965_ucode_tx_stats_read() and il4965_ucode_general_stats_read() in
4965-debug.c as static because they are not used outside this file.
Thus, it also removes the following warnings in
wireless/iwlegacy/4965-debug.c:
drivers/net/wireless/iwlegacy/4965-debug.c:59:1: warning: no previous prototype for ‘il4965_ucode_rx_stats_read’ [-Wmissing-prototypes]
drivers/net/wireless/iwlegacy/4965-debug.c:471:1: warning: no previous prototype for ‘il4965_ucode_tx_stats_read’ [-Wmissing-prototypes]
drivers/net/wireless/iwlegacy/4965-debug.c:637:1: warning: no previous prototype for ‘il4965_ucode_general_stats_read’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:53:49 +0000 (14:23 +0530)]
drivers: net: Mark functions as static in 3945-debug.c
This patch marks the function il3945_ucode_rx_stats_read(),
il3945_ucode_tx_stats_read() and il3945_ucode_general_stats_read() in
3945-debug.c as static because they are not used outside this file.
Thus, it also removes the following warnings in
wireless/iwlegacy/3945-debug.c:
drivers/net/wireless/iwlegacy/3945-debug.c:52:1: warning: no previous prototype for ‘il3945_ucode_rx_stats_read’ [-Wmissing-prototypes]
drivers/net/wireless/iwlegacy/3945-debug.c:317:1: warning: no previous prototype for ‘il3945_ucode_tx_stats_read’ [-Wmissing-prototypes]
drivers/net/wireless/iwlegacy/3945-debug.c:407:1: warning: no previous prototype for ‘il3945_ucode_general_stats_read’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:52:37 +0000 (14:22 +0530)]
drivers: net: Include new header file in sbni.c
Create a new header file include/net/Space.h which contains
prototype declaration of sbni_probe().
Include the new header file in drivers/net/Space.c and
drivers/net/wan/sbni.c because they use this function.
This eliminates the following warning in wan/sbni.c:
drivers/net/wan/sbni.c:224:12: warning: no previous prototype for ‘sbni_probe’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:49:44 +0000 (14:19 +0530)]
drivers: net: Mark functions as static in stmmac_platform.c
This patch marks the function stmmac_pltfr_freeze() and
stmmac_pltfr_restore() in stmmac_platform.c as static because they are
not used outside this file.
Thus, it also removes the following warnings in
ethernet/stmicro/stmmac/stmmac_platform.c:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:222:5: warning: no previous prototype for ‘stmmac_pltfr_freeze’ [-Wmissing-prototypes]
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:236:5: warning: no previous prototype for ‘stmmac_pltfr_restore’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:48:11 +0000 (14:18 +0530)]
drivers: net: Mark functions as static in qlcnic_83xx_hw.c
This patch marks the function qlcnic_83xx_clear_legacy_intr_mask(),
qlcnic_83xx_set_legacy_intr_mask() and
qlcnic_83xx_enable_legacy_msix_mbx_intr() in qlcnic_83xx_hw.c as static
because they are not used outside this file.
Thus, it also removes the following warnings
in ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:318:13: warning: no previous prototype for ‘qlcnic_83xx_clear_legacy_intr_mask’ [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:323:13: warning: no previous prototype for ‘qlcnic_83xx_set_legacy_intr_mask’ [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:343:13: warning: no previous prototype for ‘qlcnic_83xx_enable_legacy_msix_mbx_intr’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rashika Kheria [Thu, 19 Dec 2013 08:47:27 +0000 (14:17 +0530)]
drivers: net: Mark functions as static in qlcnic_io.c
This patch marks the function qlcnic_enable_tx_intr(),
qlcnic_83xx_enable_tx_intr() and qlcnic_83xx_disable_tx_intr() in
qlcnic_io.c as static because they are not used outside this file.
Thus, it also removes the following warnings in
ethernet/qlogic/qlcnic/qlcnic_io.c:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:130:13: warning: no previous prototype for ‘qlcnic_enable_tx_intr’ [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:147:13: warning: no previous prototype for ‘qlcnic_83xx_enable_tx_intr’ [-Wmissing-prototypes]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:153:13: warning: no previous prototype for ‘qlcnic_83xx_disable_tx_intr’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 19 Dec 2013 23:37:49 +0000 (18:37 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/klassert/ipsec-next
Steffen Klassert says:
====================
pull request (net-next): ipsec-next 2013-12-19
1) Use the user supplied policy index instead of a generated one
if present. From Fan Du.
2) Make xfrm migration namespace aware. From Fan Du.
3) Make the xfrm state and policy locks namespace aware. From Fan Du.
4) Remove ancient sleeping when the SA is in acquire state,
we now queue packets to the policy instead. This replaces the
sleeping code.
5) Remove FLOWI_FLAG_CAN_SLEEP. This was used to notify xfrm about the
posibility to sleep. The sleeping code is gone, so remove it.
6) Check user specified spi for IPComp. Thr spi for IPcomp is only
16 bit wide, so check for a valid value. From Fan Du.
7) Export verify_userspi_info to check for valid user supplied spi ranges
with pfkey and netlink. From Fan Du.
8) RFC3173 states that if the total size of a compressed payload and the IPComp
header is not smaller than the size of the original payload, the IP datagram
must be sent in the original non-compressed form. These packets are dropped
by the inbound policy check because they are not transformed. Document the need
to set 'level use' for IPcomp to receive such packets anyway. From Fan Du.
Please pull or let me know if there are problems.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 19 Dec 2013 23:32:47 +0000 (18:32 -0500)]
Merge branch 'bonding_nl'
Scott Feldman says:
====================
bonding: add even more netlink attributes
The following series implements five more bonding netlink attributes:
num_grat_arp|num_unsol_na
all_slaves_active
min_links
lp_interval
packets_per_slave
Tested with modified iproute2 to verify attributes can be set at bond creation
time or set later. Verified sysfs interface to attributes continues to work.
I have one more set after this one for all of the 802.3ad attributes. Whew.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
sfeldma@cumulusnetworks.com [Wed, 18 Dec 2013 05:30:37 +0000 (21:30 -0800)]
bonding: add packets_per_slave attribute netlink support
Add IFLA_BOND_PACKETS_PER_SLAVE to allow get/set of bonding parameter
packets_per_slave via netlink.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
sfeldma@cumulusnetworks.com [Wed, 18 Dec 2013 05:30:30 +0000 (21:30 -0800)]
bonding: add lp_interval attribute netlink support
Add IFLA_BOND_LP_INTERVAL to allow get/set of bonding parameter
lp_interval via netlink.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
sfeldma@cumulusnetworks.com [Wed, 18 Dec 2013 05:30:23 +0000 (21:30 -0800)]
bonding: add min_links attribute netlink support
Add IFLA_BOND_MIN_LINKS to allow get/set of bonding parameter
min_links via netlink.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
sfeldma@cumulusnetworks.com [Wed, 18 Dec 2013 05:30:16 +0000 (21:30 -0800)]
bonding: add all_slaves_active attribute netlink support
Add IFLA_BOND_ALL_SLAVES_ACTIVE to allow get/set of bonding parameter
all_slaves_active via netlink.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
sfeldma@cumulusnetworks.com [Wed, 18 Dec 2013 05:30:09 +0000 (21:30 -0800)]
bonding: add num_grat_arp attribute netlink support
Add IFLA_BOND_NUM_PEER_NOTIF to allow get/set of bonding parameter
num_grat_arp via netlink. Bonding parameter num_unsol_na is
synonymous with num_grat_arp, so add only one netlink attribute
to represent both bonding parameters.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 19 Dec 2013 20:13:14 +0000 (15:13 -0500)]
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Marc Kleine-Budde says:
====================
this is a pull request of four patches for net-next/master.
There is one patch by Markus Pargmann, which speeds up the c_can
driver, a patch by John Whitmore which updates the in tree
documentation. A patch by Jeff Kirsher which replaces the FSF's address
by a link and a patch by Alexander Shiyan which converts the mcp251x
driver to make use of managed resources.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Durrant [Tue, 17 Dec 2013 11:44:35 +0000 (11:44 +0000)]
xen-netback: add gso_segs calculation
netback already has code which parses IPv4 and v6 headers to set up checksum
offsets and these are always applied to GSO packets being sent from
frontends. It's therefore suboptimal that GSOs are being marked
SKB_GSO_DODGY to defer the gso_segs calculation when netback already has all
necessary information to hand to do the calculation. This patch adds that
calculation.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Tue, 17 Dec 2013 07:29:17 +0000 (15:29 +0800)]
sch_cbq: remove unnecessary null pointer check
It already has a NULL pointer check of rtab in qdisc_put_rtab().
Remove the check outside of qdisc_put_rtab().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yang Yingliang [Tue, 17 Dec 2013 07:29:16 +0000 (15:29 +0800)]
act_police: remove unnecessary null pointer check
It already has a NULL pointer check of rtab in qdisc_put_rtab().
Remove the check outside of qdisc_put_rtab().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Tue, 17 Dec 2013 03:08:10 +0000 (11:08 +0800)]
sfc: fix sparse non static symbol warning
Fixes the following sparse warning:
drivers/net/ethernet/sfc/falcon.c:2601:6: warning:
symbol 'falcon_pull_nic_stats' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Mon, 16 Dec 2013 22:27:09 +0000 (23:27 +0100)]
net: skbuff: improve comment on checksumming
It can be a bit confusing when looking for checksumming flags that
the actual comment for this resides elsewhere further below in the
header file.
Thus, bring the documentation where we define these flags, and
slightly improve the doc text to make it a bit more clear/readable.
Also, whitespace-align values of the define while at it.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Terry Lam [Sun, 15 Dec 2013 08:30:21 +0000 (00:30 -0800)]
net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc
This patch implements the first size-based qdisc that attempts to
differentiate between small flows and heavy-hitters. The goal is to
catch the heavy-hitters and move them to a separate queue with less
priority so that bulk traffic does not affect the latency of critical
traffic. Currently "less priority" means less weight (2:1 in
particular) in a Weighted Deficit Round Robin (WDRR) scheduler.
In essence, this patch addresses the "delay-bloat" problem due to
bloated buffers. In some systems, large queues may be necessary for
obtaining CPU efficiency, or due to the presence of unresponsive
traffic like UDP, or just a large number of connections with each
having a small amount of outstanding traffic. In these circumstances,
HHF aims to reduce the HoL blocking for latency sensitive traffic,
while not impacting the queues built up by bulk traffic. HHF can also
be used in conjunction with other AQM mechanisms such as CoDel.
To capture heavy-hitters, we implement the "multi-stage filter" design
in the following paper:
C. Estan and G. Varghese, "New Directions in Traffic Measurement and
Accounting", in ACM SIGCOMM, 2002.
Some configurable qdisc settings through 'tc':
- hhf_reset_timeout: period to reset counter values in the multi-stage
filter (default 40ms)
- hhf_admit_bytes: threshold to classify heavy-hitters
(default 128KB)
- hhf_evict_timeout: threshold to evict idle heavy-hitters
(default 1s)
- hhf_non_hh_weight: Weighted Deficit Round Robin (WDRR) weight for
non-heavy-hitters (default 2)
- hh_flows_limit: max number of heavy-hitter flow entries
(default 2048)
Note that the ratio between hhf_admit_bytes and hhf_reset_timeout
reflects the bandwidth of heavy-hitters that we attempt to capture
(25Mbps with the above default settings).
The false negative rate (heavy-hitter flows getting away unclassified)
is zero by the design of the multi-stage filter algorithm.
With 100 heavy-hitter flows, using four hashes and 4000 counters yields
a false positive rate (non-heavy-hitters mistakenly classified as
heavy-hitters) of less than 1e-4.
Signed-off-by: Terry Lam <vtlam@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matthew Whitehead [Mon, 16 Dec 2013 15:20:26 +0000 (10:20 -0500)]
3c59x: Add software timestamping
Added software timestamping ability. Tested with linuxptp and synchronized
clocks to an average of less than 200 microseconds on 10 megabit ethernet.
Tested on both Vortex and Boomerang models.
Signed-off-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Francesco Fusco [Wed, 18 Dec 2013 15:05:48 +0000 (16:05 +0100)]
lib: hash: follow-up fixups for arch hash
This patch adds the include file to pull in __read_mostly on some
architectures e.g. ppc and also fixes up signatures in generic
asm.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Francesco Fusco <ffusco@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Mon, 16 Dec 2013 13:56:23 +0000 (16:56 +0300)]
isdn: use strlcpy() instead strcpy()
I don't think the in-kernel drivers ever hit this strcpy() so this
doesn't change how the code works. But strlcpy() is safer.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tanxiaojun [Mon, 16 Dec 2013 13:32:46 +0000 (21:32 +0800)]
bridge: spelling fixes
Fix spelling errors in bridge driver.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Frederic Sowa [Sun, 15 Dec 2013 02:41:14 +0000 (03:41 +0100)]
ipv6: support IPV6_PMTU_INTERFACE on sockets
IPV6_PMTU_INTERFACE is the same as IPV6_PMTU_PROBE for ipv6. Add it
nontheless for symmetry with IPv4 sockets. Also drop incoming MTU
information if this mode is enabled.
The additional bit in ipv6_pinfo just eats in the padding behind the
bitfield. There are no changes to the layout of the struct at all.
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Frederic Sowa [Sat, 14 Dec 2013 04:13:45 +0000 (05:13 +0100)]
ipv4: new ip_no_pmtu_disc mode to always discard incoming frag needed msgs
This new mode discards all incoming fragmentation-needed notifications
as I guess was originally intended with this knob. To not break backward
compatibility too much, I only added a special case for mode 2 in the
receiving path.
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Frederic Sowa [Sat, 14 Dec 2013 04:13:38 +0000 (05:13 +0100)]
inet: make no_pmtu_disc per namespace and kill ipv4_config
The other field in ipv4_config, log_martians, was converted to a
per-interface setting, so we can just remove the whole structure.
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 18 Dec 2013 21:42:06 +0000 (16:42 -0500)]
Merge git://git./linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/macvtap.c
Both minor merge hassles, simple overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:32:08 +0000 (23:32 -0800)]
net: vmxnet3 calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:32:00 +0000 (23:32 -0800)]
net: sun-niu calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:31:50 +0000 (23:31 -0800)]
net: sfc calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:31:36 +0000 (23:31 -0800)]
net: vxge calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:31:23 +0000 (23:31 -0800)]
net: mlx4 calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:28:13 +0000 (23:28 -0800)]
net: sky2 calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:23:51 +0000 (23:23 -0800)]
net: emulex-benet calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:23:42 +0000 (23:23 -0800)]
net: cisco-enic calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:23:29 +0000 (23:23 -0800)]
net: cxgb4 calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:23:11 +0000 (23:23 -0800)]
net: bnx2x calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 18 Dec 2013 07:22:57 +0000 (23:22 -0800)]
net: bnx2 calls skb_set_hash
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 18 Dec 2013 19:58:41 +0000 (14:58 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates
This series contains updates to i40e, ixgbevf, ixgbe and igb.
Don provides an ixgbevf patch to add DCB configuration into the queue
setup so that we won't have to allocate queues in a separate place when
enabling DCB.
Guenter Roeck provides 2 patches for ixgbe to simplify the code by
attaching hwmon sysfs attributes to hwmon device instead of PCI device.
Also fix an issues where the temperature sensor attribute index was
being started with the value 0 and not 1 as per the hwmon API.
Carolyn provides igb patches to fix queue allocation method to
accommodate changes during runtime. This includes changing how the
driver initializes MSIx and checks for MSIx configuration to make it
easier to reconfigure the device when queue changes happen at runtime.
Neerav and Shannon fixes i40e debugfs commands that dump hex information
by using print_hex_dump().
Shannon provides several i40e fixes which include the prevention of
null pointer exception in the dump descriptor by checking that rings
were allocated before trying to reference them. Fixed up a couple of
scanfs to accept various base numbers instead of silently requiring hex.
Anjali fixes up i40e where the incorrect defines were being used for
misc interrupts.
Alan Cox provides a fix for i40e where we assume that the resulting
buffer is zero terminated when we then re-use it. The sscanf is limited
to 512 bytes but needs to be 511 to allow for a terminator.
Stephen Hemminger fixes i40e by making local functions static and removes
unused code (i40e_aq_add/remove_vlan() functions).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:11 +0000 (20:15 -0800)]
net_sched: convert tcf_proto_ops to use struct list_head
We don't need to maintain our own singly linked list code.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:10 +0000 (20:15 -0800)]
net_sched: convert tc_action_ops to use struct list_head
We don't need to maintain our own singly linked list code.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:09 +0000 (20:15 -0800)]
net_sched: convert tcf_hashinfo to hlist and use spinlock
So that we don't need to play with singly linked list,
and since the code is not on hot path, we can use spinlock
instead of rwlock.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:08 +0000 (20:15 -0800)]
net_sched: init struct tcf_hashinfo at register time
It looks weird to store the lock out of the struct but
still points to a static variable. Just move them into the struct.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:07 +0000 (20:15 -0800)]
net_sched: cls: refactor out struct tcf_ext_map
These information can be saved in tcf_exts, and this will
simplify the code.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:05 +0000 (20:15 -0800)]
net_sched: act: use standard struct list_head
Currently actions are chained by a singly linked list,
therefore it is a bit hard to add and remove a specific
entry. Convert it to struct list_head so that in the
latter patch we can remove an action without finding
its head.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 16 Dec 2013 04:15:04 +0000 (20:15 -0800)]
net_sched: remove get_stats from tc_action_ops
It is not used.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Carolyn Wyborny [Tue, 10 Dec 2013 07:58:34 +0000 (07:58 +0000)]
igb: Change to use statically allocated array for MSIx entries
This patch changes how the driver initializes MSIx and checks
for MSIx configuration. This change makes it easier to reconfigure the
device when queue changes happen at runtime using ethtool's set_channels
feature.
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Carolyn Wyborny [Tue, 10 Dec 2013 07:58:29 +0000 (07:58 +0000)]
igb: Fix queue allocation method to accommodate changing during runtime
When changing number of queues using ethtool's set_channels during runtime,
a queue allocation could fail, which can leave the device in a down state.
In order to preserve the usability of the device in this scenario, this patch
changes the driver to allocate the number of queues only if they have not
been allocated already. The first allocation is then done for the max number
of queues, which is the default queues for this driver. With this change,
queue quantity changes are not subject to queue allocation failures.
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Guenter Roeck [Tue, 26 Nov 2013 07:15:39 +0000 (07:15 +0000)]
ixgbe: Start temperature sensor attribute index with 1
Per hwmon ABI, temperature sensor attribute index starts with 1, not 0.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Guenter Roeck [Tue, 26 Nov 2013 07:15:28 +0000 (07:15 +0000)]
ixgbe: Convert to use devm_hwmon_device_register_with_groups
Simplify the code. Attach hwmon sysfs attributes to hwmon device
instead of pci device. Avoid race conditions caused by attributes
being created after hwmon device registration. Implicitly
(through hwmon API) add mandatory 'name' sysfs attribute.
Other cleanup:
Instead of allocating memory for hwmon attributes, move attributes
and all other hwmon related data into struct hwmon_buff and allocate
the entire structure using devm_kzalloc.
Check return value from calls to igb_add_hwmon_attr() one by one instead
of logically combining them all together.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Don Skidmore [Sat, 21 Sep 2013 01:40:49 +0000 (01:40 +0000)]
ixgbevf: add DCB configuration into queue setup
This patch takes the DCB config checks and adds them to the normal setting
up of the queues. This way we won't have to allocation queues in a separate
place for enabling DCB.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-By: Jack Morgan<jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Stephen Hemminger [Fri, 13 Dec 2013 04:37:50 +0000 (04:37 +0000)]
i40e: make functions static and remove dead code
Make local functions static in the file they are used.
Remove functions i40e_aq_add_vlan and i40e_aq_remove_vlan since
they are not used anywhere by current code.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Alan Cox [Thu, 12 Dec 2013 02:44:24 +0000 (02:44 +0000)]
i40e: Fix off by one in i40e_dbg_command_write
We assume that the resulting buffer is zero terminated when we then
re-use it. The sscanf is limited to 512 bytes but needs to be 511
to allow for a terminator.
One of a set of problems noted by Jackie Chang
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Shannon Nelson <Shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Catherine Sullivan [Tue, 26 Nov 2013 10:49:33 +0000 (10:49 +0000)]
i40e: Bump version number
Version updated to 0.3.14-k
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Anjali Singhai Jain [Tue, 26 Nov 2013 10:49:32 +0000 (10:49 +0000)]
i40e: Fix wrong mask bits being used in misc interrupt
No functional change, but the wrong defines were being used.
Change-Id: Ica2afd2dfe18154ca0f1260a508f31e372319ba7
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Tue, 26 Nov 2013 10:49:31 +0000 (10:49 +0000)]
i40e: more print_hex_dump use
Take advantage of print_hex_dump() in another couple places to
clean up the code.
Change-Id: Ib618e75f928308c0afd0d8d74105da0c6577a024
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Tue, 26 Nov 2013 10:49:30 +0000 (10:49 +0000)]
i40e: fix up scanf decoders
Fix up a couple of scanfs to accept various base numbers instead of silently
requiring hex.
Change-Id: I1cc4dffbb1d011bf603cbf34a8db093da57fad7a
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Tue, 26 Nov 2013 10:49:29 +0000 (10:49 +0000)]
i40e: simplify error messages for dump descriptor
debugfs fixes: We don't really need to give usage messages for data errors,
only for invalid command errors.
Change-Id: If3f74ac49e43c3ced7fd388323fa738ac145e055
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Tue, 26 Nov 2013 10:49:26 +0000 (10:49 +0000)]
i40e: prevent null pointer exception in dump descriptor
Check that rings were allocated before trying to reference them.
Change-Id: I33151e55ab7a7a305fecdb88ccb2709ac246b7c7
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
David S. Miller [Wed, 18 Dec 2013 05:49:35 +0000 (00:49 -0500)]
Merge branch 'phy_checkpatch'
Florian Fainelli says:
====================
net: phy: fix checkpatch errors
This patchset fixes trivial checkpatch errors, no functional change
introduced.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:13 +0000 (21:38 -0800)]
net: phy: spi_ks8995: fix checkpatch errors
checkpatch spotted two errors, fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:12 +0000 (21:38 -0800)]
net: phy: fix checkpatch errors
checkpatch spotted a few checkpatch errors such as whitespace damages
and switch/case labels not being on the same column, fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:11 +0000 (21:38 -0800)]
net: phy: micrel: fix checkpath errors
checkpatch spotted a few spaces vs tabs errors, fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:10 +0000 (21:38 -0800)]
net: phy: mdio_bus: fix checkpath error
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:09 +0000 (21:38 -0800)]
net: phy: lxt: fix checkpath errors
checkpath spotted a few errors in this file, fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:08 +0000 (21:38 -0800)]
net: phy: icplus: fix checkpath error
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:07 +0000 (21:38 -0800)]
net: phy: dp83640: fix checkpath error
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:06 +0000 (21:38 -0800)]
net: phy: davicom: fix checkpath errors
checkpath spotted a few stylistic errors, fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Fainelli [Wed, 18 Dec 2013 05:38:05 +0000 (21:38 -0800)]
net: phy: cicada: fix checkpath errors
checkpath spotted a few stylistic errors fix them.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>