Skip to content

Make sairedis/syncd synchronous#476

Merged
kcudnik merged 8 commits intosonic-net:masterfrom
kcudnik:syncsyncd
Jul 17, 2019
Merged

Make sairedis/syncd synchronous#476
kcudnik merged 8 commits intosonic-net:masterfrom
kcudnik:syncsyncd

Conversation

@kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Jun 24, 2019

No description provided.

@kcudnik kcudnik requested a review from qiluo-msft June 24, 2019 17:47
@kcudnik kcudnik requested a review from lguohan June 24, 2019 17:47
*/

recordLine("C|" + str_object_type + joined);
recordLine("R|" + str_object_type + joined);
Copy link
Contributor

Choose a reason for hiding this comment

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

R [](start = 20, length = 1)

Is there a wiki page to summarize all the special char used in recording? If not, please create one.

Alternatively, how about centralized the definition in one header file and use constants or macros in code?

Copy link
Contributor

@jipanyang jipanyang Jun 25, 2019

Choose a reason for hiding this comment

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

Could we set such a rule that, small letter means request, capital letter is for response?
Ex:

g/G(get request/Get response), 
c/C (create request/create reponse).  
r/R(remove request/Remove response).  
s/S(set request/Set reponse)
b/B(bulk create/Bulk create response)
e/E(bulk remove request/Bulk remove response)
m/M(bulk set request/Buld set reponse)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually m/M should be removed since it's not SAI api call, its's request for counters subscription now, and recording should log only sai call's
also single 'b' is not good enough since you can have bulk remove, bulk create and so on

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @jipanyang ! I still suggest to maintain it as any of the below options:

  1. code comment or Github wiki page and referred by code comment.
  2. centralized the definition in one header file and use constants/macros/enums in code?

Nowadays it is hard to find, and easy to conflict.

#include "swss/tokenize.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#include "swss/json.hpp"
Copy link
Contributor

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

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

Add pragma into header file directly so others could also benefit? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is in swss-common repo, also new update to json would need to keep this but sure i can add

Copy link
Contributor

@qiluo-msft qiluo-msft Jun 27, 2019

Choose a reason for hiding this comment

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

any follow up? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

working on it

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

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

Copy link
Contributor

@jipanyang jipanyang left a comment

Choose a reason for hiding this comment

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

Do you have the performance data comparison before and after the change? I'm mostly concerned with neighbor and route related operations.

Copy link
Contributor

@jipanyang jipanyang left a comment

Choose a reason for hiding this comment

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

Another question is have you considered using NotificationProducer instead of producer? internal_api_wait_for_response() will wait for the response with timeout limit, function wise there should not be much difference.

While working on #315 , it was noticed that NotificationProducer/NotificationConsumer channel has lower overhead than Producer/Consumer channel ( about 50%). Not sure if there is any change since then.

@kcudnik
Copy link
Collaborator Author

kcudnik commented Jun 25, 2019

@jipanyang yes i have performance, send in email

#include <linux/if_ether.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
Copy link
Contributor

Choose a reason for hiding this comment

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

it's separated from this PR;
meanwhile, i'm wondering if we want to upgrade the version of this json.hpp file to a newer one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if i remember there were some compiling issues with newer one thats why we stick with this one but you can take a look, im adding this since gcc 9.1 is complaining

@lguohan
Copy link
Contributor

lguohan commented Jul 7, 2019

can you make this optional so that we do not need to turn it on by default for now?

@kcudnik
Copy link
Collaborator Author

kcudnik commented Jul 8, 2019

Do you mean compile time optional or dynamic optional ?
notice that there are 2 independent components changed there syncd and sairedis
so if dynamic on/off then they would need to be switched independently and both of them in syncd and OA

@kcudnik kcudnik merged commit e193e9d into sonic-net:master Jul 17, 2019
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
* Make sairedis/syncd synchronous

* Add wait for response for bulk api

* Update aspell

* Address comments

* Add support for bulk route create in saiplayer

* Fix spelling

* Make synchronous mode optional and disabled by default
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.

5 participants