[openib-general] PATCH to rename port to port_num
Sean Hefty
mshefty at ichips.intel.com
Wed Aug 25 15:57:09 PDT 2004
On Wed, 25 Aug 2004 15:50:00 -0700
Sean Hefty <mshefty at ichips.intel.com> wrote:
> This patch renames port to port_num in the following structures: ib_ah_attr, ib_qp_attr, and ib_event.
And if I didn't miss anything, here's a patch for the mthca stack.
Index: ulp/ipoib/ipoib_verbs.c
===================================================================
--- ulp/ipoib/ipoib_verbs.c (revision 687)
+++ ulp/ipoib/ipoib_verbs.c (working copy)
@@ -145,7 +145,7 @@
qp_attr.qp_state = IB_QPS_INIT;
qp_attr.qkey = 0;
- qp_attr.port = priv->port;
+ qp_attr.port_num = priv->port;
qp_attr.pkey_index = pkey_index;
attr_mask =
IB_QP_QKEY |
Index: ulp/ipoib/ipoib_arp.c
===================================================================
--- ulp/ipoib/ipoib_arp.c (revision 687)
+++ ulp/ipoib/ipoib_arp.c (working copy)
@@ -412,7 +412,7 @@
.src_path_bits = 0,
.static_rate = 0,
.grh_flag = 0,
- .port = priv->port
+ .port_num = priv->port
};
entry->address_handle = ib_create_ah(priv->pd, &av);
Index: ulp/ipoib/ipoib_multicast.c
===================================================================
--- ulp/ipoib/ipoib_multicast.c (revision 687)
+++ ulp/ipoib/ipoib_multicast.c (working copy)
@@ -243,7 +243,7 @@
{
struct ib_ah_attr av = {
.dlid = mcast->mcast_member.mlid,
- .port = priv->port,
+ .port_num = priv->port,
.sl = mcast->mcast_member.sl,
.src_path_bits = 0,
.static_rate = 0,
Index: ulp/srp/srptp.c
===================================================================
--- ulp/srp/srptp.c (revision 687)
+++ ulp/srp/srptp.c (working copy)
@@ -706,7 +706,7 @@
IB_ACCESS_REMOTE_READ | IB_ACCESS_REMOTE_WRITE;
attr_mask |= IB_QP_PORT;
- qp_attr->port = conn->port->local_port;
+ qp_attr->port_num = conn->port->local_port;
attr_mask |= IB_QP_PKEY_INDEX;
qp_attr->pkey_index = 0;
Index: ulp/sdp/sdp_conn.c
===================================================================
--- ulp/sdp/sdp_conn.c (revision 687)
+++ ulp/sdp/sdp_conn.c (working copy)
@@ -1152,7 +1152,7 @@
IB_ACCESS_REMOTE_READ | IB_ACCESS_REMOTE_WRITE;
attr_mask |= IB_QP_PORT;
- qp_attr->port = conn->hw_port;
+ qp_attr->port_num = conn->hw_port;
attr_mask |= IB_QP_PKEY_INDEX;
qp_attr->pkey_index = 0;
Index: include/ib_verbs.h
===================================================================
--- include/ib_verbs.h (revision 687)
+++ include/ib_verbs.h (working copy)
@@ -62,7 +62,7 @@
u8 src_path_bits;
u8 static_rate;
u8 grh_flag;
- u8 port;
+ u8 port_num;
};
enum ib_wc_status {
@@ -261,11 +261,11 @@
u8 max_rd_atomic;
u8 max_dest_rd_atomic;
u8 min_rnr_timer;
- u8 port;
+ u8 port_num;
u8 timeout;
u8 retry_cnt;
u8 rnr_retry;
- u8 alt_port;
+ u8 alt_port_num;
u8 alt_timeout;
};
Index: core/cm_path_migration.c
===================================================================
--- core/cm_path_migration.c (revision 687)
+++ core/cm_path_migration.c (working copy)
@@ -61,13 +61,13 @@
qp_attr->path_mig_state = IB_MIG_REARM;
if (ib_cached_gid_find(connection->alternate_path.sgid, NULL,
- &qp_attr->alt_port, NULL)) {
+ &qp_attr->alt_port_num, NULL)) {
result = -EINVAL;
goto out;
}
if (ib_cached_pkey_find(connection->local_cm_device,
- qp_attr->alt_port,
+ qp_attr->alt_port_num,
connection->alternate_path.pkey,
&qp_attr->alt_pkey_index)) {
result = -EINVAL;
@@ -76,7 +76,7 @@
TS_TRACE(MOD_IB_CM, T_VERY_VERBOSE, TRACE_IB_CM_GEN,
"Loading alternate path: port %d, timeout %d, 0x%04x -> 0x%04x",
- qp_attr->alt_port,
+ qp_attr->alt_port_num,
qp_attr->alt_timeout,
connection->alternate_path.slid,
qp_attr->ah_attr.dlid);
Index: core/mad_ib.c
===================================================================
--- core/mad_ib.c (revision 687)
+++ core/mad_ib.c (working copy)
@@ -71,7 +71,7 @@
IB_SEND_SIGNALED | IB_SEND_SOLICITED;
av.dlid = mad->dlid;
- av.port = mad->port;
+ av.port_num = mad->port;
av.src_path_bits = 0;
av.grh_flag = mad->has_grh;
av.sl = mad->sl;
Index: core/cm_api.c
===================================================================
--- core/cm_api.c (revision 687)
+++ core/cm_api.c (working copy)
@@ -136,10 +136,10 @@
goto out;
}
- qp_attr->port = port;
+ qp_attr->port_num = port;
if (ib_cached_pkey_find(connection->local_cm_device,
- qp_attr->port,
+ qp_attr->port_num,
connection->primary_path.pkey,
&qp_attr->pkey_index)) {
ret = -EINVAL;
Index: core/cm_passive.c
===================================================================
--- core/cm_passive.c (revision 687)
+++ core/cm_passive.c (working copy)
@@ -133,13 +133,13 @@
memset(qp_attr, 0, sizeof *qp_attr);
- qp_attr->port = connection->local_cm_port;
- if (ib_cached_gid_find(connection->primary_path.sgid, NULL, &qp_attr->port, NULL)) {
- qp_attr->port = connection->local_cm_port;
+ qp_attr->port_num = connection->local_cm_port;
+ if (ib_cached_gid_find(connection->primary_path.sgid, NULL, &qp_attr->port_num, NULL)) {
+ qp_attr->port_num = connection->local_cm_port;
}
if (ib_cached_pkey_find(connection->local_cm_device,
- qp_attr->port,
+ qp_attr->port_num,
connection->primary_path.pkey,
&qp_attr->pkey_index)) {
goto fail;
@@ -286,10 +286,10 @@
qp_attr->alt_ah_attr.grh_flag = 0;
qp_attr->path_mig_state = IB_MIG_REARM;
- ib_cached_gid_find(connection->alternate_path.sgid, NULL, &qp_attr->alt_port, NULL);
+ ib_cached_gid_find(connection->alternate_path.sgid, NULL, &qp_attr->alt_port_num, NULL);
/* XXX check return value: */
ib_cached_pkey_find(connection->local_cm_device,
- qp_attr->alt_port,
+ qp_attr->alt_port_num,
connection->alternate_path.pkey,
&qp_attr->alt_pkey_index);
}
Index: core/cm_active.c
===================================================================
--- core/cm_active.c (revision 687)
+++ core/cm_active.c (working copy)
@@ -292,9 +292,9 @@
qp_attr->path_mig_state = IB_MIG_REARM;
ib_cached_gid_find(connection->alternate_path.sgid, NULL,
- &qp_attr->alt_port, NULL);
+ &qp_attr->alt_port_num, NULL);
ib_cached_pkey_find(connection->local_cm_device,
- qp_attr->alt_port,
+ qp_attr->alt_port_num,
connection->alternate_path.pkey,
&qp_attr->alt_pkey_index);
}
Index: hw/mthca/mthca_av.c
===================================================================
--- hw/mthca/mthca_av.c (revision 687)
+++ hw/mthca/mthca_av.c (working copy)
@@ -81,14 +81,14 @@
memset(av, 0, MTHCA_AV_SIZE);
- av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port << 24));
+ av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
av->g_slid = (!!ah_attr->grh_flag << 7) | ah_attr->src_path_bits;
av->dlid = cpu_to_be16(ah_attr->dlid);
av->msg_sr = (3 << 4) | /* 2K message */
ah_attr->static_rate;
av->sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
if (ah_attr->grh_flag) {
- av->gid_index = (ah_attr->port - 1) * dev->limits.gid_table_len +
+ av->gid_index = (ah_attr->port_num - 1) * dev->limits.gid_table_len +
ah_attr->grh.sgid_index;
av->hop_limit = ah_attr->grh.hop_limit;
av->sl_tclass_flowlabel |=
Index: hw/mthca/mthca_qp.c
===================================================================
--- hw/mthca/mthca_qp.c (revision 687)
+++ hw/mthca/mthca_qp.c (working copy)
@@ -573,7 +573,7 @@
else {
if (attr_mask & IB_QP_PORT) {
qp_context->pri_path.port_pkey |=
- cpu_to_be32(attr->port << 24);
+ cpu_to_be32(attr->port_num << 24);
qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PORT_NUM);
}
}
More information about the general
mailing list