]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agoMerge branch 'rocker-worlds'
David S. Miller [Thu, 18 Feb 2016 04:08:35 +0000 (23:08 -0500)]
Merge branch 'rocker-worlds'

Jiri Pirko says:

====================
rocker: do world split

This patchset allows new rocker worlds to be easily added in future.
Two new worlds are now under development: P4 and eBPF.

The main part of the patchset is the OF-DPA carve-out. It resuts in OF-DPA
specific file. Clean cut.

Note this patchset is based on my original attempt in October 2015.
I had to rebase, included all suggestions and did lot of small changes.
Main change to go with all-port-one-world approach. Port world is set according
to what is setup in HW. Not possible to change worlds from driver.

v1->v2:
  patch 12/13:
  - split port_init into pre-init and init
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: return -EOPNOTSUPP for undefined world ops
Jiri Pirko [Tue, 16 Feb 2016 14:14:51 +0000 (15:14 +0100)]
rocker: return -EOPNOTSUPP for undefined world ops

Suggested-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: move OF-DPA stuff into separate file
Jiri Pirko [Tue, 16 Feb 2016 14:14:50 +0000 (15:14 +0100)]
rocker: move OF-DPA stuff into separate file

Carve out OF-DPA would specific code from the common file to the world
file. This change required struct rocker and struct rocker_port split
into world specific struct ofdpa and struct ofdpa_port. Along with this
the world specific functions and defines were renamed from prefix
"rocker_" to "ofdpa_".

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: call rocker_cmd_exec function with "nowait" boolean instead of flags
Jiri Pirko [Tue, 16 Feb 2016 14:14:49 +0000 (15:14 +0100)]
rocker: call rocker_cmd_exec function with "nowait" boolean instead of flags

No need to push down rocker flags just to check if this is nowait or
not. Let the caller handle that.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: remove trans parameter to rocker_cmd_exec function
Jiri Pirko [Tue, 16 Feb 2016 14:14:48 +0000 (15:14 +0100)]
rocker: remove trans parameter to rocker_cmd_exec function

The only purpose of passing this parameter is to check for
prepare phase. The only reason for a failure in that state is if
TLVs don't fit into descriptor. That is highly unlikely and if that
happens, it is a driver bug. So remove this parameter from
rocker_cmd_exec, and check for prepare phase in caller.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: pre-allocate wait structures during cmd ring init
Jiri Pirko [Tue, 16 Feb 2016 14:14:47 +0000 (15:14 +0100)]
rocker: pre-allocate wait structures during cmd ring init

This avoids need to alloc/free wait structure for every command call.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: pass "learning" value as a parameter to rocker_port_set_learning
Jiri Pirko [Tue, 16 Feb 2016 14:14:46 +0000 (15:14 +0100)]
rocker: pass "learning" value as a parameter to rocker_port_set_learning

Be consistent with the rest of the setting functions, and pass
"learning" as a bool function parameter.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: introduce worlds infrastructure
Jiri Pirko [Tue, 16 Feb 2016 14:14:45 +0000 (15:14 +0100)]
rocker: introduce worlds infrastructure

This is another step on the way to per-world clean cut. Introduce world
ops hooks which each world can implement in world-specific way.
Also introduce world infrastructure along with OF-DPA world stub.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: move rocker and rocker_port structs into header
Jiri Pirko [Tue, 16 Feb 2016 14:14:44 +0000 (15:14 +0100)]
rocker: move rocker and rocker_port structs into header

And take some other related thing along. They are going to be pushed
into of-dpa part anyway.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: implement get settings mode command
Jiri Pirko [Tue, 16 Feb 2016 14:14:43 +0000 (15:14 +0100)]
rocker: implement get settings mode command

Introduce a helper to ask HW for the port mode (world).

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: push tlv processing into separate files
Jiri Pirko [Tue, 16 Feb 2016 14:14:42 +0000 (15:14 +0100)]
rocker: push tlv processing into separate files

Carve out TLV processing helpers into separate files.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: rename rocker.c to rocker_main.c
Jiri Pirko [Tue, 16 Feb 2016 14:14:41 +0000 (15:14 +0100)]
rocker: rename rocker.c to rocker_main.c

Since "rocker.c" is going to be split into multiple files, start with
renaming original "rocker.c" file to "rocker_main.c". Multiple code
parts are going to be cut from "rocker_main.c" later on.

Fix couple of checkpatch issues on the way.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: rename rocker.h to rocker_hw.h
Jiri Pirko [Tue, 16 Feb 2016 14:14:40 +0000 (15:14 +0100)]
rocker: rename rocker.h to rocker_hw.h

Since "rocker.h" file is going to be used for different purpose,
rename the hardware-specific header to "rocker_hw.h".

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agorocker: remove unused rocker_port param from alloc funcs and shorten their names
Jiri Pirko [Tue, 16 Feb 2016 14:14:39 +0000 (15:14 +0100)]
rocker: remove unused rocker_port param from alloc funcs and shorten their names

No need to pass rocker_port around to alloc/free rocker functions,
since they now use switchdev_trans for memory management storage.
With the param removal, shorten the name of the functions since they now
has nothing to do with rocker port.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'xgene-multiq'
David S. Miller [Thu, 18 Feb 2016 03:08:34 +0000 (22:08 -0500)]
Merge branch 'xgene-multiq'

Iyappan Subramanian says:

====================
Add support for Classifier and RSS

This patch set enables,

(i) Classifier engine that is used for parsing
through the packet and extracting a search string that is then used
to search a database to find associative data.

(ii) Receive Side Scaling (RSS) that does dynamic load
balancing of the CPUs by controlling the number of messages enqueued
per CPU though the help of Toeplitz Hash function of 4-tuple of
source TCP/UDP port, destination TCP/UDP port, source IPV4 address and
destination IPV4 address.

(iii) Multi queue, to make advantage of RSS

