Motr  M0
net.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 #pragma once
23 
24 #ifndef __MOTR___DTM0_NET_H__
25 #define __MOTR___DTM0_NET_H__
26 
27 #include "fid/fid.h" /* m0_fid */
28 #include "lib/vec.h" /* m0_bufvec */
29 
36 /*
37  * DTM0 transport overview
38  * -----------------------
39  *
40  * DTM0 transport is a component responsible for sending and receiving
41  * of DTM0 messages (P, REDO, EOL and so on) over Motr RPC layer.
42  * Transport contains a fixed amount of free buffers in snd and rcv queues.
43  * Because of that, the caller may need to wait until data is processed.
44  */
45 
46 struct m0_be_op;
47 struct m0_buf;
48 
52 };
53 
56 };
57 
62 };
63 
68 };
69 
70 struct m0_dtm0_msg {
72  union {
76  } dm_msg;
77 };
78 
82 };
83 
84 
85 struct m0_dtm0_net {
87 };
88 
89 M0_INTERNAL int m0_dtm0_net_init(struct m0_dtm0_net *dnet,
90  struct m0_dtm0_net_cfg *dnet_cfg);
91 M0_INTERNAL void m0_dtm0_net_fini(struct m0_dtm0_net *dnet);
92 
93 M0_INTERNAL void m0_dtm0_net_send(struct m0_dtm0_net *dnet,
94  struct m0_be_op *op,
95  const struct m0_fid *target,
96  const struct m0_dtm0_msg *msg);
97 
98 M0_INTERNAL void m0_dtm0_net_recv(struct m0_dtm0_net *dnet,
99  struct m0_be_op *op,
100  struct m0_fid *source,
101  struct m0_dtm0_msg *msg,
102  enum m0_dtm0_msg_type type);
103 
104 
106 #endif /* __MOTR___DTM0_NET_H__ */
107 
108 /*
109  * Local variables:
110  * c-indentation-style: "K&R"
111  * c-basic-offset: 8
112  * tab-width: 8
113  * fill-column: 80
114  * scroll-step: 1
115  * End:
116  */
117 /*
118  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
119  */
enum m0_dtm0_msg_type dm_type
Definition: net.h:71
struct m0_bufvec dmp_tid_array
Definition: net.h:60
struct m0_fid dme_initiator
Definition: net.h:55
struct m0_dtm0_net_cfg dnet_cfg
Definition: net.h:86
union m0_dtm0_msg::@163 dm_msg
op
Definition: libdemo.c:64
Definition: buf.h:37
M0_INTERNAL int m0_dtm0_net_init(struct m0_dtm0_net *dnet, struct m0_dtm0_net_cfg *dnet_cfg)
Definition: net.c:33
struct m0_dtm0_msg_persistent persistent
Definition: net.h:75
m0_dtm0_msg_type
Definition: net.h:64
struct m0_fid dnc_instance_fid
Definition: net.h:80
M0_INTERNAL void m0_dtm0_net_fini(struct m0_dtm0_net *dnet)
Definition: net.c:39
uint64_t dnc_inflight_max_nr
Definition: net.h:81
struct m0_dtm0_msg_eol eol
Definition: net.h:74
struct m0_bufvec dmr_bufs
Definition: net.h:51
Definition: fid.h:38
M0_INTERNAL void m0_dtm0_net_send(struct m0_dtm0_net *dnet, struct m0_be_op *op, const struct m0_fid *target, const struct m0_dtm0_msg *msg)
Definition: net.h:67
struct m0_fid dmp_initiator
Definition: net.h:61
M0_INTERNAL void m0_dtm0_net_recv(struct m0_dtm0_net *dnet, struct m0_be_op *op, struct m0_fid *source, struct m0_dtm0_msg *msg, enum m0_dtm0_msg_type type)
int type
Definition: dir.c:1031
Definition: op.h:74
Definition: net.c:93
struct m0_dtm0_msg_redo redo
Definition: net.h:73
Definition: vec.h:145