#
e0c41de4 |
| 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I4685454a66a0a4832d138d6b4df649e804fa25d0 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I4685454a66a0a4832d138d6b4df649e804fa25d0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
97e69ca1 |
| 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: I7c1a903d0b8fe5df2da9a73bda2d84113e9d854d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
0dea6fa8 |
| 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: I35d3ba19f100c4f2f0a924af86454a5fabeae03c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
52509572 |
| 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: I86d194886a4dcd325364041d4c7745f4ea22fd65 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
83f9992c |
| 22-Jun-2022 |
Willy Tu <wltu@google.com> |
Recover Add ipmi response buffer size check for all commands
Use the ipmi::Context channel to get the max transfer size to make sure that we select the right size.
Also remove maximumReadSize since
Recover Add ipmi response buffer size check for all commands
Use the ipmi::Context channel to get the max transfer size to make sure that we select the right size.
Also remove maximumReadSize since the max reply size is checked instead
We already check the max reply size so maximumReadSize is not needed anymore. This will result in a bit of a different behavior when the size exceed the max. It will not fail - instead, it will return up to the max size.
Tested: Work with ipmi config that doesn't support the default interface (13). ``` cat /usr/share/ipmi-providers/channel_config.json { "0": { "name": "usb0", "is_valid": true, "active_sessions": 0, "channel_info": { "medium_type": "lan-802.3", "protocol_type": "ipmb-1.0", "session_supported": "multi-session", "is_ipmi": true } }, "8": { "name": "INTRABMC", "is_valid": true, "active_sessions": 0, "channel_info": { "medium_type": "oem", "protocol_type": "oem", "session_supported": "session-less", "is_ipmi": true } }, "11": { "name": "gbmcbr", "is_valid": true, "active_sessions": 0, "channel_info": { "medium_type": "lan-802.3", "protocol_type": "ipmb-1.0", "session_supported": "multi-session", "is_ipmi": true } } } ```
This read the blob count and always works now since it uses the right interface to get the max transfer size. ``` ipmitool raw 46 128 207 194 0 0 cf c2 00 4a ac 0e 00 00 00 ```
Change-Id: Ia65f80719a819e7d642eb7425463a56c179935ac Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
#
9cd8f76d |
| 22-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
Various cleanups
* Move functions to private as appropriate * Reorder functions to match declaration order * Declare arguments as const when appropriate * Rename to getActionHandler() to match previ
Various cleanups
* Move functions to private as appropriate * Reorder functions to match declaration order * Declare arguments as const when appropriate * Rename to getActionHandler() to match previous method name
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I7d3b5bbb07c218c6c2d6277a1f19d8a0299bd6e6
show more ...
|
#
beee9e54 |
| 22-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
cleanup: remove getPath
The getPath call is only used once. Getting rid of it makes it easier to understand.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ifc8859f5fc68bb594003a6db7f7e80b1c
cleanup: remove getPath
The getPath call is only used once. Getting rid of it makes it easier to understand.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ifc8859f5fc68bb594003a6db7f7e80b1c1dfed28
show more ...
|
#
cd833aa1 |
| 22-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
Fix openFiles refcount
The old code deletes session from the session map before doing a lookup of the path. Fix the order and add a unit test to catch the error case. (The unit test would fail witho
Fix openFiles refcount
The old code deletes session from the session map before doing a lookup of the path. Fix the order and add a unit test to catch the error case. (The unit test would fail without this fix).
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: If043d6aad7bbaafa19ae3b63a6d9cc7a836d25b5
show more ...
|
#
fea1d811 |
| 14-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
cleanup: Use scoped initializers; move implementation to source file
Simplify code and address comments from http://gerrit.openbmc-project.xyz/c/openbmc/phosphor-ipmi-blobs/+/27399:
* Use C++17 syn
cleanup: Use scoped initializers; move implementation to source file
Simplify code and address comments from http://gerrit.openbmc-project.xyz/c/openbmc/phosphor-ipmi-blobs/+/27399:
* Use C++17 syntax of intializers in conditionals to simplify code. * Move getActionHandle() implementation to .cpp * return false explicitly
Tested: Unit tests still pass.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I08a78125206f284d8c748822912e11828fb39968
show more ...
|
#
9ce83482 |
| 14-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
cleanup: Operate on members directly and allow empty paths in the lookup table
Instead of using private methods to change data, directly operate on it. Currently no test depends on these methods.
T
cleanup: Operate on members directly and allow empty paths in the lookup table
Instead of using private methods to change data, directly operate on it. Currently no test depends on these methods.
There is also a minor bug fix: the previous code will not increment or decrement the open session count if the blobId is an empty string, however there is no check on the manager side. If empty blobIds are disallowed they should be checked earlier.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I8d97e098bed2d5c27a204a86ed688d0d9a98f0a2
show more ...
|
#
b61a88ba |
| 13-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
Implement session expiration
If the caller opens sessions but doesn't close them, either intentionally or unintentionally, session IDs will leak. Once the maximum number of sessions are reached, no
Implement session expiration
If the caller opens sessions but doesn't close them, either intentionally or unintentionally, session IDs will leak. Once the maximum number of sessions are reached, no new session can be opened.
Implement a cleanup procedure to automatically remove stale sessions. If a session hasn't seen activity for a while, call the expire() functions on the handler, and remove the session from tracking table. For handlers that haven't implemented the expire() call this change will be a no-op.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I895ae19b4003d2d6f7a0b2e73370fe5aa664adee
show more ...
|
#
c892f4a0 |
| 19-Nov-2019 |
Kun Yi <kunyi731@gmail.com> |
Refactor various methods to get session or blob handler
Use a single method to fetch the handler, if it can be found using session ID.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I648cbc4
Refactor various methods to get session or blob handler
Use a single method to fetch the handler, if it can be found using session ID.
Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: I648cbc48ebfae479f63d34e8f2465d2c8cbe9d64
show more ...
|
#
8bc11779 |
| 04-Jun-2019 |
Patrick Venture <venture@google.com> |
blobs: s/struct BlobMeta/BlobMeta/g
Because this structure is not anything special, simply use the cpp idiomatic way of referencing the object.
Consistently, structures that are packed still have "
blobs: s/struct BlobMeta/BlobMeta/g
Because this structure is not anything special, simply use the cpp idiomatic way of referencing the object.
Consistently, structures that are packed still have "struct" used in declarations. However, this distinction is only clear through its usage and nothing in the language. Perhaps a better approach would be notational naming struct PackedXYZ {};. However, that can get out of control quickly.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I3b7e48e4b6687ef2e15e9d07c0eeba96eb5d2552
show more ...
|
#
86c87f55 |
| 01-Feb-2019 |
Patrick Venture <venture@google.com> |
manager: add hard-coded read checks
The host-client cannot try to read back more than this number of bytes without hitting a memory overflow in phosphor-host-ipmid. The method we can call to dynami
manager: add hard-coded read checks
The host-client cannot try to read back more than this number of bytes without hitting a memory overflow in phosphor-host-ipmid. The method we can call to dynamically receive that number isn't currently linking out of the userlayer library.
Note: Once the configure_ac can find and provide the userlayer library from phosphor-host-ipmid, we can remove the hard-coded 64 and 0xe.
Change-Id: I08f6bb59ce44279f76a494dccaa477ae75d532c4 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
cd8dab49 |
| 15-Jan-2019 |
Patrick Venture <venture@google.com> |
stop installing manager header
Stop installing the manager header as it is no longer meant to be exported, but rather used only internally within this repository.
Change-Id: I2ab21a31fd745e1b3e36fc
stop installing manager header
Stop installing the manager header as it is no longer meant to be exported, but rather used only internally within this repository.
Change-Id: I2ab21a31fd745e1b3e36fc39ffea5e26d373ff51 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
2f58151e |
| 10-Jan-2019 |
Patrick Venture <venture@google.com> |
manager: typo fix available
Typo fix in manager_cpp for word "available"
Change-Id: I0c4382023fef63f332d4cd677d82ad30e0a44b26 Signed-off-by: Patrick Venture <venture@google.com>
|
#
e50d4e4a |
| 23-Oct-2018 |
Patrick Venture <venture@google.com> |
manager: fixup to use find_if
[manager.cpp:150]: (style) Consider using std::find_if algorithm instead of a raw loop.
Note: Amusingly switching to a const iterator allowed cppcheck to find this cle
manager: fixup to use find_if
[manager.cpp:150]: (style) Consider using std::find_if algorithm instead of a raw loop.
Note: Amusingly switching to a const iterator allowed cppcheck to find this cleanup.
Change-Id: I16d87d4dde165fbb226259d1abc8deaa51569af1 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
a6e21a07 |
| 23-Oct-2018 |
Patrick Venture <venture@google.com> |
cleanup: apply const to read-only iterators
Apply const to read-only iterators.
Change-Id: Ib58f98596cb9f185d3b16a0b1fbd895dd37d3fd6 Signed-off-by: Patrick Venture <venture@google.com>
|
#
c9ad5ffb |
| 12-Oct-2018 |
Patrick Venture <venture@google.com> |
manager: reduce scope of variable
The lsess variable can have a smaller scope.
Change-Id: I79aa84b25b52708c8c35ed1a56dbfe89dabd29fb Signed-off-by: Patrick Venture <venture@google.com>
|
#
5c4b17b2 |
| 04-Oct-2018 |
Patrick Venture <venture@google.com> |
new command: BmcBlobWriteMeta
Implement new command BmcBlobWriteMeta.
Change-Id: I2e148f4bde4ef5d24db7e30bb02bdde024d9166a Signed-off-by: Patrick Venture <venture@google.com>
|
#
73eb687a |
| 01-Oct-2018 |
Patrick Venture <venture@google.com> |
manager: return abstract base type
Unit-tests later required knowing the vtable for a BlobManager, and this should avoid that needless complication.
Change-Id: I7a208d08c2065b7383fd5095e00d17c1ab3b
manager: return abstract base type
Unit-tests later required knowing the vtable for a BlobManager, and this should avoid that needless complication.
Change-Id: I7a208d08c2065b7383fd5095e00d17c1ab3b0cf5 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
b3e07e2b |
| 27-Sep-2018 |
Patrick Venture <venture@google.com> |
manager: add getBlobManager as an exported method
getBlobManager will allow a library to get ahold of the BlobManager for registration purposes.
Change-Id: I75f41601d10d59293c7752da8307507cc2c88434
manager: add getBlobManager as an exported method
getBlobManager will allow a library to get ahold of the BlobManager for registration purposes.
Change-Id: I75f41601d10d59293c7752da8307507cc2c88434 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
aceb4baa |
| 27-Sep-2018 |
Patrick Venture <venture@google.com> |
move blobs and manager header into installation dir
The blobs and manager header will be used by handlers once we've transitioned to dynamic loading.
Change-Id: Ieae8fcfe383007731cb4f8b2619612c3bfa
move blobs and manager header into installation dir
The blobs and manager header will be used by handlers once we've transitioned to dynamic loading.
Change-Id: Ieae8fcfe383007731cb4f8b2619612c3bfa47f50 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
ef3aeadc |
| 12-Sep-2018 |
Patrick Venture <venture@google.com> |
initial drop of phosphor-ipmi-blobs
This implements a majority of the OEM IPMI BLOBS protocol. The only piece missing from this is the timed expiration of sessions.
Change-Id: I82c9d17b625c94fc334
initial drop of phosphor-ipmi-blobs
This implements a majority of the OEM IPMI BLOBS protocol. The only piece missing from this is the timed expiration of sessions.
Change-Id: I82c9d17b625c94fc3340edcfabbbf1ffeb5ad7ac Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|