[PATCH 0/5] net/ena: v2.8.0 driver release

2023-10-24 Thread shaibran
From: Shai Brandes Hi, This patchset contains alignment of the driver to the latest HAL version which adds support for retrieving new metrics from the device and opens a path to use additional device features that are not yet supported by the driver. The new driver features are mostly about add

[PATCH 1/5] net/ena: hal upgrade

2023-10-24 Thread shaibran
From: Shai Brandes ENA maintains a HAL that is shared by all supported host drivers. Main features introduced to the HAL: [1] Reworked the mechanism that queries the performance metrics from the device. [2] Added support for a new metric that allows monitoring the available tracked connec

[PATCH 2/5] net/ena: add support for connection tracking metric

2023-10-24 Thread shaibran
From: Shai Brandes The driver publishes network performance metrics that the application can use to troubleshoot performance issues, monitor the workload, and benchmark applications to determine whether they maximize the performance. This patch adds support for the connection tracking allowance

[PATCH 3/5] net/ena: report Rx overrun errors in xstats

2023-10-24 Thread shaibran
From: Shai Brandes RX overrun error occur when a packet arrives but there are not enough free buffers in the RX ring to receive it. The driver publishes the extended statistics with the RX buffer overrun errors as reported by the device. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH 4/5] net/ena: add support for ena-express metrics

2023-10-24 Thread shaibran
From: Shai Brandes ENA-express is powered by AWS scalable reliable datagram (SRD) technology. SRD is a high performance network transport protocol that uses dynamic routing to increase throughput and minimize tail latency. The driver expose the following ENA-express metrics via xstats: * ena_srd

[PATCH 5/5] net/ena: update ena version to 2.8.0

2023-10-24 Thread shaibran
From: Shai Brandes This release introduces: * Upgraded ENA HAL. * Support for connection tracking allowance utilization metric. * Support for reporting rx overrun errors in xstats. * Support for ENA-express metrics. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/e

[PATCH v2 0/5] net/ena: v2.8.0 driver release

2023-10-25 Thread shaibran
From: Shai Brandes Hi, This patchset contains alignment of the driver to the latest HAL version which adds support for retrieving new metrics from the device and opens a path to use additional device features that are not yet supported by the driver. The new driver features are mostly about add

[PATCH v2 1/5] net/ena: hal upgrade

2023-10-25 Thread shaibran
From: Shai Brandes ENA maintains a HAL that is shared by all supported host drivers. Main features introduced to the HAL: [1] Reworked the mechanism that queries the performance metrics from the device. [2] Added support for a new metric that allows monitoring the available tracked connec

[PATCH v2 4/5] net/ena: add support for ena-express metrics

2023-10-25 Thread shaibran
From: Shai Brandes ENA-express is powered by AWS scalable reliable datagram (SRD) technology. SRD is a high performance network transport protocol that uses dynamic routing to increase throughput and minimize tail latency. The driver expose the following ENA-express metrics via xstats: * ena_srd

[PATCH v2 2/5] net/ena: add support for connection tracking metric

2023-10-25 Thread shaibran
From: Shai Brandes The driver publishes network performance metrics that the application can use to troubleshoot performance issues, monitor the workload, and benchmark applications to determine whether they maximize the performance. This patch adds support for the connection tracking allowance

[PATCH v2 3/5] net/ena: report Rx overrun errors in xstats

2023-10-25 Thread shaibran
From: Shai Brandes RX overrun error occur when a packet arrives but there are not enough free buffers in the RX ring to receive it. The driver publishes the extended statistics with the RX buffer overrun errors as reported by the device. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH v2 5/5] net/ena: update ena version to 2.8.0

2023-10-25 Thread shaibran
From: Shai Brandes This release introduces: * Upgraded ENA HAL. * Support for connection tracking allowance utilization metric. * Support for reporting rx overrun errors in xstats. * Support for ENA-express metrics. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/e

[PATCH v3 0/5] net/ena: v2.8.0 driver release

