149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris/****************************************************************************
249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ****************************************************************************
349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***
449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   This header was automatically generated from a Linux kernel header
549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   of the same name, to make information necessary for userspace to
649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   call into the kernel available to libc.  It contains only constants,
749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   structures, and macros generated from the original header, and thus,
849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   contains no copyrightable information.
949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***
1049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   To edit the content of this header, modify the corresponding
1149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   source file (e.g. under external/kernel-headers/original/) then
1249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   run bionic/libc/kernel/tools/update_all.py
1349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***
1449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   Any manual change here will be lost the next time this script will
1549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***   be run. You've been warned!
1649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ***
1749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ****************************************************************************
1849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris ****************************************************************************/
1949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris#ifndef RDMA_USER_RXE_H
2049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris#define RDMA_USER_RXE_H
2149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris#include <linux/types.h>
2249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisunion rxe_gid {
2349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 raw[16];
2449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct {
2549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    __be64 subnet_prefix;
2649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    __be64 interface_id;
2749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  } global;
2849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
2949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_global_route {
3049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  union rxe_gid dgid;
3149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 flow_label;
3249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 sgid_index;
3349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 hop_limit;
3449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 traffic_class;
3549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
3649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_av {
3749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 port_num;
3849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u8 network_type;
3949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct rxe_global_route grh;
4049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  union {
4149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct sockaddr _sockaddr;
4249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct sockaddr_in _sockaddr_in;
4349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct sockaddr_in6 _sockaddr_in6;
4449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  } sgid_addr, dgid_addr;
4549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
4649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_send_wr {
4749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u64 wr_id;
4849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 num_sge;
4949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 opcode;
5049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 send_flags;
5149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  union {
5249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    __be32 imm_data;
5349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    __u32 invalidate_rkey;
5449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  } ex;
5549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  union {
5649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct {
5749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u64 remote_addr;
5849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u32 rkey;
5949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    } rdma;
6049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct {
6149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u64 remote_addr;
6249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u64 compare_add;
6349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u64 swap;
6449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u32 rkey;
6549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    } atomic;
6649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct {
6749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u32 remote_qpn;
6849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u32 remote_qkey;
6949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u16 pkey_index;
7049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    } ud;
7149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct {
7249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      struct ib_mr * mr;
7349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      __u32 key;
7449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris      int access;
7549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    } reg;
7649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  } wr;
7749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
7849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_sge {
7949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u64 addr;
8049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 length;
8149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 lkey;
8249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
8349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct mminfo {
8449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u64 offset;
8549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 size;
8649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 pad;
8749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
8849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_dma_info {
8949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 length;
9049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 resid;
9149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 cur_sge;
9249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 num_sge;
9349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 sge_offset;
9449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  union {
9549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    __u8 inline_data[0];
9649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris    struct rxe_sge sge[0];
9749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  };
9849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
9949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_send_wqe {
10049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct rxe_send_wr wr;
10149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct rxe_av av;
10249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 status;
10349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 state;
10449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u64 iova;
10549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 mask;
10649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 first_psn;
10749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 last_psn;
10849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 ack_length;
10949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 ssn;
11049f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 has_rd_atomic;
11149f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct rxe_dma_info dma;
11249f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
11349f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferrisstruct rxe_recv_wqe {
11449f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u64 wr_id;
11549f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 num_sge;
11649f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  __u32 padding;
11749f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris  struct rxe_dma_info dma;
11849f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris};
11949f525c47bd383cd6a87db8f067cddb3ab620d17Christopher Ferris#endif
120