25 #ifndef __MOTR_NET_BULK_MEM_XPRT_H__ 26 #define __MOTR_NET_BULK_MEM_XPRT_H__ 33 #include <linux/inet.h> 36 typedef __be32 in_addr_t;
37 typedef __be16 in_port_t;
40 #include <sys/socket.h> 41 #include <netinet/in.h> 42 #include <arpa/inet.h> 286 const struct sockaddr_in *sa,
377 return dom->nd_xprt_private;
390 return bp->xb_buffer;
414 return mep->
xep_sa.sin_addr.s_addr;
426 return mep->
xep_sa.sin_port;
446 static inline bool mem_sa_eq(
const struct sockaddr_in *sa1,
447 const struct sockaddr_in *sa2)
449 return sa1->sin_addr.s_addr == sa2->sin_addr.s_addr &&
450 sa1->sin_port == sa2->sin_port;
struct m0_list_link xwi_link
static bool mem_sa_eq(const struct sockaddr_in *sa1, const struct sockaddr_in *sa2)
struct m0_cond xtm_work_list_cv
struct m0_net_buffer * xb_buffer
enum m0_net_bulk_mem_tm_state xtm_state
static struct m0_net_buffer * mem_wi_to_buffer(struct m0_net_bulk_mem_work_item *wi)
struct m0_list_link xd_dom_linkage
void(* bmo_wi_post_buffer_event)(struct m0_net_bulk_mem_work_item *wi)
struct m0_thread * xtm_worker_threads
enum m0_net_bulk_mem_work_opcode xwi_op
enum m0_net_bulk_mem_tm_state xwi_next_state
M0_INTERNAL int m0_mem_xprt_init(void)
struct m0_list xtm_work_list
struct m0_net_end_point * xwi_nbe_ep
#define container_of(ptr, type, member)
static in_port_t mem_ep_port(struct m0_net_end_point *ep)
static struct m0_net_bulk_mem_end_point * mem_ep_to_pvt(const struct m0_net_end_point *ep)
m0_bcount_t xwi_nbe_length
void(* bmo_ep_release)(struct m0_ref *ref)
void(* bmo_post_error)(struct m0_net_transfer_mc *tm, int status)
int(* bmo_ep_create)(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const struct sockaddr_in *sa, uint32_t id)
static struct m0_stob_domain * dom
void(* bmo_ep_free)(struct m0_net_bulk_mem_end_point *mep)
void(* bmo_ep_get)(struct m0_net_end_point *ep)
static in_addr_t mem_ep_addr(struct m0_net_end_point *ep)
struct m0_net_bulk_mem_work_item xb_wi
static struct m0_net_bulk_mem_work_item * mem_buffer_to_wi(struct m0_net_buffer *buf)
void(* bmo_wi_add)(struct m0_net_bulk_mem_work_item *wi, struct m0_net_bulk_mem_tm_pvt *tp)
static struct m0_net_bulk_mem_buffer_pvt * mem_buffer_to_pvt(const struct m0_net_buffer *nb)
m0_net_bulk_mem_work_fn_t bmo_work_fn[M0_NET_XOP_NR]
M0_INTERNAL void m0_mem_xprt_fini(void)
static uint32_t mem_ep_sid(struct m0_net_end_point *ep)
uint64_t xd_buf_id_counter
uint32_t xtm_callback_counter
const struct m0_net_bulk_mem_ops * xd_ops
struct sockaddr_in xep_sa
int(* bmo_desc_create)(struct m0_net_buf_desc *desc, struct m0_net_transfer_mc *tm, enum m0_net_queue_type qt, m0_bcount_t buflen, int64_t buf_id)
struct m0_net_domain * xd_dom
m0_net_bulk_mem_work_opcode
static struct bulkio_params * bp
struct m0_net_end_point xep_ep
static struct m0_net_bulk_mem_domain_pvt * mem_dom_to_pvt(const struct m0_net_domain *dom)
char xep_addr[M0_NET_BULK_MEM_XEP_ADDR_LEN]
static struct m0_net_bulk_mem_tm_pvt * mem_tm_to_pvt(const struct m0_net_transfer_mc *tm)
bool(* bmo_buffer_in_bounds)(const struct m0_net_buffer *nb)
struct m0_net_transfer_mc * xtm_tm
void(* m0_net_bulk_mem_work_fn_t)(struct m0_net_transfer_mc *tm, struct m0_net_bulk_mem_work_item *wi)