Skip to content

Commit 96d03be

Browse files
author
Paolo Fittipaldi
committedDec 18, 2024·
Status to troubleshoot
1 parent 8efdfb2 commit 96d03be

File tree

10 files changed

+223
-58
lines changed

10 files changed

+223
-58
lines changed
 

‎quisp/messages/connection_setup_messages.msg

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ packet RequestRulesetTermination extends Header
6363
packet ReleaseResources extends Header
6464
{
6565
int qnic_addresses[] @getter(getQnicAddr) @appender(appendQnicAddr) @sizeGetter(getNumberOfQnicAddrs);
66-
}
66+
unsigned long RuleSet_id;
67+
}

‎quisp/modules/Common/Router.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ void Router::handleMessage(cMessage *msg) {
155155
send(pk, "cmPort$o");
156156
return;
157157
} else if (dest_addr == my_address && dynamic_cast<RequestRulesetTermination *>(msg)) {
158-
bubble("Ruleset Termination Request received");
159-
send(pk, "rePort$o");
160-
return;
158+
bubble("Ruleset Termination Request received");
159+
send(pk, "rePort$o");
160+
return;
161161
} else if (dest_addr == my_address && dynamic_cast<ReleaseResources *>(msg)) {
162-
bubble("Release Resources Request received");
163-
send(pk, "rePort$o");
164-
return;
162+
bubble("Release Resources Request received");
163+
send(pk, "rePort$o");
164+
return;
165165
}
166166

167167
// RoutingDaemon sends hello packet without desination specified
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Quick docs to troubleshoot teardown
2+
## The ReservationRegister
3+
To implement the teardown sequence, I started from the `ConnectionManager` (CM) and how it handles qnic reservations: before, reserved qnics' addresses were kept in a set and if an address was in that set the qnic was reserved.
4+
To track which RuleSet reserved which qnic, I introduced a `ReservationRegister` (RR) object which is essentially two maps: one with RuleSetID as key and set of qnic addresses as values, and the other with qnic address as key and RuleSetID as value. This allows the CM to create and delete reservations by qnic address and by ruleset id, and it also offers the possibility to change the ruleset id of an existing reservation, which will be useful in the connection setup phase. I wrote unit tests for the RR and it seems to work correctly.
5+
6+
## The ConnectionSetupRequestID
7+
Adding a Reservation Register means that in order to reserve a qnic we need to know which Ruleset is reserving it. However, qnic reservation is made during the connection setup phase, when the ruleset id is not yet known. To solve this issue, the ConnectionSetupRequestID (CSRqID) field was added to ConnectionSetupRequest(CSRq) messages. This ID is generated and added to CSRq messages when they are first enqueued at the Initiator's `ConnectionManager`. As the CSRq is relayed through repeaters, reservations are made in the ReservationRegister with the CSRqID as a provisional ID.
8+
9+
The CSRqID field was added to ConnectionSetupResponse (CSRp) messages as well: when generating the CSRp, the Responder includes both the RuleSetID as normal and the CSRqID. This way, nodes receiving the Response can update the reservations to the correct RuleSet ID. The reservation process is now complete.
10+
11+
## The ConnectionTeardown messages
12+
The ConnectionTeardown (CTD) messages are generated and cached by the Responder in the connection response phase, at the same time when the CSRp is generated.
13+
When the RuleSet is terminated, the Responder sends ConnectionTeardown (CTD) messages to all the nodes in the path.
14+
15+
Pre-generating and caching the CTD has two advantages:
16+
we are sure that only the Responder has CTD messages to send (this is probably a weakness for future multiparty implementations) and
17+
we generate the CTD at a point where we are aware of all relevant information (Ruleset ID, partners' addresses).
18+
The messages will be sent once the Ruleset is terminated.
19+
20+
## Actually Terminating Connections
21+
Inside the RuleEngine, the `execAllRulesets()` call was modified: originally it looped `exec()` for all the existing Runtimes, while now it also collects the RulesetIDs from the terminated Runtimes.
22+
These are the IDs of the connections that need to be torn down. These IDs are relayed to the CM through an InternalTerminatedRulesetIdsNotifier message, which now knows some rulesets are terminated and the connections needs to be torn down.
23+
IF any CTD messages are available in cache for the terminated rulesets (i.e. this node was the responder for the connection in object), they are sent out. Otherwise, the node does nothing.
24+
25+
## Reception and Handling of the ConnectionTeardown messages
26+
27+
When a CM receives a CTD message, it does three things:
28+
### Request Termination of Swapping RuleSets
29+
The rulesets that repeaters use for entanglement swapping do not have an explicit termination condition. Therefore, there needs to exist an external termination mechanism for them:
30+
the CM sends a RequestRulesetTermination (RRT) with the ID that's being torn down to the RuleEngine, who checks if the relevant Ruleset is already terminated.
31+
If not, the `terminated` flag of the relevant Runtime is set to true so that execution of entanglement swapping stops.
32+
### Order the RuleEngine to deallocate the resources
33+
A ReleaseResources message containing the qnic addresses to release and the corresponding Ruleset ID is sent to the RuleEngine.
34+
Upon reception of this message, the RuleEngine is to free up resources allocated to the Ruleset in question (more detail later).
35+
### Remove the Reservation
36+
The reservation is finally removed from the Reservation Register: a new connection can be accepted now.
37+
38+
## Deallocation of Resources
39+
Throughout the simulation, whenever a new entangled pair is generated, it is allocated to a RuleSet. Such allocation must be reverted at teardown time.
40+
Interaction with entangled pairs at the RuleEngine level is done through the `BellPairStore` object, by requesting the range of local qubits that are entangled with a given partner.
41+
For the RuleEngine to have this information, a `partners_register` map was introduced. The keys are RuleSetIDs and the values are vectors of addresses of all the potential partners involved in the RuleSet (Swappers and endnodes).
42+
This map is populated by the acceptRuleset methods and depopulated when deallocating resource.
43+
44+
When the ReleaseResources message arrives, the following pseudocode is run:
45+
```
46+
partners = ReleaseResourcesMessage.RuleSetID;
47+
for qnic_addr in ReleaseResourcesMessage:
48+
stopPhotonEmission();
49+
freeFailedEntanglementAttempts();
50+
for partner in partners:
51+
for pair in bell_pair_store.getPairs(partner):
52+
if (pair.isAllocated) pair.setAllocated(false);
53+
```
54+
55+
# The Problem
56+
When running the MM simulation test, all seems to work properly. Running the simulation and inspecting the memories from the simulation view shows that all of them are freed after old connections are torn down and before new ones are negotiated.
57+
The simulation ends after roughly 4M events, which is consistent with expectations.
58+
59+
However, with the Swapping tests (especially the 3 node one), there seems to be a problem I cannot pin down.
60+
After every connection is torn down, there seem to be some qubits in the QNICs that remain busy and are never freed. This can be observed by running the simulation until e.g. t = 13s and inspecting the StationaryQubits inside the qnics: a couple of them will have last emission time around 10s, which shouldn't be the case since there was a CSRq at 12s. (In the MM case, at this point every qubit has last emission time > 12s).
61+
I even tried hardcoding the number of QNIC slots, looping through them and deallocating (or even reinitializing) everything but it still doesn't work.
62+
After a couple connections, the stuck qubits are too many, the RuleSet never reaches termination and the simulation ends.
63+
What I observe at the end is that the qnics in the link are P--FE--E (E = empty, P = partially filled, F = full).

‎quisp/modules/QRSA/HardwareMonitor/HardwareMonitor.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ void HardwareMonitor::handleMessage(cMessage *msg) {
146146

147147
// RuleSets sent for this node and the partner node.
148148
unsigned long ruleset_id = createUniqueId();
149-
makeQnicReservationForTomography(my_address, partner_address, my_qnic_info->qnic.address, ruleset_id,true);
149+
makeQnicReservationForTomography(my_address, partner_address, my_qnic_info->qnic.address, ruleset_id, true);
150150
sendLinkTomographyRuleSet(my_address, partner_address, my_qnic_info->qnic.type, my_qnic_info->qnic.index, ruleset_id);
151151

152152
QNIC_type partner_qnic_type = ack->getQnic_type();
153153
int partner_qnic_index = ack->getQnic_index();
154-
makeQnicReservationForTomography(partner_address, my_address, ack->getQnicAddr(), ruleset_id,false);
154+
makeQnicReservationForTomography(partner_address, my_address, ack->getQnicAddr(), ruleset_id, false);
155155
sendLinkTomographyRuleSet(partner_address, my_address, partner_qnic_type, partner_qnic_index, ruleset_id);
156156
delete ack;
157157
return;

‎quisp/modules/QRSA/RuleEngine/RuleEngine.cc

+57-43
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ void RuleEngine::handleMessage(cMessage *msg) {
150150
} else if (auto *pk = dynamic_cast<LinkTomographyRuleSet *>(msg)) {
151151
auto *ruleset = pk->getRuleSet();
152152
runtimes.acceptRuleSet(ruleset->construct());
153+
auto partners = runtimes.findById(ruleset->ruleset_id)->partners; // This is not yet coded in the best way. It was an attempt at a solution but it does not fully work.
154+
std::set<int> partners_cast;
155+
for (auto partner : partners) {
156+
partners_cast.insert(partner.val);
157+
}
158+
partners_register.emplace(ruleset->ruleset_id, partners_cast);
153159
} else if (auto *pkt = dynamic_cast<PurificationResult *>(msg)) {
154160
handlePurificationResult(pkt);
155161
} else if (auto *pkt = dynamic_cast<SwappingResult *>(msg)) {
@@ -161,24 +167,24 @@ void RuleEngine::handleMessage(cMessage *msg) {
161167
RuleSet ruleset(0, 0);
162168
ruleset.deserialize_json(serialized_ruleset);
163169
runtimes.acceptRuleSet(ruleset.construct());
170+
auto partners = runtimes.findById(ruleset.ruleset_id)->partners;
171+
std::set<int> partners_cast; // This is not yet coded in the best way. It was an attempt at a solution but it does not fully work.
172+
for (auto partner : partners) {
173+
partners_cast.insert(partner.val);
174+
}
175+
partners_register.emplace(ruleset.ruleset_id, partners_cast);
164176
} else if (auto *pkt = dynamic_cast<InternalRuleSetForwarding_Application *>(msg)) {
165177
if (pkt->getApplication_type() != 0) error("This application is not recognized yet");
166178
auto serialized_ruleset = pkt->getRuleSet();
167179
RuleSet ruleset(0, 0);
168180
ruleset.deserialize_json(serialized_ruleset);
169181
runtimes.acceptRuleSet(ruleset.construct());
170-
} else if (auto *pkt = dynamic_cast<InternalRuleSetForwarding *>(msg)) {
171-
// add actual process
172-
auto serialized_ruleset = pkt->getRuleSet();
173-
RuleSet ruleset(0, 0);
174-
ruleset.deserialize_json(serialized_ruleset);
175-
runtimes.acceptRuleSet(ruleset.construct());
176-
} else if (auto *pkt = dynamic_cast<InternalRuleSetForwarding_Application *>(msg)) {
177-
if (pkt->getApplication_type() != 0) error("This application is not recognized yet");
178-
auto serialized_ruleset = pkt->getRuleSet();
179-
RuleSet ruleset(0, 0);
180-
ruleset.deserialize_json(serialized_ruleset);
181-
runtimes.acceptRuleSet(ruleset.construct());
182+
auto partners = runtimes.findById(ruleset.ruleset_id)->partners;
183+
std::set<int> partners_cast; // This is not yet coded in the best way. It was an attempt at a solution but it does not fully work.
184+
for (auto partner : partners) {
185+
partners_cast.insert(partner.val);
186+
}
187+
partners_register.emplace(ruleset.ruleset_id, partners_cast);
182188
} else if (auto *pkt = dynamic_cast<StopEmitting *>(msg)) {
183189
handleStopEmitting(pkt);
184190
} else if (auto *pkt = dynamic_cast<RequestRulesetTermination *>(msg)) {
@@ -358,24 +364,24 @@ void RuleEngine::handleSwappingResult(SwappingResult *result) {
358364
// Allocates those resources to a particular ruleset, from top to bottom (all of it).
359365
void RuleEngine::ResourceAllocation(int qnic_type, int qnic_index) {
360366
for (auto &runtime : runtimes) {
361-
if (!runtime.terminated) {
362-
auto &partners = runtime.partners;
363-
for (auto &partner_addr : partners) {
364-
auto range = bell_pair_store.getBellPairsRange((QNIC_type)qnic_type, qnic_index, partner_addr.val);
365-
for (auto it = range.first; it != range.second; ++it) {
366-
auto qubit_record = it->second;
367-
368-
// 3. if the qubit is not allocated yet, and the qubit has not been allocated to this rule,
369-
// if the qubit has already been assigned to the rule, the qubit is not allocatable to that rule
370-
if (!qubit_record->isAllocated()) { //&& !qubit_record->isRuleApplied((*rule)->rule_id
371-
qubit_record->setAllocated(true);
372-
runtime.assignQubitToRuleSet(partner_addr, qubit_record);
367+
if (!runtime.terminated) {
368+
auto &partners = runtime.partners;
369+
for (auto &partner_addr : partners) {
370+
auto range = bell_pair_store.getBellPairsRange((QNIC_type)qnic_type, qnic_index, partner_addr.val);
371+
for (auto it = range.first; it != range.second; ++it) {
372+
auto qubit_record = it->second;
373+
374+
// 3. if the qubit is not allocated yet, and the qubit has not been allocated to this rule,
375+
// if the qubit has already been assigned to the rule, the qubit is not allocatable to that rule
376+
if (!qubit_record->isAllocated()) { //&& !qubit_record->isRuleApplied((*rule)->rule_id
377+
qubit_record->setAllocated(true);
378+
runtime.assignQubitToRuleSet(partner_addr, qubit_record);
379+
}
373380
}
374381
}
375382
}
376383
}
377384
}
378-
}
379385
void RuleEngine::executeAllRuleSets() {
380386
runtimes.exec();
381387
const auto &terminated_rulesets_ids = runtimes.getTerminatedRulesetIds();
@@ -386,7 +392,7 @@ void RuleEngine::executeAllRuleSets() {
386392

387393
void RuleEngine::freeConsumedResource(int qnic_index /*Not the address!!!*/, IStationaryQubit *qubit, QNIC_type qnic_type) {
388394
auto *qubit_record = qnic_store->getQubitRecord(qnic_type, qnic_index, qubit->par("stationary_qubit_address"));
389-
realtime_controller->ReInitialize_StationaryQubit(qubit_record, true);
395+
realtime_controller->ReInitialize_StationaryQubit(qubit_record, false);
390396
qubit_record->setBusy(false);
391397
if (qubit_record->isAllocated()) {
392398
qubit_record->setAllocated(false);
@@ -404,27 +410,35 @@ void RuleEngine::sendTerminatedRulesetIds(const std::vector<unsigned long> &term
404410
send(pkt, "RouterPort$o");
405411
}
406412

407-
std::pair<QNIC_type,int> RuleEngine::qnicAddrToQnicTypeAndIndex(int qnic_addr) {
408-
if (qnic_addr < number_of_qnics) return std::pair<QNIC_type,int>(QNIC_E,qnic_addr);
409-
else if (qnic_addr < number_of_qnics + number_of_qnics_r) return std::pair<QNIC_type,int>(QNIC_R,qnic_addr - number_of_qnics);
410-
else if (qnic_addr < number_of_qnics + number_of_qnics_r + number_of_qnics_rp) return std::pair<QNIC_type,int>(QNIC_RP,qnic_addr - number_of_qnics - number_of_qnics_r);
411-
else error("QNIC address out of bounds");
413+
std::pair<QNIC_type, int> RuleEngine::qnicAddrToQnicTypeAndIndex(int qnic_addr) {
414+
if (qnic_addr < number_of_qnics)
415+
return std::pair<QNIC_type, int>(QNIC_E, qnic_addr);
416+
else if (qnic_addr < number_of_qnics + number_of_qnics_r)
417+
return std::pair<QNIC_type, int>(QNIC_R, qnic_addr - number_of_qnics);
418+
else if (qnic_addr < number_of_qnics + number_of_qnics_r + number_of_qnics_rp)
419+
return std::pair<QNIC_type, int>(QNIC_RP, qnic_addr - number_of_qnics - number_of_qnics_r);
420+
else
421+
error("QNIC address out of bounds");
412422
}
413423

414-
void RuleEngine::releaseResources(ReleaseResources* rel) {
415-
int number_of_qnics_to_release = rel->getNumberOfQnicAddrs();
416-
for (int it = 0; it < number_of_qnics_to_release; it++) {
417-
auto [qnic_type, qnic_index] = qnicAddrToQnicTypeAndIndex(rel->getQnicAddr(it));
418-
stopOnGoingPhotonEmission(qnic_type,qnic_index);
419-
auto &emitted_indices = emitted_photon_order_map[{qnic_type, qnic_index}];
420-
for (auto qubit_index : emitted_indices) {
421-
realtime_controller->ReInitialize_StationaryQubit(qnic_index, qubit_index, qnic_type, false);
422-
qnic_store->setQubitBusy(qnic_type, qnic_index, qubit_index, false);
423-
if (qnic_store->getQubitRecord(qnic_type, qnic_index, qubit_index)->isAllocated()) qnic_store->getQubitRecord(qnic_type, qnic_index, qubit_index)->setAllocated(false);
424+
void RuleEngine::releaseResources(ReleaseResources *rel) {
425+
int number_of_qnics_to_release = rel->getNumberOfQnicAddrs();
426+
auto &partners = partners_register.at(rel->getRuleSet_id());
427+
for (int itr_qnicaddr = 0; itr_qnicaddr < number_of_qnics_to_release; itr_qnicaddr++) {
428+
auto [qnic_type, qnic_index] = qnicAddrToQnicTypeAndIndex(rel->getQnicAddr(itr_qnicaddr));
429+
stopOnGoingPhotonEmission(qnic_type, qnic_index);
430+
freeFailedEntanglementAttemptQubits(qnic_type, qnic_index);
431+
for (auto partner_addr : partners) {
432+
auto range = bell_pair_store.getBellPairsRange(qnic_type, qnic_index, partner_addr);
433+
for (auto it = range.first; it != range.second; ++it) {
434+
auto qubit_record = it->second;
435+
if (qubit_record->isAllocated()) {
436+
qubit_record->setAllocated(false);
437+
}
424438
}
425-
emitted_indices.clear();
426439
}
440+
}
441+
partners_register.erase(rel->getRuleSet_id());
427442
}
428443

429-
430444
} // namespace quisp::modules

‎quisp/modules/QRSA/RuleEngine/RuleEngine.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class RuleEngine : public IRuleEngine, public Logger::LoggerBase {
9393
void scheduleMSMPhotonEmission(QNIC_type qnic_type, int qnic_index, messages::EPPSTimingNotification *notification);
9494
void handleStopEmitting(messages::StopEmitting *stop_emit);
9595
void sendTerminatedRulesetIds(const std::vector<unsigned long> &terminated_rulesets_ids);
96-
std::pair<QNIC_type,int> qnicAddrToQnicTypeAndIndex(int qnic_addr);
97-
void releaseResources(messages::ReleaseResources* rel);
96+
std::pair<QNIC_type, int> qnicAddrToQnicTypeAndIndex(int qnic_addr);
97+
std::map<unsigned long, std::set<int>> partners_register;
98+
void releaseResources(messages::ReleaseResources *rel);
9899

99100
utils::ComponentProvider provider;
100101
std::unique_ptr<IQNicStore> qnic_store = nullptr;

‎quisp/runtime/RuntimeManager.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ void RuntimeManager::exec() {
3030
}
3131

3232
void RuntimeManager::terminateRuleset(unsigned long ruleset_id) {
33-
auto *rst = findById(ruleset_id);
34-
if (rst != nullptr and !rst->terminated) {
33+
auto *rst = findById(ruleset_id);
34+
if (rst != nullptr and !rst->terminated) {
3535
rst->terminated = true;
36-
//terminated_rulesets.push_back(ruleset_id);
37-
}
36+
// terminated_rulesets.push_back(ruleset_id);
37+
}
3838
}
3939

4040
std::vector<Runtime>::iterator RuntimeManager::begin() { return runtimes.begin(); }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[General]
2+
seed-set = 1
3+
sim-time-limit = 20s
4+
**.initial_notification_timing_buffer = 10s # when to start the BSA timing notification.
5+
**.app.request_generation_interval = 2s
6+
**.logger.enabled_log = false
7+
**.logger.log_filename = "networks/${resultdir}/${configname}-${runnumber}.jsonl"
8+
**.tomography_output_filename = "${resultdir}/${configname}.output"
9+
**.statistic-recording = false
10+
**.scalar-recording = false
11+
**.vector-recording = false
12+
**.speed_of_light_in_fiber = 208189.206944km
13+
14+
**.channel_loss_rate = 0
15+
**.channel_x_error_rate = 0
16+
**.channel_z_error_rate = 0
17+
**.channel_y_error_rate = 0
18+
19+
**.collection_efficiency = 1
20+
**.darkcount_probability = 0
21+
**.detection_efficiency = 1
22+
**.indistinguishable_time_window = 1.5ns
23+
**.photon_detection_per_second = 1000000
24+
25+
**.x_gate_error_rate = 0
26+
**.x_gate_x_error_ratio = 0
27+
**.x_gate_y_error_ratio = 0
28+
**.x_gate_z_error_ratio = 0
29+
30+
**.z_gate_error_rate = 0
31+
**.z_gate_x_error_ratio = 0
32+
**.z_gate_y_error_ratio = 0
33+
**.z_gate_z_error_ratio = 0
34+
35+
**.cnot_gate_error_rate = 0
36+
**.cnot_gate_iz_error_ratio = 0
37+
**.cnot_gate_zi_error_ratio = 0
38+
**.cnot_gate_zz_error_ratio = 0
39+
**.cnot_gate_ix_error_ratio = 0
40+
**.cnot_gate_xi_error_ratio = 0
41+
**.cnot_gate_xx_error_ratio = 0
42+
**.cnot_gate_iy_error_ratio = 0
43+
**.cnot_gate_yi_error_ratio = 0
44+
**.cnot_gate_yy_error_ratio = 0
45+
46+
**.memory_x_error_rate = 0
47+
**.memory_y_error_rate = 0
48+
**.memory_z_error_rate = 0
49+
**.memory_energy_excitation_rate = 0
50+
**.memory_energy_relaxation_rate = 0
51+
**.memory_completely_mixed_rate = 0
52+
53+
**.x_measurement_error_rate = 0
54+
**.z_measurement_error_rate = 0
55+
**.y_measurement_error_rate = 0
56+
57+
**.app.number_of_bellpair = 10000
58+
**.buffers = 100
59+
**.qrsa.hm.num_measure = 10000
60+
61+
[Config NoErrorMM_WORKING]
62+
network = networks.Simple_MM
63+
**.qrsa.hm.link_tomography = true
64+
**.EndNode1.is_initiator = true
65+
**.qrsa.hm.initial_purification = 0
66+
**.qrsa.hm.purification_type = ""
67+
68+
[Config Entanglement_Swapping_MM_3_Nodes_BROKEN]
69+
network = networks.three_node_MM
70+
seed-set = 0
71+
**.app.number_of_bellpair = 1000
72+
*.EndNode1.is_initiator = true
73+
**.buffers = 6
74+
**.link_tomography = false
75+
**.initial_purification = 0
76+
**.qrsa.hm.purification_type = ""
77+

‎quisp/utils/ReservationRegister.cc

+8
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ const std::set<int> ReservationRegister::getReservedQnics(unsigned long ruleset_
7878
return search->second;
7979
}
8080

81+
const unsigned long ReservationRegister::getReservingRuleset(int qnic_addr) {
82+
auto search = qnic_addr_to_ruleset_id.find(qnic_addr);
83+
if (search == qnic_addr_to_ruleset_id.end()) {
84+
throw cRuntimeError("No rulesets reserving this qnic!");
85+
} else
86+
return search->second;
87+
}
88+
8189
const int ReservationRegister::getRsidToQnicAddrMapSize() const { return ruleset_id_to_qnic_addrs.size(); };
8290
const int ReservationRegister::getQnicAddrToRsidMapSize() const { return qnic_addr_to_ruleset_id.size(); };
8391
const std::map<unsigned long, std::set<int>>& ReservationRegister::getRsidToQnicAddrMap() const { return ruleset_id_to_qnic_addrs; };

‎quisp/utils/ReservationRegister.h

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class ReservationRegister {
2828
const int getQnicAddrToRsidMapSize() const;
2929
const std::map<unsigned long, std::set<int>>& getRsidToQnicAddrMap() const;
3030
const std::map<int, unsigned long>& getQnicAddrToRsidMap() const;
31+
const unsigned long getReservingRuleset(int qnic_addr);
3132

3233
private:
3334
std::map<unsigned long, std::set<int>> ruleset_id_to_qnic_addrs;

0 commit comments

Comments
 (0)
Please sign in to comment.