Skip to content
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
6 changes: 4 additions & 2 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
- template: .azure-pipelines/cleanup.yml@buildimage
- ${{ parameters.preSteps }}
- script: |
BUILD_OPTIONS="$(BUILD_OPTIONS)"
[ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS)
BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS"
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS"
BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS"
fi
echo $BUILD_OPTIONS
echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS"
displayName: "Set cache options"
- checkout: self
Expand Down
42 changes: 24 additions & 18 deletions device/arista/x86_64-arista_7050_qx32/platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,43 @@
"psus": [
{
"name": "psu1",
"fans": []
"fans": [
{
"name": "psu1/1",
"speed": {
"controllable": false
}
}
]
},
{
"name": "psu2",
"fans": []
"fans": [
{
"name": "psu2/1",
"speed": {
"controllable": false
}
}
]
}
],
"thermals": [
{
"name": "Cpu temp sensor"
},
{
"name": "Board sensor"
},
{
"name": "Front-panel temp sensor"
},
{
"name": "Rear temp sensor"
},
{
"name": "Power supply 1 inlet temp sensor"
"name": "Cpu temp sensor",
"controllable": false
},
{
"name": "Power supply 1 internal sensor"
"name": "Board sensor",
"controllable": false
},
{
"name": "Power supply 2 inlet temp sensor"
"name": "Front-panel temp sensor",
"controllable": false
},
{
"name": "Power supply 2 internal sensor"
"name": "Rear temp sensor",
"controllable": false
}
],
"sfps": [
Expand Down
51 changes: 26 additions & 25 deletions device/arista/x86_64-arista_7050_qx32s/platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,47 @@
"psus": [
{
"name": "psu1",
"fans": []
"fans": [
{
"name": "psu1/1",
"speed": {
"controllable": false
}
}
]
},
{
"name": "psu2",
"fans": []
"fans": [
{
"name": "psu2/1",
"speed": {
"controllable": false
}
}
]
}
],
"thermals": [
{
"name": "Cpu temp sensor"
},
{
"name": "Cpu board temp sensor"
},
{
"name": "Back-panel temp sensor"
},
{
"name": "Board Sensor"
},
{
"name": "Front-panel temp sensor"
},
{
"name": "Power supply 1 hotspot sensor"
},
{
"name": "Power supply 1 inlet temp sensor"
"name": "Cpu temp sensor",
"controllable": false
},
{
"name": "Power supply 1 exhaust temp sensor"
"name": "Cpu board temp sensor",
"controllable": false
},
{
"name": "Power supply 2 hotspot sensor"
"name": "Back-panel temp sensor",
"controllable": false
},
{
"name": "Power supply 2 inlet temp sensor"
"name": "Board Sensor",
"controllable": false
},
{
"name": "Power supply 2 exhaust temp sensor"
"name": "Front-panel temp sensor",
"controllable": false
}
],
"sfps": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chassis": {
"DCS-7050CX3-32S": {
"DCS-7060CX-32S": {
"component": {
"Aboot()": {},
"Scd(addr=0000:02:00.0)": {},
Expand Down
2 changes: 1 addition & 1 deletion files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ installer_image_path="$image_path/$installer_image"

boot_config="$target_path/boot-config"

cmdline_allowlist="crashkernel hwaddr_ma1 sonic_fips"
cmdline_allowlist="crashkernel hwaddr_ma1 sonic_fips docker_inram"

# for backward compatibility with the sonic_upgrade= behavior
install="${install:-${sonic_upgrade:-}}"
Expand Down
7 changes: 7 additions & 0 deletions files/build_templates/buffers_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def
{%- endmacro %}

{%- set PORT_ALL = [] %}
{%- set PORT_BP = [] %}
{%- set SYSTEM_PORT_ALL = [] %}

{%- if voq_chassis %}
Expand All @@ -136,6 +137,9 @@ def
{%- if PORT_ALL.append(port) %}{%- endif %}
{%- endif %}
{%- endfor %}
{%- if defs.generate_bp_port_list is defined %}
{%- if defs.generate_bp_port_list(PORT,PORT_BP) %} {% endif %}
{%- endif %}
{%- endif %}

{%- set PORT_ACTIVE = [] %}
Expand All @@ -146,6 +150,9 @@ def
{%- for port in DEVICE_NEIGHBOR.keys() %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
{%- for port in PORT_BP %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
{%- for port in PORT_ALL %}
{%- if port not in DEVICE_NEIGHBOR.keys() %}
{%- if PORT_INACTIVE.append(port) %}{%- endif %}
Expand Down
8 changes: 8 additions & 0 deletions files/build_templates/qos_config.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{%- set PORT_ALL = [] %}
{%- set PORT_BP = [] %}
{%- for port in PORT %}
{%- if not port.startswith('Ethernet-Rec') and not port.startswith('Ethernet-IB') %}
{%- if PORT_ALL.append(port) %}{% endif %}
{%- endif %}
{%- endfor %}
{%- if generate_bp_port_list is defined %}
{%- if generate_bp_port_list(PORT,PORT_BP) %} {% endif %}
{%- endif %}

{%- if PORT_ALL | sort_by_port_index %}{% endif %}

{%- set port_names_list_all = [] %}
Expand All @@ -20,6 +25,9 @@
{%- for port in DEVICE_NEIGHBOR.keys() %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
{%- for port in PORT_BP %}
{%- if PORT_ACTIVE.append(port) %}{%- endif %}
{%- endfor %}
{%- endif %}
{%- if PORT_ACTIVE | sort_by_port_index %}{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,35 @@ emc2305_set_pwm(struct i2c_client *client, int fan_idx, long pwm)
mutex_unlock(&data->update_lock);
return status;
}

static int
emc2305_enable_timeout(struct i2c_client *client, bool enable)
{
struct emc2305_data *data = i2c_get_clientdata(client);
int status = 0;
u8 conf_val = 0;

mutex_lock(&data->update_lock);

status = read_u8_from_i2c(client, REG_CONFIGURATION, &conf_val);
if (status < 0) {
mutex_unlock(&data->update_lock);
return status;
}

// Section 6.2: CONFIG REGISTER DIS_TO bit(bit 6)
if (enable) {
conf_val &= ~(1 << 6);
} else {
conf_val |= (1 << 6);
}

status = i2c_smbus_write_byte_data(client, REG_CONFIGURATION, conf_val);

mutex_unlock(&data->update_lock);
return status;
}

/*
* sysfs callback functions
*
Expand Down Expand Up @@ -744,6 +773,9 @@ emc2305_probe(struct i2c_client *client, const struct i2c_device_id *id)
i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);

// Enable SMBus timeout feature
emc2305_enable_timeout(client, true);

status = i2c_smbus_read_byte_data(client, REG_PRODUCT_ID);
switch (status) {
case 0x34: /* EMC2305 */
Expand Down
2 changes: 1 addition & 1 deletion platform/checkout/cisco-8000.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[module]
[email protected]:Cisco-8000-sonic/platform-cisco-8000.git
ref=202205.2.2.4
ref=202205.2.2.5
2 changes: 1 addition & 1 deletion platform/marvell-armhf/prestera.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export MRVL_PRESTERA_VER = 1.0
export MRVL_PRESTERA = mrvlprestera_$(MRVL_PRESTERA_VER)_$(PLATFORM_ARCH)
export MRVL_PRESTERA_DEB = $(MRVL_PRESTERA).deb
export MRVL_PRESTERA_SRC_URL = https://github.com/Marvell-switching/mrvl-prestera.git
export MRVL_PRESTERA_SRC_TAG = MRVL_PRESTERA_DRIVER_1.2
export MRVL_PRESTERA_SRC_TAG = MRVL_PRESTERA_DRIVER_1.4

$(MRVL_PRESTERA_DEB)_SRC_PATH = $(PLATFORM_PATH)/prestera
$(MRVL_PRESTERA_DEB)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers/mvDmaDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers/mvIntDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/drivers/armhf/cpssEnabler/linuxNoKernelModule/drivers/mvDmaDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/drivers/armhf/cpssEnabler/linuxNoKernelModule/drivers/mvIntDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/platform/armhf/* /
6 changes: 3 additions & 3 deletions platform/marvell-armhf/prestera/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PACKAGE_PRE_NAME := mrvlprestera
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MOD_SRC_DIR:= $(shell pwd)
MODULE_DIR := mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers
MODULE_DIR := mrvl-prestera/drivers/armhf/cpssEnabler/linuxNoKernelModule/drivers

%:
dh $@ --with systemd,python2,python3 --buildsystem=pybuild
Expand All @@ -19,9 +19,9 @@ clean:
build:
# get sources
rm -rf mrvl-prestera || true
git clone -b ${MRVL_PRESTERA_SRC_TAG} ${MRVL_PRESTERA_SRC_URL}
git clone ${MRVL_PRESTERA_SRC_URL}
cd mrvl-prestera && git checkout ${MRVL_PRESTERA_SRC_TAG} && cd ..
sed "s/KVERSION/${KVERSION}/g" /sonic/platform/marvell-armhf/prestera/debian/mrvlprestera.install.template > /sonic/platform/marvell-armhf/prestera/debian/mrvlprestera.install
sed -i "s/4,11,0)/4,11,0) \&\& LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)/g" /sonic/platform/marvell-armhf/prestera/mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers/dmaDriver.c

make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$(MODULE_DIR)/

Expand Down
2 changes: 1 addition & 1 deletion src/sonic-swss
20 changes: 20 additions & 0 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ Table of Contents
* [Management port](#management-port)
* [Management VRF](#management-vrf)
* [MAP_PFC_PRIORITY_TO_QUEUE](#map_pfc_priority_to_queue)
* [MUX_CABLE](#muxcable)
* [NTP Global Configuration](#ntp-global-configuration)
* [NTP and SYSLOG servers](#ntp-and-syslog-servers)
* [Peer Switch](#peer-switch)
* [Policer](#policer)
* [Port](#port)
* [Port Channel](#port-channel)
Expand Down Expand Up @@ -1129,6 +1131,24 @@ instead of data network.
}
}
```
### MUX_CABLE

The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_type` and `soc_ipv4` objects are optional.

```
{
"MUX_CABLE": {
"Ethernet4": {
"cable_type": "active-active",
"server_ipv4": "192.168.0.2/32",
"server_ipv6": "fc02:1000::30/128",
"soc_ipv4": "192.168.0.3/32",
"state": "auto"
}
}
}
```

### NTP Global Configuration

These configuration options are used to modify the way that
Expand Down
2 changes: 2 additions & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def run(self):
'./yang-models/sonic-mgmt_port.yang',
'./yang-models/sonic-mgmt_vrf.yang',
'./yang-models/sonic-mirror-session.yang',
'./yang-models/sonic-mux-cable.yang',
'./yang-models/sonic-ntp.yang',
'./yang-models/sonic-nat.yang',
'./yang-models/sonic-nvgre-tunnel.yang',
Expand Down Expand Up @@ -155,6 +156,7 @@ def run(self):
'./yang-models/sonic-storm-control.yang',
'./yang-models/sonic-tc-priority-group-map.yang',
'./yang-models/sonic-tc-queue-map.yang',
'./yang-models/sonic-peer-switch.yang',
'./yang-models/sonic-pfc-priority-queue-map.yang',
'./yang-models/sonic-pfc-priority-priority-group-map.yang',
'./yang-models/sonic-port-qos-map.yang',
Expand Down
23 changes: 22 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@
"BGP_MONITORS": {
"5.6.7.8": {
"admin_status": "up",
"asn": "65000",
"asn": "0",
"holdtime": "180",
"keepalive": "60",
"local_addr": "10.0.0.11",
Expand Down Expand Up @@ -1806,6 +1806,27 @@
}
},

"PEER_SWITCH": {
"vlab-05": {
"address_ipv4": "10.1.0.33"
}
},

"MUX_CABLE": {
"Ethernet4": {
"cable_type": "active-active",
"server_ipv4": "192.168.0.2/32",
"server_ipv6": "fc02:1000::30/128",
"soc_ipv4": "192.168.0.3/32",
"state": "auto"
},
"Ethernet0": {
"server_ipv4": "192.168.0.2/32",
"server_ipv6": "fc02:1000::30/128",
"state": "auto"
}
},


"POLICER": {
"everflow_static_policer": {
Expand Down
Loading