blob: 41ad9099e0381be04fdc631452f6023739165fad [file] [log] [blame]
Gilbert Chen44524a52022-02-14 12:12:25 +00001#include "config.h"
2
Tom Josephfb3bc062021-08-17 07:48:11 -07003#include "mctp_endpoint_discovery.hpp"
4
Tom Josephfb3bc062021-08-17 07:48:11 -07005#include "common/types.hpp"
6#include "common/utils.hpp"
7
Thu Nguyen90274972024-07-17 07:02:16 +00008#include <linux/mctp.h>
9
Gilbert Chen44524a52022-02-14 12:12:25 +000010#include <phosphor-logging/lg2.hpp>
11
Tom Josephfb3bc062021-08-17 07:48:11 -070012#include <algorithm>
Gilbert Chen44524a52022-02-14 12:12:25 +000013#include <fstream>
14#include <iostream>
Tom Josephfb3bc062021-08-17 07:48:11 -070015#include <map>
16#include <string>
17#include <string_view>
18#include <vector>
19
Gilbert Chen44524a52022-02-14 12:12:25 +000020using namespace sdbusplus::bus::match::rules;
21
22PHOSPHOR_LOG2_USING;
23
Tom Josephfb3bc062021-08-17 07:48:11 -070024namespace pldm
25{
Gilbert Chen44524a52022-02-14 12:12:25 +000026MctpDiscovery::MctpDiscovery(
Patrick Williamsba741d52024-05-08 02:32:10 -050027 sdbusplus::bus_t& bus,
Gilbert Chen44524a52022-02-14 12:12:25 +000028 std::initializer_list<MctpDiscoveryHandlerIntf*> list) :
Eric Yang70eca962025-05-11 01:48:15 +080029 bus(bus),
30 mctpEndpointAddedSignal(
31 bus, interfacesAdded(MCTPPath),
32 [this](sdbusplus::message_t& msg) { this->discoverEndpoints(msg); }),
Gilbert Chen44524a52022-02-14 12:12:25 +000033 mctpEndpointRemovedSignal(
34 bus, interfacesRemoved(MCTPPath),
Eric Yang70eca962025-05-11 01:48:15 +080035 [this](sdbusplus::message_t& msg) { this->removeEndpoints(msg); }),
Chau Ly75e00422024-03-19 12:33:08 +000036 mctpEndpointPropChangedSignal(
37 bus, propertiesChangedNamespace(MCTPPath, MCTPInterfaceCC),
Eric Yang70eca962025-05-11 01:48:15 +080038 [this](sdbusplus::message_t& msg) { this->propertiesChangedCb(msg); }),
Gilbert Chen44524a52022-02-14 12:12:25 +000039 handlers(list)
Tom Josephfb3bc062021-08-17 07:48:11 -070040{
Chau Ly75e00422024-03-19 12:33:08 +000041 std::map<MctpInfo, Availability> currentMctpInfoMap;
42 getMctpInfos(currentMctpInfoMap);
43 for (const auto& mapIt : currentMctpInfoMap)
44 {
45 if (mapIt.second)
46 {
47 // Only add the available endpoints to the terminus
48 // Let the propertiesChanged signal tells us when it comes back
49 // to Available again
50 addToExistingMctpInfos(MctpInfos(1, mapIt.first));
51 }
52 }
Gilbert Chen44524a52022-02-14 12:12:25 +000053 handleMctpEndpoints(existingMctpInfos);
54}
Tom Josephfb3bc062021-08-17 07:48:11 -070055
Chau Ly75e00422024-03-19 12:33:08 +000056void MctpDiscovery::getMctpInfos(std::map<MctpInfo, Availability>& mctpInfoMap)
Gilbert Chen44524a52022-02-14 12:12:25 +000057{
58 // Find all implementations of the MCTP Endpoint interface
59 pldm::utils::GetSubTreeResponse mapperResponse;
Tom Josephfb3bc062021-08-17 07:48:11 -070060 try
61 {
Gilbert Chen44524a52022-02-14 12:12:25 +000062 mapperResponse = pldm::utils::DBusHandler().getSubtree(
Alexander Hansen1f2794d2025-11-11 15:58:13 +010063 MCTPPath, 0, std::vector<std::string>({MCTPEndpoint::interface}));
Tom Josephfb3bc062021-08-17 07:48:11 -070064 }
Gilbert Chen44524a52022-02-14 12:12:25 +000065 catch (const sdbusplus::exception_t& e)
Tom Josephfb3bc062021-08-17 07:48:11 -070066 {
Riya Dixit087a7512024-04-06 14:28:08 -050067 error(
68 "Failed to getSubtree call at path '{PATH}' and interface '{INTERFACE}', error - {ERROR} ",
Alexander Hansen1f2794d2025-11-11 15:58:13 +010069 "ERROR", e, "PATH", MCTPPath, "INTERFACE", MCTPEndpoint::interface);
Tom Josephfb3bc062021-08-17 07:48:11 -070070 return;
71 }
72
Gilbert Chen44524a52022-02-14 12:12:25 +000073 for (const auto& [path, services] : mapperResponse)
Tom Josephfb3bc062021-08-17 07:48:11 -070074 {
Gilbert Chen44524a52022-02-14 12:12:25 +000075 for (const auto& serviceIter : services)
Tom Josephfb3bc062021-08-17 07:48:11 -070076 {
Gilbert Chen44524a52022-02-14 12:12:25 +000077 const std::string& service = serviceIter.first;
Thu Nguyen90274972024-07-17 07:02:16 +000078 const MctpEndpointProps& epProps =
79 getMctpEndpointProps(service, path);
80 const UUID& uuid = getEndpointUUIDProp(service, path);
Chau Ly75e00422024-03-19 12:33:08 +000081 const Availability& availability =
82 getEndpointConnectivityProp(path);
Thu Nguyen90274972024-07-17 07:02:16 +000083 auto types = std::get<MCTPMsgTypes>(epProps);
84 if (std::find(types.begin(), types.end(), mctpTypePLDM) !=
85 types.end())
Tom Josephfb3bc062021-08-17 07:48:11 -070086 {
Unive Tienc40d4a62025-03-12 11:36:07 +080087 auto mctpInfo =
88 MctpInfo(std::get<eid>(epProps), uuid, "",
89 std::get<NetworkId>(epProps), std::nullopt);
90 searchConfigurationFor(pldm::utils::DBusHandler(), mctpInfo);
91 mctpInfoMap[std::move(mctpInfo)] = availability;
Gilbert Chen44524a52022-02-14 12:12:25 +000092 }
Tom Josephfb3bc062021-08-17 07:48:11 -070093 }
94 }
Tom Josephfb3bc062021-08-17 07:48:11 -070095}
96
Thu Nguyen90274972024-07-17 07:02:16 +000097MctpEndpointProps MctpDiscovery::getMctpEndpointProps(
98 const std::string& service, const std::string& path)
99{
100 try
101 {
102 auto properties = pldm::utils::DBusHandler().getDbusPropertiesVariant(
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100103 service.c_str(), path.c_str(), MCTPEndpoint::interface);
Thu Nguyen90274972024-07-17 07:02:16 +0000104
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100105 if (properties.contains(MCTPEndpoint::property_names::network_id) &&
106 properties.contains(MCTPEndpoint::property_names::eid) &&
107 properties.contains(
108 MCTPEndpoint::property_names::supported_message_types))
Thu Nguyen90274972024-07-17 07:02:16 +0000109 {
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100110 auto networkId = std::get<NetworkId>(
111 properties.at(MCTPEndpoint::property_names::network_id));
112 auto eid = std::get<mctp_eid_t>(
113 properties.at(MCTPEndpoint::property_names::eid));
114 auto types = std::get<std::vector<uint8_t>>(properties.at(
115 MCTPEndpoint::property_names::supported_message_types));
Thu Nguyen90274972024-07-17 07:02:16 +0000116 return MctpEndpointProps(networkId, eid, types);
117 }
118 }
119 catch (const sdbusplus::exception_t& e)
120 {
121 error(
122 "Error reading MCTP Endpoint property at path '{PATH}' and service '{SERVICE}', error - {ERROR}",
123 "SERVICE", service, "PATH", path, "ERROR", e);
124 return MctpEndpointProps(0, MCTP_ADDR_ANY, {});
125 }
126
127 return MctpEndpointProps(0, MCTP_ADDR_ANY, {});
128}
129
130UUID MctpDiscovery::getEndpointUUIDProp(const std::string& service,
131 const std::string& path)
132{
133 try
134 {
135 auto properties = pldm::utils::DBusHandler().getDbusPropertiesVariant(
136 service.c_str(), path.c_str(), EndpointUUID);
137
138 if (properties.contains("UUID"))
139 {
140 return std::get<UUID>(properties.at("UUID"));
141 }
142 }
143 catch (const sdbusplus::exception_t& e)
144 {
145 error(
146 "Error reading Endpoint UUID property at path '{PATH}' and service '{SERVICE}', error - {ERROR}",
147 "SERVICE", service, "PATH", path, "ERROR", e);
148 return static_cast<UUID>(emptyUUID);
149 }
150
151 return static_cast<UUID>(emptyUUID);
152}
153
Chau Ly75e00422024-03-19 12:33:08 +0000154Availability MctpDiscovery::getEndpointConnectivityProp(const std::string& path)
155{
156 Availability available = false;
157 try
158 {
159 pldm::utils::PropertyValue propertyValue =
160 pldm::utils::DBusHandler().getDbusPropertyVariant(
161 path.c_str(), MCTPConnectivityProp, MCTPInterfaceCC);
162 if (std::get<std::string>(propertyValue) == "Available")
163 {
164 available = true;
165 }
166 }
167 catch (const sdbusplus::exception_t& e)
168 {
169 error(
170 "Error reading Endpoint Connectivity property at path '{PATH}', error - {ERROR}",
171 "PATH", path, "ERROR", e);
172 }
173
174 return available;
175}
176
Gilbert Chen44524a52022-02-14 12:12:25 +0000177void MctpDiscovery::getAddedMctpInfos(sdbusplus::message_t& msg,
178 MctpInfos& mctpInfos)
Tom Josephfb3bc062021-08-17 07:48:11 -0700179{
Gilbert Chen44524a52022-02-14 12:12:25 +0000180 using ObjectPath = sdbusplus::message::object_path;
181 ObjectPath objPath;
182 using Property = std::string;
183 using PropertyMap = std::map<Property, dbus::Value>;
184 std::map<std::string, PropertyMap> interfaces;
Thu Nguyen90274972024-07-17 07:02:16 +0000185 std::string uuid = emptyUUID;
Tom Josephfb3bc062021-08-17 07:48:11 -0700186
Gilbert Chen44524a52022-02-14 12:12:25 +0000187 try
188 {
189 msg.read(objPath, interfaces);
190 }
191 catch (const sdbusplus::exception_t& e)
192 {
Riya Dixit087a7512024-04-06 14:28:08 -0500193 error(
194 "Error reading MCTP Endpoint added interface message, error - {ERROR}",
195 "ERROR", e);
Gilbert Chen44524a52022-02-14 12:12:25 +0000196 return;
197 }
Chau Ly75e00422024-03-19 12:33:08 +0000198 const Availability& availability = getEndpointConnectivityProp(objPath.str);
Tom Josephfb3bc062021-08-17 07:48:11 -0700199
Thu Nguyen90274972024-07-17 07:02:16 +0000200 /* Get UUID */
201 try
202 {
203 auto service = pldm::utils::DBusHandler().getService(
204 objPath.str.c_str(), EndpointUUID);
205 uuid = getEndpointUUIDProp(service, objPath.str);
206 }
207 catch (const sdbusplus::exception_t& e)
208 {
209 error("Error getting Endpoint UUID D-Bus interface, error - {ERROR}",
210 "ERROR", e);
211 }
212
Tom Josephfb3bc062021-08-17 07:48:11 -0700213 for (const auto& [intfName, properties] : interfaces)
214 {
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100215 if (intfName == MCTPEndpoint::interface)
Tom Josephfb3bc062021-08-17 07:48:11 -0700216 {
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100217 if (properties.contains(MCTPEndpoint::property_names::network_id) &&
218 properties.contains(MCTPEndpoint::property_names::eid) &&
219 properties.contains(
220 MCTPEndpoint::property_names::supported_message_types))
Tom Josephfb3bc062021-08-17 07:48:11 -0700221 {
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100222 auto networkId = std::get<NetworkId>(
223 properties.at(MCTPEndpoint::property_names::network_id));
224 auto eid = std::get<mctp_eid_t>(
225 properties.at(MCTPEndpoint::property_names::eid));
226 auto types = std::get<std::vector<uint8_t>>(properties.at(
227 MCTPEndpoint::property_names::supported_message_types));
Chau Ly75e00422024-03-19 12:33:08 +0000228
229 if (!availability)
230 {
231 // Log an error message here, but still add it to the
232 // terminus
233 error(
234 "mctpd added a DEGRADED endpoint {EID} networkId {NET} to D-Bus",
235 "NET", networkId, "EID", static_cast<unsigned>(eid));
236 }
Tom Josephfb3bc062021-08-17 07:48:11 -0700237 if (std::find(types.begin(), types.end(), mctpTypePLDM) !=
238 types.end())
239 {
Riya Dixit087a7512024-04-06 14:28:08 -0500240 info(
Thu Nguyen90274972024-07-17 07:02:16 +0000241 "Adding Endpoint networkId '{NETWORK}' and EID '{EID}' UUID '{UUID}'",
242 "NETWORK", networkId, "EID", eid, "UUID", uuid);
Unive Tienc40d4a62025-03-12 11:36:07 +0800243 auto mctpInfo =
244 MctpInfo(eid, uuid, "", networkId, std::nullopt);
245 searchConfigurationFor(pldm::utils::DBusHandler(),
246 mctpInfo);
247 mctpInfos.emplace_back(std::move(mctpInfo));
Tom Josephfb3bc062021-08-17 07:48:11 -0700248 }
249 }
250 }
251 }
Gilbert Chen44524a52022-02-14 12:12:25 +0000252}
Tom Josephfb3bc062021-08-17 07:48:11 -0700253
Gilbert Chen44524a52022-02-14 12:12:25 +0000254void MctpDiscovery::addToExistingMctpInfos(const MctpInfos& addedInfos)
255{
256 for (const auto& mctpInfo : addedInfos)
Tom Josephfb3bc062021-08-17 07:48:11 -0700257 {
Gilbert Chen44524a52022-02-14 12:12:25 +0000258 if (std::find(existingMctpInfos.begin(), existingMctpInfos.end(),
259 mctpInfo) == existingMctpInfos.end())
260 {
261 existingMctpInfos.emplace_back(mctpInfo);
262 }
263 }
264}
265
266void MctpDiscovery::removeFromExistingMctpInfos(MctpInfos& mctpInfos,
267 MctpInfos& removedInfos)
268{
269 for (const auto& mctpInfo : existingMctpInfos)
270 {
271 if (std::find(mctpInfos.begin(), mctpInfos.end(), mctpInfo) ==
272 mctpInfos.end())
273 {
274 removedInfos.emplace_back(mctpInfo);
275 }
276 }
277 for (const auto& mctpInfo : removedInfos)
278 {
Riya Dixit087a7512024-04-06 14:28:08 -0500279 info("Removing Endpoint networkId '{NETWORK}' and EID '{EID}'",
Riya Dixit1e5c81e2024-05-03 07:54:00 -0500280 "NETWORK", std::get<3>(mctpInfo), "EID", std::get<0>(mctpInfo));
Gilbert Chen44524a52022-02-14 12:12:25 +0000281 existingMctpInfos.erase(std::remove(existingMctpInfos.begin(),
282 existingMctpInfos.end(), mctpInfo),
283 existingMctpInfos.end());
284 }
285}
286
Chau Ly75e00422024-03-19 12:33:08 +0000287void MctpDiscovery::propertiesChangedCb(sdbusplus::message_t& msg)
288{
289 using Interface = std::string;
290 using Property = std::string;
291 using Value = std::string;
292 using Properties = std::map<Property, std::variant<Value>>;
293
294 Interface interface;
295 Properties properties;
296 std::string objPath{};
297 std::string service{};
298
299 try
300 {
301 msg.read(interface, properties);
302 objPath = msg.get_path();
303 }
304 catch (const sdbusplus::exception_t& e)
305 {
306 error(
307 "Error handling Connectivity property changed message, error - {ERROR}",
308 "ERROR", e);
309 return;
310 }
311
312 for (const auto& [key, valueVariant] : properties)
313 {
314 Value propVal = std::get<std::string>(valueVariant);
315 auto availability = (propVal == "Available") ? true : false;
316
317 if (key == MCTPConnectivityProp)
318 {
Alexander Hansen1f2794d2025-11-11 15:58:13 +0100319 service = pldm::utils::DBusHandler().getService(
320 objPath.c_str(), MCTPEndpoint::interface);
Chau Ly75e00422024-03-19 12:33:08 +0000321 const MctpEndpointProps& epProps =
322 getMctpEndpointProps(service, objPath);
323
324 auto types = std::get<MCTPMsgTypes>(epProps);
325 if (!std::ranges::contains(types, mctpTypePLDM))
326 {
327 return;
328 }
329 const UUID& uuid = getEndpointUUIDProp(service, objPath);
330
331 MctpInfo mctpInfo(std::get<eid>(epProps), uuid, "",
Unive Tienc40d4a62025-03-12 11:36:07 +0800332 std::get<NetworkId>(epProps), std::nullopt);
333 searchConfigurationFor(pldm::utils::DBusHandler(), mctpInfo);
Chau Ly75e00422024-03-19 12:33:08 +0000334 if (!std::ranges::contains(existingMctpInfos, mctpInfo))
335 {
336 if (availability)
337 {
338 // The endpoint not in existingMctpInfos and is
339 // available Add it to existingMctpInfos
340 info(
341 "Adding Endpoint networkId {NETWORK} ID {EID} by propertiesChanged signal",
342 "NETWORK", std::get<3>(mctpInfo), "EID",
343 unsigned(std::get<0>(mctpInfo)));
344 addToExistingMctpInfos(MctpInfos(1, mctpInfo));
345 handleMctpEndpoints(MctpInfos(1, mctpInfo));
346 }
347 }
348 else
349 {
350 // The endpoint already in existingMctpInfos
351 updateMctpEndpointAvailability(mctpInfo, availability);
352 }
353 }
354 }
355}
356
Gilbert Chen44524a52022-02-14 12:12:25 +0000357void MctpDiscovery::discoverEndpoints(sdbusplus::message_t& msg)
358{
359 MctpInfos addedInfos;
360 getAddedMctpInfos(msg, addedInfos);
361 addToExistingMctpInfos(addedInfos);
362 handleMctpEndpoints(addedInfos);
363}
364
365void MctpDiscovery::removeEndpoints(sdbusplus::message_t&)
366{
367 MctpInfos mctpInfos;
368 MctpInfos removedInfos;
Chau Ly75e00422024-03-19 12:33:08 +0000369 std::map<MctpInfo, Availability> currentMctpInfoMap;
370 getMctpInfos(currentMctpInfoMap);
371 for (const auto& mapIt : currentMctpInfoMap)
372 {
373 mctpInfos.push_back(mapIt.first);
374 }
Gilbert Chen44524a52022-02-14 12:12:25 +0000375 removeFromExistingMctpInfos(mctpInfos, removedInfos);
376 handleRemovedMctpEndpoints(removedInfos);
Unive Tienc40d4a62025-03-12 11:36:07 +0800377 removeConfigs(removedInfos);
Gilbert Chen44524a52022-02-14 12:12:25 +0000378}
379
380void MctpDiscovery::handleMctpEndpoints(const MctpInfos& mctpInfos)
381{
382 for (const auto& handler : handlers)
383 {
384 if (handler)
385 {
Unive Tienc40d4a62025-03-12 11:36:07 +0800386 handler->handleConfigurations(configurations);
Gilbert Chen44524a52022-02-14 12:12:25 +0000387 handler->handleMctpEndpoints(mctpInfos);
388 }
389 }
390}
391
392void MctpDiscovery::handleRemovedMctpEndpoints(const MctpInfos& mctpInfos)
393{
394 for (const auto& handler : handlers)
395 {
396 if (handler)
397 {
398 handler->handleRemovedMctpEndpoints(mctpInfos);
399 }
Tom Josephfb3bc062021-08-17 07:48:11 -0700400 }
401}
402
Chau Ly75e00422024-03-19 12:33:08 +0000403void MctpDiscovery::updateMctpEndpointAvailability(const MctpInfo& mctpInfo,
404 Availability availability)
405{
406 for (const auto& handler : handlers)
407 {
408 if (handler)
409 {
410 handler->updateMctpEndpointAvailability(mctpInfo, availability);
411 }
412 }
413}
414
Unive Tienc40d4a62025-03-12 11:36:07 +0800415std::string MctpDiscovery::getNameFromProperties(
416 const utils::PropertyMap& properties)
417{
418 if (!properties.contains("Name"))
419 {
420 error("Missing name property");
421 return "";
422 }
423 return std::get<std::string>(properties.at("Name"));
424}
425
426std::string MctpDiscovery::constructMctpReactorObjectPath(
427 const MctpInfo& mctpInfo)
428{
429 const auto networkId = std::get<NetworkId>(mctpInfo);
430 const auto eid = std::get<pldm::eid>(mctpInfo);
431 return std::string{MCTPPath} + "/networks/" + std::to_string(networkId) +
432 "/endpoints/" + std::to_string(eid) + "/configured_by";
433}
434
435void MctpDiscovery::searchConfigurationFor(
436 const pldm::utils::DBusHandler& handler, MctpInfo& mctpInfo)
437{
438 const auto mctpReactorObjectPath = constructMctpReactorObjectPath(mctpInfo);
439 try
440 {
441 std::string associatedObjPath;
442 std::string associatedService;
443 std::string associatedInterface;
444 sdbusplus::message::object_path inventorySubtreePath(
445 inventorySubtreePathStr);
446
447 //"/{board or chassis type}/{board or chassis}/{device}"
448 auto constexpr subTreeDepth = 3;
449 auto response = handler.getAssociatedSubTree(
450 mctpReactorObjectPath, inventorySubtreePath, subTreeDepth,
451 interfaceFilter);
452 if (response.empty())
453 {
454 warning("No associated subtree found for path {PATH}", "PATH",
455 mctpReactorObjectPath);
456 return;
457 }
458 // Assume the first entry is the one we want
459 auto subTree = response.begin();
460 associatedObjPath = subTree->first;
461 auto associatedServiceProp = subTree->second;
462 if (associatedServiceProp.empty())
463 {
464 warning("No associated service found for path {PATH}", "PATH",
465 mctpReactorObjectPath);
466 return;
467 }
468 // Assume the first entry is the one we want
469 auto entry = associatedServiceProp.begin();
470 associatedService = entry->first;
471 auto dBusIntfList = entry->second;
472 auto associatedInterfaceItr = std::find_if(
473 dBusIntfList.begin(), dBusIntfList.end(), [](const auto& intf) {
474 return std::find(interfaceFilter.begin(), interfaceFilter.end(),
475 intf) != interfaceFilter.end();
476 });
477 if (associatedInterfaceItr == dBusIntfList.end())
478 {
479 error("No associated interface found for path {PATH}", "PATH",
480 mctpReactorObjectPath);
481 return;
482 }
483 associatedInterface = *associatedInterfaceItr;
484 auto mctpTargetProperties = handler.getDbusPropertiesVariant(
485 associatedService.c_str(), associatedObjPath.c_str(),
486 associatedInterface.c_str());
487 auto name = getNameFromProperties(mctpTargetProperties);
488 if (!name.empty())
489 {
490 std::get<std::optional<std::string>>(mctpInfo) = name;
491 }
492 configurations.emplace(associatedObjPath, mctpInfo);
493 }
494 catch (const std::exception& e)
495 {
496 error(
497 "Error getting associated subtree for path {PATH}, error - {ERROR}",
498 "PATH", mctpReactorObjectPath, "ERROR", e);
499 return;
500 }
501}
502
503void MctpDiscovery::removeConfigs(const MctpInfos& removedInfos)
504{
505 for (const auto& mctpInfo : removedInfos)
506 {
Eric Yang6449a3b2025-10-08 10:53:04 +0000507 const auto eidToRemove = std::get<eid>(mctpInfo);
508 const auto netToRemove = std::get<NetworkId>(mctpInfo);
509
510 std::erase_if(configurations, [eidToRemove,
511 netToRemove](const auto& config) {
512 const auto& [__, mctpInfo] = config;
513 const auto eidValue = std::get<eid>(mctpInfo);
514 const auto netValue = std::get<NetworkId>(mctpInfo);
515
516 return eidValue == eidToRemove && netValue == netToRemove;
Unive Tienc40d4a62025-03-12 11:36:07 +0800517 });
518 }
519}
520
Andrew Jeffery27a022c2022-08-10 23:12:49 +0930521} // namespace pldm