2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
18 #ifndef __BFA_DEFS_QOS_H__
19 #define __BFA_DEFS_QOS_H__
25 BFA_QOS_ONLINE
= 1, /* QoS is online */
26 BFA_QOS_OFFLINE
= 2, /* QoS is offline */
31 * QoS Priority levels.
33 enum bfa_qos_priority
{
35 BFA_QOS_HIGH
= 1, /* QoS Priority Level High */
36 BFA_QOS_MED
= 2, /* QoS Priority Level Medium */
37 BFA_QOS_LOW
= 3, /* QoS Priority Level Low */
42 * QoS bandwidth allocation for each priority level
44 enum bfa_qos_bw_alloc
{
45 BFA_QOS_BW_HIGH
= 60, /* bandwidth allocation for High */
46 BFA_QOS_BW_MED
= 30, /* bandwidth allocation for Medium */
47 BFA_QOS_BW_LOW
= 10, /* bandwidth allocation for Low */
51 * QoS attribute returned in QoS Query
53 struct bfa_qos_attr_s
{
54 enum bfa_qos_state state
; /* QoS current state */
55 u32 total_bb_cr
; /* Total BB Credits */
59 * These fields should be displayed only from the CLI.
60 * There will be a separate BFAL API (get_qos_vc_attr ?)
64 #define BFA_QOS_MAX_VC 16
66 struct bfa_qos_vc_info_s
{
73 struct bfa_qos_vc_attr_s
{
74 u16 total_vc_count
; /* Total VC Count */
77 struct bfa_qos_vc_info_s vc_info
[BFA_QOS_MAX_VC
]; /* as many as
84 struct bfa_qos_stats_s
{
85 u32 flogi_sent
; /* QoS Flogi sent */
86 u32 flogi_acc_recvd
; /* QoS Flogi Acc received */
87 u32 flogi_rjt_recvd
; /* QoS Flogi rejects received */
88 u32 flogi_retries
; /* QoS Flogi retries */
90 u32 elp_recvd
; /* QoS ELP received */
91 u32 elp_accepted
; /* QoS ELP Accepted */
92 u32 elp_rejected
; /* QoS ELP rejected */
93 u32 elp_dropped
; /* QoS ELP dropped */
95 u32 qos_rscn_recvd
; /* QoS RSCN received */
96 u32 rsvd
; /* padding for 64 bit alignment */
99 #endif /* __BFA_DEFS_QOS_H__ */