v3: Address review comments from v2
    - reordered local variables from longest to shortlest line

v2: Address review comments from v1
    - fix kbuild warning
    - add default coalescing

v1:
    - Initial version
====================

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodtb: xgene: Add irqs to support multi queue
Iyappan Subramanian [Wed, 17 Feb 2016 23:00:42 +0000 (15:00 -0800)]
dtb: xgene: Add irqs to support multi queue

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Khuong Dinh <kdinh@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodrivers: net: xgene: Add support for multiple queues
Iyappan Subramanian [Wed, 17 Feb 2016 23:00:41 +0000 (15:00 -0800)]
drivers: net: xgene: Add support for multiple queues

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Khuong Dinh <kdinh@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodrivers: net: xgene: Add support for RSS
Iyappan Subramanian [Wed, 17 Feb 2016 23:00:40 +0000 (15:00 -0800)]
drivers: net: xgene: Add support for RSS

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Khuong Dinh <kdinh@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agodrivers: net: xgene: Add support for Classifier engine
Iyappan Subramanian [Wed, 17 Feb 2016 23:00:39 +0000 (15:00 -0800)]
drivers: net: xgene: Add support for Classifier engine

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Khuong Dinh <kdinh@apm.com>
Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agovlan: change return type of vlan_proc_rem_dev
Zhang Shengju [Thu, 18 Feb 2016 02:29:30 +0000 (02:29 +0000)]
vlan: change return type of vlan_proc_rem_dev

Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: pack tc_cls_u32_knode struct slighter better
John Fastabend [Wed, 17 Feb 2016 22:59:30 +0000 (14:59 -0800)]
net: pack tc_cls_u32_knode struct slighter better

By packing the structure we can remove a few holes as Jamal
suggests.

before:

struct tc_cls_u32_knode {
struct tcf_exts *          exts;                 /*     0     8 */
u8                         fshift;               /*     8     1 */

/* XXX 3 bytes hole, try to pack */

u32                        handle;               /*    12     4 */
u32                        val;                  /*    16     4 */
u32                        mask;                 /*    20     4 */
u32                        link_handle;          /*    24     4 */

/* XXX 4 bytes hole, try to pack */

struct tc_u32_sel *        sel;                  /*    32     8 */

/* size: 40, cachelines: 1, members: 7 */
/* sum members: 33, holes: 2, sum holes: 7 */
/* last cacheline: 40 bytes */
};

after:

struct tc_cls_u32_knode {
struct tcf_exts *          exts;                 /*     0     8 */
struct tc_u32_sel *        sel;                  /*     8     8 */
u32                        handle;               /*    16     4 */
u32                        val;                  /*    20     4 */
u32                        mask;                 /*    24     4 */
u32                        link_handle;          /*    28     4 */
u8                         fshift;               /*    32     1 */

/* size: 40, cachelines: 1, members: 7 */
/* padding: 7 */
/* last cacheline: 40 bytes */
};

Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoixgbe: fix dates on header of ixgbe_model.h
John Fastabend [Wed, 17 Feb 2016 22:35:23 +0000 (14:35 -0800)]
ixgbe: fix dates on header of ixgbe_model.h

Fixes: 9d35cf062e05 ("net: ixgbe: add minimal parser details for ixgbe")
Reported-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoixgbe: use u32 instead of __u32 in model header
John Fastabend [Wed, 17 Feb 2016 22:34:53 +0000 (14:34 -0800)]
ixgbe: use u32 instead of __u32 in model header

I incorrectly used __u32 types where we should be using u32 types when
I added the ixgbe_model.h file.

Fixes: 9d35cf062e05 ("net: ixgbe: add minimal parser details for ixgbe")
Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'inet_lro-remove'
David S. Miller [Wed, 17 Feb 2016 21:15:47 +0000 (16:15 -0500)]
Merge branch 'inet_lro-remove'

Ben Hutchings says:

====================
Remove the inet_lro library

The old inet_lro library has been deprecated ever since GRO was
introduced, but there are still a few drivers using it.  Convert
them to GRO and remove it.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv4: Remove inet_lro library
Ben Hutchings [Mon, 15 Feb 2016 21:25:57 +0000 (21:25 +0000)]
ipv4: Remove inet_lro library

There are no longer any in-tree drivers that use it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoRDMA/nes: Replace LRO with GRO
Ben Hutchings [Mon, 15 Feb 2016 21:25:44 +0000 (21:25 +0000)]
RDMA/nes: Replace LRO with GRO

GRO is simpler to use than the old inet_lro library, and is compatible
with forwarding and bridging configurations.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agopasemi_mac: Replace LRO with GRO
Ben Hutchings [Mon, 15 Feb 2016 21:25:11 +0000 (21:25 +0000)]
pasemi_mac: Replace LRO with GRO

GRO is simpler to use than the old inet_lro library, and is compatible
with forwarding and bridging configurations.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoaf_llc: fix types on llc_ui_wait_for_conn
One Thousand Gnomes [Mon, 15 Feb 2016 19:41:51 +0000 (19:41 +0000)]
af_llc: fix types on llc_ui_wait_for_conn

The timeout is a long, we return it truncated if it is huge. Basically
harmless as the only caller does a boolean check, but tidy it up anyway.

(64bit build tested this time. Thank you 0day)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoqed/qede: use 8.7.3.0 FW.
Yuval Mintz [Mon, 15 Feb 2016 18:22:35 +0000 (13:22 -0500)]
qed/qede: use 8.7.3.0 FW.

This patch moves the qed* driver into utilizing the 8.7.3.0 FW.
This new FW is required for a lot of new SW features, including:
  - Vlan filtering offload
  - Encapsulation offload support
  - HW ingress aggregations
As well as paving the way for the possibility of adding storage protocols
in the future.

V2:
 - Fix kbuild test robot error/warnings.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'sctp-cleanups'
David S. Miller [Wed, 17 Feb 2016 20:41:55 +0000 (15:41 -0500)]
Merge branch 'sctp-cleanups'

Xin Long says:

====================
sctp: some cleanups for sctp

There are some unused function and redundant rcu locks should be
removed.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosctp: remove the unused sctp_datamsg_free()
Xin Long [Mon, 15 Feb 2016 06:28:05 +0000 (14:28 +0800)]
sctp: remove the unused sctp_datamsg_free()

Since commit 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg
after sending a msg") used sctp_datamsg_put in sctp_sendmsg, instead of
sctp_datamsg_free, this function has no use in sctp.

So we will remove it.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosctp: remove rcu_read_lock in sctp_seq_dump_remote_addrs()
Xin Long [Mon, 15 Feb 2016 06:28:04 +0000 (14:28 +0800)]
sctp: remove rcu_read_lock in sctp_seq_dump_remote_addrs()

sctp_seq_dump_remote_addrs is only called by sctp_assocs_seq_show()
and it has been protected by rcu_read_lock that is from
rhashtable_walk_start().

So we will remove this one.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosctp: move rcu_read_lock from __sctp_lookup_association to sctp_lookup_association
Xin Long [Mon, 15 Feb 2016 06:28:03 +0000 (14:28 +0800)]
sctp: move rcu_read_lock from __sctp_lookup_association to sctp_lookup_association

__sctp_lookup_association() is only invoked by sctp_v4_err() and
sctp_rcv(), both which run on the rx BH, and it has been protected
by rcu_read_lock [see ip_local_deliver_finish() / ipv6_rcv()].

So we can move it to sctp_lookup_association, only let
sctp_lookup_association use rcu_read_lock.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agocore: remove unneded headers for net cgroup controllers.
Rosen, Rami [Mon, 15 Feb 2016 00:39:43 +0000 (02:39 +0200)]
core: remove unneded headers for net cgroup controllers.

commit 3ed80a6 (cgroup: drop module support) made including
module.h redundant in the net cgroup controllers,
netclassid_cgroup.c and netprio_cgroup.c. This patch
removes them.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'renesas-cleanups'
David S. Miller [Wed, 17 Feb 2016 20:30:24 +0000 (15:30 -0500)]
Merge branch 'renesas-cleanups'

Sergei Shtylyov says:

====================
Kill useless *switch* defaults in the Renesas Ethernet drivers

   Here's a set of 2 patches against DaveM's 'net-next.git' repo removing
often used *default* cases doing nothing.

[1/2] ravb: kill useless *switch* defaults
[2/2] sh_eth: kill useless *switch* defaults
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agosh_eth: kill useless *switch* defaults
Sergei Shtylyov [Sun, 14 Feb 2016 19:56:33 +0000 (22:56 +0300)]
sh_eth: kill useless *switch* defaults

The driver often has the *default* cases doing nothing in the *switch*
statements with  the integer expressions -- remove them.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoravb: kill useless *switch* defaults
Sergei Shtylyov [Sun, 14 Feb 2016 19:56:03 +0000 (22:56 +0300)]
ravb: kill useless *switch* defaults

The  driver has the *default* case doing nothing in the *switch* statement
with an integer expression -- remove it.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Wed, 17 Feb 2016 20:23:53 +0000 (15:23 -0500)]
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-02-17

This series contains updates to i40e/i40evf only.

Jesse cleans up a duplicate declaration in probe.  Then fixes a bug where the
driver was using a offset based off a DMA handle while mapping and unmapping
using sync_single_range_for_[cpu|device], when it should be using DMA handle
(returned from alloc_coherent) and the offset of the memory to be sync'd.
Fixed an issue where sync_vsi_filter() was allocating memory in a way that
could sleep (GFP_KERNEL) which was causing a problem when called by the
team driver under rcu_read_lock().

Shannon adds a check to ensure we do not attempt to do TSO when
skb->ip_summed is not set to CHECKSUM_PARTIAL.

Kiran add functions related to port mirroring features such as add/delete
mirror rule.

Jacob assigns the i40e_pf structure directly instead of using a large
memcpy, to avoid a sparse warning and lets the compiler optimize the copy
since it know the size of the structure in advance.

Anjali enables GENEVE capability for XL710/X710 devices with firmware API
version higher than 1.4.  Added flag for automatic rule eviction feature
for X722, which is disabled by default.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'amd-xgbe-next'
David S. Miller [Wed, 17 Feb 2016 20:22:21 +0000 (15:22 -0500)]
Merge branch 'amd-xgbe-next'

Tom Lendacky says:

====================
amd-xgbe: AMD XGBE driver updates 2016-02-12

The following updates and fixes are included in this driver update series:

- Disable VLAN filtering in promiscuous mode
- Change from using napi_complete to napi_complete_done
- Use __napi_schedule_irqoff when running in interrupt context
- Verify ethtool speed setting is valid for the selected speedset
- Enable PFC based on the pfc_en setting
- Fix the mapping of priorities to traffic classes
- Do traffic class setup when DCB nl callbacks are invoked
- Check Rx queue fifos before stopping Rx queue DMA
- Switch from disable_irq to masking interrupts for auto-negotiation

This patch series is based on net-next.

Changes from v1:
- Removed #ifndef and #define of CRCPOLY_LE as part of the patch to
  disable VLAN filtering in promiscuous mode
- Reworked changes to xgbe_setup_tc to resolve conflicts with commit
  16e5cc647173 (net: rework setup_tc ndo op to consume general tc operand)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Mask auto-negotiation interrupts in ISR
Lendacky, Thomas [Wed, 17 Feb 2016 17:49:28 +0000 (11:49 -0600)]
amd-xgbe: Mask auto-negotiation interrupts in ISR

Currently the auto-negotiation interrupt handling disables the irq
instead of masking off the interrupts. This was done because the phy
library was originally used to read and write the PCS registers, which
could not be performed in interrupt context. Now that the phy library is
no longer used to read and write the PCS registers the interrupts can be
masked off in the interrupt service routine eliminating the need to call
disable_irq/enable_irq. This also requires changing the protection mutex
to a spinlock.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Check Rx queue fifos before stopping Rx DMA
Lendacky, Thomas [Wed, 17 Feb 2016 17:49:16 +0000 (11:49 -0600)]
amd-xgbe: Check Rx queue fifos before stopping Rx DMA

Check to be sure that the Rx queue fifos are empty before stopping the
Rx DMA channels.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Do traffic class setup when called through dcbnl
Lendacky, Thomas [Wed, 17 Feb 2016 17:49:08 +0000 (11:49 -0600)]
amd-xgbe: Do traffic class setup when called through dcbnl

Currently the netdev traffic class setup is only performed when invoked
through the ndo_setup_tc interface. However, the same setup should be
performed when the dcbnl interface (ieee_setets) is invoked. Rework the
netdev traffic class setup to be invokable through either interface and
also provide the priority to traffic class mapping if available.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Fix the mapping of priorities to traffic classes
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:57 +0000 (11:48 -0600)]
amd-xgbe: Fix the mapping of priorities to traffic classes

The driver is checking the pfc_en field of the ieee_pfc structure to
determine whether to associate a priority with a traffic class. This is
incorrect since the pfc_en field is for determining if PFC is enabled
for a traffic class.

The association of priority to traffic class does not depend on whether
the traffic class is enabled for PFC, so remove that check. Also, the
mapping of priorities to traffic classes should be done when configuring
the traffic classes and not the PFC support so move the priority to traffic
class association from xgbe_config_dcb_pfc to xgbe_config_dcb_tc.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Enable/disable PFC per traffic class
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:48 +0000 (11:48 -0600)]
amd-xgbe: Enable/disable PFC per traffic class

Currently the PFC flow control is enabled on all traffic classes if
one or more traffic classes request it. The PFC enable setting of the
traffic class should be used to determine whether to enable or disable
flow control for the traffic class.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Verify forced speed matches the active speedset
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:39 +0000 (11:48 -0600)]
amd-xgbe: Verify forced speed matches the active speedset

When using ethtool to set the speed for the device, verify that the
specified speed is valid within the active speedset.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Use __napi_schedule_irqoff
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:29 +0000 (11:48 -0600)]
amd-xgbe: Use __napi_schedule_irqoff

Change from calling __napi_schedule to __napi_schedule_irqoff when running
in interrupt context or when called by netpoll with interrupts already
disabled. The Tx timer function will continue to use __napi_schedule.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Change from napi_complete to napi_complete_done
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:19 +0000 (11:48 -0600)]
amd-xgbe: Change from napi_complete to napi_complete_done

Change from using napi_complete to napi_complete_done to allow for the
use of gro_flush_timeout in tuning network processing.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoamd-xgbe: Disable VLAN filtering when in promiscuous mode
Lendacky, Thomas [Wed, 17 Feb 2016 17:48:08 +0000 (11:48 -0600)]
amd-xgbe: Disable VLAN filtering when in promiscuous mode

When the hardware is placed in promiscuous mode it will still perform
VLAN filtering and therefore may not pass all packets to the driver.

Disable all VLAN filtering when entering promiscuous mode and restore
VLAN filtering upon exit from promiscuous mode. In order to avoid adding
forward declarations, move the VLAN related functions earlier in the
file.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agomacvlan: convert to use IFF_NO_QUEUE
Zhang Shengju [Sun, 14 Feb 2016 14:10:39 +0000 (14:10 +0000)]
macvlan: convert to use IFF_NO_QUEUE

Use IFF_NO_QUEUE to indicate that a device can run without a qdisc.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoi40e: use eth_platform_get_mac_address()
Sowmini Varadhan [Wed, 13 Jan 2016 03:32:31 +0000 (19:32 -0800)]
i40e: use eth_platform_get_mac_address()

This commit converts commit b499ffb0a22c ("i40e: Look up MAC address in
Open Firmware or IDPROM") to use eth_platform_get_mac_address()
added by commit c7f5d105495a ("net: Add eth_platform_get_mac_address()
helper.")

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: add priv flag for automatic rule eviction
Anjali Singhai Jain [Sat, 9 Jan 2016 01:50:21 +0000 (17:50 -0800)]
i40e: add priv flag for automatic rule eviction

The X722 can support automatic rule eviction for automatically added
flow director rules.  Feature is (should be) disabled by default.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: Enable Geneve offload for FW API ver > 1.4 for XL710/X710 devices
Anjali Singhai [Wed, 6 Jan 2016 19:49:28 +0000 (11:49 -0800)]
i40e: Enable Geneve offload for FW API ver > 1.4 for XL710/X710 devices

This patch makes sure we check the GENEVE offload capable flag before
we attempt offload.
It also enables the Capability for XL710/X710 devices with FW API
version higher than 1.4

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e/i40evf: bump version to 1.4.12/1.4.8
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:12 +0000 (10:33 -0800)]
i40e/i40evf: bump version to 1.4.12/1.4.8

Bump driver versions to i40e-1.4.12 and i40evf-1.4.8

Change-ID: I0ad82668c4ded04250391fda396ce191a42ab754
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: avoid large memcpy by assigning struct
Jacob Keller [Mon, 4 Jan 2016 18:33:11 +0000 (10:33 -0800)]
i40e: avoid large memcpy by assigning struct

Assign the i40e_pf structure directly instead of using a large memcpy,
which avoids a sparse warning and lets the compiler optimize the copy
since it knows the size of the structure in advance.

Change-ID: I17604e23be2616521eb760290befcb767b52b3f7
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: count allocation errors
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:10 +0000 (10:33 -0800)]
i40e: count allocation errors

Driver already counted allocation errors, so print
them as part of the ethtool -S output.  Useful for debugging
if your system is having trouble making memory available for
the driver.

Change-ID: I83839fa86e81e6d80f03b917c88dd3ef9a64dde0
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: drop unused function
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:09 +0000 (10:33 -0800)]
i40e: drop unused function

Delete the unused irq_dynamic_disable function.

Change-ID: Ia46071066babd121c7c90f141b6210b00078de3f
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Anjali Singhai <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: negate PHY int mask bits
Shannon Nelson [Mon, 4 Jan 2016 18:33:08 +0000 (10:33 -0800)]
i40e: negate PHY int mask bits

The PHY interrupt mask bits mask out the events we don't want,
so we need to negate the bitmask of events we want.

Change-ID: I273244da5a8d285b6abc84fd68a90f1e6fa0393e
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: APIs to Add/remove port mirroring rules
Kiran Patil [Mon, 4 Jan 2016 18:33:07 +0000 (10:33 -0800)]
i40e: APIs to Add/remove port mirroring rules

This patch implements necessary functions related to port
mirroring features such as add/delete mirror rule, function
to set promiscuous VLAN mode for VSI if mirror rule_type is
"VLAN Mirroring".

Change-ID: Iaf513fd5f188f99dcb977b48f99e73185dfddc40
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: fix: do not sleep in netdev_ops
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:06 +0000 (10:33 -0800)]
i40e: fix: do not sleep in netdev_ops

The driver was being called by VLAN, bonding, teaming operations
that expected to be able to hold locks like rcu_read_lock().

This causes the driver to be held to the requirement to not sleep,
and was found by the kernel debug options for checking sleep
inside critical section, and the locking validator.

Change-ID: Ibc68c835f5ffa8ffe0638ffe910a66fc5649a7f7
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Nelson, Shannon <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: allocate memory safer
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:05 +0000 (10:33 -0800)]
i40e: allocate memory safer

The sync_vsi_filter function was allocating memory in such
a way that it could sleep (GFP_KERNEL) which was causing a problem
when called by the team driver under rcu_read_lock(), which cannot
be held while sleeping.  Found with lockdep.

Change-ID: I4e59053cb5eedcf3d0ca151715be3dc42a94bdd5
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: do TSO only if CHECKSUM_PARTIAL is set
Shannon Nelson [Mon, 4 Jan 2016 18:33:04 +0000 (10:33 -0800)]
i40e: do TSO only if CHECKSUM_PARTIAL is set

Don't bother trying to set up a TSO if the skb->ip_summed is not
set to CHECKSUM_PARTIAL.

Change-ID: I6495b3568e404907a2965b48cf3e2effa7c9ab55
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: fix bug in dma sync
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:03 +0000 (10:33 -0800)]
i40e: fix bug in dma sync

Driver was using an offset based off a DMA handle while mapping and
unmapping using sync_single_range_for[cpu|device], where it should
be using DMA handle (returned from alloc_coherent) and the offset of the
memory to be sync'd.

Change-ID: I208256565b1595ff0e9171ab852de06b997917c6
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Nelson, Shannon <shannon.nelson@intel.com>
Reviewed-by: Williams, Mitch A <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: trivial: fix missing space
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:02 +0000 (10:33 -0800)]
i40e: trivial: fix missing space

Missing space in comment, fixed.

Change-ID: I8cdf3ce5994b4a97dcc3eeb33422533918546667
Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: trivial: drop duplicate definition
Jesse Brandeburg [Mon, 4 Jan 2016 18:33:01 +0000 (10:33 -0800)]
i40e: trivial: drop duplicate definition

The probe routine already had a u32 val declared, no need
to do it again.  Found by W=2 compile.

Change-ID: Id7b65f6d0ef6bb71067d0557f5be0202b6d8741e
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next...
David S. Miller [Wed, 17 Feb 2016 14:48:50 +0000 (09:48 -0500)]
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue

Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-02-16

This series contains updates to i40e/i40evf only.

Shannon adds flags to MAC allocation requests to signify that the MAC VLAN
filters should come from the shared resource pool.  Added a new "set switch
config" admin queue command and the new Cisco VXLAN-GPE cloud tunnel type
for the admin queue commands.  Added more detail to the NVM update debug
message in order to see the full ethtool request data.  Also added a few
more bits of netdev data into the debugfs output for dump VSI.

Pandi fixes the width of two datatypes which were being declared a different
size from what they are assigned.

Anjali fixes an issue where we were not doing write-back on interrupt
throttle for legacy case in x722.

Mitch adds a counter for ARQ overflows since sometimes an ever-growing
number indicates that something bad is happening.  Also added 20G speed for
Tx bandwidth calculations.

Jesse refactors the DCB function based on a community suggestion to change
the multi-level if statement into a switch statement.  Cleans up VF device
IDs in the PF, since it does not need to know them.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'tc-hw-offload'
David S. Miller [Wed, 17 Feb 2016 14:47:37 +0000 (09:47 -0500)]
Merge branch 'tc-hw-offload'

John Fastabend says:

====================
tc offload for cls_u32 on ixgbe

This extends the setup_tc framework so it can support more than just
the mqprio offload and push other classifiers and qdiscs into the
hardware. The series here targets the u32 classifier and ixgbe
driver. I worked out the u32 classifier because it is protocol
oblivious and aligns with multiple hardware devices I have access
to. I did an initial implementation on ixgbe because (a) I have one
in my box (b) its a stable driver and (c) it is relatively simple
compared to the other devices I have here but still has enough
flexibility to exercise the features of cls_u32.

I intentionally limited the scope of this series to the basic
feature set. Specifically this uses a 'big hammer' feature bit
to do the offload or not. If the bit is set you get offloaded rules
if it is not then rules will not be offloaded. If we can agree on
this patch series there are some more patches on my queue we can
talk about to make the offload decision per rule using flags similar
to how we do l2 mac updates. Additionally the error strategy can
be improved to be hard aborting, log and continue, etc. I think
these are nice to have improvements but shouldn't block this series.

