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

net: include xdp generic metadata definition #5

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions include/net/xdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ struct xdp_buff {
u32 frame_sz; /* frame size to deduce data_hard_end/reserved tailroom*/
};

struct xdp_meta_generic {
// Tx part
u32 flags;
u16 free_slot;
u16 csum_off;
u16 txcvid;

// Rx part
u16 rxcvid;
u32 csum;
u32 hash;
u64 tstamp;

// BTF ID
u32 btf_id;
} __packed __aligned(8);
static_assert(sizeof(struct xdp_meta_generic) == 32);

static __always_inline void
xdp_init_buff(struct xdp_buff *xdp, u32 frame_sz, struct xdp_rxq_info *rxq)
{
Expand Down