| a03e4b62 | 16-Jul-2021 |
Konstantin Ananyev <[email protected]> |
raw/ioat: fix termination descriptor for batch
When batch_size == 1, idxd has to add a dummy termination descriptor to satisfy HW requirements. Right now it uses NOP descriptor with FENCE flag. This
raw/ioat: fix termination descriptor for batch
When batch_size == 1, idxd has to add a dummy termination descriptor to satisfy HW requirements. Right now it uses NOP descriptor with FENCE flag. This is excessive and fencing can slowdown things quite significantly. The patch removes FENCE flag from termination dummy descriptor. That helps to improve performance for no-burst scenarios.
Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
Signed-off-by: Konstantin Ananyev <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| 7972110e | 17-Jun-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: fix missing ring pointer reset
In the event of a device reconfigure, "hdls_avail" is not being reset. This can lead to miscalculations in rte_ioat_completed_ops(), causing the function to
raw/ioat: fix missing ring pointer reset
In the event of a device reconfigure, "hdls_avail" is not being reset. This can lead to miscalculations in rte_ioat_completed_ops(), causing the function to report an incorrect amount of completed operations. This patch fixes the issue by resetting "hdls_avail" during the device configure.
Fixes: 74464005a2af ("raw/ioat: rework SW ring layout") Cc: [email protected]
Signed-off-by: Kevin Laatz <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| 6ce4f3d0 | 17-Jun-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: fix memory leak in device configure
During device configure, memory is allocated for "hdl_ring_flags". In the event of another call to the device configure function (reconfigure), a memory
raw/ioat: fix memory leak in device configure
During device configure, memory is allocated for "hdl_ring_flags". In the event of another call to the device configure function (reconfigure), a memory leak would occur. This patch fixes the memory leak by free'ing the memory before reallocating it.
Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs") Cc: [email protected]
Signed-off-by: Kevin Laatz <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| 1383fb67 | 28-May-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: add device reset to configuration script
Currently once a device is configured, the user does not have the ability to reset the device via the script.
This patch adds a device reset optio
raw/ioat: add device reset to configuration script
Currently once a device is configured, the user does not have the ability to reset the device via the script.
This patch adds a device reset option to the script. For example "$dpdk_idxd_cfg.py 0 --reset" would reset device 0.
Signed-off-by: Kevin Laatz <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| 1e5aade7 | 28-May-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: handle PCI address in configuration script
Currently the user needs to find the DSA instance number for any DSA device they would like to configure using this script, which can be cumberso
raw/ioat: handle PCI address in configuration script
Currently the user needs to find the DSA instance number for any DSA device they would like to configure using this script, which can be cumbersome and error-prone since the instance numbering may change when changing the binding of the devices between vfio-pci and idxd.
This patch improves the usability of the script by adding the ability to specify the DSA device to configure using the device's PCI address instead of the DSA instance number. For example, "$dpdk_idxd_cfg.py 0" and "$dpdk_idxd_cfg.py 6a:01.0" are both valid references to the same device (assuming the numbering).
Signed-off-by: Kevin Laatz <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| f6e89664 | 12-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: remove special case for no status reporting
The special fast-path for returning completed descriptors without reporting status or user-handles returns the number of completed ring slots us
raw/ioat: remove special case for no status reporting
The special fast-path for returning completed descriptors without reporting status or user-handles returns the number of completed ring slots used, rather than the number of actual user-submitted jobs. This means that the counts returned are too high, as the batch descriptor slots would be included in the total. Therefore remove this special case, and use the normal status-processing path so that the returned count is correct in all cases.
Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
Reported-by: Jiayu Hu <[email protected]> Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Kevin Laatz <[email protected]>
show more ...
|
| 5cf6947c | 12-May-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: fix parameter shadow warning
In the function __idxd_completed_ops() we have a parameter shadow warning due to a local variable having the same name as one of the function parameters. This
raw/ioat: fix parameter shadow warning
In the function __idxd_completed_ops() we have a parameter shadow warning due to a local variable having the same name as one of the function parameters. This issue is fixed by simply renaming the local variable.
This warning was caught when additions were made to the OVS codebase, which include adding calls the IOAT APIs. The OVS build passes the -Wshadow flag by default, allowing the warning to be seen when building OVS with DPDK 21.05-rc2.
Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
Reported-by: Sunil Pai G <[email protected]> Signed-off-by: Kevin Laatz <[email protected]> Tested-by: Sunil Pai G <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| eeded204 | 26-Apr-2021 |
David Marchand <[email protected]> |
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new
log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype with their class reflected in it, and libraries use a lib. logtype.
Introduce two new macros: - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is used in a component. It is associated to the default name provided by the build system, - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used, and then the passed name is appended to the default name,
RTE_LOG_REGISTER is left untouched for existing external users and for components that do not comply with the convention.
There is a new Meson variable log_prefix to adapt the default name for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
Note: achieved with below commands + reverted change on net/bonding + edits on crypto/virtio, compress/mlx5, regex/mlx5
$ git grep -l RTE_LOG_REGISTER drivers/ | while read file; do pattern=${file##drivers/}; class=${pattern%%/*}; pattern=${pattern#$class/}; drv=${pattern%%/*}; case "$class" in baseband) pattern=pmd.bb.$drv;; bus) pattern=bus.$drv;; mempool) pattern=mempool.$drv;; *) pattern=pmd.$class.$drv;; esac sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
$ git grep -l RTE_LOG_REGISTER lib/ | while read file; do pattern=${file##lib/}; pattern=lib.${pattern%%/*}; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; done
Signed-off-by: David Marchand <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Bruce Richardson <[email protected]>
show more ...
|
| f51c826f | 06-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: skip VA requirement for bus without device
If after a bus scan, there are no devices using a particular bus, then that bus should not be taken into account when deciding whether DPDK shoul
raw/ioat: skip VA requirement for bus without device
If after a bus scan, there are no devices using a particular bus, then that bus should not be taken into account when deciding whether DPDK should be run in VA or PA addressing mode. This becomes an issue when the DSA bus driver code is used on a system without an IOMMU. The PCI bus correctly reports that it only works in PA mode, while the DSA bus - also correctly - reports that it works only in VA mode. The difference is that there will be no devices found in a scan for the DSA bus, since the kernel driver can only present those to userspace in the presence of an IOMMU.
While we could change DSA instance to always report that it does not care about the addressing mode, this would imply that it could be used with DPDK in PA mode which is not the case. Therefore, this patch changes the driver to report DC (don't care) in the case where no devices are present, and VA otherwise.
NOTE: this addressing mode use of VA-only applies only in the case of using DSA through the idxd kernel driver. The use of DSA though vfio-pci is unaffected and works as with other PCI devices.
Fixes: b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")
Reported-by: Harry van Haaren <[email protected]> Signed-off-by: Bruce Richardson <[email protected]> Tested-by: Anatoly Burakov <[email protected]> Tested-by: Harry van Haaren <[email protected]> Tested-by: Conor Walsh <[email protected]>
show more ...
|
| 245efe54 | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: report status of completed jobs
Add improved error handling to rte_ioat_completed_ops(). This patch adds new parameters to the function to enable the user to track the completion status of
raw/ioat: report status of completed jobs
Add improved error handling to rte_ioat_completed_ops(). This patch adds new parameters to the function to enable the user to track the completion status of each individual operation in a batch. With this addition, the function can help the user to determine firstly, how many operations may have failed or been skipped and then secondly, which specific operations did not complete successfully.
Signed-off-by: Kevin Laatz <[email protected]> Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| 29cf9c11 | 04-May-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: add API to query remaining ring space
Add a new API to query remaining descriptor ring capacity. This API is useful, for example, when an application needs to enqueue a fragmented packet a
raw/ioat: add API to query remaining ring space
Add a new API to query remaining descriptor ring capacity. This API is useful, for example, when an application needs to enqueue a fragmented packet and wants to ensure that all segments of the packet will be enqueued together.
Signed-off-by: Kevin Laatz <[email protected]> Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| 74464005 | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: rework SW ring layout
The ring management in the idxd part of the driver is more complex than it needs to be, tracking individual batches in a ring and having null descriptors as padding t
raw/ioat: rework SW ring layout
The ring management in the idxd part of the driver is more complex than it needs to be, tracking individual batches in a ring and having null descriptors as padding to avoid having single-operation batches. This can be simplified by using a regular ring-based layout, with additional overflow at the end to ensure that the one does not need to wrap within a batch.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| f82c87eb | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: move idxd functions to separate file
Split the rte_ioat_rawdev_fns.h file into two separate headers, so that the data structures for the original ioat devices and the newer idxd ones can b
raw/ioat: move idxd functions to separate file
Split the rte_ioat_rawdev_fns.h file into two separate headers, so that the data structures for the original ioat devices and the newer idxd ones can be kept separate from each other. This makes code management and rework easier.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| b7aaf417 | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: add bus driver for device scanning automatically
Rather than using a vdev with args, DPDK can scan and initialize the devices automatically using a bus-type driver. This bus does not need
raw/ioat: add bus driver for device scanning automatically
Rather than using a vdev with args, DPDK can scan and initialize the devices automatically using a bus-type driver. This bus does not need to worry about registering device drivers, rather it can initialize the devices directly on probe.
The device instances (queues) to use are detected from /dev with the additional info about them got from /sys.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| d38b62cd | 04-May-2021 |
Kevin Laatz <[email protected]> |
raw/ioat: allow perform operations function to return error
Change the return type for the rte_ioat_perform_ops() function from void to int to allow the possibility of returning an error code in fut
raw/ioat: allow perform operations function to return error
Change the return type for the rte_ioat_perform_ops() function from void to int to allow the possibility of returning an error code in future, should it be necessary.
Signed-off-by: Kevin Laatz <[email protected]>
show more ...
|
| c9821321 | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: make workqueue name configurable in script
Add a "--name-prefix" parameter to the quick configuration script for DSA. This allows the queues configured on a DSA instance to be made availab
raw/ioat: make workqueue name configurable in script
Add a "--name-prefix" parameter to the quick configuration script for DSA. This allows the queues configured on a DSA instance to be made available to only one DPDK process in a setup with multiple DPDK process instances.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| cfb286ab | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: fix script for configuring small number of queues
The dpdk_idxd_cfg.py script included with the driver for convenience did not work properly where the number of queues to be configured was
raw/ioat: fix script for configuring small number of queues
The dpdk_idxd_cfg.py script included with the driver for convenience did not work properly where the number of queues to be configured was less than the number of groups or engines. This was because there would be configured groups/engines not assigned to queues. Fix this by limiting the engine and group counts to be no bigger than the number of queues.
Fixes: 01863b9d2354 ("raw/ioat: include example configuration script") Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
| a2bc5d7b | 04-May-2021 |
Bruce Richardson <[email protected]> |
raw/ioat: expand descriptor struct to full 64 bytes
Although it's unused by the driver, add the interrupt handle field in the descriptor to the descriptor structure for completeness, and explicitly
raw/ioat: expand descriptor struct to full 64 bytes
Although it's unused by the driver, add the interrupt handle field in the descriptor to the descriptor structure for completeness, and explicitly add the reserved padding field on the end of the structure too. This means that when a descriptor is defined on the stack, or initialized by the compiler, the unused/reserved space will be zeroed appropriately.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|