#
b5a76932
|
| 29-Sep-2020 |
Ed Tanous <ed@tanous.net> |
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies...
Apparently there are a lot of places we make unnecessary copies. This fixes all of them.
Not sure
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies...
Apparently there are a lot of places we make unnecessary copies. This fixes all of them.
Not sure how to split this up into smaller patches, or if it even needs split up. It seems pretty easy to review to me, because basically every diff is identical.
Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369 Signed-off-by: Ed Tanous <ed@tanous.net> Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|
#
3174e4df
|
| 07-Oct-2020 |
Ed Tanous <ed@tanous.net> |
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes have landed for the various static analysis checks, lets see how close we are.
This incl
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes have landed for the various static analysis checks, lets see how close we are.
This includes bringing a bunch of the code up to par with the checks that require. Most of them fall into the category of extraneous else statements, const correctness problems, or extra copies.
Tested: CI only. Unit tests pass.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
show more ...
|
#
2c70f800
|
| 28-Sep-2020 |
Ed Tanous <ed@tanous.net> |
Fix naming conventions
Lots of code has been checked in that doesn't match the naming conventions. Lets fix that.
Tested: Code compiles. Variable/function renames only.
Signed-off-by: Ed Tanous
Fix naming conventions
Lots of code has been checked in that doesn't match the naming conventions. Lets fix that.
Tested: Code compiles. Variable/function renames only.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I6bd107811d0b724f1fad990016113cdf035b604b
show more ...
|
#
cb13a392
|
| 25-Jul-2020 |
Ed Tanous <ed@tanous.net> |
Enable unused variable warnings and resolve
This commit enables the "unused variables" warning in clang. Throughout this, it did point out several issues that would've been functional bugs, so I th
Enable unused variable warnings and resolve
This commit enables the "unused variables" warning in clang. Throughout this, it did point out several issues that would've been functional bugs, so I think it was worthwhile. It also cleaned up several unused variable from old constructs that no longer exist.
Tested: Built with clang. Code no longer emits warnings.
Downloaded bmcweb to system and pulled up the webui, observed webui loads and logs in properly.
Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
23a21a1c
|
| 24-Jul-2020 |
Ed Tanous <ed@tanous.net> |
Enable clang warnings
This commit enables clang warnings, and fixes all warnings that were found. Most of these fall into a couple categories:
Variable shadow issues were fixed by renaming variabl
Enable clang warnings
This commit enables clang warnings, and fixes all warnings that were found. Most of these fall into a couple categories:
Variable shadow issues were fixed by renaming variables
unused parameter warnings were resolved by either checking error codes that had been ignored, or removing the name of the variable from the scope.
Other various warnings were fixed in the best way I was able to come up with.
Note, the redfish Node class is especially insidious, as it causes all imlementers to have variables for parameters, regardless of whether or not they are used. Deprecating the Node class is on my list of things to do, as it adds extra overhead, and in general isn't a useful abstraction. For now, I have simply fixed all the handlers.
Tested: Added the current meta-clang meta layer into bblayers.conf, and added TOOLCHAIN_pn-bmcweb = "clang" to my local.conf
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
show more ...
|
#
52cc112d
|
| 18-Jul-2020 |
Ed Tanous <ed@tanous.net> |
Remove middlewares
Middlewares, while kinda cool from an academic standpoint, make our build times even worse than they already are. Given that we only really use 1 real middleware today (token aut
Remove middlewares
Middlewares, while kinda cool from an academic standpoint, make our build times even worse than they already are. Given that we only really use 1 real middleware today (token auth) and it needs to move into the parser mode anyway (for security limiting buffer sizes), we might as well use this as an opportunity to delete some code.
Some other things that happen: 1. Persistent data now moves out of the crow namespace 2. App is no longer a template 3. All request_routes implementations no longer become templates. This should be a decent (unmeasured) win on compile times.
This commit was part of a commit previously called "various cleanups". This separates ONLY the middleware deletion part of that.
Note, this also deletes about 400 lines of hard to understand code.
Change-Id: I4c19e25491a153a2aa2e4ef46fc797bcb5b3581a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
01c6e858
|
| 20-Mar-2020 |
Sunitha Harish <sunithaharish04@gmail.com> |
Redfish: GET command for Hypervisor DHCP network
This commit adds support to GET the DHCP configuration details on the Hypervisor's Ethernet Interface
Tested by: Set the DHCPEnabled property on /
Redfish: GET command for Hypervisor DHCP network
This commit adds support to GET the DHCP configuration details on the Hypervisor's Ethernet Interface
Tested by: Set the DHCPEnabled property on /xyz/openbmc_project/network/hypervisor/eth0 Run the redfish GET command below to check the value set. GET https://${bmc}/redfish/v1/Systems/hypervisor/EthernetInterfaces/eth0
Successfully ran the Redfish Validator
Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: Iacfc2b975fc6e4b759082419aa8f0b9c193d7787
show more ...
|
#
4e0453b1
|
| 08-Jul-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Codespell redfish-core spelling fixes
These spelling errors were found using https://github.com/codespell-project/codespell Tested: Top commit (along with this) was built and ran against val
Codespell redfish-core spelling fixes
These spelling errors were found using https://github.com/codespell-project/codespell Tested: Top commit (along with this) was built and ran against validator. Change-Id: Ic9dce27b1de8567eedf7753164ef564d3aedf8ca Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
1214b7e7
|
| 04-Jun-2020 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed. Change-Id: Ief26c755c9ce
clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed. Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
38268fa8
|
| 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
vlan id should be 32 bit
Upstream yocto appears to bring in a new compiler which is flagging the inconsistency of the VLAN ID data type and failing to compile bmcweb because of it.
The redfish spec
vlan id should be 32 bit
Upstream yocto appears to bring in a new compiler which is flagging the inconsistency of the VLAN ID data type and failing to compile bmcweb because of it.
The redfish specification lists the datatype for VLANId as a integer that can range from 0-4094.
Here's the error: /lib/ethernet.hpp:2221:58: error: no matching function for call to 'std::variant<unsigned int>::variant(uint64_t&)' | 2221 | std::variant<uint32_t>(vlanId));
Change-Id: Ic92ad6518a9529f5099a1eaf1250df106119d319 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
7f2e23e9
|
| 14-May-2020 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Add OCP mandatory entry for IPv6AddressPolicyTable
The Open Compute Project mandates the presence of the IPv6AddrssPolicyTable collection in Redfish. This commit adds the mandatory collection as an
Add OCP mandatory entry for IPv6AddressPolicyTable
The Open Compute Project mandates the presence of the IPv6AddrssPolicyTable collection in Redfish. This commit adds the mandatory collection as an empty collection.
Tested: Ran redfish service validator and confirmed the table collection was found.
Change-Id: I6e98295f2a33acd49a3bb01d97aa840525875dd2 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
5fd16e4b
|
| 13-May-2020 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Create the IPv6 AddressState Redfish node for OCP
The Open Compute Project defines the IPv6 AddressState entry to be a mandatory field. OpenBMC does not have any support in phosphor-network for repo
Create the IPv6 AddressState Redfish node for OCP
The Open Compute Project defines the IPv6 AddressState entry to be a mandatory field. OpenBMC does not have any support in phosphor-network for reporting the actual IPv6 state. The AddressState field is allowed to be null. This commit returns the AddressState as a null.
Tested: Ran service validator Ran a GET on Managers/bmc/EthernetInterfaces/eth0 and saw the addition of the AddressState, and that it was null.
Change-Id: Ia2847f94ac73fc05ff2ca1be40a3f601fa0a3dfc Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
e105acc2
|
| 13-May-2020 |
Ravi Teja <raviteja28031990@gmail.com> |
Redfish(Network): Fix PATCH of existing IPv4StaticAddresses properties
Currently Unable to modify(PATCH) existing IP address properties.
Failure case: add an ipv4 static address and try to do patch
Redfish(Network): Fix PATCH of existing IPv4StaticAddresses properties
Currently Unable to modify(PATCH) existing IP address properties.
Failure case: add an ipv4 static address and try to do patch operation to modify properties of this static address entry. say existing entry "IPv4StaticAddresses": [ { "Address": "223.7.7.7", "AddressOrigin": "Static", "Gateway": "223.7.7.1", "SubnetMask": "255.255.0.0" }]
do patch operation, it returns success but does not update properties. 1.PATCH -D '{"IPv4StaticAddresses": [{"Address": "10.7.7.20","SubnetMask": "255.255.0.0","Gateway":"223.7.7.1"}]}' 2.PATCH -D '{"IPv4StaticAddresses": [{},{"Address": "10.8.8.8"}]} both cases expected to work. . Test By: Pacthing existing entry properties and creating new entries. 1.PATCH -d '{"IPv4StaticAddresses": [{},{"Address": "10.7.7.20","SubnetMask": "255.255.0.0","Gateway":"10.7.7.1"}]}' 2.PATCH -D '{"IPv4StaticAddresses": [{},{"Address": "10.8.8.8"}]} 3.PATCH -d '{"IPv4StaticAddresses": [{},{"Address": "10.8.8.8"},{"Address": "10.9.9.9","SubnetMask": "255.255.0.0","Gateway":"9.41.164.1"}]}' 4.GET https://${IP}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0/
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> Change-Id: Ic23330592e9041ddd1e9f96d08ea0bb88c6d8ca7
show more ...
|
#
19bd78d9
|
| 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia5d0845741f1d8d4bc6fd227c6d2e6f3a8d42b2e
|
#
8d78b7a9
|
| 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I86e11299512704fa1df1e5f6517ea25cc6eced8f
|
#
7af91514
|
| 14-Apr-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Redfish: Allow slash at the end of Resource
This is defined in the Redfish protocol. Easiest way to allow this is to end the Node URL with "/", which most Nodes in bmcweb already had.
Before: curl
Redfish: Allow slash at the end of Resource
This is defined in the Redfish protocol. Easiest way to allow this is to end the Node URL with "/", which most Nodes in bmcweb already had.
Before: curl -k https://${bmc}/redfish/v1/TaskService/ Not Found
After both /redfish/v1/TaskService/ and /redfish/v1/TaskService return the Task Service.
Tested: Validator passed.
Change-Id: Ic806dc5c91f631b87642e49b486a6b6da7fdf955 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
0f6efdc1
|
| 03-Oct-2019 |
manojkiran.eda@gmail.com <manojeda@in.ibm.com> |
Support for NameServers & StaticNameServers
- As per the proposal made in the mentioned mailing list thread https://lists.ozlabs.org/pipermail/openbmc/2019-September/018399.html
As mentioined in t
Support for NameServers & StaticNameServers
- As per the proposal made in the mentioned mailing list thread https://lists.ozlabs.org/pipermail/openbmc/2019-September/018399.html
As mentioined in the proposal, it is agreed that configuring the Nameservers by the DHCP server is an optional step, and therefore the Static and Dynamic Configurations can co-exist.
The commit supports :
1. NameServers - A readonly property which contains all the nameservers (Static & Dynamic) configured on an interface.
2. StaticNameServers - A writable property which can be used by a redfish client to set a NameServer(Static) on the interface.
TestedBy: 1. Redfish Validator - PASS 2. Pass the DNS via DHCP Server and make sure we populate NameServers with the DNS supplied by DHCP. 3. With the DNS supplied via DHCP intact, set another Namserver by PATCH on the StaticNameServers property, and Made sure StaticNameServers and NameServers populates the respective information. 4. PATCH opteration on NameServers should throw an Error Saying it is a Readonly property.
Signed-off-by: manojkiran.eda@gmail.com <manojeda@in.ibm.com> Change-Id: I43b75091cce6938ea2fa094692f2c3f434e5a774
show more ...
|
#
ab6554f1
|
| 10-Mar-2020 |
Joshi-Mansi <mansi.joshi@linux.intel.com> |
[Redfish-Ethernet Inf] Enable Read/Write for FQDN
Enabling read/write requirement of FQDN in Ethernet Interface Schema to make it OCP compliant.
Tested: 1. Tested using PATCH: - https://bmc-ip/redf
[Redfish-Ethernet Inf] Enable Read/Write for FQDN
Enabling read/write requirement of FQDN in Ethernet Interface Schema to make it OCP compliant.
Tested: 1. Tested using PATCH: - https://bmc-ip/redfish/v1/Managers/bmc/EthernetInterfaces/eth-id {"FQDN": "hostname.domainname"}
GET Response- "FQDN": "hostname.domainname" //Success
- When given invalid hostname/domainname Error Message "propertyValueFormatError"
2. Ran the Redfish validator and no new issues found.
Signed-off-by: Joshi-Mansi <mansi.joshi@linux.intel.com> Change-Id: Ief2e94f8b499be59196b0e7073ceffe8d49268ca
show more ...
|
#
eeedda23
|
| 29-Oct-2019 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Permit Redfish to enable/disable the network interface card
The InterfaceEnabled property for an EthernetInterfaces element was hardcoded to "true". This change gets the actual state of the NIC. It
Permit Redfish to enable/disable the network interface card
The InterfaceEnabled property for an EthernetInterfaces element was hardcoded to "true". This change gets the actual state of the NIC. It also permits the NIC to be enabled or disabled.
Tested: GET sut_ip/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 (and eth1) PATCH InterfaceEnabled to false GET sut_ip/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 (and eth1) PATCH InterfaceEnabled to true GET sut_ip/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 (and eth1) Confirmed the NIC was disabled from the BMC console using "ip link" Confirmed the Get NIC status reported the correct enabled state.
Performed the tests above on a different network to confirm the second NIC can be controlled orthogonally.
Passed service validator.
Change-Id: I09b703118fe71765c7b1020688a803c74648c7c4 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
e59f968c
|
| 14-Feb-2020 |
Gunnar Mills <gmills@us.ibm.com> |
ethernet: Remove odata.context
Redfish made odata.context optional (1.6.0 of DSP0266), has removed odata.context from example payloads in the specification (1.7.0 of DSP0266), removed it from the mo
ethernet: Remove odata.context
Redfish made odata.context optional (1.6.0 of DSP0266), has removed odata.context from example payloads in the specification (1.7.0 of DSP0266), removed it from the mockups, and Redfish recommended not using.
Change-Id: I5a78856c510f063df67999bb8196e77401c56aac Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
aa05fb27
|
| 08-Jan-2020 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Report NIC link status via netlink carrier state
Update Redfish to use a DBus boolean value specifically intended for communicating the NIC link state. Existing Intel server boards have a NCSI chann
Report NIC link status via netlink carrier state
Update Redfish to use a DBus boolean value specifically intended for communicating the NIC link state. Existing Intel server boards have a NCSI channel with a speed value always assigned to 100Mbps. This makes identifying link state impossible via the network speed value. The DBus boolean uses the netlink carrier on/off state which is more accurate.
Tested:
BMC Console commands: ip link set down dev eth0 Get managers/bmc/eth0 state ;; LinkStatus is LinkDown
ip link set up dev eth0 Get managers/bmc/eth0 state ;; LinkStatus is LinkUp
Remove NIC cable from RJ45 connector Get managers/bmc/eth0 state ;; LinkStatus is LinkDown
Insert NIC cable into RJ45 connector Get managers/bmc/eth0 state ;; LinkStatus is LinkUp
Change-Id: I93d3f716a0afc563e3312e99b4a4163187985521 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
1f8c7b5d
|
| 18-Jun-2019 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Redfish: Implement DHCPv4 and DHCPv6 handling
The Redfish DHCP handling has independent control of DHCPv4 and DHCPv6. This change combines with phosphor-network and phosphor-dbus-interface changes t
Redfish: Implement DHCPv4 and DHCPv6 handling
The Redfish DHCP handling has independent control of DHCPv4 and DHCPv6. This change combines with phosphor-network and phosphor-dbus-interface changes to implement the independent control capability.
Tested by: Verified DHCP is able to be enabled for both DHCPv4 and DHCPv6 Verified DHCPv4 can be enabled, and static IPv6 addresses configured Verified DHCPv6 can be enabled, and static IPv4 addresses configured Verified DHCP can be disabled for both interfaces Confirmed enable/disable of UseNTP, UseDNS, and UseHostname Passes Redfish Service Validator
Change-Id: I449ec096a3c41231c9bc9aa1bf67824982525cec Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
271584ab
|
| 09-Jul-2019 |
Ed Tanous <ed.tanous@intel.com> |
Fix a bunch of warnings
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems lik
Fix a bunch of warnings
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot.
Tested: It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
show more ...
|
#
01784826
|
| 18-Jun-2019 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Redfish: Make NIC HW reflect PATCH changes
PATCH commands only changed the state of the DBus database. The PATCH did not actually change the state of the NIC settings. IPMITOOL and "ip addr" both de
Redfish: Make NIC HW reflect PATCH changes
PATCH commands only changed the state of the DBus database. The PATCH did not actually change the state of the NIC settings. IPMITOOL and "ip addr" both delete the specific hash entry, and then create a new entry using the requested state. This change aligns Redfish with that behavior. The requested element is deleted, and subsequently recreated with the new values. This guarantees the NIC HW is actually updated, and in sync with the DBus database.
Tested by: From eth1 modify eth0 state: IPv4 tests: Delete all addresses Create five new addresses Add a new entry to the end of the collection Delete the new entry just added Send a "keep" command that does not modify any state, and "keeps" more entries than are actually in the IPv4Addresses collection Keep all entries, and delete entries that do not exist Delete all entries except self assigned Send a PATCH with an empty IPv4StaticAddresses array
IPv6 tests: Delete all entries except SLAAC Create five static entries Modify only the prefix for one entry Modify only the address for one entry Add an additional entry Delete the new entry Keep all entries, plus a few that don't exist Keep all entries, delete a few that don't exist Delete all entries except SLAAC Send a PATCH with an empty IPv6StaticAddresses array
Change-Id: Id5f733f795588ba36b5d3ab3b0017a01ee3f2da7 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
f1a3caee
|
| 27-Aug-2019 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Network : Fix the Service Validator Failure
On a DHCP Enabled System, the StaticNameServer property is not aligned to the redfish schema rules and the validator reports the below error:
StaticNameS
Network : Fix the Service Validator Failure
On a DHCP Enabled System, the StaticNameServer property is not aligned to the redfish schema rules and the validator reports the below error:
StaticNameServers: Value of Collection property is null but Collections cannot be null, only their entries.
Testedby: Redfish Validator
*** /redfish/v1/JsonSchemas/EthernetInterface Type (#JsonSchemaFile.v1_0_2.JsonSchemaFile), GET SUCCESS (time: 1.134773) PASS Note: - Previously missed this failure, as i verified the validator on Statically configured setup
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I6119e8d5783571ac75084301b49df1f44a558c8b
show more ...
|