24 #ifndef BM_BM_SIM_SIMPLE_PRE_LAG_H_
25 #define BM_BM_SIM_SIMPLE_PRE_LAG_H_
28 #include <unordered_map>
39 static constexpr
int LAG_MAX_ENTRIES = 256;
40 using lag_id_t = uint16_t;
42 McReturnCode mc_node_create(
const rid_t rid,
43 const PortMap &port_map,
44 const LagMap &lag_map,
46 McReturnCode mc_node_update(
const l1_hdl_t l1_hdl,
47 const PortMap &port_map,
48 const LagMap &lag_map);
50 McReturnCode mc_set_lag_membership(
const lag_id_t lag_index,
51 const PortMap &port_map);
53 std::string mc_get_entries()
const;
57 std::vector<McOut> replicate(
const McIn)
const;
61 uint16_t member_count;
65 LagEntry(uint16_t member_count,
const PortMap &port_map)
66 : member_count(member_count), port_map(port_map) {}
69 std::unordered_map<lag_id_t, LagEntry> lag_entries{};
74 #endif // BM_BM_SIM_SIMPLE_PRE_LAG_H_