Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write MAC egress command at correct offset #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rajathshashidhara
Copy link

NOTE:

  • MAC_PREPEND_BYTES is defined as 4 bytes
    Packet contains 8 bytes of metadata (4B timestamp + 4B MAC ingress)
    Payload starts at PKT_NBI_OFFSET + 8 bytes
  • pkt_mac_egress_cmd_write() adds the cmd at offset - 4.
    offset must point to payload start (refer to flowenv/lib/pkt.h)
  • pkt_msd_write() accepts offset to payload (or the MAC egress command
    that may precede it). Length and Offset must include the MAC egress
    command that is prepended to payload.
  • Causes random packet corruption in TCP packets without this change!

Signed-off-by: Rajath Shashidhara [email protected]

NOTE:
- MAC_PREPEND_BYTES is defined as 4 bytes
  Packet contains 8 bytes of metadata (4B timestamp + 4B MAC ingress)
  Payload starts at PKT_NBI_OFFSET + 8 bytes
- pkt_mac_egress_cmd_write() adds the cmd at offset - 4.
  offset must point to payload start (refer to flowenv/lib/pkt.h)
- pkt_msd_write() accepts offset to payload (or the MAC egress command
  that may precede it). Length and Offset must include the MAC egress
  command that is prepended to payload.
- Causes random packet corruption in TCP packets without this change!

Signed-off-by: Rajath Shashidhara <[email protected]>
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.

1 participant