mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-25 23:00:14 +00:00
Follow-up to commitc7272ca720("bpf: add initial support for attaching xdp progs") to also support generic XDP. This adds an indicator for loaded generic XDP programs when programs are loaded as shown inc7272ca720, but the driver still lacks native XDP support. # ip link [...] 3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric qdisc [...] link/ether 0c:c4:7a:03:f9:25 brd ff:ff:ff:ff:ff:ff [...] In case the driver does support native XDP, but the user wants to load the program as generic XDP (e.g. for testing purposes), then this can be done with the same semantics as inc7272ca720, but with 'xdpgeneric' instead of 'xdp' command for loading: # ip -force link set dev eno1 xdpgeneric obj xdp.o Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: David S. Miller <davem@davemloft.net>
10 lines
197 B
C
10 lines
197 B
C
#ifndef __XDP__
|
|
#define __XDP__
|
|
|
|
#include "utils.h"
|
|
|
|
int xdp_parse(int *argc, char ***argv, struct iplink_req *req, bool generic);
|
|
void xdp_dump(FILE *fp, struct rtattr *tb);
|
|
|
|
#endif /* __XDP__ */
|