/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2019 Isilon Systems, LLC.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13*14* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND15* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE16* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE17* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE18* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL19* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS20* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)21* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT22* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY23* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF24* SUCH DAMAGE.25*/2627#ifndef _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_28#define _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_2930#include <sys/cdefs.h>31#include <netinet/in.h>3233#include <rdma/ib_cm.h>3435union cma_ip_addr {36struct in6_addr ip6;37struct {38__be32 pad[3];39__be32 addr;40} ip4;41};4243struct sdp_bsdh {44u8 mid;45u8 flags;46__u16 bufs;47__u32 len;48__u32 mseq;49__u32 mseq_ack;50} __packed;5152struct sdp_hh {53struct sdp_bsdh bsdh;54u8 majv_minv;55u8 ipv_cap;56u8 rsvd1;57u8 max_adverts;58__u32 desremrcvsz;59__u32 localrcvsz;60__u16 port;61__u16 rsvd2;62union cma_ip_addr src_addr;63union cma_ip_addr dst_addr;64u8 rsvd3[IB_CM_REQ_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 48];65} __packed;6667struct sdp_hah {68struct sdp_bsdh bsdh;69u8 majv_minv;70u8 ipv_cap;71u8 rsvd1;72u8 ext_max_adverts;73__u32 actrcvsz;74u8 rsvd2[IB_CM_REP_PRIVATE_DATA_SIZE - sizeof(struct sdp_bsdh) - 8];75} __packed;7677#endif /* _SYS_OFED_INCLUDE_RDMA_RDMA_SDP_H_ */787980