GitHub/LineageOS/android_kernel_motorola_exynos9610.git
10 years agoMerge branch 'sh_eth'
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>
10 years agosh_eth: do not reset PHY needlessly
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>
10 years agosh_eth: add PHY IRQ to platform data
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>
10 years agoMerge branch 'mlx4'
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>
10 years agonet/mlx4_core: Check port number for validity before accessing data
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>
10 years agonet/mlx4_en: Add NAPI support for transmit side
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>
10 years agonet/mlx4_en: Ignore irrelevant hypervisor events
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>
10 years agonet/mlx4_core: Set CQE/EQE size to 64B by default
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>
10 years agonet/mlx4_en: Configure the XPS queue mapping on driver load
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>
10 years agonet/mlx4_en: Implement ndo_get_phys_port_id
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>
10 years agonet/mlx4_core: Expose physical port id as PF/VF capability
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>
10 years agonet/mlx4_core: Introduce nic_info new flag in QUERY_FUNC_CAP
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>
10 years agonet/mlx4_core: Rename QUERY_FUNC_CAP fields
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>
10 years agonet/mlx4_core: Remove zeroed out of explicit QUERY_FUNC_CAP fields
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>
10 years agorps: NUMA flow limit allocations
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>
10 years agodrivers: net: Mark functions as static in debug.c
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>
10 years agodrivers: net: Mark functions as static in 4965-debug.c
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>
10 years agodrivers: net: Mark functions as static in 3945-debug.c
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>
10 years agodrivers: net: Include new header file in sbni.c
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>
10 years agodrivers: net: Mark functions as static in stmmac_platform.c
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>
10 years agodrivers: net: Mark functions as static in qlcnic_83xx_hw.c
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>
10 years agodrivers: net: Mark functions as static in qlcnic_io.c
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>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec...
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>
10 years agoMerge branch 'bonding_nl'
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>
10 years agobonding: add packets_per_slave attribute netlink support
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>
10 years agobonding: add lp_interval attribute netlink support
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>
10 years agobonding: add min_links attribute netlink support
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>
10 years agobonding: add all_slaves_active attribute netlink support
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>
10 years agobonding: add num_grat_arp attribute netlink support
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>
10 years agoMerge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
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>
10 years agoxen-netback: add gso_segs calculation
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>
10 years agosch_cbq: remove unnecessary null pointer check
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>
10 years agoact_police: remove unnecessary null pointer check
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>
10 years agosfc: fix sparse non static symbol warning
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>
10 years agonet: skbuff: improve comment on checksumming
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>
10 years agonet-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc
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>
10 years ago3c59x: Add software timestamping
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>
10 years agolib: hash: follow-up fixups for arch hash
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>
10 years agoisdn: use strlcpy() instead strcpy()
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>
10 years agobridge: spelling fixes
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>
10 years agoipv6: support IPV6_PMTU_INTERFACE on sockets
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>
10 years agoipv4: new ip_no_pmtu_disc mode to always discard incoming frag needed msgs
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>
10 years agoinet: make no_pmtu_disc per namespace and kill ipv4_config
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>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/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>
10 years agonet: vmxnet3 calls skb_set_hash
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>
10 years agonet: sun-niu calls skb_set_hash
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>
10 years agonet: sfc calls skb_set_hash
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>
10 years agonet: vxge calls skb_set_hash
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>
10 years agonet: mlx4 calls skb_set_hash
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>
10 years agonet: sky2 calls skb_set_hash
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>
10 years agonet: emulex-benet calls skb_set_hash
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>
10 years agonet: cisco-enic calls skb_set_hash
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>
10 years agonet: cxgb4 calls skb_set_hash
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>
10 years agonet: bnx2x calls skb_set_hash
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>
10 years agonet: bnx2 calls skb_set_hash
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>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/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>
10 years agonet_sched: convert tcf_proto_ops to use struct list_head
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>
10 years agonet_sched: convert tc_action_ops to use struct list_head
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>
10 years agonet_sched: convert tcf_hashinfo to hlist and use spinlock
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>
10 years agonet_sched: init struct tcf_hashinfo at register time
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>
10 years agonet_sched: cls: refactor out struct tcf_ext_map
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>
10 years agonet_sched: act: use standard struct list_head
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>
10 years agonet_sched: remove get_stats from tc_action_ops
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>
10 years agoigb: Change to use statically allocated array for MSIx entries
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>
10 years agoigb: Fix queue allocation method to accommodate changing during runtime
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>
10 years agoixgbe: Start temperature sensor attribute index with 1
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>
10 years agoixgbe: Convert to use devm_hwmon_device_register_with_groups
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>
10 years agoixgbevf: add DCB configuration into queue setup
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>
10 years agoi40e: make functions static and remove dead code
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>
10 years agoi40e: Fix off by one in i40e_dbg_command_write
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>
10 years agoi40e: Bump version number
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>
10 years agoi40e: Fix wrong mask bits being used in misc interrupt
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>
10 years agoi40e: more print_hex_dump use
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>
10 years agoi40e: fix up scanf decoders
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>
10 years agoi40e: simplify error messages for dump descriptor
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>
10 years agoi40e: prevent null pointer exception in dump descriptor
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>
10 years agoMerge branch 'phy_checkpatch'
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>
10 years agonet: phy: spi_ks8995: fix checkpatch errors
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>
10 years agonet: phy: fix checkpatch errors
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>
10 years agonet: phy: micrel: fix checkpath errors
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>
10 years agonet: phy: mdio_bus: fix checkpath error
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>
10 years agonet: phy: lxt: fix checkpath errors
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>
10 years agonet: phy: icplus: fix checkpath error
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>
10 years agonet: phy: dp83640: fix checkpath error
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>
10 years agonet: phy: davicom: fix checkpath errors
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>
10 years agonet: phy: cicada: fix checkpath errors
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>
10 years agoMerge branch 'vlan_tpid'
David S. Miller [Wed, 18 Dec 2013 05:36:51 +0000 (00:36 -0500)]
Merge branch 'vlan_tpid'

Atzm Watanabe says:

====================
packet: deliver VLAN TPID to userspace

This patchset enables userspace to get VLAN TPID as well as the VLAN TCI.

After the 802.1AD support, userspace packet receivers (packet dumper,
software switch, and the like) need how to know VLAN TPID in order to
reconstruct original tagged frame.

v4: Simply use sizeof(tp_padding) for zeroing the padding bytes,
    commented by David Laight.
    Use __u16 for tp_vlan_tpid in tpacket_hdr_variant1,
    commented by Daniel Borkmann.

v3: Add a definition which indicates whether tp_vlan_tpid is valid.
    Explicitly define pad bytes for tpacket{2,3}_hdr and pick the area
    for tp_vlan_tpid from the definition.  Commented by David Laight.

v2: Add BUILD_BUG_ON() to make current aligned size of
    struct tpacket{2,3}_hdr clear.  Commented by Ben Hutchings.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: deliver VLAN TPID to userspace
Atzm Watanabe [Tue, 17 Dec 2013 13:53:40 +0000 (22:53 +0900)]
packet: deliver VLAN TPID to userspace

This enables userspace to get VLAN TPID as well as the VLAN TCI.

Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: fill the gap of TPACKET_ALIGNMENT with zeros
Atzm Watanabe [Tue, 17 Dec 2013 13:53:36 +0000 (22:53 +0900)]
packet: fill the gap of TPACKET_ALIGNMENT with zeros

struct tpacket{2,3}_hdr is aligned to a multiple of TPACKET_ALIGNMENT.
Explicitly defining and zeroing the gap of this makes additional changes
easier.

Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agopacket: make aligned size of struct tpacket{2,3}_hdr clear
Atzm Watanabe [Tue, 17 Dec 2013 13:53:32 +0000 (22:53 +0900)]
packet: make aligned size of struct tpacket{2,3}_hdr clear

struct tpacket{2,3}_hdr is aligned to a multiple of TPACKET_ALIGNMENT.
We may add members to them until current aligned size without forcing
userspace to call getsockopt(..., PACKET_HDRLEN, ...).

Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'bna'
David S. Miller [Wed, 18 Dec 2013 05:31:01 +0000 (00:31 -0500)]
Merge branch 'bna'

Rasesh Mody says:

====================
bna: Update the Driver to v3.2.23.0

This patch set consists of feature additions like s/w timestamping support,
multi-buffer RX, firmware patch simplification, enhancements for RX filters,
RX processing changes, bug fixes and updates the firmware version to v3.2.3.0.
The patch set addressed the review commnets recieved.

This patch set updates the BNA driver to v3.2.23.0 and was tested against
net-next 3.12.0-rc6 kernel.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Update the Driver Version to 3.2.23.0
Rasesh Mody [Wed, 18 Dec 2013 01:07:42 +0000 (17:07 -0800)]
bna: Update the Driver Version to 3.2.23.0

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Firmware Patch Simplification
Rasesh Mody [Wed, 18 Dec 2013 01:07:41 +0000 (17:07 -0800)]
bna: Firmware Patch Simplification

This patch includes change to enable firmware patch simplication feature.
This feature is targeted to address the requirement to have independent patch
release for firmware. Prior to the 3.2.3.0 firmware, releasing a patch fix for
firmware would require changes to bna driver, to use new firmware images.
However with these changes, if the new firmware is flashed on to the Adapter,
the driver will use the new firmware after checking the patch release byte in
the firmware version.

Update the f/w version to 3.2.3.0

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Embed SKB Length in TX Vector
Rasesh Mody [Wed, 18 Dec 2013 01:07:40 +0000 (17:07 -0800)]
bna: Embed SKB Length in TX Vector

- Store the length of the skb buffer mapped along with the handle and use it
   while unmapping the buffer.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Handle the TX Setup Failures
Rasesh Mody [Wed, 18 Dec 2013 01:07:39 +0000 (17:07 -0800)]
bna: Handle the TX Setup Failures

Change details:
 - When bnad_setup_tx() returns NULL, the error is NOT returned to the caller.
   The caller will incorrectly assume success. So Return ENOMEM when bna_tx_create()
   fails.
 - If bnad_tx_msix_register() fails, call bna_tx_destroy() to free tx & to NULL
   the bnad reference to tcb.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Add NULL Check Before Dereferencing TCB
Rasesh Mody [Wed, 18 Dec 2013 01:07:38 +0000 (17:07 -0800)]
bna: Add NULL Check Before Dereferencing TCB

Currently we already check to see whether the BNAD_TXQ_TX_STARTED cleared.
But if the tcb structure which contains this flag is also already freed by that
time, we would dereference the NULL pointer. This patch is to check tcb for NULL
pointer, before dereferencing it.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: CQ Read Fix
Rasesh Mody [Wed, 18 Dec 2013 01:07:37 +0000 (17:07 -0800)]
bna: CQ Read Fix

Valid bit check for completion needs read fence, so that it does not get
reordered with other loads.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: RX Processing and Config Changes
Rasesh Mody [Wed, 18 Dec 2013 01:07:36 +0000 (17:07 -0800)]
bna: RX Processing and Config Changes

Change Details:
 - Prefetch header in GRO path. This reduces napi_frags_skb time from 9% to 5%.
 - Changed the configurable limit of RxQ depth to 16384 (was 2048).
 - bnad_rx_unmap_q elements are cachealigned.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: Enable Multi Buffer RX
Rasesh Mody [Wed, 18 Dec 2013 01:07:35 +0000 (17:07 -0800)]
bna: Enable Multi Buffer RX

The CT2 HW supports multi-buffer Rx. This patch provides the necessary changes
for bnad to use multi-buffer Rx feature. For BNAD, multi-buffer Rx is by
default enabled when MTU is > 4096. For >4096 MTU, q0 data/large buffers are of
2048 size. As the resource requirements of multi-buffer Rx are different new Rx
needs to be created to use this feature. ASIC posts multiple completions if
frame exceeds buffer size. The last completion is marked with EOP flag.
 - Separate HQ and DQ enums for resource allocations and configurations.
 - rx_config and rxq structure changes to pass the correct info from bnad.
 - DQ depth need not be same as HQ depth. So CQ depth is adjusted accordingly.
 - Rx CFG frame size is taken from configured MTU.
 - Rx q0 buffer size is configured from bnad s rx_config when multi-buffer is
   enabled.
 - Poll for entire frame completion.
 - Once EOP completion is received gather the number of vectors used by the
   frame to submit it to the stack.
 - Changed MTU to frame size wherever necessary.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobna: RX Filter Enhancements
Rasesh Mody [Wed, 18 Dec 2013 01:07:34 +0000 (17:07 -0800)]
bna: RX Filter Enhancements

Change Details:
 - Added bna_rx_ucast_listset() for synchronous ucast listadd operation.
 - Clear mac->handle before adding it to free_q.
 - bnad_set_rx_mode() rewritten. bnad_set_rx_mode() adds the MACs in uc_list
   to UCAM. If it exceeds the max supported, DEFAULT mode is turned on. If
   MCAM limit is exceeded, ALLMULTI mode is turned on.
 - Clear CF flags, check for the new mode and reprogram the Rx approach.
 - Added bnad_set_rx_ucast_fltr() and bnad_set_rx_mcast_fltr().
 - Check for IFF_PROMISC to set the correct mode.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>