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

What do crypto offsets apply to? Packet as parsed, or packet after deparsing? #85

Open
jfingerh opened this issue Nov 14, 2022 · 0 comments

Comments

@jfingerh
Copy link
Contributor

jfingerh commented Nov 14, 2022

@pbhide

I am guessing the intent is that these methods take parameter values that are offsets from the beginning of the packet, in units of bytes? If so, it would be good to document them that way explicitly:

void set_auth_data_offset<T>(in T offset);
void set_icv_offset<T>(in T offset);
void set_payload_len<T>(in T len);

If that is correct, then is the intent that these offsets are for the packet:

  • as it arrived as input to the parser?
  • as it leaves the deparser?

My guess is "as it leaves the deparser" is easier for the offload engine to deal with, since then it does not need to have special logic to deal with changes in offsets during deparsing, e.g. because new headers are added, and/or some existing headers are removed.

In any case, documenting this explicitly would be good.

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

No branches or pull requests

1 participant