ice_dcb_lib.h 737 字节
Newer Older
1 2 3 4 5 6 7 8 9 10
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019, Intel Corporation. */

#ifndef _ICE_DCB_LIB_H_
#define _ICE_DCB_LIB_H_

#include "ice.h"
#include "ice_lib.h"

#ifdef CONFIG_DCB
11 12
u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg);
u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg);
13 14
int ice_init_pf_dcb(struct ice_pf *pf);
#else
15 16 17 18 19 20 21 22 23 24
static inline u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg __always_unused *dcbcfg)
{
	return ICE_DFLT_TRAFFIC_CLASS;
}

static inline u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg __always_unused *dcbcfg)
{
	return 1;
}

25 26 27 28 29
static inline int ice_init_pf_dcb(struct ice_pf *pf)
{
	dev_dbg(&pf->pdev->dev, "DCB not supported\n");
	return -EOPNOTSUPP;
}
30

31 32
#endif /* CONFIG_DCB */
#endif /* _ICE_DCB_LIB_H_ */