Skip to content

Moving portsOrch to global#71

Merged
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:intfsyncd
Sep 19, 2016
Merged

Moving portsOrch to global#71
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:intfsyncd

Conversation

@stcheng
Copy link
Contributor

@stcheng 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

intfs_entry.ip_addresses = IpAddresses();
intfs_entry.ref_count = 0;
m_syncdIntfses[alias] = intfs_entry;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

empty line.

@stcheng
Copy link
Contributor Author

stcheng commented Sep 7, 2016

Adding port_status_change notification handling function.


IntfsOrch::IntfsOrch(DBConnector *db, string tableName) :
Orch(db, tableName)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

SWSS_LOG_ENTER();

@kcudnik
Copy link
Contributor

kcudnik commented Sep 7, 2016

Missing some function entry logs, commented on those which i found, not sure if all

@stcheng
Copy link
Contributor Author

stcheng commented Sep 9, 2016

Updated. Add entry logs on necessary places.

@stcheng stcheng self-assigned this Sep 9, 2016

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());
Copy link
Contributor

Choose a reason for hiding this comment

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

the counterpart, adding them is not in addRouterIntf. why deleting them should be in removeRouterIntf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm good point. I'll move them to the addRouterIntf function().

@lguohan
Copy link
Contributor

lguohan commented Sep 12, 2016

I feel this should be part of addRouterIntfs()


Refers to: orchagent/intfsorch.cpp:110 in 5ab3f5b. [](commit_id = 5ab3f5b, deletion_comment = False)

@lguohan
Copy link
Contributor

lguohan commented Sep 12, 2016

        unicast_route_entry.destination.mask.ip4 = 0xFFFFFFFF;

i feel this should also be port of addRouterIntfs.


Refers to: orchagent/intfsorch.cpp:146 in 5ab3f5b. [](commit_id = 5ab3f5b, deletion_comment = False)


IntfsOrch::IntfsOrch(DBConnector *db, string tableName, PortsOrch *portsOrch) :
Orch(db, tableName), m_portsOrch(portsOrch)
extern PortsOrch *gPortsOrch;
Copy link
Contributor

Choose a reason for hiding this comment

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

Move 'extern' to header file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discuss this in future pull requests.

@lguohan
Copy link
Contributor

lguohan commented Sep 12, 2016

        unicast_route_entry.destination.addr_family = SAI_IP_ADDR_FAMILY_IPV4;

did we add ipv6 support yet?


Refers to: orchagent/intfsorch.cpp:144 in 5ab3f5b. [](commit_id = 5ab3f5b, deletion_comment = False)


void IntfsOrch::increaseRouterIntfsRefCount(string alias)
{
m_syncdIntfses[alias].ref_count++;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is alias always in the container? Add assert or runtime check?

@stcheng
Copy link
Contributor Author

stcheng commented Sep 14, 2016

Update the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants