Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*


  85 #define MATCH_IRE_TYPE          0x0001  /* Match IRE type */
  86 #define MATCH_IRE_MASK          0x0002  /* Match IRE mask */
  87 #define MATCH_IRE_SHORTERMASK   0x0004  /* A mask shorter than the argument */
  88 #define MATCH_IRE_GW            0x0008  /* Match IRE gateway */
  89 #define MATCH_IRE_ILL           0x0010  /* Match IRE on the ill */
  90 #define MATCH_IRE_ZONEONLY      0x0020  /* Match IREs in specified zone, ie */
  91                                         /* don't match IRE_LOCALs from other */
  92                                         /* zones or shared IREs */
  93 #define MATCH_IRE_SECATTR       0x0040  /* Match gateway security attributes */
  94 #define MATCH_IRE_TESTHIDDEN    0x0080  /* Match ire_testhidden IREs */
  95 #define MATCH_IRE_SRC_ILL       0x0100  /* ire_ill uses a src address on ill */
  96 #define MATCH_IRE_DIRECT        0x0200  /* Don't match indirect routes */
  97 
  98 #define MAX_IRE_RECURSION       4       /* Max IREs in ire_route_recursive */
  99 
 100 
 101 /*
 102  * We use atomics so that we get an accurate accounting on the ires.
 103  * Otherwise we can't determine leaks correctly.
 104  */
 105 #define BUMP_IRE_STATS(ire_stats, x) atomic_add_64(&(ire_stats).x, 1)
 106 
 107 #ifdef _KERNEL
 108 struct ts_label_s;
 109 struct nce_s;
 110 /*
 111  * structure for passing args between ire_ftable_lookup and ire_find_best_route
 112  */
 113 typedef struct ire_ftable_args_s {
 114         in6_addr_t              ift_addr_v6;
 115         in6_addr_t              ift_mask_v6;
 116         in6_addr_t              ift_gateway_v6;
 117 #define ift_addr                V4_PART_OF_V6(ift_addr_v6)
 118 #define ift_mask                V4_PART_OF_V6(ift_mask_v6)
 119 #define ift_gateway             V4_PART_OF_V6(ift_gateway_v6)
 120         int                     ift_type;
 121         const ill_t             *ift_ill;
 122         zoneid_t                ift_zoneid;
 123         const ts_label_t        *ift_tsl;
 124         int                     ift_flags;
 125         ire_t                   *ift_best_ire;




  85 #define MATCH_IRE_TYPE          0x0001  /* Match IRE type */
  86 #define MATCH_IRE_MASK          0x0002  /* Match IRE mask */
  87 #define MATCH_IRE_SHORTERMASK   0x0004  /* A mask shorter than the argument */
  88 #define MATCH_IRE_GW            0x0008  /* Match IRE gateway */
  89 #define MATCH_IRE_ILL           0x0010  /* Match IRE on the ill */
  90 #define MATCH_IRE_ZONEONLY      0x0020  /* Match IREs in specified zone, ie */
  91                                         /* don't match IRE_LOCALs from other */
  92                                         /* zones or shared IREs */
  93 #define MATCH_IRE_SECATTR       0x0040  /* Match gateway security attributes */
  94 #define MATCH_IRE_TESTHIDDEN    0x0080  /* Match ire_testhidden IREs */
  95 #define MATCH_IRE_SRC_ILL       0x0100  /* ire_ill uses a src address on ill */
  96 #define MATCH_IRE_DIRECT        0x0200  /* Don't match indirect routes */
  97 
  98 #define MAX_IRE_RECURSION       4       /* Max IREs in ire_route_recursive */
  99 
 100 
 101 /*
 102  * We use atomics so that we get an accurate accounting on the ires.
 103  * Otherwise we can't determine leaks correctly.
 104  */
 105 #define BUMP_IRE_STATS(ire_stats, x) atomic_inc_64(&(ire_stats).x)
 106 
 107 #ifdef _KERNEL
 108 struct ts_label_s;
 109 struct nce_s;
 110 /*
 111  * structure for passing args between ire_ftable_lookup and ire_find_best_route
 112  */
 113 typedef struct ire_ftable_args_s {
 114         in6_addr_t              ift_addr_v6;
 115         in6_addr_t              ift_mask_v6;
 116         in6_addr_t              ift_gateway_v6;
 117 #define ift_addr                V4_PART_OF_V6(ift_addr_v6)
 118 #define ift_mask                V4_PART_OF_V6(ift_mask_v6)
 119 #define ift_gateway             V4_PART_OF_V6(ift_gateway_v6)
 120         int                     ift_type;
 121         const ill_t             *ift_ill;
 122         zoneid_t                ift_zoneid;
 123         const ts_label_t        *ift_tsl;
 124         int                     ift_flags;
 125         ire_t                   *ift_best_ire;