Skip to content

Revert hwinfo count change#2383

Merged
jimmyzhai merged 1 commit intosonic-net:masterfrom
andywongarista:revert-hwinfo-count
Jul 26, 2022
Merged

Revert hwinfo count change#2383
jimmyzhai merged 1 commit intosonic-net:masterfrom
andywongarista:revert-hwinfo-count

Conversation

@andywongarista
Copy link
Copy Markdown
Contributor

What I did
Revert change from #2367 which increases count associated with SAI_SWITCH_ATTR_SWITCH_HARDWARE_INFO by 1, as well as the memset.

Why I did it
Original intention of this change was to accommodate sairedis behaviour when copying null-terminated string; original behaviour is that the null-terminator would not be copied and so receiver of the hwinfo (PAI) would see non-null terminated string.

Reverting this change so that old behaviour is maintained and PAI driver is responsible for not relying on string to be null terminated.

How I verified it

Details if related

@jimmyzhai jimmyzhai merged commit dc88d55 into sonic-net:master Jul 26, 2022
@Blueve
Copy link
Copy Markdown

Blueve commented Aug 1, 2022

@andywongarista since this PR(#2367 ) has been backported to 202205, i think this one need back port as well?

preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
What I did
Revert change from sonic-net#2367 which increases count associated with SAI_SWITCH_ATTR_SWITCH_HARDWARE_INFO by 1, as well as the memset.

Why I did it
Original intention of this change was to accommodate sairedis behaviour when copying null-terminated string; original behaviour is that the null-terminator would not be copied and so receiver of the hwinfo (PAI) would see non-null terminated string.

Reverting this change so that old behaviour is maintained and PAI driver is responsible for not relying on string to be null terminated.
yxieca pushed a commit that referenced this pull request Aug 19, 2022
What I did
Revert change from #2367 which increases count associated with SAI_SWITCH_ATTR_SWITCH_HARDWARE_INFO by 1, as well as the memset.

Why I did it
Original intention of this change was to accommodate sairedis behaviour when copying null-terminated string; original behaviour is that the null-terminator would not be copied and so receiver of the hwinfo (PAI) would see non-null terminated string.

Reverting this change so that old behaviour is maintained and PAI driver is responsible for not relying on string to be null terminated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants