Commit Graph

58165 Commits

Author SHA1 Message Date
Jiri Benc 288b01c8c4 vxlan: clean up rx error path
When there are unrecognized flags present in the vxlan header, it doesn't
make much sense to return the packet for further UDP processing, especially
considering that for other invalid flag combinations we drop the packet
because of previous checks.

This means we return positive value only at the beginning of the function
where tun_dst is not yet allocated. This allows us to get rid of the
bad_flags and error jump labels.

When we're dropping packet, we need to free tun_dst now.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:12 -05:00
Jiri Benc f14ecebb3a vxlan: clean up extension handling on rx
Bring the extension handling to a single place and move the actual handling
logic out of vxlan_udp_encap_recv as much as possible.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:12 -05:00
Jiri Benc 3288af0892 vxlan: move GBP header parsing to a separate function
To make vxlan_udp_encap_recv shorter and more comprehensible.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:12 -05:00
Jiri Benc be5cfeab8f vxlan: simplify vxlan_remcsum
Part of the parameters is not needed. Simplify the caller of this function
in preparation of making vxlan rx more comprehensible.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:11 -05:00
Jiri Benc 54bfd872bf vxlan: keep flags and vni in network byte order
Prevent repeated conversions from and to network order in the fast path.

To achieve this, define all flag constants in big endian order and store VNI
as __be32. To prevent confusion between the actual VNI value and the VNI
field from the header (which contains additional reserved byte), strictly
distinguish between "vni" and "vni_field".

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:11 -05:00
Jiri Benc d4ac05ff36 vxlan: introduce vxlan_hdr
Currently, pointer to the vxlan header is kept in a local variable. It has
to be reloaded whenever the pskb pull operations are performed which usually
happens somewhere deep in called functions.

Create a vxlan_hdr function and use it to reference the vxlan header
instead.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:52:11 -05:00
David S. Miller d8ef034730 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 (again).

Jesse moves sync_vsi_filters() up in the service_task because it may need
to request a reset, and we do not want to wait another round of service
task time.  Refactored the enable_icr0() in order to allow it to be
decided by the caller whether the CLEARPBA (clear pending events) bit will
be set while re-enabling the interrupt.  Also provides the "Don't Give Up"
patch, where the driver will keep polling trying to allocate receive buffers
until it succeeds.  This should keep all receive queues running even in
the face of memory pressure.  Cleans up the debugging helpers by putting
everything in hex to be consistent.

Neerav updates the DCB firmware version related checkes specific to X710
and XL710 only since the checks are not required for X722 devices.

Shannon adds the use of the new shared MAC filter bit for multicast and
broadcast filters in order to make better use of the filters available
from the device.  Added a parameter to allow the driver to set the
enable/disable of statistics gathering in the hardware switch.  Also the
L2 cloud filtering parameter is removed since it was never used.

Anjali refactors the force_wb and WB_ON_ITR functionality since
Force-WriteBack functionality in X710/XL710 devices has been moved out of
the clean routine and into the service task, so we need to make sure
WriteBack-On-ITR is separated out since it is still called from clean.

Catherine changes the VF driver string to reflect all the products that
are supported.

