2019-02-28 23:24:22 +00:00
|
|
|
/* 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
|
2019-02-28 23:24:24 +00:00
|
|
|
u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg);
|
|
|
|
u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg);
|
2019-02-28 23:24:22 +00:00
|
|
|
int ice_init_pf_dcb(struct ice_pf *pf);
|
2019-02-28 23:24:26 +00:00
|
|
|
void
|
|
|
|
ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,
|
|
|
|
struct ice_rq_event_info *event);
|
2019-02-28 23:24:22 +00:00
|
|
|
#else
|
2019-02-28 23:24:24 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-02-28 23:24:22 +00:00
|
|
|
static inline int ice_init_pf_dcb(struct ice_pf *pf)
|
|
|
|
{
|
|
|
|
dev_dbg(&pf->pdev->dev, "DCB not supported\n");
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
2019-02-28 23:24:24 +00:00
|
|
|
|
2019-02-28 23:24:26 +00:00
|
|
|
#define ice_dcb_process_lldp_set_mib_change(pf, event) do {} while (0)
|
2019-02-28 23:24:22 +00:00
|
|
|
#endif /* CONFIG_DCB */
|
|
|
|
#endif /* _ICE_DCB_LIB_H_ */
|