-
Notifications
You must be signed in to change notification settings - Fork 13
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
pdr: PDR loop fix #33
Conversation
While creating the Entity association PDRs, same record handle is used multiple time to create PDR. Because of which 2 PDRs with same record handle are added to the repo causing loop. Adding the fix to resolve the duplicate record handle issue. Tested: Power on/off and reset reload on mex and non mex systems. Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
@@ -976,9 +979,9 @@ int pldm_entity_association_pdr_add_check(pldm_entity_association_tree *tree, | |||
if (!tree || !repo) { | |||
return 0; | |||
} | |||
|
|||
uint32_t record_handle = 0; |
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.
what happens when we send a record_handle from caller API? it will be set to 0?
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.
Function pldm_entity_association_pdr_add_check
does not take record handle as an argument. So user can not send record_handle to this function and record handle is defaulted to 0 inside the function.
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.
yes, so that record_handle variable is redundant right?, we can directly pass 0 as how it was earlier?
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.
Earlier entity_association_pdr_add
was taking "uint32_t record_handle" as argument now I have changed it to take pointer to record handle "uint32_t *record_handle". So we are expected to pass the address of the variable and not the value. To get the address of variable, created a variable record_handle and passing address of this variable to function entity_association_pdr_add
.
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.
acknowledged
@@ -976,9 +979,9 @@ int pldm_entity_association_pdr_add_check(pldm_entity_association_tree *tree, | |||
if (!tree || !repo) { | |||
return 0; | |||
} | |||
|
|||
uint32_t record_handle = 0; |
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.
yes, so that record_handle variable is redundant right?, we can directly pass 0 as how it was earlier?
While creating the Entity association PDRs, same record handle is used multiple time to create PDR. Because of which 2 PDRs with same record handle are added to the repo causing loop. Adding the fix to resolve the duplicate record handle issue. Tested: Power on/off and reset reload on mex and non mex systems. Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
While creating the Entity association PDRs, same record handle is used multiple time to create PDR. Because of which 2 PDRs with same record handle are added to the repo causing loop. Adding the fix to resolve the duplicate record handle issue. Tested: Power on/off and reset reload on mex and non mex systems. Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
While creating the Entity association PDRs, same record handle is used multiple time to create PDR. Because of which 2 PDRs with same record handle are added to the repo. Adding the fix to resolve the duplicate record handle issue.
Tested:
Power on/off and reset reload on mex and non mex systems.