- In qede_mac_addr_set(), in order to configure default MAC address we
first delete the existing MAC address before trying to add new one. During
init time, there is no MAC filter to begin with, so trying to remove a
non-existing MAC address causes a firmware exception. This can be prevented
by internally calling qede_mac_addr_add() which has the checks in place to
delete a MAC address only if it was added before.
- Remove setting of the default MAC address from within
qede_dev_configure() since rte_eth_dev_start() calls mac_addr_set() anyway.
Fixes: 2ea6f76aff ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Only masked bits must be set in Verbs specification for a rule to be valid.
Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Testpmd failed to start when CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
is disabled, the root cause is the length of sw_ring and queue are
incorrect with the above configuration.
Fixes: 0be2953129 ("net/i40e: fix compile error")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Recently link status change interrupt was enabled by default in testpmd,
it has opened the driver bug with not working LSC interrupt if either
igb_uio or uio_pci_generic kernel driver is used.
Fixes: 06bc197796 ("net/sfc: interrupts support sufficient for event queue init")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Previous too pessimistic estimation made completely impossible to send
packets with many segments (more than 100 with minimum Tx ring size).
Fixes: 8b00f426eb ("net/sfc: implement EF10 native Tx datapath")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
When Receive Side Coalescing (RSC) is not used, the RSC Disable
(RSC_DIS) filed of register Receive Filter Control Register (RFCTL)
should be set according to ixgbe datasheet.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
* 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>
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>
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>
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>
This commit addresses the following compilation errors:
In file included from build/include/rte_cryptodev_scheduler.h:37:0,
from /tmp/check-includes.sh.5355.c:1:
build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id);
[...]
Fixes: 097ab0bac0 ("crypto/scheduler: add API")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
This commit addresses several errors related to missing includes such as:
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_fifo.h:77:22: error: 'struct rte_avp_fifo' declared
inside parameter list [-Werror]
[...]
build/include/rte_avp_fifo.h: In function 'avp_fifo_init':
build/include/rte_avp_fifo.h:81:3: error: implicit declaration of function
'rte_panic' [-Werror=implicit-function-declaration]
[...]
build/include/rte_avp_fifo.h:83:6: error: dereferencing pointer to
incomplete type
[...]
build/include/rte_avp_fifo.h:109:2: error: implicit declaration of
function 'rte_wmb' [-Werror=implicit-function-declaration]
[...]
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_common.h:104:2: error: unknown type name 'uint64_t'
[...]
build/include/rte_avp_common.h:386:15: error: 'ETHER_ADDR_LEN' undeclared
here (not in a function)
[...]
It addresses errors with strict compilation flags:
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_common.h:122:3: error: ISO C99 doesn't support
unnamed structs/unions [-Werror=pedantic]
[...]
build/include/rte_avp_common.h:136:17: error: ISO C forbids zero-size
array 'buffer' [-Werror=pedantic]
[...]
And also adds C++ awareness to both header files.
Fixes: 8e680655e2 ("net/avp: add public header files")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
license and copyright for hw and mc files are made consistent
as per the other dpaa2 dual licensed files.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
On FreeBSD it's not necessary to use -ldl to link apps which use
dlopen. This error only showed up with a shared library gcc build,
not standard build using static libs.
Fixes: 1131cbf0fb ("net/ark: stub PMD for Atomic Rules Arkville")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John Miller <john.miller@atomicrules.com>
Extend the LSC event handling to support the device removal as well. The
Verbs library will send several related events, that can conflict
with the LSC event itself.
The event handling has thus been made capable of receiving and signaling
several event types at once.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: Elad Persiko <eladpe@mellanox.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
ixgbe_dev_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and ixgbe_dev_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
To achieve functionality of retrieving only specific statistics
given by application there are two new functions added:
eth_igb_xstats_get_by_ids() which retrieve
values of statistics specified by ids array
and eth_igb_xstats_get_names_by_ids() which retrieve
names of statistics specified by ids array.
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
algo.h provides APIs for constructing non-protocol offload SEC
descriptors like hmac, blkciphers etc.
ipsec.h provides APIs for IPSEC offload descriptors.
common.h is a common helper file which for all descriptors
In future, additional algorithms' descriptors(PDCP etc.) will be
added in the desc/
Signed-off-by: Horia Geanta Neag <horia.geanta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
A set of header files(hw) which helps in making the descriptors
that are understood by NXP's SEC hardware.
This patch provides header files for command words which can be
used for descriptor formation.
Signed-off-by: Horia Geanta Neag <horia.geanta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
add support for dpseci object in MC driver.
DPSECI represent a crypto object in DPAA2.
Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Capability information is updated as slaves are attached,
but if this information is requested via rte_cryptodev_info_get()
when no slaves have been attached, the structure would not be
initialized, leading to a potential segmentation fault.
Therefore, the structure should be initialized with no
capabilities at device creation.
Fixes: 31439ee72b ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Commit <ecaed092b677> ("ring: return remaining entry count when
dequeuing") changed the return of rte_ring_sc_dequeue_bulk.
This patch updates the scheduler to comply with this change.
Fixes: 8a48e03943 ("crypto/scheduler: optimize crypto op ordering")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Crypto devices of the same type could be initialized
with the same name, since internally this name was suffixed
with an index.
Since commit <dda987315ca2> ("vdev: make virtual bus use its
device struct"), this is not allowed anymore.
Therefore, there is no need to create an unique name
at device initialization.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Check if virtual device name is NULL,
to avoid possible segmentation faults.
Fixes: 5d2aa461cb ("vdev: use generic vdev struct for probe and remove")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
This commit fixes zero physical address when IV not set
Fixes: 1703e94ac5 ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
This patch improves the cryptodev scheduler PMD's commandline
parsing capability. Originally, the scheduler's slave option
requires the slave vdev(s) being declared prior to it. This
patch removes this limitation by storing the slave names
temporarily and attaching them later.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This patch adds the missing doxygen comments and updated
inline comments to cryptodev scheduler
Fixes: d58a3f3125 ("crypto/scheduler: add documentation")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
After the refactoring of the capabilities, AES DOCSIS BPI
algorithm was left out.
Fixes: 6a3c87bc6a ("crypto/qat: refactor capabilities infrastructure")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This patch fixes the queue pair configuration for the scheduler PMD.
The queue pairs of a scheduler may have different nb_descriptors sizes,
which was not the case. Also, the maximum available objects in a
queue pair is 1 object smaller than nb_descriptors. This patch fixes
these issues.
Fixes: a783aa6344 ("crypto/scheduler: add packet size based mode")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Some scheduling modes may need extra options to be configured,
this patch adds the function prototype for setting/getting
options.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
When taking events from a port, we checked the history list to check if the
event needed to be put back in order i.e. originally came from a reordered
queue type. The check for reordering involved checking if the reorder
buffer entry pointer was null. However, after that pointer was used it was
never cleared to null again.
This caused problems when we had mixed reordered and atomic or parallel
events, as the events from the latter two queue types were misidentified as
needing reordering. This let in some cases to crashes, but mostly led to
dropping events, and then application lock-up.
Fixes: 617995dfc5 ("event/sw: add scheduling logic")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This patch returns a credit when an rte_event is
enqueued with an invalid queue_id. Previously a
credit was leaked from the system.
Note that the eventdev instance does not attempt
to free any resources that the rte_event owns. As
a result, resources owned by the rte_event are leaked.
Eg. if the rte_event represents an rte_mbuf, the mbuf
will not be freed, and causes a leak from the mempool.
Fixes: 656af91800 ("event/sw: add worker core functions")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
The flow id of packets was not being hashed on ingress
on an ordered queue. Fix by applying same hashing as is
applied in the atomic queue case. The hashing itself is
broken out into a macro to avoid duplication of code.
Fixes: 617995dfc5 ("event/sw: add scheduling logic")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Current virtio_dev_stop only disables interrupt and marks link down,
When it is invoked, tx/rx traffic flows still work. This is a strange
behavior. The patch supports the switch of flow.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
virtio-user cannot work on 32-bit system as higher 32-bit of the
addr field (64-bit) in the desc is filled with non-zero value
which should not happen for a 32-bit system.
In case of virtio-user, we use buf_addr of mbuf to fill the
virtqueue desc addr. This is a regression bug. For 32-bit system,
the first 4 bytes of mbuf is buf_addr, with following 8 bytes for
buf_phyaddr. With below wrong definition, both buf_addr and lower
4 bytes buf_phyaddr are obtained to fill the virtqueue desc.
#define VIRTIO_MBUF_ADDR(mb, vq) \
(*(uint64_t *)((uintptr_t)(mb) + (vq)->offset))
Fixes: 25f80d1087 ("net/virtio: fix packet corruption")
Cc: stable@dpdk.org
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Previously, we miss to set intr_handle->fd which will be used as
target file for epoll to check LSC.
As a result, stdin (0) is used and intr thread keeps busy whenever
data comes from stdin.
To fix this, we use vhostfd as the target file for epoll to check
the link status change events. And we move intr_handle initialization
after vhost backend settup to make sure vhostfd is initialized.
Fixes: 35c4f85548 ("net/virtio-user: support to report net status")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
The virtio port link status will always be UP, even the port is stopped:
testpmd> port stop 0
Stopping ports...
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Done
The link status is queried by link_update callback when LSC is disabled.
Which in turn queries the "status" field. However, the "status" is
read-only. I couldn't think of some proper ways to change the status
without doing device reset.
Instead of doing (the heavy) reset at stop, this patch introduced a flag,
which is set to 1 and 0 on start and stop, respectively. When it's set to
0, the link status is set to DOWN unconditionally.
Fixes: a85786dc81 ("virtio: fix states handling during initialization")
Cc: stable@dpdk.org
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
We only enabled LSC when using vhost-user as the backend, but it is
reported even when using vhost-kernel as the backend.
Fix it by only reportting LSC support when using vhost-user as the
backend.
Fixes: 35c4f85548 ("net/virtio-user: support to report net status")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
The feature negotiation in virtio-user is proven to be broken,
which results in device initialization failure.
Originally, we get features from vhost backend, and remove those
that are not supported. But when new feature is added, for example,
VIRTIO_NET_F_MTU, we fail to remove this new feature. Then, this
new feature will be negotiated, as both frontend and backend claim
to support this feature.
To fix it, we add a macro to record supported features, as a filter
to remove newly added features.
Fixes: 37a7eb2ae8 ("net/virtio-user: add device emulation layer")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Move the call to stop the device inside the close routine because close
needs to stop the device if it isn't stopped.
Free the allocated queue buffers in close instead of doing so in remove.
Original code had these clean ups in remove which was causing memory
leak.
Signed-off-by: Sagar Abhang <sabhang@brocade.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>