[openib-general] [PATCH] [TRIVIAL] ib_mad: Eliminate unneeded IB_MAD_QPS_SUPPORTED definition
Hal Rosenstock
halr at voltaire.com
Mon Sep 27 09:43:06 PDT 2004
ib_mad: Eliminate unneeded IB_MAD_QPS_SUPPORTED definition
Index: ib_mad_priv.h
===================================================================
--- ib_mad_priv.h (revision 892)
+++ ib_mad_priv.h (working copy)
@@ -62,7 +62,6 @@
#include <ib_smi.h>
#define IB_MAD_QPS_CORE 2 /* Always QP0 and QP1 as a minimum */
-#define IB_MAD_QPS_SUPPORTED 2
/* QP and CQ parameters */
#define IB_MAD_QP_SEND_SIZE 2048
@@ -135,7 +134,7 @@
struct list_head port_list;
struct ib_device *device;
int port_num;
- struct ib_qp *qp[IB_MAD_QPS_SUPPORTED];
+ struct ib_qp *qp[IB_MAD_QPS_CORE];
struct ib_cq *cq;
struct ib_pd *pd;
struct ib_mr *mr;
@@ -149,9 +148,9 @@
int send_posted_mad_count;
spinlock_t recv_list_lock;
- struct list_head recv_posted_mad_list[IB_MAD_QPS_SUPPORTED];
- int recv_posted_mad_count[IB_MAD_QPS_SUPPORTED];
- u32 recv_wr_index[IB_MAD_QPS_SUPPORTED];
+ struct list_head recv_posted_mad_list[IB_MAD_QPS_CORE];
+ int recv_posted_mad_count[IB_MAD_QPS_CORE];
+ u32 recv_wr_index[IB_MAD_QPS_CORE];
struct task_struct *mad_thread;
struct ib_mad_thread_private mad_thread_private;
Index: ib_mad.c
===================================================================
--- ib_mad.c (revision 892)
+++ ib_mad.c (working copy)
@@ -1068,7 +1068,7 @@
int i;
unsigned long flags;
- for (i = 0; i < IB_MAD_QPS_SUPPORTED; i++) {
+ for (i = 0; i < IB_MAD_QPS_CORE; i++) {
spin_lock_irqsave(&port_priv->recv_list_lock, flags);
while (!list_empty(&port_priv->recv_posted_mad_list[i])) {
@@ -1416,7 +1416,7 @@
INIT_LIST_HEAD(&port_priv->agent_list);
INIT_LIST_HEAD(&port_priv->send_posted_mad_list);
port_priv->send_posted_mad_count = 0;
- for (i = 0; i < IB_MAD_QPS_SUPPORTED; i++) {
+ for (i = 0; i < IB_MAD_QPS_CORE; i++) {
INIT_LIST_HEAD(&port_priv->recv_posted_mad_list[i]);
port_priv->recv_posted_mad_count[i] = 0;
port_priv->recv_wr_index[i] = 0;
More information about the general
mailing list