Mitch refactors the packet split receive code to properly use half-pages
for receives.  Also changes the use of bitwise operators to logical
operators on clean_complete variable, while making a witty reference to
Mr. Spock.  Cleans up (i.e. removes) the hsplit field in the ring
structure and use the existing macro to detect packet split enablement,
which allows debugfs dumps of the VSI to properly show which recevie
routine is in use.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-17 23:47:32 -05:00
Jiri Pirko fccd84d449 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>
2016-02-17 23:08:35 -05:00
Jiri Pirko 3fbcdbf3f1 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>
2016-02-17 23:08:35 -05:00
Jiri Pirko 53901cc03a 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>
2016-02-17 23:08:35 -05:00
Jiri Pirko ae3907eced 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>
2016-02-17 23:08:35 -05:00
Jiri Pirko ca0a5f2a39 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko c1fe922e15 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko e420114eef 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko 0514c4e809 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko e1ba3dee77 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko de1521923c 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko 11ce2ba3d0 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko 0fe685f6a2 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>
2016-02-17 23:08:34 -05:00
Jiri Pirko b15edf852a 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>
2016-02-17 23:08:34 -05:00
Iyappan Subramanian 107dec2749 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>
2016-02-17 22:08:34 -05:00
Iyappan Subramanian fc4262d2aa 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>
2016-02-17 22:08:34 -05:00
Iyappan Subramanian 76f94a9c77 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>
2016-02-17 22:08:34 -05:00
John Fastabend a92265ce1c ixgbe: fix dates on header of ixgbe_model.h
Fixes: 9d35cf062e ("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>
2016-02-17 21:44:12 -05:00
John Fastabend fa477f4cb3 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: 9d35cf062e ("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>
2016-02-17 21:44:12 -05:00
Jesse Brandeburg c24215c04f i40e/i40evf: Bump version
Bump version to i40e-1.4.13 and i40evf-1.4.9

Change-ID: I9db37f9d4899141c3e5455dfb456d45465b8c035
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>
2016-02-17 15:34:55 -08:00
Mitch Williams 4668607aa3 i40e: properly show packet split status in debugfs
Get rid of the unused hsplit field in the ring struct and use the
existing macro to detect packet split enablement. This allows debugfs
dumps of the VSI to properly show which Rx routine is in use.

Change-ID: Ic4e9589e6a788ab196ed0850703f704e30c03781
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>
2016-02-17 15:31:01 -08:00
Mitch Williams 1a36d7fadd i40e/i40evf: use logical operators, not bitwise
Mr. Spock would certainly raise an eyebrow to see us using bitwise
operators, when we should clearly be relying on logic. Fascinating.

Change-ID: Ie338010c016f93e9faa2002c07c90b15134b7477
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>
2016-02-17 15:26:48 -08:00
Mitch Williams f16704e5e8 i40e/i40evf: use pages correctly in Rx
Refactor the packet split Rx code to properly use half-pages for
receives. The previous code was doing way more mapping and unmapping
than it needed to, and wasn't properly using half-pages.

Increment the page use count each time we give a half-page to an skb,
knowing that the stack will probably process and release the page before
we need it again. Only free and reallocate pages if the count shows that
both half-pages are in use. Add counters to track reallocations and page
reuse.

Change-ID: I534b299196036b64be82b4861a0a4036310a8f22
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>
2016-02-17 15:22:22 -08:00
Jesse Brandeburg dd1a5df872 i40e/i40evf: use __GFP_NOWARN
The i40e and i40evf drivers now cleanly handle allocation
failures and can avoid kernel log spew from the memory allocator
when allocations fail, so set __GFP_NOWARN on Rx buffer alloc.

Change-ID: Ic9e1b83c495e2a3ef6b069ba7fb6e52ce134cd23
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>
2016-02-17 15:15:37 -08:00
Jesse Brandeburg 13cb3e9d71 i40e: dump descriptor indexes in hex
The debugging helpers for showing descriptor rings were
dumping the indexes in decimal and the offsets in hex.

Put everything in hex and at least be consistent.

Also update copyright year in file header.

Change-ID: Ia35a21411a2ddb713772dffb4e8718889fcfc895
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>
2016-02-17 15:11:16 -08:00
Jesse Brandeburg c2e245ab1e i40e/i40evf: try again after failure
This is the "Don't Give Up" patch.  Previously the
driver could fail an allocation, and then possibly stall
a queue forever, by never coming back to continue receiving
or allocating buffers.

With this patch, the driver will keep polling trying to allocate
receive buffers until it succeeds.  This should keep all receive
queues running even in the face of memory pressure.

Also update copyright year in file header.

Change-ID: I2b103d1ce95b9831288a7222c3343ffa1988b81b
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>
2016-02-17 14:43:48 -08:00
Jesse Brandeburg 40d72a5098 i40e/i40evf: don't lose interrupts
While re-enabling interrupts the driver would clear all pending
causes. This meant that if an interrupt was generated while the driver
was cleaning or polling with interrupts disabled, then that interrupt
was lost.  This could cause a queue to become dead, especially for
receive.  Refactored the enable_icr0 function in order to allow
it to be decided by the caller whether the CLEARPBA (clear pending
events) bit will be set while re-enabling the interrupt.

Also update copyright year in file headers.

Change-ID: Ic1db100a05e13c98919057696db147a258ca365a
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>
2016-02-17 14:39:07 -08:00
Catherine Sullivan eaab59e9d2 i40evf: Change vf driver string to reflect all products i40evf supports
Change the driver string to 40-10 Gigabit instead of XL710/X710 for X722
and all future products.

Also update copyright year in file header.

Change-ID: I57fae656b36dc4eb682b2b7a054f8f48f3589149
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>
2016-02-17 14:35:22 -08:00
Anjali Singhai Jain ecc6a239e8 i40e: Refactor force_wb and WB_ON_ITR functionality code
Now that the Force-WriteBack functionality in X710/XL710 devices
has been moved out of the clean routine and into the service task,
we need to make sure WriteBack-On-ITR is separated out since it
is still called from clean.

In the X722 devices, Force-WriteBack implies WriteBack-On-ITR but
without the interrupt, which put the driver into a missed
interrupt scenario and a potential tx-timeout report.

With this patch, we break the two functions out, and call the
appropriate ones at the right place. This will avoid creating missed
interrupt like scenarios for X722 devices.

Also update copyright year in file headers.

Change-ID: Iacbde39f95f332f82be8736864675052c3583a40
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>
2016-02-17 14:31:12 -08:00
Shannon Nelson 66fc360a0e i40e: use new add_veb calling with VEB stats control
The new parameters for add_veb allow us to enable and disable VEB stats,
so let's use them.

Update copyright year.

Change-ID: Ie6e68c68e2d1d459e42168eda661051b56bf0a65
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>
2016-02-17 14:18:53 -08:00
Shannon Nelson 8a187f448e i40e: add VEB stat control and remove L2 cloud filter
With the latest firmware, statistics gathering can now be enabled and
disabled in the HW switch, so we need to add a parameter to allow the
driver to set it as desired.  At the same time, the L2 cloud filtering
parameter has been removed as it was never used.

Older drivers working with the newer firmware and newer drivers working
with older firmware will not run into problems with these bits as the
defaults are reasonable and there is no overlap in the bit definitions.
Also, newer drivers will be forced to update because of the change in
function call parameters, a reminder that the functionality exists.

Also update copyright year.

Change-ID: I9acb9160b892ca3146f2f11a88fdcd86be3cadcc
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>
2016-02-17 14:07:54 -08:00
Shannon Nelson 67be6eb247 i40e: set shared bit for multicast filters
Add the use of the new Shared MAC filter bit for multicast and broadcast
filters in order to make better use of the filters available from the
device.  The FW folks have assured me that setting this bit on older FW
will have no affect, so we don't need a version check.

Also fixed a stray indent problem nearby.

Also update copyright year.

Change-ID: I4c5826a32594382a7937a592a24d228588cee7aa
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>
2016-02-17 14:02:31 -08:00
Neerav Parikh f1bbad339c i40e: Make the DCB firmware checks for X710/XL710 only
Make the DCB firmware version related checks specific to
X710 and XL710 only. These checks are not required for
X722 family of devices.

Introduced an inline routine to help determine if the
MAC type is X710/XL710 or not.

Moved the firmware version related checks in i40e_sw_init()
and defined flags for different cases

Fix the version check to allow using "Set LLDP MIB" AQ
for beyond FVL4 FW releases.

Change-ID: Ib78288343de983aa0354fc28aa36e99b073662c0
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-02-17 13:58:45 -08:00
Jesse Brandeburg 2818ccd956 i40e: move sync_vsi_filters up in service_task
The sync_vsi_filters function is moved up in the service_task because
it may need to request a reset, and we don't want to wait another round
of service task time.

NOTE: Filters will be replayed by sync_vsi_filters including broadcast
and promiscuous settings.

Also, added some error handling in this space in case any of these
fail the driver will retry correctly.

Also update copyright year.

Change-ID: I23f3d552100baecea69466339f738f27614efd47
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>
2016-02-17 13:53:45 -08:00
Ben Hutchings a4f9cdb2b4 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>
2016-02-17 16:15:45 -05:00
Yuval Mintz fc48b7a614 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>
2016-02-17 16:04:42 -05:00
Sergei Shtylyov 82c133093c 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>
2016-02-17 15:30:23 -05:00
Sergei Shtylyov bb64b035f8 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>
2016-02-17 15:30:23 -05:00
David S. Miller 2069230401 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>
2016-02-17 15:23:53 -05:00
Lendacky, Thomas ced3fcae69 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>
2016-02-17 15:22:20 -05:00
Lendacky, Thomas c3727d61ea 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>
2016-02-17 15:22:20 -05:00
Lendacky, Thomas b3b715974b 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>
2016-02-17 15:22:20 -05:00
Lendacky, Thomas 6a49ee4e1b 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>
2016-02-17 15:22:19 -05:00
Lendacky, Thomas 8dba2a2a88 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>
2016-02-17 15:22:19 -05:00