When the fail-safe device is reconfigured, it attempts to register
again for the sub-devices LSC and RMV events.
Prevent an event registration if it is already done.
Fixes: 598fb8aec6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
The fail-safe PMD registers to RMV event for each removable sub-device
port in order to cleanup the sub-device resources and switch the Tx
sub-device directly when it is plugged-out.
During removal time, the fail-safe PMD stops and closes the sub-device
but it doesn't unregister the LSC and RMV callbacks of the sub-device
port.
It can lead the callbacks to be called for a port which is no more
associated with the fail-safe sub-device, because there is not a
guarantee that a sub-device gets the same port ID for each plug-in
process. This port, for example, may belong to another sub-device of a
different fail-safe device.
Unregister the LSC and RMV callbacks for sub-devices which are not
used.
Fixes: 598fb8aec6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Since commit 97b2217ae5 ("net/mlx4: advertise supported RSS hash
functions"), this PMD includes two similar-looking functions that convert
RSS hash fields between Verbs and DPDK formats.
This patch refactors them as a single two-way function and gets rid of
redundant helper macros.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Below commit documents 0 as a value standing for a default set of RSS hash
types, however the mlx4 PMD doesn't interpret it correctly and still uses
its own internal special value for that (-1).
Also, its function prototype was not updated.
Fixes: ac8d22de23 ("ethdev: flatten RSS configuration in flow API")
Fixes: 1d173da83e ("net/mlx4: fix default RSS hash fields")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cleanup remain dependency on old rxmode flags since we move to
new offload APIs.
Fixes: c3ac7c5b0b ("net/i40e: convert to new Rx offloads API")
Fixes: e0cb96204b ("net/i40e: add support for representor ports")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
rte_eth_bond_8023ad_slave_info() wasn't exported in the original work.
Useful to extract information about the current 802.3ad state.
Fixes: 46fb436836 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems
unless it was already specified by the EAL command line.
The detection of a specified NetVSC device is wrongly done by comparing
the vdev_netvsc driver name to all the vdev devices names, including
the suffix device index. Thus, if the user specifies the vdev_netvsc
device by adding an index to the device name, the comparison fails.
Consequently, the vdev_netvsc driver may automatically probe NetVSC
devices, despite the NetVSC device that was specified by the EAL command
line.
Compare the vdev_netvsc driver name to the devices names without the
index.
Fixes: 56252de779 ("net/vdev_netvsc: add automatic probing")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Fixes: fbe90cdd77 ("ethdev: add probing finish function")
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
Following error reported by cppcheck:
(error) Shifting signed 32-bit value by 31 bits is
undefined behaviour. The patch fixes it.
Fixes: 8db9e2a1b2 ("i40e: base driver")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit fixes a compilation error if EM_PMD is
not defined, bug IGB_PMD is. The root cause of the
issue was that log init variables are declared as
extern in a header file, while the definition of the
variables was in e1000_ethdev.c. Hence, the definitions
were not available if the e1000 PMD is disabled.
To fix this, a new file is added e1000_logs.c, which
matches the e1000_logs.h header. The log variables are
always compiled in, but the PMD logs are only registered
if a PMD is enabled in the configuration. Extra checks
are added in order to avoid duplicate registering.
Fixes: ed5bbb767c ("net/e1000: implement dynamic logging")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
With the commit af4f09f282 ("net/mlx5: prefix all functions with mlx5"),
mlx5_xstats_get() is not compliant any longer with the api.
It always returns the caller max entries count while it should return how
many entries it wrote/wanted to write.
Fixes: af4f09f282 ("net/mlx5: prefix all functions with mlx5")
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
TAP device is created following its first queue creation. Multiple
queues can be added or removed over time. In Linux terminology those
are file descriptors which are opened or closed over time. As long as
the number of opened file descriptors is positive - TAP device will
appear as a Linux device. In case all queues are released (the
equivalent of all file descriptors being closed) the TAP device will
be removed. This can lead to abnormalities in different scenarios
where the TAP device should exist even if all its queues are released.
In order to make TAP existence independent of its number of queues -
an extra file descriptor is opened on TAP creation and is closed on
TAP closure. Its only purpose is to serve as a keep-alive mechanism
for the TAP device.
Fixes: bf7b7f437b ("net/tap: create netdevice during probing")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Add force_link_up devargs to always force link as up for VFs.
This enables VFs on the same NIC to send traffic to each other
even when physical link is down.
Also add RTE_PMD_REGISTER_PARAM_STRING to export all supported
devargs.
Fixes: 011ebc236d ("net/cxgbe: add skeleton VF driver")
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
The resetting of stats on a VF involves the setting of an offset
that is subtracted from future calls, rather zeroing of counters.
However doing a stats reset on the port representor was also
adjusting the values forwarded to the VF, which had the effect of
corrupting the VF's counters. The fix is for the port representor
to maintain its own stats offset, so the port representor and VF
maintain independently-resettable counters.
Fixes: e0cb96204b ("net/i40e: add support for representor ports")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The old ixgbe_vlan_offload_set() is called by
rte_eth_dev_set_vlan_offload() which is meant to config VLAN
strip/filter/extend on all queues.
This old function is also called by rte_eth_dev_start()/ixgbe_dev_start()
which need support per-queue VALN strip on only parts of queues.
So add new function ixgbe_vlan_offload_config() =
old ixgbe_vlan_offload_set().
This new function is called by ixgbe_dev_start() to support VLAN strip
per-queue configuration.
New ixgbe_vlan_offload_set() = codes to align VLAN strip flags on all
queues with port level setting + new ixgbe_vlan_offload_configure().
The 2nd function is called by rte_eth_dev_set_vlan_offload to support
configure VLAN strip on all queues of whole port.
Fixes: 216f78f4d5 ("net/ixgbe: support VLAN strip per queue offloading in PF")
Fixes: 860a94d3c6 ("net/ixgbe: support VLAN strip per queue offloading in VF")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
There is no need to return failure (-EEXIST) when the requested
filter is already configured.
Fixes: d6cb17535f ("net/qede: fix VLAN filters")
Fixes: 77fac1b54f ("net/qede: fix filtering code")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Reduce the verbosity in ecore_pglueb_rbc_attn_handler() while logging
errmsg during HW init. This could happen due to ungraceful exit of
previous driver instance.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This patch removes unnecessary check in ixgbe_check_mq_mode, which
fixes the DCB configuration issue.
Fixes: 27b609cbd1 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch adds a pair of "()" to embrace the argument
input to the function-like macro invocation.
drivers/net/mlx5/mlx5_rxtx_vec.c:37:
drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments
provided to function-like macro invocation
(uint16x8_t) { 0, 0, cs_flags, rte_cpu_to_be_16(len),
Fixes: 570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
The value of rte_errno must be positive in case of an error.
Fixes: d77d07391d ("net/sfc: support flow API RSS action")
Cc: stable@dpdk.org
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This patch addresses the following issues reported by cppcheck:
[drivers/net/mlx4/mlx4_rxtx.c:266]: (error) Shifting signed 32-bit value
by 31 bits is undefined behaviour
[drivers/net/mlx4/mlx4_rxtx.c:624]: (error) Shifting signed 32-bit value
by 31 bits is undefined behaviour
[drivers/net/mlx4/mlx4_txq.c:89]: (error) Shifting signed 32-bit value by
31 bits is undefined behaviour
[drivers/net/mlx4/mlx4_txq.c:91]: (error) Shifting signed 32-bit value by
31 bits is undefined behaviour
Fixes: 78e81a9844 ("net/mlx4: merge Tx queue rings management")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Using inner RSS by default for GRE leads to memory corruption as the
extra flow items added for the inner RSS are not counted in the flow
attributes buffer size.
Fixing by enforcing the default RSS level to be outer. This much
simplify the flow engine and more robust.
Future optimization for out of the box RSS can be done on subsequent
commits.
Fixes: d4a405186b ("net/mlx5: support tunnel RSS level")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
When resetting ports, traffic will be blocked. There is a mistake when
getting hw info at avf_dev_stop. This causes the device stop without
stopping queues. This patch fixes this issue.
Fixes: 69dd4c3d08 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
To support kernel VF, PBA bit is always set. But it may
cause the too many interrupts issue on specific Linux
kernel versions, e.g. 4.4.0-116.
PF host should set the auto clean, mask and throttling
as we always set the register for kernel VF.
Fixes: 6b75183ac4 ("net/ixgbe: fix wrong PBA setting")
Cc: stable@dpdk.org
Signed-off-by: Michael Luo <michael.luo@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
If flow director is enabled, FDIR Tx queue can't
be disabled when exiting application. Root cause
is FDIR Tx queue is not disabled before removing
HMC backing store.
Fixes: 71d35259ff ("i40e: tear down flow director")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Such a message could be generated by two places
in the code, and there is a difference in the
text albeit there is no difference in the meaning.
These two messages must be the same so that
automated error log comparison may be carried
out without confusion.
Fixes: a9825ccf5b ("net/sfc: support flow API filters")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Number of descriptors in equal stride super-buffer Rx mode defines
number of packet buffers to be used. Each HW Rx descriptor has
many packet buffers and the number depends on total size of mbuf
and CONFIG_RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB value.
Typically it makes a bit less than 32 buffers per descriptor.
Since HW Rx descriptors must be pushed by 8, it makes about 256
as required minimum. Double it in advertised minimum to allow for
at least 2 refill blocks.
Fixes: 390f9b8d82 ("net/sfc: support equal stride super-buffer Rx mode")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Running testpmd command "flow isolae <port> 0" (i.e. disabling flow
isolation) followed by command "flow isolate <port> 1" (i.e. enabling
flow isolation) may result in a TAP error:
PMD: Kernel refused TC filter rule creation (17): File exists
Root cause analysis: when disabling flow isolation we keep the local
rule to redirect packets on TX (TAP_REMOTE_TX index) while we add it
again when enabling flow isolation. As a result this rule is added
two times in a row which results in "File exists" error.
The fix is to identify the "File exists" error and silently ignore it.
Another issue occurs when enabling isolation mode several times in a
row in which case the same tc rules are added consecutively and
rte_flow structs are added to a linked list before removing the
previous rte_flow structs.
The fix is to act upon isolation mode command only when there is a
change from "0" to "1" (or vice versa).
Fixes: f503d26948 ("net/tap: support flow API isolated mode")
Cc: stable@dpdk.org
Reviewed-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
IBV_RX_HASH_INNER should be referenced only when having tunnel support
in the Verbs headers.
Fixes: 80f2d0ed7f ("net/mlx5: add hardware flow debug dump")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Drop flow rules are created on the ETH queue even though the parser layer
matches the flow rule layer (L3/L4)
Fixes: 6f2f4948b2 ("net/mlx5: fix flow director rule deletion crash")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
In legacy-mem mode, memory event callback registering is not supported,
we should not return error in dev_init on this case.
Fixes: 12ecb2f63b ("net/virtio-user: support memory hotplug")
Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Currently VIRTIO_NET_F_MAC is set unconditionally when server
mode is used. It should be stripped when MAC isn't specified.
Fixes: bd8f50a45d ("net/virtio-user: support server mode")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
The ol_flags of mbufs returned by rte_vhost_dequeue_burst()
contain necessary offload information. It can't be zeroed.
Fixes: f63d356ee9 ("net/vhost: insert/strip VLAN header in software")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
When the backend is vhost-net, virtio-user must work in client mode and
needs to request features from the backend in virtio_user_dev_init().
But currently, virtio-user is assigned to default features in this case.
This patch is to fix this inappropriate feature setting.
Fixes: bd8f50a45d ("net/virtio-user: support server mode")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Fixes: ccdcba53a3 ("net/mlx5: use Netlink to add/remove MAC addresses")
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
In function ‘elink_check_kr2_wa’:
drivers/net/bnx2x/elink.c:12922:28:
error: bitwise comparison always evaluates to false
[-Werror=tautological-compare]
((next_page & 0xe0) == 0x2))));
This was fixed elsewhere in 2014
Fixes: b5bf771922 ("bnx2x: driver support routines")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
This is stopping the compiler telling you when you have
done something stupid... that is something none of us
can afford...
Now gcc 8.x can tell you did something stupid despite
trying to hide the evidence.
Remove all the "black magic" casts.
Fix the actual problems.
Fixes: b5bf771922 ("bnx2x: driver support routines")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
Continue snprintf to strlcpy conversions started by commit
c022cb400e ("convert snprintf to strlcpy").
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
drivers/net/vdev_netvsc/vdev_netvsc.c:335:2:error:
passing argument 2 to restrict-qualified parameter aliases with argument 1
ret = readlink(buf, buf, size);
^~~
Fixes: e7dc5d7bec ("net/vdev_netvsc: implement core functionality")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fixes: 73280c1e4f ("net/sfc: support xstats retrieval by ID")
Fixes: 7b9891769f ("net/sfc: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>