@@ -316,6 +316,59 @@ class nixlAgent {
316
316
const nixl_blob_t &msg,
317
317
const nixl_opt_args_t * extra_params = nullptr );
318
318
319
+ /* ** Metadata handling through side channel ***/
320
+ /* *
321
+ * @brief Get metadata blob for this agent, to be given to other agents.
322
+ *
323
+ * @param str [out] The serialized metadata blob
324
+ * @return nixl_status_t Error code if call was not successful
325
+ */
326
+ nixl_status_t
327
+ getLocalMD (nixl_blob_t &str) const ;
328
+
329
+ /* *
330
+ * @brief Get partial metadata blob for this agent, to be given to other agents.
331
+ * If `descs` is empty, only backends' connection info is included in the metadata,
332
+ * regardless of the value of `extra_params->includeConnInfo` and `descs` memory type.
333
+ * If `descs` is non-empty, the metadata of the descriptors in the list are included,
334
+ * and if `extra_params->includeConnInfo` is true, the connection info of the
335
+ * backends supporting the memory type is also included.
336
+ * If `extra_params->backends` is non-empty, only the descriptors supported by the
337
+ * backends in the list and the backends' connection info are included in the metadata.
338
+ *
339
+ * @param descs [in] Descriptor list to include in the metadata
340
+ * @param str [out] The serialized metadata blob
341
+ * @param extra_params [in] Optional extra parameters used in getting partial metadata
342
+ * @return nixl_status_t Error code if call was not successful
343
+ */
344
+ nixl_status_t
345
+ getLocalPartialMD (const nixl_reg_dlist_t &descs,
346
+ nixl_blob_t &str,
347
+ const nixl_opt_args_t * extra_params = nullptr ) const ;
348
+
349
+ /* *
350
+ * @brief Load other agent's metadata and unpack it internally. Now the local
351
+ * agent can initiate transfers towards the remote agent.
352
+ *
353
+ * @param remote_metadata Serialized metadata blob to be loaded
354
+ * @param agent_name [out] Agent name extracted from the loaded metadata blob
355
+ * @return nixl_status_t Error code if call was not successful
356
+ */
357
+ nixl_status_t
358
+ loadRemoteMD (const nixl_blob_t &remote_metadata,
359
+ std::string &agent_name);
360
+
361
+ /* *
362
+ * @brief Invalidate the remote agent metadata cached locally. This will
363
+ * disconnect from that agent if already connected, and no more
364
+ * transfers can be initiated towards that agent.
365
+ *
366
+ * @param remote_agent Remote agent name to invalidate its metadata blob
367
+ * @return nixl_status_t Error code if call was not successful
368
+ */
369
+ nixl_status_t
370
+ invalidateRemoteMD (const std::string &remote_agent);
371
+
319
372
/* ** Metadata handling through direct channels (p2p socket and ETCD) ***/
320
373
/* *
321
374
* @brief Send your own agent metadata to a remote location.
@@ -348,7 +401,7 @@ class nixlAgent {
348
401
* @return nixl_status_t Error code if call was not successful
349
402
*/
350
403
nixl_status_t
351
- sendLocalPartialMD (nixl_reg_dlist_t &descs,
404
+ sendLocalPartialMD (const nixl_reg_dlist_t &descs,
352
405
const nixl_opt_args_t * extra_params = nullptr ) const ;
353
406
354
407
/* *
@@ -381,65 +434,16 @@ class nixlAgent {
381
434
382
435
/* *
383
436
* @brief Check if metadata is available for a remote agent.
437
+ * For partial metadata methods are used, the descriptor list in question
438
+ * can be specified; otherwise, empty `descs` can be passed.
384
439
*
385
440
* @param str Remote agent to check for
386
441
* @return nixl_status_t Error code, NOT_FOUND if metadata not found
387
442
*/
388
443
nixl_status_t
389
- checkRemoteMD (const std::string remote_name) const ;
444
+ checkRemoteMD (const std::string remote_name,
445
+ const nixl_xfer_dlist_t &descs) const ;
390
446
391
- /* ** Metadata handling through side channel ***/
392
- /* *
393
- * @brief Get metadata blob for this agent, to be given to other agents.
394
- *
395
- * @param str [out] The serialized metadata blob
396
- * @return nixl_status_t Error code if call was not successful
397
- */
398
- nixl_status_t
399
- getLocalMD (nixl_blob_t &str) const ;
400
-
401
- /* *
402
- * @brief Get partial metadata blob for this agent, to be given to other agents.
403
- * If `descs` is empty, only backends' connection info is included in the metadata,
404
- * regardless of the value of `extra_params->includeConnInfo` and `descs` memory type.
405
- * If `descs` is non-empty, the metadata of the descriptors in the list are included,
406
- * and if `extra_params->includeConnInfo` is true, the connection info of the
407
- * backends supporting the memory type is also included.
408
- * If `extra_params->backends` is non-empty, only the descriptors supported by the
409
- * backends in the list and the backends' connection info are included in the metadata.
410
- *
411
- * @param descs [in] Descriptor list to include in the metadata
412
- * @param str [out] The serialized metadata blob
413
- * @param extra_params [in] Optional extra parameters used in getting partial metadata
414
- * @return nixl_status_t Error code if call was not successful
415
- */
416
- nixl_status_t
417
- getLocalPartialMD (nixl_reg_dlist_t &descs,
418
- nixl_blob_t &str,
419
- const nixl_opt_args_t * extra_params = nullptr ) const ;
420
-
421
- /* *
422
- * @brief Load other agent's metadata and unpack it internally. Now the local
423
- * agent can initiate transfers towards the remote agent.
424
- *
425
- * @param remote_metadata Serialized metadata blob to be loaded
426
- * @param agent_name [out] Agent name extracted from the loaded metadata blob
427
- * @return nixl_status_t Error code if call was not successful
428
- */
429
- nixl_status_t
430
- loadRemoteMD (const nixl_blob_t &remote_metadata,
431
- std::string &agent_name);
432
-
433
- /* *
434
- * @brief Invalidate the remote agent metadata cached locally. This will
435
- * disconnect from that agent if already connected, and no more
436
- * transfers can be initiated towards that agent.
437
- *
438
- * @param remote_agent Remote agent name to invalidate its metadata blob
439
- * @return nixl_status_t Error code if call was not successful
440
- */
441
- nixl_status_t
442
- invalidateRemoteMD (const std::string &remote_agent);
443
447
};
444
448
445
449
#endif
0 commit comments