Also by adding get_parse_graph and set_parse_graph attributes as
in my previous flow_api work we can build programmable devices
and programmatically learn when rules can or can not be loaded
into the hardware. Again future work.

... v3 includes a couple style fixups suggested by Jiri and a
quick fix to ixgbe to check features flag and not dev_features
flag the latter being always set.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: ixgbe: abort with cls u32 divisor groups greater than 1
John Fastabend [Wed, 17 Feb 2016 05:19:19 +0000 (21:19 -0800)]
net: ixgbe: abort with cls u32 divisor groups greater than 1

This patch ensures ixgbe will not try to offload hash tables from the
u32 module. The device class does not currently support this so until
it is enabled just abort on these tables.

Interestingly the more flexible your hardware is the less code you
need to implement to guard against these cases.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: ixgbe: add support for tc_u32 offload
John Fastabend [Wed, 17 Feb 2016 05:18:53 +0000 (21:18 -0800)]
net: ixgbe: add support for tc_u32 offload

This adds initial support for offloading the u32 tc classifier. This
initial implementation only implements a few base matches and actions
to illustrate the use of the infrastructure patches.

However it is an interesting subset because it handles the u32 next
hdr logic to correctly map tcp packets from ip headers using the ihl
and protocol fields. After this is accepted we can extend the match
and action fields easily by updating the model header file.

Also only the drop action is supported initially.

Here is a short test script,

 #tc qdisc add dev eth4 ingress
 #tc filter add dev eth4 parent ffff: protocol ip \
u32 ht 800: order 1 \
match ip dst 15.0.0.1/32 match ip src 15.0.0.2/32 action drop

<-- hardware has dst/src ip match rule installed -->

 #tc filter del dev eth4 parent ffff: prio 49152
 #tc filter add dev eth4 parent ffff: protocol ip prio 99 \
handle 1: u32 divisor 1
 #tc filter add dev eth4 protocol ip parent ffff: prio 99 \
u32 ht 800: order 1 link 1: \
offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff
 #tc filter add dev eth4 parent ffff: protocol ip \
u32 ht 1: order 3 match tcp src 23 ffff action drop

<-- hardware has tcp src port rule installed -->

 #tc qdisc del dev eth4 parent ffff:

<-- hardware cleaned up -->

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: ixgbe: add minimal parser details for ixgbe
John Fastabend [Wed, 17 Feb 2016 05:18:28 +0000 (21:18 -0800)]
net: ixgbe: add minimal parser details for ixgbe

This adds an ixgbe data structure that is used to determine what
headers:fields can be matched and in what order they are supported.

For hardware devices this can be a bit tricky because typically
only pre-programmed (firmware, ucode, rtl) parse graphs will be
supported and we don't yet have an interface to change these from
the OS. So its sort of a you get whatever your friendly vendor
provides affair at the moment.

In the future we can add the get routines and set routines to
update this data structure. One interesting thing to note here
is the data structure here identifies ethernet, ip, and tcp
fields without having to hardcode them as enumerations or use
other identifiers.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: tc: helper functions to query action types
John Fastabend [Wed, 17 Feb 2016 05:18:03 +0000 (21:18 -0800)]
net: tc: helper functions to query action types

This is a helper function drivers can use to learn if the
action type is a drop action.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: add tc offload feature flag
John Fastabend [Wed, 17 Feb 2016 05:17:37 +0000 (21:17 -0800)]
net: add tc offload feature flag

Its useful to turn off the qdisc offload feature at a per device
level. This gives us a big hammer to enable/disable offloading.
More fine grained control (i.e. per rule) may be supported later.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: sched: add cls_u32 offload hooks for netdevs
John Fastabend [Wed, 17 Feb 2016 05:17:09 +0000 (21:17 -0800)]
net: sched: add cls_u32 offload hooks for netdevs

This patch allows netdev drivers to consume cls_u32 offloads via
the ndo_setup_tc ndo op.

This works aligns with how network drivers have been doing qdisc
offloads for mqprio.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: rework setup_tc ndo op to consume general tc operand
John Fastabend [Wed, 17 Feb 2016 05:16:43 +0000 (21:16 -0800)]
net: rework setup_tc ndo op to consume general tc operand

This patch updates setup_tc so we can pass additional parameters into
the ndo op in a generic way. To do this we provide structured union
and type flag.

This lets each classifier and qdisc provide its own set of attributes
without having to add new ndo ops or grow the signature of the
callback.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: rework ndo tc op to consume additional qdisc handle parameter
John Fastabend [Wed, 17 Feb 2016 05:16:15 +0000 (21:16 -0800)]
net: rework ndo tc op to consume additional qdisc handle parameter

The ndo_setup_tc() op was added to support drivers offloading tx
qdiscs however only support for mqprio was ever added. So we
only ever added support for passing the number of traffic classes
to the driver.

This patch generalizes the ndo_setup_tc op so that a handle can
be provided to indicate if the offload is for ingress or egress
or potentially even child qdiscs.

CC: Murali Karicheri <m-karicheri2@ti.com>
CC: Shradha Shah <sshah@solarflare.com>
CC: Or Gerlitz <ogerlitz@mellanox.com>
CC: Ariel Elior <ariel.elior@qlogic.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Bruce Allan <bruce.w.allan@intel.com>
CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoi40e/i40evf: Bump i40e to 1.4.11 and i40evf to 1.4.7
Catherine Sullivan [Wed, 23 Dec 2015 20:05:56 +0000 (12:05 -0800)]
i40e/i40evf: Bump i40e to 1.4.11 and i40evf to 1.4.7

Bump.

Change-ID: I21aa520a3c8c5f4f562a98019bf8b76b3706c480
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: trivial: remove unnecessary local var
Jesse Brandeburg [Wed, 23 Dec 2015 20:05:55 +0000 (12:05 -0800)]
i40e: trivial: remove unnecessary local var

Probe routine already has too many locals, just convert one
used for kzalloc into a kcalloc, eliminating the local.

Change-ID: I349049872b71f858cbeb91ad7836e6767fc7b7d1
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Anjali Singhai <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: remove VF device IDs from PF
Jesse Brandeburg [Wed, 23 Dec 2015 20:05:54 +0000 (12:05 -0800)]
i40e: remove VF device IDs from PF

The PF doesn't need to know about the VF's device IDs, so remove them.

Change-ID: I62cf0e0fffa1ace586e58e00bc271b10ae440f05
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: add netdev info to VSI dump
Shannon Nelson [Wed, 23 Dec 2015 20:05:53 +0000 (12:05 -0800)]
i40e: add netdev info to VSI dump

Add a few more bits of netdev data into the debugfs output for dump VSI.
For now, we'll add the features, hw_features, vlan_features, and flags
bitflags and the state. More could be added later if needed.

Also, tweak a couple nearby output lines for output readability.

Change-ID: I9fb5a9da75c9ad7679498ce9ac3ba24d065ddd2e
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Reviewed-by: Brandeburg, Jesse <jesse.brandeburg@intel.com>
Reviewed-by: Wyborny, Carolyn <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40evf: enable bus master after reset
Mitch Williams [Wed, 23 Dec 2015 20:05:52 +0000 (12:05 -0800)]
i40evf: enable bus master after reset

If the VF is reset via VFLR, the device will be knocked out of bus
master mode, and the driver will fail to recover from the reset. Fix
this by enabling bus mastering after every reset. In a non-VFLR case,
the bus master bit will not be disabled, and this call will have no effect.

Change-ID: Id515859ac7a691db478222228add6d149e96801a
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: add a little more to an NVM update debug message
Shannon Nelson [Wed, 23 Dec 2015 20:05:51 +0000 (12:05 -0800)]
i40e: add a little more to an NVM update debug message

Add a little more detail to an NVM update debug message in order to
see the full ethtool request data.

Change-ID: Iab10437cb32d6fddc67ee347e7c0b42511e152cd
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: refactor DCB function
Jesse Brandeburg [Wed, 23 Dec 2015 20:05:50 +0000 (12:05 -0800)]
i40e: refactor DCB function

This is a simple refactor suggested by the community
to change a multi-level if statement into a switch.

Change-ID: I831cf3c40426022220aa9b43990022d22dfd50db
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: add 20G speed for Tx bandwidth calculations
Mitch Williams [Wed, 23 Dec 2015 20:05:49 +0000 (12:05 -0800)]
i40e: add 20G speed for Tx bandwidth calculations

When calculating TX bandwidth for VFs, we need to know the link speed to
make sure we don't allocate more bandwidth than is available. Add 20G
link speed to the switch statement so we can support devices that link
at that speed.

Change-ID: I5409f6139d549e5832777db9c22ca0664e0c5f8b
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: add counter for arq overflows
Mitch Williams [Wed, 23 Dec 2015 20:05:48 +0000 (12:05 -0800)]
i40e: add counter for arq overflows

Sometimes, ARQ overflows are a big deal and tell us that the
firmware/hardware/driver/something is having problems. But normally
they're no big deal. To assist in assessing this, add a counter to
our Ethtool stats. A handful of ARQ overflows during VF init is no
problem. A large, ever-growing number indicates that Something Bad is
happening.

Change-ID: Ie5348bfbc8a54a890559cb00279c28d976a55096
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: fix write-back-on-itr to work with legacy itr
Anjali Singhai Jain [Wed, 23 Dec 2015 20:05:47 +0000 (12:05 -0800)]
i40e: fix write-back-on-itr to work with legacy itr

We were not doing write-back on interrupt throttle for Legacy case in X722.
This patch fixes that, so we do WB_ON_ITR for Legacy as well. Plus the issue
that we should still be setting NO_ITR if we are touching the DYN_CTLN register
since we do not want to change ITR setting here.

Change-ID: I5db8491ee1544118a389db839cecc93e1bbc480e
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: Store lan_vsi_idx and lan_vsi_id in the right size
Pandi Maharajan [Wed, 23 Dec 2015 20:05:46 +0000 (12:05 -0800)]
i40e: Store lan_vsi_idx and lan_vsi_id in the right size

lan_vsi_idx and lan_vsi_id are assigned to u16 data sized variables but
declared in u8. This patch fixes the width of the datatype.

Change-ID: If4bcbcc7d32f2b287c51cb33d17879691258dce2
Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: Bump AQ minor version to 1.5 for new FW features
Shannon Nelson [Wed, 23 Dec 2015 20:05:45 +0000 (12:05 -0800)]
i40e: Bump AQ minor version to 1.5 for new FW features

Bump AQ minor version to 1.5 for new FW features.

Change-ID: I5a790f7f519a2a8921aaa1c5663727dd1897ffec
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoi40e: AQ thermal sensor control struct
Shannon Nelson [Wed, 23 Dec 2015 20:05:44 +0000 (12:05 -0800)]
i40e: AQ thermal sensor control struct

Add the new AQ command and struct for managing a thermal sensor.

Change-ID: I6f5631839a0f3dca352a6c222f1269a960e2310a
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agoMerge branch 'ip-sysctl-namespaceify'
David S. Miller [Wed, 17 Feb 2016 01:42:55 +0000 (20:42 -0500)]
Merge branch 'ip-sysctl-namespaceify'

Nikolay Borisov says:

====================
Namespacify various ip sysctl knobs

This series continues namespacifying more net related knobs.
The focus here is on ip options. Patches 1,3,4,5 namespacify
the respective sysctl knobs. Patch 2 moves some igmp code to the
correct file (and function) and also adds some #ifdef guards to
silence compilation warnings.

