<feed xmlns='http://www.w3.org/2005/Atom'>
<title>phosphor-host-ipmid/include, branch master</title>
<subtitle>OpenBMC Phosphor local IPMI daemon sources</subtitle>
<id>https://git.raptorcs.com/git/phosphor-host-ipmid/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/phosphor-host-ipmid/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/'/>
<updated>2019-11-19T16:24:40+00:00</updated>
<entry>
<title>Added sessionId context in host-ipmid, used by GetSessionInfo</title>
<updated>2019-11-19T16:24:40+00:00</updated>
<author>
<name>Rajashekar Gade Reddy</name>
<email>raja.sekhar.reddy.gade@linux.intel.com</email>
</author>
<published>2019-11-13T11:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=4d22640a64b74c11b2cbdadc88d0ffd60d09e274'/>
<id>urn:sha1:4d22640a64b74c11b2cbdadc88d0ffd60d09e274</id>
<content type='text'>
SessionId is now passed to host-ipmid context along with userid
and privilege information. This will enable certain commands to know
the current sessionid

Added option to get current session info in get session info command.

With this change, we can get the current session info by passing
sessionIndex as zero in get session info command via lan interface and
the same via host interface will return an error, beacuse no session
will be created for host interface.

Tested:

ipmitool -I lanplus -U &lt;user&gt; -P &lt;password&gt; -H &lt;lan1_ip&gt; raw 6 0x3d &lt;Zero&gt;
Response : gives currents session info

ipmitool -I lanplus -U &lt;user&gt; -P &lt;password&gt; -H &lt;lan2_ip&gt; raw 6 0x3d &lt;Zero&gt;
Response : gives currents session info

//host interface
ipmitool raw 6 0x3d 0
Response: 0xCC // invalid field in the request

//This command shows info of all sessions, which includes current
session info as well.
ipmitool -I lanplus -U &lt;user&gt; -P &lt;password&gt; -H &lt;lan1_ip&gt; session info all
session handle                : 129
slot count                    : 45
active sessions               : 1
user id                       : 1
privilege level               : ADMINISTRATOR
session type                  : IPMIv1.5
channel number                : 0x03
console ip                    : 0.0.0.0
console mac                   : 00:00:00:00:00:00
console port                  : 52670

session handle                : 0
slot count                    : 45
active sessions               : 1

//This command shows info of all sessions, which includes current
session info as well.
ipmitool -I lanplus -U &lt;user&gt; -P &lt;password&gt; -H &lt;lan2_ip&gt; session info all
session handle                : 0
slot count                    : 45
active sessions               : 1

session handle                : 1
slot count                    : 45
active sessions               : 1
user id                       : 1
privilege level               : ADMINISTRATOR
session type                  : IPMIv1.5
channel number                : 0x01
console ip                    : 0.0.0.0
console mac                   : 00:00:00:00:00:00
console port                  : 57622

//host interface
ipmitool session info all
session handle                : 0
slot count                    : 45
active sessions               : 0

session handle                : 0
slot count                    : 45
active sessions               : 0

Tested other postive and negative test cases for get session info
command in Lan1, Lan2 and host interfaces. All are working fine.

Signed-off-by: Rajashekar Gade Reddy &lt;raja.sekhar.reddy.gade@linux.intel.com&gt;
Change-Id: I9fb1ef12693e4c0da3661ffdf21eec248b48b5b4
</content>
</entry>
<entry>
<title>Refactor ipmi::sensor::GetSensorResponse away from std::array</title>
<updated>2019-10-28T15:49:14+00:00</updated>
<author>
<name>Sui Chen</name>
<email>suichen@google.com</email>
</author>
<published>2019-09-11T17:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=4cc42556be1e69f1210e3a0a0bcff49078e39ec6'/>
<id>urn:sha1:4cc42556be1e69f1210e3a0a0bcff49078e39ec6</id>
<content type='text'>
This change refactors GetSensorResponse from std::array to struct.
This change depends on change #23544.

GetSensorResponse is an internal, intermediate structure, an unpacked
form of a Get Sensor Reading response, providing direct access to its
fields. Its life time is:
GetReadingResponse -&gt; GetSensorResponse -&gt; ipmi::RspType.

It is written to in 5 functions in the ipmi::sensor::get namespace, by
four setter functions (setOffset, setReading, setAssertionBytes,
enableScanning).
It is currently read from by 1 function (ipmiSensorGetSensorReading)
for transforming to an ipmi::RspType.

Originally, the setter functions assumed bitwise equivalence between
GetSensorResponse and GetReadingResponse, and the setter functions
used reinterpret_cast to assign to a GetSensorResponse as if it were
a GetReadingResponse.

With this change, the reinterpret_cast's are removed, and the set
functions now accept GetSensorResponse instead of GetReadingResponse,
so the code gets a bit easier to read.

Tested: Tested using a server with a BMC; sensor readings obtained
through `ipmitool` appear to be correct (the reading might change
within a small range):
 # ipmitool raw 0x04 0x2d 0x16
   9B 40 00 00

Signed-off-by: Sui Chen &lt;suichen@google.com&gt;
Change-Id: I5d454d6249f5431fb98169e6ef7c585c34024004
</content>
</entry>
<entry>
<title>Implemented get session info cmd in host interface</title>
<updated>2019-10-25T15:39:20+00:00</updated>
<author>
<name>Rajashekar Gade Reddy</name>
<email>raja.sekhar.reddy.gade@linux.intel.com</email>
</author>
<published>2019-07-25T15:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=f71444da816b23cb27772662a544d8bc1c465273'/>
<id>urn:sha1:f71444da816b23cb27772662a544d8bc1c465273</id>
<content type='text'>
This command can get info of any session

Tested all positive and negative test cases

Tested:

Get active session info by valid session handle
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by handle&gt; &lt;valid session handle&gt;
Response : successfully gets the session info as per IPMI spec

Get active session info by valid session id
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by id&gt; &lt;valid session id&gt;
Response : successfully gets the session info as per IPMI spec

Get inactive session info by valid session handle
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by handle&gt; &lt;valid session handle&gt;
Response : successfully gets the session info as per IPMI spec

Get inactive session info by valid session id
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by id&gt; &lt;valid session id&gt;
Response : successfully gets the session info as per IPMI spec

Get session info by invalid session handle
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by handle&gt; &lt;invalid session handle&gt;
Response : 0x88  // Inavlid Session Handle

Get session info by invalid session id
ipmitool raw 0x6 0x3d &lt;sesssion index = search session by id&gt; &lt;invalid session id&gt;
Response : 0x87  // Inavlid Session Id

Signed-off-by: Rajashekar Gade Reddy &lt;raja.sekhar.reddy.gade@linux.intel.com&gt;
Change-Id: Ib36a9fe5eac58d15011cc9379ceed480ba0be96d
</content>
</entry>
<entry>
<title>transporthandler: Rewrite + New Handler</title>
<updated>2019-09-27T17:18:29+00:00</updated>
<author>
<name>William A. Kennington III</name>
<email>wak@google.com</email>
</author>
<published>2019-04-07T01:19:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=c514d874e4ce3ed1f747cfcb4bab5990393c55e8'/>
<id>urn:sha1:c514d874e4ce3ed1f747cfcb4bab5990393c55e8</id>
<content type='text'>
This rewrites the old transport handler to use the new ipmi handler
registration functions. It attempts to clean up the old code, by
refactoring any business logic out of the code that parses the IPMI
messages. This makes the code paths easier to understand and allows for
better code re-use.

This also gets rid of the concept of the settings change timer. Clients
expect to see their settings take effect as soon as they are set,
regardless of the "Set In Progress" flag. This means we no longer need a
cache for our network settings that are about to be set by the daemon,
and a client can hold the BMC in "Set In Progress" while it verifies
settings like other BMC implementations.

Change-Id: I5406a674f087600afdfc2c0b3adeacde10986abc
Signed-off-by: William A. Kennington III &lt;wak@google.com&gt;
</content>
</entry>
<entry>
<title>Implemented close session cmd in host interface</title>
<updated>2019-09-25T17:42:56+00:00</updated>
<author>
<name>Rajashekar Gade Reddy</name>
<email>raja.sekhar.reddy.gade@linux.intel.com</email>
</author>
<published>2019-07-10T16:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=e7023926675030a5976dffda0825445ca0b5ef84'/>
<id>urn:sha1:e7023926675030a5976dffda0825445ca0b5ef84</id>
<content type='text'>
This command can close any session via host interface.

Tested:

Close the existing valid session by session id
ipmitool raw 0x6 0x3c &lt;valid sesssion id &gt;
Response : 00  // success

Close the existing valid session by session handle
ipmitool raw 0x6 0x3c &lt;zero session id&gt; &lt;valid session handle&gt;
Response : 00  // success

Close the session by zero session id
ipmitool raw 0x6 0x3c &lt;zero session id&gt;
Response : 0x87  // inavlid session id

Close the session by zero session handle
ipmitool raw 0x6 0x3c &lt;zero session id&gt; &lt;zero session handle&gt;
Response : 0x88  // inavlid session handle

Close an inactive session.
ipmitool raw 0x6 0x3c &lt;valid session id&gt;
Response : 0xcc  // invalid data field in request

Close an inactive session.
ipmitool raw 0x6 0x3c &lt;zero session id&gt; &lt;valid session hnadle&gt;
Response : 0xcc  // invalid data field in request

