Skip to content

modules/packet: fix tx capture when using hw offloads#586

Merged
cmyers-spirent merged 1 commit into
Spirent:masterfrom
cmyers-spirent:fix_tx_capture
May 12, 2026
Merged

modules/packet: fix tx capture when using hw offloads#586
cmyers-spirent merged 1 commit into
Spirent:masterfrom
cmyers-spirent:fix_tx_capture

Conversation

@cmyers-spirent
Copy link
Copy Markdown
Collaborator

The set_tx_offload_metadata() function clears all the offloads in the mbuf, so it should be done before setting the Tx sink metadata.

The set_tx_offload_metadata() function clears all the offloads
in the mbuf, so it should be done before setting the Tx sink metadata.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Tx capture metadata being cleared when hardware checksum/TCP segmentation offloads are enabled in the DPDK packet stack path. Since set_tx_offload_metadata() overwrites rte_mbuf::ol_flags, it must run before setting the Tx sink dynflag/metadata used by capture.

Changes:

  • Move mbuf_tx_sink_set() to occur after set_tx_offload_metadata() in net_interface::handle_tx().
  • Preserve Tx sink metadata for capture even when Tx offload metadata is applied.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cmyers-spirent cmyers-spirent merged commit 04aab8d into Spirent:master May 12, 2026
10 checks passed
@cmyers-spirent cmyers-spirent deleted the fix_tx_capture branch May 12, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants