DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] fix and complete the eCPRI header
@ 2026-08-04  8:13 Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 1/5] net: fix eCPRI delay measurement message header Mattias Rönnblom
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

The objective of this series is to make rte_ecpri.h a complete and
correct description of the eCPRI V2.0 message headers, usable for
parsing and building messages, and not only for matching on a few
header fields with rte_flow, which is what it was added for.

The first two patches fix wire format bugs in rte_ecpri.h: missing
fields in the One-Way Delay Measurement message header, and padding in
the Remote Reset one. Both change struct sizes, hence the release note
entries and the lack of a stable tag.

The rest completes the eCPRI V2.0 coverage of the header.

Mattias Rönnblom (5):
  net: fix eCPRI delay measurement message header
  net: fix eCPRI remote reset message header size
  net: add missing eCPRI message field values
  net: allow byte swapping eCPRI remote memory access
  net: add eCPRI IWF message headers

 doc/guides/rel_notes/release_26_11.rst |   8 ++
 lib/net/rte_ecpri.h                    | 164 +++++++++++++++++++++++--
 2 files changed, 159 insertions(+), 13 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC 1/5] net: fix eCPRI delay measurement message header
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
@ 2026-08-04  8:13 ` Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 2/5] net: fix eCPRI remote reset message header size Mattias Rönnblom
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

struct rte_ecpri_msg_delay_measure covered only 2 of the 20 bytes of the
One-Way Delay Measurement message header (type #5), leaving out the
TimeStamp and the Compensation Value. Add them, per eCPRI V2.0 figure
23, and pack the struct, since the Compensation Value is not naturally
aligned on the wire.

The struct thus grows from 2 to 20 bytes, and struct
rte_ecpri_combined_msg_hdr, and with it struct rte_flow_item_ecpri, from
16 to 24 bytes. Extend the dummy array to five dwords, so that it again
bounds the message header union, and offers a dword view of all of it.

Fixes: d164c609e70b ("ethdev: add eCPRI key fields to flow API")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 doc/guides/rel_notes/release_26_11.rst |  5 +++++
 lib/net/rte_ecpri.h                    | 11 ++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index c8cc86295d..dca75000b7 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -109,6 +109,11 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* net: Added the missing ``TimeStamp`` and ``Compensation Value`` fields to
+  ``struct rte_ecpri_msg_delay_measure``, which grew from 2 to 20 bytes.
+  ``struct rte_ecpri_combined_msg_hdr``, and hence
+  ``struct rte_flow_item_ecpri``, grew from 16 to 24 bytes.
+
 
 Known Issues
 ------------
diff --git a/lib/net/rte_ecpri.h b/lib/net/rte_ecpri.h
index 19821336a6..6f6762ffb2 100644
--- a/lib/net/rte_ecpri.h
+++ b/lib/net/rte_ecpri.h
@@ -136,11 +136,16 @@ struct rte_ecpri_msg_rm_access {
 
 /**
  * eCPRI Message Header of Type #5: One-Way Delay Measurement
+ *
+ * The Compensation Value is a signed value, in units of 2^-16 ns.
  */
-struct rte_ecpri_msg_delay_measure {
+struct __rte_packed_begin rte_ecpri_msg_delay_measure {
 	uint8_t msr_id;			/**< Measurement ID */
 	uint8_t act_type;		/**< Action Type */
-};
+	uint8_t ts_sec[6];		/**< TimeStamp: seconds */
+	rte_be32_t ts_nsec;		/**< TimeStamp: nanoseconds */
+	rte_be64_t comp_val;		/**< Compensation Value */
+} __rte_packed_end;
 
 /**
  * eCPRI Message Header of Type #6: Remote Reset
@@ -174,7 +179,7 @@ struct rte_ecpri_combined_msg_hdr {
 		struct rte_ecpri_msg_delay_measure type5;
 		struct rte_ecpri_msg_remote_reset type6;
 		struct rte_ecpri_msg_event_ind type7;
-		rte_be32_t dummy[3];
+		rte_be32_t dummy[5];
 	};
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC 2/5] net: fix eCPRI remote reset message header size
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 1/5] net: fix eCPRI delay measurement message header Mattias Rönnblom
@ 2026-08-04  8:13 ` Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 3/5] net: add missing eCPRI message field values Mattias Rönnblom
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