Finally, patch 5 exposes the ip fragmentation related sysctls
since all of the knobs are namespaced.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: Export ip fragment sysctl to unprivileged users
Nikolay Borisov [Mon, 15 Feb 2016 10:11:32 +0000 (12:11 +0200)]
net: Export ip fragment sysctl to unprivileged users

Now that all the ip fragmentation related sysctls are namespaceified
there is no reason to hide them anymore from "root" users inside
containers.

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv4: namespacify ip fragment max dist sysctl knob
Nikolay Borisov [Mon, 15 Feb 2016 10:11:31 +0000 (12:11 +0200)]
ipv4: namespacify ip fragment max dist sysctl knob

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv4: namespacify ip_early_demux sysctl knob
Nikolay Borisov [Mon, 15 Feb 2016 10:11:30 +0000 (12:11 +0200)]
ipv4: namespacify ip_early_demux sysctl knob

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv4: Namespacify ip_dynaddr sysctl knob
Nikolay Borisov [Mon, 15 Feb 2016 10:11:29 +0000 (12:11 +0200)]
ipv4: Namespacify ip_dynaddr sysctl knob

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoigmp: net: Move igmp namespace init to correct file
Nikolay Borisov [Mon, 15 Feb 2016 10:11:28 +0000 (12:11 +0200)]
igmp: net: Move igmp namespace init to correct file

When igmp related sysctl were namespacified their initializatin was
erroneously put into the tcp socket namespace constructor. This
patch moves the relevant code into the igmp namespace constructor to
keep things consistent.

Also sprinkle some #ifdefs to silence warnings

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoipv4: Namespaceify ip_default_ttl sysctl knob
Nikolay Borisov [Mon, 15 Feb 2016 10:11:27 +0000 (12:11 +0200)]
ipv4: Namespaceify ip_default_ttl sysctl knob

Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge tag 'wireless-drivers-next-for-davem-2016-02-12' of git://git.kernel.org/pub...
David S. Miller [Wed, 17 Feb 2016 01:38:29 +0000 (20:38 -0500)]
Merge tag 'wireless-drivers-next-for-davem-2016-02-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
Major changes:

wl12xx

* add device tree support for SPI

mwifiex

* add debugfs file to read chip information
* add MSIx support for newer pcie chipsets (8997 onwards)
* add schedule scan support
* add WoWLAN net-detect support
* firmware dump support for w8997 chipset

iwlwifi

* continue the work on multiple Rx queues
* add support for beacon storing used in low power states
* use the regular firmware image of WoWLAN
* fix 8000 devices for Big Endian machines
* more firmware debug hooks
* add support for P2P Client snoozing
* make the beacon filtering for AP mode configurable
* fix transmit queues overflow with LSO

libertas

* add support for setting power save via cfg80211
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: phy: spi_ks8995: include linux/gpio/consumer.h
Arnd Bergmann [Fri, 12 Feb 2016 10:42:34 +0000 (11:42 +0100)]
net: phy: spi_ks8995: include linux/gpio/consumer.h

The ks8995 phy driver just started using gpiod_* functions, which are
declared in linux/gpio/consumer.h, not linux/gpio.h, resulting in a
build failure in randconfig builds that do not have CONFIG_GPIOLIB
enabled:

drivers/net/phy/spi_ks8995.c: In function 'ks8995_probe':
drivers/net/phy/spi_ks8995.c:477:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]

This changes the header inclusion so it builds in all configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cd6f288cbaab ("net: phy: spi_ks8995: add support for resetting switch using GPIO")
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoi40e: AQ Add VXLAN-GPE tunnel type
Shannon Nelson [Wed, 23 Dec 2015 20:05:43 +0000 (12:05 -0800)]
i40e: AQ Add VXLAN-GPE tunnel type

Add the new Cisco VXLAN-GPE cloud tunnel type for the Add Cloud Filter
and UDP tunnel AQ commands.

Change-ID: I2c093c7d79726c7fca08a36e5c63581a905da3d2
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
8 years agotcp: add tcpi_min_rtt and tcpi_notsent_bytes to tcp_info
Eric Dumazet [Fri, 12 Feb 2016 06:02:53 +0000 (22:02 -0800)]
tcp: add tcpi_min_rtt and tcpi_notsent_bytes to tcp_info

tcpi_min_rtt reports the minimal rtt observed by TCP stack for the flow,
in usec unit. Might be ~0U if not yet known.

tcpi_notsent_bytes reports the amount of bytes in the write queue that
were not yet sent.

This is done in a single patch to not add a temporary 32bit padding hole
in tcp_info.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge branch 'unified-tunnel-dst-caching'
David S. Miller [Wed, 17 Feb 2016 01:21:49 +0000 (20:21 -0500)]
Merge branch 'unified-tunnel-dst-caching'

Paolo Abeni says:

====================
net: unify dst caching for tunnel devices

This patch series try to unify the dst cache implementations currently
present in the kernel, namely in ip_tunnel.c and ip6_tunnel.c, introducing a
new generic implementation, replacing the existing ones, and then using
the new implementation in other tunnel devices which currently lack it.

The new dst implementation is compiled, as built-in, only if any device using
it is enabled.

Caching the dst for the tunnel remote address gives small, but measurable,
performance improvement when tunneling over ipv4 (in the 2%-4% range) and
significant ones when tunneling over ipv6 (roughly 60% when no
fragmentation/segmentation take place and the tunnel local address
is not specified).

v2:
- move the vxlan dst_cache usage inside the device lookup functions
- fix usage after free for lwt tunnel moving the dst cache storage inside
  the dst_metadata,
- sparse codying style cleanup
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet/ipv4: add dst cache support for gre lwtunnels
Paolo Abeni [Fri, 12 Feb 2016 14:43:59 +0000 (15:43 +0100)]
net/ipv4: add dst cache support for gre lwtunnels

In case of UDP traffic with datagram length below MTU this
gives about 4% performance increase

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Suggested-and-Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>