2023-10-26 Thread shaibran
From: Shai Brandes Hi, This patchset contains alignment of the driver to the latest HAL version which adds support for retrieving new metrics from the device and opens a path to use additional device features that are not yet supported by the driver. The new driver features are mostly about add

[PATCH v3 1/5] net/ena: hal upgrade

2023-10-26 Thread shaibran
From: Shai Brandes ENA maintains a HAL that is shared by all supported host drivers. Main features introduced to the HAL: [1] Reworked the mechanism that queries the performance metrics from the device. [2] Added support for a new metric that allows monitoring the available tracked connec

[PATCH v3 2/5] net/ena: add support for connection tracking metric

2023-10-26 Thread shaibran
From: Shai Brandes The driver publishes network performance metrics that the application can use to troubleshoot performance issues, monitor the workload, and benchmark applications to determine whether they maximize the performance. This patch adds support for the connection tracking allowance

[PATCH v3 3/5] net/ena: report Rx overrun errors in xstats

2023-10-26 Thread shaibran
From: Shai Brandes RX overrun error occur when a packet arrives but there are not enough free buffers in the RX ring to receive it. The driver publishes the extended statistics with the RX buffer overrun errors as reported by the device. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH v3 4/5] net/ena: add support for ena-express metrics

2023-10-26 Thread shaibran
From: Shai Brandes ENA-express is powered by AWS scalable reliable datagram (SRD) technology. SRD is a high performance network transport protocol that uses dynamic routing to increase throughput and minimize tail latency. The driver expose the following ENA-express metrics via xstats: * ena_srd

[PATCH v3 5/5] net/ena: update ena version to 2.8.0

2023-10-26 Thread shaibran
From: Shai Brandes This release introduces: * Upgraded ENA HAL. * Support for connection tracking allowance utilization metric. * Support for reporting rx overrun errors in xstats. * Support for ENA-express metrics. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/e

[PATCH 0/1] net/ena: devargs api change

2024-06-06 Thread shaibran
From: Shai Brandes Hi everyone, this is an API change to the ena PMD devargs that removes the 3 devargs that control the user setting for the LLQ policy and replaces it with a new shared devarg that implements the same logic. Shai Brandes (1): net/ena: restructure the llq policy user setting

[PATCH 1/1] net/ena: restructure the llq policy user setting

2024-06-06 Thread shaibran
From: Shai Brandes Replaced `enable_llq`, `normal_llq_hdr` and `large_llq_hdr` devargs with a new shared devarg named `llq_policy` that implements the same logic and accepts the following values: 0 - Disable LLQ. Use with extreme caution as it leads to a huge performance degradation on AW

[PATCH 01/15] net/ena/base: add descriptor dump capability

2024-07-02 Thread shaibran
From: Shai Brandes This patch adds the capability to print rx/tx descriptors. This patch introduces a new function ena_com_tx_cdesc_idx_to_ptr which is the equivalent of ena_com_rx_cdesc_idx_to_ptr but for tx cdesc. Finally, this patch moves the io_cq header incrementation in ena_com_cdesc_rx_pk

[PATCH 02/15] net/ena/base: remove unused param

2024-07-02 Thread shaibran
From: Shai Brandes Remove an unused dev_node parameter when allocating DMA memory. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_com.c | 9 ++--- drivers/net/ena/base/ena_plat_dpdk.h | 11 +-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH 00/15] net/ena: driver release 2.10.0

2024-07-02 Thread shaibran
From: Shai Brandes Hi all, This release contains: 1. HAL upgrade to latest divided into separate patches. 2. three bug fixes. 3. restructuring of the Rx checksum code for readability 4. restructuring of the device uninit flow which is also needed for adding hot un/plug support later. 5. modifi

[PATCH 04/15] net/ena/base: update memory barrier comment

2024-07-02 Thread shaibran
From: Shai Brandes Update the comment above the phase bit descriptor read in AENQ processing. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_com.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/ba

[PATCH 03/15] net/ena/base: remove redundant assert checks

2024-07-02 Thread shaibran
From: Shai Brandes Remove ENA_WARN checks from ena_com_wait_and_process_admin_cq_polling since once the execution flow reaches the check, it must be ENA_CMD_COMPLETED because it can't be either of the other options: 1. ENA_CMD_ABORTED - in such case it will perform "goto err" in the "if" block

