diff options
author | Steve Wise <swise@opengridcomputing.com> | 2008-07-15 02:48:48 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-07-15 02:48:48 -0400 |
commit | 14cc180f7b032f8484c1a3d0533b1129ffe307fd (patch) | |
tree | 0f544f596e00955f56cb38051c5e2ce3c40c0b40 /drivers/net | |
parent | 7f624d023b5fb150831e02c1e4c0f2619ade72c2 (diff) |
RDMA/cxgb3: Add support for protocol statistics
- Add a new rdma ctl command called RDMA_GET_MIB to the cxgb3 low
level driver to obtain the protocol mib from the rnic hardware.
- Add new iw_cxgb3 provider method to get the MIB from the low level
driver.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_ctl_defs.h | 1 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/cxgb3_ctl_defs.h b/drivers/net/cxgb3/cxgb3_ctl_defs.h index 6c4f32066919..ed0ecd9679cb 100644 --- a/drivers/net/cxgb3/cxgb3_ctl_defs.h +++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h | |||
@@ -54,6 +54,7 @@ enum { | |||
54 | RDMA_CQ_DISABLE = 16, | 54 | RDMA_CQ_DISABLE = 16, |
55 | RDMA_CTRL_QP_SETUP = 17, | 55 | RDMA_CTRL_QP_SETUP = 17, |
56 | RDMA_GET_MEM = 18, | 56 | RDMA_GET_MEM = 18, |
57 | RDMA_GET_MIB = 19, | ||
57 | 58 | ||
58 | GET_RX_PAGE_INFO = 50, | 59 | GET_RX_PAGE_INFO = 50, |
59 | }; | 60 | }; |
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index ff9c013ce535..cf2696873796 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -303,6 +303,12 @@ static int cxgb_rdma_ctl(struct adapter *adapter, unsigned int req, void *data) | |||
303 | spin_unlock_irq(&adapter->sge.reg_lock); | 303 | spin_unlock_irq(&adapter->sge.reg_lock); |
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | case RDMA_GET_MIB: { | ||
307 | spin_lock(&adapter->stats_lock); | ||
308 | t3_tp_get_mib_stats(adapter, (struct tp_mib_stats *)data); | ||
309 | spin_unlock(&adapter->stats_lock); | ||
310 | break; | ||
311 | } | ||
306 | default: | 312 | default: |
307 | ret = -EOPNOTSUPP; | 313 | ret = -EOPNOTSUPP; |
308 | } | 314 | } |
@@ -381,6 +387,7 @@ static int cxgb_offload_ctl(struct t3cdev *tdev, unsigned int req, void *data) | |||
381 | case RDMA_CQ_DISABLE: | 387 | case RDMA_CQ_DISABLE: |
382 | case RDMA_CTRL_QP_SETUP: | 388 | case RDMA_CTRL_QP_SETUP: |
383 | case RDMA_GET_MEM: | 389 | case RDMA_GET_MEM: |
390 | case RDMA_GET_MIB: | ||
384 | if (!offload_running(adapter)) | 391 | if (!offload_running(adapter)) |
385 | return -EAGAIN; | 392 | return -EAGAIN; |
386 | return cxgb_rdma_ctl(adapter, req, data); | 393 | return cxgb_rdma_ctl(adapter, req, data); |