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

Function i40e_dcb_setup

dpdk/drivers/net/i40e/i40e_ethdev.c:11034–11062  ·  view source on GitHub ↗

* i40e_dcb_setup - setup dcb related config * @dev: device being configured * * Returns 0 on success, negative value on failure */

Source from the content-addressed store, hash-verified

11032 * Returns 0 on success, negative value on failure
11033 */
11034static int
11035i40e_dcb_setup(struct rte_eth_dev *dev)
11036{
11037 struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
11038 struct i40e_dcbx_config dcb_cfg;
11039 uint8_t tc_map = 0;
11040 int ret = 0;
11041
11042 if ((pf->flags & I40E_FLAG_DCB) == 0) {
11043 PMD_INIT_LOG(ERR, "HW doesn't support DCB");
11044 return -ENOTSUP;
11045 }
11046
11047 if (pf->vf_num != 0)
11048 PMD_INIT_LOG(DEBUG, " DCB only works on pf and vmdq vsis.");
11049
11050 ret = i40e_parse_dcb_configure(dev, &dcb_cfg, &tc_map);
11051 if (ret) {
11052 PMD_INIT_LOG(ERR, "invalid dcb config");
11053 return -EINVAL;
11054 }
11055 ret = i40e_dcb_hw_configure(pf, &dcb_cfg, tc_map);
11056 if (ret) {
11057 PMD_INIT_LOG(ERR, "dcb sw configure fails");
11058 return -ENOSYS;
11059 }
11060
11061 return 0;
11062}
11063
11064static int
11065i40e_dev_get_dcb_info(struct rte_eth_dev *dev,

Callers 1

i40e_dev_configureFunction · 0.85

Calls 2

i40e_parse_dcb_configureFunction · 0.85
i40e_dcb_hw_configureFunction · 0.85

Tested by

no test coverage detected