net/ena: release 2.13.0
cover net/ena: release 2.13.0
This patchset includes an upgrade of the ENA HAL, introduces a new feature, and addresses three bug fixes.
Thank you in advance to the net maintainers and community members for your time and effort reviewing the code.
Best regards,
Shai Brandes
AWS Elastic Network Adapter team
---
v2:
Removed patch "net/ena: fix virtual address calc for unaligned BARs" which contained a problematic casting when compiling with 32-bit system
v3:
no change, there was some technical issue when sending the emails where part of the patches apeared on different series.
v4:
Each patch in the series should compile independently. Patch 4/7 causes a compile error that was missed,
as the full series passed our directed tests when applied together
v5:
Reworked the patchset so it applies cleanly on origin/main due to release notes mismatch.
Shai Brandes (7):
net/ena/base: avoid recalculating desc per entry net/ena/base: coding style changes net/ena: separate doorbell logic for Rx and Tx net/ena: support fragment bypass mode net/ena: fix unhandled interrupt config failure net/ena: fix aenq timeout with low poll interval net/ena: upgrade driver version to 2.13.0
doc/guides/nics/ena.rst | 13 ++- doc/guides/rel_notes/release_25_07.rst | 9 ++ drivers/net/ena/base/ena_com.c | 40 +++++++- drivers/net/ena/base/ena_com.h | 7 ++ .../net/ena/base/ena_defs/ena_admin_defs.h | 14 +++ drivers/net/ena/base/ena_eth_com.c | 6 +- drivers/net/ena/base/ena_eth_com.h | 15 ++- drivers/net/ena/ena_ethdev.c | 98 +++++++++++++++---- drivers/net/ena/ena_ethdev.h | 4 +- 9 files changed, 175 insertions(+), 31 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/7 net/ena/base: avoid recalculating desc per entry
desc_per_entry is precomputed in ena_com_config_llq_info() using desc_stride_ctrl and desc_list_entry_size, which remain unchanged after device negotiation. Reuse the existing value instead of recalculating it in the fast path.
--- drivers/net/ena/base/ena_eth_com.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/ena/base/ena_eth_com.c +1 -5
@@ -248,11 +248,7 @@ static int ena_com_sq_update_llq_tail(struct ena_com_io_sq *io_sq) 0x0, llq_info->desc_list_entry_size); pkt_ctrl->idx =0 ; -if (unlikely (llq_info->desc_stride_ctrl ==ENA_ADMIN_SINGLE_DESC_PER_ENTRY )) - pkt_ctrl->descs_left_in_line =1 ; -else - pkt_ctrl->descs_left_in_line = - llq_info->desc_list_entry_size / io_sq->desc_entry_size; + pkt_ctrl->descs_left_in_line = llq_info->descs_per_entry; }return ENA_COM_OK ;
Signature · 1 line
2.17.1
PATCH 2/7 net/ena/base: coding style changes
In reply to Shai BrandesReordered variable declarations to follow the reverse Christmas tree style.
--- drivers/net/ena/base/ena_com.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ena/base/ena_com.c +3 -3
@@ -308,8 +308,8 @@ static struct ena_comp_ctx *ena_com_submit_admin_cmd(struct ena_com_admin_queue struct ena_admin_acq_entry *comp, size_t comp_size_in_bytes) { -unsigned long flags =0 ;struct ena_comp_ctx *comp_ctx; +unsigned long flags =0 ;ENA_SPINLOCK_LOCK (admin_queue->q_lock, flags);if (unlikely (!admin_queue->running_state)) {
@@ -616,10 +616,10 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c*/ static int ena_com_set_llq (struct ena_com_dev *ena_dev) { +struct ena_com_llq_info *llq_info = &ena_dev->llq_info;struct ena_com_admin_queue *admin_queue; -struct ena_admin_set_feat_cmd cmd;struct ena_admin_set_feat_resp resp; -struct ena_com_llq_info *llq_info = &ena_dev->llq_info; +struct ena_admin_set_feat_cmd cmd;int ret;memset (&cmd,0x0 ,sizeof (cmd));
Signature · 1 line
2.17.1
PATCH 3/7 net/ena: separate doorbell logic for Rx and Tx
In reply to Shai BrandesThe function ena_com_write_sq_doorbell() currently checks for LLQ mode using is_llq_max_tx_burst_exists() which is relevant only for TX queues.
Since RX queues do not operate in LLQ mode, this check is unnecessary for the RX path.
This patch separates the doorbell write logic into two distinct handlers for RX and TX, eliminating the irrelevant LLQ check in the RX path.
--- drivers/net/ena/base/ena_eth_com.h | 15 ++++++++++++++- drivers/net/ena/ena_ethdev.c | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-)
drivers/net/ena/base/ena_eth_com.h +14 -1
@@ -159,7 +159,20 @@ static inline bool ena_com_is_doorbell_needed(struct ena_com_io_sq *io_sq,return num_entries_needed > io_sq->entries_in_tx_burst_left; } -static inline int ena_com_write_sq_doorbell (struct ena_com_io_sq *io_sq) +static inline int ena_com_write_rx_sq_doorbell (struct ena_com_io_sq *io_sq) +{ +u16 tail = io_sq->tail; + +ena_trc_dbg (ena_com_io_sq_to_ena_dev (io_sq), +"Write submission queue doorbell for queue: %d tail: %d\n" , + io_sq->qid, tail); + +ENA_REG_WRITE32 (io_sq->bus, tail, io_sq->db_addr); + +return 0 ; +} + +static inline int ena_com_write_tx_sq_doorbell (struct ena_com_io_sq *io_sq) {u16 max_entries_in_tx_burst = io_sq->llq_info.max_entries_in_tx_burst;u16 tail = io_sq->tail;
drivers/net/ena/ena_ethdev.c +3 -3
@@ -1835,7 +1835,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)/* When we submitted free resources to device... */ if (likely (i >0 )) {/* ...let HW know that it can fill buffers with data. */ -ena_com_write_sq_doorbell (rxq->ena_com_io_sq); +ena_com_write_rx_sq_doorbell (rxq->ena_com_io_sq); rxq->next_to_use = next_to_use; }
@@ -3163,7 +3163,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)PMD_TX_LOG_LINE (DEBUG ,"LLQ Tx max burst size of queue %d achieved, writing doorbell to send burst" , tx_ring->id); -ena_com_write_sq_doorbell (tx_ring->ena_com_io_sq); +ena_com_write_tx_sq_doorbell (tx_ring->ena_com_io_sq); tx_ring->tx_stats.doorbells++; tx_ring->pkts_without_db = false; }
@@ -3296,7 +3296,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,/* If there are ready packets to be xmitted... */ if (likely (tx_ring->pkts_without_db)) {/* ...let HW do its best :-) */ -ena_com_write_sq_doorbell (tx_ring->ena_com_io_sq); +ena_com_write_tx_sq_doorbell (tx_ring->ena_com_io_sq); tx_ring->tx_stats.doorbells++; tx_ring->pkts_without_db = false; }
Signature · 1 line
2.17.1
PATCH 4/7 net/ena: support fragment bypass mode
In reply to Shai BrandesIntroduce devarg enable_frag_bypass to toggle the fragment bypass mode for egress packets.
When enabled, this feature bypasses the PPS limit enforced by EC2 for fragmented egress packets on every ENI. Note that enabling this might negatively impact network performance.
By default, this feature is disabled. To enable it set enable_frag_bypass=1. If it cannot be enabled, a warning will be printed, but driver initialization will proceed as normal.
--- doc/guides/nics/ena.rst | 9 ++++ doc/guides/rel_notes/release_25_07.rst | 5 ++ drivers/net/ena/base/ena_com.c | 34 +++++++++++++ drivers/net/ena/base/ena_com.h | 7 +++ .../net/ena/base/ena_defs/ena_admin_defs.h | 14 ++++++ drivers/net/ena/ena_ethdev.c | 48 ++++++++++++++++++- drivers/net/ena/ena_ethdev.h | 1 + 7 files changed, 117 insertions(+), 1 deletion(-)
doc/guides/nics/ena.rst +9 -0
@@ -141,6 +141,15 @@ Runtime Configuration **A non-zero value for this devarg is mandatory for control path functionality when binding ports to uio_pci_generic kernel module which lacks interrupt support.** + * **enable_frag_bypass** (default 0) + + Enable fragment bypass mode for egress packets. This mode bypasses the PPS + limit enforced by EC2 for fragmented egress packets on every ENI. Note that + enabling it might negatively impact network performance. + + 0 - Disabled (Default). + + 1 - Enabled. ENA Configuration Parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
doc/guides/rel_notes/release_25_07.rst +5 -0
@@ -72,6 +72,11 @@ New Features Added a Performance Monitoring Unit (PMU) library which allows Linux applications to perform self monitoring activities without depending on external utilities like perf. +* **Updated Amazon ENA (Elastic Network Adapter) net driver.** + + * Added support for enabling fragment bypass mode for egress packets. + This mode bypasses the PPS limit enforced by EC2 for fragmented egress packets on every ENI. + * **Added Mucse rnp net driver.** Added a new network PMD which supports Mucse 10 Gigabit Ethernet NICs.
drivers/net/ena/base/ena_com.c +34 -0
@@ -3459,3 +3459,37 @@ int ena_com_config_dev_mode(struct ena_com_dev *ena_dev,return 0 ; } + +int ena_com_set_frag_bypass (struct ena_com_dev *ena_dev,bool enable) +{ +struct ena_admin_set_feat_resp set_feat_resp; +struct ena_com_admin_queue *admin_queue; +struct ena_admin_set_feat_cmd cmd; +int ret; + +if (!ena_com_check_supported_feature_id (ena_dev,ENA_ADMIN_FRAG_BYPASS )) { +ena_trc_dbg (ena_dev,"Feature %d isn't supported\n" , +ENA_ADMIN_FRAG_BYPASS ); +return ENA_COM_UNSUPPORTED ; + } + +memset (&cmd,0x0 ,sizeof (cmd)); + admin_queue = &ena_dev->admin_queue; + + cmd.aq_common_descriptor.opcode =ENA_ADMIN_SET_FEATURE ; + cmd.aq_common_descriptor.flags =0 ; + cmd.feat_common.feature_id =ENA_ADMIN_FRAG_BYPASS ; + cmd.feat_common.feature_version =ENA_ADMIN_FRAG_BYPASS_FEATURE_VERSION_0 ; + cmd.u.frag_bypass.enable = (u8 )enable; + + ret =ena_com_execute_admin_command (admin_queue, + (struct ena_admin_aq_entry *)&cmd, +sizeof (cmd), + (struct ena_admin_acq_entry *)&set_feat_resp, +sizeof (set_feat_resp)); + +if (unlikely (ret)) +ena_trc_err (ena_dev,"Failed to enable frag bypass. error: %d\n" , ret); + +return ret; +}
drivers/net/ena/base/ena_com.h +7 -0
@@ -1109,6 +1109,13 @@ static inline bool ena_com_get_missing_admin_interrupt(struct ena_com_dev *ena_dreturn ena_dev->admin_queue.is_missing_admin_interrupt; } +/* ena_com_set_frag_bypass - set fragment bypass +* @ena_dev: ENA communication layer struct +* @enable: true if fragment bypass is enabled, false otherwise. +* +* @return - 0 on success, negative value on failure. +*/ +int ena_com_set_frag_bypass (struct ena_com_dev *ena_dev,bool enable);/* ena_com_io_sq_to_ena_dev - Extract ena_com_dev using contained field io_sq. * @io_sq: IO submit queue struct *
drivers/net/ena/base/ena_defs/ena_admin_defs.h +14 -0
@@ -57,6 +57,7 @@ enum ena_admin_aq_feature_id {ENA_ADMIN_EXTRA_PROPERTIES_STRINGS =5 ,ENA_ADMIN_EXTRA_PROPERTIES_FLAGS =6 ,ENA_ADMIN_MAX_QUEUES_EXT =7 , +ENA_ADMIN_FRAG_BYPASS =8 ,ENA_ADMIN_RSS_HASH_FUNCTION =10 ,ENA_ADMIN_STATELESS_OFFLOAD_CONFIG =11 , ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG = 12,
@@ -165,6 +166,10 @@ enum ena_admin_ena_srd_flags { ENA_ADMIN_ENA_SRD_UDP_ORDERING_BYPASS_ENABLED = BIT(2), }; +enum ena_admin_frag_bypass_feature_version { +/* Enable only */ +ENA_ADMIN_FRAG_BYPASS_FEATURE_VERSION_0 =0 , +};struct ena_admin_aq_common_desc {/* 11:0 : command_id * 15:12 : reserved12
@@ -706,6 +711,12 @@ struct ena_admin_feature_llq_desc {struct ena_admin_accel_mode_req accel_mode; }; +struct ena_admin_feature_frag_bypass_desc { +/* Enable frag_bypass */ +uint8_t enable; + +uint8_t reserved[3 ]; +};struct ena_admin_queue_ext_feature_fields {uint32_t max_tx_sq_num;
@@ -1180,6 +1191,9 @@ struct ena_admin_set_feat_cmd {/* PHC configuration */ struct ena_admin_feature_phc_desc phc; + +/* Fragment bypass configuration */ +struct ena_admin_feature_frag_bypass_desc frag_bypass; } u; };
drivers/net/ena/ena_ethdev.c +47 -1
90 lines not on this page · raw message
drivers/net/ena/ena_ethdev.h +1 -0
@@ -348,6 +348,7 @@ struct ena_adapter {/* Time (in microseconds) of the control path queues monitoring interval */ uint64_t control_path_poll_interval; +bool enable_frag_bypass;/* * Helper variables for holding the information about the supported * metrics.
Signature · 1 line
2.17.1
Hi Stephen, this is the revised patchset that cleanly applies on top of dpdk-next-net origin/main branch after aligning the release notes.
I noticed that rc2 has already been released - we would greatly appreciate it if you could include the ENA changes in rc3.
ENA is a self-contained module, and the previous maintainer approved that mode of operation.
Hopefully, an exception can be made in this case as we originally submitted the patchset over a month ago, and it has been in the "awaiting upstream" state since then. Thanks again for your time and continued support.
Quoted 57 lines
-----Original Message-----
From: Brandes, Shai <[email protected]>
Sent: Monday, June 30, 2025 2:14 PM
To: [email protected]
Cc: [email protected]; Brandes, Shai <[email protected]>
Subject: [PATCH 0/7] net/ena: release 2.13.0This patchset includes an upgrade of the ENA HAL, introduces a new feature, and addresses three bug fixes.
Thank you in advance to the net maintainers and community members for your time and effort reviewing the code.
Best regards,
Shai Brandes
AWS Elastic Network Adapter team---
v2:
Removed patch "net/ena: fix virtual address calc for unaligned BARs" which contained a problematic casting when compiling with 32-bit systemv3:
no change, there was some technical issue when sending the emails where part of the patches apeared on different series.v4:
Each patch in the series should compile independently.
Patch 4/7 causes a compile error that was missed, as the full series passed our directed tests when applied togetherv5:
Reworked the patchset so it applies cleanly on origin/main due to release notes mismatch.Shai Brandes (7):
net/ena/base: avoid recalculating desc per entrynet/ena/base: coding style changes net/ena: separate doorbell logic for Rx and Tx net/ena: support fragment bypass mode net/ena: fix unhandled interrupt config failure net/ena: fix aenq timeout with low poll interval net/ena: upgrade driver version to 2.13.0doc/guides/nics/ena.rst | 13 ++- doc/guides/rel_notes/release_25_07.rst | 9 ++ drivers/net/ena/base/ena_com.c | 40 +++++++- drivers/net/ena/base/ena_com.h | 7 ++ .../net/ena/base/ena_defs/ena_admin_defs.h | 14 +++ drivers/net/ena/base/ena_eth_com.c | 6 +- drivers/net/ena/base/ena_eth_com.h | 15 ++- drivers/net/ena/ena_ethdev.c | 98 +++++++++++++++---- drivers/net/ena/ena_ethdev.h | 4 +- 9 files changed, 175 insertions(+), 31 deletions(-)--
2.17.1
Quoted 37 lines · On Mon, 30 Jun 2025 14:13:51 +0300 Shai Brandes <[email protected]> wrote:
This patchset includes an upgrade of the ENA HAL, introduces a new feature, and addresses three bug fixes.
Thank you in advance to the net maintainers and community members for your time and effort reviewing the code.
Best regards,
Shai Brandes
AWS Elastic Network Adapter team---
v2:
Removed patch "net/ena: fix virtual address calc for unaligned BARs" which contained a problematic casting when compiling with 32-bit systemv3:
no change, there was some technical issue when sending the emails where part of the patches apeared on different series.v4:
Each patch in the series should compile independently. Patch 4/7 causes a compile error that was missed,
as the full series passed our directed tests when applied togetherv5:
Reworked the patchset so it applies cleanly on origin/main due to release notes mismatch.Shai Brandes (7):
net/ena/base: avoid recalculating desc per entrynet/ena/base: coding style changes net/ena: separate doorbell logic for Rx and Tx net/ena: support fragment bypass mode net/ena: fix unhandled interrupt config failure net/ena: fix aenq timeout with low poll interval net/ena: upgrade driver version to 2.13.0
Quoted 11 lines
doc/guides/nics/ena.rst | 13 ++- doc/guides/rel_notes/release_25_07.rst | 9 ++ drivers/net/ena/base/ena_com.c | 40 +++++++- drivers/net/ena/base/ena_com.h | 7 ++ .../net/ena/base/ena_defs/ena_admin_defs.h | 14 +++ drivers/net/ena/base/ena_eth_com.c | 6 +- drivers/net/ena/base/ena_eth_com.h | 15 ++- drivers/net/ena/ena_ethdev.c | 98 +++++++++++++++---- drivers/net/ena/ena_ethdev.h | 4 +- 9 files changed, 175 insertions(+), 31 deletions(-)
Ok in next-net branch now
Recheck-request: aws-unit-testing
We added support for rerun to aws lab bot, this is to verify it function well on the cover letter option
Quoted 57 lines
-----Original Message-----
From: Brandes, Shai <[email protected]>
Sent: Monday, June 30, 2025 2:14 PM
To: [email protected]
Cc: [email protected]; Brandes, Shai <[email protected]>
Subject: [PATCH 0/7] net/ena: release 2.13.0This patchset includes an upgrade of the ENA HAL, introduces a new feature, and addresses three bug fixes.
Thank you in advance to the net maintainers and community members for your time and effort reviewing the code.
Best regards,
Shai Brandes
AWS Elastic Network Adapter team---
v2:
Removed patch "net/ena: fix virtual address calc for unaligned BARs" which contained a problematic casting when compiling with 32-bit systemv3:
no change, there was some technical issue when sending the emails where part of the patches apeared on different series.v4:
Each patch in the series should compile independently.
Patch 4/7 causes a compile error that was missed, as the full series passed our directed tests when applied togetherv5:
Reworked the patchset so it applies cleanly on origin/main due to release notes mismatch.Shai Brandes (7):
net/ena/base: avoid recalculating desc per entrynet/ena/base: coding style changes net/ena: separate doorbell logic for Rx and Tx net/ena: support fragment bypass mode net/ena: fix unhandled interrupt config failure net/ena: fix aenq timeout with low poll interval net/ena: upgrade driver version to 2.13.0doc/guides/nics/ena.rst | 13 ++- doc/guides/rel_notes/release_25_07.rst | 9 ++ drivers/net/ena/base/ena_com.c | 40 +++++++- drivers/net/ena/base/ena_com.h | 7 ++ .../net/ena/base/ena_defs/ena_admin_defs.h | 14 +++ drivers/net/ena/base/ena_eth_com.c | 6 +- drivers/net/ena/base/ena_eth_com.h | 15 ++- drivers/net/ena/ena_ethdev.c | 98 +++++++++++++++---- drivers/net/ena/ena_ethdev.h | 4 +- 9 files changed, 175 insertions(+), 31 deletions(-)--
2.17.1