[image]: Upgrade SONiC stack to use SAI version to v1.2 (#1336)

This commit is contained in:
lguohan 2018-02-22 19:36:39 -08:00 committed by GitHub
parent 5a0e42307f
commit 005a59fc4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 1133 additions and 41 deletions

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number is missed."
print "Usage: sfplpmget.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get MCION
mcion = ku_mcion_reg()
mcion.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_mcion(mcion, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc
# Get low power mode status
lpm_mask = 1 << 8
lpm_status = (lpm_mask & mcion.module_status_bits) != 0
print "LPM ON" if lpm_status else "LPM OFF"

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python
import sys, errno
import time
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
def get_log_ports(handle, sfp_module):
port_attributes_list = new_sx_port_attributes_t_arr(64)
port_cnt_p = new_uint32_t_p()
uint32_t_p_assign(port_cnt_p, 64)
rc = sx_api_port_device_get(handle, 1 , 0, port_attributes_list, port_cnt_p)
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
port_cnt = uint32_t_p_value(port_cnt_p)
log_port_list = []
for i in range(0, port_cnt):
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
if port_attributes.port_mapping.module_port == sfp_module:
log_port_list.append(port_attributes.log_port)
return log_port_list
def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status):
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Set admin status to PMAOS
pmaos.ase = 1
pmaos.ee = 1
pmaos.e = 2
pmaos.rst = 0
if admin_status == SX_PORT_ADMIN_STATUS_DOWN:
pmaos.admin_status = 2
else:
pmaos.admin_status = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Check if SFP port number is provided
if len(sys.argv) < 3:
print "SFP module number or LPM is missed."
print "Usage: sfplpmset.py <SFP module> <on|off>"
sys.exit(errno.EINVAL)
lpm_enable = None
if sys.argv[2] == 'on':
lpm_enable = True
elif sys.argv[2] == 'off':
lpm_enable = False
else:
print "Unrecognized LPM parameter. Please use <on> or <off> values"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES);
# Get SFP module and log ports number and LPM status
sfp_module = int(sys.argv[1])
log_port_list = get_log_ports(handle, sfp_module)
if not log_port_list:
print "Failed to get log ports"
sys.exit(errno.EACCES)
# Get PMMP
pmmp = ku_pmmp_reg()
pmmp.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Disable admin status before LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN)
# Set low power mode status
lpm_mask = 1 << 8
if lpm_enable:
pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask
else:
pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask)
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Enable admin status after LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP)

View File

@ -0,0 +1,45 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number or LPM is missed."
print "Usage: sfpreset.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Reset SFP
pmaos.rst = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
print "Reset flag is set"

View File

