P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
HashDistribution Struct Reference

Public Types

enum  {
  IMMEDIATE_HIGH = 1 << 0 , IMMEDIATE_LOW = 1 << 1 , METER_ADDRESS = 1 << 2 , STATISTICS_ADDRESS = 1 << 3 ,
  ACTION_DATA_ADDRESS = 1 << 4 , HASHMOD_DIVIDEND = 1 << 5
}
 
enum  delay_type_t { SELECTOR = 0 , OTHER = 1 }
 

Public Member Functions

 HashDistribution (int id, value_t &data, unsigned u=0)
 
bool compatible (HashDistribution *a)
 
void pass1 (Table *tbl, delay_type_t dt, bool nl)
 
void pass2 (Table *tbl)
 
template<class REGS>
void write_regs (REGS &regs, Table *)
 

Static Public Member Functions

static void parse (std::vector< HashDistribution > &out, const value_t &v, unsigned u=0)
 

Public Attributes

delay_type_t delay_type = SELECTOR
 
int expand = -1
 
int hash_group = -1
 
int id = -1
 
int lineno = -1
 
int mask = 0
 
int meter_mask_index = 0
 
bool meter_pre_color = false
 
bool non_linear = false
 
int shift = 0
 
Tabletbl = 0
 
unsigned xbar_use = 0