Commit Graph

240 Commits

Author SHA1 Message Date
Luca Boccassi
8eb9f9f025 net/ixgbe/base: add LHA ID
ixgbe is able to recognize 1G SX and LX id, but it is missing the LHA.
Add it, so that it can handle LHA SFP plugin.

Fixes: d2e72774e5 ("ixgbe/base: support X550")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2018-12-13 16:31:06 +00:00
Xiaolong Ye
73247f1ced net/ixgbe: fix maximum wait time in comment
As the code has changed the max wait time to 1000ms, the comment should
be changed accordingly.

Fixes: 64f1c8539c ("net/ixgbe: wait longer for link after fiber MAC setup")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-11-15 23:32:01 +01:00
Ilya Maximets
fd61c749db drivers/net: use sleep delay by default for Intel NICs
NICs uses different delays up to a second during their
configuration. It makes no sense to busy-wait so long wasting
CPU cycles and preventing any other threads to execute on the
same CPU core. These busy polling are the rudiments that came
from the kernel drivers where you can not sleep in interrupt
context, but as we're in userspace, we're able and should
sleep to allow other threads to run.
Delays never called on rx/tx path, so this should not affect
performance.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-26 22:14:06 +02:00
Matthew Smith
64f1c8539c net/ixgbe: wait longer for link after fiber MAC setup
After setting up the link on a fiber port, the maximum wait time for
the link to come up is 500 ms in ixgbe_setup_mac_link_multispeed_fiber().
On an x550 SFP+ port, this is often not sufficiently long for the link
to come up. This can result in never being able to retrieve accurate
link status for the port using rte_eth_link_get_nowait().

Increase the maximum wait time in ixgbe_setup_mac_link_multispeed_fiber()
to 1 s.