@ -5,6 +5,7 @@
try: try:
import time import time
import subprocess
from sonic_sfp.sfputilbase import SfpUtilBase from sonic_sfp.sfputilbase import SfpUtilBase
except ImportError as e: except ImportError as e:
raise ImportError("%s - required module not found" % str(e)) raise ImportError("%s - required module not found" % str(e))
@ -46,17 +47,105 @@ class SfpUtil(SfpUtilBase):
SfpUtilBase.__init__(self) SfpUtilBase.__init__(self)
def get_presence(self, port_num): def get_presence(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError try:
reg_file = open("/bsp/qsfp/qsfp%d_status" % (port_num+1))
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
content = reg_file.readline().rstrip()
# content is a string with the qsfp status
if content == "good":
return True
return False
def get_low_power_mode(self, port_num): def get_low_power_mode(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num)
try:
output = subprocess.check_output(lpm_cmd, shell=True)
if 'LPM ON' in output:
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False
def set_low_power_mode(self, port_num, lpmode): def set_low_power_mode(self, port_num, lpmode):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError curr_lpmode = self.get_low_power_mode(port_num)
if curr_lpmode == lpmode:
return True
lpm = 'on' if lpmode else 'off'
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm)
sfp_port_names = self.physical_to_logical[port_num]
# Get port admin status
try:
enabled_ports = subprocess.check_output("ip link show up", shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to get ports status, err msg: {}".format(e.output)
return False
port_to_disable = []
for port in sfp_port_names:
if port in enabled_ports:
port_to_disable.append(port)
# Disable ports before LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} down".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
time.sleep(3)
# Set LPM
try:
subprocess.check_output(lpm_cmd, shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
# Enable ports after LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} up".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
return True
def reset(self, port_num): def reset(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num)
try:
subprocess.check_output(lpm_cmd, shell=True)
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number is missed."
print "Usage: sfplpmget.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get MCION
mcion = ku_mcion_reg()
mcion.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_mcion(mcion, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc
# Get low power mode status
lpm_mask = 1 << 8
lpm_status = (lpm_mask & mcion.module_status_bits) != 0
print "LPM ON" if lpm_status else "LPM OFF"

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python
import sys, errno
import time
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
def get_log_ports(handle, sfp_module):
port_attributes_list = new_sx_port_attributes_t_arr(64)
port_cnt_p = new_uint32_t_p()
uint32_t_p_assign(port_cnt_p, 64)
rc = sx_api_port_device_get(handle, 1 , 0, port_attributes_list, port_cnt_p)
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
port_cnt = uint32_t_p_value(port_cnt_p)
log_port_list = []
for i in range(0, port_cnt):
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
if port_attributes.port_mapping.module_port == sfp_module:
log_port_list.append(port_attributes.log_port)
return log_port_list
def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status):
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Set admin status to PMAOS
pmaos.ase = 1
pmaos.ee = 1
pmaos.e = 2
pmaos.rst = 0
if admin_status == SX_PORT_ADMIN_STATUS_DOWN:
pmaos.admin_status = 2
else:
pmaos.admin_status = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Check if SFP port number is provided
if len(sys.argv) < 3:
print "SFP module number or LPM is missed."
print "Usage: sfplpmset.py <SFP module> <on|off>"
sys.exit(errno.EINVAL)
lpm_enable = None
if sys.argv[2] == 'on':
lpm_enable = True
elif sys.argv[2] == 'off':
lpm_enable = False
else:
print "Unrecognized LPM parameter. Please use <on> or <off> values"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES);
# Get SFP module and log ports number and LPM status
sfp_module = int(sys.argv[1])
log_port_list = get_log_ports(handle, sfp_module)
if not log_port_list:
print "Failed to get log ports"
sys.exit(errno.EACCES)
# Get PMMP
pmmp = ku_pmmp_reg()
pmmp.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Disable admin status before LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN)
# Set low power mode status
lpm_mask = 1 << 8
if lpm_enable:
pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask
else:
pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask)
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Enable admin status after LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP)

View File

@ -0,0 +1,45 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number or LPM is missed."
print "Usage: sfpreset.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Reset SFP
pmaos.rst = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
print "Reset flag is set"

View File

@ -5,6 +5,7 @@
try: try:
import time import time
import subprocess
from sonic_sfp.sfputilbase import SfpUtilBase from sonic_sfp.sfputilbase import SfpUtilBase
except ImportError as e: except ImportError as e:
raise ImportError("%s - required module not found" % str(e)) raise ImportError("%s - required module not found" % str(e))
@ -65,13 +66,86 @@ class SfpUtil(SfpUtilBase):
return False return False
def get_low_power_mode(self, port_num): def get_low_power_mode(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num)
try:
output = subprocess.check_output(lpm_cmd, shell=True)
if 'LPM ON' in output:
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False
def set_low_power_mode(self, port_num, lpmode): def set_low_power_mode(self, port_num, lpmode):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError curr_lpmode = self.get_low_power_mode(port_num)
if curr_lpmode == lpmode:
return True
lpm = 'on' if lpmode else 'off'
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm)
sfp_port_names = self.physical_to_logical[port_num]
# Get port admin status
try:
enabled_ports = subprocess.check_output("ip link show up", shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to get ports status, err msg: {}".format(e.output)
return False
port_to_disable = []
for port in sfp_port_names:
if port in enabled_ports:
port_to_disable.append(port)
# Disable ports before LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} down".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
time.sleep(3)
# Set LPM
try:
subprocess.check_output(lpm_cmd, shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
# Enable ports after LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} up".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
return True
def reset(self, port_num): def reset(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num)
try:
subprocess.check_output(lpm_cmd, shell=True)
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number is missed."
print "Usage: sfplpmget.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get MCION
mcion = ku_mcion_reg()
mcion.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_mcion(mcion, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc
# Get low power mode status
lpm_mask = 1 << 8
lpm_status = (lpm_mask & mcion.module_status_bits) != 0
print "LPM ON" if lpm_status else "LPM OFF"

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python
import sys, errno
import time
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
def get_log_ports(handle, sfp_module):
port_attributes_list = new_sx_port_attributes_t_arr(64)
port_cnt_p = new_uint32_t_p()
uint32_t_p_assign(port_cnt_p, 64)
rc = sx_api_port_device_get(handle, 1 , 0, port_attributes_list, port_cnt_p)
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
port_cnt = uint32_t_p_value(port_cnt_p)
log_port_list = []
for i in range(0, port_cnt):
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
if port_attributes.port_mapping.module_port == sfp_module:
log_port_list.append(port_attributes.log_port)
return log_port_list
def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status):
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Set admin status to PMAOS
pmaos.ase = 1
pmaos.ee = 1
pmaos.e = 2
pmaos.rst = 0
if admin_status == SX_PORT_ADMIN_STATUS_DOWN:
pmaos.admin_status = 2
else:
pmaos.admin_status = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Check if SFP port number is provided
if len(sys.argv) < 3:
print "SFP module number or LPM is missed."
print "Usage: sfplpmset.py <SFP module> <on|off>"
sys.exit(errno.EINVAL)
lpm_enable = None
if sys.argv[2] == 'on':
lpm_enable = True
elif sys.argv[2] == 'off':
lpm_enable = False
else:
print "Unrecognized LPM parameter. Please use <on> or <off> values"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES);
# Get SFP module and log ports number and LPM status
sfp_module = int(sys.argv[1])
log_port_list = get_log_ports(handle, sfp_module)
if not log_port_list:
print "Failed to get log ports"
sys.exit(errno.EACCES)
# Get PMMP
pmmp = ku_pmmp_reg()
pmmp.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Disable admin status before LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN)
# Set low power mode status
lpm_mask = 1 << 8
if lpm_enable:
pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask
else:
pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask)
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Enable admin status after LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP)

View File

@ -0,0 +1,45 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number or LPM is missed."
print "Usage: sfpreset.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Reset SFP
pmaos.rst = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
print "Reset flag is set"

View File