[PATCH 05/15] net/ena/base: add method to check used entries

2024-07-02 Thread shaibran
From: Shai Brandes Provide a method to check the number of used entries in the send queue Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_eth_com.h | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ena/base/ena_eth_com.h b/drivers/net/ena/b

[PATCH 07/15] net/ena/base: update copyrights comments

2024-07-02 Thread shaibran
From: Shai Brandes copyright dates are not mandatory to be maintained, therefore the range of years was removed. In addition, the copyrights lines were separated into two comments. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_com.c | 4 ++-- drivers/net/ena/base/en

[PATCH 08/15] net/ena/base: add macro for bitfield access

2024-07-02 Thread shaibran
From: Shai Brandes Add ENA_FIELD_GET and ENA_FIELD_PREP macro to make access to fields more readable. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_com.c | 111 drivers/net/ena/base/ena_com.h | 10 +- drivers/net/ena/base/ena_eth_com.c | 146 +

[PATCH 09/15] net/ena: logger change to improve performance

2024-07-02 Thread shaibran
From: Shai Brandes Current implementation of ena_trc_dbg on every TX packet has a major performance impact on DPDK TX flow. Profiling revealed that these calls, which trigger rte_log usage, consume a significant amount of CPU resources. Change details: 1. Several warning prints that incorrectly

[PATCH 11/15] net/ena: fix bad checksum handling

2024-07-02 Thread shaibran
From: Shai Brandes Removed a workaround for a false L4 bad Rx csum indication from the device. The workaround was to set it as unknown so the application would check it instead. The issue was fixed in the device, thus the driver bad csum handling should be fixed in the PMD. Fixes: b2d2f1cf89a6 (

[PATCH 10/15] net/ena: rework device uninit

2024-07-02 Thread shaibran
From: Shai Brandes Rework device uninitialization flow to ensure complete resource cleanup, and lay the groundwork for hot-unplug support. With this change, `ena_destroy_device()` is removed, its functionality now incorporated into `ena_close()`. Signed-off-by: Shai Brandes --- doc/guides/rel_

[PATCH 12/15] net/ena: fix invalid return value check

2024-07-02 Thread shaibran
From: Shai Brandes Removed the sign inversion for when checking if ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED. ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign inversion is wrong. Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version") Cc: sta...@dpdk.org S

[PATCH 06/15] net/ena/base: add an additional reset reason

2024-07-02 Thread shaibran
From: Shai Brandes This commit adds the support for a new reset reason for `MISS_FIRST_INTERRUPT` in order to distinguish between resets where no interrupts have been received and sporadic missed interrupts. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_defs/ena_regs_defs.h | 1 + 1

[PATCH 13/15] net/ena: fix wrong handling of checksum

2024-07-02 Thread shaibran
From: Shai Brandes This change fixes an issue where a non tcp/udp packet can be indicated to have an invalid csum. If the device erroneously tries to verify the csum on a non tcp/udp packet it will result in false indication that there is a csum error. This change make the driver ignore the indic

[PATCH 14/15] net/ena: rework Rx checksum inspection

2024-07-02 Thread shaibran
From: Shai Brandes This restructure is a simplification of the Rx checksum inspection logic in ena_rx_mbuf_prepare. Its purpose is to improve readability and maintainability by consolidating conditions. Signed-off-by: Shai Brandes --- doc/guides/rel_notes/release_24_07.rst | 2 + drivers/net/

[PATCH 15/15] net/ena: upgrade driver version to 2.10.0

2024-07-02 Thread shaibran
From: Shai Brandes upgrade driver version to 2.10.0. Signed-off-by: Shai Brandes --- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index feb229c5ec..e0c239e88f 100644 --- a/drivers/ne

[PATCH] maintainers: update ena maintainers list

2023-10-30 Thread shaibran
From: Shai Brandes Removed obsolete maintainers and added the ena team members. Signed-off-by: Shai Brandes --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f463188f1d..a181ab63b4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH] net/ena: fix coverity issues

2023-11-09 Thread shaibran
From: Shai Brandes Changed the rte_memcpy call to use the precomputed buf_size. Rearranged the ena adapter structure and removed redundant '&' operators as a precaution. Coverity issue: 405363 Coverity issue: 405357 Coverity issue: 405359 Fixes: 92401abfbcb9 ("net/ena: support connection trackin

[PATCH 04/33] net/ena: sub-optimal configuration notifications support

2024-03-04 Thread shaibran
From: Shai Brandes ENA device will send asynchronous notifications to the driver in order to notify users about sub-optimal configurations and refer them to public AWS documentation for further action. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- doc/guides/rel_notes/release_24

[PATCH 01/33] net/ena: rework the metrics multi-process functions

2024-03-04 Thread shaibran
From: Shai Brandes 1. Changed the rte_memcpy call to use the precomputed buf_size. 2. Removed redundant address operators (ampersand symbol) when providing memcpy source address parameter. 3. Code style related change. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net

[PATCH 02/33] net/ena: report new supported link speed capabilities

2024-03-04 Thread shaibran
From: Shai Brandes Updated the rte_eth_dev_info device supported speed bitmap to include 200Gbps and 400Gbps capabilities. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ne

[PATCH 00/33] net/ena: v2.9.0 driver release

2024-03-04 Thread shaibran
From: Shai Brandes Hi all, the ena v2.9.0 release introduces: 1. HAL upgrade: - renamed the 'base' folder to be 'hal' - separated the HAL patches instead of a bulk update. 2. Restructured ena stats and metrics. 3. Restructured the LLQ configuration: - configurable via devarg. - suppor

[PATCH 08/33] net/ena/hal: exponential backoff exp limit

2024-03-04 Thread shaibran
From: Shai Brandes limits the exponent in the exponential backoff mechanism in order to avoid the value overflowing. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/en

[PATCH 03/33] net/ena: update imissed stat with Rx overruns

2024-03-04 Thread shaibran
From: Shai Brandes Depending on its acceleration support, the device updates a different statistic when an ingress packet is dropped because no buffers are available to hold it. - In AWS instance types from later generations 'rx_overruns' is updated. - Otherwise, in legacy instance types, 'rx_dro

[PATCH 09/33] net/ena/hal: add a new csum offload bit

2024-03-04 Thread shaibran
From: Shai Brandes Add a new driver supported feature bit for TX IPv6 checksum offload. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH 05/33] net/ena: fix fast mbuf free

2024-03-04 Thread shaibran
From: Shai Brandes In case the application enables fast mbuf release optimization, the driver releases 256 TX mbufs in bulk upon reaching the TX free threshold. The existing implementation utilizes rte_mempool_put_bulk for bulk freeing TXs, which exclusively supports direct mbufs. In case the app

[PATCH 06/33] net/ena: rename base folder to hal

2024-03-04 Thread shaibran
From: Shai Brandes Changed the base HAL folder to hal. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/{base => hal}/ena_com.c | 0 drivers/net/ena/{base => hal}/ena_com.h | 0 drivers/net/ena/{base => hal}/ena_defs/ena_admin_defs.

[PATCH 11/33] net/ena/hal: optimize Rx ring submission queue

2024-03-04 Thread shaibran
From: Shai Brandes RX ring submission queue descriptors are always located in host memory This optimization replaces the generic descriptor retrieval method with a tailored method for host memory type descriptors to avoid unnecessary if statement. Signed-off-by: Shai Brandes Reviewed-by: Amit B

[PATCH 07/33] net/ena: restructure the llq policy setting process

2024-03-04 Thread shaibran
From: Shai Brandes The driver will set the size of the LLQ header size according to the recommendation from the device. Replaced `enable_llq` and `large_llq_hdr` devargs with a new devarg `llq_policy` that accepts the following values: 0 - Disable LLQ. Use with extreme caution as it leads to

[PATCH 10/33] net/ena/hal: added a bus parameter to ena memcpy macro

2024-03-04 Thread shaibran
From: Shai Brandes ENA_MEMCPY_TO_DEVICE_64 macro needs pci bus id in order to write to the device memory when using llq. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 3 ++- drivers/net/ena/hal/ena_plat_dpdk.h | 3 ++- 2 files changed, 4 ins

[PATCH 12/33] net/ena/hal: rename fields in completion descriptors

2024-03-04 Thread shaibran
From: Shai Brandes Several reserved bits in ena_eth_io_tx_cdesc and ena_eth_io_rx_cdesc_base have been renamed explicitly to MBZ (Must Be Zero). These bits are set by the device to zero before being sent to the driver. The fields are used as an integrity check in order to ensure that the received

[PATCH 14/33] net/ena/hal: add completion descriptor corruption check

2024-03-04 Thread shaibran
From: Shai Brandes Adding a check of the MBZ (Must Be Zero) fields in the incoming tx and rx completion descriptors in order to identify corrupted descriptors. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 13 +++-- drivers/net/ena/hal

[PATCH 15/33] net/ena/hal: malformed Tx descriptor error reason

2024-03-04 Thread shaibran
From: Shai Brandes Adding ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED to identify cases where the returned TX completion descriptors are corrupted. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_regs_defs.h | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH 17/33] net/ena/hal: restructure interrupt handling

2024-03-04 Thread shaibran
From: Shai Brandes When invoking an admin command, in interrupt mode, if the interrupt is received after timeout and also after the calling function finished running, the response will be written into a memory that is no longer valid. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein ---

[PATCH 13/33] net/ena/hal: use correct read once on u8 field

2024-03-04 Thread shaibran
From: Shai Brandes The flags field in ena_eth_io_tx_cdesc is 8-bits long. The current macro used is READ_ONCE16. Switching to READ_ONCE8 to avoid reading extra data. Given that there's an implicit cast to u8 in the assignment, the correct value is being read, but this change makes it even more ac

[PATCH 18/33] net/ena/hal: add unlikely to error checks

2024-03-04 Thread shaibran
From: Shai Brandes The unlikely mechanism is used to reduce pipe flush, caused by a wrong branch prediction. Moreover, it increases readability by wrapping unexpected errors. This commit adds unlikely to error checks that are unlikely to happen. Signed-off-by: Shai Brandes Reviewed-by: Amit Ber

[PATCH 19/33] net/ena/hal: missing admin interrupt reset reason

2024-03-04 Thread shaibran
From: Shai Brandes There can be cases when we trigger reset if an admin interrupt is missing. In order to identify this use-case specifically, this commit adds a new reset reason. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c| 2 ++

[PATCH 20/33] net/ena/hal: check for existing keep alive notification

2024-03-04 Thread shaibran
From: Shai Brandes This commit adds an API to query the aenq on whether there is a pending keep alive notification. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 39 +++ drivers/net/ena/hal/ena_com.h | 10 +

[PATCH 21/33] net/ena/hal: modify memory barrier comment

2024-03-04 Thread shaibran
From: Shai Brandes The dma_rmb() memory barrier guarantees that the device set the phase bit before continuing to read the rest of the descriptor. Because the phase bit and the rest of the descriptor are in the same cache line this ensures coherency of the data from the descriptor. Signed-off-by

[PATCH 16/33] net/ena/hal: phc feature modifications

2024-03-04 Thread shaibran
From: Shai Brandes 1. PHC algorithm is updated to support reading new PHC values. 2. Update default PHC expiration timeout. 3. Fix a theoretical PHC destroy race. 4. Adjust PHC for multiple devices. 5. PHC activation version check point. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH 22/33] net/ena/hal: rework Rx ring submission queue

2024-03-04 Thread shaibran
From: Shai Brandes RX ring submission queue descriptors are always located in host memory This optimization replaces the generic update tail method with a tailored method for host memory type descriptors to avoid unnecessary if statement. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH 24/33] net/ena/hal: handle command abort

2024-03-04 Thread shaibran
From: Shai Brandes Currently admin_queue->stats.aborted_cmd counter is incremented if an admin command status is ENA_CMD_ABORTED and only if the admin queue is in polling mode. This commit fixes handling the case of incrementing admin_queue->stats.aborted_cmd if the admin queue is in interrupt mo

[PATCH 23/33] net/ena/hal: remove operating system type enum

2024-03-04 Thread shaibran
From: Shai Brandes remove all othe operating system enumeration as they are unrelated to DPDK. Use a constant value instead. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 13 + drivers/net/ena/hal/ena_plat_dpdk.h

[PATCH 26/33] net/ena: cosmetic changes

2024-03-04 Thread shaibran
From: Shai Brandes This patch makes several changes to improve the style and readability of the code. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/ena/h

[PATCH 25/33] net/ena/hal: add support for device reset request

2024-03-04 Thread shaibran
From: Shai Brandes Adds support for reset request message from the device to the driver, over AENQ, which in turn should cause the driver to trigger reset. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 3 ++- drivers/net/ena/hal/en

[PATCH 27/33] net/ena/hal: modify customer metrics memory management

2024-03-04 Thread shaibran
From: Shai Brandes 1. Set buffer length to zero in case memory allocation failed and after memory is released. 2. The driver checks buffer_virt_addr for customer allocation success. In case the allocation fails, buffer_virt_addr may not necessarily be NULL. Signed-off-by: Shai Brandes

[PATCH 28/33] net/ena/hal: cosmetic changes

2024-03-04 Thread shaibran
From: Shai Brandes 1. modify log prints to use correct format specifier for unsigned variables. 2. removed line breaks for lines that do not exceed maximal line length. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 22 +++--

[PATCH 31/33] net/ena: support max large llq depth from the device

2024-03-04 Thread shaibran
From: Shai Brandes Selected AWS instances from later generations enable large LLQ by default, allowing the transmission of packets with headers exceeding 96 bytes. Due to the overall ENA memory BAR size limitation, large LLQ has the side effect of halving the maximum number of LLQ entries (from

[PATCH 30/33] net/ena: exhaust interrupt callbacks in device close

2024-03-04 Thread shaibran
From: Shai Brandes Change rte_intr_callback_unregister to its synchronous variant to ensure all active interrupt callbacks are completed before proceeding with the flow. Relocate the interrupt deregistration to precede the release of stats memory, thereby preventing the interrupt handler from acc

[PATCH 32/33] net/ena: control path pure polling mode

2024-03-04 Thread shaibran
From: Shai Brandes This commit implements a new operation mode that enables purely polling-based functionality, eliminating the need for interrupts in the control path. This mode is not activated by default and can be toggled using the "control_poll_interval" devarg. When operating in this mode,

[PATCH 33/33] net/ena: upgrade driver version to 2.9.0

2024-03-04 Thread shaibran
From: Shai Brandes upgrade driver version to 2.9.0. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index af1f6d6d05..f47f58

[PATCH 29/33] net/ena: update device-preferred size of rings

2024-03-04 Thread shaibran
From: Shai Brandes Update the device-preferred size of the Tx ring to fall within the valid range when a large LLQ is enabled. For consistency, align the device-preferred size of the Rx ring accordingly. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c

[PATCH v2 00/33] net/ena: v2.9.0 driver release

2024-03-04 Thread shaibran
From: Shai Brandes Hi all, the ena v2.9.0 release introduces: 1. HAL upgrade: - renamed the 'base' folder to be 'hal' - separated the HAL patches instead of a bulk update. 2. Restructured ena stats and metrics. 3. Restructured the LLQ configuration: - configurable via devarg. - suppor

[PATCH v2 01/33] net/ena: rework the metrics multi-process functions

2024-03-04 Thread shaibran
From: Shai Brandes 1. Changed the rte_memcpy call to use the precomputed buf_size. 2. Removed redundant address operators (ampersand symbol) when providing memcpy source address parameter. 3. Code style related change. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net

[PATCH v2 03/33] net/ena: update imissed stat with Rx overruns

2024-03-04 Thread shaibran
From: Shai Brandes Depending on its acceleration support, the device updates a different statistic when an ingress packet is dropped because no buffers are available to hold it. - In AWS instance types from later generations 'rx_overruns' is updated. - Otherwise, in legacy instance types, 'rx_dro

[PATCH v2 02/33] net/ena: report new supported link speed capabilities

2024-03-04 Thread shaibran
From: Shai Brandes Updated the rte_eth_dev_info device supported speed bitmap to include 200Gbps and 400Gbps capabilities. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/ena_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ne

[PATCH v2 05/33] net/ena: fix fast mbuf free

2024-03-04 Thread shaibran
From: Shai Brandes In case the application enables fast mbuf release optimization, the driver releases 256 TX mbufs in bulk upon reaching the TX free threshold. The existing implementation utilizes rte_mempool_put_bulk for bulk freeing TXs, which exclusively supports direct mbufs. In case the app

[PATCH v2 06/33] net/ena: rename base folder to hal

2024-03-04 Thread shaibran
From: Shai Brandes Changed the base HAL folder to hal. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/{base => hal}/ena_com.c | 0 drivers/net/ena/{base => hal}/ena_com.h | 0 drivers/net/ena/{base => hal}/ena_defs/ena_admin_defs.

[PATCH v2 07/33] net/ena: restructure the llq policy setting process

2024-03-04 Thread shaibran
From: Shai Brandes The driver will set the size of the LLQ header size according to the recommendation from the device. Replaced `enable_llq` and `large_llq_hdr` devargs with a new devarg `llq_policy` that accepts the following values: 0 - Disable LLQ. Use with extreme caution as it leads to

[PATCH v2 08/33] net/ena/hal: exponential backoff exp limit

2024-03-04 Thread shaibran
From: Shai Brandes limits the exponent in the exponential backoff mechanism in order to avoid the value overflowing. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/en

[PATCH v2 09/33] net/ena/hal: add a new csum offload bit

2024-03-04 Thread shaibran
From: Shai Brandes Add a new driver supported feature bit for TX IPv6 checksum offload. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v2 10/33] net/ena/hal: added a bus parameter to ena memcpy macro

