>>  struct zxdh_hw_internal zxdh_hw_internal[RTE_MAX_ETHPORTS];<br /> <br />>If you want to support primary/secondary in future,<br />>variables in BSS are not shared between primary and secondary process<br /> <br />    This structure mainly registers some PCI ops and  <br />    will not be shared between primary/secondary processes.<br /> <br />>> +struct zxdh_shared_data *zxdh_shared_data;<br />>> +const char *ZXDH_PMD_SHARED_DATA_MZ = "zxdh_pmd_shared_data";<br />>> +rte_spinlock_t zxdh_shared_data_lock = RTE_SPINLOCK_INITIALIZER;<br />>> +struct zxdh_dtb_shared_data g_dtb_data;<br /> <br />>The shared data will be a problem if you support multiple devices.<br />>Or is this really a singleton device with only one bus and slot.<br /> <br />    In our latest version, we have optimized by placing this structure in a private data area  <br />    and initializing each device independently.<br />    Can we update later?<br /> <br />>> +static uint32_t<br />>> +zxdh_np_dtb_soft_init(uint32_t dev_id)<br />>> +{<br />>> +    ZXDH_DTB_MGR_T *p_dtb_mgr = NULL;<br />>> +<br />>> +    p_dtb_mgr = zxdh_np_dtb_mgr_get(dev_id);<br />>> +    if (p_dtb_mgr == NULL) {<br />>> +        p_dpp_dtb_mgr[dev_id] = (ZXDH_DTB_MGR_T *)malloc(sizeof(ZXDH_DTB_MGR_T));<br /> <br />>malloc() returns void *, cast here is not needed.<br />>Why does DTB_MGR_T come from malloc when most of other data is using rte_malloc()?<br />> <br />>It will matter if you support multiprocess<br /> <br />     I didn't realize it, it was originally intended to use rte_malloc.<br /> <br />     Thank you for your comments.  <br />     And other issues will modifyed according to the comments.<br />