On 10/19/2020 9:53 AM, Jiawen Wu wrote:
Add PF module init and uninit operations with mailbox.
Signed-off-by: Jiawen Wu <jiawe...@trustnetic.com>
<...>
+void txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
+{
+ struct txgbe_vf_info **vfinfo = TXGBE_DEV_VFDATA(eth_dev);
+ struct txgbe_mirror_info *mirror_info = TXGBE_DEV_MR_INFO(eth_dev);
+ struct txgbe_uta_info *uta_info = TXGBE_DEV_UTA_INFO(eth_dev);
+ struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);
+ uint16_t vf_num;
+ uint8_t nb_queue;
+
+ PMD_INIT_FUNC_TRACE();
+
+ RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
+ vf_num = dev_num_vf(eth_dev);
+ if (vf_num == 0)
+ return;
+
+ *vfinfo = rte_zmalloc("vf_info",
+ sizeof(struct txgbe_vf_info) * vf_num, 0);
+ if (*vfinfo == NULL)
+ rte_panic("Cannot allocate memory for private VF data\n");
+
A driver should not exit the application, instead driver should return error and
application should decide to exit or not.
Can you please replace the 'rte_panic()' with an seperate patch?