1
0
Fork 0
Commit Graph

378 Commits (41a1d04b9d2006fdac5cab7680cff89915610944)

Author SHA1 Message Date
Jesse Brandeburg 41a1d04b9d i40e: use BIT and BIT_ULL macros
Use macros for abstracting (1 << foo) to BIT(foo)
and (1ULL << foo64) to BIT_ULL(foo64) in order to match
better with kernel requirements.

NOTE: the adminq_cmd.h file was not modified on purpose because
of the dependency upon firmware for that file.

Change-ID: I73ee2e48c880d671948aad19bd53ca6b2ac558fc
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-23 05:33:55 -07:00
Shannon Nelson f1c7e72e39 i40e: clean up error status messages
Clean up a little confusion in reporting error status in phy and fcoe
setup error reports by separating the return status from the AQ error.

Add two decoder functions to make this easier.

Change-ID: I960bcdeef3978a15fec1cdb5eff781d5cbae42fb
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-23 05:31:35 -07:00
Catherine Sullivan 76945bf9ff i40e/i40evf: Bump version to 1.3.6 for i40e and 1.3.2 for i40evf
Bump.

Change-ID: I84573d9fa51effc5b29bf5b8c74e3cc8b2673f48
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:43 -07:00
Anjali Singhai Jain b2a75c5819 i40e: Refine an error message to avoid confusion
Change a warning message to indicate what may have really happened when
the init_shared_code call fails.

Change-ID: I616ace40fed120d0dec86dfc91ab2d7cde466904
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:43 -07:00
Carolyn Wyborny 9df70b6641 i40e: Remove incorrect #ifdef's
This patch removes some #ifdef's that should not be there. They
were stopping code that is needed from being compiled in.

With these #ifdef's removed, changes are needed in the driver
to fix some compile errors: adding missing parameters to
the definition of ndo_bridge_setlink and a ndo_dflt_brige_getlink call.

Change-ID: I5516614e1bc50b6bca0647cef971bc96161ba2de
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:41 -07:00
Pawel Orlowski c78b953e0f i40e/i40evf: Update Flex-10 related device/function capabilities
The Flex10 device/function capability has been upgraded to include
information needed to support Flex-10 configurations. This patch adds new
fields to the i40e_hw_capabilities structure and updates
i40e_parse_discover_capabilities functions to extract them from the AQ
response. Naming convention has changed to use flex10 mode instead of
existing mfp_mode_1.

Change-ID: I305dd888866985a30293acb3fb14fa43ca6b79ea
Signed-off-by: Pawel Orlowski <pawel.orlowski@intel.com>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:40 -07:00
Anjali Singhai Jain d0389e51fc i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state
Since the driver can dynamically enable/disable FD ATR and SB features,
these stats help keep track of the current state and along with
fd_flush count provide a means to debug what could be going on
with the flow director filters. This will take away the need for
being verbose in our debug logs with respect to FD.

Change-ID: I29224f750fe6602391043655d18996570720377d
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:40 -07:00
Joe Stringer f44a75e27d i40e: Implement ndo_features_check()
i40e supports UDP tunnel headers up to 80 bytes in length, so
this adds a check to ensure that it doesn't try to offload
packets that exceed that.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-07-14 18:26:40 -07:00
Scott Feldman 7d4f8d871a switchdev; add VLAN support for port's bridge_getlink
One more missing piece of the puzzle.  Add vlan dump support to switchdev
port's bridge_getlink.  iproute2 "bridge vlan show" cmd already knows how
to show the vlans installed on the bridge and the device , but (until now)
no one implemented the port vlan part of the netlink PF_BRIDGE:RTM_GETLINK
msg.  Before this patch, "bridge vlan show":

	$ bridge -c vlan show
	port    vlan ids
	sw1p1    30-34			<< bridge side vlans
		 57

	sw1p1				<< device side vlans (missing)

	sw1p2    57

	sw1p2

	sw1p3

	sw1p4

	br0     None

(When the port is bridged, the output repeats the vlan list for the vlans
on the bridge side of the port and the vlans on the device side of the
port.  The listing above show no vlans for the device side even though they
are installed).

After this patch:

	$ bridge -c vlan show
	port    vlan ids
	sw1p1    30-34			<< bridge side vlan
		 57

	sw1p1    30-34			<< device side vlans
		 57
		 3840 PVID

	sw1p2    57

	sw1p2    57
		 3840 PVID

	sw1p3    3842 PVID

	sw1p4    3843 PVID

	br0     None

