Commit Graph

8715 Commits

Author SHA1 Message Date
Adrien Mazarguil
3aec2d14d6 net/mlx: update C compliance standard
This commit addresses a compilation issue against Glibc >= 2.25, which
implements assert() through a nonstandard ({ }) construct. Such constructs
can normally not be used without __extension__ keyword when -pedantic is
enabled, as is the case when compiling mlx4 and mlx5 PMDs in debug mode.

While assert.h checks for the compiler ability to support GNU extensions,
Clang, unlike GCC, does not allow the above syntax when combining
-std=gnu99 with -pedantic.

Work around missing keyword by moving these PMDs to a stricter compliance
standard without GNU extensions but properly checked by Glibc. Doing so is
supported on the DPDK side since includes have been cleaned up.

Even in C11, using types other than _Bool or signed/unsigned int for
bit-fields is an extension. Some GCC versions complain about that when
-pedantic checks are enabled.

The RTE_STD_C11 macro correctly prevented this issue with C99 but not with
C11 as it becomes a no-op. Forcing the extension keyword addresses it.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Tested-by: Yongseok Koh <yskoh@mellanox.com>
2017-07-06 15:00:57 +02:00
Declan Doherty
8ae9c69a2b net/bonding: change link status check to no-wait
In 2 modes (802.3ad and TLB) of the link bonding driver, monitoring of
link status is used to determine the active slaves to use. These
functions are currently using the rte_link_link_get which could block
for up to 9 seconds, depending on the slave device.

In the 802.3ad periodic callback and in the TLB slave callback the
link status of slaves are checked using rte_eth_link_get function.

This patch changes to the no-wait version of the link get function to
avoid the possible issues which could be introduced if this call was
to block for an extended period of time.

Fixes: 46fb436836 ("bond: add mode 4")
Fixes: 7c76a747e6 ("bond: add mode 5")
Cc: stable@dpdk.org

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
2017-07-06 15:00:57 +02:00
Yong Wang
b734923ddc net/i40e: fix division by 0
In function i40e_vsi_config_tc_queue_mapping(), if 'enabled_tcmap' is 0,
'total_tc' might be 0. Then 'total_tc' might be used in a division
by 0 in "qpnum_per_tc = i40e_align_floor(vsi->nb_qps / total_tc)".

Fix it by changing 'total_tc' from 0 to 1 just as func
i40e_vsi_update_queue_mapping() does.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Liang-Min Larry Wang
dc66e5fd01 net/ixgbe: improve link state check on VF
In current implementation, when checking VF link state, PF state
is checked too, although the function has a parameter to tell
if PF state checking is needed.
But in some scenario, user may not care about the PF state.
This patch enables the unused parameter to only check the VF
link state.

Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-07-06 15:00:57 +02:00
John Miller
f588d3a5e2 net/ark: fix stats reset
Repairs a bug in the stats_reset where the wrong queue was
being passed into Tx reset.

Fixes: 727b3fe292 ("net/ark: integrate PMD")
Cc: stable@dpdk.org

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-07-06 15:00:57 +02:00
John Miller
9ae7448811 net/ark: support setting MTU
Allows a user extension to set a callback for the set_mtu
operation.

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-07-06 15:00:57 +02:00
John Miller
428046b403 net/ark: allow unique user data for each port
This change allows a user extension to provide unique private
callback data for all ports.

Arkville is a single-function multi-port device.  User_data resides
in the singleton Arkville structure.  This structure is shared across
all ports.

With this patch, we are providing a unique user pointer for each port
rather than a common pointer across multiple ports.

Signed-off-by: John Miller <john.miller@atomicrules.com>
2017-07-06 15:00:57 +02:00
Rahul Lakkireddy
e307e65b3f net/cxgbe: fix supported speed capabilities
Use port type to determine the supported speed capabilities.

Fixes: e274f57322 ("ethdev: add speed capabilities")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-07-06 15:00:57 +02:00
Rahul Lakkireddy
49fe15de47 net/cxgbe: update supported port module types
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-07-06 15:00:57 +02:00
George Wilkie
f023b9518e net/vmxnet3: preserve configured MAC address
When starting a vmxnet3 device, it is always writing the permanent MAC
address, even if a different MAC address was configured.  Write from
the device data instead which holds the current one.

Signed-off-by: George Wilkie <gwilkie@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-07-06 15:00:57 +02:00
Mandeep Rohilla
0bf3a2c07e net/vmxnet3: fix receive queue memory leak
This addresses an mbuf leak in an error condition during packet
receive.

Fixes: dfaff37fc4 ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Cc: stable@dpdk.org

Signed-off-by: Mandeep Rohilla <mrohilla@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-07-06 15:00:57 +02:00
Robert Shearman
d2ed0889e3 net/vmxnet3: make event processing less noisy
Make vmxnet3_process_events less noisy by removing logging when there
are no events to process and by making link, device-change and debug
events DEBUG level rather than ERR.

Change these to use PMD_DRV_LOG instead of PMD_INIT_LOG since they
don't happen at device init.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-07-06 15:00:57 +02:00
Robert Shearman
f8306df6bd net/vmxnet3: generate link-state change notifications
Generate link-state change notifications by listening to interrupts
generated by the device. Make use of the existing
vmxnet3_process_events function that was compiled out, but change it
to call vmxnet3_dev_link_update on a VMXNET3_ECR_LINK event and to not
be so noisy in its log messages.

Enable interrupts on starting the device, using a new helper function,
vmxnet3_enable_intr, based on vmxnet3_disable_intr and validated
against the FreeBSD driver.

Keep track of the number of interrupts registered for to avoid
hardcoding these in vmxnet3_enable/disable_intr and to provision for
any future rxq intr support.

Factor out the guts of vmxnet3_dev_link_update minus the started check
to allow the new function to be called from vmxnet3_dev_start in the
lsc-enabled case to ensure that the link state is correctly set from
the actual state at that point.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
2017-07-06 15:00:57 +02:00
Robert Shearman
086d7fe5b6 net/vmxnet3: implement extended stats
Implement xstats_get() to allow a number of driver-specific Tx and Rx
stats to be retrieved.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-07-06 15:00:57 +02:00
Nachiketa Prachanda
e4d56c333f net/vmxnet3: retain counters on restart
Most NICs like virtio, igb/ixgbe etc. don't reset counters on
dev_start and arguably this helps in monitoring the counters
across a longer time span with multiple device start/stops.
vmxnet3 behavior is opposite to that and counters are reset by
the host side implementation each time the device is restarted.

Change the driver to save the counters in its private context
before it is reset by writing CMD_ACTIVATE to REG_CMD.

Signed-off-by: Nachiketa Prachanda <nprachan@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-07-06 15:00:57 +02:00
Thomas Monjalon
4810d3af83 net/tap: restore state of remote device when closing
When exiting a DPDK application, the TAP remote was left
with the link down even if it was initially up.

The device flags of the remote netdevice are saved when probing,
and restored when calling the close function.
The remote state is not set down when calling the stop function anymore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-07-06 15:00:57 +02:00
Andrey Chilikin
856ceb331b app/testpmd: enable DDP remove profile feature
New command 'ddp del (port) (profile_path)' removes previously
loaded profile and deletes it from the list of the loaded profiles.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-07-06 15:00:57 +02:00
Andrey Chilikin
b319712f53 net/i40e: extended list of operations for DDP processing
This patch adds ability to remove already loaded profile
or write profile without registering it

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-07-06 15:00:57 +02:00
Andrey Chilikin
8d21a6228d app/testpmd: update DDP add command parameters
This patch adds optional output file path to 'ddp add' command:
'ddp add (port) (profile_path[,output_path])'

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
4fbf801efe net/i40e/base: update base code info
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
73cd7d6dc8 net/i40e: use set switch AQ instead of register setting
TPID can be set by set_switch_config aq, change the TPID setting
by set_switch_config on new FW release.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
496a357f11 net/i40e/base: extend processing of DDP
This patch adds extended processing of DDP packages:
 - Execution of adminq command sections to support AQ-depended profiles,
   for example, for programming cloud filters types.
 - Ability to write a profile without registering it in the list of
   applied profiles, to be used for AQ-depended profiles.
 - Profile rollback is implemented to support restoration of original
   parser/analyzer configuration without the need of core reset,
   for example, for deploying new profile without resetting device.
 - Search for a specific section in a profile, to be used by driver
   to access metadata sections with description of PCTYPE/PTYPEs
   defined in the profile.

Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
f5be569181 net/i40e/base: add EEPROM checksum verification
This patch ensures PFs mutually exclusive access to NVM.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
3c8b18c416 net/i40e/base: avoid reset timeout issue
This patch allows detection of upcoming core reset in case NIC gets
stuck while performing FLR reset. The i40e_pf_reset() function returns
I40E_ERR_NOT_READY when global reset was detected.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
156e15b5f7 net/i40e/base: avoid potential null pointer dereference
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
da499ab41b net/i40e/base: use admin queue for setting LEDs behavior
Instead of accessing register directly, use newly added AQC in
order to blink LEDs. Introduce and utilize a new flag to prevent
excessive API version checking.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
6da598714a net/i40e/base: support switch parameters
Adds double VLAN tagging ethertype fields to Set Switch Parameters AQ
command.  These were added in firmware API 1.7.

