bnxt_dcb.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Broadcom NetXtreme-C/E network driver.
  2. *
  3. * Copyright (c) 2014-2016 Broadcom Corporation
  4. * Copyright (c) 2016-2018 Broadcom Limited
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation.
  9. */
  10. #ifndef BNXT_DCB_H
  11. #define BNXT_DCB_H
  12. #include <net/dcbnl.h>
  13. struct bnxt_dcb {
  14. u8 max_tc;
  15. struct ieee_pfc *ieee_pfc;
  16. struct ieee_ets *ieee_ets;
  17. u8 dcbx_cap;
  18. u8 default_pri;
  19. };
  20. struct bnxt_cos2bw_cfg {
  21. u8 pad[3];
  22. struct_group_attr(cfg, __packed,
  23. u8 queue_id;
  24. __le32 min_bw;
  25. __le32 max_bw;
  26. u8 tsa;
  27. u8 pri_lvl;
  28. u8 bw_weight;
  29. );
  30. /* for min_bw / max_bw */
  31. #define BW_VALUE_UNIT_PERCENT1_100 (0x1UL << 29)
  32. u8 unused;
  33. };
  34. struct bnxt_dscp2pri_entry {
  35. u8 dscp;
  36. u8 mask;
  37. u8 pri;
  38. };
  39. #define BNXT_LLQ(q_profile) \
  40. ((q_profile) == \
  41. QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_ROCE)
  42. #define BNXT_CNPQ(q_profile) \
  43. ((q_profile) == \
  44. QUEUE_QPORTCFG_RESP_QUEUE_ID0_SERVICE_PROFILE_LOSSY_ROCE_CNP)
  45. #define HWRM_STRUCT_DATA_SUBTYPE_HOST_OPERATIONAL 0x0300
  46. void bnxt_dcb_init(struct bnxt *bp);
  47. void bnxt_dcb_free(struct bnxt *bp);
  48. #endif