I re-used ndo_dflt_bridge_getlink to add vlan fill call-back func.
switchdev support adds an obj dump for VLAN objects, using the same
call-back scheme as FDB dump.  Support included for both compressed and
un-compressed vlan dumps.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-23 06:56:18 -07:00
David S. Miller 941742f497 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-08 20:06:56 -07:00
Anjali Singhai Jain fa11cb3d16 i40e: Make sure to be in VEB mode if SRIOV is enabled at probe
If SRIOV is enabled we need to be in VEB mode not VEPA mode at probe.
This fixes an NPAR bug when SRIOV is enabled in the BIOS.

Change-ID: Ibf006abafd9a0ca3698ec24848cd771cf345cbbc
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-06-04 20:14:23 -07:00
Anjali Singhai Jain fc60861e9b i40e: start up in VEPA mode by default
The patch fixes a bug in the default configuration which
prevented a software bridge loaded on the PF interface from
working correctly because broadcast packets are incorrectly
looped back.

Fix the general case, by loading the driver in VEPA mode Until a
VF or VMDq VSI is added. This way loopback on the Main VSI is
turned off until needed and can resolve the issue of unnecessary
reflection for users that do not have VF or VMDq VSIs setup.

The driver must now coordinate the loopback setting for the Flow
Director (FDIR) VSI to make sure it is in sync with the current
VEB or VEPA mode setting.

The user can still switch bridge modes from the bridge commands and
choose to be in VEPA mode with VF VSIs. Because of hardware
requirements, the call to switch to VEB mode when no VF/VMDqs are
present will be rejected.

NOTE: This patch uses BIT_ULL as that is preferred going forward,
a followup patch in the lower priority queue to net-next will fix
up the remaining 1 << usages.

Change-ID: Ib121ddb18fe4b3c4f52e9deda6fcbeb9105683d1
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-06-04 20:10:30 -07:00
Catherine Sullivan f029094e49 i40e: Bump version to 1.3.4
Bump.

Change-ID: I54ec2787a9fead5e18447078f26e5dd27f01da44
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:46:23 -07:00
Anjali Singhai Jain 2e4875e38c i40e: Move the FD ATR/SB messages to a higher debug level
These are not useful unless SV is happening as there is a FD flush counter
that tracks this.

Change-ID: If2655b5a29687247d03a51d35f69854bbeb711ce
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:40:23 -07:00
Anjali Singhai Jain 0bf4b1b0c3 i40e: Remove unnecessary pf members
We can use the stat index macro directly, a variable is not required.

Change-ID: I19f08ac16353dc0cd87a1a8248d714e15a54aa8a
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:38:20 -07:00
Anjali Singhai Jain 60ccd45cba i40e/i40evf: Add stats to count Tunnel ATR hits
Add a 3rd dynamic filter counter to track Tunneled ATR hits separately.
Ethtool port stat "fdir_atr_tunnel_match"

Change-ID: Idd978b6db2a462b5722397cd2ffd04ef055f8655
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:38:00 -07:00
Neerav Parikh e120814d74 i40e: Collect PFC XOFF RX stats even in single TC case
When PFC is enabled for any UP in single TC configuration the driver didn't
collect the PFC XOFF RX stats. Though a single TC with PFC enabled is not a
common scenario do not prevent the driver from collecting stats if firmware
indicates that PFC is enabled.

Change-ID: Ie20bd58b07608b528f3c6d95894c9ae56b00077a
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:35:27 -07:00
Nicolas Dichtel 46c264daaa bridge/nl: remove wrong use of NLM_F_MULTI
NLM_F_MULTI must be used only when a NLMSG_DONE message is sent. In fact,
it is sent only at the end of a dump.

Libraries like libnl will wait forever for NLMSG_DONE.

Fixes: e5a55a8987 ("net: create generic bridge ops")
Fixes: 815cccbf10 ("ixgbe: add setlink, getlink support to ixgbe and ixgbevf")
CC: John Fastabend <john.r.fastabend@intel.com>
CC: Sathya Perla <sathya.perla@emulex.com>
CC: Subbu Seetharaman <subbu.seetharaman@emulex.com>
CC: Ajit Khaparde <ajit.khaparde@emulex.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: intel-wired-lan@lists.osuosl.org
CC: Jiri Pirko <jiri@resnulli.us>
CC: Scott Feldman <sfeldma@gmail.com>
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: bridge@lists.linux-foundation.org
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-29 14:59:16 -04:00
Catherine Sullivan 2aea6dcb78 i40e: Bump version to 1.3.2
Bump.

Change-ID: Id14baae72332d0f1a9bc5d351ea1a85cb0295ec3
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-14 21:19:39 -07:00
Jesse Brandeburg c1147280d2 i40e: handle possible memory allocation failure
The init_interrupt_scheme function had a possible failure
path to allocate memory that was found by smatch.

This adds the correct handling to the function to abort
probe if the memory allocation fails.

Change-ID: I2bf1d826a244209619da4c452d0d58b3eb5e26a3
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-14 20:32:47 -07:00
Catherine Sullivan 42d255ce43 i40e: Bump to version 1.3.1
Bump.

Change-ID: I7dc88baa33264e5919bc938adf76706573209432
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:32 -07:00
Anjali Singhai Jain fdf0e0bfc3 i40e: Communicate VSI id in place of VSI index to the VFs
This does not affect the Virtual channel API as such but it changes the
meaning of what is communicated to the VSI resource struct as vsi_id.
Earlier vsi_idx was being passed in, which was the index in the PF's VSI
array. Now we pass vsi_id as communicated by the FW to the driver.
This will help with future expansion of VF and FW communication.

With this in place now the VF and Virtual channel driver change to move over
to VSI id use is complete and is validated.

Change-ID: I14246ef82b3b3dc1fa76291d2dd0c05d12cedb7c
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:31 -07:00
Mitch Williams 3932dbfe1e i40e: stop flow director on shutdown
In some cases, the hardware would continue to try to access the FDIR
ring after entering D3Hot state, which would cause either PCIe errors or
NMIs, depending upon system configuration.

Explicitly stop FDIR in our shutdown routine to eliminate this
possibility.

Change-ID: Ib98060d6352ec595ab9a78bfe252675a9fa5d8bc
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:31 -07:00
Shannon Nelson c22c06c8d1 i40e: fix up VXLAN messages
When the VXLAN ports are added and removed, the messaging was giving some
bogus index info, the port was always '0' for the delete, and the message
text style didn't match other messages in the driver.  Also, there was an
over-use of the tertiary statement which made reading a little harder
than necessary.

Change-ID: Ie805182a697b8b4c12024403ada87fd4e4fa2358
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:31 -07:00
Jesse Brandeburg 1a2f62489b i40e: Change some memcpys to struct assignments
Several memcpys are not necessary and can be changed to structure
assignments.  Struct assignments are always type safe so this
is preferable.

Change-ID: I7daf45a4b5e799c686b9d5c8ba9db047584ab82b
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:29 -07:00
Anjali Singhai Jain 25fc0e6590 i40e: Print some more info to help figure out the cause of HMC error
HMC_ERRORINFO and HMC_ERRORDATA helps explain the cause of HMC error.

Change-ID: I053bbc175a5f4c5c3e9ec2ea7400d5c56aaa4ec1
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-03 03:54:29 -07:00
Catherine Sullivan 3182b25e17 i40e: Bump version to 1.2.43
Bump.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-27 03:01:29 -07:00
Jesse Brandeburg ae24b4095c i40e/i40evf: implement KR2 support
The new devices need a new device ID some other defines to
handle the new 20G speed for KR2.

Change-ID: I03f717e364afe59657e8c9ce5ffaad856b4b21df
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-27 00:12:09 -07:00
Shannon Nelson 91a0f93056 i40e: add NVM update events to AQ clean
Quit complaining about a couple of events that we actually expect to see
during an NVM update.

Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-19 17:52:04 -04:00
Catherine Sullivan ec7a06fd6d i40e/i40evf: Bump i40e/i40evf version
Bump PF version to 1.2.37 and VF version to 1.2.25

