From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org
Cc: hemant.agrawal@nxp.com, stable@dpdk.org,
Gagandeep Singh <g.singh@nxp.com>
Subject: [PATCH v4 1/9] net/enetc: fix TX BD structure
Date: Mon, 29 Jun 2026 10:35:19 +0530 [thread overview]
Message-ID: <20260629050527.981200-2-g.singh@nxp.com> (raw)
In-Reply-To: <20260629050527.981200-1-g.singh@nxp.com>
The flags field in struct enetc_tx_bd was declared as uint16_t but
ENETC4 TX BDs only use an 8-bit flags byte. Fix the type to uint8_t
to match the hardware descriptor layout.
Fixes: 696fa399d797 ("net/enetc: add PMD with basic operations")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/net/enetc/base/enetc_hw.h | 7 +++----
drivers/net/enetc/enetc_rxtx.c | 17 +++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h
index 173d677..19efadd 100644
--- a/drivers/net/enetc/base/enetc_hw.h
+++ b/drivers/net/enetc/base/enetc_hw.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2024 NXP
+ * Copyright 2018-2026 NXP
*/
#ifndef _ENETC_HW_H_
@@ -198,8 +198,7 @@ enum enetc_bdr_type {TX, RX};
#define ENETC_TX_ADDR(txq, addr) ((void *)((txq)->enetc_txbdr + (addr)))
-#define ENETC_TXBD_FLAGS_IE BIT(13)
-#define ENETC_TXBD_FLAGS_F BIT(15)
+#define ENETC_TXBD_FLAGS_F BIT(7)
/* ENETC Parsed values (Little Endian) */
#define ENETC_PARSE_ERROR 0x8000
@@ -262,7 +261,7 @@ struct enetc_tx_bd {
uint8_t l3t:1;
uint8_t resv:5;
uint8_t l4t:3;
- uint16_t flags;
+ uint8_t flags;
};/* default layout */
uint32_t txstart;
uint32_t lstatus;
diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index a2b8153..d3b98b3 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2024 NXP
+ * Copyright 2018-2026 NXP
*/
#include <stdbool.h>
@@ -101,7 +101,7 @@ enetc_xmit_pkts(void *tx_queue,
tx_swbd = &tx_ring->q_swbd[i];
txbd->frm_len = tx_pkts[start]->pkt_len;
txbd->buf_len = txbd->frm_len;
- txbd->flags = rte_cpu_to_le_16(ENETC_TXBD_FLAGS_F);
+ txbd->flags = ENETC_TXBD_FLAGS_F;
txbd->addr = (uint64_t)(uintptr_t)
rte_cpu_to_le_64((size_t)tx_swbd->buffer_addr->buf_iova +
tx_swbd->buffer_addr->data_off);
@@ -133,13 +133,13 @@ enetc4_tx_offload_checksum(struct rte_mbuf *mbuf, struct enetc_tx_bd *txbd)
txbd->ipcs = ENETC4_TXBD_IPCS;
txbd->l3_start = mbuf->l2_len;
txbd->l3_hdr_size = mbuf->l3_len / 4;
- txbd->flags |= rte_cpu_to_le_16(ENETC4_TXBD_FLAGS_L_TX_CKSUM);
+ txbd->flags |= ENETC4_TXBD_FLAGS_L_TX_CKSUM;
if ((mbuf->ol_flags & RTE_MBUF_F_TX_UDP_CKSUM) == RTE_MBUF_F_TX_UDP_CKSUM) {
- txbd->l4t = rte_cpu_to_le_16(ENETC4_TXBD_L4T_UDP);
- txbd->flags |= rte_cpu_to_le_16(ENETC4_TXBD_FLAGS_L4CS);
+ txbd->l4t = ENETC4_TXBD_L4T_UDP;
+ txbd->flags |= ENETC4_TXBD_FLAGS_L4CS;
} else if ((mbuf->ol_flags & RTE_MBUF_F_TX_TCP_CKSUM) == RTE_MBUF_F_TX_TCP_CKSUM) {
- txbd->l4t = rte_cpu_to_le_16(ENETC4_TXBD_L4T_TCP);
- txbd->flags |= rte_cpu_to_le_16(ENETC4_TXBD_FLAGS_L4CS);
+ txbd->l4t = ENETC4_TXBD_L4T_TCP;
+ txbd->flags |= ENETC4_TXBD_FLAGS_L4CS;
}
}
}
@@ -172,7 +172,7 @@ enetc_xmit_pkts_nc(void *tx_queue,
dcbf(data + j);
txbd = ENETC_TXBD(*tx_ring, i);
- txbd->flags = rte_cpu_to_le_16(ENETC4_TXBD_FLAGS_F);
+ txbd->flags = 0;
if (tx_ring->q_swbd[i].buffer_addr->ol_flags & ENETC4_TX_CKSUM_OFFLOAD_MASK)
enetc4_tx_offload_checksum(tx_ring->q_swbd[i].buffer_addr, txbd);
@@ -182,6 +182,7 @@ enetc_xmit_pkts_nc(void *tx_queue,
txbd->addr = (uint64_t)(uintptr_t)
rte_cpu_to_le_64((size_t)tx_swbd->buffer_addr->buf_iova +
tx_swbd->buffer_addr->data_off);
+ txbd->flags |= ENETC4_TXBD_FLAGS_F;
i++;
start++;
if (unlikely(i == tx_ring->bd_count))
--
2.25.1
next prev parent reply other threads:[~2026-06-29 5:21 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 18:44 [PATCH 00/10] NXP ENETC driver related changes Gagandeep Singh
2026-06-19 18:44 ` [PATCH 01/10] net/enetc: fix TX BD structure Gagandeep Singh
2026-06-19 18:44 ` [PATCH 02/10] net/enetc: fix TX BDs flag overwrite issue Gagandeep Singh
2026-06-19 18:44 ` [PATCH 03/10] net/enetc: fix queue initialization Gagandeep Singh
2026-06-19 18:44 ` [PATCH 04/10] net/enetc: support ESP packet type in packet parsing Gagandeep Singh
2026-06-19 18:44 ` [PATCH 05/10] net/enetc: update random MAC generation code Gagandeep Singh
2026-06-19 18:44 ` [PATCH 06/10] net/enetc: support scatter-gather Gagandeep Singh
2026-06-19 18:44 ` [PATCH 07/10] net/enetc: add option to disable VSI messaging Gagandeep Singh
2026-06-19 18:44 ` [PATCH 08/10] net/enetc: add devargs to control VSI-PSI timeout and delay Gagandeep Singh
2026-06-19 18:44 ` [PATCH 09/10] net/enetc: set user configurable priority to TX rings Gagandeep Singh
2026-06-19 18:44 ` [PATCH 10/10] net/enetc4: add cacheable BD ring support with SW cache maintenance Gagandeep Singh
2026-06-19 21:43 ` [PATCH 00/10] NXP ENETC driver related changes Stephen Hemminger
2026-06-22 11:36 ` Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 0/9] ENETC driver related changes series Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 1/9] net/enetc: fix TX BD structure Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 2/9] net/enetc: fix queue initialization Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 3/9] net/enetc: support ESP packet type in packet parsing Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 4/9] net/enetc: update random MAC generation code Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 5/9] net/enetc: support scatter-gather Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 6/9] net/enetc: add option to disable VSI messaging Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 7/9] net/enetc: add devargs to control VSI-PSI timeout and delay Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 8/9] net/enetc: set user configurable priority to TX rings Gagandeep Singh
2026-06-22 11:35 ` [PATCH v2 9/9] net/enetc4: add cacheable BD ring support with SW cache maintenance Gagandeep Singh
2026-06-22 15:06 ` [PATCH v2 0/9] ENETC driver related changes series Stephen Hemminger
2026-06-23 6:02 ` Gagandeep Singh
2026-06-23 5:59 ` [PATCH v3 " Gagandeep Singh
2026-06-23 5:59 ` [PATCH v3 1/9] net/enetc: fix TX BD structure Gagandeep Singh
2026-06-23 5:59 ` [PATCH v3 2/9] net/enetc: fix queue initialization Gagandeep Singh
2026-06-23 5:59 ` [PATCH v3 3/9] net/enetc: support ESP packet type in packet parsing Gagandeep Singh
2026-06-23 5:59 ` [PATCH v3 4/9] net/enetc: update random MAC generation code Gagandeep Singh
2026-06-23 6:00 ` [PATCH v3 5/9] net/enetc: support scatter-gather Gagandeep Singh
2026-06-23 6:00 ` [PATCH v3 6/9] net/enetc: add option to disable VSI messaging Gagandeep Singh
2026-06-23 6:00 ` [PATCH v3 7/9] net/enetc: add devargs to control VSI-PSI timeout and delay Gagandeep Singh
2026-06-23 6:00 ` [PATCH v3 8/9] net/enetc: set user configurable priority to TX rings Gagandeep Singh
2026-06-23 6:00 ` [PATCH v3 9/9] net/enetc4: add cacheable BD ring support with SW cache maintenance Gagandeep Singh
2026-06-23 15:46 ` [PATCH v3 0/9] ENETC driver related changes series Stephen Hemminger
2026-06-23 17:21 ` Gagandeep Singh
2026-06-23 17:32 ` Stephen Hemminger
2026-06-28 22:24 ` Stephen Hemminger
2026-06-28 22:40 ` Stephen Hemminger
2026-06-29 5:19 ` Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 " Gagandeep Singh
2026-06-29 5:05 ` Gagandeep Singh [this message]
2026-06-29 5:05 ` [PATCH v4 2/9] net/enetc: fix queue initialization Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 3/9] net/enetc: support ESP packet type in packet parsing Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 4/9] net/enetc: update random MAC generation code Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 5/9] net/enetc: support scatter-gather Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 6/9] net/enetc: add option to disable VSI messaging Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 7/9] net/enetc: add devargs to control VSI-PSI timeout and delay Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 8/9] net/enetc: set user configurable priority to TX rings Gagandeep Singh
2026-06-29 5:05 ` [PATCH v4 9/9] net/enetc4: add cacheable BD ring support with SW cache maintenance Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 0/9] ENETC driver related changes series Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 1/9] net/enetc: fix TX BD structure Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 2/9] net/enetc: fix queue initialization Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 3/9] net/enetc: support ESP packet type in packet parsing Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 4/9] net/enetc: update random MAC generation code Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 5/9] net/enetc: support scatter-gather Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 6/9] net/enetc: add option to disable VSI messaging Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 7/9] net/enetc: add devargs to control VSI-PSI timeout and delay Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 8/9] net/enetc: set user configurable priority to TX rings Gagandeep Singh
2026-06-29 5:18 ` [PATCH v4 9/9] net/enetc4: add cacheable BD ring support with SW cache maintenance Gagandeep Singh
2026-06-29 19:00 ` [PATCH v4 0/9] ENETC driver related changes series Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260629050527.981200-2-g.singh@nxp.com \
--to=g.singh@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.