@ -5,6 +5,7 @@
try: try:
import time import time
import subprocess
from sonic_sfp.sfputilbase import SfpUtilBase from sonic_sfp.sfputilbase import SfpUtilBase
except ImportError as e: except ImportError as e:
raise ImportError("%s - required module not found" % str(e)) raise ImportError("%s - required module not found" % str(e))
@ -65,13 +66,86 @@ class SfpUtil(SfpUtilBase):
return False return False
def get_low_power_mode(self, port_num): def get_low_power_mode(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num)
try:
output = subprocess.check_output(lpm_cmd, shell=True)
if 'LPM ON' in output:
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False
def set_low_power_mode(self, port_num, lpmode): def set_low_power_mode(self, port_num, lpmode):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError curr_lpmode = self.get_low_power_mode(port_num)
if curr_lpmode == lpmode:
return True
lpm = 'on' if lpmode else 'off'
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm)
sfp_port_names = self.physical_to_logical[port_num]
# Get port admin status
try:
enabled_ports = subprocess.check_output("ip link show up", shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to get ports status, err msg: {}".format(e.output)
return False
port_to_disable = []
for port in sfp_port_names:
if port in enabled_ports:
port_to_disable.append(port)
# Disable ports before LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} down".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
time.sleep(3)
# Set LPM
try:
subprocess.check_output(lpm_cmd, shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
# Enable ports after LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} up".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
return True
def reset(self, port_num): def reset(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num)
try:
subprocess.check_output(lpm_cmd, shell=True)
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number is missed."
print "Usage: sfplpmget.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get MCION
mcion = ku_mcion_reg()
mcion.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_mcion(mcion, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc
# Get low power mode status
lpm_mask = 1 << 8
lpm_status = (lpm_mask & mcion.module_status_bits) != 0
print "LPM ON" if lpm_status else "LPM OFF"

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python
import sys, errno
import time
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
def get_log_ports(handle, sfp_module):
port_attributes_list = new_sx_port_attributes_t_arr(64)
port_cnt_p = new_uint32_t_p()
uint32_t_p_assign(port_cnt_p, 64)
rc = sx_api_port_device_get(handle, 1 , 0, port_attributes_list, port_cnt_p)
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
port_cnt = uint32_t_p_value(port_cnt_p)
log_port_list = []
for i in range(0, port_cnt):
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
if port_attributes.port_mapping.module_port == sfp_module:
log_port_list.append(port_attributes.log_port)
return log_port_list
def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status):
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Set admin status to PMAOS
pmaos.ase = 1
pmaos.ee = 1
pmaos.e = 2
pmaos.rst = 0
if admin_status == SX_PORT_ADMIN_STATUS_DOWN:
pmaos.admin_status = 2
else:
pmaos.admin_status = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Check if SFP port number is provided
if len(sys.argv) < 3:
print "SFP module number or LPM is missed."
print "Usage: sfplpmset.py <SFP module> <on|off>"
sys.exit(errno.EINVAL)
lpm_enable = None
if sys.argv[2] == 'on':
lpm_enable = True
elif sys.argv[2] == 'off':
lpm_enable = False
else:
print "Unrecognized LPM parameter. Please use <on> or <off> values"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES);
# Get SFP module and log ports number and LPM status
sfp_module = int(sys.argv[1])
log_port_list = get_log_ports(handle, sfp_module)
if not log_port_list:
print "Failed to get log ports"
sys.exit(errno.EACCES)
# Get PMMP
pmmp = ku_pmmp_reg()
pmmp.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Disable admin status before LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN)
# Set low power mode status
lpm_mask = 1 << 8
if lpm_enable:
pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask
else:
pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask)
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
# Enable admin status after LPM settings
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP)

View File

@ -0,0 +1,45 @@
#!/usr/bin/env python
import sys, errno
import os
from python_sdk_api.sxd_api import *
from python_sdk_api.sx_api import *
# Check if SFP port number is provided
if len(sys.argv) < 2:
print "SFP module number or LPM is missed."
print "Usage: sfpreset.py <SFP module>"
sys.exit(errno.EINVAL)
# Init SDK API
rc, handle = sx_api_open(None)
if (rc != SX_STATUS_SUCCESS):
print "Failed to open api handle.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
pid = os.getpid()
rc = sxd_access_reg_init(pid, None, 0)
if (rc != 0):
print "Failed to initializing register access.\nPlease check that SDK is running."
sys.exit(errno.EACCES)
# Get SFP module number
sfp_module = int(sys.argv[1])
# Get PMAOS
pmaos = ku_pmaos_reg()
pmaos.module = sfp_module
meta = sxd_reg_meta_t()
meta.dev_id = 1
meta.swid = 0
meta.access_cmd = SXD_ACCESS_CMD_GET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
# Reset SFP
pmaos.rst = 1
meta.access_cmd = SXD_ACCESS_CMD_SET
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
print "Reset flag is set"

