Logo
Explore Help
Sign In
mirror/xdp-project-bpf-examples
1
0
Fork 0
You've already forked xdp-project-bpf-examples
mirror of https://github.com/xdp-project/bpf-examples.git synced 2024-05-06 15:54:53 +00:00
Code Issues Projects Releases Wiki Activity
Files
configure-fixes
xdp-project-bpf-examples/pkt-loop-filter/bond-active.h

11 lines
210 B
C
Raw Permalink Normal View History

pkt-loop-filter: Add get-bond-active utility Add a small utility that uses a kprobe to extract the currently active slave ifindex from a bond interface. This value is normally only exported to userspace for bond types where it can be explicitly set, but the bond driver has an internal notion of an active interface regardless of the bond type. We can extract this value with a kprobe by attaching to a function in the bond driver and triggering an operation that causes this function to be called. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-06-28 19:57:47 +02:00
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef BOND_ACTIVE_H
#define BOND_ACTIVE_H
#include <bpf/libbpf.h>
int get_bond_active_ifindex(int bond_ifindex);
int get_netns_cookie(__u64 *cookie);
#endif
Reference in New Issue Copy Permalink
Powered by Gitea Page: 1514ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API