@@ -73,6 +73,10 @@ New Features
``bpf_obj_get()`` for an xskmap pinned (by the AF_XDP DP) inside the
container.
+* **Updated Amazon ena (Elastic Network Adapter) net driver.**
+
+ * Reworked the driver logger usage in order to improve Tx performance.
+
* **Update Tap PMD driver.**
* Updated to support up to 8 queues when used by secondary process.
@@ -1392,11 +1392,7 @@ int ena_com_execute_admin_command(struct ena_com_admin_queue *admin_queue,
comp, comp_size);
if (IS_ERR(comp_ctx)) {
ret = PTR_ERR(comp_ctx);
- if (ret == ENA_COM_NO_DEVICE)
- ena_trc_dbg(admin_queue->ena_dev,
- "Failed to submit command [%d]\n",
- ret);
- else
+ if (ret != ENA_COM_NO_DEVICE)
ena_trc_err(admin_queue->ena_dev,
"Failed to submit command [%d]\n",
ret);
@@ -1408,10 +1404,8 @@ int ena_com_execute_admin_command(struct ena_com_admin_queue *admin_queue,
if (unlikely(ret)) {
if (admin_queue->running_state)
ena_trc_err(admin_queue->ena_dev,
- "Failed to process command. ret = %d\n", ret);
- else
- ena_trc_dbg(admin_queue->ena_dev,
- "Failed to process command. ret = %d\n", ret);
+ "Failed to process command [%d]\n",
+ ret);
}
return ret;
}
@@ -2416,7 +2410,6 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *ena_dev, void *data)
struct ena_admin_aenq_entry *aenq_e;
struct ena_admin_aenq_common_desc *aenq_common;
struct ena_com_aenq *aenq = &ena_dev->aenq;
- u64 timestamp;
ena_aenq_handler handler_cb;
u16 masked_head, processed = 0;
u8 phase;
@@ -2438,13 +2431,11 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *ena_dev, void *data)
*/
dma_rmb();
- timestamp = (u64)aenq_common->timestamp_low |
- ((u64)aenq_common->timestamp_high << 32);
-
ena_trc_dbg(ena_dev, "AENQ! Group[%x] Syndrome[%x] timestamp: [%" ENA_PRIu64 "s]\n",
aenq_common->group,
aenq_common->syndrome,
- timestamp);
+ ((u64)aenq_common->timestamp_low |
+ ((u64)aenq_common->timestamp_high << 32)));
/* Handle specific event*/
handler_cb = ena_com_get_specific_aenq_cb(ena_dev,
@@ -426,8 +426,7 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
return ENA_COM_OK;
}
-static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq,
- struct ena_com_rx_ctx *ena_rx_ctx,
+static void ena_com_rx_set_flags(struct ena_com_rx_ctx *ena_rx_ctx,
struct ena_eth_io_rx_cdesc_base *cdesc)
{
ena_rx_ctx->l3_proto = cdesc->status &
@@ -453,16 +452,6 @@ static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq,
ENA_FIELD_GET(cdesc->status,
ENA_ETH_IO_RX_CDESC_BASE_IPV4_FRAG_MASK,
ENA_ETH_IO_RX_CDESC_BASE_IPV4_FRAG_SHIFT);
-
- ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
- "l3_proto %d l4_proto %d l3_csum_err %d l4_csum_err %d hash %u frag %d cdesc_status %x\n",
- ena_rx_ctx->l3_proto,
- ena_rx_ctx->l4_proto,
- ena_rx_ctx->l3_csum_err,
- ena_rx_ctx->l4_csum_err,
- ena_rx_ctx->hash,
- ena_rx_ctx->frag,
- cdesc->status);
}
/*****************************************************************************/
@@ -689,7 +678,17 @@ int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
io_sq->qid, io_sq->next_to_comp);
/* Get rx flags from the last pkt */
- ena_com_rx_set_flags(io_cq, ena_rx_ctx, cdesc);
+ ena_com_rx_set_flags(ena_rx_ctx, cdesc);
+
+ ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
+ "l3_proto %d l4_proto %d l3_csum_err %d l4_csum_err %d hash %d frag %d cdesc_status %x\n",
+ ena_rx_ctx->l3_proto,
+ ena_rx_ctx->l4_proto,
+ ena_rx_ctx->l3_csum_err,
+ ena_rx_ctx->l4_csum_err,
+ ena_rx_ctx->hash,
+ ena_rx_ctx->frag,
+ cdesc->status);
ena_rx_ctx->descs = nb_hw_desc;
@@ -122,7 +122,11 @@ extern int ena_logtype_com;
"[ENA_COM: %s]" fmt, __func__, ##arg) \
)
-#define ena_trc_dbg(dev, format, arg...) ena_trc_log(dev, DEBUG, format, ##arg)
+#if (defined RTE_ETHDEV_DEBUG_TX) || (defined RTE_ETHDEV_DEBUG_RX)
+#define ena_trc_dbg(dev, format, ...) ena_trc_log(dev, DEBUG, format, ##__VA_ARGS__)
+#else
+#define ena_trc_dbg(dev, format, ...)
+#endif
#define ena_trc_info(dev, format, arg...) ena_trc_log(dev, INFO, format, ##arg)
#define ena_trc_warn(dev, format, arg...) ena_trc_log(dev, WARNING, format, ##arg)
#define ena_trc_err(dev, format, arg...) ena_trc_log(dev, ERR, format, ##arg)
@@ -3124,7 +3124,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
*/
if (!ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq,
mbuf->nb_segs + 2)) {
- PMD_DRV_LOG(DEBUG, "Not enough space in the tx queue\n");
+ PMD_TX_LOG(DEBUG, "Not enough space in the tx queue\n");
return ENA_COM_NO_MEM;
}