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

[rpc server]: Enable syncd-rpc target compilation. #260

Closed

Conversation

oleksandrivantsiv
Copy link
Collaborator

Export switch ID variable required by SAI thrift.

Export switch ID variable required by SAI thrift.
Copy link
Contributor

@pavel-shirshov pavel-shirshov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need gSwitchId?

/*
* SAI switch global needed for RPC server
*/
sai_object_id_t gSwitchId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What component does use the gSwitchId variable ?
I see you assign some value to it below, but how it is used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd better to make interface of SAI thrift implementation more explicit by introducing
switch_id parameter to start_sai_thrift_rpc_server() function.
But anyway.

@lguohan
Copy link
Contributor

lguohan commented Nov 21, 2017

why PR build fails? what do I need to add?

@andrii-savka
Copy link

andrii-savka commented Dec 28, 2017

We need to reset src/SAI to 1.0.2 version. The following commit can damage the build:
_commit aac4d6e
Author: Yakiv Huryk yakivh@mellanox.com
Date: Sat Nov 18 12:35:41 2017 +0200

PTF: alignment with 1.2 headers & fixes (#736)_

If I reset the src/SAI to following commit 77b2ad2 then I have successfully built the image.

@lguohan
Copy link
Contributor

lguohan commented Jan 10, 2018

retest this please

@andrii-savka
Copy link

@lguohan
It was build and re-tested on the latest source code.

@lguohan
Copy link
Contributor

lguohan commented Jan 10, 2018

@andriis, the SAI commit id in the master is 40d7d66 2017-08-02 | add SAI_HOSTIF_ATTR_VLAN_TAG attribute to define whether to keep/strip (#699) (#700) (HEAD, origin/v1.0) [lguohan]

it does not have 77b2ad2 in its history. The master is still SAI 1.0, not SAI 1.2.

@andrii-savka
Copy link

@lguohan
The build is failing because of syncd can't include "switch_sai_rpc_server.h" from SAI.
I don't have such error in my local build.
Probably, we need to update SAI.
I'm investigating how to fix it.

@andrii-savka
Copy link

@lguohan
The flow to build syncd with SAI thrift is the same.
Could you check whether SAI which is used by Jenkins has a "switch_sai_rpc_server.h" thrift headers?

@pavel-shirshov
Copy link
Contributor

This build requires libsaithrift-dev. This library build was broken when we migrate from 0.9.4 to 1.0.2.
I'll try to fix the whole build process in the buildimage repo first.
I'll write results here as soon as I found anything.

@pavel-shirshov
Copy link
Contributor

Hi Guohan
You need to install libsaithrift-dev_1.0.4_amd64.deb
It should help you.

@andrii-savka
Copy link

Tested and created rebased PR: #281

@lguohan
Copy link
Contributor

lguohan commented Jan 13, 2018

merged the #281

@lguohan lguohan closed this Jan 13, 2018
jianyuewu pushed a commit to jianyuewu/sonic-sairedis that referenced this pull request Feb 7, 2025
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