commit | 0a2abc803ffb4e01d10d4c9fb78475c3012df496 | [log] [tgz] |
---|---|---|
author | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Feb 18 12:39:12 2021 -0800 |
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | Wed May 19 17:57:23 2021 +0000 |
tree | f354dcc3f933ce5a483ad8461034edeccbaad9bf | |
parent | 2f0ad74daf323dd6db919b8aa7cf685e88d33a37 [diff] |
Confirm presence of NIC devices described in channel_config The channel_config.json file describes the IPMI channel arrangement assigned to the BMC. There is an implied expectation that this configuration file is a 1:1 description of a set of channels assigned to the BMC and the baseboard containing the BMC. There are vendors who may prefer to create a smaller subset of firmware images, and apply them to mulitple different final assemblies. One example of this is the use of two final assemblies that differ only in the number of network PHY devices populated on the board. This commit compares the channel_config entries for the LAN channels against the LAN devices reported by getifaddrs. If a LAN channel is described in the channel_config file, but is missing from the getifaddrs device list, the channel is marked as invalid, effectively removing the channel from IPMI. This permits run time identification of the LAN devices without adding unique vendor specific identification tests. Tested: Used a channel_config file that defined two NIC devices, one on channel 1, and the other on channel 3. The configuration file marked both of these entries "isValid = true". This change was then run on a BMC with only a single NIC attached. The getifaddrs function returned only the "lo" and the "eth0" devices. The "eth0" device matched the channel_config entry for channelId == 3, and a channel name == "eth0". Using "ipmitool raw 6 0x42 3" returns channel information for eth0. Using "ipmitool raw 6 0x42 1" returns a 0xcc response code. Prior to this change this command returned a success response code, and data for an unknown NIC device. Used these same commands on a baseboard which populated both NIC eth0, and eth1. The ipmitool commands return a success response code, and modify their respective NIC channels. Change-Id: I8b52cecdd815ec56efc6af97ad53325cb5d54c06 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.