2024-03-04 Thread shaibran
From: Shai Brandes ENA_MEMCPY_TO_DEVICE_64 macro needs pci bus id in order to write to the device memory when using llq. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 3 ++- drivers/net/ena/hal/ena_plat_dpdk.h | 3 ++- 2 files changed, 4 ins

[PATCH v2 04/33] net/ena: sub-optimal configuration notifications support

2024-03-04 Thread shaibran
From: Shai Brandes ENA device will send asynchronous notifications to the driver in order to notify users about sub-optimal configurations and refer them to public AWS documentation for further action. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- doc/guides/rel_notes/release_24

[PATCH v2 11/33] net/ena/hal: optimize Rx ring submission queue

2024-03-04 Thread shaibran
From: Shai Brandes RX ring submission queue descriptors are always located in host memory This optimization replaces the generic descriptor retrieval method with a tailored method for host memory type descriptors to avoid unnecessary if statement. Signed-off-by: Shai Brandes Reviewed-by: Amit B

[PATCH v2 14/33] net/ena/hal: add completion descriptor corruption check

2024-03-04 Thread shaibran
From: Shai Brandes Adding a check of the MBZ (Must Be Zero) fields in the incoming tx and rx completion descriptors in order to identify corrupted descriptors. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 13 +++-- drivers/net/ena/hal

[PATCH v2 12/33] net/ena/hal: rename fields in completion descriptors

2024-03-04 Thread shaibran
From: Shai Brandes Several reserved bits in ena_eth_io_tx_cdesc and ena_eth_io_rx_cdesc_base have been renamed explicitly to MBZ (Must Be Zero). These bits are set by the device to zero before being sent to the driver. The fields are used as an integrity check in order to ensure that the received

[PATCH v2 13/33] net/ena/hal: use correct read once on u8 field

2024-03-04 Thread shaibran
From: Shai Brandes The flags field in ena_eth_io_tx_cdesc is 8-bits long. The current macro used is READ_ONCE16. Switching to READ_ONCE8 to avoid reading extra data. Given that there's an implicit cast to u8 in the assignment, the correct value is being read, but this change makes it even more ac

