forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net, xdp: add basic generic metadata accessors
As all of the fields in the generic XDP metadata structure have explicit Endianness, it's worth to provide some basic helpers. Add get and set accessors for each field and get, set and rep accessors for each bitfield of ::{rx,tx}_flags. rep are for the cases when it's unknown whether a flags field is clear, so they effectively replace the value in a bitfield instead of just ORing. Also add a couple of helpers: to get a pointer to the generic metadata structure and check whether a given metadata is generic compatible. Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
- Loading branch information
Showing
1 changed file
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters