MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_dcf_load_pkg

Function ice_dcf_load_pkg

dpdk/drivers/net/ice/ice_dcf_parent.c:392–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static int
393ice_dcf_load_pkg(struct ice_adapter *adapter)
394{
395 struct ice_dcf_adapter *dcf_adapter =
396 container_of(&adapter->hw, struct ice_dcf_adapter, parent.hw);
397 struct virtchnl_pkg_info pkg_info;
398 struct dcf_virtchnl_cmd vc_cmd;
399 bool use_dsn;
400 uint64_t dsn = 0;
401
402 vc_cmd.v_op = VIRTCHNL_OP_DCF_GET_PKG_INFO;
403 vc_cmd.req_msglen = 0;
404 vc_cmd.req_msg = NULL;
405 vc_cmd.rsp_buflen = sizeof(pkg_info);
406 vc_cmd.rsp_msgbuf = (uint8_t *)&pkg_info;
407
408 use_dsn = ice_dcf_execute_virtchnl_cmd(&dcf_adapter->real_hw, &vc_cmd) == 0;
409 if (use_dsn)
410 rte_memcpy(&dsn, pkg_info.dsn, sizeof(dsn));
411
412 return ice_load_pkg(adapter, use_dsn, dsn);
413}
414
415int
416ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)

Callers 1

Calls 3

ice_load_pkgFunction · 0.85
rte_memcpyFunction · 0.50

Tested by

no test coverage detected