+2006-04-11 Roland Dreier <rdreier@cisco.com>
+
+ * include/infiniband/sa-kern-abi.h: Deprecate struct
+ ib_kern_path_rec name; struct ibv_kern_path_rec is now preferred.
+
+ * include/infiniband/sa.h: Deprecate struct ib_sa_XXX names;
+ struct ibv_sa_XXX is now preferred.
+
+ * src/marshall.c, include/infiniband/marshall.h: Deprecate
+ ib_copy_XXX() names; ibv_copy_XXX() is preferred. Add stub
+ wrappers with the old names so old binaries still work.
+
2006-04-11 Hoang-Nam Nguyen <HNGUYEN@de.ibm.com>
* src/verbs.c (ibv_rate_to_mult, mult_to_ibv_rate): Add new
# define END_C_DECLS
#endif /* __cplusplus */
+#if __GNUC__ >= 3
+# define __attribute_deprecated __attribute__((deprecated))
+#else
+# define __attribute_deprecated
+#endif
+
BEGIN_C_DECLS
+void ibv_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
+ struct ibv_kern_qp_attr *src);
+
+void ibv_copy_path_rec_from_kern(struct ibv_sa_path_rec *dst,
+ struct ibv_kern_path_rec *src);
+
+void ibv_copy_path_rec_to_kern(struct ibv_kern_path_rec *dst,
+ struct ibv_sa_path_rec *src);
+
+/*
+ * Obsolete, deprecated names. Will be removed in libibverbs 1.1.
+ */
+
void ib_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
- struct ibv_kern_qp_attr *src);
+ struct ibv_kern_qp_attr *src) __attribute_deprecated;
void ib_copy_path_rec_from_kern(struct ib_sa_path_rec *dst,
- struct ib_kern_path_rec *src);
+ struct ib_kern_path_rec *src) __attribute_deprecated;
void ib_copy_path_rec_to_kern(struct ib_kern_path_rec *dst,
- struct ib_sa_path_rec *src);
+ struct ib_sa_path_rec *src) __attribute_deprecated;
END_C_DECLS
+#undef __attribute_deprecated
+
#endif /* INFINIBAND_MARSHALL_H */
* SOFTWARE.
*/
-#ifndef SA_KERN_ABI_H
-#define SA_KERN_ABI_H
+#ifndef INFINIBAND_SA_KERN_ABI_H
+#define INFINIBAND_SA_KERN_ABI_H
#include <linux/types.h>
-struct ib_kern_path_rec {
+/*
+ * Obsolete, deprecated names. Will be removed in libibverbs 1.1.
+ */
+#define ib_kern_path_rec ibv_kern_path_rec
+
+struct ibv_kern_path_rec {
__u8 dgid[16];
__u8 sgid[16];
__u16 dlid;
__u8 preference;
};
-#endif /* SA_KERN_ABI_H */
+#endif /* INFINIBAND_SA_KERN_ABI_H */
* $Id: sa.h 2616 2005-06-15 15:22:39Z halr $
*/
-#ifndef IB_SA_H
-#define IB_SA_H
+#ifndef INFINIBAND_SA_H
+#define INFINIBAND_SA_H
#include <infiniband/verbs.h>
-enum ib_sa_rate {
- IB_SA_RATE_2_5_GBPS = 2,
- IB_SA_RATE_5_GBPS = 5,
- IB_SA_RATE_10_GBPS = 3,
- IB_SA_RATE_20_GBPS = 6,
- IB_SA_RATE_30_GBPS = 4,
- IB_SA_RATE_40_GBPS = 7,
- IB_SA_RATE_60_GBPS = 8,
- IB_SA_RATE_80_GBPS = 9,
- IB_SA_RATE_120_GBPS = 10
-};
-
-static inline int ib_sa_rate_enum_to_int(enum ib_sa_rate rate)
-{
- switch (rate) {
- case IB_SA_RATE_2_5_GBPS: return 1;
- case IB_SA_RATE_5_GBPS: return 2;
- case IB_SA_RATE_10_GBPS: return 4;
- case IB_SA_RATE_20_GBPS: return 8;
- case IB_SA_RATE_30_GBPS: return 12;
- case IB_SA_RATE_40_GBPS: return 16;
- case IB_SA_RATE_60_GBPS: return 24;
- case IB_SA_RATE_80_GBPS: return 32;
- case IB_SA_RATE_120_GBPS: return 48;
- default: return -1;
- }
-}
+/*
+ * Obsolete, deprecated names. Will be removed in libibverbs 1.1.
+ */
+#define ib_sa_path_rec ibv_sa_path_rec
+#define ib_sa_mcmember_rec ibv_sa_mcmember_rec
+#define ib_sa_service_rec ibv_sa_service_rec
-struct ib_sa_path_rec {
+struct ibv_sa_path_rec {
/* reserved */
/* reserved */
union ibv_gid dgid;
uint8_t preference;
};
-struct ib_sa_mcmember_rec {
+struct ibv_sa_mcmember_rec {
union ibv_gid mgid;
union ibv_gid port_gid;
uint32_t qkey;
int proxy_join;
};
-struct ib_sa_service_rec {
+struct ibv_sa_service_rec {
uint64_t id;
union ibv_gid gid;
uint16_t pkey;
uint64_t data64[2];
};
-#endif /* IB_SA_H */
+#endif /* INFINIBAND_SA_H */
ibv_cmd_destroy_ah;
ibv_cmd_attach_mcast;
ibv_cmd_detach_mcast;
+ ibv_copy_qp_attr_from_kern;
+ ibv_copy_path_rec_from_kern;
+ ibv_copy_path_rec_to_kern;
+ ibv_rate_to_mult;
+ mult_to_ibv_rate;
ib_copy_qp_attr_from_kern;
ib_copy_path_rec_from_kern;
ib_copy_path_rec_to_kern;
- ibv_rate_to_mult;
- mult_to_ibv_rate;
local: *;
};
#include <infiniband/marshall.h>
-static void ib_copy_ah_attr_from_kern(struct ibv_ah_attr *dst,
- struct ibv_kern_ah_attr *src)
+static void ibv_copy_ah_attr_from_kern(struct ibv_ah_attr *dst,
+ struct ibv_kern_ah_attr *src)
{
memcpy(dst->grh.dgid.raw, src->grh.dgid, sizeof dst->grh.dgid);
dst->grh.flow_label = src->grh.flow_label;
dst->port_num = src->port_num;
}
-void ib_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
- struct ibv_kern_qp_attr *src)
+void ibv_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
+ struct ibv_kern_qp_attr *src)
{
dst->cur_qp_state = src->cur_qp_state;
dst->path_mtu = src->path_mtu;
dst->cap.max_recv_sge = src->max_recv_sge;
dst->cap.max_inline_data = src->max_inline_data;
- ib_copy_ah_attr_from_kern(&dst->ah_attr, &src->ah_attr);
- ib_copy_ah_attr_from_kern(&dst->alt_ah_attr, &src->alt_ah_attr);
+ ibv_copy_ah_attr_from_kern(&dst->ah_attr, &src->ah_attr);
+ ibv_copy_ah_attr_from_kern(&dst->alt_ah_attr, &src->alt_ah_attr);
dst->pkey_index = src->pkey_index;
dst->alt_pkey_index = src->alt_pkey_index;
dst->alt_timeout = src->alt_timeout;
}
-void ib_copy_path_rec_from_kern(struct ib_sa_path_rec *dst,
- struct ib_kern_path_rec *src)
+void ibv_copy_path_rec_from_kern(struct ibv_sa_path_rec *dst,
+ struct ibv_kern_path_rec *src)
{
memcpy(dst->dgid.raw, src->dgid, sizeof dst->dgid);
memcpy(dst->sgid.raw, src->sgid, sizeof dst->sgid);
dst->packet_life_time_selector = src->packet_life_time_selector;
}
-void ib_copy_path_rec_to_kern(struct ib_kern_path_rec *dst,
- struct ib_sa_path_rec *src)
+void ibv_copy_path_rec_to_kern(struct ibv_kern_path_rec *dst,
+ struct ibv_sa_path_rec *src)
{
memcpy(dst->dgid, src->dgid.raw, sizeof src->dgid);
memcpy(dst->sgid, src->sgid.raw, sizeof src->sgid);
dst->preference = src->preference;
dst->packet_life_time_selector = src->packet_life_time_selector;
}
+
+void ib_copy_qp_attr_from_kern(struct ibv_qp_attr *dst,
+ struct ibv_kern_qp_attr *src)
+{
+ return ibv_copy_qp_attr_from_kern(dst, src);
+}
+
+void ib_copy_path_rec_from_kern(struct ib_sa_path_rec *dst,
+ struct ib_kern_path_rec *src)
+{
+ return ibv_copy_path_rec_from_kern(dst, src);
+}
+
+void ib_copy_path_rec_to_kern(struct ib_kern_path_rec *dst,
+ struct ib_sa_path_rec *src)
+{
+ return ibv_copy_path_rec_to_kern(dst, src);
+}