Replace the refcounts of termination mac entries with simple checks for
the existence of entries on adding addresses, and existing other
addresses on removing other addresses.
Description
This avoids a race on start up where a logical bond or bridge
interface's address may get added/counted twice:
libnl: attach port to bond
libnl: new address on bond
baseboxd: handle attach port event
baseboxd: handle new address event
On attachment, we scan the interface for addresses to add them (since we
only should handle them once there is port interface attached). If an
address gets added before we manage to handle the attachment event, we
will see it in the attachment, and then add it again when handling the
new address event.
So to avoid this, don't try to have valid reference count, and instead
make adding the termination mac entry too often a NOP.
How Has This Been Tested?
Running a pipeline on as4630-54pe pair, with no shown regressions.
Replace the refcounts of termination mac entries with simple checks for the existence of entries on adding addresses, and existing other addresses on removing other addresses.
Description
This avoids a race on start up where a logical bond or bridge interface's address may get added/counted twice:
On attachment, we scan the interface for addresses to add them (since we only should handle them once there is port interface attached). If an address gets added before we manage to handle the attachment event, we will see it in the attachment, and then add it again when handling the new address event.
So to avoid this, don't try to have valid reference count, and instead make adding the termination mac entry too often a NOP.
How Has This Been Tested?
Running a pipeline on as4630-54pe pair, with no shown regressions.