View File

@ -5,6 +5,7 @@
try: try:
import time import time
import subprocess
from sonic_sfp.sfputilbase import SfpUtilBase from sonic_sfp.sfputilbase import SfpUtilBase
except ImportError as e: except ImportError as e:
raise ImportError("%s - required module not found" % str(e)) raise ImportError("%s - required module not found" % str(e))
@ -65,13 +66,86 @@ class SfpUtil(SfpUtilBase):
return False return False
def get_low_power_mode(self, port_num): def get_low_power_mode(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num)
try:
output = subprocess.check_output(lpm_cmd, shell=True)
if 'LPM ON' in output:
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False
def set_low_power_mode(self, port_num, lpmode): def set_low_power_mode(self, port_num, lpmode):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError curr_lpmode = self.get_low_power_mode(port_num)
if curr_lpmode == lpmode:
return True
lpm = 'on' if lpmode else 'off'
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm)
sfp_port_names = self.physical_to_logical[port_num]
# Get port admin status
try:
enabled_ports = subprocess.check_output("ip link show up", shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to get ports status, err msg: {}".format(e.output)
return False
port_to_disable = []
for port in sfp_port_names:
if port in enabled_ports:
port_to_disable.append(port)
# Disable ports before LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} down".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
time.sleep(3)
# Set LPM
try:
subprocess.check_output(lpm_cmd, shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
# Enable ports after LPM settings
for port in port_to_disable:
try:
subprocess.check_output("ifconfig {} up".format(port), shell=True)
except subprocess.CalledProcessError as e:
print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
return False
return True
def reset(self, port_num): def reset(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
raise NotImplementedError lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num)
try:
subprocess.check_output(lpm_cmd, shell=True)
return True
except subprocess.CalledProcessError as e:
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
return False
return False

View File

@ -25,6 +25,7 @@ ExecStartPre=/usr/bin/docker exec database redis-cli -n 5 FLUSHDB
ExecStartPre=/usr/bin/docker exec database redis-cli -n 6 FLUSHDB ExecStartPre=/usr/bin/docker exec database redis-cli -n 6 FLUSHDB
{% if sonic_asic_platform == 'mellanox' %} {% if sonic_asic_platform == 'mellanox' %}
Environment=FAST_BOOT=1
TimeoutStartSec=3min TimeoutStartSec=3min
ExecStartPre=/usr/bin/mst start ExecStartPre=/usr/bin/mst start
ExecStartPre=/usr/bin/mlnx-fw-upgrade.sh ExecStartPre=/usr/bin/mlnx-fw-upgrade.sh

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_BRCM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAITHRIFT_DEV_BRCM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV)
$(LIBSAITHRIFT_DEV_BRCM)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI) $(LIBSAITHRIFT_DEV_BRCM)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_BRCM = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_BRCM = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_BRCM)_DEPENDS += $(BRCM_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_BRCM)_DEPENDS += $(BRCM_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM)

View File

@ -1,9 +1,9 @@
BRCM_SAI = libsaibcm_3.0.3.3-3_amd64.deb BRCM_SAI = libsaibcm_3.1.3.4-1_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm_3.0.3.3-3_amd64.deb?sv=2015-04-05&sr=b&sig=A%2Bcq%2B8XL%2BZfhOV6zqwRWm1jQ31PN0t54H9abZSRwTVw%3D&se=2031-09-25T22%3A41%3A43Z&sp=r" $(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm_3.1.3.4-1_amd64.deb?sv=2015-04-05&sr=b&sig=og1GOWhY9aScmFlWQT%2F51Nno%2FDGMZgxVbprQAaZyQVk%3D&se=2031-10-31T03%3A38%3A38Z&sp=r"
BRCM_SAI_DEV = libsaibcm-dev_3.0.3.3-3_amd64.deb BRCM_SAI_DEV = libsaibcm-dev_3.1.3.4-1_amd64.deb
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm-dev_3.0.3.3-3_amd64.deb?sv=2015-04-05&sr=b&sig=XT0v%2B25LZ5whTwH%2FE%2FykQLV8Kzn%2FoDyLNXjmqNuiFPo%3D&se=2031-09-25T22%3A41%3A21Z&sp=r" $(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm-dev_3.1.3.4-1_amd64.deb?sv=2015-04-05&sr=b&sig=lD1%2FLriHW9yPV9OAX9nqYJDwBm7B6Ge77WGcQvnPjAQ%3D&se=2031-10-31T03%3A37%3A55Z&sp=r"
SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV) SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)

View File

@ -1,4 +1,4 @@
BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-5-amd64_3.4.1.11-1_amd64.deb
$(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb?sv=2015-04-05&sr=b&sig=R%2BQp4mHlNi489Q6HP7vFUdBDmDazbiL02hQFdxYkCI0%3D&se=2031-09-27T20%3A17%3A41Z&sp=r" $(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-5-amd64_3.4.1.11-1_amd64.deb?sv=2015-04-05&sr=b&sig=jsHYNwfuoTU%2B2mhhyhC2%2FaQ%2BcaZA%2Fd21LzaaUq%2BG65c%3D&se=2031-10-17T01%3A35%3A15Z&sp=r"
SONIC_ONLINE_DEBS += $(BRCM_OPENNSL_KERNEL) SONIC_ONLINE_DEBS += $(BRCM_OPENNSL_KERNEL)

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_CAVM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CAVM_LIBSAI) $(CAVM_SAI) $(LIBSAITHRIFT_DEV_CAVM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CAVM_LIBSAI) $(CAVM_SAI)
$(LIBSAITHRIFT_DEV_CAVM)_RDEPENDS += $(LIBTHRIFT) $(CAVM_SAI) $(LIBSAITHRIFT_DEV_CAVM)_RDEPENDS += $(LIBTHRIFT) $(CAVM_SAI)

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_CAVM = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_CAVM = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_CAVM)_DEPENDS += $(CAVM_LIBSAI) $(CAVM_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_CAVM)_DEPENDS += $(CAVM_LIBSAI) $(CAVM_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CAVM) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CAVM)

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_CENTEC)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CENTEC_SAI) $(LIBSAITHRIFT_DEV_CENTEC)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CENTEC_SAI)
$(LIBSAITHRIFT_DEV_CENTEC)_RDEPENDS += $(LIBTHRIFT) $(CENTEC_SAI) $(LIBSAITHRIFT_DEV_CENTEC)_RDEPENDS += $(LIBTHRIFT) $(CENTEC_SAI)

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_CENTEC = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_CENTEC = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_CENTEC)_DEPENDS += $(CENTEC_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_CENTEC)_DEPENDS += $(CENTEC_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CENTEC) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CENTEC)

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_MRVL)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MRVL_FPA) $(MRVL_SAI)
$(LIBSAITHRIFT_DEV_MRVL)_RDEPENDS += $(LIBTHRIFT) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)_RDEPENDS += $(LIBTHRIFT) $(MRVL_SAI)

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_MRVL = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_MRVL = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_MRVL)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_MRVL)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MRVL) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MRVL)

View File

@ -1,6 +1,6 @@
# mellanox firmware # mellanox firmware
MLNX_FW_VERSION = 13.1534.0164 MLNX_FW_VERSION = 13.1600.0184
MLNX_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_FW_VERSION))-EVB.mfa MLNX_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_FW_VERSION))-EVB.mfa
$(MLNX_FW_FILE)_URL = $(MLNX_SDK_BASE_URL)/$(MLNX_FW_FILE) $(MLNX_FW_FILE)_URL = $(MLNX_SDK_BASE_URL)/$(MLNX_FW_FILE)
SONIC_ONLINE_FILES += $(MLNX_FW_FILE) SONIC_ONLINE_FILES += $(MLNX_FW_FILE)

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_MLNX)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MLNX_SAI) $(MLNX_SAI_DEV) $(LIBSAITHRIFT_DEV_MLNX)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MLNX_SAI) $(MLNX_SAI_DEV)
$(LIBSAITHRIFT_DEV_MLNX)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI) $(LIBSAITHRIFT_DEV_MLNX)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI)

