History log of /openbmc/phosphor-net-ipmid/message_handler.cpp (Results 1 – 24 of 24)
Revision Date Author Comments
# 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 ...


# 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 ...


# 0a4dde44 12-Jul-2022 Lei YU <yulei.sh@bytedance.com>

message_handler: Hold the session instance

The message_handler was using `getSession()` to get the session of the
handler.

The session instance is valid until the handler is completed, so in
realit

message_handler: Hold the session instance

The message_handler was using `getSession()` to get the session of the
handler.

The session instance is valid until the handler is completed, so in
reality, it is reasonable for the handler to own the session instance.

In the ipmi stress test, it's found an issue that the session is marked
as inactive and gets removed from sessions_manager before the handler is
completed, so the `getSession()` will throw in `~Handler()` and an error
log is printed:

Async RMCP+ reply failed

The session at that time is actually valid.
Let the handler hold the session instance and do not call `getSession()`
every time it uses the session, so that it does not need to call
session_manager's `getSession()` in `~Handler()`.

There are cases that the Handler is created without calling
`updSessionData()`, inititalize the session in its constructor in such
cases.

Note that there will be following commits to address the `getSession()`
issue in others places.

Tested: With the following commits, there is no "Async RMCP+ reply
failed" logs anymore.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ief4cbf0237605f7a9b38d59acae42c86f046f792

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 ...


# 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 a

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 ...


# de7dd5ce 27-Feb-2021 Kirill Pakhomov <k.pakhomov@yadro.com>

Add RMCP Ping support

Added support of RMCP Ping/Pong request and response
(ASF messages).

Tested: Tested using rmcpping tool to send RMCP ping.

Resolves openbmc/phosph

Add RMCP Ping support

Added support of RMCP Ping/Pong request and response
(ASF messages).

Tested: Tested using rmcpping tool to send RMCP ping.

Resolves openbmc/phosphor-net-ipmid#15

Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
Change-Id: Ie5199e6af69860d9406bdd516952b62c3d05793f

show more ...


# 9979e997 07-Feb-2020 Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com>

Update the remote ip addr to session properties

Add remote ip address to session properties so that it is passed to
ipmi-host. This will enable certain commands to know the remote ip

Update the remote ip addr to session properties

Add remote ip address to session properties so that it is passed to
ipmi-host. This will enable certain commands to know the remote ip
address.

Tested:
Get session info command shows the remote ip address of the active
sessions.

ipmitool -I lanplus -H <ip_addr> -U <user> -P <password> session info all
session handle : 129
slot count : 45
active sessions : 1
user id : 1
privilege level : ADMINISTRATOR
session type : IPMIv1.5
channel number : 0x03
console ip : <remote ip address>
console mac : 00:00:00:00:00:00
console port : 50854

session handle : 0
slot count : 45
active sessions : 1

Signed-off-by: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com>
Change-Id: I1a431437da97240941390322adc59acb2c5323d1

show more ...


# f8a34fc4 12-Jun-2019 Suryakanth Sekar <suryakanth.sekar@linux.intel.com>

netipmid: Manage and expose session object

Session (RMCP+) is managed by net-ipmid directly, but
session commands has to be supported in both LAN & other
session-less interfaces. In

netipmid: Manage and expose session object

Session (RMCP+) is managed by net-ipmid directly, but
session commands has to be supported in both LAN & other
session-less interfaces. In order to make session commands
to work in other interfaces, session objects must be
exposed as D-Bus objects, so that ipmi-providers can
query the same.

