mirror of
https://github.com/vishvananda/netlink
synced 2025-02-16 12:06:49 +00:00
Add support for IFLA_XDP_PROG_ID
Allow to get IFLA_XDP_PROG_ID which will be part of Linux kernel 4.13+. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
parent
b1eba2e916
commit
8c5a115d79
1
link.go
1
link.go
@ -171,6 +171,7 @@ type LinkXdp struct {
|
||||
Fd int
|
||||
Attached bool
|
||||
Flags uint32
|
||||
ProgId uint32
|
||||
}
|
||||
|
||||
// Device links cannot be created via netlink. These links
|
||||
|
@ -1668,6 +1668,8 @@ func parseLinkXdp(data []byte) (*LinkXdp, error) {
|
||||
xdp.Attached = attr.Value[0] != 0
|
||||
case nl.IFLA_XDP_FLAGS:
|
||||
xdp.Flags = native.Uint32(attr.Value[0:4])
|
||||
case nl.IFLA_XDP_PROG_ID:
|
||||
xdp.ProgId = native.Uint32(attr.Value[0:4])
|
||||
}
|
||||
}
|
||||
return xdp, nil
|
||||
|
@ -424,7 +424,8 @@ const (
|
||||
IFLA_XDP_FD /* fd of xdp program to attach, or -1 to remove */
|
||||
IFLA_XDP_ATTACHED /* read-only bool indicating if prog is attached */
|
||||
IFLA_XDP_FLAGS /* xdp prog related flags */
|
||||
IFLA_XDP_MAX = IFLA_XDP_FLAGS
|
||||
IFLA_XDP_PROG_ID /* xdp prog id */
|
||||
IFLA_XDP_MAX = IFLA_XDP_PROG_ID
|
||||
)
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user