Rasesh Mody [Thu, 5 Jan 2017 07:03:59 +0000 (23:03 -0800)]
net/qede/base: retrieve FW crash dump info
As part of device probe, check if management FW crash dump logs are
available. If available, then log an warning message and update the
epoch value too. A new struct ecore_mdump_info is added to populate
dump info including the new "reason" field by reading shared memory
region.
Rasesh Mody [Thu, 5 Jan 2017 07:03:51 +0000 (23:03 -0800)]
net/qede/base: improve Tx-switching performance
In order to improve Tx switching performance an additional HSI parameter
called same-as-last-id is introduced. This resource allows FW caching the
txqs packet properties. Driver needs to set same-as-last-id to be equal to
the qzone.
Wenzhuo Lu [Wed, 21 Dec 2016 08:29:40 +0000 (16:29 +0800)]
net/i40e: fix wrong return value when handling PF message
When VF receives a message from PF, it should check the return
value. But in i40evf_execute_vf_cmd the value is ignored and not
returned to the caller.
Fixes: 95cd21f45d1b ("i40evf: allocate virtchnl commands buffer per VF") Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Jerin Jacob [Tue, 27 Dec 2016 10:09:57 +0000 (15:39 +0530)]
net/ixgbe: remove unused global variable
Removed unused "reg_info" global variable from ixgbe driver.
cat build/app/testpmd.map | grep "Allocating common symbols" -A 15
Allocating common symbols
Common symbol size file
reg_info 0x18 build/lib/librte_pmd_ixgbe.a(ixgbe_ethdev.o)
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Alejandro Lucero [Mon, 19 Dec 2016 16:13:03 +0000 (16:13 +0000)]
net/nfp: avoid modulo operations for handling ring wrapping
Having those modulo operations implies costly instructions execution,
what can be avoided with conditionals and unlikely clauses.
This change makes the software ring read and write indexes to be now
always within the ring size which has to be handled properly. The main
problem is when write pointer wraps and being less than the read pointer.
This happened before, but just with indexes type size (uint32_t) wrapping,
and in that case the processor does the right thing no requiring special
handling by software.
This work has also led to discovering redundant pointers in the driver,
which have been removed.
Rasesh Mody [Fri, 23 Dec 2016 00:50:04 +0000 (16:50 -0800)]
net/qede/base: fix VF over legacy PF
Apparently VF over Legacy PF doesn't work, as VF would fail after
getting the initial rejection message [instead of sending an additional
one where it asks for a FW override and see if it works].
Rasesh Mody [Fri, 23 Dec 2016 00:50:02 +0000 (16:50 -0800)]
net/qede/base: fix Rx queue access by malicious VFs
Rx queue access is still done prior to the index being validated by PF.
Hence move Rx queue and status block validation check before accessing
Rx queue to prevent malicious VFs from using out-of-bound queue indices.
Rasesh Mody [Fri, 23 Dec 2016 00:49:59 +0000 (16:49 -0800)]
net/qede/base: fix multiple acquisition requests by VF
There are certain conditions under which VF would infinitely send
ACQUIRE messages, as it will fail to understand that PF has rejected
the ACQUIRE request. Fix to reject multiple acquisition requests by VF.
Rasesh Mody [Fri, 23 Dec 2016 00:49:57 +0000 (16:49 -0800)]
net/qede: add vendor/device id info
The vendor_id and device_id are used to determine device type. If you
don't have them, then check for determining device type fails and is
always set to default device type.
Fixes: ec94dbc57362 ("qede: add base driver") Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Harish Patil [Fri, 23 Dec 2016 00:48:11 +0000 (16:48 -0800)]
net/qede: restrict maximum queues for PF/VF
HW can support up to 128 queues based on the NIC config/personality.
But most of the testing is done with 32 queues for PF and 16 for VF
device across different qede devices, so change here is to advertise
only those many instead of returning max queues supported by HW.
Harish Patil [Fri, 23 Dec 2016 00:48:09 +0000 (16:48 -0800)]
net/qede: fix RSS
This patch includes the following:
- Fix missing hash_key_size advertisement
- Fix RSS hash query function
- Update RSS offload flag
- Accept user provided RSS configuration params via rx_adv_conf
in dev_configure()
- Decouple RSS configuration from common qed_update_vport() and
instead make use of existing RSS APIs for default RSS configuration
Harish Patil [Fri, 23 Dec 2016 00:48:06 +0000 (16:48 -0800)]
net/qede: fix filtering code
In qede_mac_addr_add() a check is added to differentiate between
unicast/multicast mac to prevent a multicast mac from being wrongly added
to unicast filter table. Secondly, two separate lists will be used to keep
track of unicast/multicast mac filters to prevent duplicate filter
programming. The other change is to remove filter_config from struct
qed_eth_ops_pass and invoke the base APIs directly. This avoids the need
to have multiple structs and function calls.
Wei Dai [Wed, 21 Dec 2016 09:48:12 +0000 (17:48 +0800)]
net/ixgbe/base: add write flush required by Inphi PHY
This patch updates the configuration of PHY from Inphi (www.inphi.com)
to flush the register write with a reg read.
The Inphi PHY is configured in ixgbe_setup_mac_link_sfp_x550a.
The Inphi PHY setup flow has been updated to read configuration reg,
write only linear/non-linear, and then read (write flush).
Wei Dai [Wed, 21 Dec 2016 09:48:10 +0000 (17:48 +0800)]
net/ixgbe/base: fix IXGBE LSWFW register
This register was incorrect when compared to the data sheet.
Even though the driver doesn't currently use this register,
it is better to fix it upstream.
Fixes: af75078fece3 ("first public release") Signed-off-by: Wei Dai <wei.dai@intel.com>
Wei Dai [Wed, 21 Dec 2016 09:48:08 +0000 (17:48 +0800)]
net/ixgbe/base: add EEE support for some PHYs
This patch adds Energy Efficient Ethernet (EEE) support for
some Marvell PHYs on some future platforms.
Because EEE capability or status was not indicated previously,
this patch simply assumes that it is supported.
As soon as there is a PHY that does not support EEE, there will
be defects in this area because the driver will not report the
EEE status correctly.
This also deletes some now-unused definitions from an earlier
Marvell PHY implementation and combines a device ID check into a
switch statement.
Wei Dai [Wed, 21 Dec 2016 09:48:07 +0000 (17:48 +0800)]
net/ixgbe/base: update FW PHY flow control
This patch removes the flow control conversion from Rx and Tx to pause
and asymmetric pause, as that is handled by the ixgbe_negotiate_fc().
Performing the conversion prior to ixgbe_negotiate_fc() results in
an incorrect fc mode if Rx only pause is selected when the link partner
is advertising Tx.
Wei Dai [Wed, 21 Dec 2016 09:48:04 +0000 (17:48 +0800)]
net/ixgbe/base: add physical layer options for FW PHY type
The "FW" PHY type now supports speeds 10M, 100M, and 1G.
Previously, only the 1G speed was reported for this PHY type.
Add reporting 10M and 100M speed options.
Wei Dai [Wed, 21 Dec 2016 09:48:02 +0000 (17:48 +0800)]
net/ixgbe/base: include new speeds in VFLINK interpretation
This patch moves some of the extended speeds that come with X552
(5G, 2.5G, 10M) into the link check functions.
It also now returns speed_unknown for speeds that are not known
how to interpret.
Wei Dai [Wed, 21 Dec 2016 09:47:54 +0000 (17:47 +0800)]
net/ixgbe/base: limit iXFI setup to X552 devices
The MAC register NW_MNG_IF_SEL fields have been redefined for X553.
These changes impact the iXFI driver code flow. Since iXFI is only
supported in X552, this patch adds X552 MAC check for iXFI flows.
Wei Dai [Wed, 21 Dec 2016 09:47:53 +0000 (17:47 +0800)]
net/ixgbe/base: enable LASI only for X552 devices
Enable the Link Alarm Status Interrupt (LASI) only for X552 devices
to receive notifications of the link configurations of the external
PHY and correspondingly support the configuration of the internal
iXFI link, since iXFI does not support auto-negotiation.
This is not required for X553 devices having KR support, which
performs auto-negotiations and which is used as the internal
link to the external PHY.
Wei Dai [Wed, 21 Dec 2016 09:47:51 +0000 (17:47 +0800)]
net/ixgbe/base: store link active LED
Add support to get the link active LED index via the LEDCTL register.
If the LEDCTL register does not have link active LED set then
use MAC default LED index.
Link active LED is used for adapter identify/blink support.
Wei Dai [Wed, 21 Dec 2016 09:47:47 +0000 (17:47 +0800)]
net/ixgbe/base: use fast MDIO for non-10G devices
Devices that cannot go 10G speeds can safely select a faster
Management Data Input/Output (MDIO) speed.
Select fast MDIO clock speed for for those devices.
Alejandro Lucero [Tue, 20 Dec 2016 13:22:00 +0000 (13:22 +0000)]
net/nfp: report link speed using hardware info
Previous reported speed was hardcoded because there was not firmware
support for getting this information. This change needs also to support
old firmware versions, but instead of the previous hardcoded report, no
speed is reported to the user avoiding to give the wrong speed when link
is not configured to 40G.
Stefan Puiu [Mon, 19 Dec 2016 09:40:53 +0000 (11:40 +0200)]
net/vmxnet3: fix Rx deadlock
Our use case is that we have an app that needs to keep mbufs around
for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from
vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX
descriptors (where it returns -err). Since there are no mbufs that the
virtual hardware can use, no packets will be received after this; the
driver won't refill the mbuf after this so it gets stuck in this
state. I call this a deadlock for lack of a better term - the virtual
HW waits for free mbufs, while the app waits for the hardware to
notify it for data (by flipping the generation bit on the used Rx
descriptors). Note that after this, the app can't recover.
This fix is a rework of this patch by Marco Lee:
http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port
it, address review comments and also reverted the allocation
failure handling to the first version of the patch
(http://dpdk.org/ml/archives/dev/2015-July/022079.html), since
that's the only approach that seems to work, and seems to be what
other drivers are doing (I checked ixgbe and em). Reusing the mbuf
that's getting passed to the application doesn't seem to make
sense, and it was causing weird issues in our app. Also, reusing
rxm without checking if it's NULL could cause the code to crash.
Fixes: 14680e3747d5 ("vmxnet3: improve Rx performance") Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com> Acked-by: Yong Wang <yongwang@vmware.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:23 +0000 (12:51 +0000)]
net/sfc: support firmware-assisted TSO
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Mark Spender <mspender@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:22 +0000 (12:51 +0000)]
net/sfc: update RSS redirection table
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:21 +0000 (12:51 +0000)]
net/sfc: query RSS redirection table
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:20 +0000 (12:51 +0000)]
net/sfc: set RSS key and hash types config
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:19 +0000 (12:51 +0000)]
net/sfc: query RSS key and hash types config
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:18 +0000 (12:51 +0000)]
net/sfc: support RSS hash offload
Extract RSS hash provided by the HW in the prefix and put it to mbuf.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:17 +0000 (12:51 +0000)]
net/sfc: add basic stubs for RSS support on driver attach
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Andrew Rybchenko [Thu, 15 Dec 2016 12:51:16 +0000 (12:51 +0000)]
net/sfc/base: do not use enum type when values are bitmask
ICC complains that enumerated type mixed with another type.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:15 +0000 (12:51 +0000)]
net/sfc: support VLAN offload on transmit path
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:14 +0000 (12:51 +0000)]
net/sfc: support deferred start of transmit queues
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:13 +0000 (12:51 +0000)]
net/sfc: support Tx free threshold
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Ivan Malov [Thu, 15 Dec 2016 12:51:12 +0000 (12:51 +0000)]
net/sfc: get transmit queue information
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Andrew Rybchenko [Thu, 15 Dec 2016 12:51:11 +0000 (12:51 +0000)]
net/sfc: support deferred start of receive queues
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Andrew Rybchenko [Thu, 15 Dec 2016 12:51:10 +0000 (12:51 +0000)]
net/sfc: support scattered Rx DMA
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
Andrew Rybchenko [Thu, 15 Dec 2016 12:51:09 +0000 (12:51 +0000)]
net/sfc: get RxQ descriptor done
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andrew Lee <alee@solarflare.com> Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>