@@ -214,19 +214,6 @@ struct mlx4_qp {
uint32_t qp_cap_cache;
};
-struct mlx4_av {
- uint32_t port_pd;
- uint8_t reserved1;
- uint8_t g_slid;
- uint16_t dlid;
- uint8_t reserved2;
- uint8_t gid_index;
- uint8_t stat_rate;
- uint8_t hop_limit;
- uint32_t sl_tclass_flowlabel;
- uint8_t dgid[16];
-};
-
struct mlx4_ah {
struct ibv_ah ibv_ah;
struct mlx4_av av;
@@ -325,8 +325,21 @@ struct mlx4_wqe_ctrl_seg {
uint32_t imm;
};
+struct mlx4_av {
+ uint32_t port_pd;
+ uint8_t reserved1;
+ uint8_t g_slid;
+ uint16_t dlid;
+ uint8_t reserved2;
+ uint8_t gid_index;
+ uint8_t stat_rate;
+ uint8_t hop_limit;
+ uint32_t sl_tclass_flowlabel;
+ uint8_t dgid[16];
+};
+
struct mlx4_wqe_datagram_seg {
- uint32_t av[8];
+ struct mlx4_av av;
uint32_t dqpn;
uint32_t qkey;
uint16_t vlan;
@@ -175,7 +175,7 @@ static void set_atomic_seg(struct mlx4_wqe_atomic_seg *aseg, struct ibv_send_wr
static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg,
struct ibv_send_wr *wr)
{
- memcpy(dseg->av, &to_mah(wr->wr.ud.ah)->av, sizeof (struct mlx4_av));
+ memcpy(&dseg->av, &to_mah(wr->wr.ud.ah)->av, sizeof (struct mlx4_av));
dseg->dqpn = htobe32(wr->wr.ud.remote_qpn);
dseg->qkey = htobe32(wr->wr.ud.remote_qkey);
dseg->vlan = htobe16(to_mah(wr->wr.ud.ah)->vlan);