aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic.h
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-08-16 20:34:22 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 06:59:47 -0400
commitb6021212291d1eb1e7d1245bbd8c53bcbe2355d7 (patch)
treebc10d1a36a46aaa8e1646a644e77ecafa88a0f14 /drivers/net/qlcnic/qlcnic.h
parentecd7d31038e2e0e95b4596eec021e02ba67a0a37 (diff)
qlcnic: add eswitch statistics support
Adding eswitch statistics support. User can get whole eswitch stats or stats of func belong to that eswitch. Added: o command to get statistics of eswitch and function. o sysfs support to export eswitch and func statatistics. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic.h')
-rw-r--r--drivers/net/qlcnic/qlcnic.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 970389331bbc..7f4e11bd4cd4 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -555,6 +555,7 @@ struct qlcnic_recv_context {
555#define QLCNIC_CDRP_CMD_GET_ESWITCH_STATUS 0x00000026 555#define QLCNIC_CDRP_CMD_GET_ESWITCH_STATUS 0x00000026
556#define QLCNIC_CDRP_CMD_SET_PORTMIRRORING 0x00000027 556#define QLCNIC_CDRP_CMD_SET_PORTMIRRORING 0x00000027
557#define QLCNIC_CDRP_CMD_CONFIGURE_ESWITCH 0x00000028 557#define QLCNIC_CDRP_CMD_CONFIGURE_ESWITCH 0x00000028
558#define QLCNIC_CDRP_CMD_GET_ESWITCH_STATS 0x0000002a
558 559
559#define QLCNIC_RCODE_SUCCESS 0 560#define QLCNIC_RCODE_SUCCESS 0
560#define QLCNIC_RCODE_TIMEOUT 17 561#define QLCNIC_RCODE_TIMEOUT 17
@@ -1126,6 +1127,31 @@ struct qlcnic_esw_func_cfg {
1126 u8 reserved; 1127 u8 reserved;
1127}; 1128};
1128 1129
1130#define QLCNIC_STATS_VERSION 1
1131#define QLCNIC_STATS_PORT 1
1132#define QLCNIC_STATS_ESWITCH 2
1133#define QLCNIC_QUERY_RX_COUNTER 0
1134#define QLCNIC_QUERY_TX_COUNTER 1
1135struct __qlcnic_esw_statistics {
1136 __le16 context_id;
1137 __le16 version;
1138 __le16 size;
1139 __le16 unused;
1140 __le64 unicast_frames;
1141 __le64 multicast_frames;
1142 __le64 broadcast_frames;
1143 __le64 dropped_frames;
1144 __le64 errors;
1145 __le64 local_frames;
1146 __le64 numbytes;
1147 __le64 rsvd[3];
1148};
1149
1150struct qlcnic_esw_statistics {
1151 struct __qlcnic_esw_statistics rx;
1152 struct __qlcnic_esw_statistics tx;
1153};
1154
1129int qlcnic_fw_cmd_query_phy(struct qlcnic_adapter *adapter, u32 reg, u32 *val); 1155int qlcnic_fw_cmd_query_phy(struct qlcnic_adapter *adapter, u32 reg, u32 *val);
1130int qlcnic_fw_cmd_set_phy(struct qlcnic_adapter *adapter, u32 reg, u32 val); 1156int qlcnic_fw_cmd_set_phy(struct qlcnic_adapter *adapter, u32 reg, u32 val);
1131 1157
@@ -1252,6 +1278,11 @@ int qlcnic_toggle_eswitch(struct qlcnic_adapter *, u8, u8);
1252int qlcnic_config_switch_port(struct qlcnic_adapter *, u8, int, u8, u8, 1278int qlcnic_config_switch_port(struct qlcnic_adapter *, u8, int, u8, u8,
1253 u8, u8, u16); 1279 u8, u8, u16);
1254int qlcnic_config_port_mirroring(struct qlcnic_adapter *, u8, u8, u8); 1280int qlcnic_config_port_mirroring(struct qlcnic_adapter *, u8, u8, u8);
1281int qlcnic_get_port_stats(struct qlcnic_adapter *, const u8, const u8,
1282 struct __qlcnic_esw_statistics *);
1283int qlcnic_get_eswitch_stats(struct qlcnic_adapter *, const u8, u8,
1284 struct __qlcnic_esw_statistics *);
1285int qlcnic_clear_esw_stats(struct qlcnic_adapter *adapter, u8, u8, u8);
1255extern int qlcnic_config_tso; 1286extern int qlcnic_config_tso;
1256 1287
1257/* 1288/*