[PATCH v2 15/33] net/ena/hal: malformed Tx descriptor error reason

2024-03-04 Thread shaibran
From: Shai Brandes Adding ENA_REGS_RESET_TX_DESCRIPTOR_MALFORMED to identify cases where the returned TX completion descriptors are corrupted. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_regs_defs.h | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v2 16/33] net/ena/hal: phc feature modifications

2024-03-04 Thread shaibran
From: Shai Brandes 1. PHC algorithm is updated to support reading new PHC values. 2. Update default PHC expiration timeout. 3. Fix a theoretical PHC destroy race. 4. Adjust PHC for multiple devices. 5. PHC activation version check point. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH v2 17/33] net/ena/hal: restructure interrupt handling

2024-03-04 Thread shaibran
From: Shai Brandes When invoking an admin command, in interrupt mode, if the interrupt is received after timeout and also after the calling function finished running, the response will be written into a memory that is no longer valid. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein ---

[PATCH v2 18/33] net/ena/hal: add unlikely to error checks

2024-03-04 Thread shaibran
From: Shai Brandes The unlikely mechanism is used to reduce pipe flush, caused by a wrong branch prediction. Moreover, it increases readability by wrapping unexpected errors. This commit adds unlikely to error checks that are unlikely to happen. Signed-off-by: Shai Brandes Reviewed-by: Amit Ber

[PATCH v2 19/33] net/ena/hal: missing admin interrupt reset reason

2024-03-04 Thread shaibran
From: Shai Brandes There can be cases when we trigger reset if an admin interrupt is missing. In order to identify this use-case specifically, this commit adds a new reset reason. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c| 2 ++

[PATCH v2 20/33] net/ena/hal: check for existing keep alive notification

2024-03-04 Thread shaibran
From: Shai Brandes This commit adds an API to query the aenq on whether there is a pending keep alive notification. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 39 +++ drivers/net/ena/hal/ena_com.h | 10 +

[PATCH v2 21/33] net/ena/hal: modify memory barrier comment

2024-03-04 Thread shaibran
From: Shai Brandes The dma_rmb() memory barrier guarantees that the device set the phase bit before continuing to read the rest of the descriptor. Because the phase bit and the rest of the descriptor are in the same cache line this ensures coherency of the data from the descriptor. Signed-off-by

[PATCH v2 23/33] net/ena/hal: remove operating system type enum

2024-03-04 Thread shaibran
From: Shai Brandes remove all other operating system enumeration as they are unrelated to DPDK. Use a constant value instead. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 13 + drivers/net/ena/hal/ena_plat_dpdk.h

[PATCH v2 27/33] net/ena/hal: modify customer metrics memory management

2024-03-04 Thread shaibran
From: Shai Brandes 1. Set buffer length to zero in case memory allocation failed and after memory is released. 2. The driver checks buffer_virt_addr for customer allocation success. In case the allocation fails, buffer_virt_addr may not necessarily be NULL. Signed-off-by: Shai Brandes

[PATCH v2 26/33] net/ena: cosmetic changes

2024-03-04 Thread shaibran
From: Shai Brandes This patch makes several changes to improve the style and readability of the code. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_com.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ena/hal

[PATCH v2 22/33] net/ena/hal: rework Rx ring submission queue

2024-03-04 Thread shaibran
From: Shai Brandes RX ring submission queue descriptors are always located in host memory This optimization replaces the generic update tail method with a tailored method for host memory type descriptors to avoid unnecessary if statement. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein

[PATCH v2 25/33] net/ena/hal: add support for device reset request

2024-03-04 Thread shaibran
From: Shai Brandes Adds support for reset request message from the device to the driver, over AENQ, which in turn should cause the driver to trigger reset. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_defs/ena_admin_defs.h | 3 ++- drivers/net/ena/hal/en

[PATCH v2 28/33] net/ena/hal: cosmetic changes

2024-03-04 Thread shaibran
From: Shai Brandes 1. modify log prints to use correct format specifier for unsigned variables. 2. removed line breaks for lines that do not exceed maximal line length. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 22 +++--

  1   2   >