Signed-off-by: Rajashekar Gade Reddy &lt;raja.sekhar.reddy.gade@linux.intel.com&gt;
Change-Id: I8af290001d8effbbcdbbe2dd93aabf1b015e7a88
</content>
</entry>
<entry>
<title>fix logic error for unpack vector of tuple</title>
<updated>2019-09-16T20:12:11+00:00</updated>
<author>
<name>Vernon Mauery</name>
<email>vernon.mauery@linux.intel.com</email>
</author>
<published>2019-07-23T23:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=caabc36b6a7596c6a6deb774770f4271f50942e9'/>
<id>urn:sha1:caabc36b6a7596c6a6deb774770f4271f50942e9</id>
<content type='text'>
Unpacking a vector of tuples is failing if the correct number of bytes
does not match an integral number of bytes needed to fully unpack all
the tuples.

Unpacking a tuple should return an error if it does not fully unpack all
the items. This will signal the vector unpack to bail and return however
many items it has unpacked to that point.

A vector unpack should always return success because no matter how many
items it has unpacked, it is fine, because a vector can have any number
of items.

Tested: Unit tests updated to check for proper unpacking of vectors and
        tuples (and optionals) as well as new unit tests added for more
        targetted testing.

Change-Id: I4b45198f8bc4a49913beb923d10079983179402a
Signed-off-by: Vernon Mauery &lt;vernon.mauery@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Change yield from ptr to object</title>
<updated>2019-09-13T16:26:33+00:00</updated>
<author>
<name>James Feist</name>
<email>james.feist@linux.intel.com</email>
</author>
<published>2019-09-06T20:41:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=cb09aa00e8f25fda20780f0a26a7c35b24c4b59b'/>
<id>urn:sha1:cb09aa00e8f25fda20780f0a26a7c35b24c4b59b</id>
<content type='text'>
The ptr makes for ugly code:
i.e. *(ctx-&gt;yield) all over the place.

Change it to copy as it is just 4 pointers.

Tested: ipmitool mc info still works

Change-Id: I30c5bc395849875cd58925fac99bb23c1804cd5b
Signed-off-by: James Feist &lt;james.feist@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Move i2c WR api into libipmid</title>
<updated>2019-08-30T15:55:14+00:00</updated>
<author>
<name>Yong Li</name>
<email>yong.b.li@linux.intel.com</email>
</author>
<published>2019-08-23T09:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=7dc4ac0246bfae3da04c11e7a2053d28acfde35c'/>
<id>urn:sha1:7dc4ac0246bfae3da04c11e7a2053d28acfde35c</id>
<content type='text'>
Move the low-level i2c write-read api into libipmid,
to allow provider libraries access to i2c without duplicating this code.

Tested:
I2c master write read command still works:
ipmitool i2c bus=2 0x9c 8 0

Signed-off-by: Yong Li &lt;yong.b.li@linux.intel.com&gt;
Change-Id: I0d5f82cf46ecf871eebb47aae25537b5da1f2e6a
</content>
</entry>
<entry>
<title>legacy handlers need a bigger buffer</title>
<updated>2019-08-30T05:51:06+00:00</updated>
<author>
<name>Vernon Mauery</name>
<email>vernon.mauery@linux.intel.com</email>
</author>
<published>2019-08-22T21:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=48408b6d85d1de60f9ff7a68a6c01585be50cf7b'/>
<id>urn:sha1:48408b6d85d1de60f9ff7a68a6c01585be50cf7b</id>
<content type='text'>
In the original ipmi execution queue, handlers were passed a larger
buffer. The current code was only passing in the configured channel
size, or 64 if no size was configured. This is too small and leads
to buffer overflows for responses greater than 64 bytes.

This brings the buffer sizes up to a point that matches the legacy
code and to a size that is larger than any of IPMI standard transport
sizes.

Tested: used a bogus handler to create a large response and found that
        the entire response was returned.

Change-Id: I91b359812247ae5fdef105c7b7a9dfe003548494
Signed-off-by: Vernon Mauery &lt;vernon.mauery@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Use boost::asio::post() instead of io-&gt;post()</title>
<updated>2019-06-21T22:29:41+00:00</updated>
<author>
<name>Vernon Mauery</name>
<email>vernon.mauery@linux.intel.com</email>
</author>
<published>2019-03-13T16:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/phosphor-host-ipmid/commit/?id=23d06441e9ef92b0cfa421dbf256661d31ed5153'/>
<id>urn:sha1:23d06441e9ef92b0cfa421dbf256661d31ed5153</id>
<content type='text'>
According to the documentation io-&gt;post is deprecated, saying
that boost::asio::post() should be used instead.

Tested: ipmid runs the same as it did before.

Change-Id: I552c7cb5cb8ad8f9f6e2bcffa61ce5135e2faad2
Signed-off-by: Vernon Mauery &lt;vernon.mauery@linux.intel.com&gt;
</content>
</entry>
</feed>
