summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2018-04-12 12:17:20 -0700
committerEd Tanous <ed.tanous@intel.com>2018-06-29 11:11:20 -0700
commitaa2e59c10280ca4819926905e77a076bdb72a03f (patch)
treeda6549670170adddb92459cea40ce4c05fe8d213 /src
parent274fad5ad0e7634d9ed3e174695136e674688e0c (diff)
downloadbmcweb-aa2e59c10280ca4819926905e77a076bdb72a03f.tar.gz
bmcweb-aa2e59c10280ca4819926905e77a076bdb72a03f.zip
Move bmcweb over to sdbusplus
This patchset moves bmcweb from using boost-dbus over entirely to sdbusplus. This has some nice improvements in performance (about 30% of CPU cycles saved in dbus transactions), as well as makes this project manuver closer to the upstream way of thinking. Changes to bmcweb are largely ceremonial, and fall into a few categories: 1. Moves async_method_call instances to the new format, and deletes any use of the "endpoint" object in leiu of the sdbusplus style interface 2. sdbus object_path object doesn't allow access to the string directly, so code that uses it moves to explicit casts. 3. The mapbox variant, while attempting to recreate boost::variant, misses a T* get<T*>() method implementation, which allows using variant without exceptions. Currently, there is an overload for mapbox::get_ptr implementation which replecates the functionality. Tested by: Booting the bmcweb on a target, iterating through redfish basic phosphor-webui usage, and websockets usage Change-Id: I2d95882908d6eb6dba00b9219a221dd96449ca7b Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/webserver_main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 16180ae..7531503 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -1,11 +1,13 @@
#include <systemd/sd-daemon.h>
-#include <dbus/connection.hpp>
#include <dbus_monitor.hpp>
#include <dbus_singleton.hpp>
#include <intel_oem.hpp>
#include <openbmc_dbus_rest.hpp>
#include <persistent_data_middleware.hpp>
#include <redfish_v1.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server.hpp>
#include <security_headers_middleware.hpp>
#include <ssl_key_handler.hpp>
#include <token_authorization_middleware.hpp>
@@ -73,12 +75,11 @@ int main(int argc, char** argv) {
CROW_LOG_INFO << "bmcweb (" << __DATE__ << ": " << __TIME__ << ')';
setup_socket(app);
- // Start dbus connection
crow::connections::system_bus =
- std::make_shared<dbus::connection>(*io, dbus::bus::system);
-
+ std::make_shared<sdbusplus::asio::connection>(*io);
redfish::RedfishService redfish(app);
app.run();
io->run();
+
}
OpenPOWER on IntegriCloud