Skip to content

Remove soon to be obsolete __rte_packed #674

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PlagueCZ
Copy link
Contributor

DPDK 25 obsoleted __rte_packed in favor of a (more compatible with MSVC) pair of __rte_packed_begin and __rte_packed_end as per this commit.

As a proposal of a solution I created this PR. The other solution would be to use both new macros, but they look worse than this solution, so basically this draft is a discussion PR.

Copy link
Collaborator

@guvenc guvenc left a comment

Choose a reason for hiding this comment

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

So the only drawback is that we would not be compilable with MSVC ?
Being compatible to MSVC would only cost us the readability ? I mean it is also not that bad we can see where the pack starts and ends ? or is there any other disadvantage then readability ?

@PlagueCZ
Copy link
Contributor Author

PlagueCZ commented May 6, 2025

The disadvantage would be, that by using the new macros, we cannot easily switch between DPDK24 and DPDK 25, we would need to always have the transitional commit for DPDK 25.

Other than that the new macro is not bad or anything.
We could then maybe create a commit on DPDK 24 that defines the start and end in an ifdef:

#ifndef __rte_packed_begin
#define __rte_packed_begin

and so on
than way we can switch DPDK whenever too

@guvenc
Copy link
Collaborator

guvenc commented May 6, 2025

Hmm. Can't we cherry pick this commit to DPDK 24.11 as part of the docker build process ? For DPDK 25, we can drop that cherry-pick ?

@PlagueCZ
Copy link
Contributor Author

PlagueCZ commented May 6, 2025

Not exactly as we still need to actually define __rte_packed there, but I get the idea, just another patch to DPDK as usual, that is also a solution

@guvenc
Copy link
Collaborator

guvenc commented May 6, 2025

Ok. I would suggest then that we start to use the new macro with start and end in dpservice as it is in DPDK 2025 and do a patch for 2024 DPDK with the ifndef as you suggested and that patch will be dropped when we switch to DPDK 2025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants