src/dpdk/drivers/net/hns3/hns3_dcb.c
int
hns3_dcb_configure(struct hns3_adapter *hns)
{
	struct hns3_hw *hw = &hns->hw;
	bool map_changed = false;
	uint8_t num_tc = 0;
	int ret;

	hns3_dcb_cfg_validate(hns, &num_tc, &map_changed);
	if (map_changed ||
	    __atomic_load_n(&hw->reset.resetting,  __ATOMIC_RELAXED)) {
		ret = hns3_dcb_info_update(hns, num_tc);
		if (ret) {
			hns3_err(hw, "dcb info update failed: %d", ret);
			return ret;
		}

		ret = hns3_dcb_hw_configure(hns);
		if (ret) {
			hns3_err(hw, "dcb sw configure failed: %d", ret);
			return ret;
		}
	}

	return 0;
}
/*
 * hns3_dcb_configure - setup dcb related config
 * @hns: pointer to hns3 adapter
 * Returns 0 on success, negative value on failure.
 */
setup dcb related config
@hns: pointer to hns3 adapter
Returns 0 on success, negative value on failure.
setup dcb related config @hns : pointer to hns3 adapter Returns 0 on success negative value on failure .
int
hns3_dcb_configure(struct hns3_adapter *hns)
{
	struct hns3_hw *hw = &hns->hw;
	bool map_changed = false;
	uint8_t num_tc = 0;
	int ret;
	hns3_dcb_cfg_validate(hns, &num_tc, &map_changed);
	if (map_changed ||
	    __atomic_load_n(&hw->reset.resetting,  __ATOMIC_RELAXED)) {
		ret = hns3_dcb_info_update(hns, num_tc);
		if (ret) {
			hns3_err(hw, "dcb info update failed: %d", ret);
			return ret;
		}
		ret = hns3_dcb_hw_configure(hns);
		if (ret) {
			hns3_err(hw, "dcb sw configure failed: %d", ret);
			return ret;
		}
	}
	return 0;
}
int hns3_dcb_configure ( struct hns3_adapter * hns ) { struct hns3_hw * hw = & hns -> hw ; bool map_changed = false ; uint8_t num_tc = 0 ; int ret ; hns3_dcb_cfg_validate ( hns , & num_tc , & map_changed ) ; if ( map_changed || __atomic_load_n ( & hw -> reset . resetting , __ATOMIC_RELAXED ) ) { ret = hns3_dcb_info_update ( hns , num_tc ) ; if ( ret ) { hns3_err ( hw , " " , ret ) ; return ret ; } ret = hns3_dcb_hw_configure ( hns ) ; if ( ret ) { hns3_err ( hw , " " , ret ) ; return ret ; } } return 0 ; }
hns3_dcb_configure - setup dcb related config
 @hns: pointer to hns3 adapter
 Returns 0 on success, negative value on failure.
hns3_dcb_configure - setup dcb related config @hns : pointer to hns3 adapter Returns 0 on success negative value on failure .