From: Mattias Rönnblom <[email protected]>
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 <[email protected]>
---
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