Test: Cover mt_mbuf_time_stamp RX offload dynfield path#1644
Open
DawidWesierski4 wants to merge 1 commit into
Open
Test: Cover mt_mbuf_time_stamp RX offload dynfield path#1644DawidWesierski4 wants to merge 1 commit into
DawidWesierski4 wants to merge 1 commit into
Conversation
Adds a unit gtest for the generic RTE_ETH_RX_OFFLOAD_TIMESTAMP mbuf dynfield path in mt_mbuf_time_stamp(), independent of ice's IEEE1588-specific packet_type/ol_flag markers. One case proves the dynfield value is returned correctly when MT_IF_FEATURE_RX_OFFLOAD_TIMESTAMP is set, even with none of the ice IEEE1588 markers present. A second proves the dynfield is ignored (falls back to mtl_ptp_read_time()) when the feature flag is absent, so the first case isn't vacuous. Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a unit gtest covering the generic
RTE_ETH_RX_OFFLOAD_TIMESTAMPmbufdynfield path in
mt_mbuf_time_stamp(), independent of ice'sIEEE1588-specific
packet_type/ol_flag markers (mb->timesync,RTE_MBUF_F_RX_IEEE1588_PTP/_TMST).Why
While reviewing an upstream DPDK
net/icepatch that removes thepacket_type == RTE_PTYPE_L2_ETHER_TIMESYNCgate around ice'sIEEE1588-specific RX timestamp path (because ice's ptype table never
actually produces that value, making the gate dead code), it became
useful to confirm MTL doesn't strictly depend on that ice-specific
mechanism for RX hardware timestamps:
mt_mbuf_time_stamp()alreadyhas a separate, unconditional path via the generic
RTE_ETH_RX_OFFLOAD_TIMESTAMPmbuf dynfield.Two cases:
CorrectWithoutIeee1588Markers— withMT_IF_FEATURE_RX_OFFLOAD_TIMESTAMPset,
mt_mbuf_time_stamp()returns the injected dynfield timestampexactly, even when the mbuf carries none of the ice IEEE1588 markers
(i.e. the state produced by unpatched upstream ice).
ZeroWithoutOffloadTimestampFeature— with the feature flag absent,the same dynfield value is ignored (falls back to
mtl_ptp_read_time()), proving the first case isn't vacuous.No
lib/changes — this is test-only, new coverage of existing,already-correct behavior.
Testing
Both cases pass across repeated runs.