Callers of i40e_aq_set_switch_config() can specify the ethertypes to
use by filling out the corresponding fields in struct i40e_hw.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
7b8a3cc5df net/i40e/base: update FW AQ API version to 1.7
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
212cd71aac net/i40e/base: track id can be 0
track_id == 0 is valid for “read only” profiles when
profile does not have any “write” commands.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
e8228f1a16 net/i40e/base: report supported link modes
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
aa153cc89f net/i40e/base: add new PHY types for 25G AOC and ACC
This patch adds new phy types for 25G Active Optical Cables (AOC) and
Active Copper Cables (ACC) support.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:57 +02:00
Jingjing Wu
1216fb9f0c net/i40e/base: store the requested FEC information
Store information about FEC modes, that were requested. It will be used
in printing link status information function and this way there is no
need to call admin queue there.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Jingjing Wu
606fe321ab net/i40e/base: add support for Adaptive Virtual Function
Add device id define and mac_type assignment needed for Adaptive
Virtual Function.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Jingjing Wu
83b0670010 net/i40e/base: add AQ command for read/write PHY registers
This patch adds new additional command for accessing to PHY registers.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Jingjing Wu
671f126978 net/i40e/base: sync nvmupdate command and adminq subtask
During NVMupdate, state machine gets into unrecoverable state because
i40e_clean_adminq_subtask can get scheduled after the admin queue
command but before other state variables are updated.

This patch adds locking around admin queue command and update of
state variables so that adminq_subtask will have accurate information
whenever it gets scheduled.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Jingjing Wu
a58860f689 net/i40e/base: use new virtchnl header file
Modify the necessary files to be compatible with the new virtchnl.h file
instead of relying on i40e_virtchnl.h variant. This mostly changes
references to VIRTCHNL_ variables by removing prefix of I40E_.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Sha Zhang
95efa3cd64 net/bonding: fix when NTT flag updated
According to the standard, state machine of LACP should transmit lacpdu
when partner's state changes from slow to fast, rather than from fast
to slow.

Fixes: 46fb436836 ("bond: add mode 4")
Cc: stable@dpdk.org

Signed-off-by: Sha Zhang <zhangsha.zhang@huawei.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-07-06 15:00:56 +02:00
Olivier Matz
2209c3e2c2 net/i40e: avoid PCI probing failure when using bogus SFP
When a port is using a bogus SFP, the PCI probing returns an error,
preventing to register a portid.

To give a better chance to the applications to retry after the SFP is
changed, move this check in eth_i40e_dev_configure(), so that only a
port reconfiguration is needed to retry.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
774e9ea919 net/dpaa2: add support for multi seg buffers
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
29dfa62f5f net/dpaa2: add support for frame based Tx congestion
Change from byte based to frame based.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Shreyansh Jain
24a170cd30 bus/fslmc: add check for memseg availability
Cleanup the DMA map logic for memsegs. Earlier, in case
DMA mapping reaching end of segment, it reports a spurious error.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
e401e2c95a bus/fslmc: fix the failure loop condition
Correct the while condition for cleanup in case of failure.

Fixes: a0d5c9caf0 ("bus/fslmc: add frame queue based dq storage")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
a032b8e3d8 doc: change dpaa2 helper repository path
changing the NXP DPDK helper repository from helper to extras.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
4260d5038c net/dpaa2: disable Tx congestion notification
Making it off by default.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
30db823e04 net/dpaa2: check SoC version for stashing enable
Instead of qbman version, check the SoC version for stashing
enablement decision.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
599017a215 net/dpaa2: align the queue numbers with MC firmware
Align dpaa2 PMD driver code to the way MC Firmware manages queues.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
7cc4d35af5 net/dpaa2: set data align option in MC firmware
Configuring the MC FW to configure data alignment by default.
This help in improving performance for some of the platform variants.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Hemant Agrawal
55fd270311 net/dpaa2: set device driver
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-06 15:00:56 +02:00
Beilei Xing
6562269ca6 net/i40e: fix flow director for IPv6
After adding a fdir rule for IPv6 with input set TC, IPv6 packets
with the specific TC can't be assigned the right queue.
The root cause is that TC is parsed wrongly, this patch fixes
TC parsing problem.

Fixes: 7d83c152a2 ("net/i40e: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2017-07-06 15:00:56 +02:00
Xiao Wang
20c0a0c4e8 net/fm10k: initialize link status in device start
Fm10k host driver can't manage PHY directly and provides a fake link
status by always reporting LINK_UP. We should initialize link status
in device start, otherwise application will get LINK_DOWN status
when LSC configured.

Fixes: 9ae6068c86 ("fm10k: add dev start/stop")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
2017-07-06 15:00:56 +02:00