diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-11-22 12:09:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-08 19:57:38 -0500 |
commit | 4d18e6eff81e1d4d81d0942d5b7e96904b3b32df (patch) | |
tree | a6c66c84189a50bff8b6b05a7187a8cda4b67cfc /include/linux | |
parent | 82f91fe092b6eacd82e976b8955443f9fd97d07e (diff) |
tty: Enable configurable tty flip buffer limit
Allow driver to configure its maximum flip buffer memory
consumption/limit. This is necessary for very-high speed line
rates (in excess of 10MB/sec) because the flip buffers can
be saturated before the line discipline has a chance to
throttle the input.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/tty.h | 1 | ||||
-rw-r--r-- | include/linux/tty_flip.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 97d660ed70c1..2225745060d6 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -61,6 +61,7 @@ struct tty_bufhead { | |||
61 | struct tty_buffer sentinel; | 61 | struct tty_buffer sentinel; |
62 | struct llist_head free; /* Free queue head */ | 62 | struct llist_head free; /* Free queue head */ |
63 | atomic_t memory_used; /* In-use buffers excluding free list */ | 63 | atomic_t memory_used; /* In-use buffers excluding free list */ |
64 | int mem_limit; | ||
64 | struct tty_buffer *tail; /* Active buffer */ | 65 | struct tty_buffer *tail; /* Active buffer */ |
65 | }; | 66 | }; |
66 | /* | 67 | /* |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 21ddd7d9ea1f..2da8bc2a5486 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_TTY_FLIP_H | 1 | #ifndef _LINUX_TTY_FLIP_H |
2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
3 | 3 | ||
4 | extern int tty_buffer_set_limit(struct tty_port *port, int limit); | ||
4 | extern int tty_buffer_space_avail(struct tty_port *port); | 5 | extern int tty_buffer_space_avail(struct tty_port *port); |
5 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); | 6 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); |
6 | extern int tty_insert_flip_string_flags(struct tty_port *port, | 7 | extern int tty_insert_flip_string_flags(struct tty_port *port, |