Skip to content

pull from origin #1

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

Merged
merged 7 commits into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neighsyncd/neighsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

/*
* This is the timer value (in seconds) that the neighsyncd waits for restore_neighbors
* service to finish, should be longer than the restore_neighbors timeout value (60)
* service to finish, should be longer than the restore_neighbors timeout value (110)
* This should not happen, if happens, system is in a unknown state, we should exit.
*/
#define RESTORE_NEIGH_WAIT_TIME_OUT 70
#define RESTORE_NEIGH_WAIT_TIME_OUT 120

namespace swss {

Expand Down
13 changes: 7 additions & 6 deletions neighsyncd/restore_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
logger.setLevel(logging.WARNING)
logger.addHandler(logging.NullHandler())

# timeout the restore process in 1 min if not finished
# timeout the restore process in 110 seconds if not finished
# This is mostly to wait for interfaces to be created and up after system warm-reboot
# and this process is started by supervisord in swss docker.
# It would be good to keep that time below routing reconciliation time-out.
TIME_OUT = 60
# There had been devices taking close to 70 seconds to complete restoration, setting
# default timeout to 110 seconds.
DEF_TIME_OUT = 110

# every 5 seconds to check interfaces states
CHECK_INTERVAL = 5
Expand Down Expand Up @@ -189,13 +190,13 @@ def set_statedb_neigh_restore_done():
# Once all the entries are restored, this function is returned.
# The interfaces' states were checked in a loop with an interval (CHECK_INTERVAL)
# The function will timeout in case interfaces' states never meet the condition
# after some time (TIME_OUT).
def restore_update_kernel_neighbors(intf_neigh_map):
# after some time (DEF_TIME_OUT).
def restore_update_kernel_neighbors(intf_neigh_map, timeout=DEF_TIME_OUT):
# create object for netlink calls to kernel
ipclass = IPRoute()
mtime = monotonic.time.time
start_time = mtime()
while (mtime() - start_time) < TIME_OUT:
while (mtime() - start_time) < timeout:
for intf, family_neigh_map in intf_neigh_map.items():
# only try to restore to kernel when link is up
if is_intf_oper_state_up(intf):
Expand Down
1 change: 1 addition & 0 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ bool IntfsOrch::setIntf(const string& alias, sai_object_id_t vrf_id, const IpPre
return false;
}

vrf_id = port.m_vr_id;
addSubnetRoute(port, *ip_prefix);
addIp2MeRoute(vrf_id, *ip_prefix);

Expand Down
10 changes: 6 additions & 4 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ extern BufferOrch *gBufferOrch;
#define DEFAULT_VLAN_ID 1
#define PORT_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define QUEUE_FLEX_STAT_COUNTER_POLL_MSECS "10000"
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"


static map<string, sai_port_fec_mode_t> fec_mode_map =
Expand Down Expand Up @@ -252,9 +252,9 @@ PortsOrch::PortsOrch(DBConnector *db, vector<table_name_with_pri_t> &tableNames)
/* Get port hardware lane info */
for (i = 0; i < m_portCount; i++)
{
sai_uint32_t lanes[4] = { 0,0,0,0 };
sai_uint32_t lanes[8] = { 0,0,0,0,0,0,0,0 };
attr.id = SAI_PORT_ATTR_HW_LANE_LIST;
attr.value.u32list.count = 4;
attr.value.u32list.count = 8;
attr.value.u32list.list = lanes;

status = sai_port_api->get_port_attribute(port_list[i], 1, &attr);
Expand All @@ -266,7 +266,9 @@ PortsOrch::PortsOrch(DBConnector *db, vector<table_name_with_pri_t> &tableNames)

set<int> tmp_lane_set;
for (j = 0; j < attr.value.u32list.count; j++)
{
tmp_lane_set.insert(attr.value.u32list.list[j]);
}

string tmp_lane_str = "";
for (auto s : tmp_lane_set)
Expand Down
Loading