Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: rds.h
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
[0] Fix | Delete
/*
[1] Fix | Delete
* Copyright (c) 2008 Oracle. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* This software is available to you under a choice of one of two
[4] Fix | Delete
* licenses. You may choose to be licensed under the terms of the GNU
[5] Fix | Delete
* General Public License (GPL) Version 2, available from the file
[6] Fix | Delete
* COPYING in the main directory of this source tree, or the
[7] Fix | Delete
* OpenIB.org BSD license below:
[8] Fix | Delete
*
[9] Fix | Delete
* Redistribution and use in source and binary forms, with or
[10] Fix | Delete
* without modification, are permitted provided that the following
[11] Fix | Delete
* conditions are met:
[12] Fix | Delete
*
[13] Fix | Delete
* - Redistributions of source code must retain the above
[14] Fix | Delete
* copyright notice, this list of conditions and the following
[15] Fix | Delete
* disclaimer.
[16] Fix | Delete
*
[17] Fix | Delete
* - Redistributions in binary form must reproduce the above
[18] Fix | Delete
* copyright notice, this list of conditions and the following
[19] Fix | Delete
* disclaimer in the documentation and/or other materials
[20] Fix | Delete
* provided with the distribution.
[21] Fix | Delete
*
[22] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
[23] Fix | Delete
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
[24] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
[25] Fix | Delete
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
[26] Fix | Delete
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
[27] Fix | Delete
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
[28] Fix | Delete
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
[29] Fix | Delete
* SOFTWARE.
[30] Fix | Delete
*
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
#ifndef _LINUX_RDS_H
[34] Fix | Delete
#define _LINUX_RDS_H
[35] Fix | Delete
[36] Fix | Delete
#include <linux/types.h>
[37] Fix | Delete
#include <linux/socket.h> /* For __kernel_sockaddr_storage. */
[38] Fix | Delete
[39] Fix | Delete
#define RDS_IB_ABI_VERSION 0x301
[40] Fix | Delete
[41] Fix | Delete
#define SOL_RDS 276
[42] Fix | Delete
[43] Fix | Delete
/*
[44] Fix | Delete
* setsockopt/getsockopt for SOL_RDS
[45] Fix | Delete
*/
[46] Fix | Delete
#define RDS_CANCEL_SENT_TO 1
[47] Fix | Delete
#define RDS_GET_MR 2
[48] Fix | Delete
#define RDS_FREE_MR 3
[49] Fix | Delete
/* deprecated: RDS_BARRIER 4 */
[50] Fix | Delete
#define RDS_RECVERR 5
[51] Fix | Delete
#define RDS_CONG_MONITOR 6
[52] Fix | Delete
#define RDS_GET_MR_FOR_DEST 7
[53] Fix | Delete
#define SO_RDS_TRANSPORT 8
[54] Fix | Delete
[55] Fix | Delete
/* Socket option to tap receive path latency
[56] Fix | Delete
* SO_RDS: SO_RDS_MSG_RXPATH_LATENCY
[57] Fix | Delete
* Format used struct rds_rx_trace_so
[58] Fix | Delete
*/
[59] Fix | Delete
#define SO_RDS_MSG_RXPATH_LATENCY 10
[60] Fix | Delete
[61] Fix | Delete
[62] Fix | Delete
/* supported values for SO_RDS_TRANSPORT */
[63] Fix | Delete
#define RDS_TRANS_IB 0
[64] Fix | Delete
#define RDS_TRANS_IWARP 1
[65] Fix | Delete
#define RDS_TRANS_TCP 2
[66] Fix | Delete
#define RDS_TRANS_COUNT 3
[67] Fix | Delete
#define RDS_TRANS_NONE (~0)
[68] Fix | Delete
[69] Fix | Delete
/*
[70] Fix | Delete
* Control message types for SOL_RDS.
[71] Fix | Delete
*
[72] Fix | Delete
* CMSG_RDMA_ARGS (sendmsg)
[73] Fix | Delete
* Request a RDMA transfer to/from the specified
[74] Fix | Delete
* memory ranges.
[75] Fix | Delete
* The cmsg_data is a struct rds_rdma_args.
[76] Fix | Delete
* RDS_CMSG_RDMA_DEST (recvmsg, sendmsg)
[77] Fix | Delete
* Kernel informs application about intended
[78] Fix | Delete
* source/destination of a RDMA transfer
[79] Fix | Delete
* RDS_CMSG_RDMA_MAP (sendmsg)
[80] Fix | Delete
* Application asks kernel to map the given
[81] Fix | Delete
* memory range into a IB MR, and send the
[82] Fix | Delete
* R_Key along in an RDS extension header.
[83] Fix | Delete
* The cmsg_data is a struct rds_get_mr_args,
[84] Fix | Delete
* the same as for the GET_MR setsockopt.
[85] Fix | Delete
* RDS_CMSG_RDMA_STATUS (recvmsg)
[86] Fix | Delete
* Returns the status of a completed RDMA operation.
[87] Fix | Delete
* RDS_CMSG_RXPATH_LATENCY(recvmsg)
[88] Fix | Delete
* Returns rds message latencies in various stages of receive
[89] Fix | Delete
* path in nS. Its set per socket using SO_RDS_MSG_RXPATH_LATENCY
[90] Fix | Delete
* socket option. Legitimate points are defined in
[91] Fix | Delete
* enum rds_message_rxpath_latency. More points can be added in
[92] Fix | Delete
* future. CSMG format is struct rds_cmsg_rx_trace.
[93] Fix | Delete
*/
[94] Fix | Delete
#define RDS_CMSG_RDMA_ARGS 1
[95] Fix | Delete
#define RDS_CMSG_RDMA_DEST 2
[96] Fix | Delete
#define RDS_CMSG_RDMA_MAP 3
[97] Fix | Delete
#define RDS_CMSG_RDMA_STATUS 4
[98] Fix | Delete
#define RDS_CMSG_CONG_UPDATE 5
[99] Fix | Delete
#define RDS_CMSG_ATOMIC_FADD 6
[100] Fix | Delete
#define RDS_CMSG_ATOMIC_CSWP 7
[101] Fix | Delete
#define RDS_CMSG_MASKED_ATOMIC_FADD 8
[102] Fix | Delete
#define RDS_CMSG_MASKED_ATOMIC_CSWP 9
[103] Fix | Delete
#define RDS_CMSG_RXPATH_LATENCY 11
[104] Fix | Delete
#define RDS_CMSG_ZCOPY_COOKIE 12
[105] Fix | Delete
#define RDS_CMSG_ZCOPY_COMPLETION 13
[106] Fix | Delete
[107] Fix | Delete
#define RDS_INFO_FIRST 10000
[108] Fix | Delete
#define RDS_INFO_COUNTERS 10000
[109] Fix | Delete
#define RDS_INFO_CONNECTIONS 10001
[110] Fix | Delete
/* 10002 aka RDS_INFO_FLOWS is deprecated */
[111] Fix | Delete
#define RDS_INFO_SEND_MESSAGES 10003
[112] Fix | Delete
#define RDS_INFO_RETRANS_MESSAGES 10004
[113] Fix | Delete
#define RDS_INFO_RECV_MESSAGES 10005
[114] Fix | Delete
#define RDS_INFO_SOCKETS 10006
[115] Fix | Delete
#define RDS_INFO_TCP_SOCKETS 10007
[116] Fix | Delete
#define RDS_INFO_IB_CONNECTIONS 10008
[117] Fix | Delete
#define RDS_INFO_CONNECTION_STATS 10009
[118] Fix | Delete
#define RDS_INFO_IWARP_CONNECTIONS 10010
[119] Fix | Delete
#define RDS_INFO_LAST 10010
[120] Fix | Delete
[121] Fix | Delete
struct rds_info_counter {
[122] Fix | Delete
__u8 name[32];
[123] Fix | Delete
__u64 value;
[124] Fix | Delete
} __attribute__((packed));
[125] Fix | Delete
[126] Fix | Delete
#define RDS_INFO_CONNECTION_FLAG_SENDING 0x01
[127] Fix | Delete
#define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02
[128] Fix | Delete
#define RDS_INFO_CONNECTION_FLAG_CONNECTED 0x04
[129] Fix | Delete
[130] Fix | Delete
#define TRANSNAMSIZ 16
[131] Fix | Delete
[132] Fix | Delete
struct rds_info_connection {
[133] Fix | Delete
__u64 next_tx_seq;
[134] Fix | Delete
__u64 next_rx_seq;
[135] Fix | Delete
__be32 laddr;
[136] Fix | Delete
__be32 faddr;
[137] Fix | Delete
__u8 transport[TRANSNAMSIZ]; /* null term ascii */
[138] Fix | Delete
__u8 flags;
[139] Fix | Delete
} __attribute__((packed));
[140] Fix | Delete
[141] Fix | Delete
#define RDS_INFO_MESSAGE_FLAG_ACK 0x01
[142] Fix | Delete
#define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02
[143] Fix | Delete
[144] Fix | Delete
struct rds_info_message {
[145] Fix | Delete
__u64 seq;
[146] Fix | Delete
__u32 len;
[147] Fix | Delete
__be32 laddr;
[148] Fix | Delete
__be32 faddr;
[149] Fix | Delete
__be16 lport;
[150] Fix | Delete
__be16 fport;
[151] Fix | Delete
__u8 flags;
[152] Fix | Delete
} __attribute__((packed));
[153] Fix | Delete
[154] Fix | Delete
struct rds_info_socket {
[155] Fix | Delete
__u32 sndbuf;
[156] Fix | Delete
__be32 bound_addr;
[157] Fix | Delete
__be32 connected_addr;
[158] Fix | Delete
__be16 bound_port;
[159] Fix | Delete
__be16 connected_port;
[160] Fix | Delete
__u32 rcvbuf;
[161] Fix | Delete
__u64 inum;
[162] Fix | Delete
} __attribute__((packed));
[163] Fix | Delete
[164] Fix | Delete
struct rds_info_tcp_socket {
[165] Fix | Delete
__be32 local_addr;
[166] Fix | Delete
__be16 local_port;
[167] Fix | Delete
__be32 peer_addr;
[168] Fix | Delete
__be16 peer_port;
[169] Fix | Delete
__u64 hdr_rem;
[170] Fix | Delete
__u64 data_rem;
[171] Fix | Delete
__u32 last_sent_nxt;
[172] Fix | Delete
__u32 last_expected_una;
[173] Fix | Delete
__u32 last_seen_una;
[174] Fix | Delete
} __attribute__((packed));
[175] Fix | Delete
[176] Fix | Delete
#define RDS_IB_GID_LEN 16
[177] Fix | Delete
struct rds_info_rdma_connection {
[178] Fix | Delete
__be32 src_addr;
[179] Fix | Delete
__be32 dst_addr;
[180] Fix | Delete
__u8 src_gid[RDS_IB_GID_LEN];
[181] Fix | Delete
__u8 dst_gid[RDS_IB_GID_LEN];
[182] Fix | Delete
[183] Fix | Delete
__u32 max_send_wr;
[184] Fix | Delete
__u32 max_recv_wr;
[185] Fix | Delete
__u32 max_send_sge;
[186] Fix | Delete
__u32 rdma_mr_max;
[187] Fix | Delete
__u32 rdma_mr_size;
[188] Fix | Delete
};
[189] Fix | Delete
[190] Fix | Delete
/* RDS message Receive Path Latency points */
[191] Fix | Delete
enum rds_message_rxpath_latency {
[192] Fix | Delete
RDS_MSG_RX_HDR_TO_DGRAM_START = 0,
[193] Fix | Delete
RDS_MSG_RX_DGRAM_REASSEMBLE,
[194] Fix | Delete
RDS_MSG_RX_DGRAM_DELIVERED,
[195] Fix | Delete
RDS_MSG_RX_DGRAM_TRACE_MAX
[196] Fix | Delete
};
[197] Fix | Delete
[198] Fix | Delete
struct rds_rx_trace_so {
[199] Fix | Delete
__u8 rx_traces;
[200] Fix | Delete
__u8 rx_trace_pos[RDS_MSG_RX_DGRAM_TRACE_MAX];
[201] Fix | Delete
};
[202] Fix | Delete
[203] Fix | Delete
struct rds_cmsg_rx_trace {
[204] Fix | Delete
__u8 rx_traces;
[205] Fix | Delete
__u8 rx_trace_pos[RDS_MSG_RX_DGRAM_TRACE_MAX];
[206] Fix | Delete
__u64 rx_trace[RDS_MSG_RX_DGRAM_TRACE_MAX];
[207] Fix | Delete
};
[208] Fix | Delete
[209] Fix | Delete
/*
[210] Fix | Delete
* Congestion monitoring.
[211] Fix | Delete
* Congestion control in RDS happens at the host connection
[212] Fix | Delete
* level by exchanging a bitmap marking congested ports.
[213] Fix | Delete
* By default, a process sleeping in poll() is always woken
[214] Fix | Delete
* up when the congestion map is updated.
[215] Fix | Delete
* With explicit monitoring, an application can have more
[216] Fix | Delete
* fine-grained control.
[217] Fix | Delete
* The application installs a 64bit mask value in the socket,
[218] Fix | Delete
* where each bit corresponds to a group of ports.
[219] Fix | Delete
* When a congestion update arrives, RDS checks the set of
[220] Fix | Delete
* ports that are now uncongested against the list bit mask
[221] Fix | Delete
* installed in the socket, and if they overlap, we queue a
[222] Fix | Delete
* cong_notification on the socket.
[223] Fix | Delete
*
[224] Fix | Delete
* To install the congestion monitor bitmask, use RDS_CONG_MONITOR
[225] Fix | Delete
* with the 64bit mask.
[226] Fix | Delete
* Congestion updates are received via RDS_CMSG_CONG_UPDATE
[227] Fix | Delete
* control messages.
[228] Fix | Delete
*
[229] Fix | Delete
* The correspondence between bits and ports is
[230] Fix | Delete
* 1 << (portnum % 64)
[231] Fix | Delete
*/
[232] Fix | Delete
#define RDS_CONG_MONITOR_SIZE 64
[233] Fix | Delete
#define RDS_CONG_MONITOR_BIT(port) (((unsigned int) port) % RDS_CONG_MONITOR_SIZE)
[234] Fix | Delete
#define RDS_CONG_MONITOR_MASK(port) (1ULL << RDS_CONG_MONITOR_BIT(port))
[235] Fix | Delete
[236] Fix | Delete
/*
[237] Fix | Delete
* RDMA related types
[238] Fix | Delete
*/
[239] Fix | Delete
[240] Fix | Delete
/*
[241] Fix | Delete
* This encapsulates a remote memory location.
[242] Fix | Delete
* In the current implementation, it contains the R_Key
[243] Fix | Delete
* of the remote memory region, and the offset into it
[244] Fix | Delete
* (so that the application does not have to worry about
[245] Fix | Delete
* alignment).
[246] Fix | Delete
*/
[247] Fix | Delete
typedef __u64 rds_rdma_cookie_t;
[248] Fix | Delete
[249] Fix | Delete
struct rds_iovec {
[250] Fix | Delete
__u64 addr;
[251] Fix | Delete
__u64 bytes;
[252] Fix | Delete
};
[253] Fix | Delete
[254] Fix | Delete
struct rds_get_mr_args {
[255] Fix | Delete
struct rds_iovec vec;
[256] Fix | Delete
__u64 cookie_addr;
[257] Fix | Delete
__u64 flags;
[258] Fix | Delete
};
[259] Fix | Delete
[260] Fix | Delete
struct rds_get_mr_for_dest_args {
[261] Fix | Delete
struct __kernel_sockaddr_storage dest_addr;
[262] Fix | Delete
struct rds_iovec vec;
[263] Fix | Delete
__u64 cookie_addr;
[264] Fix | Delete
__u64 flags;
[265] Fix | Delete
};
[266] Fix | Delete
[267] Fix | Delete
struct rds_free_mr_args {
[268] Fix | Delete
rds_rdma_cookie_t cookie;
[269] Fix | Delete
__u64 flags;
[270] Fix | Delete
};
[271] Fix | Delete
[272] Fix | Delete
struct rds_rdma_args {
[273] Fix | Delete
rds_rdma_cookie_t cookie;
[274] Fix | Delete
struct rds_iovec remote_vec;
[275] Fix | Delete
__u64 local_vec_addr;
[276] Fix | Delete
__u64 nr_local;
[277] Fix | Delete
__u64 flags;
[278] Fix | Delete
__u64 user_token;
[279] Fix | Delete
};
[280] Fix | Delete
[281] Fix | Delete
struct rds_atomic_args {
[282] Fix | Delete
rds_rdma_cookie_t cookie;
[283] Fix | Delete
__u64 local_addr;
[284] Fix | Delete
__u64 remote_addr;
[285] Fix | Delete
union {
[286] Fix | Delete
struct {
[287] Fix | Delete
__u64 compare;
[288] Fix | Delete
__u64 swap;
[289] Fix | Delete
} cswp;
[290] Fix | Delete
struct {
[291] Fix | Delete
__u64 add;
[292] Fix | Delete
} fadd;
[293] Fix | Delete
struct {
[294] Fix | Delete
__u64 compare;
[295] Fix | Delete
__u64 swap;
[296] Fix | Delete
__u64 compare_mask;
[297] Fix | Delete
__u64 swap_mask;
[298] Fix | Delete
} m_cswp;
[299] Fix | Delete
struct {
[300] Fix | Delete
__u64 add;
[301] Fix | Delete
__u64 nocarry_mask;
[302] Fix | Delete
} m_fadd;
[303] Fix | Delete
};
[304] Fix | Delete
__u64 flags;
[305] Fix | Delete
__u64 user_token;
[306] Fix | Delete
};
[307] Fix | Delete
[308] Fix | Delete
struct rds_rdma_notify {
[309] Fix | Delete
__u64 user_token;
[310] Fix | Delete
__s32 status;
[311] Fix | Delete
};
[312] Fix | Delete
[313] Fix | Delete
#define RDS_RDMA_SUCCESS 0
[314] Fix | Delete
#define RDS_RDMA_REMOTE_ERROR 1
[315] Fix | Delete
#define RDS_RDMA_CANCELED 2
[316] Fix | Delete
#define RDS_RDMA_DROPPED 3
[317] Fix | Delete
#define RDS_RDMA_OTHER_ERROR 4
[318] Fix | Delete
[319] Fix | Delete
#define RDS_MAX_ZCOOKIES 8
[320] Fix | Delete
struct rds_zcopy_cookies {
[321] Fix | Delete
__u32 num;
[322] Fix | Delete
__u32 cookies[RDS_MAX_ZCOOKIES];
[323] Fix | Delete
};
[324] Fix | Delete
[325] Fix | Delete
/*
[326] Fix | Delete
* Common set of flags for all RDMA related structs
[327] Fix | Delete
*/
[328] Fix | Delete
#define RDS_RDMA_READWRITE 0x0001
[329] Fix | Delete
#define RDS_RDMA_FENCE 0x0002 /* use FENCE for immediate send */
[330] Fix | Delete
#define RDS_RDMA_INVALIDATE 0x0004 /* invalidate R_Key after freeing MR */
[331] Fix | Delete
#define RDS_RDMA_USE_ONCE 0x0008 /* free MR after use */
[332] Fix | Delete
#define RDS_RDMA_DONTWAIT 0x0010 /* Don't wait in SET_BARRIER */
[333] Fix | Delete
#define RDS_RDMA_NOTIFY_ME 0x0020 /* Notify when operation completes */
[334] Fix | Delete
#define RDS_RDMA_SILENT 0x0040 /* Do not interrupt remote */
[335] Fix | Delete
[336] Fix | Delete
#endif /* IB_RDS_H */
[337] Fix | Delete
[338] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function