Motr  M0
net_internal.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-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 
23 #pragma once
24 
25 #ifndef __MOTR_NET_NET_INTERNAL_H__
26 #define __MOTR_NET_NET_INTERNAL_H__
27 
28 #include "net/net.h"
29 
37 extern struct m0_mutex m0_net_mutex;
38 
40 M0_INTERNAL bool m0_net__qtype_is_valid(enum m0_net_queue_type qt);
41 
43 M0_INTERNAL bool m0_net__tm_state_is_valid(enum m0_net_tm_state ts);
44 
46 M0_INTERNAL bool m0_net__tm_event_invariant(const struct m0_net_tm_event *ev);
47 
49 M0_INTERNAL bool m0_net__tm_ev_type_is_valid(enum m0_net_tm_ev_type et);
50 
52 M0_INTERNAL bool m0_net__buffer_event_invariant(const struct m0_net_buffer_event
53  *ev);
54 
59 M0_INTERNAL bool m0_net__buffer_invariant(const struct m0_net_buffer *buf);
60 
65 M0_INTERNAL int m0_net__buffer_add(struct m0_net_buffer *buf,
66  struct m0_net_transfer_mc *tm);
67 
72 M0_INTERNAL bool m0_net__ep_invariant(struct m0_net_end_point *ep,
73  struct m0_net_transfer_mc *tm,
74  bool under_tm_mutex);
75 
80 M0_INTERNAL bool m0_net__tm_invariant(const struct m0_net_transfer_mc *tm);
81 
82 M0_INTERNAL int m0_net__tm_provision_buf(struct m0_net_transfer_mc *tm);
83 
95 M0_INTERNAL void m0_net__tm_provision_recv_q(struct m0_net_transfer_mc *tm);
96 
102 M0_INTERNAL int m0_net__tm_stats_get(struct m0_net_transfer_mc *tm,
103  enum m0_net_queue_type qtype,
104  struct m0_net_qstats *qs, bool reset);
105 
112 M0_INTERNAL void m0_net__tm_post_callback(struct m0_net_transfer_mc *tm);
113 
119 M0_INTERNAL void m0_net__tm_cancel(struct m0_net_transfer_mc *tm);
120 
125 #endif /* __MOTR_NET_NET_INTERNAL_H__ */
126 
127 /*
128  * Local variables:
129  * c-indentation-style: "K&R"
130  * c-basic-offset: 8
131  * tab-width: 8
132  * fill-column: 80
133  * scroll-step: 1
134  * End:
135  */
M0_INTERNAL bool m0_net__buffer_invariant(const struct m0_net_buffer *buf)
Definition: buf.c:46
M0_INTERNAL void m0_net__tm_cancel(struct m0_net_transfer_mc *tm)
Definition: tm.c:145
struct m0_mutex m0_net_mutex
Definition: net.c:59
M0_INTERNAL bool m0_net__buffer_event_invariant(const struct m0_net_buffer_event *ev)
Definition: buf.c:297
M0_INTERNAL bool m0_net__tm_ev_type_is_valid(enum m0_net_tm_ev_type et)
Definition: tm.c:49
M0_INTERNAL void m0_net__tm_provision_recv_q(struct m0_net_transfer_mc *tm)
Definition: tm_provision.c:509
Definition: sock.c:887
M0_INTERNAL bool m0_net__qtype_is_valid(enum m0_net_queue_type qt)
Definition: buf.c:41
Definition: sock.c:754
M0_INTERNAL int m0_net__tm_provision_buf(struct m0_net_transfer_mc *tm)
Definition: tm_provision.c:414
M0_INTERNAL int m0_net__tm_stats_get(struct m0_net_transfer_mc *tm, enum m0_net_queue_type qtype, struct m0_net_qstats *qs, bool reset)
Definition: tm.c:320
M0_INTERNAL int m0_net__buffer_add(struct m0_net_buffer *buf, struct m0_net_transfer_mc *tm)
Definition: buf.c:130
m0_net_tm_state
Definition: net.h:630
m0_net_tm_ev_type
Definition: net.h:641
Definition: queue.c:27
M0_INTERNAL bool m0_net__tm_event_invariant(const struct m0_net_tm_event *ev)
Definition: tm.c:54
m0_net_queue_type
Definition: net.h:591
M0_INTERNAL bool m0_net__tm_invariant(const struct m0_net_transfer_mc *tm)
Definition: tm.c:67
M0_INTERNAL void m0_net__tm_post_callback(struct m0_net_transfer_mc *tm)
Definition: tm.c:123
M0_INTERNAL bool m0_net__ep_invariant(struct m0_net_end_point *ep, struct m0_net_transfer_mc *tm, bool under_tm_mutex)
Definition: ep.c:42
Definition: mutex.h:47
M0_INTERNAL bool m0_net__tm_state_is_valid(enum m0_net_tm_state ts)
Definition: tm.c:44