Tested:
1. Verified that RMCP+ session are perfectly working
2. Verified RMCP+ session establishment fails for wrong
password
3. Verified that session privilege level are maintained
and access are restricted accordingly
4. Verified session timeout and sessions are destroyed
accordingly after timeout
5. verified max session count working behavior
6. verified ipmi-providers responding with proper response for this
(or D-Bus objects are exposed correctly during session creation,
session deletion,session update,
(like privilege, - say even set session privilege level command)
7.Session objects are created dynamically.

Change-Id: I78a8449359877ef6cc4cd8161d8c67e6e54eb52b
Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>

show more ...


# 8af90ebc 03-Mar-2019 Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

Skip IPMI Payload commands - IPMI Mesg disabled

Skip IPMI Payload type commands, if IPMI messaging is disabled
for the user.

Tested-by:
Verified that commands are not execut

Skip IPMI Payload commands - IPMI Mesg disabled

Skip IPMI Payload type commands, if IPMI messaging is disabled
for the user.

Tested-by:
Verified that commands are not executed through RMCP+ when
IPMI Messaging is disabled for the user through Set
Channel Acess command. Verified the reverse too.

Change-Id: Ibcfd2a18ccc8b0c498eb06ffb56363b94a735b5e
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>

show more ...


# 8d6f200c 07-Nov-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: make Handler asynchronous

The dbus call to the main ipmid queue was up to this point synchronous,
which means it blocks all other networking and execution until the main
qu

netipmid: make Handler asynchronous

The dbus call to the main ipmid queue was up to this point synchronous,
which means it blocks all other networking and execution until the main
queue returns (which may be on the order of seconds for some commands).
This is an unacceptable delay, especially when this queue is responsible
for timely updates of SOL traffic.

This turns the call into an asynchronous one by leveraging shared
pointers and an optional action on destruction. So as long as a
reference to the Handler object exists, it will live on, waiting to send
its response. Once the async dbus call has returned and set the reply in
the Handler, it will drop the reference to the shared pointer and the
destructor will send out the response over the channel.

Tested-by: Run multiple sessions at the same time while monitoring dbus
traffic. See that the requests and responses may be
interleaved instead of serial.

Change-Id: I16fca8dc3d13624eeb1592ec36d1a9af6575f115
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 7f268e4d 26-Oct-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: consolidate message-related things in message.hpp

The message::Handler class was directly manipulating a bunch of stuff
on behalf of the message::Message class. This change mov

netipmid: consolidate message-related things in message.hpp

The message::Handler class was directly manipulating a bunch of stuff
on behalf of the message::Message class. This change moves more of the
changes into the message::Message class so it can manage its own data.

Change-Id: I5d31f6c3c5760207408238d048853e36a60c73e0
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# fc37e59e 19-Dec-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: replace std::cerr with phosphor::logging calls

This is part of a cleanup and standardization effort of code to get
existing code up to date.

Change-Id: I0c982ef8d7afa2

netipmid: replace std::cerr with phosphor::logging calls

This is part of a cleanup and standardization effort of code to get
existing code up to date.

Change-Id: I0c982ef8d7afa2f56a9cd204bb8ac3112769641c
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# 224f36a4 25-Oct-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: use shared_ptr on session instead of shared_ptr+references

session objects were being created and held by shared_ptr objects and
then shared via reference. This is dangerous an

netipmid: use shared_ptr on session instead of shared_ptr+references

session objects were being created and held by shared_ptr objects and
then shared via reference. This is dangerous and sidesteps the whole
point of a shared_ptr, which is to share reference-counted ownership.
This replaces the usage with a shared_ptr, which shows shared ownership.

Change-Id: Ie22d812a6d260d606201eca6a9011e773c89e487
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# d999ffc1 25-Oct-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: use shared_ptr on messages instead of unique_ptr+references

Messages were being created and held by unique_ptr objects and then
shared via reference. This is dangerous and side

netipmid: use shared_ptr on messages instead of unique_ptr+references

Messages were being created and held by unique_ptr objects and then
shared via reference. This is dangerous and sidesteps the whole point of
a unique_ptr, which is to enforce single ownership. This replaces the
usage with a shared_ptr, which denotes shared ownership.

Change-Id: I19ed2693f5a0f5ce47d720ed255fa05bdf3844f8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

show more ...


# ae1fda44 15-Oct-2018 Vernon Mauery <vernon.mauery@linux.intel.com>

netipmid: use std::shared_ptr instead of weak_ptr/lock

All of the instances of getSession and startSession were assigning the
result to a local shared_ptr via lock on the weak_ptr. It do

netipmid: use std::shared_ptr instead of weak_ptr/lock

All of the instances of getSession and startSession were assigning the
result to a local shared_ptr via lock on the weak_ptr. It doesn't make
sense to demote the shared_ptr (from the sessionsMap) to a weak_ptr via
the return, only to promote to a shared_ptr again via lock.

Tested-by: running ipmitool -H a.b.c.d -P 0penBmc -I lanplus mc info
Sessions start and stop, same as before.

Change-Id: Ic10779285891d73ee51115f16ed0000b38d1c52a
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

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::vec

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 ...


# 04b30381 02-Apr-2017 Tom Joseph <tomjoseph@in.ibm.com>

Throw exception instead of returning error code from send function.

Change-Id: I87d2805dfb7f8757c0366600d8937023edddf54a
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>


# 63d3e49c 31-Mar-2017 Tom Joseph <tomjoseph@in.ibm.com>

Add function to send unsolicited IPMI payload to remote console.

Change-Id: Ifd9c711c16a6640d36d6247a7c3b46a7db1c6596
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>


# 22596f21 31-Mar-2017 Tom Joseph <tomjoseph@in.ibm.com>

Add function to send outbound SOL payload

Change-Id: I63213034110c0a550b43e1cbc0115b1312821e3d
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>


# 703adbfa 31-Mar-2017 Tom Joseph <tomjoseph@in.ibm.com>

No response is send via the packet handler if payload is SOL.

There are 2 scenarios for handling inbound SOL payload, an ack only
packet or packet with console data. In the case of ack o

No response is send via the packet handler if payload is SOL.

There are 2 scenarios for handling inbound SOL payload, an ack only
packet or packet with console data. In the case of ack only packet
no response needs to send. There is also a case where host data is
send in an unsolicited way to the remote console. So a unified interface
sendPayload is used to send SOL responses.

Since the evaluation of the scenario is delegated to another function,
the command handler would not send any response data.The delegated function
would evaluate whether a response needs to be sent and send the appropriate
response using the sendPayload.

Change-Id: Ic32f172a398ab85a5ee87b17a0a740e83482511f
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>

show more ...


# ff848494 31-Mar-2017 Tom Joseph <tomjoseph@in.ibm.com>

Provide API to set socket channel in session object.

Change-Id: I7d9620c4a34bb8bb85ed6f60ac8b2032355087f6
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>


# 8dfa0f0d 10-Jan-2017 Tom Joseph <tomjoseph@in.ibm.com>

Copy the IPMI input message details to output message

Copy the encrytion,authentication and bmc session id from the
IPMI input message to output IPMI message.

Change-Id: I16e3ad

Copy the IPMI input message details to output message

Copy the encrytion,authentication and bmc session id from the
IPMI input message to output IPMI message.

Change-Id: I16e3adaad4e0c4ce3f2a9ad48c327d5b0bb0be9b
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>

show more ...


# e6361a21 10-Aug-2016 Tom Joseph <tomjoseph@in.ibm.com>

Add Message Handler

IPMI message Handler encapsulates the operations with respective to each
IPMI message.The routines are there to read the message, execute the
command and send the

Add Message Handler

IPMI message Handler encapsulates the operations with respective to each
IPMI message.The routines are there to read the message, execute the
command and send the response.

Change-Id: I607416f723510326748b3eba73f3a6557c40dd06
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>

show more ...