src/dpdk/drivers/net/hinic/base/hinic_pmd_nicio.c
static int hinic_clean_root_ctxt(void *hwdev)
{
	struct hinic_root_ctxt root_ctxt;
	u16 out_size = sizeof(root_ctxt);
	int err;

	memset(&root_ctxt, 0, sizeof(root_ctxt));
	root_ctxt.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
	root_ctxt.func_idx = hinic_global_func_id(hwdev);
	root_ctxt.ppf_idx = hinic_ppf_idx(hwdev);
	root_ctxt.set_cmdq_depth = 0;
	root_ctxt.cmdq_depth = 0;
	root_ctxt.lro_en = 0;
	root_ctxt.rq_depth  = 0;
	root_ctxt.rx_buf_sz = 0;
	root_ctxt.sq_depth  = 0;

	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
				     HINIC_MGMT_CMD_VAT_SET,
				     &root_ctxt, sizeof(root_ctxt),
				     &root_ctxt, &out_size, 0);
	if (err || !out_size || root_ctxt.mgmt_msg_head.status) {
		PMD_DRV_LOG(ERR,
			"Clean root context failed, err: %d, status: 0x%x, out_size: 0x%x",
			err, root_ctxt.mgmt_msg_head.status, out_size);
		return -EIO;
	}

	return 0;
}
/**
 * hinic_clean_root_ctxt - clean root context table in NIC
 * @hwdev: the hardware interface of a nic device
 * @return
 *   0 on success,
 *   negative error value otherwise.
 */
clean root context table in NIC
@hwdev: the hardware interface of a nic device
@return
0 on success,
negative error value otherwise.
clean root context table in NIC @hwdev : the hardware interface of a nic device @return 0 on success negative error value otherwise .
static int hinic_clean_root_ctxt(void *hwdev)
{
	struct hinic_root_ctxt root_ctxt;
	u16 out_size = sizeof(root_ctxt);
	int err;
	memset(&root_ctxt, 0, sizeof(root_ctxt));
	root_ctxt.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
	root_ctxt.func_idx = hinic_global_func_id(hwdev);
	root_ctxt.ppf_idx = hinic_ppf_idx(hwdev);
	root_ctxt.set_cmdq_depth = 0;
	root_ctxt.cmdq_depth = 0;
	root_ctxt.lro_en = 0;
	root_ctxt.rq_depth  = 0;
	root_ctxt.rx_buf_sz = 0;
	root_ctxt.sq_depth  = 0;
	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
				     HINIC_MGMT_CMD_VAT_SET,
				     &root_ctxt, sizeof(root_ctxt),
				     &root_ctxt, &out_size, 0);
	if (err || !out_size || root_ctxt.mgmt_msg_head.status) {
		PMD_DRV_LOG(ERR,
			"Clean root context failed, err: %d, status: 0x%x, out_size: 0x%x",
			err, root_ctxt.mgmt_msg_head.status, out_size);
		return -EIO;
	}
	return 0;
}
static int hinic_clean_root_ctxt ( void * hwdev ) { struct hinic_root_ctxt root_ctxt ; u16 out_size = sizeof ( root_ctxt ) ; int err ; memset ( & root_ctxt , 0 , sizeof ( root_ctxt ) ) ; root_ctxt . mgmt_msg_head . resp_aeq_num = HINIC_AEQ1 ; root_ctxt . func_idx = hinic_global_func_id ( hwdev ) ; root_ctxt . ppf_idx = hinic_ppf_idx ( hwdev ) ; root_ctxt . set_cmdq_depth = 0 ; root_ctxt . cmdq_depth = 0 ; root_ctxt . lro_en = 0 ; root_ctxt . rq_depth = 0 ; root_ctxt . rx_buf_sz = 0 ; root_ctxt . sq_depth = 0 ; err = hinic_msg_to_mgmt_sync ( hwdev , HINIC_MOD_COMM , HINIC_MGMT_CMD_VAT_SET , & root_ctxt , sizeof ( root_ctxt ) , & root_ctxt , & out_size , 0 ) ; if ( err || ! out_size || root_ctxt . mgmt_msg_head . status ) { PMD_DRV_LOG ( ERR , " " , err , root_ctxt . mgmt_msg_head . status , out_size ) ; return - EIO ; } return 0 ; }
hinic_clean_root_ctxt - clean root context table in NIC
 @hwdev: the hardware interface of a nic device
 @return
   0 on success,
   negative error value otherwise.
hinic_clean_root_ctxt - clean root context table in NIC @hwdev : the hardware interface of a nic device @return 0 on success negative error value otherwise .