diff options
| author | Chaitanya Huilgol <chaitanya.huilgol@gmail.com> | 2015-01-23 06:11:25 -0500 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2015-02-19 05:31:40 -0500 |
| commit | ba988f87f532cd2b8c4740aa8ec49056521ae833 (patch) | |
| tree | 14d535124a9146d02fa0a7e2f76d8778b0bce662 /include/linux | |
| parent | cf32bd9c86b6917d8446c00ea0081dde6e716a82 (diff) | |
libceph: tcp_nodelay support
TCP_NODELAY socket option set on connection sockets,
disables Nagle’s algorithm and improves latency characteristics.
tcp_nodelay(default)/notcp_nodelay option flags provided to
enable/disable setting the socket option.
Signed-off-by: Chaitanya Huilgol <chaitanya.huilgol@sandisk.com>
[idryomov@redhat.com: NO_TCP_NODELAY -> TCP_NODELAY, minor adjustments]
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ceph/libceph.h | 3 | ||||
| -rw-r--r-- | include/linux/ceph/messenger.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 8b11a79ca1cb..16fff9608848 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -30,8 +30,9 @@ | |||
| 30 | #define CEPH_OPT_MYIP (1<<2) /* specified my ip */ | 30 | #define CEPH_OPT_MYIP (1<<2) /* specified my ip */ |
| 31 | #define CEPH_OPT_NOCRC (1<<3) /* no data crc on writes */ | 31 | #define CEPH_OPT_NOCRC (1<<3) /* no data crc on writes */ |
| 32 | #define CEPH_OPT_NOMSGAUTH (1<<4) /* not require cephx message signature */ | 32 | #define CEPH_OPT_NOMSGAUTH (1<<4) /* not require cephx message signature */ |
| 33 | #define CEPH_OPT_TCP_NODELAY (1<<5) /* TCP_NODELAY on TCP sockets */ | ||
| 33 | 34 | ||
| 34 | #define CEPH_OPT_DEFAULT (0) | 35 | #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) |
| 35 | 36 | ||
| 36 | #define ceph_set_opt(client, opt) \ | 37 | #define ceph_set_opt(client, opt) \ |
| 37 | (client)->options->flags |= CEPH_OPT_##opt; | 38 | (client)->options->flags |= CEPH_OPT_##opt; |
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index d9d396c16503..e15499422fdc 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -57,6 +57,7 @@ struct ceph_messenger { | |||
| 57 | 57 | ||
| 58 | atomic_t stopping; | 58 | atomic_t stopping; |
| 59 | bool nocrc; | 59 | bool nocrc; |
| 60 | bool tcp_nodelay; | ||
| 60 | 61 | ||
| 61 | /* | 62 | /* |
| 62 | * the global_seq counts connections i (attempt to) initiate | 63 | * the global_seq counts connections i (attempt to) initiate |
| @@ -264,7 +265,8 @@ extern void ceph_messenger_init(struct ceph_messenger *msgr, | |||
| 264 | struct ceph_entity_addr *myaddr, | 265 | struct ceph_entity_addr *myaddr, |
| 265 | u64 supported_features, | 266 | u64 supported_features, |
| 266 | u64 required_features, | 267 | u64 required_features, |
| 267 | bool nocrc); | 268 | bool nocrc, |
| 269 | bool tcp_nodelay); | ||
| 268 | 270 | ||
| 269 | extern void ceph_con_init(struct ceph_connection *con, void *private, | 271 | extern void ceph_con_init(struct ceph_connection *con, void *private, |
| 270 | const struct ceph_connection_operations *ops, | 272 | const struct ceph_connection_operations *ops, |
