31 std::string partition_field_name =
"";
32 unsigned alpm_atcam_table_handle = 0;
33 unsigned alpm_pre_classifier_table_handle = 0;
34 std::set<unsigned> set_partition_action_handle;
36 json::map *alpm_pre_classifier_table_cfg = 0;
41 std::string name, preferred_match_type;
42 std::string stage_table_type;
44 bool explicit_size =
false;
50 bool disable_atomic_modify =
false;
52 std::string match_type, action_profile, how_referenced;
63 enum alpm_type { PreClassifier = 1, Atcam = 2 };
64 static const char *type_name[];
67 static std::map<unsigned, P4Table *> by_handle;
68 static std::map<type, std::map<std::string, P4Table *>> by_name;
69 static unsigned max_handle[];
72 static P4Table *get(type t, VECTOR(
pair_t) & d);
73 static P4Table *alloc(type t,
Table *tbl);
74 void check(
Table *tbl);
75 const char *p4_name()
const {
return name.empty() ? nullptr : name.c_str(); }
76 unsigned get_handle() {
return handle; }
77 unsigned p4_size() {
return size; }
78 std::string p4_stage_table_type() {
return stage_table_type; }
80 void base_alpm_tbl_cfg(
json::map &out,
int size,
const Table *table,
81 P4Table::alpm_type atype)
const;
82 bool is_alpm()
const {
83 if (match_type ==
"alpm")
return true;
86 void set_partition_action_handle(
unsigned handle);
87 void set_partition_field_name(std::string name);
88 std::string get_partition_field_name()
const;
89 std::set<unsigned> get_partition_action_handle()
const;
90 unsigned get_alpm_atcam_table_handle()
const;
91 static std::string direction_name(gress_t);