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 ...
|
426fcab8 | 13-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
SOL: Another attempt to fix coredump issue
The commit "SOL: Fix coredump due to recursive call deadlock" (5499bf862d1240bdbc061afc6e3d4f332c31329a) tried to fix coredump issue when the buffer size i
SOL: Another attempt to fix coredump issue
The commit "SOL: Fix coredump due to recursive call deadlock" (5499bf862d1240bdbc061afc6e3d4f332c31329a) tried to fix coredump issue when the buffer size is larger than the send threshold (i.e. user types too fast in the SoL session). Despite of the commit message the provided solution doesn't seem to fix the crashdump issue. Revert 5499bf862d and implement a proper solution.
Normally 'enableAccumulateTimer()' launches a timer to accumulate data before send, and after the timeout the 'charAccTimerHandler()' sends all the data via the 'sendOutboundPayload()' function. If the buffer is not ready at that moment, the 'charAccTimerHandler()' relaunches the timer via the 'enableAccumulateTimer()' call. At the same time the 'enableAccumulateTimer()' function has an optimization: if the data size is more than 'sendThreshold' there is no point in timer, data can be send directly from the function. For that the current code calls the 'charAccTimerHandler()'. In the end this can create an endless recursion in times when buffer is not ready: enableAccumulateTimer() charAccTimerHandler() sendOutboundPayload() enableAccumulateTimer() ... To solve the issue we need to be careful about when we call the 'enableAccumulateTimer()' function: - first of all we don't need to call it from 'sendOutboundPayload()' since it is already called from the 'charAccTimerHandler()', - secondary in the 'enableAccumulateTimer' optimization case we don't need to call 'charAccTimerHandler()' which can re-launch timer but can just use 'sendOutboundPayload()' directly.
Tested: SOL console in ipmitool works fine if holding arrow up/down key for a long time.
Change-Id: Ibec03fc1394f23ba39b6f2d5a929928588e00590 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
5499bf86 | 24-Jan-2024 |
Jian Zhang <zhangjian.3032@bytedance.com> |
SOL: Fix coredump due to recursive call deadlock
When the data buffer size is always larger than the send threshold. The recursive call deadlock when any input event is received.
the backtrace is a
SOL: Fix coredump due to recursive call deadlock
When the data buffer size is always larger than the send threshold. The recursive call deadlock when any input event is received.
the backtrace is as below: - enableAccumulateTimer - charAccTimerHandler - sendOutboundPayload - enableAccumulateTimer
using io.post avoid the recursive call deadlock.
Change-Id: Ic67d2c6dfce5c658b7ef4813bf3a62ad93ced8ad Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
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 ...
|
15535143 | 21-Sep-2022 |
Tang Yiwei <tangyiwei.2022@bytedance.com> |
Optimize SOL logic according to SOL Configuration Parameters definition
Issue without this patch: ipmi sol is always slower than web sol and system output.
Defined in ipmi spec: Byte 2: Character S
Optimize SOL logic according to SOL Configuration Parameters definition
Issue without this patch: ipmi sol is always slower than web sol and system output.
Defined in ipmi spec: Byte 2: Character Send Threshold. 1-based. The BMC will automatically send an SOL character data packet containing this number of characters as soon as this number of characters(or greater) has been accepted from the baseboard serial controller into the BMC.
Tested: 1. ipmitool -I lanplus -H <BMC IP> -U <user> -P <pwd> sol activate 2. ipmi sol output is consistent with system output.
Signed-off-by: Tang Yiwei <tangyiwei.2022@bytedance.com> Change-Id: I097e5f4bf7ff224a90505dcb69cd59039a297e08
show more ...
|
be1aa083 | 25-May-2023 |
Jonathan Doman <jonathan.doman@intel.com> |
Use new default obmc-console socket path
Change-Id: I15d6dcdb6993e51f13572d022cb3039e50df6c47 Signed-off-by: Jonathan Doman <jonathan.doman@intel.com> |
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 ...
|
9d9b7638 | 17-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
size_t: ensure cstddef included
Latest upstream yocto appears to have removed a free include of cstddef. This is causing compile failures for files which do not include it properly.
Signed-off-by:
size_t: ensure cstddef included
Latest upstream yocto appears to have removed a free include of cstddef. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ie54a2768ef72f59ab140df05e79e86baae6eaa82
show more ...
|
7408e76a | 17-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: An
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I76b1d73d045f98bd457c155086e000a430134918
show more ...
|
a3de8a8b | 08-May-2020 |
Yong Li <yong.b.li@linux.intel.com> |
Use public for enable_shared_from_this
The default inheritance for class is private, the weak_from_this will always returns NULL. This causes the SOL data is out of sync, change it to public.
Teste
Use public for enable_shared_from_this
The default inheritance for class is private, the weak_from_this will always returns NULL. This causes the SOL data is out of sync, change it to public.
Tested: Ipmitool sol works the same as SOL in webui
Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I8f80521e58684c178973447e40c7a10dd2ae18c9
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 ...
|
ddba9d15 | 13-Sep-2019 |
Ayushi Smriti <smriti.ayushi@linux.intel.com> |
Fix: Incorrect max instance for get payload status
Response data byte 2 value for the get payload activation status cmd, was 0x10 which is decoded as 0 instances activated since bit 7:4 reserved. Cu
Fix: Incorrect max instance for get payload status
Response data byte 2 value for the get payload activation status cmd, was 0x10 which is decoded as 0 instances activated since bit 7:4 reserved. Currently SOL payload is only supported and there can be 1 max sol payload instance. This code provides fix for the same by correcting sol payload instance capacity.
Tested: Verified by issuing get payload status activation command through ipmitool.
ipmitool -I lanplus -H <ip> -U xxxx -P xxxxxxx raw 0x06 0x4A 0x01 01 00 00 //Response
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com> Change-Id: I874fe3fe784417c9460a1cee5bb5e6bc36291012
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 ...
|