#
8425624a |
| 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: I8d0072c279e4de87dc001190845d0ca6da233345 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
7b534095 |
| 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I5278656122f19da46fcd0a84bc96af420d4cb8bd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
099fb097 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I862ed296ce1f42dba7047a74540d9004ad78130c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
cc540bfd |
| 28-Mar-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Correct encoded 'obmc-console' path name
In the current version of the sdbusplus library if the D-Bus path needs encoding, the first character of the path also gets encoded.
Change-Id: I9b615440f6c
Correct encoded 'obmc-console' path name
In the current version of the sdbusplus library if the D-Bus path needs encoding, the first character of the path also gets encoded.
Change-Id: I9b615440f6c9816ab531aef942b152eadde4c9af Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
ec437414 |
| 27-Sep-2022 |
Tingting Chen <chentingting.2150@bytedance.com> |
phosphor-ipmi-net: Add sysrq handle in netipmid for ipmitool sol.
Send MSG_OOB flag to console server to generate a break.
Tested: 1. Open SOL by ipmitool: ipmitool -H <bmcip> -I lanp -U <user> -P
phosphor-ipmi-net: Add sysrq handle in netipmid for ipmitool sol.
Send MSG_OOB flag to console server to generate a break.
Tested: 1. Open SOL by ipmitool: ipmitool -H <bmcip> -I lanp -U <user> -P <password> sol activate 2. In SOL terminal, login os and "echo 1 > /proc/sys/kernel/sysrq" to open sysrq function 3. In SOL terminal, Enter ~+B to generate break, then enter "h" in 5 second. 4. Veirfy below message shown in SOL: root@bytedance:~# ~B [send break] [ 366.377331] sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)
Change-Id: Ieac3ee0c7f964920214aa185a947e0449034726f Signed-off-by: Tingting Chen <chentingting.2150@bytedance.com>
show more ...
|
#
7b7f25f7 |
| 04-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-b
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4aabaafe997e13c10d655a83a9ef0071ad11126e
show more ...
|
#
0a59062c |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic68a12ef7c12222b1300981282161c971b561dc1
show more ...
|
#
bc8958fe |
| 03-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id:
Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1e06864afc29ce7de463e62fa2a0eb6f70e8fd93
show more ...
|
#
c936ecaa |
| 21-Mar-2022 |
Jian Zhang <zhangjian.3032@bytedance.com> |
net-ipmid: Add sol conf change callback
Add a callback when the properties in interface /xyz/openbmc_project/ipmi/sol/<eth name> was changed, update the sol conf in sol manager.
Tested: busctl set-
net-ipmid: Add sol conf change callback
Add a callback when the properties in interface /xyz/openbmc_project/ipmi/sol/<eth name> was changed, update the sol conf in sol manager.
Tested: busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/ipmi/sol/bond1 xyz.openbmc_project.Ipmi.SOL Enable b false
The callback was successfully called, and updated the sol manager conf.
Change-Id: Ie5949f6f701441275b849ade5ed4a50ea894b737 Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
show more ...
|
#
12d199b2 |
| 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If18cc0293b52ce5f7f8e068688aa17d28ed27d50
|
#
2085ae07 |
| 10-Jun-2021 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
replace tuple-based singleton with individual singletons
The tuple-based singletons did not actually enforce singleton behavior and the requirement of the accessor mechanism to include all of the me
replace tuple-based singleton with individual singletons
The tuple-based singletons did not actually enforce singleton behavior and the requirement of the accessor mechanism to include all of the member types at once was starting to cause a header prerequisite tangle. This removes the cross-dependencies and enforces actual singletons by making a single way to access the class.
Tested: Run ipmitool to show that behavior has not changed
Change-Id: Ie966e1142363d279365b1095066380c8383e9f9b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
29086950 |
| 09-Mar-2020 |
Cheng C Yang <cheng.c.yang@linux.intel.com> |
Add dbus interface for sol commands
Add dbus interface for sol config parameters so that after move set/get sol config parameter command from net-ipmid to host-ipmid, the command can send config par
Add dbus interface for sol commands
Add dbus interface for sol config parameters so that after move set/get sol config parameter command from net-ipmid to host-ipmid, the command can send config parameters to net-ipmid sol service through the dbus interface.
Tested by: busctl introspect xyz.openbmc_project.Settings /xyz/openbmc_project /network/host0/sol can show correct dbus properties of sol parameters. ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x00 0x01 ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x01 0x00 ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0x83 ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x03 0x5 0x03 ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x04 0x5 0x03 all these commands can change the dbus properties as the value in above commands. Before and after run these commands, ipmitool -I lanplus -H x -U x -P x sol activate can start sol session correctly. After reboot BMC, "Progress" property in dbus interface change back to 0 and other properties will not reset to default value.
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: Ib441b551a1559908c427be5378ff3414693e20dd
show more ...
|
#
f6e7230d |
| 08-Jun-2020 |
srikanta mondal <srikantax.mondal@intel.com> |
Close active SOL session after disable SSH SOL
Issue: When SOL-SSH is being disable by Control BMC service command, the active SOL session are not being closed.
Fix: Stop the Payload Instanc
Close active SOL session after disable SSH SOL
Issue: When SOL-SSH is being disable by Control BMC service command, the active SOL session are not being closed.
Fix: Stop the Payload Instance and Host console for active SOL session when SSH SOL is being disable.
Tested: Verified using ipmitool sol commands. 1. Enable SSH SOL using control BMC service command Command: ipmitool raw 0x30 0xb1 0x01 0x40 0x00 //SOL activate Response: // Success Check the status using below busctl command command: busctl introspect xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/obmc_2dconsole_40ttyS2 Response: .Enabled true 2. Activate SOL session Command: ipmitool -I lanplus -U root -P 0penBmc -H <BMC_IP> -C 17 sol activate Response: // Success 3. Disable SSH SOL using control BMC service command Command: ipmitool raw 0x30 0xb1 0x00 0x40 0x00 Response: // Success Check the status using below busctl command command: busctl introspect xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/obmc_2dconsole_40ttyS2 Response: .Enabled false 4. Enable SSH SOL using control BMC service command. Command: ipmitool raw 0x30 0xb1 0x01 0x40 0x00 Response: // Success Check the status using below busctl command command: busctl introspect xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/obmc_2dconsole_40ttyS2 Response: .Enabled true 5. Activate SOL session Command: ipmitool -I lanplus -U root -P 0penBmc -H <BMC_IP> -C 17 sol activate Response: // Successfully establish the session
Signed-off-by: srikanta mondal <srikantax.mondal@intel.com> Change-Id: I08a459e5a4245d969529c033e4b88625b0796fb2
show more ...
|
#
a6ad5e16 |
| 21-Feb-2020 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Check if the object is still valid in the timeout callback function
When the SOL module in netipmid is busy, there is a chance that the timeout callback function is executed after the context object
Check if the object is still valid in the timeout callback function
When the SOL module in netipmid is busy, there is a chance that the timeout callback function is executed after the context object is destructed. This will cause the process to crash with this error:
terminate called after throwing an instance of 'boost::wrapexcept<boost::asio::bad_executor>' what(): bad executor
The root cause is that the cancel() cannot cancel the expired callback handlers. When the callback handler is executed, the object is deleted already.
This uses proper reference counting on the objects captured in the lambda so that they are not referencing memory that has already gone out of scope.
Tested: Decrease the accumulateInterval to 50ms for easy reproducing. Run "ipmitool sel list", "ipmitool sensor list" and "ipmitool sol looptest 200 500" at the same time, no "sol looptest fail" error
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com> Change-Id: I4b9e4ebce14ff5fca8e991aed96643186c9ea5d9
show more ...
|
#
0f63e01c |
| 21-Nov-2019 |
Rashmi RV <rashmi.r.v@linux.intel.com> |
Fix: Handle exception during sol activate cmd
When there is any exception during StartConsole, the console must be freed,without which it was wrongly assumeed that console is active.
Tested : 1.Dis
Fix: Handle exception during sol activate cmd
When there is any exception during StartConsole, the console must be freed,without which it was wrongly assumeed that console is active.
Tested : 1.Disable SSH using systemctl stop obmc-console@xxx.service and systemctl stop obmc-console@xxx.socket. 2.Activate sol multiple times. It should always give unspecified error as response
Signed-off-by: Rashmi RV <rashmi.r.v@linux.intel.com> Change-Id: Ia5b1e0686331a9a2c6c90383472030513adf1226
show more ...
|
#
6f353e86 |
| 09-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move sol timers to asio
The IPMI SOL console was using sd_event-based timers directly (without any abstraction). This moves to a much higher level abstraction that is very easy to use: asi
netipmid: move sol timers to asio
The IPMI SOL console was using sd_event-based timers directly (without any abstraction). This moves to a much higher level abstraction that is very easy to use: asio timers.
Change-Id: Id5df76a1918cdfae420e01884d664234810b7abd Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
7e4a6517 |
| 09-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: move sol console sockets to asio
Rewrite the SOL console sockets use boost::asio. This reduces code size and ties better into the main asio io loop.
Change-Id: Ia79b9aa3fa3c7ce1ddd9b609b0
netipmid: move sol console sockets to asio
Rewrite the SOL console sockets use boost::asio. This reduces code size and ties better into the main asio io loop.
Change-Id: Ia79b9aa3fa3c7ce1ddd9b609b032160a88394f8c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
744b3c8b |
| 18-Dec-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
phosphor-net-ipmid: connect with the correct sockaddr size
Abstract unix sockets start with the nul-charater, but are not nul terminated. In fact, the nul-character has no meaning in the path. Accor
phosphor-net-ipmid: connect with the correct sockaddr size
Abstract unix sockets start with the nul-charater, but are not nul terminated. In fact, the nul-character has no meaning in the path. According to the man page unix(7),
abstract: an abstract socket address is distinguished (from a pathname socket) by the fact that sun_path[0] is a null byte ('\0'). The socket's address in this namespace is given by the additional bytes in sun_path that are covered by the specified length of the address structure. (Null bytes in the name have no special significance.)
This means that when calling bind/connect, the size of the sockaddr structure is not sizeof(sockaddr_un), it is sizeof(sockaddr_un) - sizeof(sun_path) + (path_len)
Change-Id: I61f967d9215afb00e9e5c22f535f5c252b41d3af Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
9e801a2b |
| 12-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon
netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
70fd29cf |
| 30-Nov-2017 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
explicit use of std::vector instead of buffer/Buffer
There were several scoped 'using buffer = std::vector<uint8_t>;' in header files. This consolidates the code base to use std::vector<uint8_t> ins
explicit use of std::vector instead of buffer/Buffer
There were several scoped 'using buffer = std::vector<uint8_t>;' in header files. This consolidates the code base to use std::vector<uint8_t> instead of buffer or Buffer. This makes the code easier to read and debug.
Change-Id: I918a0f6ca9b8e4b9d331175dccff45cbf4c8379d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
#
de203ced |
| 01-Aug-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Cleanup the console buffer on stopping the SOL payload.
Resolves openbmc/openbmc#1811
Change-Id: I45c7f9379e4df28733f55fbe4830573d0fe09c14 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
#
704f342f |
| 25-Apr-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Change accumulateInterval and retryInterval to std::chrono units.
Change-Id: I5e1234ee141323a1feb6460a9424226f96bc7522 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
#
32f07b8e |
| 25-Apr-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Correct the parameters for SOLContext constructor.
Change-Id: I3643e6b55d195f255815fa47adf02a5db0da6838 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
#
b81f7617 |
| 25-Apr-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Remove hostConsole fd from the event loop.
The fd is registered in the sd_event_loop, so as part of cleanup of the customFD the fd is removed from the event loop.
Change-Id: Idfc07375ae330c82755fb1
Remove hostConsole fd from the event loop.
The fd is registered in the sd_event_loop, so as part of cleanup of the customFD the fd is removed from the event loop.
Change-Id: Idfc07375ae330c82755fb1d08c8f181410cf917f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
show more ...
|
#
4ff14b59 |
| 14-Mar-2017 |
Tom Joseph <tomjoseph@in.ibm.com> |
Implement API to stop a payload instance
Change-Id: I8cf7a85f651e5a4377f8e64cbb32932f452a234e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|