Commit Graph

20739 Commits

Author SHA1 Message Date
Xiaolong Ye
03ef7d47f7 net/i40e/base: add new link speed constants
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg
for 2.5Gb/5Gb speeds. This problem is fixed by adding constants
for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB.

Fixes: a58860f689 ("net/i40e/base: use new virtchnl header file")

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
4af161ceac net/i40e/base: enable LED blinking flow
Add X710T*L device specific operations (in port LED detection and
handling of GLGEN_GPIO_CTL.PIN_FUNC field) to enable LED blinking.

Signed-off-by: Damian Milosek <damian.milosek@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
680f502d61 net/i40e/base: add CRC stripping capability
Some VFs may want to disable CRC stripping on incoming packets
so create an offload for that. The VF already sends information
about configuring it's RX queues so use that structure to
indicate that the CRC stripping should be enabled or not.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
cd9eb703e6 net/i40e/base: introduce firmware EMP reset register
Introduce offsets of firmware registers holding a number of EMP resets.
Implement offsets as a preprocessor's constants.
Required by drivers to read a number of EMP resets reported by FW.

Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
8b57cc446e net/i40e/base: expose LED functionality
The previous code had the LED code wrapped such that, it was
static to the file and not usable outside of it. It is now available.

Signed-off-by: Mateusz Rusinski <mateusz.rusinski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
76e874a71c net/i40e/base: add function to read LPI statistics
There was no time duration statistics for LPI (Low Power Idle)
in EEE (Energy-Efficient Ethernet).
Added new procedure to get duration values from FW.
Otherwise there is no available procedure to get tx_lpi_duration
and rx_lpi_duration values.

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
bf1551fdb9 net/i40e/base: set PHY access flag on X722
The X722 FW API version 1.9 adds support for accessing PHY
registers with Admin Queue Command. This enables reading
EEPROM data from (Q)SFP+ transceivers, what was previously
possible only on X710 devices.

Signed-off-by: Adam Ludkiewicz <adam.ludkiewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
801622b2ec net/i40e/base: remove unreachable code
The result of the check is always FALSE and the code within "if"
is never executed.

Signed-off-by: Dzmitry Sautsa <dzmitryx.sautsa@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
38a4b62ce9 net/i40e/base: add flow director constants
Add defines for creating Flow Director flows as defined in datasheet
section 7.1.5.4 for field vectors.

Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
b330a1c5c6 net/i40e/base: fix display of FEC settings
Fix display of FEC settings for ethtool.
This patch change variable 'phy.link_info.req_fec_info' sent to ethtool.
Without this patch wrong FEC settings can be shown.

Fixes: 1216fb9f0c ("net/i40e/base: store the requested FEC information")

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
3010f08599 net/i40e/base: mark additional AQ bits as reserved
Mark bits 0xD through 0xF for the command flags of a cloud filter as
reserved. These bits are not yet defined and are considered as reserved
in the data sheet.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
50126939c6 net/i40e/base: fix retrying logic
Fixed a bug where driver was breaking out of the loop and
reporting an error without retrying first.

Fixes: 466eec7d6b ("net/i40e/base: retry AQC to overcome IRCRead hangs")

Signed-off-by: Marcin Formela <marcin.formela@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
d2f37f4427 net/i40e/base: add function to set MAC type
Make i40e_set_mac_type() public. i40e driver requires
i40e_set_mac_type() to be public. It is required for recovery mode
handling. Without this patch recovery mode could not be detected at
probe() function.

Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
a8e84b22bd net/i40e/base: support persistent LLDP
This patch adds a function to read NVM module data and uses it to
read current LLDP agent configuration from NVM API version 1.8.

Signed-off-by: Sylwia Wnuczko <sylwia.wnuczko@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
48c0aef5b9 net/i40e/base: update FW API version
Update FW API version to 1.9.

Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
3794e5d7ab net/i40e/base: add FWS1B register masks
Function check_recovery_mode had wrong if statement. Now we check proper
FWS1B register values, which are responsible for the recovery mode.
Recovery mode has 6 values in total. That's why we need 6 different
flags.  Now in if statement we recognize type of mac and register value.
Without those changes driver could show wrong state.

Signed-off-by: Adrian Podlawski <adrian.podlawski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
f8a4eae27c net/i40e/base: add drop mode parameter to set MAC config
This patch adds "drop mode" parameter to set mac config AQ command.
This bit controls the behavior when a no-drop packet is blocking a TC
queue.
0 – The PF driver is notified.
1 – The blocking packet is dropped and then the PF driver is notified.

