Motr  M0
client.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #pragma once
23 
24 #ifndef __MOTR_DESIM_CLIENT_H__
25 #define __MOTR_DESIM_CLIENT_H__
26 
32 #include "lib/tlist.h"
33 
34 struct net_conf;
35 struct net_srv;
36 
37 struct client {
40  unsigned long cl_cached;
41  unsigned long cl_dirty;
42  unsigned long cl_io;
43  unsigned long cl_fid;
44  unsigned cl_id;
45  unsigned cl_inflight;
50 };
51 
52 struct client_conf {
53  unsigned cc_nr_clients;
54  unsigned cc_nr_threads;
55  unsigned long cc_total;
56  unsigned long cc_count;
57  unsigned long cc_opt_count;
58  unsigned cc_inflight_max;
61  unsigned long cc_cache_max;
62  unsigned long cc_dirty_max;
63  struct net_conf *cc_net;
64  struct net_srv *cc_srv;
65  struct client *cc_client;
69 };
70 
71 M0_INTERNAL void client_init(struct sim *s, struct client_conf *conf);
72 M0_INTERNAL void client_fini(struct client_conf *conf);
73 
74 #endif /* __MOTR_DESIM_CLIENT_H__ */
75 
78 /*
79  * Local variables:
80  * c-indentation-style: "K&R"
81  * c-basic-offset: 8
82  * tab-width: 8
83  * fill-column: 80
84  * scroll-step: 1
85  * End:
86  */
sim_time_t cc_delay_min
Definition: client.h:59
Definition: sim.h:152
unsigned long cl_fid
Definition: client.h:43
int cc_shutdown
Definition: client.h:68
unsigned long cc_dirty_max
Definition: client.h:62
Definition: net.h:57
Definition: conf.py:1
unsigned cc_inflight_max
Definition: client.h:58
unsigned long cc_count
Definition: client.h:56
M0_INTERNAL void client_init(struct sim *s, struct client_conf *conf)
Definition: client.c:148
struct m0_tl cl_write_ext
Definition: client.h:49
struct client_conf * cl_conf
Definition: client.h:48
Definition: net.h:39
unsigned long cc_cache_max
Definition: client.h:61
sim_time_t cc_delay_max
Definition: client.h:60
unsigned long cc_opt_count
Definition: client.h:57
struct sim_thread * cl_thread
Definition: client.h:38
Definition: cnt.h:36
struct sim_chan cl_cache_free
Definition: client.h:46
struct client * cc_client
Definition: client.h:65
unsigned long cl_dirty
Definition: client.h:41
Definition: tlist.h:251
Definition: client.h:37
struct cnt cc_cache_busy
Definition: client.h:67
unsigned long long sim_time_t
Definition: sim.h:111
unsigned cl_inflight
Definition: client.h:45
unsigned long cl_io
Definition: client.h:42
Definition: sim.h:237
unsigned long cl_cached
Definition: client.h:40
struct cnt cc_cache_free
Definition: client.h:66
unsigned cl_id
Definition: client.h:44
M0_INTERNAL void client_fini(struct client_conf *conf)
Definition: client.c:177
unsigned long cc_total
Definition: client.h:55
struct net_srv * cc_srv
Definition: client.h:64
struct net_conf * cc_net
Definition: client.h:63
unsigned cc_nr_threads
Definition: client.h:54
static struct m0_addb2_source * s
Definition: consumer.c:39
struct sim_chan cl_cache_busy
Definition: client.h:47
unsigned cc_nr_clients
Definition: client.h:53
struct sim_thread * cl_pageout
Definition: client.h:39