Skip to content
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

Add mdio IPC client library #1230

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

jiahua-wang
Copy link
Contributor

Signed-off-by: Jiahua Wang jiahua.wang@broadcom.com

Why I did it
The syncd has a MDIO IPC server to help the access of external PHYs on the NPU MDIO bus. A MDIO IPC client library is required to communicate to the MDIO IPC server. The gbsyncd will pass the function pointers for the function in the client library to the PAI.

How I did it
MDIO IPC client functions are added to connect to the MDIO IPC server socket, to send request and to wait for response IPC messages. The client functions are made into a .so library. The .so library is packaged in the syncd debian package.

How to verify it
The client functions are also available in as a .a library. The unit test code can use the code to test both IPC server and client.

Signed-off-by: Jiahua Wang <jiahua.wang@broadcom.com>

Why I did it
The syncd has a MDIO IPC server to help the access of external PHYs on the NPU MDIO bus. A MDIO IPC client library is required to communicate to the MDIO IPC server. The gbsyncd will pass the function pointers for the function in the client library to the PAI.

How I did it
MDIO IPC client functions are added to connect to the MDIO IPC server socket, to send request and to wait for response IPC messages. The client functions are made into a .so library. The .so library is packaged in the syncd debian package.

How to verify it
The client functions are also available in as a .a library. The unit test code can use the code to test both IPC server and client.
@adyeung
Copy link

adyeung commented Apr 24, 2023

@kcudnik, Junhua, pls merge the code PR, this is needed for 202305

@kcudnik kcudnik merged commit c223742 into sonic-net:master Apr 24, 2023
@liuh-80
Copy link
Contributor

liuh-80 commented Apr 28, 2023

@jiahua-wang, currently swss-common repo UT failed and PR blocked because new UT and azure-pipeline change in this PR.

This PR add new UT: TEST(MdioIpcServer, mdioAccess), Also this PR modify .azure-pipelines/build-template.yml to support new UT.

However, there few sonic-swss-common repo also build and run sonic-sairedis UTs, could you please also fix the build break which caused by this UT in sonic-swss-common?
https://github.com/sonic-net/sonic-swss-common/blob/master/.azure-pipelines/build-sairedis-template.yml

Here is an UT break example:
sonic-net/sonic-swss-common#715
https://dev.azure.com/mssonic/build/_build/results?buildId=261336&view=logs&j=61b7eb0d-78fa-5af5-6df0-b6f82d3891a8&t=f575074c-f5f7-5116-3e48-4a11a237643a

@jiahua-wang
Copy link
Contributor Author

jiahua-wang commented Apr 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants