commit | c00500bcb9c5145f5cacb78bbe3dd694fb85ba0a | [log] [tgz] |
---|---|---|
author | Jan Sowinski <jan.sowinski@intel.com> | Tue Dec 03 10:37:06 2019 +0100 |
committer | Jan Sowinski <jan.sowinski@intel.com> | Thu Dec 19 13:01:38 2019 +0000 |
tree | 0aa8d2616be800b68fe7091e3e67b50f7b3326c9 | |
parent | cac94c55c59a397524a04786f4d699e2bd7f21bf [diff] |
Connection and websockets fixes This commit fixes issue around Connection class and websockets - controlling connection lifetime by shared_ptr instead of manual new/delete - fixed memory leak when upgrading connection to websockets - removed dangling reference to conn.req in websockets - fixed lack of reponse for invalid websockets URLs - fixed not working connections deadline timer There is no noticable performance impact after switching connection management to shared pointers. Benchmark results using: wrk https://${bmc} shared_ptr: 144.29 Requests/sec new/delete: 144.41 Requests/sec Tested manually: performance: wrk https://${bmc} memory leaks: top websockets: webui- KVM and VirtualMedia HTTP GET on random Redfish schemas: postman Signed-off-by: Jan Sowinski <jan.sowinski@intel.com> Change-Id: I63f7395ba081a68e7900eae2ed204acd50f58689
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/CMakeLists.txt
and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ...
followed by make
. The option names become C++ preprocessor symbols that control which code is compiled into the program.
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the prime256v1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.