ZBLOG

struct spdk_nvmf_tgt { char name[NVMF_TGT_NAME_MAX_LENGTH]; pthread_mutex_t mutex; uint64_t discovery_genctr; uint32_t max_subsystems; /* Array of subsystem pointers of size max_subsystems indexed by sid */ struct spdk_nvmf...

This is a C struct definition for an NVMe over Fabrics target (spdk_nvmf_tgt). It contains the following members:

  • name: a character array representing the name of the target, with a maximum length defined by NVMF_TGT_NAME_MAX_LENGTH.
  • mutex: a pthread mutex used to synchronize access to shared data within the target.
  • discovery_genctr: a counter used to track changes to the list of discovered subsystems.
  • max_subsystems: the maximum number of subsystems that can be registered with the target.
  • subsystems: a dynamically sized array of pointers to spdk_nvmf_subsystem structures, indexed by subsystem ID (sid).
  • transports: a linked list of active transport instances for the target.
  • poll_groups: a linked list of active poll groups for the target.
  • next_poll_group: a pointer to the next poll group to use for assigning connections in a round-robin fashion.
  • destroy_cb_fn: a function pointer to be called when the target is destroyed.
  • destroy_cb_arg: a void pointer argument to pass to the destroy callback function.
  • link: a linked list pointer for linking multiple targets together.

Overall, this struct represents a single NVMe over Fabrics target instance, which can have multiple subsystems and associated transport and polling resources. The mutex and generation counter are used for synchronization and updating of the subsystem array, while the transport and poll group linked lists manage the actual I/O resources for the target. The destroy callback function and argument allow external code to clean up any additional resources associated with the target when it is being destroyed.

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:http://sdn.0voice.com/?id=58

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?