]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgpd.h
tests: ospf gr helper topotests with scapy.
[mirror_frr.git] / bgpd / bgpd.h
index f2c8ece024f478a7dc82a80b8eba50d9912d9bcc..d39743a152c0a727957049276661b52211e4a6b6 100644 (file)
@@ -44,7 +44,6 @@
 #include "bgp_labelpool.h"
 #include "bgp_addpath_types.h"
 #include "bgp_nexthop.h"
-#include "bgp_damp.h"
 #include "bgp_io.h"
 
 #include "lib/bfd.h"
@@ -464,38 +463,41 @@ struct bgp {
 #define BGP_FLAG_DETERMINISTIC_MED        (1 << 1)
 #define BGP_FLAG_MED_MISSING_AS_WORST     (1 << 2)
 #define BGP_FLAG_MED_CONFED               (1 << 3)
-#define BGP_FLAG_NO_DEFAULT_IPV4          (1 << 4)
-#define BGP_FLAG_NO_CLIENT_TO_CLIENT      (1 << 5)
-#define BGP_FLAG_COMPARE_ROUTER_ID        (1 << 7)
-#define BGP_FLAG_ASPATH_IGNORE            (1 << 8)
-#define BGP_FLAG_IMPORT_CHECK             (1 << 9)
-#define BGP_FLAG_NO_FAST_EXT_FAILOVER     (1 << 10)
-#define BGP_FLAG_LOG_NEIGHBOR_CHANGES     (1 << 11)
+#define BGP_FLAG_NO_CLIENT_TO_CLIENT (1 << 4)
+#define BGP_FLAG_COMPARE_ROUTER_ID (1 << 5)
+#define BGP_FLAG_ASPATH_IGNORE (1 << 6)
+#define BGP_FLAG_IMPORT_CHECK (1 << 7)
+#define BGP_FLAG_NO_FAST_EXT_FAILOVER (1 << 8)
+#define BGP_FLAG_LOG_NEIGHBOR_CHANGES (1 << 9)
 
 /* This flag is set when we have full BGP Graceful-Restart mode enable */
-#define BGP_FLAG_GRACEFUL_RESTART         (1 << 12)
-
-#define BGP_FLAG_ASPATH_CONFED            (1 << 13)
-#define BGP_FLAG_ASPATH_MULTIPATH_RELAX   (1 << 14)
-#define BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY (1 << 15)
-#define BGP_FLAG_DISABLE_NH_CONNECTED_CHK (1 << 16)
-#define BGP_FLAG_MULTIPATH_RELAX_AS_SET   (1 << 17)
-#define BGP_FLAG_FORCE_STATIC_PROCESS     (1 << 18)
-#define BGP_FLAG_SHOW_HOSTNAME            (1 << 19)
-#define BGP_FLAG_GR_PRESERVE_FWD          (1 << 20)
-#define BGP_FLAG_GRACEFUL_SHUTDOWN        (1 << 21)
-#define BGP_FLAG_DELETE_IN_PROGRESS       (1 << 22)
-#define BGP_FLAG_SELECT_DEFER_DISABLE     (1 << 23)
-#define BGP_FLAG_GR_DISABLE_EOR           (1 << 24)
-#define BGP_FLAG_EBGP_REQUIRES_POLICY     (1 << 25)
-#define BGP_FLAG_SHOW_NEXTHOP_HOSTNAME    (1 << 26)
+#define BGP_FLAG_GRACEFUL_RESTART (1 << 10)
+
+#define BGP_FLAG_ASPATH_CONFED (1 << 11)
+#define BGP_FLAG_ASPATH_MULTIPATH_RELAX (1 << 12)
+#define BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY (1 << 13)
+#define BGP_FLAG_DISABLE_NH_CONNECTED_CHK (1 << 14)
+#define BGP_FLAG_MULTIPATH_RELAX_AS_SET (1 << 15)
+#define BGP_FLAG_FORCE_STATIC_PROCESS (1 << 16)
+#define BGP_FLAG_SHOW_HOSTNAME (1 << 17)
+#define BGP_FLAG_GR_PRESERVE_FWD (1 << 18)
+#define BGP_FLAG_GRACEFUL_SHUTDOWN (1 << 19)
+#define BGP_FLAG_DELETE_IN_PROGRESS (1 << 20)
+#define BGP_FLAG_SELECT_DEFER_DISABLE (1 << 21)
+#define BGP_FLAG_GR_DISABLE_EOR (1 << 22)
+#define BGP_FLAG_EBGP_REQUIRES_POLICY (1 << 23)
+#define BGP_FLAG_SHOW_NEXTHOP_HOSTNAME (1 << 24)
 
 /* This flag is set if the instance is in administrative shutdown */
-#define BGP_FLAG_SHUTDOWN                 (1 << 27)
-#define BGP_FLAG_SUPPRESS_FIB_PENDING     (1 << 28)
-#define BGP_FLAG_SUPPRESS_DUPLICATES      (1 << 29)
-#define BGP_FLAG_DEFAULT_IPV6             (1 << 30)
-#define BGP_FLAG_PEERTYPE_MULTIPATH_RELAX (1 << 31)
+#define BGP_FLAG_SHUTDOWN (1 << 25)
+#define BGP_FLAG_SUPPRESS_FIB_PENDING (1 << 26)
+#define BGP_FLAG_SUPPRESS_DUPLICATES (1 << 27)
+#define BGP_FLAG_PEERTYPE_MULTIPATH_RELAX (1 << 29)
+
+       /* BGP default address-families.
+        * New peers inherit enabled afi/safis from bgp instance.
+        */
+       uint16_t default_af[AFI_MAX][SAFI_MAX];
 
        enum global_mode GLOBAL_GR_FSM[BGP_GLOBAL_GR_MODE]
                                      [BGP_GLOBAL_GR_EVENT_CMD];
@@ -640,6 +642,14 @@ struct bgp {
        /* EVI hash table */
        struct hash *vnihash;
 
+       /*
+        * VNI hash table based on SVI ifindex as its key.
+        * We use SVI ifindex as key to lookup a VNI table for gateway IP
+        * overlay index recursive lookup.
+        * For this purpose, a hashtable is added which optimizes this lookup.
+        */
+       struct hash *vni_svi_hash;
+
        /* EVPN enable - advertise gateway macip routes */
        int advertise_gw_macip;
 
@@ -685,6 +695,15 @@ struct bgp {
        /* Hash table of EVPN nexthops maintained per-tenant-VRF */
        struct hash *evpn_nh_table;
 
+       /*
+        * Flag resolve_overlay_index is used for recursive resolution
+        * procedures for EVPN type-5 route's gateway IP overlay index.
+        * When this flag is set, we build remote-ip-hash for
+        * all L2VNIs and resolve overlay index nexthops using this hash.
+        * Overlay index nexthops remain unresolved if this flag is not set.
+        */
+       bool resolve_overlay_index;
+
        /* vrf flags */
        uint32_t vrf_flags;
 #define BGP_VRF_AUTO                        (1 << 0)
@@ -728,12 +747,10 @@ struct bgp {
        struct work_queue *process_queue;
 
        /* BGP Conditional advertisement */
+       uint32_t condition_check_period;
        uint32_t condition_filter_count;
        struct thread *t_condition_check;
 
-       /* BGP route flap dampening configuration */
-       struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
-
        /* BGP VPN SRv6 backend */
        bool srv6_enabled;
        char srv6_locator_name[SRV6_LOCNAME_SIZE];
@@ -1293,9 +1310,6 @@ struct peer {
        /* Last update packet sent time */
        time_t pkt_stime[AFI_MAX][SAFI_MAX];
 
-       /* Peer / peer group route flap dampening configuration */
-       struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
-
        /* Peer Per AF flags */
        /*
         * Please consult the comments for *flags_override*, *flags_invert* and
@@ -1333,8 +1347,6 @@ struct peer {
 #define PEER_FLAG_SEND_LARGE_COMMUNITY      (1U << 26) /* Send large Communities */
 #define PEER_FLAG_MAX_PREFIX_OUT            (1U << 27) /* outgoing maximum prefix */
 #define PEER_FLAG_MAX_PREFIX_FORCE          (1U << 28) /* maximum-prefix <num> force */
-#define PEER_FLAG_CONFIG_DAMPENING (1U << 29) /* route flap dampening */
-
 
        enum bgp_addpath_strat addpath_type[AFI_MAX][SAFI_MAX];
 
@@ -1403,6 +1415,7 @@ struct peer {
        struct thread *t_gr_stale;
        struct thread *t_generate_updgrp_packets;
        struct thread *t_process_packet;
+       struct thread *t_process_packet_error;
        struct thread *t_refresh_stalepath;
 
        /* Thread flags. */