#
b965c220 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I2f8eeee40b0b2583092d351979dd77fd277a97ba Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
a6b29104 |
| 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: Add UART Mux Support
This commit adds support for uart-muxes which can be controlled via gpios.
Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d Signed-off-by: Alexander Hansen
console-server: Add UART Mux Support
This commit adds support for uart-muxes which can be controlled via gpios.
Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
312ecdc2 |
| 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: Enable multiple consoles
obmc-console can now support multiple consoles that can be configured.
The first console is the active console, if not configured otherwise.
This serves as
console-server: Enable multiple consoles
obmc-console can now support multiple consoles that can be configured.
The first console is the active console, if not configured otherwise.
This serves as preparation for uart mux support.
Change-Id: I6f350b8efe70c3b424bdadaa3fe1bbf89d310e5d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
2325d5d5 |
| 07-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: refactor pollfd management
Instead of the previous memory management of pollfd array, with a fixed and flexible part and hardcoded indices, provide two functions to request and relea
console-server: refactor pollfd management
Instead of the previous memory management of pollfd array, with a fixed and flexible part and hardcoded indices, provide two functions to request and release pollfds.
- console_server_request_pollfd - console_server_release_pollfd
The pollfds are still in the same array but can be requested and released by these functions now. struct console_server and struct console now contain indices into that array of pollfds.
The benefit of this contribution is that the new interface provides a clean allocator-like abstraction for requesting and releasing pollfds, which will scale to multiple consoles and can be refactored or unit-tested more easily in the future.
The previous implementation was tightly coupled to the single-console use-case and the pollfds stored at hardcoded indices.
Change-Id: I93226699618130b175bffbeb4f71c20c91a7083a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
c2b0d8c7 |
| 07-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: introduce `struct console_server`
Lift `struct console_server` from `struct console`
struct console_server will enable obmc-console to support multiple consoles in a single obmc-con
console-server: introduce `struct console_server`
Lift `struct console_server` from `struct console`
struct console_server will enable obmc-console to support multiple consoles in a single obmc-console-server in the future.
Currently the 'struct console_server' only supports one active console.
Change-Id: Icb22fb46f217b174f3bccc0a03485549d82d1d6b Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
e3f1aa1e |
| 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
util: Consolidate ARRAY_SIZE() definitions
ARRAY_SIZE() was defined several times around the code-base. Provide a single definition in util.h and include it where necessary.
Change-Id: Idc4cf030969
util: Consolidate ARRAY_SIZE() definitions
ARRAY_SIZE() was defined several times around the code-base. Provide a single definition in util.h and include it where necessary.
Change-Id: Idc4cf030969ffc7f0928c6897a23962a70adcf05 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
1e04f449 |
| 12-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
use iniparser dependency for config file parsing
For the config file, we do not need the custom handwritten parser.
Thanks to Andrew for this command, we can now search for an alternative
$ git gr
use iniparser dependency for config file parsing
For the config file, we do not need the custom handwritten parser.
Thanks to Andrew for this command, we can now search for an alternative
$ git grep -lw INI -- :/:*.bb meta-openembedded/meta-oe/recipes-support/inih/libinih_58.bb meta-openembedded/meta-oe/recipes-support/iniparser/iniparser_4.1.bb meta-openembedded/meta-oe/recipes-support/minini/minini_1.2.b.bb poky/meta/recipes-devtools/python/python3-iniconfig_2.0.0.bb poky/meta/recipes-devtools/python/python3-iniparse_0.5.bb
For the ini parser we have following requirements
- small API - easy to use - compiles fast - has tests, examples, docs - support for sections
- minini [1]
can be dropped from the list since it also supports colon ':' instead of '=' for separating key and value, creating 2 ways of doing something. This makes it harder to swap out the ini parser in the future.
- libinih [2]
uses SAX-style parsing of .ini files and thus does not provide a DOM of the .ini. This is a break from the previous parser which stored everything in struct config. To use this library would require to create a struct to store all the possible configuration, then fill that struct in one pass. Essentially wrapping that library to have DOM capability. That would be possible, but not ideal. libinih is also highly configurable with lots of config options.
- iniparser [3]
has all the required features and stores the results of its parsing for later use. It is a seamless upgrade from the previous parser. The call sites do not have to be modified and we can read the config as before. A downside is that we have to provide our own wrap file.
For our purposes, iniparser is a good choice.
Using this dependency allows us to drop the custom parser and all the tests that go along with it.
If sections are required in future config files, iniparser can also support that.
References:
[1] https://github.com/compuphase/minIni [2] https://github.com/benhoyt/inih [3] https://gitlab.com/iniparser/iniparser
Change-Id: Ie2b57171ec1f8cb6b1b80ca1d9e6c112bedc1195 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
498a4a81 |
| 09-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
console-server: Respect DBus init failure
Given that the DBus interface is required by other OpenBMC applications, don't ignore a failure to initialize it.
It's always possible to add a switch down
console-server: Respect DBus init failure
Given that the DBus interface is required by other OpenBMC applications, don't ignore a failure to initialize it.
It's always possible to add a switch down the track to avoid initializing the DBus interfaces, if desired.
Change-Id: I8aecf1a1cb06d021f374eaf0fd6893ddf3a9cc3c Co-developed-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
e2826c7d |
| 04-Jul-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
console-server: allow separate handler instances
Currently, each handler (socket-handler, tty-handler and log-handler) provides a statically-allocated instance of a handler, which gets initialized f
console-server: allow separate handler instances
Currently, each handler (socket-handler, tty-handler and log-handler) provides a statically-allocated instance of a handler, which gets initialized for a console through the ->init callback.
We have upcoming changes that may create more than one console object, in which case means we will need multiple instances of each handler type.
This change splits the handler type from the handler instance; the former is now struct handler_type, with struct handler being the instance. Handler modules define a (const) struct handler_type, and ->init() now returns a newly-allocated instance of a handler of that type.
This allows multiple handlers of each type.
Because the handler instances are allocated by type->init, we now require both ->init and ->fini to be present on registered handlers.
We no longer need the `bool active` member of the handler, as instances are always active.
Change-Id: Id97f15bd6445e17786f5883b849de8559c5ea434 Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
show more ...
|
#
a71b3954 |
| 04-Jul-2024 |
Jeremy Kerr <jk@codeconstruct.com.au> |
console-server: Add BUILD_ASSERT_OR_ZERO
Introduce the common BUILD_ASSERT_OR_ZERO, matching BUILD_ASSERT, which allows use in file scope.
Change-Id: Ic88760bfdcfcb05468147fbc133a1a05427f886c Signe
console-server: Add BUILD_ASSERT_OR_ZERO
Introduce the common BUILD_ASSERT_OR_ZERO, matching BUILD_ASSERT, which allows use in file scope.
Change-Id: Ic88760bfdcfcb05468147fbc133a1a05427f886c Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
show more ...
|
#
d6e8b64a |
| 18-Mar-2024 |
Medicine Yeh <medicinehy@gmail.com> |
config: rename parse_logsize to be more generic
Rename config_parse_logsize to config_parse_bytesize. A more generic name allows this function to be reused in other config parsing purposes.
Change-
config: rename parse_logsize to be more generic
Rename config_parse_logsize to config_parse_bytesize. A more generic name allows this function to be reused in other config parsing purposes.
Change-Id: I3036c184669be17ddc0d194f275ea05d871341d1 Signed-off-by: Medicine Yeh <medicinehy@gmail.com>
show more ...
|
Revision tags: v1.1.0 |
|
#
bd992c9f |
| 09-May-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
Add Connect() method to console DBUS object
Added new poller and consumer for the console DBUS data.
Note: We initially developed SocketName attribute but it is now deprecated/removed.
The t
Add Connect() method to console DBUS object
Added new poller and consumer for the console DBUS data.
Note: We initially developed SocketName attribute but it is now deprecated/removed.
The tree of default object: $ busctl tree xyz.openbmc_project.Console.default `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/console `-/xyz/openbmc_project/console/default
The introspect of default console: $ busctl introspect xyz.openbmc_project.Console.default /xyz/openbmc_project/console/default NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.Console.Access interface - - - .Connect method - h - xyz.openbmc_project.console interface - - - .setBaudRate method u x - .baudrate property u 0 -
Tested: Performed integration testing with bmcweb.
Change-Id: I2444b1083cf26536f43c6f6b4b0857a2921c4f78 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
show more ...
|
#
5ba20b5b |
| 12-May-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
obmc-console: Consolidate handling of default socket-id
If console-id is not specified on command line or in the config file then use the default value. ae2460d0b8e8 ("obmc-console: Provide a defaul
obmc-console: Consolidate handling of default socket-id
If console-id is not specified on command line or in the config file then use the default value. ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.") only implemented the default value for naming the abstract listening socket and overlooked the new DBus path naming convention. This caused issues during dbus registration:
``` obmc-console-server: Object name: /xyz/openbmc_project/console/(null) obmc-console-server: Failed to issue method call: Invalid argument ```
Fixes: ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.") Change-Id: I6d0f7b23cc085992189cd4463129a6aae590b3e7 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
30ea6385 |
| 03-May-2023 |
Andrew Jeffery <andrew@aj.id.au> |
console-server: Add PTY support for testing purposes
Different TTY device types have different configuration options. The existing code kinda smooshes the differences between UARTs and VUARTs togeth
console-server: Add PTY support for testing purposes
Different TTY device types have different configuration options. The existing code kinda smooshes the differences between UARTs and VUARTs together. PTYs do not require the configuration applicable to either UARTs or VUARTs. Given this, separate out and be explict about the concepts and configuration required for all three types.
This in turn, with some further patches, allows testing of obmc-console using `socat`:
https://amboar.github.io/notes/2023/05/02/testing-obmc-console-with-socat.html
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3c1ce610132fce8ef6b5324ed3b4e0c86395e433
show more ...
|
#
b14ca19c |
| 31-Mar-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
Added new dbus interface to query console info
obmc-console recipe configure consoles by setting the socket-id field in the console server config file. obmc-console server use this socket id to buil
Added new dbus interface to query console info
obmc-console recipe configure consoles by setting the socket-id field in the console server config file. obmc-console server use this socket id to build a abract socket name and register new service "xyz.openbmc_project.Console.Access". The leaf of the object path will be socket-id configured. It also exposes the unix abstract socket name through SocketName property. The socket name is sent as a byte stream as abstract socket contains null character at the start.
*** For example if recipe configured socket-id as "console0" the *** following object is exported through dbus interface
# Tree for "console0" console. $ busctl tree xyz.openbmc_project.Console.console0 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/console `-/xyz/openbmc_project/console/console0
# Get SocketName property for console0 object $ busctl get-property xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0 xyz.openbmc_project.Console.Access SocketName ay 22 0 111 98 109 99 45 99 111 110 115 111 108 101 46 99 111 110 115 111 108 101 48
# Tree for "hypervisor" console $ busctl tree xyz.openbmc_project.Console.hypervisor `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/console `-/xyz/openbmc_project/console/hypervisor
# Get SocketName property for hypervisor object $ busctl get-property xyz.openbmc_project.Console.hypervisor /xyz/openbmc_project/console/hypervisor xyz.openbmc_project.Console.Access SocketName ay 24 0 111 98 109 99 45 99 111 110 115 111 108 101 46 104 121 112 101 114 118 105 115 111 114
# Note that this is an example of two consoles one is 'console0' and # second is 'hypervisor'. I have formated the output to easy viewing. # We also have one extra service for console that is coming from the # service exist today to get/set the tty device baud rate. $ busctl call xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper \ GetSubTree sias /xyz/openbmc_project/console 0 1 \ xyz.openbmc_project.Console.Access a{sa{sas}} 2 "/xyz/openbmc_project/console/console0" \ 1 "xyz.openbmc_project.Console.console0" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access" "/xyz/openbmc_project/console/hypervisor" 2 "xyz.openbmc_project.Console.hypervisor" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access" "xyz.openbmc_project.console" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access"
Tested: Tested on the rainer system with busctl command and integration with bmcweb
Related commits: 1) phosphor-dbus-interface: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61486 2) obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/62496 3) bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62525
Change-Id: Ifb70ce5585c3937f3abd904ffbae51ca67f58724 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
show more ...
|
#
e258e51f |
| 26-Apr-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
Split dbus related code into separate file
Moved dbus related code into separate file. This can be used to disable dbus interface if required.
Change-Id: I880639983edaf00c64acc4acb786203c51b414e7 S
Split dbus related code into separate file
Moved dbus related code into separate file. This can be used to disable dbus interface if required.
Change-Id: I880639983edaf00c64acc4acb786203c51b414e7 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
show more ...
|
#
1b868441 |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix ringbuffer-test-utils analysis
ninja's clang-tidy target barfs due to the strategy of including C files into each other for test purposes. Help it out by moving the ringbuffer stru
obmc-console: Fix ringbuffer-test-utils analysis
ninja's clang-tidy target barfs due to the strategy of including C files into each other for test purposes. Help it out by moving the ringbuffer struct definitions into console-server.h so it can find them when analysing test/ringbuffer-test-utils.c.
obmc-console isn't a library, so it's not like we're trying to avoid expanding API/ABI surface.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ifd4501d3ca7f3bb02c557a1c31364aadd2b26abe
show more ...
|
#
6422215d |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix readability-inconsistent-declaration-parameter-name
``` /usr/bin/clang-tidy -checks=-*, readability-inconsistent-declaration-parameter-name -export-fixes /tmp/tmppaj3mheq/tmphdn64r
obmc-console: Fix readability-inconsistent-declaration-parameter-name
``` /usr/bin/clang-tidy -checks=-*, readability-inconsistent-declaration-parameter-name -export-fixes /tmp/tmppaj3mheq/tmphdn64rrm.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/console-server.c ../console-server.h:82:16: error: function 'console_poller_register' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name,-warnings-as-errors] struct poller *console_poller_register(struct console *console, ^ ../console-server.c:538:16: note: the definition seen here struct poller *console_poller_register(struct console *console, ^ /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:82:16: note: differing parameters are named here: ('event_fn'), in definition: ('poller_fn') struct poller *console_poller_register(struct console *console, ^ /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:93:6: error: function 'console_poller_set_timeout' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name,-warnings-as-errors] void console_poller_set_timeout(struct console *console, struct poller *poller, ^ ../console-server.c:644:6: note: the definition seen here void console_poller_set_timeout(struct console *console __attribute__((unused)), ^ /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:93:6: note: differing parameters are named here: ('interval'), in definition: ('tv') void console_poller_set_timeout(struct console *console, struct poller *poller, ^ 5 warnings generated. ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic9910bc7e716477b8e0eb0e40f32567972cc4529
show more ...
|
#
750fb0c0 |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix bugprone-reserved-identifier
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I57ef4792b96cc55112aef4f75667e429d3188bf7
|
#
f2232d5f |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix bugprone-macro-parentheses
For example:
``` /usr/bin/clang-tidy -checks=-*, bugprone-macro-parentheses -export-fixes /tmp/tmpzth2fheg/tmp9x7dpgyc.yaml -p=build /mnt/host/andrew/ho
obmc-console: Fix bugprone-macro-parentheses
For example:
``` /usr/bin/clang-tidy -checks=-*, bugprone-macro-parentheses -export-fixes /tmp/tmpzth2fheg/tmp9x7dpgyc.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/console-server.c /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.h:150:43: error: macro argument should be enclosed in parentheses [bugprone-macro-parentheses,-warnings-as-errors] ^ () ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I10b93e2b3e16b51bcdf2adf113a38e67bce37e88
show more ...
|
#
a72711af |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Add clang-format configuration
And apply the formatting.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I75251051affa5129c8698185baf8d151302b19d6
|
#
c7a8f001 |
| 17-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
console-server: Drop trailing semi-colon from console_handler_register()
It's idiomatic for the semi-colon to appear on the call-site.
``` cc -Iobmc-console-server.p -I. -I.. -fdiagnostics-color=al
console-server: Drop trailing semi-colon from console_handler_register()
It's idiomatic for the semi-colon to appear on the call-site.
``` cc -Iobmc-console-server.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=gnu17 -O2 -g '-DLOCALSTATEDIR="/var/local"' '-DSYSCONFDIR="etc"' -MD -MQ obmc-console-server.p/log-handler.c.o -MF obmc-console-server.p/log-handler.c.o.d -o obmc-console-server.p/log-handler.c.o -c ../log-handler.c ../log-handler.c:190:47: error: ISO C does not allow extra ‘;’ outside of a function [-Werror=pedantic] 190 | console_handler_register(&log_handler.handler); | ^ cc1: all warnings being treated as errors ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib6e445cf5cab2e4ce6f5ddd822e3afb4a76288b4
show more ...
|
#
397fd035 |
| 10-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
console-server: add ifdef around offsetof
GCC 12.2 seems to supply offsetof inside `stddef.h`. Add guards around the define here so that we do not end up with the following compiler warnings:
```
console-server: add ifdef around offsetof
GCC 12.2 seems to supply offsetof inside `stddef.h`. Add guards around the define here so that we do not end up with the following compiler warnings:
``` 22:35:49 | ../git/console-server.h:153: error: "offsetof" redefined [-Werror] ```
Change-Id: Id8d940db441a7ee96caf0a9a66e1ef3863cd3d2e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
5e7c0786 |
| 09-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
console-socket: Add an optional component to UNIX socket abstract names
Allows multiple instances of obmc-console-server to run concurrently without interfering with each other.
Signed-off-by: Andr
console-socket: Add an optional component to UNIX socket abstract names
Allows multiple instances of obmc-console-server to run concurrently without interfering with each other.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7ef9c14e554c687e8d606e1eaaed82a7f1c06d98
show more ...
|
#
1cecc5de |
| 28-Feb-2019 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Eliminate excessive CPU consumption when redirecting UART over SSH
Redirecting the external UART via SSH caused the console-server, console-client, and dropbear to consume ~30% of the available CPU
Eliminate excessive CPU consumption when redirecting UART over SSH
Redirecting the external UART via SSH caused the console-server, console-client, and dropbear to consume ~30% of the available CPU each when a large amount of data was being written to the UART output.
Buffering all of the small 16550 FIFO bytes into a larger packet and then sending that to the SSH SW allows more efficient transmission over the ethernet connection.
Tested this by "ssh root@<bmc.ip.addr> -p 2200" on a system running a CentOS distribution. Using a BASH console run a large binary file through "od -t x1 <fname>" to create a large amount of traffic. At the BMC console run "top" to review the CPU usage. My experience is after this change is applied: console-server: ~25% CPU dropbear: ~3% CPU console-client: ~1% CPU
Change-Id: Ibabfd285e97a487e7ff040e1cb3159fbff360328 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|