The Remote Reset message header (type #6) is 3 bytes on the wire, but
padding made struct rte_ecpri_msg_remote_reset 4 bytes, so code using
sizeof() to step over the header skipped one byte too many.

Pack the struct, leaving the field offsets unchanged. Its size thus
goes from 4 to 3 bytes. struct rte_ecpri_combined_msg_hdr is
unaffected, since the One-Way Delay Measurement header is larger.

Fixes: d164c609e70b ("ethdev: add eCPRI key fields to flow API")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 doc/guides/rel_notes/release_26_11.rst | 3 +++
 lib/net/rte_ecpri.h                    | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index dca75000b7..c52092b987 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -114,6 +114,9 @@ ABI Changes
   ``struct rte_ecpri_combined_msg_hdr``, and hence
   ``struct rte_flow_item_ecpri``, grew from 16 to 24 bytes.
 
+* net: Packed ``struct rte_ecpri_msg_remote_reset``, so that its size matches
+  the 3-byte message header on the wire. It shrank from 4 to 3 bytes.
+
 
 Known Issues
 ------------
diff --git a/lib/net/rte_ecpri.h b/lib/net/rte_ecpri.h
index 6f6762ffb2..6bacdbecc2 100644
--- a/lib/net/rte_ecpri.h
+++ b/lib/net/rte_ecpri.h
@@ -150,10 +150,10 @@ struct __rte_packed_begin rte_ecpri_msg_delay_measure {
 /**
  * eCPRI Message Header of Type #6: Remote Reset
  */
-struct rte_ecpri_msg_remote_reset {
+struct __rte_packed_begin rte_ecpri_msg_remote_reset {
 	rte_be16_t rst_id;		/**< Reset ID */
 	uint8_t rst_op;			/**< Reset Code Op */
-};
+} __rte_packed_end;
 
 /**
  * eCPRI Message Header of Type #7: Event Indication
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC 3/5] net: add missing eCPRI message field values
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 1/5] net: fix eCPRI delay measurement message header Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 2/5] net: fix eCPRI remote reset message header size Mattias Rönnblom
@ 2026-08-04  8:13 ` Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 4/5] net: allow byte swapping eCPRI remote memory access Mattias Rönnblom
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

Only the Event Type values of the Event Indication message (type #7)
were defined. Add the values of the other message types, per eCPRI V2.0
tables 5, 6, 8 and 9: Read/Write and Req/Resp of Remote Memory Access
(type #4), Action Type of One-Way Delay Measurement (type #5) and Reset
Code Op of Remote Reset (type #6).

The Action Type tells whether the TimeStamp and Compensation Value
fields carry time information, or are required to be zero.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 lib/net/rte_ecpri.h | 49 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/lib/net/rte_ecpri.h b/lib/net/rte_ecpri.h
index 6bacdbecc2..c147cb7b64 100644
--- a/lib/net/rte_ecpri.h
+++ b/lib/net/rte_ecpri.h
@@ -42,6 +42,55 @@
 #define RTE_ECPRI_MSG_TYPE_IWF_MAP	10
 #define RTE_ECPRI_MSG_TYPE_IWF_DCTRL	11
 
+/*
+ * Read/Write of Message Type #4: Remote Memory Access
+ * 0x0: Read
+ * 0x1: Write
+ * 0x2: Write_No_Resp
+ * 0x3...0xF: Reserved
+ */
+#define RTE_ECPRI_RM_ACC_RW_READ		0x0
+#define RTE_ECPRI_RM_ACC_RW_WRITE		0x1
+#define RTE_ECPRI_RM_ACC_RW_WRITE_NO_RSP	0x2
+
+/*
+ * Req/Resp of Message Type #4: Remote Memory Access
+ * 0x0: Request
+ * 0x1: Response
+ * 0x2: Failure
+ * 0x3...0xF: Reserved
+ */
+#define RTE_ECPRI_RM_ACC_RR_REQ			0x0
+#define RTE_ECPRI_RM_ACC_RR_RSP			0x1
+#define RTE_ECPRI_RM_ACC_RR_FAIL		0x2
+
+/*
+ * Action Type of Message Type #5: One-Way Delay Measurement
+ * 0x00: Request
+ * 0x01: Request with Follow_Up
+ * 0x02: Response
+ * 0x03: Remote Request
+ * 0x04: Remote Request with Follow_Up
+ * 0x05: Follow_Up
+ * 0x06...0xFF: Reserved
+ */
+#define RTE_ECPRI_DLY_MSR_ACT_REQ		0x00
+#define RTE_ECPRI_DLY_MSR_ACT_REQ_FUP		0x01
+#define RTE_ECPRI_DLY_MSR_ACT_RSP		0x02
+#define RTE_ECPRI_DLY_MSR_ACT_RMT_REQ		0x03
+#define RTE_ECPRI_DLY_MSR_ACT_RMT_REQ_FUP	0x04
+#define RTE_ECPRI_DLY_MSR_ACT_FUP		0x05
+
+/*
+ * Reset Code Op of Message Type #6: Remote Reset
+ * 0x00: Reserved
+ * 0x01: Remote reset request
+ * 0x02: Remote reset response
+ * 0x03...0xFF: Reserved
+ */
+#define RTE_ECPRI_RMT_RST_OP_REQ	0x01
+#define RTE_ECPRI_RMT_RST_OP_RSP	0x02
+
 /*
  * Event Type of Message Type #7: Event Indication
  * 0x00: Fault(s) Indication
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC 4/5] net: allow byte swapping eCPRI remote memory access
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
                   ` (2 preceding siblings ...)
  2026-08-04  8:13 ` [RFC 3/5] net: add missing eCPRI message field values Mattias Rönnblom
@ 2026-08-04  8:13 ` Mattias Rönnblom
  2026-08-04  8:13 ` [RFC 5/5] net: add eCPRI IWF message headers Mattias Rönnblom
  2026-08-04 16:31 ` [RFC 0/5] fix and complete the eCPRI header Stephen Hemminger
  5 siblings, 0 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

The first word of the Remote Memory Access message header (type #4) is
described with host byte order bit fields, but unlike the common header
it had no integer alias, leaving no clean way to convert it from network
byte order before accessing the fields.

Add a u32 alias, mirroring struct rte_ecpri_common_hdr. The new union
and struct are anonymous, so the layout, the size and the field access
are all unchanged.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 lib/net/rte_ecpri.h | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/lib/net/rte_ecpri.h b/lib/net/rte_ecpri.h
index c147cb7b64..5fcc4e5853 100644
--- a/lib/net/rte_ecpri.h
+++ b/lib/net/rte_ecpri.h
@@ -168,17 +168,22 @@ struct rte_ecpri_msg_gen_data {
  * eCPRI Message Header of Type #4: Remote Memory Access
  */
 struct rte_ecpri_msg_rm_access {
+	union {
+		rte_be32_t u32;		/**< 4B first word in BE */
+		struct {
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
-	uint32_t ele_id:16;		/**< Element ID */
-	uint32_t rr:4;			/**< Req/Resp */
-	uint32_t rw:4;			/**< Read/Write */
-	uint32_t rma_id:8;		/**< Remote Memory Access ID */
+			uint32_t ele_id:16;	/**< Element ID */
+			uint32_t rr:4;		/**< Req/Resp */
+			uint32_t rw:4;		/**< Read/Write */
+			uint32_t rma_id:8;	/**< Remote Memory Access ID */
 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
-	uint32_t rma_id:8;		/**< Remote Memory Access ID */
-	uint32_t rw:4;			/**< Read/Write */
-	uint32_t rr:4;			/**< Req/Resp */
-	uint32_t ele_id:16;		/**< Element ID */
+			uint32_t rma_id:8;	/**< Remote Memory Access ID */
+			uint32_t rw:4;		/**< Read/Write */
+			uint32_t rr:4;		/**< Req/Resp */
+			uint32_t ele_id:16;	/**< Element ID */
 #endif
+		};
+	};
 	uint8_t addr[6];		/**< 48-bits address */
 	rte_be16_t length;		/**< number of bytes */
 };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC 5/5] net: add eCPRI IWF message headers
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
                   ` (3 preceding siblings ...)
  2026-08-04  8:13 ` [RFC 4/5] net: allow byte swapping eCPRI remote memory access Mattias Rönnblom
@ 2026-08-04  8:13 ` Mattias Rönnblom
  2026-08-04 16:31 ` [RFC 0/5] fix and complete the eCPRI header Stephen Hemminger
  5 siblings, 0 replies; 7+ messages in thread
From: Mattias Rönnblom @ 2026-08-04  8:13 UTC (permalink / raw)
  To: stephen, thomas, andrew.rybchenko, sriram.yagnaraman
  Cc: dev, bingz, rasland, Mattias Rönnblom

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

The IWF message types were defined, but not their message headers, so
an IWF message could be identified but not described.

Add the IWF Start-Up (type #8), IWF Operation (type #9), IWF Mapping
(type #10) and IWF Delay Control (type #11) message headers, and the
Action Type values of the latter two, per eCPRI V2.0 figures 31A, 31B,
31L and 31O and tables 14A and 14C. As for the other message types,
only the header is described; the payload, such as the chunks of an IWF
Operation message, is left to the user.

struct rte_ecpri_combined_msg_hdr keeps its size, since the One-Way
Delay Measurement header remains the largest.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 lib/net/rte_ecpri.h | 79 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/lib/net/rte_ecpri.h b/lib/net/rte_ecpri.h
index 5fcc4e5853..ef0e8ced4c 100644
--- a/lib/net/rte_ecpri.h
+++ b/lib/net/rte_ecpri.h
@@ -108,6 +108,28 @@
 #define RTE_ECPRI_EVT_IND_SYNC_ACK	0x04
 #define RTE_ECPRI_EVT_IND_SYNC_END	0x05
 
+/*
+ * Action Type of Message Type #10: IWF Mapping
+ * 0x00: SetRxConfigRequest
+ * 0x01: SetRxConfigResponseAccept
+ * 0x02: SetRxConfigResponseReject
+ * 0x03: SetRxConfigResponsePropose
+ * 0x04...0xFF: Reserved
+ */
+#define RTE_ECPRI_IWF_MAP_ACT_SET_RX_CFG_REQ	0x00
+#define RTE_ECPRI_IWF_MAP_ACT_SET_RX_CFG_ACC	0x01
+#define RTE_ECPRI_IWF_MAP_ACT_SET_RX_CFG_REJ	0x02
+#define RTE_ECPRI_IWF_MAP_ACT_SET_RX_CFG_PRP	0x03
+
+/*
+ * Action Type of Message Type #11: IWF Delay Control
+ * 0x00: Request get delays
+ * 0x01: Response get delays
+ * 0x02...0xFF: Reserved
+ */
+#define RTE_ECPRI_IWF_DCTRL_ACT_GET_DLY_REQ	0x00
+#define RTE_ECPRI_IWF_DCTRL_ACT_GET_DLY_RSP	0x01
+
 /**
  * eCPRI Common Header
  */
@@ -219,6 +241,59 @@ struct rte_ecpri_msg_event_ind {
 	uint8_t number;			/**< Number of Faults/Notif */
 };
 
+/**
+ * eCPRI Message Header of Type #8: IWF Start-Up
+ */
+struct __rte_packed_begin rte_ecpri_msg_iwf_up {
+	rte_be16_t pc_id;		/**< Physical channel ID */
+	uint8_t hfn;			/**< #Z: CPRI hyperframe number */
+	uint8_t bfn;			/**< #X: CPRI basic frame number */
+	rte_be32_t timestamp;		/**< Timestamp, in nanoseconds */
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+	uint8_t line_rate:5;		/**< CPRI line rate */
+	uint8_t res:1;			/**< Reserved */
+	uint8_t s:1;			/**< CPRI scrambling indicator */
+	uint8_t f:1;			/**< CPRI FEC indicator */
+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
+	uint8_t f:1;			/**< CPRI FEC indicator */
+	uint8_t s:1;			/**< CPRI scrambling indicator */
+	uint8_t res:1;			/**< Reserved */
+	uint8_t line_rate:5;		/**< CPRI line rate */
+#endif
+} __rte_packed_end;
+
+/**
+ * eCPRI Message Header of Type #9: IWF Operation
+ *
+ * The header is followed by one or more chunks, each but the first one
+ * preceded by its own hyperframe and basic frame number.
+ */
+struct rte_ecpri_msg_iwf_opt {
+	rte_be16_t pc_id;		/**< Physical channel ID */
+	uint8_t hfn;			/**< #Z: CPRI hyperframe number */
+	uint8_t bfn;			/**< #X: CPRI basic frame number */
+};
+
+/**
+ * eCPRI Message Header of Type #10: IWF Mapping
+ */
+struct rte_ecpri_msg_iwf_map {
+	rte_be16_t pc_id;		/**< Physical channel ID */
+	uint8_t cfg_id;			/**< Mapping Config ID */
+	uint8_t act_type;		/**< Action Type */
+};
+
+/**
+ * eCPRI Message Header of Type #11: IWF Delay Control
+ */
+struct rte_ecpri_msg_iwf_dctrl {
+	rte_be16_t pc_id;		/**< Physical channel ID */
+	uint8_t dc_id;			/**< Delay Control ID */
+	uint8_t act_type;		/**< Action Type */
+	rte_be32_t delay_a;		/**< Delay A, in 1/16 ns */
+	rte_be32_t delay_b;		/**< Delay B, in 1/16 ns */
+};
+
 /**
  * eCPRI Combined Message Header Format: Common Header + Message Types
  */
@@ -233,6 +308,10 @@ struct rte_ecpri_combined_msg_hdr {
 		struct rte_ecpri_msg_delay_measure type5;
 		struct rte_ecpri_msg_remote_reset type6;
 		struct rte_ecpri_msg_event_ind type7;
+		struct rte_ecpri_msg_iwf_up type8;
+		struct rte_ecpri_msg_iwf_opt type9;
+		struct rte_ecpri_msg_iwf_map type10;
+		struct rte_ecpri_msg_iwf_dctrl type11;
 		rte_be32_t dummy[5];
 	};
 };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC 0/5] fix and complete the eCPRI header
  2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
                   ` (4 preceding siblings ...)
  2026-08-04  8:13 ` [RFC 5/5] net: add eCPRI IWF message headers Mattias Rönnblom
@ 2026-08-04 16:31 ` Stephen Hemminger
  5 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2026-08-04 16:31 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: thomas, andrew.rybchenko, sriram.yagnaraman, dev, bingz, rasland,
	Mattias Rönnblom

On Tue,  4 Aug 2026 10:13:14 +0200
Mattias Rönnblom <hofors@lysator.liu.se> wrote:

> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> 
> The objective of this series is to make rte_ecpri.h a complete and
> correct description of the eCPRI V2.0 message headers, usable for
> parsing and building messages, and not only for matching on a few
> header fields with rte_flow, which is what it was added for.
> 
> The first two patches fix wire format bugs in rte_ecpri.h: missing
> fields in the One-Way Delay Measurement message header, and padding in
> the Remote Reset one. Both change struct sizes, hence the release note
> entries and the lack of a stable tag.
> 
> The rest completes the eCPRI V2.0 coverage of the header.
> 
> Mattias Rönnblom (5):
>   net: fix eCPRI delay measurement message header
>   net: fix eCPRI remote reset message header size
>   net: add missing eCPRI message field values
>   net: allow byte swapping eCPRI remote memory access
>   net: add eCPRI IWF message headers
> 
>  doc/guides/rel_notes/release_26_11.rst |   8 ++
>  lib/net/rte_ecpri.h                    | 164 +++++++++++++++++++++++--
>  2 files changed, 159 insertions(+), 13 deletions(-)

More detailed AI review (the CI one is really pretty dumb).
TLDR: missing/lack of deprecation notices.

Applied cleanly on c1a46b9 (26.11.0-rc0). Built with -Dwerror=true and
net/dpaa2 + net/bnxt enabled (the two in-tree consumers of the changed
structs) plus testpmd: no warnings. Per-commit compile of dpaa2_flow.c,
ulp_rte_parser.c and cmdline_flow.c at each of the five commits is also
clean, so the series is bisect safe.

Measured layouts after the series:

  rte_ecpri_msg_delay_measure  size=20 align=1
      msr_id=0 act_type=1 ts_sec=2 ts_nsec=8 comp_val=12
  rte_ecpri_msg_remote_reset   size= 3 align=1  rst_id=0 rst_op=2
  rte_ecpri_msg_rm_access      size=12 align=4  addr=4 length=10
  rte_ecpri_msg_iwf_up         size= 9 align=1
  rte_ecpri_msg_iwf_opt        size= 4 align=2
  rte_ecpri_msg_iwf_map        size= 4 align=2
  rte_ecpri_msg_iwf_dctrl      size=12 align=4
  rte_ecpri_combined_msg_hdr   size=24 align=4

Every size and offset claim in the commit messages and the release notes
holds, including "the layout, the size and the field access are all
unchanged" in 4/5 and "keeps its size" in 5/5. dummy[5] bounds the union
exactly again. The only in-tree users of dummy[] touch dummy[0], and the
offsetof() uses in dpaa2 land on unchanged offsets, so nothing breaks at
source level. The Fixes tag is correct: d164c609e70b is the commit that
added lib/librte_net/rte_ecpri.h along with the flow item.

Patch 1: net: fix eCPRI delay measurement message header

Error: ABI break with no deprecation notice. There is no eCPRI entry in
doc/guides/rel_notes/deprecation.rst, neither in this series nor in tree.
abi_policy.rst is explicit that the .11 breakage window "is *not*
permission to circumvent the other aspects of the procedures to make ABI
changes ... 3 ACKs of the requirement to break the ABI and the observance
of a deprecation notice are still mandatory". The ABI Changes template in
the release notes says the same thing ("which was announced in the
previous releases"). As posted this targets 27.11, not 26.11, unless the
techboard grants an exception.

Worth spelling out the concrete breakage in the notice, because this is
not just a formality. rte_flow_conv_copy() uses rte_flow_desc_item[].size,
which is sizeof(struct rte_flow_item_ecpri). That becomes 24 bytes, so a
new library memcpy()s 24 bytes out of a 16-byte spec allocated by an
application built against the old header, an 8-byte out-of-bounds read.
All existing field offsets are preserved, so that is the specific hazard
to cite.

Warning: the reason for the missing stable tag is only in the cover
letter, which is not preserved in git history. Someone doing LTS triage
later sees a Fixes tag with no Cc: stable@dpdk.org and no explanation.
Please move that reasoning into the commit message, and say plainly that
the bug stays live on the LTS branches because the fix cannot be
backported.

Info: the Compensation Value is documented here as "in units of 2^-16 ns"
while delay_a/delay_b in 5/5 are documented as "in 1/16 ns". Those differ
by a factor of 4096, so one of them looks like a typo.

Info: please add static_assert on the size, and ideally the alignment, of
the packed structs. rte_ether.h already does this:

  static_assert(sizeof(struct rte_ether_hdr) == 14, ...);
  static_assert(alignof(struct rte_ether_hdr) == 2, ...);

Three structs in this series now depend on __rte_packed_begin producing
20, 3 and 9 bytes respectively, and MSVC handles pragma pack and uint8_t
bitfields on its own terms. There is no eCPRI test anywhere in app/test,
so the wire layout is otherwise entirely unverified. This is the addition
I would most like to see.

Patch 2: net: fix eCPRI remote reset message header size

Error: same missing deprecation notice as 1/5.

Warning: same stable tag rationale as 1/5.

Patch 3: net: add missing eCPRI message field values

Warning: eleven new macros in an installed header with no release note.
One "New Features" entry covering the eCPRI V2.0 header completion, for
this patch and 5/5 together, would be enough.

Patch 5: net: add eCPRI IWF message headers

Warning: four new public structs and six new macros with no release note.
See 3/5.

Info: I could not verify the line_rate:5 / res:1 / s:1 / f:1 bit ordering
in rte_ecpri_msg_iwf_up against eCPRI V2.0 figure 31A. Please confirm that
byte. The uint8_t bitfields themselves are fine, rte_geneve.h and
rte_gtp.h set the precedent.

Info: 5/5 says the combined header keeps its size but does not say why
iwf_up is packed while the other three IWF structs are not. Without
packing it would be 12 bytes rather than 9. A sentence in the commit
message would save the next reader the arithmetic.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-04 16:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04  8:13 [RFC 0/5] fix and complete the eCPRI header Mattias Rönnblom
2026-08-04  8:13 ` [RFC 1/5] net: fix eCPRI delay measurement message header Mattias Rönnblom
2026-08-04  8:13 ` [RFC 2/5] net: fix eCPRI remote reset message header size Mattias Rönnblom
2026-08-04  8:13 ` [RFC 3/5] net: add missing eCPRI message field values Mattias Rönnblom
2026-08-04  8:13 ` [RFC 4/5] net: allow byte swapping eCPRI remote memory access Mattias Rönnblom
2026-08-04  8:13 ` [RFC 5/5] net: add eCPRI IWF message headers Mattias Rönnblom
2026-08-04 16:31 ` [RFC 0/5] fix and complete the eCPRI header Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox