51694c22 | 24-Apr-2019 |
William A. Kennington III <wak@google.com> |
message/payload: Clean up check / trailing state
We want to be able to trivially re-use payloads for marshalling data from a buffer into other formats. This change tries to make the meaning of trail
message/payload: Clean up check / trailing state
We want to be able to trivially re-use payloads for marshalling data from a buffer into other formats. This change tries to make the meaning of trailingOk and unpackCheck consistent, since the meanings didn't seem clear in the previous code. Now, unpackCheck is only used to determine if unpacking was checked, and trailingOk determines if unpackCheck is required.
This also fixes lots of spurious warnings being printed for commands which were checking their output correctly, or were legacy and unable to check output.
Change-Id: Id7aa9266693b4e3f896027acf6b3e5d757fdf981 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
d6a2da07 | 09-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
add rqSA ipmb request source address
Platform Event Message Command requires that if the message comes in over IPMB, the generator ID is the rqSA of the message. IPMB bridge is now responsible for p
add rqSA ipmb request source address
Platform Event Message Command requires that if the message comes in over IPMB, the generator ID is the rqSA of the message. IPMB bridge is now responsible for passing this in via the options map so it can be passed in the context to the command.
Change-Id: I52b7c9ef23896a4efcceeebf12559bbdf897d1c2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
00b096d1 | 15-Apr-2019 |
Alexander Amelkin <a.amelkin@yadro.com> |
Fix compilation warning regarding std::variant
When building with SDK, the compiler complains about ’variant’ being not a member of ’std’:
.../pack.hpp:249:24: error: ‘variant’ is not a member of ‘
Fix compilation warning regarding std::variant
When building with SDK, the compiler complains about ’variant’ being not a member of ’std’:
.../pack.hpp:249:24: error: ‘variant’ is not a member of ‘std’
This commit adds appropriate #include to fix that.
Change-Id: I99d6b7c17cbe1f49d706821797cf3fa03ca8c26a Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
show more ...
|
0d49e479 | 08-Apr-2019 |
William A. Kennington III <wak@google.com> |
message/unpack: Fix undefined behavior
It's UB to shift an integer by the size of that integer. More specifically, if you disable compiler optimization and try and unpack a 32 bit bitset you will en
message/unpack: Fix undefined behavior
It's UB to shift an integer by the size of that integer. More specifically, if you disable compiler optimization and try and unpack a 32 bit bitset you will end up with a 0x0 mask. Avoid UB by replacing shift subtract with a negate shift.
Tested: Unit tests pass now.
Change-Id: I03a6f866a51c955b57787d641da9180841747e4c Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
508c4576 | 08-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add a tuple type for packing
At the top level, payload had the ability to pack a tuple, but it did it by splitting it into its parts and packing those individually. But if one of those parts was a t
Add a tuple type for packing
At the top level, payload had the ability to pack a tuple, but it did it by splitting it into its parts and packing those individually. But if one of those parts was a tuple, it would fail. This moves the tuple packing code into the packing templates so that it is possible to pack a nested tuple of tuples.
Tested-by: newly written tuple unit tests pass
Change-Id: Icd80926314072df78b0083a823dcfb46e944e365 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
336405b8 | 08-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add error message to build to make packing type errors clear
Because the base template actually handles things (all integer types), it needs to ward off non-integer types in a clear way, rather than
Add error message to build to make packing type errors clear
Because the base template actually handles things (all integer types), it needs to ward off non-integer types in a clear way, rather than relying on the user seeing that a tuple doesn't have an operator <<(), for example. This provides a clear message if a specialized pack operation was not hit.
Tested-by: attempted to build with a non-supported pack type
Change-Id: I66280831e88b4eac903b89f523e5f1a56a53cf9d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
bea53925 | 03-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add helper functions to simplify error responses
Most IPMI commands have some error response. This makes it more intuitive what is happening, changing
return ipmi::response(cc::CommandNotAvaila
Add helper functions to simplify error responses
Most IPMI commands have some error response. This makes it more intuitive what is happening, changing
return ipmi::response(cc::CommandNotAvailable); to return ipmi::responseCommandNotAvailable();
which is parallel to the success respones of: return ipmi::responseSuccess();
Change-Id: Ibbd401c4007a02e91ab4983814b920d6d7f02404 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
e08fbffc | 03-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Only include ipmid/api.hpp for the new API
After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to
Only include ipmid/api.hpp for the new API
After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to write new handlers 2) only require including ipmid/api.hpp (instead of ipmid/api.h)
So now, by simply including ipmid/api.hpp instead of ipmid/api.h (deprecated), handlers incorporating the new IPMI API can be written.
Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
ded4c74e | 02-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Fix utility.hpp to use correct types for Request and Context
When requesting a Request or Context object as part of the handler signature, it should be a std::shared_ptr<ipmi::Context> or std::share
Fix utility.hpp to use correct types for Request and Context
When requesting a Request or Context object as part of the handler signature, it should be a std::shared_ptr<ipmi::Context> or std::shared_ptr<ipmi:message::Request>. There was a bug that made it so it was not possible to have either of those in the signature. This commit enables both.
Change-Id: Ib52000f643d7b5f21bc4022629e7d7b03a524dc1 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
bae91350 | 03-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add support for returning optional values
Some commands have optional return values. This allows the handlers to be defined as returning an optional<T> value and then in the body of the handler set
Add support for returning optional values
Some commands have optional return values. This allows the handlers to be defined as returning an optional<T> value and then in the body of the handler set the value in the optional or not.
Tested-by: unit test runs successfully
Change-Id: Ib38a4589609fb1eb192106e511c9ee3a507ac42f Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
f299807f | 03-Apr-2019 |
James Feist <james.feist@linux.intel.com> |
message: pack: add variant support
Add variant support to allow return of mutliple specific types. Also change types to const as this is required by the visitor and these could have been const all a
message: pack: add variant support
Add variant support to allow return of mutliple specific types. Also change types to const as this is required by the visitor and these could have been const all along.
Tested: Added unit test and used in oem provider
Change-Id: I5cb056c15d4813b9eee58eecb707664477d019d9 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
392050fa | 01-Apr-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
remove legacy ipmid.cpp and ipmid.hpp
These two files have now been replaced with newer APIs and can be removed.
Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3 Signed-off-by: Vernon Mauery <v
remove legacy ipmid.cpp and ipmid.hpp
These two files have now been replaced with newer APIs and can be removed.
Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
33250240 | 12-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
move types.hpp to ipmid/types.hpp for export
types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory, changes the
move types.hpp to ipmid/types.hpp for export
types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory, changes the Makefile to export it, and changes all the files that include it so it can be found in the right place.
Change-Id: I30ec365446e4de466c266ec4faa327478460ec05 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
6a98fe7f | 11-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Move util.cpp/util.hpp to libipmid
These are functions that are used widely by ipmid providers, so it makes sense to put them in libipmi.so (the library that all providers must link against).
Teste
Move util.cpp/util.hpp to libipmid
These are functions that are used widely by ipmid providers, so it makes sense to put them in libipmi.so (the library that all providers must link against).
Tested-by: use nm to inspect the binaries to see that the symbols are in the expected library.
arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \ | grep getDbusObject 0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus....
Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
be376306 | 21-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add user context parameter to legacy ipmi handler registration
This part was originally omitted, but needed by some external provider libraries. This will more closely mimic the behavior of ipmid pr
Add user context parameter to legacy ipmi handler registration
This part was originally omitted, but needed by some external provider libraries. This will more closely mimic the behavior of ipmid prior to the architecture update.
Change-Id: I5db35222e268a117480285c700d88206d6505d92 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
3719c2fc | 20-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Add generic signal handling API to work with boost::asio
This allows providers or the main application to handle POSIX signals using a callback chain. Each handler can return continueExecution or br
Add generic signal handling API to work with boost::asio
This allows providers or the main application to handle POSIX signals using a callback chain. Each handler can return continueExecution or breakExecution to stop the signal handling chain or allow it to continue. Each handler is registered with a priority and upon reciept of a signal, each handler is executed in priority order until the end of the list is reached or one returns with breakExecution.
Change-Id: Idd83625eb1a2d3bdafc92bdd839e0d6386177ff2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
20ff333d | 01-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
Change linkage of ipmid_get_sdbus_plus_handler() to libipmid.so
ipmid_get_sdbus_plus_handler() was re-added to be a part of systemintfcmds where it was used. This moves it to libipmid.so because tha
Change linkage of ipmid_get_sdbus_plus_handler() to libipmid.so
ipmid_get_sdbus_plus_handler() was re-added to be a part of systemintfcmds where it was used. This moves it to libipmid.so because that is where symbols used by both ipmid and the providers should be.
Because ipmid_get_sdbus_plus_handler() relies on the io service and the main sdbus::asio::connection is also right there, this moves those symbols to libipmid as well to keep coherent.
Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
bfe55a1f | 08-Mar-2019 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
errorResponse must not pack completion code in data payload
Until the response goes back out onto D-Bus, the completion code is held in a separate part of the Response object. The D-Bus response has
errorResponse must not pack completion code in data payload
Until the response goes back out onto D-Bus, the completion code is held in a separate part of the Response object. The D-Bus response has a separate field for the completion code as well, reserving a byte array for response data only.
This fixes the ipmitool error message 'Bad response length, len=1' when it attempts to query the PICMG capabilities.
Change-Id: Iff0c3cb2e46a20e52229265eebb0995878a41714 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
08a70aa5 | 07-Nov-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
ipmid: Add command filter mechanism
Every ipmi command will pass through a filter prior to execution by the registered handler. The filter consists of all registered filter handlers that all must ei
ipmid: Add command filter mechanism
Every ipmi command will pass through a filter prior to execution by the registered handler. The filter consists of all registered filter handlers that all must either return an IPMI error code or allow the command to be executed. If any of the filter handlers return an error code, the remaining handlers will not get a chance to run.
Each handler, executed in registered priority order, can be passed the full message, or just the context (metadata describing the command, netfn, cmd, etc.)
Change-Id: I3c48f19ebae0d24344b15fbcd2b940a32f8511d7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
f984a01f | 08-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
ipmid: Add in Native OEM and Group OEM support
Add full support for the IPMI OEM NetFn and the Group OEM support as defined in the IPMI 2.0 specification.
For now the legacy OEM router mechanism is
ipmid: Add in Native OEM and Group OEM support
Add full support for the IPMI OEM NetFn and the Group OEM support as defined in the IPMI 2.0 specification.
For now the legacy OEM router mechanism is still supported.
Change-Id: I8cc999489000c6e0daf5aad3579838e6f499ba47 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
e7329c71 | 08-Oct-2018 |
Vernon Mauery <vernon.mauery@linux.intel.com> |
ipmid: Compiler-generated unpacking and packing of messages
handler.hpp has the templated wrapping bits for ipmi command handler callbacks implemented.
message.hpp has the serialization/deserializa
ipmid: Compiler-generated unpacking and packing of messages
handler.hpp has the templated wrapping bits for ipmi command handler callbacks implemented.
message.hpp has the serialization/deserialization of the ipmi data stream into packed tuples for functions. message/pack.hpp and message/unpack.hpp contain the actual serialization and deserialization of types.
Change-Id: If997f8768c8488ab6ac022526a5ef9a1bce57fcb Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
show more ...
|
194375f2 | 14-Dec-2018 |
William A. Kennington III <wak@google.com> |
Create libipmid and libipmid-host
This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and da
Create libipmid and libipmid-host
This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon.
In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers.
This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended.
Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|