Handle different MAC statistic fields between two chip variants by
reading the MAC counters from the adapter suitable statistics bins.
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
'commit 4c4bdadfa9 ("net/qede: refactoring multi-queue implementation")'
introduced a regression where default RSS configuration is incorrect in
the case of 100G mode. Currently we are passing absolute queue ids while
creating RX/TX queues. But in CMT mode we need to provide queue id
relative to the engine id. So this fix takes into account num_hwfns
while creating queues.
Fixes: 4c4bdadfa9 ("net/qede: refactoring multi-queue implementation")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This patch modifies the recovery flow to allow ongoing PCIe
transactions to be completed. To achieve this, the load sequence is
changed such that the "final_cleanup" notification is sent while the
FID_enable is cleared.
This change ensures that the chip cleanup actions takes place from
previous driver instance if needed.
Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
The callback arguments to _rte_eth_dev_callback_process() are swapped.
Fix them.
Fixes: d6af1a13d7 ("ethdev: add return values to callback process API")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The corrupted code doesn't return error when probe function
fails due to error in device mac address getting.
By this way, the probe function may return success even if the
ETH dev is not allocated.
Hence, the probe caller, for example failsafe PMD, fails when it
tries to get ETH dev after the device was plugged out while mlx4
was probing it.
The fix adds error report to the probe caller when priv_get_mac fails
and in all other failure options which are missing it.
By this way, it prevents the unexpected behavior to miss ETH device
after the device was probed successfully.
Fixes: 7fae69eeff ("mlx4: new poll mode driver")
Fixes: 001a520e41 ("net/mlx4: add port parameter")
Fixes: 7b06615392 ("mlx4: check if port is configured for ethernet")
Fixes: fec3608673 ("mlx4: query netdevice to get initial MAC address")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
The corrupted code causes segmentation fault when user creates
flow with drop action before device starting.
For example, failsafe PMD recreates all the flows before calling
dev_start in plug-in sequence and mlx4 allocated its flow drop
queue in dev_start.
Hence, when failsafe created flow with drop action after plug-in
event, mlx4 tried to dereference flow drop queue which was
uninitialized.
The fix added check to the drop qp accessible and conditioned the
ibv_create_flow calling on device starting.
Fixes: 642fe56a1b ("net/mlx4: use a single drop queue for all drop flows")
Fixes: 46d5736a70 ("net/mlx4: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Calculation of packet type is currently enabled only when HW checksum is
enabled.
This isn't related to HW checksum offload. Enable it regardless.
Fixes: 081f7eae24 ("mlx5: process offload flags only when requested")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
When advancing Tx ring index (txq->wqe_ci) in txq_scatter_v(), the title
descriptor of multi-packet send isn't taken into account if it doesn't
cross 64B boundary.
Fixes: 6cb559d67b ("net/mlx5: add vectorized Rx/Tx burst for x86")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
mlx5_tx_complete() polls completion queue multiple times until it
encounters an invalid entry. As Tx completions are suppressed by
MLX5_TX_COMP_THRESH, it is waste of cycles to expect multiple
completions in a poll. And freeing too many buffers in a call can
cause high jitter.
This patch improves throughput a little.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Only set the vlanonly bit if vlan_nonvlan is clear. Also, allow the
VLAN table to be cleared when vlanonly is set.
Clearing the VLAN table when vlanonly is set will stop all traffic
since it requires all frames to have a VLAN tag, and that tag to be
in the zero-length table. This is still a valid use case though,
and has been seen in the wild.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch stops PF from sending messages to inactive VF
and modifies VF state to active when VF reset is completed.
Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
RTE_ETH_EVENT_INTR_LSC callbacks are not called when all slaves goes down
in bond_ethdev_lsc_event_callback. It causes that link status change of
bonded device is not propagated up.
Fixes: deba8a2f8b ("net/bonding: fix link properties management")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
rte_eth_bond_primary_set segfaults for invalid port. This patch moves
devices check before use of internal data.
Fixes: 4c42498d91 ("net/bonding: allow slaves to also be bonded devices")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Some phy's take longer than others to come up. Add a retry to give
more phy's a chance to come up before returning an error.
Fixes: 2209c3e2c2 ("net/i40e: avoid PCI probing failure when using bogus SFP")
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
ETHTOOL_GLINKSETTINGS ioctl call in mlx5 pmd returns inconsistent
link status due to which any application relying on it would not
function correctly.
Fixes: 1884087198 ("net/mlx5: fix support for newer link speeds")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
If the current VLAN anti spoof setting is same as the new value,
the firmware can return an error. Call the HWRM command to update
the new setting if it is different from the current value.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
The pci_id_ixgbe_map table has only PCI_ANY_ID for
.subvend and .subdev in all entries. Using of IXGBE_SUBDEV_ID_82599_SFP
for 'dev' is not correct. It generates the wrong PMD_INFO_STRING.
The output of the program "dpdk-pmdinfo.py" is confusing.
Signed-off-by: Leonid Myravjev <myravjev@amicon.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Mirror rule id should not exceed the boundary defined by
IXGBE_MAX_MIRROR_RULES.
Fixes: fe3a45fd41 ("ixgbe: add VMDq support")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
This patch sends the HWRM command to free a filter in the hardware,
before using it again.
Fixes: f92735db1e ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
We are wrongly using a Rx side HWRM command set_rx_mask to configure
VLAN anti-spoof. This being a Tx side feature, this patch
tries to fix it.
Since the HWRM command to do it is available only in
the newer firmware versions, the patch verifies the firmware
version before attempting to send the HWRM command to
the firmware.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This patch resets the VF stats during initialization
Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
remove the unnecessary rte_delay in bnxt_set_hwrm_link_config
Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Check if the vnic_id and rss_rule is not invalid before passing it
to the firmware to cleanup the VNIC. Log a message if the vnic_id
is invalid.
Fixes: db678d5c2b ("net/bnxt: add HWRM VNIC configure")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Fix use of local variable to avoid segfault.
cnt was incorrectly tested and decremented in the loop that removes
a VLAN from the table.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
1) handle_async_event is a DEBUG level log message.
2) Log "Unable to get default VNIC for VF %d" at INFO level.
Fixes: 36735a932c ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Enable the functions set link down and set link up in i40e by check
phy_type, and fix the issue of auto negotiation failed in XXV710 when
bind kernel driver after unbind from DPDK driver by modify the speed
setting distinguish from set link up and down. With this fix, if unbind
DPDK to bind kernel driver, no need to set auto negotiation and ifconfig
up anymore, remove the part from doc.
Fixes: ca7e599d45 ("net/i40e: fix link management")
Fixes: 2f1e228174 ("i40e: skip link control as firmware workaround")
Fixes: 6e145fcc75 ("i40e: support autoneg or force link speed")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This NIC type port check should use port index
not mask for 82599ES.
Fixes: d9347d2540 ("net/ixgbe: support 82599ES SCTP packet drop action")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Only x550 family support SCTP port in FDIR filter, so
add this limitation when parse consistent API.
Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
If there's no Traffic Management node added. Not
necessary to check if TM is committed.
Fixes: cac29c3c00 ("net/i40e: support committing TM hierarchy")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
If there's no Traffic Management node added,
not necessary to check if TM is committed.
Fixes: 5713ade697 ("net/ixgbe: support committing TM hierarchy")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
When use rte_eth_dev_configure() to enable rx queue interrupt for virtio
devices, virtio_init_device() isn't called to set up the interrupt
environment, which causes rx queue interrupt setup failed. This patch is
to fix this issue.
Fixes: 26b683b4f7 ("net/virtio: setup Rx queue interrupts")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
When virtio-net devices are bound to uio_pci_generic, we get
the wrong mac addr by virtio PMD. The wrong mac addr is a
addr that is 4-byte left shift of the correct addr.
It's a regression bug introduced by the cleanup patch below.
The condition of if we set use_msix should be if msix is
actually enabled. Only to check if there is a capability list
is not enough. For example, binding a transitional device
to uio_pci_device would trigger the wrong assignment of use_msix.
To correct that, we also check the flags of msix capability to
make sure it's enabled.
Fixes: ee1843bd89 ("net/virtio: remove redundant MSI-X detection")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
This PMD supports hotplug, it is able to be detached.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
For larger packet size congestion is observed on Tx Queues.
This patch enables Tx Queue congestion state check support.
If congested, try to resend the packet few times.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
when creating a bond device in testpmd, a name for a device must meet
the correct convention described in the documentation:
The device name must start with the net_bonding prefix
followed by numbers or letters.
Change for ALB mempool allocation - mem_name was too long.
Fixes: 9bf4901d1a ("bus/vdev: remove probe with driver name option")
Cc: stable@dpdk.org
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
ctype.h is not compilable in BSD 10 on GCC 4.8 in C11 mode.
CC failsafe.o
In file included from /usr/include/_ctype.h:94:0,
from /usr/include/ctype.h:46,
from /root/dpdk.org/build/include/rte_common.h:50,
from /root/dpdk.org/build/include/rte_memory.h:57,
from /root/dpdk.org/build/include/rte_malloc.h:45,
from /root/dpdk.org/drivers/net/failsafe/failsafe.c:35:
/usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'const'
extern _Thread_local const _RuneLocale *_ThreadRuneLocale;
^
/usr/include/runetype.h: In function '__getCurrentRuneLocale':
/usr/include/runetype.h:96:6: error: '_ThreadRuneLocale' undeclareds
(first use in this function)
if (_ThreadRuneLocale)
^
The fix is to put GCC in gnu99 mode instead.
Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
This patch add support for setting additional aggregator modes for
IEEE802.3AD in similar manner that are supported in kernel mode.
This will add support for other manner:
stable - default mode taken from IEEE802.11AX this is default
aggregator mode
bandwidth - takes aggregator with highest bandwidth
count - takes aggregator with biggest number of slaves
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
i40e VF close would stop the VF first, if VF already stopped this
result duplicate add/del MAC address which cause failure in executing
admin command.
Fix this by adding VF stop status check and sync up VF MAC address count
during add/del.
Fixes: d42aaf3000 ("i40e: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
x550 devices don't map interrupt vector before enabling Rx/Tx queue
interrupt.
Because of this interrupt mode is not working for x550 devices.
Fixes: d2e72774e5 ("ixgbe/base: support X550")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
Add queue index check when create filter rule, or
filter with invalid queue id can be created successfully.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Listen to INTR_RMV events issued by slaves.
Add atomic flags on slave queues to detect use of slave bursts function.
If a removal is detected, set the recollection flag on this slave.
During a slave upkeep round, if its recollection flag is set and its
burst functions are not in use by any thread, remove that slave.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>