-
Notifications
You must be signed in to change notification settings - Fork 54
fby35: enhance kcs error handling #2650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fby35: enhance kcs error handling #2650
Conversation
|
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D90479021. (Because this pull request was imported automatically, there will not be any future comments.) |
bdd2105 to
e12ecf2
Compare
|
@Jerry-wiwynn has updated the pull request. You must reimport the pull request before landing. |
|
Cppcheck's memory leak warning for kcs_work is a false positive. |
jamesatha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you were working on the same method, please address the lint issue:
common/service/host/kcs.c:418:2:Memory leak: kcs_work
e12ecf2 to
a3e1d16
Compare
|
@Jerry-wiwynn has updated the pull request. You must reimport the pull request before landing. |
Summary: Description 1. Reduce PLDM_OEM_IPMI_BRIDGE timeout duration 2. Enhance kcs error handling Motivation 1. The default timeout for ipmitool is 15 seconds [1], so need to shorten PLDM_OEM_IPMI_BRIDGE timeout_ms. 2. When a KCS error occurs, a completion code should be returned. [1]: https://github.com/ipmitool/ipmitool/blob/master/src/plugins/open/open.c#L87 Test Plan: Build and test OK on EMR CMD_STORAGE_ADD_SEL error handing test ok: Host (rsp 0xc8 == CC_LENGTH_EXCEEDED): [root@250424-611-fbk6 ~]# time ipmitool raw 0x0a 0x44 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x04 Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x44 rsp=0xc8): Request data field length limit exceeded BIC: uart:~$ [00:18:46.401,000] <err> kcs: ADD SEL event data length error, rc = 19
a3e1d16 to
c6c34f7
Compare
|
@Jerry-wiwynn has updated the pull request. You must reimport the pull request before landing. |
done |
Description
Motivation
The default timeout for ipmitool is 15 seconds 1, so need to shorten PLDM_OEM_IPMI_BRIDGE timeout_ms.
When a KCS error occurs, a completion code should be returned.
Test Plan:
Build and test OK on EMR
CMD_STORAGE_ADD_SEL error handing test ok:
Host (rsp 0xc8 == CC_LENGTH_EXCEEDED):
[root@250424-611-fbk6 ~]# time ipmitool raw 0x0a 0x44 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x04 Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x44 rsp=0xc8): Request data field length limit exceeded
BIC:
uart:~$ [00:18:46.401,000] kcs: ADD SEL event data length error, rc = 19