Change-ID: I0287a750408250dc055c03e1f744fd5f0caefd68
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-09 10:53:26 -07:00
Jeff Kirsher b40c82e6ae i40e: Fix inconsistent use of PF/VF vs pf/vf
Joe Perches pointed out that we were inconsistent in the use of
PF vs pf or VF vs vf in our driver code.  Since acronyms are usually
capitalized to denote that it is an acronym, changed all references to
be consistent throughout the code.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-09 05:20:47 -07:00
Greg Rose cd77f5e1fa i40e: Strip configfs code
The use of configfs is not allowed in network drivers.  Strip the code that
uses it.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 07:01:06 -08:00
Sravanthi Tangeda b85e911b75 i40e/i40evf: Bump version
Bump i40e to 1.2.12 and i40evf to 1.2.6.

Change-ID: I641871da3a9abd396b28eda5744a4d68493c1400
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 07:01:05 -08:00
Anjali Singhai Jain d9e894ee8a i40e: Simplify code for rss_size_max config
We initialize the pf->rss_size_max in sw_init now
and hence this code can be simplified.

Change-ID: I1a7abc837604a40bc65e6c6b21190b909ed6bb21
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 07:01:04 -08:00
Anjali Singhai Jain 04294e38a4 i40e: FD filters flush policy changes
Since GLQF_FDCNT_0 register now has the right offset, use it to simplify our
FD flush flow.
If the filter add error happens to be for SB we just auto disable SB.

If filter error happens to be for ATR, auto disable ATR and mark
the state to FD_FLUSH_REQUESTED. Which gets cleared when flush completes.

If we are entering flush too quickly (< 30 seconds) and we have quite
a few SB rules, its time to disable ATR for good. Since SB + ATR rules
is most likely making the FD table unstable.

ATR can be re-enabled by turning ntuple off (ethtool -K ntuple off)
and will remain off after turning ntuple on till it gets unstable again.

Change-ID: I2154a2e0a5d44851a2f0eb8731e2f1d4a4d1acbc
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 04:59:46 -08:00
Akeem G Abodunrin 386a0afa70 i40e: Move code to enable/disable Loopback to the main file
Since changes made to enable or disable loopback for all VSIs, not only SR-IOV
or PCIOV, then it became necessary to move the associated functions to main
file - so that other non-SRIOV supported driver can take advantage of the
changes.

Change-ID: I59a49fd23a6136acda5e16f8d1e5ac7fd9c5fc05
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 04:59:44 -08:00
Shannon Nelson 1e200e4a57 i40e: rework vector reservation
The initial problem solved here is that the vector allocation was trying
too hard to save vectors for VMDq, to the point of not giving the PF enough
when in a tight situation such as an NPAR partition.  This change makes
sure that the PF will get all the queues and vectors it wants to fill
out its destiny.  Essentially, nothing is specially reserved for VMDq,
it simply gets whatever is left after the PF, FCoE, and FD sideband get
what they want.

Additionally, the calculations for the reservations were harder to follow
than necessary, so I've made it more straight forward.

Change-ID: I99b384f104535b686c690b8ef0a787559485c8d4
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 04:59:44 -08:00
Catherine Sullivan d6d83c1b3e i40e: Remove duplicate code
This series of code was repeated twice, remove one of them.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 04:59:41 -08:00
Shannon Nelson 37a2973a05 i40e/i40evf: Refactor i40e_debug_aq and make some functions static
A sparse complaint in i40e_debug_aq in a funky buffer write goes away by
straightening out the code out to something less convoluted.

Also fix some other sparse warnings while we are at it, making some
functions static and using NULL instead of 0.

Change-ID: I93907534fe1f1f675830774b3d14ecf1c6ffc9a0
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-07 04:59:40 -08:00
Jeff Kirsher e815665e1a i40e: Fix mismatching type for ioremap_len
As pointed out by Ben Hutchings, ioremap uses unsigned long as
its parameter type, so we should be using that instead of u32
or int.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05 22:11:38 -05:00
Sravanthi Tangeda d3866a071c i40e/i40evf: Version bump
Bump i40e to 1.2.11 and i40evf to 1.2.5

Change-ID: Ie13375941606b0a027e5b5dbc235f5f5f03b75c8
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 08:17:28 -08:00
Shannon Nelson 3b44439934 i40e: move IRQ tracking setup into MSIX setup
Move the IRQ tracking setup and teardown into the same routines that
do the IRQ setup and teardown.  This keeps like activities together and
allows us to track exactly the number of vectors reserved from the OS,
which may be fewer than are available from the HW.

Change-ID: I6b2b1a955c5f0ac6b94c3084304ed0b2ea6777cf
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 07:36:08 -08:00
Anjali Singhai 232f47060a i40e: Ioremap changes
For future device support we do not want to map the whole CSR space since some
of it is mapped by other drivers with different mapping methods.

Note: As a side effect, the flash region (if exposed through the memory map)
gets unmapped too since it follows the future use region.

Change-ID: Ic729a2eacd692984220b1a415ff4fa0f98ea419a
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 07:15:28 -08:00
Jesse Brandeburg 5bbc330100 i40e/i40evf: Clean up some formatting and other things
Fix some double blank lines and un-split a function declaration that all
fits on one line. Also make i40e_get_priv_flags static.

Change-ID: I11b5d25d1153a06b286d0d2f5d916d7727c58e4a
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 06:39:42 -08:00
Jesse Brandeburg 9a660eeae2 i40e: fix XPS mask when resetting
During resets (possibly caused by a Tx hang) the driver would
accidentally clear the XPS mask for all queues back to 0.

This caused higher CPU utilization and had some other performance impacts
for transmit tests.

Change-ID: I95f112432c9e643a153eaa31cd28cdcbfdd01831
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 04:57:33 -08:00
Greg Rose c668a12c7b i40e: Fix NPAR Tx Scheduler init
Recent changes to the driver initialization have caused the BW
configurations to not take effect.  We use a BW configuration read and
write back to "kick" the Tx scheduler into action.

Change-ID: I94ab377c58d3a3986e3de62b6c199be3fd2ee5e6
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 01:05:55 -08:00
David S. Miller 71a83a6db6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/rocker/rocker.c

The rocker commit was two overlapping changes, one to rename
the ->vport member to ->pport, and another making the bitmask
expression use '1ULL' instead of plain '1'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-03 21:16:48 -05:00
David S. Miller b97526f3ff Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-03-03

This series contains updates to fm10k, i40e and i40evf.

Matthew updates the fm10k driver by cleaning up code comments and whitespace
issues.  Also modifies the tunnel length header check, to make it more robust
by calculating the inner L4 header length based on whether it is TCP or UDP.
Implemented ndo_features_check() that allows drivers to report their offload
capabilities per-skb.

Neerav updates the i40e driver to skip over priority tagging if DCB is not
enabled.  Fixes an issue where the driver is not flushing out the
DCBNL app table for applications that are not present in the local DCBX
application configuration TLVs.  Fixed i40e where, in the case of MFP
mode, the driver was returning the incorrect number of traffic classes
for partitions that are not enabled for iSCSI.  Even though the driver
was not configuring these traffic classes in the transmit scheduler for
the NIC partitions, it does use this map to setup the queue mappings.

Shannon updates i40e/i40evf to include the firmware build number in the
formatted firmware version string.

Akeem adds a safety net (by adding a 'default' case) for the possible
unmatched switch calls.

Mitch updates i40e to not automatically disable PF loopback at runtime,
now that we have the functionality to enable and disable PF loopback.  This
fix cleans up a bogus error message when removing the PF module with VFs
enabled.  Adds a extra check to make sure that the indirection table
pointer is valid before dereferencing it.

Anjali enables i40e to enable more than the max RSS qps when running in a
single TC mode for the main VSI.  It is possible to enable as many as
num_online_cpus().  Adds a firmware check to ensure that DCB is disabled for
firmware versions older than 4.33.  Updates i40e/i40evf to add missing
packet types for VXLAN offload.  Updated i40e to be able to handle varying
RSS table size for each VSI, since all VSI's do not have the same RSS table
size.

v2: Dropped previous patch #9 "i40e/i40evf: Add capability to gather VEB
    per TC stats" since the stats should be in ethtool and not debugfs.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-03 20:47:23 -05:00
Greg Rose e8ab38cfcb i40e: Fix dependencies in the i40e driver on configfs
Module dependencies are broken in the case where CONFIG_I40E=y and
CONFIG_CONFIGFS_FS=m.  This fixes the broken dependency.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-03 16:52:41 -05:00
Sravanthi Tangeda ce458fcfcb i40e/i40evf: Bump versions
Bump i40e to 1.2.10 and i40evf to 1.2.4

Change-ID: I48aa64df05fcc8356e7026f3a9e69ecf78d0c785
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:31 -08:00