Skip to content

Commit

Permalink
Remove port serdes object before removing port (#2152)
Browse files Browse the repository at this point in the history
* Remove port serdes object before removing port
  • Loading branch information
kcudnik authored Feb 21, 2022
1 parent 27a1c22 commit 7d2942f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,13 @@ sai_status_t PortsOrch::removePort(sai_object_id_t port_id)
}
/* else : port is in default state or not yet created */

/*
* Remove port serdes (if exists) before removing port since this
* reference is dependency.
*/

removePortSerdesAttribute(port_id);

sai_status_t status = sai_port_api->remove_port(port_id);
if (status != SAI_STATUS_SUCCESS)
{
Expand Down

0 comments on commit 7d2942f

Please sign in to comment.