Files
xdp-project-bpf-examples/pkt-loop-filter/pkt-loop-filter.h
Toke Høiland-Jørgensen 4089679c07 pkt-loop-filter: Fix gratuitous ARP handling
The exception for gratuitous ARPs are only supposed to be for entries that
would otherwise be dropped due to the loop filtering logic. In addition, we
should record egress gratuitous ARPs and make sure they don't trigger the
exception when looping back (this is 'rule 4' of the openvswitch SLB
bonding logic).

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-07-14 23:45:01 +02:00

24 lines
407 B
C

#ifndef __PKT_LOOP_FILTER_H__
#define __PKT_LOOP_FILTER_H__
#define MAX_IFINDEXES 10
#define NS_PER_SEC 1000000000ULL
#define STATE_LIFETIME (10 * NS_PER_SEC)
#define LOCK_LIFETIME (5 * NS_PER_SEC)
struct pkt_loop_key {
__u8 src_mac[6];
__u16 src_vlan;
};
struct pkt_loop_data {
__u64 expiry_time;
__u64 lock_time;
__u32 ifindex;
__u32 drops;
};
#endif