Signed-off-by: Sylwia Wnuczko <sylwia.wnuczko@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
37b091c75b net/i40e/base: extend PHY access AQ command
Currently FW use MDIO I/F number corresponded with current PF for PHY
access. This code allow to specify used MDIO I/F number.

Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
79bfe78087 net/i40e/base: fix Tx descriptors number
The existing driver allows setting the number of TX descriptors
to the value that is indivisible by 32. This is not properly
supported by x710 hardware. The patch limits the number of TX
descriptors to the whole value of 32.

Fixes: 8db9e2a1b2 ("i40e: base driver")
Cc: stable@dpdk.org

Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Dariusz Chaberski <dariuszx.chaberski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
9e50258a91 net/i40e/base: update status codes
Add a few new status codes and rename a few to make them more
consistent.  Error code are mapped to similar values as in
i40e_status.h, so as to be compatible with older VF drivers not using
this status enum.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
3c7bfdc77f net/i40e/base: backport style changes from upstream Linux
The upstream virtchnl.h has a few minor style differences to what is
out-of-tree, and there is no real reason we should prefer the current
style over whats upstream.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
429bdc0cd9 net/i40e/base: add function to read LPI counters
This change introduces new function i40e_get_lpi_counters() reading
Low Power Idle (LPI) mode counters from Energy Efficient Ethernet (EEE)
statistics. Since reading EEE statistics requires running DNL script,
function i40e_aq_run_phy_activity() able to run it, was implemented.

i40e_lpi_stat_update() was introduced as helper function for retrieving
LPI counters' values relative to given offsets.

This change also fixes order of fields in struct
i40e_aqc_run_phy_activity and introduces union in the struct
providing more descriptive names of fields depending on usage
(command or response).

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
1da546c397 net/i40e/base: fix missing link modes
Fix for missing "Supported link modes" and "Advertised link modes"
info in ethtool after changed speed on X722 devices with BASE-T PHY
with FW API version >= 1.7.
The same FW API version on X710 and X722 does not mean the same
feature set so the change was needed as mac type of the device
should also be checked instead of FW API version only.

Fixes: e8228f1a16 ("net/i40e/base: report supported link modes")

Signed-off-by: Martyna Szapar <martyna.szapar@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
638172ac43 net/i40e/base: read LPI status from external PHY
When external PHY is used, MAC register may not reflect actual
state of LPI. Add function reading it directly from PHY or MAC,
depending on what is supported by the device.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
c61bcb0fe1 net/i40e/base: support Energy Efficient Ethernet
This change adds i40e_enable_eee() function controlling advertisement
of Energy Efficient Ethernet mode (EEE).

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
9b62b281c8 net/i40e/base: add function to get FW LLDP agent status
This change introduces i40e_get_fw_lldp_status() function capable of
reporting status of FW Link Layer Discovery Protocol (LLDP) agent.

Since reading LLDP configuration from NVM only gives information what
is the default state of FW LLDP agent after POR, this change introduces
more reliable method for checking if agent is enabled.

Current state of FW LLDP agent may be different if user disabled the
agent, so i40e_get_fw_lldp_status() uses LLDP MIB checking to determine
status of the agent.

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
06ee266de6 net/i40e/base: improve AQ log granularity
This patch makes it possible to log only AQ descriptors, without the
entire AQ message buffers being dumped too. It should greatly reduce
kernel log size in cases where a full AQ dump is not needed.
Selection is made by setting flags in hw->debug_mask.

Additionally, some debug messages that preceded an AQ dump have been
moved to I40E_DEBUG_AQ_COMMAND class, which seems more appropriate.

Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Robert Konklewski <robertx.konklewski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
77192a006f net/i40e/base: add flags for PHY types
Adding bit flags to enable/disable EEE capability for 2.5GBase-T and
5GBase-T PHY types as well as 'Set autonomous EEE for relevant enabled
PHY types' flag.

Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Michal Litwicki <michalx.litwicki@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
d5e1a14936 net/i40e/base: check MAC type
Some features were introduced in different FW API version on XL710 and
X722 MACs. Others are available only on specific MAC type. Make sure
that they are properly assigned. Also fix the style issues reported by
current check-patch.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
c916517f74 net/i40e/base: add new device IDs
New device ids are created to support SFP+ and backplane connections.

Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
3c537ca7f4 net/i40e/base: support LLDP agent
This code implements changes necessary for LLDP Agent support.

1. Modified i40e_aq_start_lldp and i40e_aq_stop_lldp. Now Stop and Start
can also be persistent across power cycles.
2. Added new function i40e_aq_restore_lldp which restores factory
setting for LLDP Agent or gets its status.

Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
4b3da94159 net/i40e/base: fix error message
This patch changes an error code for an admin queue head overrun to use
I40E_ERR_ADMIN_QUEUE_FULL instead of I40E_ERR_QUEUE_EMPTY.

Fixes: 8db9e2a1b2 ("i40e: base driver")
Cc: stable@dpdk.org

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
f4ed5a4a7c net/i40e/base: decouple MIB change event from DCB init
There is a need to enable MIB change event, not at the same time as
init_dcb. This patch will serve this requirement.

Modify the i40e_init_dcb to return the correct error when LLDP or DCBX
is not in operational state.

Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
8f33cbcfa1 net/i40e/base: fix buffer address
The high 32-bits were being set incorrectly in the 'Set Local LLDP MIB'
AQ command (0x0A08). Change it to use the right macro to get the correct
bits.

Fixes: 1fa6324ad3 ("i40e/base: add new interfaces")
Cc: stable@dpdk.org

Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
470ade53c5 net/i40e/base: increase max VSI count for VFs
For historical reasons, we allowed 3 VSIs per VF, but never used more
than one. Now with ADq, we can use up to 4 VSIs per VF, so change this
value to match.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Xiaolong Ye
e829c4f649 net/i40e/base: support NVM feature flags
Extend NVM Update API to support reporting of features
available for the tools.

This change is needed by NVM Update to determine if driver
supports changing NVM layout from structured to flat.

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2020-01-17 19:46:02 +01:00
Harman Kalra
348123a3df net/octeontx2: fix getting supported packet types
Setting up supported ptypes using testpmd command is failing
because supported_ptypes_get callback will never return ptypes
supported, as NIX_RX_OFFLOAD_PTYPE_F bit in rx_offload_flags
is zero by default in testpmd.

Fixes: d2706e15e6 ("net/octeontx2: support reduced set of packet types")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
d0ef40a1b2 net/qede: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

(Not sure if the previous code is checking for true/false condition.
Recommend careful review on this patch.)

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
0f9e90b54f net/fm10k: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
ecf8c855e4 net/e1000: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
b6b1d2eb73 net/bnx2x: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
af4583b176 net/vmxnet3: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.
Remove 'typedef char Bool' and use 'bool' instead.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
00a6e154da net/cxgbe: remove local bool type
Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Dharmik Thakkar
ad43b7bce9 net/ixgbe: avoid multiple definitions of bool
Compilation issue arises due to multiple definitions of 'bool'
in 'ixgbe_ethdev.h'.

Error:
'/dpdk/drivers/net/ixgbe/ixgbe_ethdev.c: In function
‘ixgbe_dev_setup_link_alarm_handler’:
/dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:4075:43:
error: passing argument 3 of ‘ixgbe_get_link_capabilities’ from
incompatible pointer type [-Werror=incompatible-pointer-types]
   ixgbe_get_link_capabilities(hw, &speed, &autoneg);
                                           ^
In file included from /dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:41:0:
/dpdk/drivers/net/ixgbe/base/ixgbe_api.h:63:5: note: expected
‘bool * {aka int *}’ but argument is of type ‘_Bool *’'

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-01-17 19:46:02 +01:00
Jerin Jacob
e73f6d871c net/octeontx2: improve performance in vector Rx
Use scalar loads instead of vector loads for fields
that don't need any vector operations.

Signed-off-by: Andrew Pinski <apinski@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2020-01-17 19:46:02 +01:00
Harman Kalra
d059dba51d net/octeontx2: fix VF configuration
Returning -ENOTSUP only in case loopback mode is enabled and
device is VF or SDP.

Fixes: c2c0aa75cd ("net/octeontx2: fix loopback config return for VF")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-01-17 19:46:02 +01:00
Suanming Mou
6f26e604a9 net/mlx5: support IPv4/IPv6 DSCP rewrite action
This commit add the IPv4/IPv6 DSCP rewrite actions to the PMD code.

Supported actions:
RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP
RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-01-17 19:46:02 +01:00
Suanming Mou
8482ffe4b6 ethdev: add IPv4/IPv6 DSCP rewrite action
For some overlay network, such as VXLAN, the DSCP field in the new outer
IP header after VXLAN decapsulation may need to be updated accordingly.

This commit introduce the DSCP modify action for IPv4 and IPv6.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-01-17 19:46:02 +01:00
Xiao Wang
bf4fd5ba3e vhost: fix socket initial value
By default, a vhost socket is created without attaching VDPA device,
this patch fixes the initial value of vdpa_dev_id.

Fixes: b4953225ce ("vhost: add APIs for datapath configuration")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2020-01-17 19:46:02 +01:00
Stephen Hemminger
b56c12acf2 net/virtio-user: check file descriptor before closing
Valgrind complains that virtio_user is calling close(-1).
Fix this by adding check in virtio that is similar to existing code.

Fixes: 37a7eb2ae8 ("net/virtio-user: add device emulation layer")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2020-01-17 19:46:02 +01:00