diff options
author | Michael Chan <michael.chan@broadcom.com> | 2016-12-03 05:17:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-05 21:21:40 +0300 |
commit | 7df4ae9fe85567a1710048da8229bd85e0da9df7 (patch) | |
tree | 591b11bf3d6b01bf7dab9fd90e1aa9f41f177e48 /drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h | |
parent | 87c374ded0b2cfe50bb1e7648a4ca06df13fa399 (diff) | |
download | linux-7df4ae9fe85567a1710048da8229bd85e0da9df7.tar.xz |
bnxt_en: Implement DCBNL to support host-based DCBX.
Support only IEEE DCBX initially. Add IEEE DCBNL ops and functions to
get and set the hardware DCBX parameters. The DCB code is conditional on
Kconfig CONFIG_BNXT_DCB.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h new file mode 100644 index 000000000000..35a0d28cf2fd --- /dev/null +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h @@ -0,0 +1,41 @@ +/* Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2014-2016 Broadcom Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + */ + +#ifndef BNXT_DCB_H +#define BNXT_DCB_H + +#include <net/dcbnl.h> + +struct bnxt_dcb { + u8 max_tc; + struct ieee_pfc *ieee_pfc; + struct ieee_ets *ieee_ets; + u8 dcbx_cap; + u8 default_pri; +}; + +struct bnxt_cos2bw_cfg { + u8 pad[3]; + u8 queue_id; + __le32 min_bw; + __le32 max_bw; + u8 tsa; + u8 pri_lvl; + u8 bw_weight; + u8 unused; +}; + +#define BNXT_LLQ(q_profile) \ + ((q_profile) == QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS) + +#define HWRM_STRUCT_DATA_SUBTYPE_HOST_OPERATIONAL 0x0300 + +void bnxt_dcb_init(struct bnxt *bp); +void bnxt_dcb_free(struct bnxt *bp); +#endif |