Bugzilla ID: 69
Fixes: f3430431ab ("ixgbe/base: add SFP+ dual-speed support")
Cc: stable@dpdk.org

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-10-11 18:53:48 +02:00
Xiaoyun Li
8e2030bea0 net/ixgbe/base: update version
Update README file to specify the version of CID drop.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
36a036bc6f net/ixgbe/base: support DCB registers dump
Add support for DCB registers dump.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
175bedb0cc net/ixgbe/base: update X550 SFP identification
Use ixgbe_identify_sfp_module_X550em to update SFP identification
flow. ixgbe_identify_sfp_module_X550em includes specific checks for
X550 about supported SFP modules.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
1b665ccd9c net/ixgbe/base: replace an operation in X550 setup
Replace "=" operation with "|=" operation to only set the intended
register bits.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
5fb0a9acbb net/ixgbe/base: add FW recovery mode check
Add FM NVM recovery mode check. Allow the software to detect this.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
043be1f6f4 net/ixgbe/base: cleanup codes
Cleanup UNREFERENCED_1PARAMETER() macro because "hw" is used.
And remove Light Spring codes because the device was never
productised. And cleanup unused bypass codes.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:02 +02:00
Xiaoyun Li
9db3087f4f net/ixgbe/base: update the license
Update the GPL and BSD license headers to use the SPDX License
Identifier instead.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-28 01:41:01 +02:00
Bruce Richardson
589dd86aaf net/*/base: allow use of experimental APIs in base code
The driver setting of "allow_experimental_apis" was not being used when
building the base code. To allow this we can manually put in a check
in the base code files for the setting and set the appropriate cflag
if it's needed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
2018-09-28 01:41:01 +02:00
Bruce Richardson
6c9457c279 build: replace license text with SPDX tag
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
3e5c3d58e1 build: build as both static and shared libs
This patch changes the build process to group all .o files for a driver or
library into a static archive first, and then link the .o files together
into a shared library. This eliminates the need for separate static or
shared object builds when packaging, for instance.

The "default_library" configuration option now only affects the apps and
examples, which are either linked against the static or shared library
versions depending on the value of the option.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
610beca42e build: remove library special cases
The EAL and compat libraries were special-cases in the library build
process, the former because of it's complexity, and the latter because
it only consists of a single header file.

By reworking the EAL meson.build files, we can eliminate the need for it to
be a special case, by having it build up and return the list of sources,
headers, and objects and return those to the higher level build file. This
should also simplify the building of EAL, as we can eliminate a number of
meson.build files that would no longer be needed, and have fewer, but
larger meson.build files (9 now vs 14 previous) - thereby making the logic
easier to follow and items easier to find.

Once done, we can pull eal into the main library loop, with some
modifications to support it. Compat can also be pulled it once we add in a
check to handle the case of an empty sources list.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30 21:58:59 +01:00
Bruce Richardson
e940646b20 drivers/net: build Intel NIC PMDs with meson
Add the e1000, fm10k, i40e and ixgbe drivers to the meson & ninja build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30 17:49:16 +01:00
Qiming Yang
ff12b0c80d net/ixgbe/base: update README file
Update README file to specify the version of drops.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
34265096e0 net/ixgbe/base: add media type of fixed fiber
This patch adds new media type support of fixed fiber.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
e0f10b0874 net/ixgbe/base: update annotations
This patch mainly adds/removes comments for function parameters
that were missing or no longer needed.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
20410e4394 net/ixgbe/base: clear sync register during init
This patch clears software resource bits in synchronization
register and updates host interface resource bit error case for
X540. It also fixes compile warnings of using GCC 7.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
e6102361b1 net/ixgbe/base: use 2 bytes for flash read command
With this patch, it uses 2 bytes of buffer reading, as required
for flash read command. It also adds definitions for LESM module.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
91d616be7d net/ixgbe/base: add PHY read and write
This patch adds lockless read/write support for clause 22 PHY,
together with some enhancements for link speed and return value
handling.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
6175260d12 net/ixgbe/base: increase the timeout
Increase SECRX_RDY polling frequency and semaphore timeout which
fixes the FWSW.PT check in ixgbe_mng_present().

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Qiming Yang
cf3af5aa56 net/ixgbe/base: add functions to get version info
Add common functions for getting OEM product version, option
ROM version, and ETrack id.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Hemant Agrawal
704e657bea net/ixgbe: fix ARM big endian build
fixes the following compilation error on compiling with ARM BE compiler

ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
ixgbe_common.c:4610:22: error: passing argument 1 of
‘__builtin_bswap32’ makes integer from pointer without a cast
[-Werror=int-conversion]
   IXGBE_LE32_TO_CPUS(&buffer[bi]);
                      ^
Fixes: aa4fc14d2c ("ixgbe: update base driver")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-12 17:27:08 +01:00
Thierry Herbelot
8f87ba7015 fix typos
Repeated occurrences of 'the'.

The change was obtained using the following command:

  sed -i "s;the the ;the ;" `git grep -l "the "`

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
2018-01-11 18:26:46 +01:00
Radu Nicolau
9a0752f498 net/ixgbe: enable inline IPsec
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2017-10-26 03:12:34 +02:00
Wei Dai
09049d5266 net/ixgbe/base: update shared code version to 2017.05.16
* Remove PHY access for some 1G ports
* Disable X550EM-x 1GBASE-T led switch support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
667af1981f net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support
This patch disables X550EM_X 1Gbase-t led_[on|off] support since
the LEDs are wired to the PHY and the driver can not access the
PHY. led_[on|off]

Support is disabled by setting the function pointer to NULL.
init_led_link_act is also set to NULL.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
91b0fdf44e net/ixgbe/base: remove PHY access for some 1G ports
This patch removes some some 1GBASE-T PHY access since the FW
configures the PHY. SW shall not configure or initialize link.
Accessing the PHY would require the use of MDI clause 22 which
should be avoided in high layer driver code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
bfe977683a net/ixgbe/base: update version to 2017.03.29
* Acquire PHY semaphore before device reset
* Add support for 2.5G KX physical layer
* Add MAC X550em/X557 LED on|off support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
999566af0a net/ixgbe/base: support MAC X550em/X557 LED on/off
This patch updates ixgbe_led_[on|off]_t_X550em for MAC or PHY connected
LEDs. To support both MAC or PHY connected LEDs, both MAC and PHY led
control registers are configured.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
d53a80024a net/ixgbe/base: support 2.5G KX physical layer
Add another define for the 2.5G KX physical layer. This requires all
variables and support functions that deal with "physical_layer" to be
bumped to u64 as this is the 33rd define.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:17 +02:00
Wei Dai
c70a162ad4 net/ixgbe/base: acquire PHY semaphore before device reset
A recent firmware change fixed an issue to acquire the PHY semaphore
before accessing PHY registers. This led to a case where SW can issue
a device reset clearing the MDIO registers. This patch makes SW acquire
the PHY semaphore before issuing a device reset.

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-04-28 14:46:16 +02:00
Wenzhuo Lu
66e21de51b net/ixgbe/base: update shared code version to 2017.02.27
* Add link block check for KR.
* Complete HW initialization even if SFP is not present.
* Add VF xcast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
9dad5b9e89 net/ixgbe/base: fix build error
Fix ICC build error by removing the EWARN third parameter.

Build error:
.../drivers/net/ixgbe/base/ixgbe_phy.c(1543):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

.../drivers/net/ixgbe/base/ixgbe_phy.c(1805):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

Fixes: aa4fc14d2c ("ixgbe: update base driver")
Fixes: b94a06c1b4 ("ixgbe/base: support qsfp and lco")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
6b3e9c956c net/ixgbe: support xcast promisc mode
Add the support of xcast promiscuous mode. It's
added in mailbox v1.3.
Move the definition of xcast mode to base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
dcf9ff148c net/ixgbe/base: disable FC for 15B0
Disable Ethernet Flow Control (FC) for device 15B0.

Make sure that ixgbe_device_supports_autoneg_fc()
returns false and hw->fc.disable_fc_autoneg is set
to true to avoid running the fc_autoneg function
for the device 15B0, as this device doesn't support
this function.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
98fcfa09b1 net/ixgbe/base: complete HW init when SFP not present
If SFP module is not present, reset_hw doesn't return success.
SW should complete the initialization, or with specific module
it resulted in no link when the module was later inserted.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
04e395f20a net/ixgbe/base: add bit for enabling L3/L4 filtering
Add a L3/L4 filtering definition of Multiple Receive Queues Command
(MRQC) register for the future use.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
90a02fce70 net/ixgbe/base: add link block check for KR
When setting up link on x550 KR devices, should check
if there are constraints on link from manageability, which
may result in link loss.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
f8687bd0b2 net/ixgbe/base: remove X550em SFP iXFI setup
Removes X550em SFP iXFI setup since there is no released
HW production with SFP iXFI.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Wenzhuo Lu
c268e8d745 net/ixgbe/base: make a debug message simple
The debug message is too long. Make it shorter.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00
Santosh Shukla
a66114965b net/ixgbe: use I/O device memory read/write API
Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.

CC: Helin Zhang <helin.zhang@intel.com>
CC: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-01-18 17:18:26 +01:00
Wei Dai
37f8f7e841 net/ixgbe/base: update shared code version to 2017.01.05
Update version of shared code to 2017-01-05 in README.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
a85e378cc6 net/ixgbe/base: add debug traces
Add some traces in the reset_hw logic and semaphore acquisition logic
to help debugging.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
96dae4644a net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
Set the MDIO (Management Data Input/Output Interface) read/write
function pointers for Marvell PHYs on some X550 platforms to use
the clause 22 functions. Marvell PHYs do not support clause 45.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
18f5a572d8 net/ixgbe/base: support Marvell 1000BASE-T PHYs
Add initial support for Marvell 1000BASE-T PHYs on some X550 platforms.

Firmware owns the link config for Marvell PHYs on these platforms,
software should not touch it.

Also these platforms are not capable of speeds lower than 1Gb.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
37e7cb1e35 net/ixgbe/base: configure speeds for KR/KX backplane
Ensure that the advertised link speeds are configured for KR/KX
backplane on some new platform.

Without this patch the link remains at 1G when resuming from low power
after being downshifted by LPLU (Low Power Link Up).

This patch ensures that the advertised speeds are not changed for
2.5G configurations.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
fff3eeb0a6 net/ixgbe/base: remove a compiler warning
Remove warning for "mac->led_link_act = i" where led_link_act is u8.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00