Merged
Conversation
Contributor
stcheng
commented
Sep 6, 2016
- Moving portsOrch to global
- Adding intfsOrch dependency check
- Adding struct IntfsEntry
- Adding increase/decrease reference count functions
- Removing some trailing '\n's in logs
orchagent/intfsorch.cpp
Outdated
| intfs_entry.ip_addresses = IpAddresses(); | ||
| intfs_entry.ref_count = 0; | ||
| m_syncdIntfses[alias] = intfs_entry; | ||
|
|
Contributor
Author
|
Adding port_status_change notification handling function. |
This was referenced Sep 7, 2016
|
|
||
| IntfsOrch::IntfsOrch(DBConnector *db, string tableName) : | ||
| Orch(db, tableName) | ||
| { |
Contributor
|
Missing some function entry logs, commented on those which i found, not sure if all |
Contributor
Author
|
Updated. Add entry logs on necessary places. |
orchagent/intfsorch.cpp
Outdated
|
|
||
| SWSS_LOG_NOTICE("Remove packet action trap route ip:%s\n", ip_prefix.getIp().to_string().c_str()); | ||
| decreaseRouterIntfsRefCount(alias); | ||
| m_syncdIntfses[alias].ip_addresses.remove(ip_prefix.getIp()); |
Contributor
There was a problem hiding this comment.
the counterpart, adding them is not in addRouterIntf. why deleting them should be in removeRouterIntf?
Contributor
Author
There was a problem hiding this comment.
hmm good point. I'll move them to the addRouterIntf function().
Contributor
Contributor
|
|
||
| IntfsOrch::IntfsOrch(DBConnector *db, string tableName, PortsOrch *portsOrch) : | ||
| Orch(db, tableName), m_portsOrch(portsOrch) | ||
| extern PortsOrch *gPortsOrch; |
Contributor
There was a problem hiding this comment.
Move 'extern' to header file.
Contributor
Author
There was a problem hiding this comment.
discuss this in future pull requests.
Contributor
|
|
||
| void IntfsOrch::increaseRouterIntfsRefCount(string alias) | ||
| { | ||
| m_syncdIntfses[alias].ref_count++; |
Contributor
There was a problem hiding this comment.
Is alias always in the container? Add assert or runtime check?
Contributor
Author
|
Update the code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.