- return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
- HINIC_MGMT_CMD_VAT_SET,
- &root_ctxt, sizeof(root_ctxt),
- NULL, NULL, 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;