View File

@ -1,7 +1,7 @@
# Mellanox SAI # Mellanox SAI
MLNX_SAI_VERSION = SAIRel1.9.2-master MLNX_SAI_VERSION = SAIRel1.10.1-master
MLNX_SAI_REVISION = d098a2c89cd700d9c1278e448fd6bb047cbd59e2 MLNX_SAI_REVISION = dac6b12d09a94d39eabee0d3e6419015cf6fb6b8
export MLNX_SAI_VERSION MLNX_SAI_REVISION export MLNX_SAI_VERSION MLNX_SAI_REVISION

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_MLNX = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_MLNX = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_MLNX)_DEPENDS += $(MLNX_SAI_DEV) $(MLNX_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_MLNX)_DEPENDS += $(MLNX_SAI_DEV) $(MLNX_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX)

View File

@ -1,5 +1,5 @@
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/645052b0a285b190082beb858ba43a8b33bb667a/sdk MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/05493363f389a5601322d664bdb004434e1a7a39/sdk
MLNX_SDK_VERSION = 4.2.6011 MLNX_SDK_VERSION = 4.2.7004X004
MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_ACL_RM) $(SX_COMPLIB) \ MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_ACL_RM) $(SX_COMPLIB) \
$(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \ $(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \
$(SXD_LIBS) $(TESTX) $(SXD_LIBS) $(TESTX)

View File

@ -1,6 +1,6 @@
# libsaithrift-dev package # libsaithrift-dev package
LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_1.0.4_amd64.deb LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_1.2.1_amd64.deb
$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV)
$(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI) $(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI)

View File

@ -1,6 +1,6 @@
# python-saithrift package # python-saithrift package
PYTHON_SAITHRIFT_NEPHOS = python-saithrift_1.0.4_amd64.deb PYTHON_SAITHRIFT_NEPHOS = python-saithrift_1.2.1_amd64.deb
$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
$(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) $(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS)

View File

@ -46,7 +46,7 @@ stdout_logfile=syslog
stderr_logfile=syslog stderr_logfile=syslog
[program:syncd] [program:syncd]
command=/usr/bin/syncd -uN command=/usr/bin/syncd -u
autostart=false autostart=false
autorestart=false autorestart=false
stdout_logfile=syslog stdout_logfile=syslog
@ -138,4 +138,4 @@ priority=15
autostart=false autostart=false
autorestart=true autorestart=true
stdout_logfile=syslog stdout_logfile=syslog
stderr_logfile=syslog stderr_logfile=syslog

View File

@ -28,7 +28,7 @@ stdout_logfile=syslog
stderr_logfile=syslog stderr_logfile=syslog
[program:syncd] [program:syncd]
command=/usr/bin/syncd -uN -p /usr/share/sonic/device/vswitch/brcm.profile.ini command=/usr/bin/syncd -u -p /usr/share/sonic/device/vswitch/brcm.profile.ini
priority=4 priority=4
autostart=false autostart=false
autorestart=false autorestart=false

@ -1 +1 @@
Subproject commit c9e25ec8bf0aea73f45d6e46dfd5919760f450d0 Subproject commit d2601d93ef5c2383e64e8ae33be2e3ebfec6bb3b

@ -1 +1 @@
Subproject commit 9a037b8ed328070ee09d04e08c90ffdc0405e022 Subproject commit 6dd08704236fc24ff008287fbd27d01e9d0eda4f