kdbus: the driver, original and non-working
[platform/kernel/linux-rpi.git] / ipc / kdbus / limits.h
1 /*
2  * Copyright (C) 2013-2015 Kay Sievers
3  * Copyright (C) 2013-2015 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4  * Copyright (C) 2013-2015 Daniel Mack <daniel@zonque.org>
5  * Copyright (C) 2013-2015 David Herrmann <dh.herrmann@gmail.com>
6  * Copyright (C) 2013-2015 Linux Foundation
7  *
8  * kdbus is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License as published by the
10  * Free Software Foundation; either version 2.1 of the License, or (at
11  * your option) any later version.
12  */
13
14 #ifndef __KDBUS_DEFAULTS_H
15 #define __KDBUS_DEFAULTS_H
16
17 #include <linux/kernel.h>
18
19 /* maximum size of message header and items */
20 #define KDBUS_MSG_MAX_SIZE              SZ_8K
21
22 /* maximum number of memfd items per message */
23 #define KDBUS_MSG_MAX_MEMFD_ITEMS       16
24
25 /* max size of ioctl command data */
26 #define KDBUS_CMD_MAX_SIZE              SZ_32K
27
28 /* maximum number of inflight fds in a target queue per user */
29 #define KDBUS_CONN_MAX_FDS_PER_USER     16
30
31 /* maximum message payload size */
32 #define KDBUS_MSG_MAX_PAYLOAD_VEC_SIZE          SZ_2M
33
34 /* maximum size of bloom bit field in bytes */
35 #define KDBUS_BUS_BLOOM_MAX_SIZE                SZ_4K
36
37 /* maximum length of well-known bus name */
38 #define KDBUS_NAME_MAX_LEN                      255
39
40 /* maximum length of bus, domain, ep name */
41 #define KDBUS_SYSNAME_MAX_LEN                   63
42
43 /* maximum number of matches per connection */
44 #define KDBUS_MATCH_MAX                         256
45
46 /* maximum number of queued messages from the same individual user */
47 #define KDBUS_CONN_MAX_MSGS                     256
48
49 /* maximum number of well-known names per connection */
50 #define KDBUS_CONN_MAX_NAMES                    256
51
52 /* maximum number of queued requests waiting for a reply */
53 #define KDBUS_CONN_MAX_REQUESTS_PENDING         1024
54
55 /* maximum number of connections per user in one domain */
56 #define KDBUS_USER_MAX_CONN                     1024
57
58 /* maximum number of buses per user in one domain */
59 #define KDBUS_USER_MAX_BUSES                    16
60
61 #endif