mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
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>
24 lines
407 B
C
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
|