forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf: search for metadata casting in create link
This is third approach to implement informing driver about metadata used in XDP program. The same as in first one, searching for casting looks silly and probably decision about using metadata should be move to user application (second approach). Instead of searching for cast in program loading path do it in link creating path. From this context new field can be sent via ndo_bpf call to driver. Intorduce new metadata field in attributes structure. Instead of that we probably can reuse XDP flags, but as header with definition of flags isn't included in libbpf I decided to create new field. We also can include this header in libbpf (I think). This code assume that user uses bpf_program__attach_xdp to attach XDP program. It is used only in selftest code, so I haven't tested it yet. This is only idea, and also I think it will be better to move decision about using metadata to user. Because of that I will write sample used this function and test it when we decide that this approach is correct. Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
- Loading branch information
Showing
5 changed files
with
36 additions
and
5 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
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
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
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
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