[PATCH 0/1] net/ena: adding a histogram framework to 2.11.0

2024-10-29 Thread shaibran
From: Shai Brandes This update is an enhancement to the ENA driver version 2.11.0 release. It is a "nice to have" feature for the 24.11 release, should it be included before the code freeze deadline. This addition leverages an internal framework used in our testing processes, which may offer sig

[PATCH 1/1] net/ena: add histogram support

2024-10-29 Thread shaibran
From: Shai Brandes The framework computes the differences between specified start and end points in the code, providing insights into performance by outputting a histogram of the time intervals. The histogram can be used to track metrics like packet processing latency in the network driver. This

[PATCH 2/3] net/ena: support malformed Rx descriptor error

2024-10-23 Thread shaibran
From: Shai Brandes Add validation check for packet descriptor consistency and improve reset logic and stats tracking. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- doc/guides/rel_notes/release_24_11.rst | 1 + drivers/net/ena/ena_ethdev.c | 29 +++-

[PATCH 3/3] net/ena: remove outdated devarg documentation

2024-10-23 Thread shaibran
From: Shai Brandes Removed obsolete devarg enforcing normal llq policy, as its logic is now handled by the new `llq_policy` devarg. Signed-off-by: Shai Brandes --- doc/guides/nics/ena.rst | 4 1 file changed, 4 deletions(-) diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst i

[PATCH 0/3] net/ena: ena release 2.11.0

2024-10-23 Thread shaibran
From: Shai Brandes Dear all, Please find attached the patches for our upcoming release. We welcome and appreciate any feedback you may have. Thank you in advance. Best regards, Shai Brandes Shai Brandes (3): net/ena: upgrade driver version to 2.11.0 net/ena: support malformed Rx descriptor e

[PATCH 1/3] net/ena: upgrade driver version to 2.11.0

2024-10-23 Thread shaibran
From: Shai Brandes Upgrade ENA driver version to 2.11.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 1dec54fb58..1a652b09ac 100644 --- a/driver

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

2024-10-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] maintainers: update ena maintainers list

2024-10-02 Thread shaibran
From: Shai Brandes Added a new ena team member. Signed-off-by: Shai Brandes --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 812463fe9f..01b1c2cb7f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -663,6 +663,7 @@ M: Shai Brandes M: Evgeny Sche

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 v2 0/1] net/ena/base: bug fix for 23.11 stable only

2024-04-08 Thread shaibran
From: Shai Brandes Hi, the fix is for a bug that was introduced in 23.11. The fix was already merged into 24.03 indirectly as part of c8a1898f82f8 ("net/ena: improve style and readability") and the entire function was later restructured in patch bcb1753156ac ("net/ena/base: modify customer met

[PATCH v2 1/1] net/ena/base: fix metrics excessive memory consumption

2024-04-08 Thread shaibran
From: Shai Brandes [ upstream commit c8a1898f82f8c04cbe1d3e2d0eec0705386c23f7 ] The driver accidentally allocates a huge memory buffer for the customer metrics because it uses an uninitialized variable for the buffer length. This can lead to excessive memory footprint for the driver which can ev

[PATCH 1/1] net/ena/base: fix metrics excessive memory consumption

2024-04-07 Thread shaibran
From: Shai Brandes [ upstream commit c8a1898f82f8c04cbe1d3e2d0eec0705386c23f7 ] The driver accidentally allocates a huge memory buffer for the customer metrics because it uses an uninitialized variable for the buffer length. This can lead to excessive memory footprint for the driver which can ev

[PATCH 0/1] net/ena/base: bug fix for 23.11 stable only

2024-04-07 Thread shaibran
From: Shai Brandes Hi, the fix is for a bug that was introduced in 23.11. The fix was already merged into 24.03 indirectly as part of c8a1898f82f8 ("net/ena: improve style and readability") and the entire function was later restructured in patch bcb1753156ac ("net/ena/base: modify customer met

[PATCH v2 1/1] net/ena/base: fix metrics excessive memory consumption

2024-03-28 Thread shaibran
From: Shai Brandes The driver accidentally allocates a huge memory buffer for the customer metrics because it uses an uninitialized variable for the buffer length. This can lead to excessive memory footprint for the driver which can even fail to initialize in case of insufficient memory. Signed-

[PATCH v2 0/1] net/ena/base: bug fix for 23.11 stable only

2024-03-28 Thread shaibran
From: Shai Brandes Hi, the fix is for a bug that was introduced in 23.11. The fix was already merged into 24.03 indirectly as part of c8a1898f82f8 ("net/ena: improve style and readability") and the entire function was later restructured in patch bcb1753156ac ("net/ena/base: modify customer metr

[PATCH 0/1] net/ena/base bug fix for 23.11 stable only

2024-03-28 Thread shaibran
From: Shai Brandes Hi, the fix is for a bug that was introduced in 23.11. The fix was already merged into 24.03 indirectly as part of c8a1898f82f8 ("net/ena: improve style and readability") and the entire function was later restructured in patch bcb1753156ac ("net/ena/base: modify customer metr

[PATCH 1/1] net/ena: fix metrics excessive memory consumption

2024-03-28 Thread shaibran
From: Shai Brandes The driver accidentally allocates a huge memory buffer for the customer metrics because it uses an uninitialized variable for the buffer length. This can lead to excessive memory footprint for the driver which can even fail to initialize in case of insufficient memory. Signed-

[PATCH] net/ena: fix mbuf double free in fast free mode

2024-03-20 Thread shaibran
From: Shai Brandes Fixed an issue of double free of mbufs which is exposed in mbuf fast free mode when handling multi-mbuf packets. The faulty patch mishandled free of non-head mbufs as it iterated over linked mbufs and collected them into an array, which was then passed to rte_pktmbuf_free_bulk

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

2024-03-12 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 1707d5f2c2..7b697c

[PATCH v4 30/31] net/ena: control path pure polling mode

2024-03-12 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 v4 29/31] net/ena: support max large llq depth from the device

2024-03-12 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 v4 28/31] net/ena: exhaust interrupt callbacks in device close

2024-03-12 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 v4 27/31] net/ena: update device-preferred size of rings

2024-03-12 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 v4 26/31] net/ena/base: modify logs to use unsigned format specifier

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

[PATCH v4 25/31] net/ena/base: modify customer metrics memory management

2024-03-12 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 v4 24/31] net/ena: cosmetic changes

2024-03-12 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/base/ena_com.c | 13 + drivers/net/ena/base/ena_plat_dpdk.h | 2 +- 2 files changed, 6 insertion

[PATCH v4 23/31] net/ena/base: add support for device reset request

2024-03-12 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/base/ena_defs/ena_admin_defs.h | 3 ++- drivers/net/ena/base/

[PATCH v4 22/31] net/ena/base: handle command abort

2024-03-12 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 v4 21/31] net/ena/base: remove operating system type enum

2024-03-12 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/base/ena_defs/ena_admin_defs.h | 13 + drivers/net/ena/base/ena_plat_dpdk.h

[PATCH v4 20/31] net/ena/base: rework Rx ring submission queue

2024-03-12 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 v4 14/31] net/ena/base: phc feature modifications

2024-03-12 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 v4 18/31] net/ena/base: check for existing keep alive notification

2024-03-12 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/base/ena_com.c | 39 ++ drivers/net/ena/base/ena_com.h | 10 +

[PATCH v4 16/31] net/ena/base: add unlikely to error checks

2024-03-12 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 v4 19/31] net/ena/base: modify memory barrier comment

2024-03-12 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 v4 17/31] net/ena/base: missing admin interrupt reset reason

2024-03-12 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/base/ena_com.c| 2 ++

[PATCH v4 15/31] net/ena/base: restructure interrupt handling

2024-03-12 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 v4 07/31] net/ena/base: limit exponential backoff exp

2024-03-12 Thread shaibran
From: Shai Brandes Limit the value of the exponent used for this backoff at (1<<16) to prevent it from reaching to an excessive value (1<<32) or potentially even overflowing. In addition, for uniformity and readability purposes, the min/max parameter in the calls of ENA_MIN32 and ENA_MAX32 macros

[PATCH v4 12/31] net/ena/base: add completion descriptor corruption check

2024-03-12 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/base/ena_eth_com.c | 13 +++-- drivers/net/ena/ba

[PATCH v4 10/31] net/ena/base: rename fields in completion descriptors

2024-03-12 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 v4 13/31] net/ena/base: malformed Tx descriptor error reason

2024-03-12 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/base/ena_defs/ena_regs_defs.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v4 11/31] net/ena/base: use correct read once on u8 field

2024-03-12 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 v4 09/31] net/ena/base: optimize Rx ring submission queue

2024-03-12 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 v4 08/31] net/ena/base: add a new csum offload bit

2024-03-12 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 --- .../net/ena/base/ena_defs/ena_admin_defs.h| 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net

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

2024-03-12 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 v4 06/31] net/ena: restructure the llq policy setting process

2024-03-12 Thread shaibran
From: Shai Brandes The driver will set the size of the LLQ header size according to the recommendation from the device. The user can bypass the recommendation via devargs: - The existing devarg 'large_llq_hdr' (default 0) allows user to enforce large llq header policy. - The existing devarg 'en

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

2024-03-12 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 v4 03/31] net/ena: update imissed stat with Rx overruns

2024-03-12 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 v4 02/31] net/ena: report new supported link speed capabilities

2024-03-12 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 v4 01/31] net/ena: rework the metrics multi-process functions

2024-03-12 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 v4 00/31] net/ena: v2.9.0 driver release

2024-03-12 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 v3 33/33] net/ena: upgrade driver version to 2.9.0

2024-03-06 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 a36efae38c..47f744

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

2024-03-06 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 v3 29/33] net/ena: update device-preferred size of rings

2024-03-06 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 v3 30/33] net/ena: exhaust interrupt callbacks in device close

2024-03-06 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 v3 32/33] net/ena: control path pure polling mode

2024-03-06 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 v3 28/33] net/ena/hal: cosmetic changes

2024-03-06 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 v3 26/33] net/ena: cosmetic changes

2024-03-06 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 v3 23/33] net/ena/hal: remove operating system type enum

2024-03-06 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 v3 27/33] net/ena/hal: modify customer metrics memory management

2024-03-06 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 v3 25/33] net/ena/hal: add support for device reset request

2024-03-06 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 v3 24/33] net/ena/hal: handle command abort

2024-03-06 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 v3 22/33] net/ena/hal: rework Rx ring submission queue

2024-03-06 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 v3 21/33] net/ena/hal: modify memory barrier comment

2024-03-06 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 v3 20/33] net/ena/hal: check for existing keep alive notification

2024-03-06 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 v3 19/33] net/ena/hal: missing admin interrupt reset reason

2024-03-06 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 v3 18/33] net/ena/hal: add unlikely to error checks

2024-03-06 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 v3 17/33] net/ena/hal: restructure interrupt handling

2024-03-06 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 v3 16/33] net/ena/hal: phc feature modifications

2024-03-06 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 v3 15/33] net/ena/hal: malformed Tx descriptor error reason

2024-03-06 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 v3 13/33] net/ena/hal: use correct read once on u8 field

2024-03-06 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 v3 14/33] net/ena/hal: add completion descriptor corruption check

2024-03-06 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 v3 12/33] net/ena/hal: rename fields in completion descriptors

2024-03-06 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 v3 11/33] net/ena/hal: optimize Rx ring submission queue

2024-03-06 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 v3 08/33] net/ena/hal: exponential backoff exp limit

2024-03-06 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 v3 10/33] net/ena/hal: added a bus parameter to ena memcpy macro

2024-03-06 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 v3 09/33] net/ena/hal: add a new csum offload bit

2024-03-06 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 v3 06/33] net/ena: rename base folder to hal

2024-03-06 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 v3 07/33] net/ena: restructure the llq policy setting process

2024-03-06 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 v3 03/33] net/ena: update imissed stat with Rx overruns

2024-03-06 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 v3 05/33] net/ena: fix fast mbuf free

2024-03-06 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 v3 04/33] net/ena: sub-optimal configuration notifications support

2024-03-06 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 v3 00/33] net/ena: v2.9.0 driver release

2024-03-06 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 v3 02/33] net/ena: report new supported link speed capabilities

2024-03-06 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

  1   2   >