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

[QEO] Expanding struct sizes in the future #62

Open
mtfriesen opened this issue May 5, 2023 · 4 comments
Open

[QEO] Expanding struct sizes in the future #62

mtfriesen opened this issue May 5, 2023 · 4 comments
Labels
QEO Related to QUIC encryption/decryption offload

Comments

@mtfriesen
Copy link
Contributor

We pass an array of NDIS_QUIC_CONNECTION structs to NDIS. If we need to expand the size of the structure in the future, how does each NDIS component know how to walk the array?

IMO we should prefix each NDIS_QUIC_CONNECTION with a Size field at minimum, and perhaps a Version field. Thoughts?

@mtfriesen
Copy link
Contributor Author

The question is probably applicable to the Winsock structs, too.

@nibanks
Copy link
Member

nibanks commented May 9, 2023

I thought about this some, and I was thinking it was actually preferable to just have a different OID (i.e. *_V2) if we ever need to change the struct.

@nibanks nibanks added the QEO Related to QUIC encryption/decryption offload label May 9, 2023
@mtfriesen
Copy link
Contributor Author

We know that in the current implementation of Windows, at least, adding new direct OIDs is extremely expensive. We also have years of precedent from NDIS: NDIS structures are versioned. We introduce new OIDs when significant changes are made to an interface.

I'm not convinced that we should add a new OID any time we add a new crypto API, add some new compat flag, etc. It makes implementation and testing much harder.

@nibanks
Copy link
Member

nibanks commented May 9, 2023

Ok, then instead of adding a version to each connection, what about a top-level struct such as:

typedef struct QEO_CONNECTION_SET {
    UINT32 Version;
    UINT32 Count;
    QEO_CONNECTION Connections[0];
};

And version can be used to control possibly using QEO_CONNECTION_V2 in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QEO Related to QUIC encryption/decryption offload
Projects
None yet
Development

No branches or pull requests

2 participants