#include <rdma/ib_verbs.h>
#include <linux/sched.h>
#include <rdma/rdma_cm.h>
+#include <rdma/ib_cm.h>
#include "sdp_dbg.h"
/* Interval between sucessive polls in the Tx routine when polling is used
__u32 len;
__u32 mseq;
__u32 mseq_ack;
-};
+} __attribute__((__packed__));
union cma_ip_addr {
struct in6_addr ip6;
__u32 pad[3];
__u32 addr;
} ip4;
-};
+} __attribute__((__packed__));
/* TODO: too much? Can I avoid having the src/dst and port here? */
struct sdp_hh {
__u16 rsvd2;
union cma_ip_addr src_addr;
union cma_ip_addr dst_addr;
-};
+ u8 rsvd3[IB_CM_REQ_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 48];
+} __attribute__((__packed__));
struct sdp_hah {
struct sdp_bsdh bsdh;
u8 rsvd1;
u8 ext_max_adverts;
__u32 actrcvsz;
- u8 rsvd2[172]; /* was 156 on SDP 1.0 */
-};
+ u8 rsvd2[IB_CM_REP_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 8];
+} __attribute__((__packed__));
struct sdp_rrch {
__u32 len;
-};
+} __attribute__((__packed__));
struct sdp_srcah {
__u32 len;
__u32 rkey;
__u64 vaddr;
-};
+} __attribute__((__packed__));
struct sdp_buf {
struct sk_buff *skb;
u64 mapping[SDP_MAX_SEND_SKB_FRAGS + 1];
-};
+} __attribute__((__packed__));
struct sdp_chrecvbuf {
u32 size;
-};
+} __attribute__((__packed__));
/* Context used for synchronous zero copy bcopy (BZCOPY) */
struct bzcopy_state {
rx_ring_posted(sdp_sk(sk)));
memset(&hh, 0, sizeof hh);
hh.bsdh.mid = SDP_MID_HELLO;
- hh.bsdh.len = htonl(sizeof(struct sdp_bsdh) +
- sizeof(struct sdp_hh));
+ hh.bsdh.len = htonl(sizeof(struct sdp_hh));
hh.max_adverts = 1;
+ hh.ipv_cap = 0x40;
hh.majv_minv = SDP_MAJV_MINV;
sdp_init_buffers(sdp_sk(sk), rcvbuf_initial_size);
hh.bsdh.bufs = htons(rx_ring_posted(sdp_sk(sk)));
memset(&hah, 0, sizeof hah);
hah.bsdh.mid = SDP_MID_HELLO_ACK;
hah.bsdh.bufs = htons(rx_ring_posted(sdp_sk(child)));
- hah.bsdh.len = htonl(sizeof(struct sdp_bsdh) +
- sizeof(struct sdp_hah));
+ hah.bsdh.len = htonl(sizeof(struct sdp_hah));
hah.majv_minv = SDP_MAJV_MINV;
hah.ext_max_adverts = 1; /* Doesn't seem to be mandated by spec,
but just in case */