Skip to content

Commit 6502475

Browse files
rdhegdensaxena16
authored andcommitted
STP: Fix: Build and docker updates to bring up the STP service
Did the following changes for docker-stp * Updated the apt-get path to install nftables instead of ebtables since the functionality needed from ebtables in STP docker is not supported anymore * Updated the supervisord.conf to the current format. Did the following build changes * Updated init_cfg.json.j2 to disable STP feature on start when the build includes this feature * Updated stp.service.j2 to use config-setup.service instead of currently unsupported updategraph.service * Added entries for STP in copp_cfg.j2 to punt the packet to control plane. Signed-off-by: Ram Hegde <rhegde@marvell.com>
1 parent 2afcfb0 commit 6502475

9 files changed

Lines changed: 34 additions & 17 deletions

File tree

dockers/docker-stp/Dockerfile.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ RUN apt-get update && \
1414
libdbus-1-3 \
1515
libdaemon0 \
1616
libjansson4 \
17-
libpython3.11 \
18-
libjemalloc2 \
19-
ebtables
17+
libpython3.13 \
18+
libjemalloc2 \
19+
nftables
2020

2121
{% if docker_stp_debs.strip() -%}
2222
# Copy locally-built Debian package dependencies

dockers/docker-stp/supervisord.conf

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,37 @@ command=/usr/bin/start.sh
88
priority=1
99
autostart=true
1010
autorestart=false
11-
stdout_logfile=syslog
12-
stderr_logfile=syslog
11+
stdout_logfile=NONE
12+
stdout_syslog=true
13+
stderr_logfile=NONE
14+
stderr_syslog=true
1315

1416
[program:rsyslogd]
1517
command=/usr/sbin/rsyslogd -n
1618
priority=2
1719
autostart=false
1820
autorestart=false
19-
stdout_logfile=syslog
20-
stderr_logfile=syslog
21+
stdout_logfile=NONE
22+
stdout_syslog=true
23+
stderr_logfile=NONE
24+
stderr_syslog=true
2125

2226
[program:stpd]
2327
command=/usr/bin/stpd
2428
priority=3
2529
autostart=false
2630
autorestart=false
27-
stdout_logfile=syslog
28-
stderr_logfile=syslog
31+
stdout_logfile=NONE
32+
stdout_syslog=true
33+
stderr_logfile=NONE
34+
stderr_syslog=true
2935

3036
[program:stpmgrd]
3137
command=/usr/bin/stpmgrd
3238
priority=3
3339
autostart=false
3440
autorestart=false
35-
stdout_logfile=syslog
36-
stderr_logfile=syslog
41+
stdout_logfile=NONE
42+
stdout_syslog=true
43+
stderr_logfile=NONE
44+
stderr_syslog=true

files/build_templates/init_cfg.json.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
{%- if include_dhcp_server == "y" %}{% do features.append(("dhcp_server", "disabled", false, "enabled")) %}{% endif %}
7878
{%- if sonic_asic_platform == "vs" %}{% do features.append(("gbsyncd", "enabled", false, "enabled")) %}{% endif %}
7979
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
80+
{%- if include_stp == "y" %}{% do features.append(("stp", "disabled", false, "enabled")) %}{% endif %}
8081
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
8182
{%- if include_mux == "y" %}{% do features.append(("mux", "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}", false, "enabled")) %}{% endif %}
8283
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}

files/build_templates/stp.service.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Unit]
22
Description=STP container
3-
Requires=updategraph.service swss.service
4-
After=updategraph.service swss.service syncd.service
3+
Requires=config-setup.service swss.service
4+
After=config-setup.service swss.service syncd.service
55
Before=ntp-config.service
66
BindsTo=sonic.target
77
After=sonic.target

files/image_config/copp/copp_cfg.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@
106106
"trap_ids": "lldp",
107107
"trap_group": "queue4_group3"
108108
},
109+
"stp": {
110+
"trap_ids": "stp,pvrst",
111+
"trap_group": "queue4_group3"
112+
},
109113
"dhcp_relay": {
110114
"trap_ids": "dhcp,dhcpv6",
111115
"trap_group": "queue4_group3"

marvell-docs/SONIC/releases/release-notes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515
## New Features
1616

17-
*(None yet.)*
17+
- **PVST support** — PVST is now fully functional:
18+
- **`src/sonic-stp`:** correct VLAN for untagged PVST BPDUs, consistent IPC struct packing, and interface/socket error handling.
19+
- **`src/sonic-swss`:** ebtables→nft filtering for PVST, `proto_mode` in `STP_IPC_MSG`, and stpmgr fixes.
20+
- **`src/sonic-utilities`:** correct STP table name and mode keyword in CLI handlers, plus added test coverage.
21+
- **`sonic-buildimage`:** build/docker updates to bring up the STP service.
1822

1923
## Known Issues
2024

src/sonic-swss

0 commit comments

Comments
 (0)