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

Modify gtp5g_genl_family definition to support kernel verion >= 6.2. #88

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

RobertttBS
Copy link
Contributor

@RobertttBS RobertttBS commented Jan 24, 2024

If we are using Linux kernel version 6.2 or higher, we need to add .resv_start_op = GTP5G_ATTR_MAX, at the end of the gtp5g_genl_family definition in src/genl/genl.c. I have tested this with the free5gc core network and ubuntu (kernel 6.2.11).

@@ -179,4 +179,5 @@ struct genl_family gtp5g_genl_family __ro_after_init = {
.n_ops = ARRAY_SIZE(gtp5g_genl_ops),
.mcgrps = gtp5g_genl_mcgrps,
.n_mcgrps = ARRAY_SIZE(gtp5g_genl_mcgrps),
.resv_start_op = GTP5G_ATTR_MAX,
Copy link
Contributor

@chen042531 chen042531 Jan 24, 2024

Choose a reason for hiding this comment

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

#include <linux/version.h>

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
.resv_start_op = GTP5G_ATTR_MAX,
#endif

Please add condition

@tim-ywliu tim-ywliu merged commit 41f8a14 into free5gc:master Jan 24, 2024
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.

3 participants