diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 975769a50566..9aea98abf97a 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -19,4 +19,8 @@ jobs: - uses: actions/checkout@v3 - run: semgrep ci env: - SEMGREP_RULES: p/default + SEMGREP_RULES: | + p/default + r/python.lang.security.audit.dangerous-system-call-audit.dangerous-system-call-audit + r/c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn + r/c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn diff --git a/.gitignore b/.gitignore index 771f84d72f0b..855e940c6892 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ fsroot/ fs.* target/ *.deb +*.udeb *.changes *.buildinfo *.tar @@ -28,8 +29,13 @@ sonic-slave*/*.log # Autogenerated Dockerfiles sonic-slave*/Dockerfile sonic-slave*/Dockerfile.user +sonic-slave*/Dockerfile.cleanup dockers/*/Dockerfile +dockers/*/Dockerfile.cleanup +dockers/*/Dockerfile-dbg.cleanup platform/*/docker-*/Dockerfile +platform/*/docker-*/Dockerfile.cleanup +platform/*/docker-*/Dockerfile-dbg.cleanup # Autogenerated manifest files dockers/*/*manifest* diff --git a/Makefile.cache b/Makefile.cache index 2d9858d44a84..909f32910760 100644 --- a/Makefile.cache +++ b/Makefile.cache @@ -295,10 +295,12 @@ define SAVE_INTO_CACHE echo "Target $(1) dependencies are modifed - global save cache skipped" >> $($(1)_DST_PATH)/$(1).log $(eval $(1)_CACHE_DIR := $(SONIC_DPKG_LOCAL_CACHE_DIR)) ) - $($(1)_CACHE_USER) tar -C $($(1)_BASE_PATH) -mczvf $($(1)_CACHE_DIR)/$(MOD_CACHE_FILE) $(2) $(addprefix $($(1)_DST_PATH)/,$($(1)_DERIVED_DEBS) $($(1)_EXTRA_DEBS) ) \ + cp $($(1)_DST_PATH)/$(1).log $($(1)_DST_PATH)/$(1).cached.log + $($(1)_CACHE_USER) tar -C $($(1)_BASE_PATH) -mczvf $($(1)_CACHE_DIR)/$(MOD_CACHE_FILE) $(2) $(addprefix $($(1)_DST_PATH)/,$($(1)_DERIVED_DEBS) $($(1)_EXTRA_DEBS) $(1).cached.log) \ 1>>$($(1)_DST_PATH)/$(1).log sudo chmod 777 $($(1)_CACHE_DIR)/$(MOD_CACHE_FILE) - + rm -f $($(1)_DST_PATH)/$(1).cached.log + echo "File $($(1)_CACHE_DIR)/$(MOD_CACHE_FILE) saved in cache " >> $($(1)_DST_PATH)/$(1).log echo "[ CACHE::SAVED ] $($(1)_CACHE_DIR)/$(MOD_CACHE_FILE)" >> $($(1)_DST_PATH)/$(1).log diff --git a/build_debian.sh b/build_debian.sh index b9dfd47bb5a4..4b0504b40b52 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -393,8 +393,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in python-is-python3 \ cron \ libprotobuf32 \ - libgrpc++1 \ libgrpc29 \ + libgrpc++1.51 \ haveged \ fdisk \ gpg \ diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_monitor_config.json b/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_monitor_config.json index 653b25d1e276..725eb9df5ea7 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 10 } } diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_port_config.ini b/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_port_config.ini index f9a60d04e5ea..1ffb084a1334 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800_sup/Arista-7804R3-FM/fabric_port_config.ini @@ -1,193 +1,193 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False -Fabric112 112 False -Fabric113 113 False -Fabric114 114 False -Fabric115 115 False -Fabric116 116 False -Fabric117 117 False -Fabric118 118 False -Fabric119 119 False -Fabric120 120 False -Fabric121 121 False -Fabric122 122 False -Fabric123 123 False -Fabric124 124 False -Fabric125 125 False -Fabric126 126 False -Fabric127 127 False -Fabric128 128 False -Fabric129 129 False -Fabric130 130 False -Fabric131 131 False -Fabric132 132 False -Fabric133 133 False -Fabric134 134 False -Fabric135 135 False -Fabric136 136 False -Fabric137 137 False -Fabric138 138 False -Fabric139 139 False -Fabric140 140 False -Fabric141 141 False -Fabric142 142 False -Fabric143 143 False -Fabric144 144 False -Fabric145 145 False -Fabric146 146 False -Fabric147 147 False -Fabric148 148 False -Fabric149 149 False -Fabric150 150 False -Fabric151 151 False -Fabric152 152 False -Fabric153 153 False -Fabric154 154 False -Fabric155 155 False -Fabric156 156 False -Fabric157 157 False -Fabric158 158 False -Fabric159 159 False -Fabric160 160 False -Fabric161 161 False -Fabric162 162 False -Fabric163 163 False -Fabric164 164 False -Fabric165 165 False -Fabric166 166 False -Fabric167 167 False -Fabric168 168 False -Fabric169 169 False -Fabric170 170 False -Fabric171 171 False -Fabric172 172 False -Fabric173 173 False -Fabric174 174 False -Fabric175 175 False -Fabric176 176 False -Fabric177 177 False -Fabric178 178 False -Fabric179 179 False -Fabric180 180 False -Fabric181 181 False -Fabric182 182 False -Fabric183 183 False -Fabric184 184 False -Fabric185 185 False -Fabric186 186 False -Fabric187 187 False -Fabric188 188 False -Fabric189 189 False -Fabric190 190 False -Fabric191 191 False +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 +Fabric112 112 False 0 +Fabric113 113 False 0 +Fabric114 114 False 0 +Fabric115 115 False 0 +Fabric116 116 False 0 +Fabric117 117 False 0 +Fabric118 118 False 0 +Fabric119 119 False 0 +Fabric120 120 False 0 +Fabric121 121 False 0 +Fabric122 122 False 0 +Fabric123 123 False 0 +Fabric124 124 False 0 +Fabric125 125 False 0 +Fabric126 126 False 0 +Fabric127 127 False 0 +Fabric128 128 False 0 +Fabric129 129 False 0 +Fabric130 130 False 0 +Fabric131 131 False 0 +Fabric132 132 False 0 +Fabric133 133 False 0 +Fabric134 134 False 0 +Fabric135 135 False 0 +Fabric136 136 False 0 +Fabric137 137 False 0 +Fabric138 138 False 0 +Fabric139 139 False 0 +Fabric140 140 False 0 +Fabric141 141 False 0 +Fabric142 142 False 0 +Fabric143 143 False 0 +Fabric144 144 False 0 +Fabric145 145 False 0 +Fabric146 146 False 0 +Fabric147 147 False 0 +Fabric148 148 False 0 +Fabric149 149 False 0 +Fabric150 150 False 0 +Fabric151 151 False 0 +Fabric152 152 False 0 +Fabric153 153 False 0 +Fabric154 154 False 0 +Fabric155 155 False 0 +Fabric156 156 False 0 +Fabric157 157 False 0 +Fabric158 158 False 0 +Fabric159 159 False 0 +Fabric160 160 False 0 +Fabric161 161 False 0 +Fabric162 162 False 0 +Fabric163 163 False 0 +Fabric164 164 False 0 +Fabric165 165 False 0 +Fabric166 166 False 0 +Fabric167 167 False 0 +Fabric168 168 False 0 +Fabric169 169 False 0 +Fabric170 170 False 0 +Fabric171 171 False 0 +Fabric172 172 False 0 +Fabric173 173 False 0 +Fabric174 174 False 0 +Fabric175 175 False 0 +Fabric176 176 False 0 +Fabric177 177 False 0 +Fabric178 178 False 0 +Fabric179 179 False 0 +Fabric180 180 False 0 +Fabric181 181 False 0 +Fabric182 182 False 0 +Fabric183 183 False 0 +Fabric184 184 False 0 +Fabric185 185 False 0 +Fabric186 186 False 0 +Fabric187 187 False 0 +Fabric188 188 False 0 +Fabric189 189 False 0 +Fabric190 190 False 0 +Fabric191 191 False 0 diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_monitor_config.json b/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_monitor_config.json index 653b25d1e276..725eb9df5ea7 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 10 } } diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_port_config.ini b/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_port_config.ini index f9a60d04e5ea..e69de29bb2d1 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800_sup/Arista-7808R3-FM/fabric_port_config.ini @@ -1,193 +0,0 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False -Fabric112 112 False -Fabric113 113 False -Fabric114 114 False -Fabric115 115 False -Fabric116 116 False -Fabric117 117 False -Fabric118 118 False -Fabric119 119 False -Fabric120 120 False -Fabric121 121 False -Fabric122 122 False -Fabric123 123 False -Fabric124 124 False -Fabric125 125 False -Fabric126 126 False -Fabric127 127 False -Fabric128 128 False -Fabric129 129 False -Fabric130 130 False -Fabric131 131 False -Fabric132 132 False -Fabric133 133 False -Fabric134 134 False -Fabric135 135 False -Fabric136 136 False -Fabric137 137 False -Fabric138 138 False -Fabric139 139 False -Fabric140 140 False -Fabric141 141 False -Fabric142 142 False -Fabric143 143 False -Fabric144 144 False -Fabric145 145 False -Fabric146 146 False -Fabric147 147 False -Fabric148 148 False -Fabric149 149 False -Fabric150 150 False -Fabric151 151 False -Fabric152 152 False -Fabric153 153 False -Fabric154 154 False -Fabric155 155 False -Fabric156 156 False -Fabric157 157 False -Fabric158 158 False -Fabric159 159 False -Fabric160 160 False -Fabric161 161 False -Fabric162 162 False -Fabric163 163 False -Fabric164 164 False -Fabric165 165 False -Fabric166 166 False -Fabric167 167 False -Fabric168 168 False -Fabric169 169 False -Fabric170 170 False -Fabric171 171 False -Fabric172 172 False -Fabric173 173 False -Fabric174 174 False -Fabric175 175 False -Fabric176 176 False -Fabric177 177 False -Fabric178 178 False -Fabric179 179 False -Fabric180 180 False -Fabric181 181 False -Fabric182 182 False -Fabric183 183 False -Fabric184 184 False -Fabric185 185 False -Fabric186 186 False -Fabric187 187 False -Fabric188 188 False -Fabric189 189 False -Fabric190 190 False -Fabric191 191 False diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_monitor_config.json b/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_monitor_config.json index 653b25d1e276..725eb9df5ea7 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 10 } } diff --git a/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_port_config.ini b/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_port_config.ini index f9a60d04e5ea..1ffb084a1334 100644 --- a/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800_sup/Arista-7808R3A-FM/fabric_port_config.ini @@ -1,193 +1,193 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False -Fabric112 112 False -Fabric113 113 False -Fabric114 114 False -Fabric115 115 False -Fabric116 116 False -Fabric117 117 False -Fabric118 118 False -Fabric119 119 False -Fabric120 120 False -Fabric121 121 False -Fabric122 122 False -Fabric123 123 False -Fabric124 124 False -Fabric125 125 False -Fabric126 126 False -Fabric127 127 False -Fabric128 128 False -Fabric129 129 False -Fabric130 130 False -Fabric131 131 False -Fabric132 132 False -Fabric133 133 False -Fabric134 134 False -Fabric135 135 False -Fabric136 136 False -Fabric137 137 False -Fabric138 138 False -Fabric139 139 False -Fabric140 140 False -Fabric141 141 False -Fabric142 142 False -Fabric143 143 False -Fabric144 144 False -Fabric145 145 False -Fabric146 146 False -Fabric147 147 False -Fabric148 148 False -Fabric149 149 False -Fabric150 150 False -Fabric151 151 False -Fabric152 152 False -Fabric153 153 False -Fabric154 154 False -Fabric155 155 False -Fabric156 156 False -Fabric157 157 False -Fabric158 158 False -Fabric159 159 False -Fabric160 160 False -Fabric161 161 False -Fabric162 162 False -Fabric163 163 False -Fabric164 164 False -Fabric165 165 False -Fabric166 166 False -Fabric167 167 False -Fabric168 168 False -Fabric169 169 False -Fabric170 170 False -Fabric171 171 False -Fabric172 172 False -Fabric173 173 False -Fabric174 174 False -Fabric175 175 False -Fabric176 176 False -Fabric177 177 False -Fabric178 178 False -Fabric179 179 False -Fabric180 180 False -Fabric181 181 False -Fabric182 182 False -Fabric183 183 False -Fabric184 184 False -Fabric185 185 False -Fabric186 186 False -Fabric187 187 False -Fabric188 188 False -Fabric189 189 False -Fabric190 190 False -Fabric191 191 False +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 +Fabric112 112 False 0 +Fabric113 113 False 0 +Fabric114 114 False 0 +Fabric115 115 False 0 +Fabric116 116 False 0 +Fabric117 117 False 0 +Fabric118 118 False 0 +Fabric119 119 False 0 +Fabric120 120 False 0 +Fabric121 121 False 0 +Fabric122 122 False 0 +Fabric123 123 False 0 +Fabric124 124 False 0 +Fabric125 125 False 0 +Fabric126 126 False 0 +Fabric127 127 False 0 +Fabric128 128 False 0 +Fabric129 129 False 0 +Fabric130 130 False 0 +Fabric131 131 False 0 +Fabric132 132 False 0 +Fabric133 133 False 0 +Fabric134 134 False 0 +Fabric135 135 False 0 +Fabric136 136 False 0 +Fabric137 137 False 0 +Fabric138 138 False 0 +Fabric139 139 False 0 +Fabric140 140 False 0 +Fabric141 141 False 0 +Fabric142 142 False 0 +Fabric143 143 False 0 +Fabric144 144 False 0 +Fabric145 145 False 0 +Fabric146 146 False 0 +Fabric147 147 False 0 +Fabric148 148 False 0 +Fabric149 149 False 0 +Fabric150 150 False 0 +Fabric151 151 False 0 +Fabric152 152 False 0 +Fabric153 153 False 0 +Fabric154 154 False 0 +Fabric155 155 False 0 +Fabric156 156 False 0 +Fabric157 157 False 0 +Fabric158 158 False 0 +Fabric159 159 False 0 +Fabric160 160 False 0 +Fabric161 161 False 0 +Fabric162 162 False 0 +Fabric163 163 False 0 +Fabric164 164 False 0 +Fabric165 165 False 0 +Fabric166 166 False 0 +Fabric167 167 False 0 +Fabric168 168 False 0 +Fabric169 169 False 0 +Fabric170 170 False 0 +Fabric171 171 False 0 +Fabric172 172 False 0 +Fabric173 173 False 0 +Fabric174 174 False 0 +Fabric175 175 False 0 +Fabric176 176 False 0 +Fabric177 177 False 0 +Fabric178 178 False 0 +Fabric179 179 False 0 +Fabric180 180 False 0 +Fabric181 181 False 0 +Fabric182 182 False 0 +Fabric183 183 False 0 +Fabric184 184 False 0 +Fabric185 185 False 0 +Fabric186 186 False 0 +Fabric187 187 False 0 +Fabric188 188 False 0 +Fabric189 189 False 0 +Fabric190 190 False 0 +Fabric191 191 False 0 diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_monitor_config.json index 653b25d1e276..94def242e55d 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 86 } } diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_port_config.ini b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_port_config.ini index e07e256dc169..3aebf8a46ed6 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_port_config.ini @@ -1,113 +1,113 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3_48cq2_lc/fabric_monitor_config.json index 653b25d1e276..94def242e55d 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 86 } } diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_monitor_config.json index 653b25d1e276..94def242e55d 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 86 } } diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_port_config.ini b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_port_config.ini index e07e256dc169..3aebf8a46ed6 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/fabric_port_config.ini @@ -1,113 +1,113 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/fabric_monitor_config.json index 653b25d1e276..94def242e55d 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 86 } } diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/j2p-a7800r3a-36d-36x400G.config.bcm b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/j2p-a7800r3a-36d-36x400G.config.bcm index cc7d79bc2a88..5ece4f833fc4 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/j2p-a7800r3a-36d-36x400G.config.bcm +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/1/j2p-a7800r3a-36d-36x400G.config.bcm @@ -453,17 +453,17 @@ fabric_connect_mode=FE fabric_logical_port_base=512 # Fabric lane mapping -lane_to_serdes_map_fabric_lane0=rx0:tx0 +lane_to_serdes_map_fabric_lane0=rx0:tx3 lane_to_serdes_map_fabric_lane1=rx1:tx1 lane_to_serdes_map_fabric_lane2=rx2:tx2 -lane_to_serdes_map_fabric_lane3=rx3:tx3 +lane_to_serdes_map_fabric_lane3=rx3:tx0 lane_to_serdes_map_fabric_lane4=rx4:tx4 lane_to_serdes_map_fabric_lane5=rx5:tx5 lane_to_serdes_map_fabric_lane6=rx6:tx6 lane_to_serdes_map_fabric_lane7=rx7:tx7 -lane_to_serdes_map_fabric_lane8=rx8:tx10 +lane_to_serdes_map_fabric_lane8=rx8:tx9 lane_to_serdes_map_fabric_lane9=rx9:tx11 -lane_to_serdes_map_fabric_lane10=rx10:tx9 +lane_to_serdes_map_fabric_lane10=rx10:tx10 lane_to_serdes_map_fabric_lane11=rx11:tx8 lane_to_serdes_map_fabric_lane12=rx12:tx12 lane_to_serdes_map_fabric_lane13=rx13:tx15 @@ -475,15 +475,15 @@ lane_to_serdes_map_fabric_lane18=rx18:tx16 lane_to_serdes_map_fabric_lane19=rx19:tx19 lane_to_serdes_map_fabric_lane20=rx20:tx21 lane_to_serdes_map_fabric_lane21=rx21:tx23 -lane_to_serdes_map_fabric_lane22=rx22:tx20 -lane_to_serdes_map_fabric_lane23=rx23:tx22 -lane_to_serdes_map_fabric_lane24=rx24:tx26 +lane_to_serdes_map_fabric_lane22=rx22:tx22 +lane_to_serdes_map_fabric_lane23=rx23:tx20 +lane_to_serdes_map_fabric_lane24=rx24:tx25 lane_to_serdes_map_fabric_lane25=rx25:tx24 -lane_to_serdes_map_fabric_lane26=rx26:tx25 -lane_to_serdes_map_fabric_lane27=rx27:tx27 +lane_to_serdes_map_fabric_lane26=rx26:tx27 +lane_to_serdes_map_fabric_lane27=rx27:tx26 lane_to_serdes_map_fabric_lane28=rx28:tx31 -lane_to_serdes_map_fabric_lane29=rx29:tx30 -lane_to_serdes_map_fabric_lane30=rx30:tx29 +lane_to_serdes_map_fabric_lane29=rx29:tx29 +lane_to_serdes_map_fabric_lane30=rx30:tx30 lane_to_serdes_map_fabric_lane31=rx31:tx28 lane_to_serdes_map_fabric_lane32=rx32:tx32 lane_to_serdes_map_fabric_lane33=rx33:tx33 @@ -522,17 +522,17 @@ lane_to_serdes_map_fabric_lane65=rx65:tx65 lane_to_serdes_map_fabric_lane66=rx66:tx66 lane_to_serdes_map_fabric_lane67=rx67:tx67 lane_to_serdes_map_fabric_lane68=rx68:tx68 -lane_to_serdes_map_fabric_lane69=rx69:tx69 -lane_to_serdes_map_fabric_lane70=rx70:tx70 -lane_to_serdes_map_fabric_lane71=rx71:tx71 +lane_to_serdes_map_fabric_lane69=rx69:tx70 +lane_to_serdes_map_fabric_lane70=rx70:tx71 +lane_to_serdes_map_fabric_lane71=rx71:tx69 lane_to_serdes_map_fabric_lane72=rx72:tx75 lane_to_serdes_map_fabric_lane73=rx73:tx74 lane_to_serdes_map_fabric_lane74=rx74:tx73 lane_to_serdes_map_fabric_lane75=rx75:tx72 -lane_to_serdes_map_fabric_lane76=rx76:tx79 +lane_to_serdes_map_fabric_lane76=rx76:tx76 lane_to_serdes_map_fabric_lane77=rx77:tx78 lane_to_serdes_map_fabric_lane78=rx78:tx77 -lane_to_serdes_map_fabric_lane79=rx79:tx76 +lane_to_serdes_map_fabric_lane79=rx79:tx79 lane_to_serdes_map_fabric_lane80=rx80:tx80 lane_to_serdes_map_fabric_lane81=rx81:tx81 lane_to_serdes_map_fabric_lane82=rx82:tx83 @@ -543,11 +543,11 @@ lane_to_serdes_map_fabric_lane86=rx86:tx84 lane_to_serdes_map_fabric_lane87=rx87:tx87 lane_to_serdes_map_fabric_lane88=rx88:tx90 lane_to_serdes_map_fabric_lane89=rx89:tx88 -lane_to_serdes_map_fabric_lane90=rx90:tx91 -lane_to_serdes_map_fabric_lane91=rx91:tx89 +lane_to_serdes_map_fabric_lane90=rx90:tx89 +lane_to_serdes_map_fabric_lane91=rx91:tx91 lane_to_serdes_map_fabric_lane92=rx92:tx93 -lane_to_serdes_map_fabric_lane93=rx93:tx92 -lane_to_serdes_map_fabric_lane94=rx94:tx94 +lane_to_serdes_map_fabric_lane93=rx93:tx94 +lane_to_serdes_map_fabric_lane94=rx94:tx92 lane_to_serdes_map_fabric_lane95=rx95:tx95 lane_to_serdes_map_fabric_lane96=rx96:tx96 lane_to_serdes_map_fabric_lane97=rx97:tx97 @@ -557,30 +557,30 @@ lane_to_serdes_map_fabric_lane100=rx100:tx100 lane_to_serdes_map_fabric_lane101=rx101:tx101 lane_to_serdes_map_fabric_lane102=rx102:tx102 lane_to_serdes_map_fabric_lane103=rx103:tx103 -lane_to_serdes_map_fabric_lane104=rx104:tx105 -lane_to_serdes_map_fabric_lane105=rx105:tx106 -lane_to_serdes_map_fabric_lane106=rx106:tx107 -lane_to_serdes_map_fabric_lane107=rx107:tx104 -lane_to_serdes_map_fabric_lane108=rx108:tx111 +lane_to_serdes_map_fabric_lane104=rx104:tx104 +lane_to_serdes_map_fabric_lane105=rx105:tx107 +lane_to_serdes_map_fabric_lane106=rx106:tx106 +lane_to_serdes_map_fabric_lane107=rx107:tx105 +lane_to_serdes_map_fabric_lane108=rx108:tx108 lane_to_serdes_map_fabric_lane109=rx109:tx109 lane_to_serdes_map_fabric_lane110=rx110:tx110 -lane_to_serdes_map_fabric_lane111=rx111:tx108 -lane_to_serdes_map_fabric_lane112=rx112:tx114 -lane_to_serdes_map_fabric_lane113=rx113:tx113 +lane_to_serdes_map_fabric_lane111=rx111:tx111 +lane_to_serdes_map_fabric_lane112=rx112:tx115 +lane_to_serdes_map_fabric_lane113=rx113:tx114 lane_to_serdes_map_fabric_lane114=rx114:tx112 -lane_to_serdes_map_fabric_lane115=rx115:tx115 -lane_to_serdes_map_fabric_lane116=rx116:tx117 -lane_to_serdes_map_fabric_lane117=rx117:tx116 -lane_to_serdes_map_fabric_lane118=rx118:tx119 -lane_to_serdes_map_fabric_lane119=rx119:tx118 -lane_to_serdes_map_fabric_lane120=rx120:tx123 -lane_to_serdes_map_fabric_lane121=rx121:tx120 -lane_to_serdes_map_fabric_lane122=rx122:tx122 -lane_to_serdes_map_fabric_lane123=rx123:tx121 -lane_to_serdes_map_fabric_lane124=rx124:tx127 -lane_to_serdes_map_fabric_lane125=rx125:tx125 -lane_to_serdes_map_fabric_lane126=rx126:tx124 -lane_to_serdes_map_fabric_lane127=rx127:tx126 +lane_to_serdes_map_fabric_lane115=rx115:tx113 +lane_to_serdes_map_fabric_lane116=rx116:tx118 +lane_to_serdes_map_fabric_lane117=rx117:tx119 +lane_to_serdes_map_fabric_lane118=rx118:tx116 +lane_to_serdes_map_fabric_lane119=rx119:tx117 +lane_to_serdes_map_fabric_lane120=rx120:tx121 +lane_to_serdes_map_fabric_lane121=rx121:tx122 +lane_to_serdes_map_fabric_lane122=rx122:tx120 +lane_to_serdes_map_fabric_lane123=rx123:tx123 +lane_to_serdes_map_fabric_lane124=rx124:tx124 +lane_to_serdes_map_fabric_lane125=rx125:tx127 +lane_to_serdes_map_fabric_lane126=rx126:tx126 +lane_to_serdes_map_fabric_lane127=rx127:tx125 lane_to_serdes_map_fabric_lane128=rx128:tx128 lane_to_serdes_map_fabric_lane129=rx129:tx129 lane_to_serdes_map_fabric_lane130=rx130:tx130 @@ -593,12 +593,12 @@ lane_to_serdes_map_fabric_lane136=rx136:tx139 lane_to_serdes_map_fabric_lane137=rx137:tx138 lane_to_serdes_map_fabric_lane138=rx138:tx137 lane_to_serdes_map_fabric_lane139=rx139:tx136 -lane_to_serdes_map_fabric_lane140=rx140:tx140 +lane_to_serdes_map_fabric_lane140=rx140:tx143 lane_to_serdes_map_fabric_lane141=rx141:tx142 lane_to_serdes_map_fabric_lane142=rx142:tx141 -lane_to_serdes_map_fabric_lane143=rx143:tx143 -lane_to_serdes_map_fabric_lane144=rx144:tx144 -lane_to_serdes_map_fabric_lane145=rx145:tx145 +lane_to_serdes_map_fabric_lane143=rx143:tx140 +lane_to_serdes_map_fabric_lane144=rx144:tx145 +lane_to_serdes_map_fabric_lane145=rx145:tx144 lane_to_serdes_map_fabric_lane146=rx146:tx146 lane_to_serdes_map_fabric_lane147=rx147:tx147 lane_to_serdes_map_fabric_lane148=rx148:tx148 @@ -614,8 +614,8 @@ lane_to_serdes_map_fabric_lane157=rx157:tx158 lane_to_serdes_map_fabric_lane158=rx158:tx157 lane_to_serdes_map_fabric_lane159=rx159:tx156 lane_to_serdes_map_fabric_lane160=rx160:tx160 -lane_to_serdes_map_fabric_lane161=rx161:tx161 -lane_to_serdes_map_fabric_lane162=rx162:tx162 +lane_to_serdes_map_fabric_lane161=rx161:tx162 +lane_to_serdes_map_fabric_lane162=rx162:tx161 lane_to_serdes_map_fabric_lane163=rx163:tx163 lane_to_serdes_map_fabric_lane164=rx164:tx164 lane_to_serdes_map_fabric_lane165=rx165:tx165 @@ -639,11 +639,11 @@ lane_to_serdes_map_fabric_lane182=rx182:tx180 lane_to_serdes_map_fabric_lane183=rx183:tx183 lane_to_serdes_map_fabric_lane184=rx184:tx186 lane_to_serdes_map_fabric_lane185=rx185:tx184 -lane_to_serdes_map_fabric_lane186=rx186:tx185 -lane_to_serdes_map_fabric_lane187=rx187:tx187 -lane_to_serdes_map_fabric_lane188=rx188:tx188 +lane_to_serdes_map_fabric_lane186=rx186:tx187 +lane_to_serdes_map_fabric_lane187=rx187:tx185 +lane_to_serdes_map_fabric_lane188=rx188:tx190 lane_to_serdes_map_fabric_lane189=rx189:tx189 -lane_to_serdes_map_fabric_lane190=rx190:tx190 +lane_to_serdes_map_fabric_lane190=rx190:tx188 lane_to_serdes_map_fabric_lane191=rx191:tx191 # diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_monitor_config.json new file mode 100644 index 000000000000..0f67504caa61 --- /dev/null +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_monitor_config.json @@ -0,0 +1,9 @@ +{ + "FABRIC_MONITOR_DATA": { + "monErrThreshCrcCells": 1, + "monErrThreshRxCells": 61035156, + "monPollThreshRecovery": 8, + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 100 + } +} diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_port_config.ini new file mode 100644 index 000000000000..1ffb084a1334 --- /dev/null +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C36/fabric_port_config.ini @@ -0,0 +1,193 @@ +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 +Fabric112 112 False 0 +Fabric113 113 False 0 +Fabric114 114 False 0 +Fabric115 115 False 0 +Fabric116 116 False 0 +Fabric117 117 False 0 +Fabric118 118 False 0 +Fabric119 119 False 0 +Fabric120 120 False 0 +Fabric121 121 False 0 +Fabric122 122 False 0 +Fabric123 123 False 0 +Fabric124 124 False 0 +Fabric125 125 False 0 +Fabric126 126 False 0 +Fabric127 127 False 0 +Fabric128 128 False 0 +Fabric129 129 False 0 +Fabric130 130 False 0 +Fabric131 131 False 0 +Fabric132 132 False 0 +Fabric133 133 False 0 +Fabric134 134 False 0 +Fabric135 135 False 0 +Fabric136 136 False 0 +Fabric137 137 False 0 +Fabric138 138 False 0 +Fabric139 139 False 0 +Fabric140 140 False 0 +Fabric141 141 False 0 +Fabric142 142 False 0 +Fabric143 143 False 0 +Fabric144 144 False 0 +Fabric145 145 False 0 +Fabric146 146 False 0 +Fabric147 147 False 0 +Fabric148 148 False 0 +Fabric149 149 False 0 +Fabric150 150 False 0 +Fabric151 151 False 0 +Fabric152 152 False 0 +Fabric153 153 False 0 +Fabric154 154 False 0 +Fabric155 155 False 0 +Fabric156 156 False 0 +Fabric157 157 False 0 +Fabric158 158 False 0 +Fabric159 159 False 0 +Fabric160 160 False 0 +Fabric161 161 False 0 +Fabric162 162 False 0 +Fabric163 163 False 0 +Fabric164 164 False 0 +Fabric165 165 False 0 +Fabric166 166 False 0 +Fabric167 167 False 0 +Fabric168 168 False 0 +Fabric169 169 False 0 +Fabric170 170 False 0 +Fabric171 171 False 0 +Fabric172 172 False 0 +Fabric173 173 False 0 +Fabric174 174 False 0 +Fabric175 175 False 0 +Fabric176 176 False 0 +Fabric177 177 False 0 +Fabric178 178 False 0 +Fabric179 179 False 0 +Fabric180 180 False 0 +Fabric181 181 False 0 +Fabric182 182 False 0 +Fabric183 183 False 0 +Fabric184 184 False 0 +Fabric185 185 False 0 +Fabric186 186 False 0 +Fabric187 187 False 0 +Fabric188 188 False 0 +Fabric189 189 False 0 +Fabric190 190 False 0 +Fabric191 191 False 0 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/j2p-a7800r3a-36d-36x400G.config.bcm b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/j2p-a7800r3a-36d-36x400G.config.bcm index 97a58f37acda..ed7d23113add 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/j2p-a7800r3a-36d-36x400G.config.bcm +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/1/j2p-a7800r3a-36d-36x400G.config.bcm @@ -471,17 +471,17 @@ fabric_connect_mode=FE fabric_logical_port_base=512 # Fabric lane mapping -lane_to_serdes_map_fabric_lane0=rx0:tx0 +lane_to_serdes_map_fabric_lane0=rx0:tx3 lane_to_serdes_map_fabric_lane1=rx1:tx1 lane_to_serdes_map_fabric_lane2=rx2:tx2 -lane_to_serdes_map_fabric_lane3=rx3:tx3 +lane_to_serdes_map_fabric_lane3=rx3:tx0 lane_to_serdes_map_fabric_lane4=rx4:tx4 lane_to_serdes_map_fabric_lane5=rx5:tx5 lane_to_serdes_map_fabric_lane6=rx6:tx6 lane_to_serdes_map_fabric_lane7=rx7:tx7 -lane_to_serdes_map_fabric_lane8=rx8:tx10 +lane_to_serdes_map_fabric_lane8=rx8:tx9 lane_to_serdes_map_fabric_lane9=rx9:tx11 -lane_to_serdes_map_fabric_lane10=rx10:tx9 +lane_to_serdes_map_fabric_lane10=rx10:tx10 lane_to_serdes_map_fabric_lane11=rx11:tx8 lane_to_serdes_map_fabric_lane12=rx12:tx12 lane_to_serdes_map_fabric_lane13=rx13:tx15 @@ -493,15 +493,15 @@ lane_to_serdes_map_fabric_lane18=rx18:tx16 lane_to_serdes_map_fabric_lane19=rx19:tx19 lane_to_serdes_map_fabric_lane20=rx20:tx21 lane_to_serdes_map_fabric_lane21=rx21:tx23 -lane_to_serdes_map_fabric_lane22=rx22:tx20 -lane_to_serdes_map_fabric_lane23=rx23:tx22 -lane_to_serdes_map_fabric_lane24=rx24:tx26 +lane_to_serdes_map_fabric_lane22=rx22:tx22 +lane_to_serdes_map_fabric_lane23=rx23:tx20 +lane_to_serdes_map_fabric_lane24=rx24:tx25 lane_to_serdes_map_fabric_lane25=rx25:tx24 -lane_to_serdes_map_fabric_lane26=rx26:tx25 -lane_to_serdes_map_fabric_lane27=rx27:tx27 +lane_to_serdes_map_fabric_lane26=rx26:tx27 +lane_to_serdes_map_fabric_lane27=rx27:tx26 lane_to_serdes_map_fabric_lane28=rx28:tx31 -lane_to_serdes_map_fabric_lane29=rx29:tx30 -lane_to_serdes_map_fabric_lane30=rx30:tx29 +lane_to_serdes_map_fabric_lane29=rx29:tx29 +lane_to_serdes_map_fabric_lane30=rx30:tx30 lane_to_serdes_map_fabric_lane31=rx31:tx28 lane_to_serdes_map_fabric_lane32=rx32:tx32 lane_to_serdes_map_fabric_lane33=rx33:tx33 @@ -540,17 +540,17 @@ lane_to_serdes_map_fabric_lane65=rx65:tx65 lane_to_serdes_map_fabric_lane66=rx66:tx66 lane_to_serdes_map_fabric_lane67=rx67:tx67 lane_to_serdes_map_fabric_lane68=rx68:tx68 -lane_to_serdes_map_fabric_lane69=rx69:tx69 -lane_to_serdes_map_fabric_lane70=rx70:tx70 -lane_to_serdes_map_fabric_lane71=rx71:tx71 +lane_to_serdes_map_fabric_lane69=rx69:tx70 +lane_to_serdes_map_fabric_lane70=rx70:tx71 +lane_to_serdes_map_fabric_lane71=rx71:tx69 lane_to_serdes_map_fabric_lane72=rx72:tx75 lane_to_serdes_map_fabric_lane73=rx73:tx74 lane_to_serdes_map_fabric_lane74=rx74:tx73 lane_to_serdes_map_fabric_lane75=rx75:tx72 -lane_to_serdes_map_fabric_lane76=rx76:tx79 +lane_to_serdes_map_fabric_lane76=rx76:tx76 lane_to_serdes_map_fabric_lane77=rx77:tx78 lane_to_serdes_map_fabric_lane78=rx78:tx77 -lane_to_serdes_map_fabric_lane79=rx79:tx76 +lane_to_serdes_map_fabric_lane79=rx79:tx79 lane_to_serdes_map_fabric_lane80=rx80:tx80 lane_to_serdes_map_fabric_lane81=rx81:tx81 lane_to_serdes_map_fabric_lane82=rx82:tx83 @@ -561,11 +561,11 @@ lane_to_serdes_map_fabric_lane86=rx86:tx84 lane_to_serdes_map_fabric_lane87=rx87:tx87 lane_to_serdes_map_fabric_lane88=rx88:tx90 lane_to_serdes_map_fabric_lane89=rx89:tx88 -lane_to_serdes_map_fabric_lane90=rx90:tx91 -lane_to_serdes_map_fabric_lane91=rx91:tx89 +lane_to_serdes_map_fabric_lane90=rx90:tx89 +lane_to_serdes_map_fabric_lane91=rx91:tx91 lane_to_serdes_map_fabric_lane92=rx92:tx93 -lane_to_serdes_map_fabric_lane93=rx93:tx92 -lane_to_serdes_map_fabric_lane94=rx94:tx94 +lane_to_serdes_map_fabric_lane93=rx93:tx94 +lane_to_serdes_map_fabric_lane94=rx94:tx92 lane_to_serdes_map_fabric_lane95=rx95:tx95 lane_to_serdes_map_fabric_lane96=rx96:tx96 lane_to_serdes_map_fabric_lane97=rx97:tx97 @@ -575,30 +575,30 @@ lane_to_serdes_map_fabric_lane100=rx100:tx100 lane_to_serdes_map_fabric_lane101=rx101:tx101 lane_to_serdes_map_fabric_lane102=rx102:tx102 lane_to_serdes_map_fabric_lane103=rx103:tx103 -lane_to_serdes_map_fabric_lane104=rx104:tx105 -lane_to_serdes_map_fabric_lane105=rx105:tx106 -lane_to_serdes_map_fabric_lane106=rx106:tx107 -lane_to_serdes_map_fabric_lane107=rx107:tx104 -lane_to_serdes_map_fabric_lane108=rx108:tx111 +lane_to_serdes_map_fabric_lane104=rx104:tx104 +lane_to_serdes_map_fabric_lane105=rx105:tx107 +lane_to_serdes_map_fabric_lane106=rx106:tx106 +lane_to_serdes_map_fabric_lane107=rx107:tx105 +lane_to_serdes_map_fabric_lane108=rx108:tx108 lane_to_serdes_map_fabric_lane109=rx109:tx109 lane_to_serdes_map_fabric_lane110=rx110:tx110 -lane_to_serdes_map_fabric_lane111=rx111:tx108 -lane_to_serdes_map_fabric_lane112=rx112:tx114 -lane_to_serdes_map_fabric_lane113=rx113:tx113 +lane_to_serdes_map_fabric_lane111=rx111:tx111 +lane_to_serdes_map_fabric_lane112=rx112:tx115 +lane_to_serdes_map_fabric_lane113=rx113:tx114 lane_to_serdes_map_fabric_lane114=rx114:tx112 -lane_to_serdes_map_fabric_lane115=rx115:tx115 -lane_to_serdes_map_fabric_lane116=rx116:tx117 -lane_to_serdes_map_fabric_lane117=rx117:tx116 -lane_to_serdes_map_fabric_lane118=rx118:tx119 -lane_to_serdes_map_fabric_lane119=rx119:tx118 -lane_to_serdes_map_fabric_lane120=rx120:tx123 -lane_to_serdes_map_fabric_lane121=rx121:tx120 -lane_to_serdes_map_fabric_lane122=rx122:tx122 -lane_to_serdes_map_fabric_lane123=rx123:tx121 -lane_to_serdes_map_fabric_lane124=rx124:tx127 -lane_to_serdes_map_fabric_lane125=rx125:tx125 -lane_to_serdes_map_fabric_lane126=rx126:tx124 -lane_to_serdes_map_fabric_lane127=rx127:tx126 +lane_to_serdes_map_fabric_lane115=rx115:tx113 +lane_to_serdes_map_fabric_lane116=rx116:tx118 +lane_to_serdes_map_fabric_lane117=rx117:tx119 +lane_to_serdes_map_fabric_lane118=rx118:tx116 +lane_to_serdes_map_fabric_lane119=rx119:tx117 +lane_to_serdes_map_fabric_lane120=rx120:tx121 +lane_to_serdes_map_fabric_lane121=rx121:tx122 +lane_to_serdes_map_fabric_lane122=rx122:tx120 +lane_to_serdes_map_fabric_lane123=rx123:tx123 +lane_to_serdes_map_fabric_lane124=rx124:tx124 +lane_to_serdes_map_fabric_lane125=rx125:tx127 +lane_to_serdes_map_fabric_lane126=rx126:tx126 +lane_to_serdes_map_fabric_lane127=rx127:tx125 lane_to_serdes_map_fabric_lane128=rx128:tx128 lane_to_serdes_map_fabric_lane129=rx129:tx129 lane_to_serdes_map_fabric_lane130=rx130:tx130 @@ -611,12 +611,12 @@ lane_to_serdes_map_fabric_lane136=rx136:tx139 lane_to_serdes_map_fabric_lane137=rx137:tx138 lane_to_serdes_map_fabric_lane138=rx138:tx137 lane_to_serdes_map_fabric_lane139=rx139:tx136 -lane_to_serdes_map_fabric_lane140=rx140:tx140 +lane_to_serdes_map_fabric_lane140=rx140:tx143 lane_to_serdes_map_fabric_lane141=rx141:tx142 lane_to_serdes_map_fabric_lane142=rx142:tx141 -lane_to_serdes_map_fabric_lane143=rx143:tx143 -lane_to_serdes_map_fabric_lane144=rx144:tx144 -lane_to_serdes_map_fabric_lane145=rx145:tx145 +lane_to_serdes_map_fabric_lane143=rx143:tx140 +lane_to_serdes_map_fabric_lane144=rx144:tx145 +lane_to_serdes_map_fabric_lane145=rx145:tx144 lane_to_serdes_map_fabric_lane146=rx146:tx146 lane_to_serdes_map_fabric_lane147=rx147:tx147 lane_to_serdes_map_fabric_lane148=rx148:tx148 @@ -632,8 +632,8 @@ lane_to_serdes_map_fabric_lane157=rx157:tx158 lane_to_serdes_map_fabric_lane158=rx158:tx157 lane_to_serdes_map_fabric_lane159=rx159:tx156 lane_to_serdes_map_fabric_lane160=rx160:tx160 -lane_to_serdes_map_fabric_lane161=rx161:tx161 -lane_to_serdes_map_fabric_lane162=rx162:tx162 +lane_to_serdes_map_fabric_lane161=rx161:tx162 +lane_to_serdes_map_fabric_lane162=rx162:tx161 lane_to_serdes_map_fabric_lane163=rx163:tx163 lane_to_serdes_map_fabric_lane164=rx164:tx164 lane_to_serdes_map_fabric_lane165=rx165:tx165 @@ -657,11 +657,11 @@ lane_to_serdes_map_fabric_lane182=rx182:tx180 lane_to_serdes_map_fabric_lane183=rx183:tx183 lane_to_serdes_map_fabric_lane184=rx184:tx186 lane_to_serdes_map_fabric_lane185=rx185:tx184 -lane_to_serdes_map_fabric_lane186=rx186:tx185 -lane_to_serdes_map_fabric_lane187=rx187:tx187 -lane_to_serdes_map_fabric_lane188=rx188:tx188 +lane_to_serdes_map_fabric_lane186=rx186:tx187 +lane_to_serdes_map_fabric_lane187=rx187:tx185 +lane_to_serdes_map_fabric_lane188=rx188:tx190 lane_to_serdes_map_fabric_lane189=rx189:tx189 -lane_to_serdes_map_fabric_lane190=rx190:tx190 +lane_to_serdes_map_fabric_lane190=rx190:tx188 lane_to_serdes_map_fabric_lane191=rx191:tx191 # diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_monitor_config.json index 653b25d1e276..94def242e55d 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_monitor_config.json +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_monitor_config.json @@ -3,6 +3,7 @@ "monErrThreshCrcCells": 1, "monErrThreshRxCells": 61035156, "monPollThreshRecovery": 8, - "monPollThreshIsolation": 1 + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 86 } } diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_port_config.ini index f9a60d04e5ea..1ffb084a1334 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_port_config.ini +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-C72/fabric_port_config.ini @@ -1,193 +1,193 @@ -# name lanes isolateStatus -Fabric0 0 False -Fabric1 1 False -Fabric2 2 False -Fabric3 3 False -Fabric4 4 False -Fabric5 5 False -Fabric6 6 False -Fabric7 7 False -Fabric8 8 False -Fabric9 9 False -Fabric10 10 False -Fabric11 11 False -Fabric12 12 False -Fabric13 13 False -Fabric14 14 False -Fabric15 15 False -Fabric16 16 False -Fabric17 17 False -Fabric18 18 False -Fabric19 19 False -Fabric20 20 False -Fabric21 21 False -Fabric22 22 False -Fabric23 23 False -Fabric24 24 False -Fabric25 25 False -Fabric26 26 False -Fabric27 27 False -Fabric28 28 False -Fabric29 29 False -Fabric30 30 False -Fabric31 31 False -Fabric32 32 False -Fabric33 33 False -Fabric34 34 False -Fabric35 35 False -Fabric36 36 False -Fabric37 37 False -Fabric38 38 False -Fabric39 39 False -Fabric40 40 False -Fabric41 41 False -Fabric42 42 False -Fabric43 43 False -Fabric44 44 False -Fabric45 45 False -Fabric46 46 False -Fabric47 47 False -Fabric48 48 False -Fabric49 49 False -Fabric50 50 False -Fabric51 51 False -Fabric52 52 False -Fabric53 53 False -Fabric54 54 False -Fabric55 55 False -Fabric56 56 False -Fabric57 57 False -Fabric58 58 False -Fabric59 59 False -Fabric60 60 False -Fabric61 61 False -Fabric62 62 False -Fabric63 63 False -Fabric64 64 False -Fabric65 65 False -Fabric66 66 False -Fabric67 67 False -Fabric68 68 False -Fabric69 69 False -Fabric70 70 False -Fabric71 71 False -Fabric72 72 False -Fabric73 73 False -Fabric74 74 False -Fabric75 75 False -Fabric76 76 False -Fabric77 77 False -Fabric78 78 False -Fabric79 79 False -Fabric80 80 False -Fabric81 81 False -Fabric82 82 False -Fabric83 83 False -Fabric84 84 False -Fabric85 85 False -Fabric86 86 False -Fabric87 87 False -Fabric88 88 False -Fabric89 89 False -Fabric90 90 False -Fabric91 91 False -Fabric92 92 False -Fabric93 93 False -Fabric94 94 False -Fabric95 95 False -Fabric96 96 False -Fabric97 97 False -Fabric98 98 False -Fabric99 99 False -Fabric100 100 False -Fabric101 101 False -Fabric102 102 False -Fabric103 103 False -Fabric104 104 False -Fabric105 105 False -Fabric106 106 False -Fabric107 107 False -Fabric108 108 False -Fabric109 109 False -Fabric110 110 False -Fabric111 111 False -Fabric112 112 False -Fabric113 113 False -Fabric114 114 False -Fabric115 115 False -Fabric116 116 False -Fabric117 117 False -Fabric118 118 False -Fabric119 119 False -Fabric120 120 False -Fabric121 121 False -Fabric122 122 False -Fabric123 123 False -Fabric124 124 False -Fabric125 125 False -Fabric126 126 False -Fabric127 127 False -Fabric128 128 False -Fabric129 129 False -Fabric130 130 False -Fabric131 131 False -Fabric132 132 False -Fabric133 133 False -Fabric134 134 False -Fabric135 135 False -Fabric136 136 False -Fabric137 137 False -Fabric138 138 False -Fabric139 139 False -Fabric140 140 False -Fabric141 141 False -Fabric142 142 False -Fabric143 143 False -Fabric144 144 False -Fabric145 145 False -Fabric146 146 False -Fabric147 147 False -Fabric148 148 False -Fabric149 149 False -Fabric150 150 False -Fabric151 151 False -Fabric152 152 False -Fabric153 153 False -Fabric154 154 False -Fabric155 155 False -Fabric156 156 False -Fabric157 157 False -Fabric158 158 False -Fabric159 159 False -Fabric160 160 False -Fabric161 161 False -Fabric162 162 False -Fabric163 163 False -Fabric164 164 False -Fabric165 165 False -Fabric166 166 False -Fabric167 167 False -Fabric168 168 False -Fabric169 169 False -Fabric170 170 False -Fabric171 171 False -Fabric172 172 False -Fabric173 173 False -Fabric174 174 False -Fabric175 175 False -Fabric176 176 False -Fabric177 177 False -Fabric178 178 False -Fabric179 179 False -Fabric180 180 False -Fabric181 181 False -Fabric182 182 False -Fabric183 183 False -Fabric184 184 False -Fabric185 185 False -Fabric186 186 False -Fabric187 187 False -Fabric188 188 False -Fabric189 189 False -Fabric190 190 False -Fabric191 191 False +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 +Fabric112 112 False 0 +Fabric113 113 False 0 +Fabric114 114 False 0 +Fabric115 115 False 0 +Fabric116 116 False 0 +Fabric117 117 False 0 +Fabric118 118 False 0 +Fabric119 119 False 0 +Fabric120 120 False 0 +Fabric121 121 False 0 +Fabric122 122 False 0 +Fabric123 123 False 0 +Fabric124 124 False 0 +Fabric125 125 False 0 +Fabric126 126 False 0 +Fabric127 127 False 0 +Fabric128 128 False 0 +Fabric129 129 False 0 +Fabric130 130 False 0 +Fabric131 131 False 0 +Fabric132 132 False 0 +Fabric133 133 False 0 +Fabric134 134 False 0 +Fabric135 135 False 0 +Fabric136 136 False 0 +Fabric137 137 False 0 +Fabric138 138 False 0 +Fabric139 139 False 0 +Fabric140 140 False 0 +Fabric141 141 False 0 +Fabric142 142 False 0 +Fabric143 143 False 0 +Fabric144 144 False 0 +Fabric145 145 False 0 +Fabric146 146 False 0 +Fabric147 147 False 0 +Fabric148 148 False 0 +Fabric149 149 False 0 +Fabric150 150 False 0 +Fabric151 151 False 0 +Fabric152 152 False 0 +Fabric153 153 False 0 +Fabric154 154 False 0 +Fabric155 155 False 0 +Fabric156 156 False 0 +Fabric157 157 False 0 +Fabric158 158 False 0 +Fabric159 159 False 0 +Fabric160 160 False 0 +Fabric161 161 False 0 +Fabric162 162 False 0 +Fabric163 163 False 0 +Fabric164 164 False 0 +Fabric165 165 False 0 +Fabric166 166 False 0 +Fabric167 167 False 0 +Fabric168 168 False 0 +Fabric169 169 False 0 +Fabric170 170 False 0 +Fabric171 171 False 0 +Fabric172 172 False 0 +Fabric173 173 False 0 +Fabric174 174 False 0 +Fabric175 175 False 0 +Fabric176 176 False 0 +Fabric177 177 False 0 +Fabric178 178 False 0 +Fabric179 179 False 0 +Fabric180 180 False 0 +Fabric181 181 False 0 +Fabric182 182 False 0 +Fabric183 183 False 0 +Fabric184 184 False 0 +Fabric185 185 False 0 +Fabric186 186 False 0 +Fabric187 187 False 0 +Fabric188 188 False 0 +Fabric189 189 False 0 +Fabric190 190 False 0 +Fabric191 191 False 0 diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/j2p-a7800r3a-36d-36x400G.config.bcm b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/j2p-a7800r3a-36d-36x400G.config.bcm index ee9bf638a792..30b740af2ae2 100644 --- a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/j2p-a7800r3a-36d-36x400G.config.bcm +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/1/j2p-a7800r3a-36d-36x400G.config.bcm @@ -453,17 +453,17 @@ fabric_connect_mode=FE fabric_logical_port_base=512 # Fabric lane mapping -lane_to_serdes_map_fabric_lane0=rx0:tx0 +lane_to_serdes_map_fabric_lane0=rx0:tx3 lane_to_serdes_map_fabric_lane1=rx1:tx1 lane_to_serdes_map_fabric_lane2=rx2:tx2 -lane_to_serdes_map_fabric_lane3=rx3:tx3 +lane_to_serdes_map_fabric_lane3=rx3:tx0 lane_to_serdes_map_fabric_lane4=rx4:tx4 lane_to_serdes_map_fabric_lane5=rx5:tx5 lane_to_serdes_map_fabric_lane6=rx6:tx6 lane_to_serdes_map_fabric_lane7=rx7:tx7 -lane_to_serdes_map_fabric_lane8=rx8:tx10 +lane_to_serdes_map_fabric_lane8=rx8:tx9 lane_to_serdes_map_fabric_lane9=rx9:tx11 -lane_to_serdes_map_fabric_lane10=rx10:tx9 +lane_to_serdes_map_fabric_lane10=rx10:tx10 lane_to_serdes_map_fabric_lane11=rx11:tx8 lane_to_serdes_map_fabric_lane12=rx12:tx12 lane_to_serdes_map_fabric_lane13=rx13:tx15 @@ -475,15 +475,15 @@ lane_to_serdes_map_fabric_lane18=rx18:tx16 lane_to_serdes_map_fabric_lane19=rx19:tx19 lane_to_serdes_map_fabric_lane20=rx20:tx21 lane_to_serdes_map_fabric_lane21=rx21:tx23 -lane_to_serdes_map_fabric_lane22=rx22:tx20 -lane_to_serdes_map_fabric_lane23=rx23:tx22 -lane_to_serdes_map_fabric_lane24=rx24:tx26 +lane_to_serdes_map_fabric_lane22=rx22:tx22 +lane_to_serdes_map_fabric_lane23=rx23:tx20 +lane_to_serdes_map_fabric_lane24=rx24:tx25 lane_to_serdes_map_fabric_lane25=rx25:tx24 -lane_to_serdes_map_fabric_lane26=rx26:tx25 -lane_to_serdes_map_fabric_lane27=rx27:tx27 +lane_to_serdes_map_fabric_lane26=rx26:tx27 +lane_to_serdes_map_fabric_lane27=rx27:tx26 lane_to_serdes_map_fabric_lane28=rx28:tx31 -lane_to_serdes_map_fabric_lane29=rx29:tx30 -lane_to_serdes_map_fabric_lane30=rx30:tx29 +lane_to_serdes_map_fabric_lane29=rx29:tx29 +lane_to_serdes_map_fabric_lane30=rx30:tx30 lane_to_serdes_map_fabric_lane31=rx31:tx28 lane_to_serdes_map_fabric_lane32=rx32:tx32 lane_to_serdes_map_fabric_lane33=rx33:tx33 @@ -522,17 +522,17 @@ lane_to_serdes_map_fabric_lane65=rx65:tx65 lane_to_serdes_map_fabric_lane66=rx66:tx66 lane_to_serdes_map_fabric_lane67=rx67:tx67 lane_to_serdes_map_fabric_lane68=rx68:tx68 -lane_to_serdes_map_fabric_lane69=rx69:tx69 -lane_to_serdes_map_fabric_lane70=rx70:tx70 -lane_to_serdes_map_fabric_lane71=rx71:tx71 +lane_to_serdes_map_fabric_lane69=rx69:tx70 +lane_to_serdes_map_fabric_lane70=rx70:tx71 +lane_to_serdes_map_fabric_lane71=rx71:tx69 lane_to_serdes_map_fabric_lane72=rx72:tx75 lane_to_serdes_map_fabric_lane73=rx73:tx74 lane_to_serdes_map_fabric_lane74=rx74:tx73 lane_to_serdes_map_fabric_lane75=rx75:tx72 -lane_to_serdes_map_fabric_lane76=rx76:tx79 +lane_to_serdes_map_fabric_lane76=rx76:tx76 lane_to_serdes_map_fabric_lane77=rx77:tx78 lane_to_serdes_map_fabric_lane78=rx78:tx77 -lane_to_serdes_map_fabric_lane79=rx79:tx76 +lane_to_serdes_map_fabric_lane79=rx79:tx79 lane_to_serdes_map_fabric_lane80=rx80:tx80 lane_to_serdes_map_fabric_lane81=rx81:tx81 lane_to_serdes_map_fabric_lane82=rx82:tx83 @@ -543,11 +543,11 @@ lane_to_serdes_map_fabric_lane86=rx86:tx84 lane_to_serdes_map_fabric_lane87=rx87:tx87 lane_to_serdes_map_fabric_lane88=rx88:tx90 lane_to_serdes_map_fabric_lane89=rx89:tx88 -lane_to_serdes_map_fabric_lane90=rx90:tx91 -lane_to_serdes_map_fabric_lane91=rx91:tx89 +lane_to_serdes_map_fabric_lane90=rx90:tx89 +lane_to_serdes_map_fabric_lane91=rx91:tx91 lane_to_serdes_map_fabric_lane92=rx92:tx93 -lane_to_serdes_map_fabric_lane93=rx93:tx92 -lane_to_serdes_map_fabric_lane94=rx94:tx94 +lane_to_serdes_map_fabric_lane93=rx93:tx94 +lane_to_serdes_map_fabric_lane94=rx94:tx92 lane_to_serdes_map_fabric_lane95=rx95:tx95 lane_to_serdes_map_fabric_lane96=rx96:tx96 lane_to_serdes_map_fabric_lane97=rx97:tx97 @@ -557,30 +557,30 @@ lane_to_serdes_map_fabric_lane100=rx100:tx100 lane_to_serdes_map_fabric_lane101=rx101:tx101 lane_to_serdes_map_fabric_lane102=rx102:tx102 lane_to_serdes_map_fabric_lane103=rx103:tx103 -lane_to_serdes_map_fabric_lane104=rx104:tx105 -lane_to_serdes_map_fabric_lane105=rx105:tx106 -lane_to_serdes_map_fabric_lane106=rx106:tx107 -lane_to_serdes_map_fabric_lane107=rx107:tx104 -lane_to_serdes_map_fabric_lane108=rx108:tx111 +lane_to_serdes_map_fabric_lane104=rx104:tx104 +lane_to_serdes_map_fabric_lane105=rx105:tx107 +lane_to_serdes_map_fabric_lane106=rx106:tx106 +lane_to_serdes_map_fabric_lane107=rx107:tx105 +lane_to_serdes_map_fabric_lane108=rx108:tx108 lane_to_serdes_map_fabric_lane109=rx109:tx109 lane_to_serdes_map_fabric_lane110=rx110:tx110 -lane_to_serdes_map_fabric_lane111=rx111:tx108 -lane_to_serdes_map_fabric_lane112=rx112:tx114 -lane_to_serdes_map_fabric_lane113=rx113:tx113 +lane_to_serdes_map_fabric_lane111=rx111:tx111 +lane_to_serdes_map_fabric_lane112=rx112:tx115 +lane_to_serdes_map_fabric_lane113=rx113:tx114 lane_to_serdes_map_fabric_lane114=rx114:tx112 -lane_to_serdes_map_fabric_lane115=rx115:tx115 -lane_to_serdes_map_fabric_lane116=rx116:tx117 -lane_to_serdes_map_fabric_lane117=rx117:tx116 -lane_to_serdes_map_fabric_lane118=rx118:tx119 -lane_to_serdes_map_fabric_lane119=rx119:tx118 -lane_to_serdes_map_fabric_lane120=rx120:tx123 -lane_to_serdes_map_fabric_lane121=rx121:tx120 -lane_to_serdes_map_fabric_lane122=rx122:tx122 -lane_to_serdes_map_fabric_lane123=rx123:tx121 -lane_to_serdes_map_fabric_lane124=rx124:tx127 -lane_to_serdes_map_fabric_lane125=rx125:tx125 -lane_to_serdes_map_fabric_lane126=rx126:tx124 -lane_to_serdes_map_fabric_lane127=rx127:tx126 +lane_to_serdes_map_fabric_lane115=rx115:tx113 +lane_to_serdes_map_fabric_lane116=rx116:tx118 +lane_to_serdes_map_fabric_lane117=rx117:tx119 +lane_to_serdes_map_fabric_lane118=rx118:tx116 +lane_to_serdes_map_fabric_lane119=rx119:tx117 +lane_to_serdes_map_fabric_lane120=rx120:tx121 +lane_to_serdes_map_fabric_lane121=rx121:tx122 +lane_to_serdes_map_fabric_lane122=rx122:tx120 +lane_to_serdes_map_fabric_lane123=rx123:tx123 +lane_to_serdes_map_fabric_lane124=rx124:tx124 +lane_to_serdes_map_fabric_lane125=rx125:tx127 +lane_to_serdes_map_fabric_lane126=rx126:tx126 +lane_to_serdes_map_fabric_lane127=rx127:tx125 lane_to_serdes_map_fabric_lane128=rx128:tx128 lane_to_serdes_map_fabric_lane129=rx129:tx129 lane_to_serdes_map_fabric_lane130=rx130:tx130 @@ -593,12 +593,12 @@ lane_to_serdes_map_fabric_lane136=rx136:tx139 lane_to_serdes_map_fabric_lane137=rx137:tx138 lane_to_serdes_map_fabric_lane138=rx138:tx137 lane_to_serdes_map_fabric_lane139=rx139:tx136 -lane_to_serdes_map_fabric_lane140=rx140:tx140 +lane_to_serdes_map_fabric_lane140=rx140:tx143 lane_to_serdes_map_fabric_lane141=rx141:tx142 lane_to_serdes_map_fabric_lane142=rx142:tx141 -lane_to_serdes_map_fabric_lane143=rx143:tx143 -lane_to_serdes_map_fabric_lane144=rx144:tx144 -lane_to_serdes_map_fabric_lane145=rx145:tx145 +lane_to_serdes_map_fabric_lane143=rx143:tx140 +lane_to_serdes_map_fabric_lane144=rx144:tx145 +lane_to_serdes_map_fabric_lane145=rx145:tx144 lane_to_serdes_map_fabric_lane146=rx146:tx146 lane_to_serdes_map_fabric_lane147=rx147:tx147 lane_to_serdes_map_fabric_lane148=rx148:tx148 @@ -614,8 +614,8 @@ lane_to_serdes_map_fabric_lane157=rx157:tx158 lane_to_serdes_map_fabric_lane158=rx158:tx157 lane_to_serdes_map_fabric_lane159=rx159:tx156 lane_to_serdes_map_fabric_lane160=rx160:tx160 -lane_to_serdes_map_fabric_lane161=rx161:tx161 -lane_to_serdes_map_fabric_lane162=rx162:tx162 +lane_to_serdes_map_fabric_lane161=rx161:tx162 +lane_to_serdes_map_fabric_lane162=rx162:tx161 lane_to_serdes_map_fabric_lane163=rx163:tx163 lane_to_serdes_map_fabric_lane164=rx164:tx164 lane_to_serdes_map_fabric_lane165=rx165:tx165 @@ -639,11 +639,11 @@ lane_to_serdes_map_fabric_lane182=rx182:tx180 lane_to_serdes_map_fabric_lane183=rx183:tx183 lane_to_serdes_map_fabric_lane184=rx184:tx186 lane_to_serdes_map_fabric_lane185=rx185:tx184 -lane_to_serdes_map_fabric_lane186=rx186:tx185 -lane_to_serdes_map_fabric_lane187=rx187:tx187 -lane_to_serdes_map_fabric_lane188=rx188:tx188 +lane_to_serdes_map_fabric_lane186=rx186:tx187 +lane_to_serdes_map_fabric_lane187=rx187:tx185 +lane_to_serdes_map_fabric_lane188=rx188:tx190 lane_to_serdes_map_fabric_lane189=rx189:tx189 -lane_to_serdes_map_fabric_lane190=rx190:tx190 +lane_to_serdes_map_fabric_lane190=rx190:tx188 lane_to_serdes_map_fabric_lane191=rx191:tx191 # diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_monitor_config.json b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_monitor_config.json new file mode 100644 index 000000000000..0f67504caa61 --- /dev/null +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_monitor_config.json @@ -0,0 +1,9 @@ +{ + "FABRIC_MONITOR_DATA": { + "monErrThreshCrcCells": 1, + "monErrThreshRxCells": 61035156, + "monPollThreshRecovery": 8, + "monPollThreshIsolation": 1, + "monCapacityThreshWarn": 100 + } +} diff --git a/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_port_config.ini b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_port_config.ini new file mode 100644 index 000000000000..1ffb084a1334 --- /dev/null +++ b/device/arista/x86_64-arista_7800r3a_36d2_lc/Arista-7800R3A-36D2-D36/fabric_port_config.ini @@ -0,0 +1,193 @@ +# name lanes isolateStatus forceUnisolateStatus +Fabric0 0 False 0 +Fabric1 1 False 0 +Fabric2 2 False 0 +Fabric3 3 False 0 +Fabric4 4 False 0 +Fabric5 5 False 0 +Fabric6 6 False 0 +Fabric7 7 False 0 +Fabric8 8 False 0 +Fabric9 9 False 0 +Fabric10 10 False 0 +Fabric11 11 False 0 +Fabric12 12 False 0 +Fabric13 13 False 0 +Fabric14 14 False 0 +Fabric15 15 False 0 +Fabric16 16 False 0 +Fabric17 17 False 0 +Fabric18 18 False 0 +Fabric19 19 False 0 +Fabric20 20 False 0 +Fabric21 21 False 0 +Fabric22 22 False 0 +Fabric23 23 False 0 +Fabric24 24 False 0 +Fabric25 25 False 0 +Fabric26 26 False 0 +Fabric27 27 False 0 +Fabric28 28 False 0 +Fabric29 29 False 0 +Fabric30 30 False 0 +Fabric31 31 False 0 +Fabric32 32 False 0 +Fabric33 33 False 0 +Fabric34 34 False 0 +Fabric35 35 False 0 +Fabric36 36 False 0 +Fabric37 37 False 0 +Fabric38 38 False 0 +Fabric39 39 False 0 +Fabric40 40 False 0 +Fabric41 41 False 0 +Fabric42 42 False 0 +Fabric43 43 False 0 +Fabric44 44 False 0 +Fabric45 45 False 0 +Fabric46 46 False 0 +Fabric47 47 False 0 +Fabric48 48 False 0 +Fabric49 49 False 0 +Fabric50 50 False 0 +Fabric51 51 False 0 +Fabric52 52 False 0 +Fabric53 53 False 0 +Fabric54 54 False 0 +Fabric55 55 False 0 +Fabric56 56 False 0 +Fabric57 57 False 0 +Fabric58 58 False 0 +Fabric59 59 False 0 +Fabric60 60 False 0 +Fabric61 61 False 0 +Fabric62 62 False 0 +Fabric63 63 False 0 +Fabric64 64 False 0 +Fabric65 65 False 0 +Fabric66 66 False 0 +Fabric67 67 False 0 +Fabric68 68 False 0 +Fabric69 69 False 0 +Fabric70 70 False 0 +Fabric71 71 False 0 +Fabric72 72 False 0 +Fabric73 73 False 0 +Fabric74 74 False 0 +Fabric75 75 False 0 +Fabric76 76 False 0 +Fabric77 77 False 0 +Fabric78 78 False 0 +Fabric79 79 False 0 +Fabric80 80 False 0 +Fabric81 81 False 0 +Fabric82 82 False 0 +Fabric83 83 False 0 +Fabric84 84 False 0 +Fabric85 85 False 0 +Fabric86 86 False 0 +Fabric87 87 False 0 +Fabric88 88 False 0 +Fabric89 89 False 0 +Fabric90 90 False 0 +Fabric91 91 False 0 +Fabric92 92 False 0 +Fabric93 93 False 0 +Fabric94 94 False 0 +Fabric95 95 False 0 +Fabric96 96 False 0 +Fabric97 97 False 0 +Fabric98 98 False 0 +Fabric99 99 False 0 +Fabric100 100 False 0 +Fabric101 101 False 0 +Fabric102 102 False 0 +Fabric103 103 False 0 +Fabric104 104 False 0 +Fabric105 105 False 0 +Fabric106 106 False 0 +Fabric107 107 False 0 +Fabric108 108 False 0 +Fabric109 109 False 0 +Fabric110 110 False 0 +Fabric111 111 False 0 +Fabric112 112 False 0 +Fabric113 113 False 0 +Fabric114 114 False 0 +Fabric115 115 False 0 +Fabric116 116 False 0 +Fabric117 117 False 0 +Fabric118 118 False 0 +Fabric119 119 False 0 +Fabric120 120 False 0 +Fabric121 121 False 0 +Fabric122 122 False 0 +Fabric123 123 False 0 +Fabric124 124 False 0 +Fabric125 125 False 0 +Fabric126 126 False 0 +Fabric127 127 False 0 +Fabric128 128 False 0 +Fabric129 129 False 0 +Fabric130 130 False 0 +Fabric131 131 False 0 +Fabric132 132 False 0 +Fabric133 133 False 0 +Fabric134 134 False 0 +Fabric135 135 False 0 +Fabric136 136 False 0 +Fabric137 137 False 0 +Fabric138 138 False 0 +Fabric139 139 False 0 +Fabric140 140 False 0 +Fabric141 141 False 0 +Fabric142 142 False 0 +Fabric143 143 False 0 +Fabric144 144 False 0 +Fabric145 145 False 0 +Fabric146 146 False 0 +Fabric147 147 False 0 +Fabric148 148 False 0 +Fabric149 149 False 0 +Fabric150 150 False 0 +Fabric151 151 False 0 +Fabric152 152 False 0 +Fabric153 153 False 0 +Fabric154 154 False 0 +Fabric155 155 False 0 +Fabric156 156 False 0 +Fabric157 157 False 0 +Fabric158 158 False 0 +Fabric159 159 False 0 +Fabric160 160 False 0 +Fabric161 161 False 0 +Fabric162 162 False 0 +Fabric163 163 False 0 +Fabric164 164 False 0 +Fabric165 165 False 0 +Fabric166 166 False 0 +Fabric167 167 False 0 +Fabric168 168 False 0 +Fabric169 169 False 0 +Fabric170 170 False 0 +Fabric171 171 False 0 +Fabric172 172 False 0 +Fabric173 173 False 0 +Fabric174 174 False 0 +Fabric175 175 False 0 +Fabric176 176 False 0 +Fabric177 177 False 0 +Fabric178 178 False 0 +Fabric179 179 False 0 +Fabric180 180 False 0 +Fabric181 181 False 0 +Fabric182 182 False 0 +Fabric183 183 False 0 +Fabric184 184 False 0 +Fabric185 185 False 0 +Fabric186 186 False 0 +Fabric187 187 False 0 +Fabric188 188 False 0 +Fabric189 189 False 0 +Fabric190 190 False 0 +Fabric191 191 False 0 diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py index 627fa8a7a1ee..249f611ec154 100644 --- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py +++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py @@ -9,7 +9,7 @@ try: import time from ctypes import c_char - from sonic_platform_base.sfp_base import SfpBase + from sonic_platform_base.sonic_xcvr.sfp_optoe_base import SfpOptoeBase from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom from sonic_platform_base.sonic_sfp.sff8436 import sff8436InterfaceId @@ -157,7 +157,7 @@ PORT_END = 55 -class Sfp(SfpBase): +class Sfp(SfpOptoeBase): """Platform-specific Sfp class""" # Port I2C number @@ -172,7 +172,7 @@ class Sfp(SfpBase): PRS_PATH = "/sys/devices/platform/e1031.smc/SFP/sfp_modabs" def __init__(self, sfp_index, sfp_name): - SfpBase.__init__(self) + SfpOptoeBase.__init__(self) # Init common function self._api_common = Common() @@ -235,7 +235,7 @@ def _read_eeprom_specific_bytes(self, offset, num_bytes): for i in range(0, num_bytes): eeprom_raw.append("0x00") - sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] + sysfs_sfp_i2c_client_eeprom_path = self.get_eeprom_path() try: sysfsfile_eeprom = open( sysfs_sfp_i2c_client_eeprom_path, mode="rb", buffering=0) @@ -355,6 +355,9 @@ def _dom_capability_detect(self): self.dom_rx_power_supported = False self.dom_tx_power_supported = False + def get_eeprom_path(self): + return self.port_to_eeprom_mapping[self.port_num] + def get_transceiver_info(self): """ Retrieves transceiver info of this SFP @@ -1176,7 +1179,7 @@ def tx_disable(self, tx_disable): if self.dom_tx_disable_supported: # SFP status/control register at address A2h, byte 110 offset = 256 - sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] + sysfs_sfp_i2c_client_eeprom_path = self.get_eeprom_path() status_control_raw = self._read_eeprom_specific_bytes( (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if status_control_raw is not None: diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_lssn2700-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_lssn2700-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_lssn2700-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_lssn2700-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2010-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2010-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2010-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2010-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2010-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2100-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2100-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2410-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2410-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot deleted file mode 100755 index 9b68790498a1..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -declare -r EXIT_SUCCESS="0" -declare -r EXIT_ERROR="1" - -declare -r PENDING_COMPONENT_FW="/usr/bin/install-pending-fw.py" -declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh" -declare -r SYSFS_PWR_CYCLE="/var/run/hw-management/system/pwr_cycle" - -FORCE_REBOOT="no" - -function ParseArguments() { - while [ $# -ge 1 ]; do - case "$1" in - -f|--force) - FORCE_REBOOT="yes" - ;; - esac - shift - done -} - -function SafePwrCycle() { - sync; sync - umount -fa > /dev/null 2>&1 - echo 1 > $SYSFS_PWR_CYCLE -} - -ParseArguments "$@" - -# Reboot immediately if the kdump capture kernel is running -VMCORE_FILE=/proc/vmcore -if [ -s $VMCORE_FILE ]; then - sync; sync - umount -fa > /dev/null 2>&1 - - # Run Debian reboot because the platform reboot isn't available - /sbin/reboot -fi - - -${FW_UPGRADE_SCRIPT} --upgrade --verbose -EXIT_CODE="$?" -if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then - echo "Failed to burn MLNX FW: errno=${EXIT_CODE}" - - if [[ "${FORCE_REBOOT}" != "yes" ]]; then - echo "Reboot is interrupted: use -f|--force to override" - exit "${EXIT_ERROR}" - fi -fi - -${PENDING_COMPONENT_FW} - -SafePwrCycle diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook new file mode 100755 index 000000000000..134357d320f1 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/pre_reboot_hook @@ -0,0 +1,34 @@ +#!/bin/bash + +# Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare -r EXIT_SUCCESS=0 +declare -r EXIT_ERROR=1 + +declare -r PENDING_COMPONENT_FW="/usr/bin/install-pending-fw.py" +declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh" + + +${FW_UPGRADE_SCRIPT} --upgrade --verbose +EXIT_CODE=$? +if [[ ${EXIT_CODE} != ${EXIT_SUCCESS} ]]; then + echo "Failed to burn MLNX FW: errno=${EXIT_CODE}" + exit ${EXIT_ERROR} +fi + +${PENDING_COMPONENT_FW} + +exit ${EXIT_SUCCESS} \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2700a1-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700a1-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2700a1-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2700a1-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2700a1-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700a1-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2740-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn2740-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3420-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn3420-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn3420-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3420-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn3420-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3420-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn3700-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn3700-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn3700-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3700-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn3700c-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3700c-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn3700c-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3700c-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn3800-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn3800-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn3800-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn4410-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn4410-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn4410-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn4600-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn4600-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn4600-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4600-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn4600c-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn4600c-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/hwsku.json b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/hwsku.json index 86d6ec991a64..194730c605af 100644 --- a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/hwsku.json +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-O28/hwsku.json @@ -113,20 +113,28 @@ "subport": "1" }, "Ethernet224": { - "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", - "subport": "1" + "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", + "subport": "1", + "autoneg": "on", + "role": "Dpc" }, "Ethernet232": { - "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", - "subport": "1" + "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", + "subport": "1", + "autoneg": "on", + "role": "Dpc" }, "Ethernet240": { - "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", - "subport": "1" + "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", + "subport": "1", + "autoneg": "on", + "role": "Dpc" }, "Ethernet248": { - "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", - "subport": "1" + "default_brkout_mode": "1x200G[400G,100G,50G,40G,25G,10G,1G]", + "subport": "1", + "autoneg": "on", + "role": "Dpc" } } } diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn4700-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-mlnx_msn4700-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/pre_reboot_hook b/device/mellanox/x86_64-mlnx_msn4700-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn2201-r0/platform_reboot b/device/mellanox/x86_64-nvidia_sn2201-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-nvidia_sn2201-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn2201-r0/pre_reboot_hook b/device/mellanox/x86_64-nvidia_sn2201-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn2201-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4800-r0/platform_reboot b/device/mellanox/x86_64-nvidia_sn4800-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-nvidia_sn4800-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn4800-r0/pre_reboot_hook b/device/mellanox/x86_64-nvidia_sn4800-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn4800-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/platform_reboot b/device/mellanox/x86_64-nvidia_sn5600-r0/platform_reboot deleted file mode 120000 index 43c8ea567493..000000000000 --- a/device/mellanox/x86_64-nvidia_sn5600-r0/platform_reboot +++ /dev/null @@ -1 +0,0 @@ -../x86_64-mlnx_msn2700-r0/platform_reboot \ No newline at end of file diff --git a/device/mellanox/x86_64-nvidia_sn5600-r0/pre_reboot_hook b/device/mellanox/x86_64-nvidia_sn5600-r0/pre_reboot_hook new file mode 120000 index 000000000000..6fc31078ee86 --- /dev/null +++ b/device/mellanox/x86_64-nvidia_sn5600-r0/pre_reboot_hook @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/pre_reboot_hook \ No newline at end of file diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/jr2cp-nokia-18x100g-4x25g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/jr2cp-nokia-18x100g-4x25g-config.bcm index e289de50967b..bb75db8b984b 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/jr2cp-nokia-18x100g-4x25g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/jr2cp-nokia-18x100g-4x25g-config.bcm @@ -2084,7 +2084,7 @@ serdes_lane_config_channel_mode_447=force_nr rif_id_max=24576 dpp_db_path=/usr/share/bcm/db -sai_recycle_port_lane_base=96 +sai_recycle_port_lane_base=200 appl_param_nof_ports_per_modid=64 udh_exists=1 modreg IPS_FORCE_LOCAL_OR_FABRIC FORCE_FABRIC=1 @@ -2094,4 +2094,5 @@ cmic_dma_abort_in_cold_boot=0 sai_pfc_dlr_init_capability=0 trunk_group_max_members=16 sai_default_cpu_tx_tc=7 -sai_postinit_cmd_file=/usr/share/sonic/hwsku/sai_postinit_cmd.soc \ No newline at end of file +sai_postinit_cmd_file=/usr/share/sonic/hwsku/sai_postinit_cmd.soc +sai_disable_srcmacqedstmac_ctrl=1 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini index ea7ae717e8c5..d9df84b6ed9a 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/0/port_config.ini @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth112 Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120 0 16 8 Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128 0 17 8 Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136 0 18 8 -Ethernet-IB0 115 Recirc0/0 37 Inb 10000 Rcy0 0 19 8 -Ethernet-Rec0 116 Recirc0/1 39 Rec 10000 Rcy1 1 20 8 +Ethernet-IB0 219 Recirc0/0 37 Inb 10000 Rcy0 0 19 8 +Ethernet-Rec0 220 Recirc0/1 39 Rec 10000 Rcy1 1 20 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/jr2cp-nokia-18x100g-4x25g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/jr2cp-nokia-18x100g-4x25g-config.bcm index cb112766e674..d97725a266f8 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/jr2cp-nokia-18x100g-4x25g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/jr2cp-nokia-18x100g-4x25g-config.bcm @@ -2085,7 +2085,7 @@ serdes_lane_config_channel_mode_447=force_nr rif_id_max=24576 dpp_db_path=/usr/share/bcm/db -sai_recycle_port_lane_base=96 +sai_recycle_port_lane_base=200 appl_param_nof_ports_per_modid=64 udh_exists=1 modreg IPS_FORCE_LOCAL_OR_FABRIC FORCE_FABRIC=1 @@ -2095,4 +2095,5 @@ cmic_dma_abort_in_cold_boot=0 sai_pfc_dlr_init_capability=0 trunk_group_max_members=16 sai_default_cpu_tx_tc=7 -sai_postinit_cmd_file=/usr/share/sonic/hwsku/sai_postinit_cmd.soc \ No newline at end of file +sai_postinit_cmd_file=/usr/share/sonic/hwsku/sai_postinit_cmd.soc +sai_disable_srcmacqedstmac_ctrl=1 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini index b919d1b97b10..4d769b17db84 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x100G/1/port_config.ini @@ -17,5 +17,5 @@ Ethernet256 24,25,26,27 Ethernet33/1 33 Ext 100000 Eth112 Ethernet264 16,17,18,19 Ethernet34/1 34 Ext 100000 Eth120 0 16 8 Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth128 0 17 8 Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth136 0 18 8 -Ethernet-IB1 115 Recirc1/0 38 Inb 10000 Rcy0 0 19 8 -Ethernet-Rec1 116 Recirc1/1 40 Rec 10000 Rcy1 1 20 8 +Ethernet-IB1 219 Recirc1/0 38 Inb 10000 Rcy0 0 19 8 +Ethernet-Rec1 220 Recirc1/1 40 Rec 10000 Rcy1 1 20 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm index eee3aad3f15b..a14241358841 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm @@ -2085,7 +2085,7 @@ serdes_lane_config_channel_mode_447=force_nr rif_id_max=24576 dpp_db_path=/usr/share/bcm/db -sai_recycle_port_lane_base=96 +sai_recycle_port_lane_base=200 appl_param_nof_ports_per_modid=64 udh_exists=1 modreg IPS_FORCE_LOCAL_OR_FABRIC FORCE_FABRIC=1 @@ -2096,3 +2096,4 @@ cmic_dma_abort_in_cold_boot=0 sai_pfc_dlr_init_capability=0 trunk_group_max_members=16 sai_default_cpu_tx_tc=7 +sai_disable_srcmacqedstmac_ctrl=1 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini index 162eca454fca..478b5cb1ca60 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/port_config.ini @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27,28,29,30,31 Ethernet15/1 15 Ext 40000 Ethernet120 16,17,18,19,20,21,22,23 Ethernet16/1 16 Ext 400000 Eth120 0 16 8 Ethernet128 8,9,10,11,12,13,14,15 Ethernet17/1 17 Ext 400000 Eth128 0 17 8 Ethernet136 0,1,2,3,4,5,6,7 Ethernet18/1 18 Ext 400000 Eth136 0 18 8 -Ethernet-IB0 115 Recirc0/0 37 Inb 10000 Rcy0 0 19 8 -Ethernet-Rec0 116 Recirc0/1 39 Rec 10000 Rcy1 1 20 8 +Ethernet-IB0 219 Recirc0/0 37 Inb 10000 Rcy0 0 19 8 +Ethernet-Rec0 220 Recirc0/1 39 Rec 10000 Rcy1 1 20 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm index 9634b0451185..dc8f73ae62d7 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm @@ -2087,7 +2087,7 @@ serdes_lane_config_channel_mode_447=force_nr rif_id_max=24576 dpp_db_path=/usr/share/bcm/db -sai_recycle_port_lane_base=96 +sai_recycle_port_lane_base=200 appl_param_nof_ports_per_modid=64 udh_exists=1 modreg IPS_FORCE_LOCAL_OR_FABRIC FORCE_FABRIC=1 @@ -2098,3 +2098,4 @@ cmic_dma_abort_in_cold_boot=0 sai_pfc_dlr_init_capability=0 trunk_group_max_members=16 sai_default_cpu_tx_tc=7 +sai_disable_srcmacqedstmac_ctrl=1 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini index 1531e5a14278..92c0731ddcc5 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/port_config.ini @@ -17,5 +17,5 @@ Ethernet256 24,25,26,27,28,29,30,31 Ethernet33/1 33 Ext 40000 Ethernet264 16,17,18,19,20,21,22,23 Ethernet34/1 34 Ext 400000 Eth120 0 16 8 Ethernet272 8,9,10,11,12,13,14,15 Ethernet35/1 35 Ext 400000 Eth128 0 17 8 Ethernet280 0,1,2,3,4,5,6,7 Ethernet36/1 36 Ext 400000 Eth136 0 18 8 -Ethernet-IB1 115 Recirc1/0 38 Inb 10000 Rcy0 0 19 8 -Ethernet-Rec1 116 Recirc1/1 40 Rec 10000 Rcy1 1 20 8 +Ethernet-IB1 219 Recirc1/0 38 Inb 10000 Rcy0 0 19 8 +Ethernet-Rec1 220 Recirc1/1 40 Rec 10000 Rcy1 1 20 8 diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_env.conf b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_env.conf index 15a060d467b1..4fd55b29f108 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_env.conf +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_env.conf @@ -2,3 +2,4 @@ usemsi=1 dmasize=512M default_mtu=9100 macsec_enabled=1 +SYNCD_SHM_SIZE=512m diff --git a/dockers/docker-database/database_config.json.j2 b/dockers/docker-database/database_config.json.j2 index bacc1d356649..b5c231a93f41 100644 --- a/dockers/docker-database/database_config.json.j2 +++ b/dockers/docker-database/database_config.json.j2 @@ -1,3 +1,4 @@ +{% set include_remote_db = (REMOTE_DB_IP is defined and REMOTE_DB_PORT is defined) %} { "INSTANCES": { "redis":{ @@ -15,6 +16,14 @@ "unix_socket_path": "/var/run/redis-chassis/redis_chassis.sock", "persistence_for_warm_boot" : "yes" } +{% if include_remote_db %} + ,"remote_redis":{ + "hostname" : "{{REMOTE_DB_IP}}", + "port" : {{REMOTE_DB_PORT}}, + "unix_socket_path": "" + "persistence_for_warm_boot" : "yes" + } +{% endif %} }, "DATABASES" : { "APPL_DB" : { @@ -102,23 +111,23 @@ "DPU_APPL_DB" : { "id" : 15, "separator": ":", - "instance" : "redis", + "instance" : {% if include_remote_db %} "remote_redis" {% else %} "redis" {% endif %}, "format": "proto" }, "DPU_APPL_STATE_DB" : { "id" : 16, "separator": "|", - "instance" : "redis" + "instance" : {% if include_remote_db %} "remote_redis" {% else %} "redis" {% endif %} }, "DPU_STATE_DB" : { "id" : 17, "separator": "|", - "instance" : "redis" + "instance" : {% if include_remote_db %} "remote_redis" {% else %} "redis" {% endif %} }, "DPU_COUNTERS_DB" : { "id" : 18, "separator": ":", - "instance" : "redis" + "instance" : {% if include_remote_db %} "remote_redis" {% else %} "redis" {% endif %} } {% endif %} }, diff --git a/dockers/docker-database/database_global.json.j2 b/dockers/docker-database/database_global.json.j2 index 032f5e722e12..1760a96f0286 100644 --- a/dockers/docker-database/database_global.json.j2 +++ b/dockers/docker-database/database_global.json.j2 @@ -26,7 +26,7 @@ {% if dpu_cnt > 0 %} {% for dpu in range(dpu_cnt) %} { - "database_name" : "dpu{{dpu}}", + "container_name" : "dpu{{dpu}}", "include" : "../../redisdpu{{dpu}}/sonic-db/database_config.json" {% if dpu == dpu_cnt-1 %} } diff --git a/dockers/docker-database/docker-database-init.sh b/dockers/docker-database/docker-database-init.sh index f6f8522bb944..467f33c212d1 100755 --- a/dockers/docker-database/docker-database-init.sh +++ b/dockers/docker-database/docker-database-init.sh @@ -28,6 +28,18 @@ if [[ $DATABASE_TYPE == "dpudb" ]]; then redis_port=`expr 6381 + $DPU_ID` fi +if [[ $IS_DPU_DEVICE == "true" ]] +then + midplane_ip=$( ip -4 -o addr show eth0-midplane | awk '{print $4}' | cut -d'/' -f1 ) + if [[ $midplane_ip != "" ]] + then + export DATABASE_TYPE="dpudb" + export REMOTE_DB_IP="169.254.200.254" + # Determine the DB PORT from midplane IP + IFS=. read -r a b c d <<< $midplane_ip + export REMOTE_DB_PORT=$((6380 + $d)) + fi +fi REDIS_DIR=/var/run/redis$NAMESPACE_ID mkdir -p $REDIS_DIR/sonic-db @@ -61,12 +73,16 @@ cp $db_cfg_file $db_cfg_file_tmp if [[ $DATABASE_TYPE == "chassisdb" ]]; then # Docker init for database-chassis echo "Init docker-database-chassis..." + VAR_LIB_REDIS_CHASSIS_DIR="/var/lib/redis_chassis" + mkdir -p $VAR_LIB_REDIS_CHASSIS_DIR update_chassisdb_config -j $db_cfg_file_tmp -k -p $chassis_db_port # generate all redis server supervisord configuration file sonic-cfggen -j $db_cfg_file_tmp \ -t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \ -t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes rm $db_cfg_file_tmp + chown -R redis:redis $VAR_LIB_REDIS_CHASSIS_DIR + chown -R redis:redis $REDIS_DIR exec /usr/local/bin/supervisord exit 0 fi diff --git a/dockers/docker-dhcp-relay/Dockerfile.j2 b/dockers/docker-dhcp-relay/Dockerfile.j2 index a406af404065..9d0614ce4ae1 100644 --- a/dockers/docker-dhcp-relay/Dockerfile.j2 +++ b/dockers/docker-dhcp-relay/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG image_version diff --git a/dockers/docker-dhcp-server/cli-plugin-tests/test_config_dhcp_server.py b/dockers/docker-dhcp-server/cli-plugin-tests/test_config_dhcp_server.py index bc91dfe980ee..2871b7c06042 100644 --- a/dockers/docker-dhcp-server/cli-plugin-tests/test_config_dhcp_server.py +++ b/dockers/docker-dhcp-server/cli-plugin-tests/test_config_dhcp_server.py @@ -33,6 +33,22 @@ def test_plugin_registration(self): def test_validate_str_type(self, type, value, result): assert dhcp_server.validate_str_type(type, value) == result + @pytest.mark.parametrize("state", ["disabled", "enabled"]) + def test_config_dhcp_server_feature_state_checking(self, mock_db, state): + runner = CliRunner() + db = clicommon.Db() + db.db = mock_db + mock_db.set("CONFIG_DB", "FEATURE|dhcp_server", "state", state) + result = runner.invoke(dhcp_server.dhcp_server, obj=db) + if state == "disabled": + assert result.exit_code == 2, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert "Feature dhcp_server is not enabled" in result.output + elif state == "enabled": + assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert "Usage: dhcp_server [OPTIONS] COMMAND [ARGS]" in result.output + else: + assert False + def test_config_dhcp_server_ipv4_add(self, mock_db): expected_value = { "gateway": "10.10.10.10", diff --git a/dockers/docker-dhcp-server/cli-plugin-tests/test_show_dhcp_server.py b/dockers/docker-dhcp-server/cli-plugin-tests/test_show_dhcp_server.py index bacf911b37a5..7dbcfc0e359d 100644 --- a/dockers/docker-dhcp-server/cli-plugin-tests/test_show_dhcp_server.py +++ b/dockers/docker-dhcp-server/cli-plugin-tests/test_show_dhcp_server.py @@ -1,3 +1,4 @@ +import pytest import sys from unittest import mock @@ -14,6 +15,22 @@ def test_plugin_registration(self): cli = mock.MagicMock() show_dhcp_server.register(cli) + @pytest.mark.parametrize("state", ["disabled", "enabled"]) + def test_show_dhcp_server_feature_state_checking(self, mock_db, state): + runner = CliRunner() + db = clicommon.Db() + db.db = mock_db + mock_db.set("CONFIG_DB", "FEATURE|dhcp_server", "state", state) + result = runner.invoke(show_dhcp_server.dhcp_server, obj=db) + if state == "disabled": + assert result.exit_code == 2, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert "Feature dhcp_server is not enabled" in result.output + elif state == "enabled": + assert result.exit_code == 0, "exit code: {}, Exception: {}, Traceback: {}".format(result.exit_code, result.exception, result.exc_info) + assert "Usage: dhcp_server [OPTIONS] COMMAND [ARGS]" in result.output + else: + assert False + def test_show_dhcp_server_ipv4_lease_without_dhcpintf(self, mock_db): expected_stdout = """\ +---------------------+-------------------+-------------+---------------------+---------------------+ diff --git a/dockers/docker-dhcp-server/cli/config/plugins/dhcp_server.py b/dockers/docker-dhcp-server/cli/config/plugins/dhcp_server.py index 7f94045e6c23..0aabf1c29ec3 100644 --- a/dockers/docker-dhcp-server/cli/config/plugins/dhcp_server.py +++ b/dockers/docker-dhcp-server/cli/config/plugins/dhcp_server.py @@ -45,14 +45,17 @@ def validate_str_type(type_, value): return False -@click.group(cls=clicommon.AbbreviationGroup, name="dhcp_server") +@click.group(cls=clicommon.AbbreviationGroup, name="dhcp_server", invoke_without_command=True) @clicommon.pass_db -def dhcp_server(): +def dhcp_server(db): """config DHCP Server information""" ctx = click.get_current_context() dbconn = db.db if dbconn.get("CONFIG_DB", "FEATURE|dhcp_server", "state") != "enabled": ctx.fail("Feature dhcp_server is not enabled") + if ctx.invoked_subcommand is None: + click.echo(ctx.get_help()) + ctx.exit() @dhcp_server.group(cls=clicommon.AliasedGroup, name="ipv4") diff --git a/dockers/docker-dhcp-server/cli/show/plugins/show_dhcp_server.py b/dockers/docker-dhcp-server/cli/show/plugins/show_dhcp_server.py index eb5e276c343e..5388b46177e7 100644 --- a/dockers/docker-dhcp-server/cli/show/plugins/show_dhcp_server.py +++ b/dockers/docker-dhcp-server/cli/show/plugins/show_dhcp_server.py @@ -13,7 +13,7 @@ def ts_to_str(ts): return datetime.fromtimestamp(int(ts)).strftime("%Y-%m-%d %H:%M:%S") -@click.group(cls=clicommon.AbbreviationGroup, name="dhcp_server") +@click.group(cls=clicommon.AbbreviationGroup, name="dhcp_server", invoke_without_command=True) @clicommon.pass_db def dhcp_server(db): """Show dhcp_server related info""" @@ -21,6 +21,9 @@ def dhcp_server(db): dbconn = db.db if dbconn.get("CONFIG_DB", "FEATURE|dhcp_server", "state") != "enabled": ctx.fail("Feature dhcp_server is not enabled") + if ctx.invoked_subcommand is None: + click.echo(ctx.get_help()) + ctx.exit() @dhcp_server.group(cls=clicommon.AliasedGroup) diff --git a/dockers/docker-eventd/Dockerfile.j2 b/dockers/docker-eventd/Dockerfile.j2 index 8d935dc9f365..adf7fbfe6d2d 100644 --- a/dockers/docker-eventd/Dockerfile.j2 +++ b/dockers/docker-eventd/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG image_version diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index aeb201a2046c..ef6b2fcea824 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG image_version @@ -15,7 +15,6 @@ RUN apt-get update && \ apt-get install -y \ build-essential \ python3-dev \ - ipmitool \ librrd8 \ librrd-dev \ rrdtool \ @@ -27,17 +26,18 @@ RUN apt-get update && \ libpci3 \ iputils-ping \ pciutils \ + ethtool && \ # smartmontools version should match the installed smartmontools in sonic_debian_extension build template - smartmontools=7.2-1 \ - ethtool + apt-get install -y -t bookworm-backports \ + smartmontools # On Arista devices, the sonic_platform wheel is not installed in the container. # Instead, the installation directory is mounted from the host OS. However, this method # doesn't ensure all dependencies are installed in the container. So here we # install any dependencies required by the Arista sonic_platform package. # TODO: eliminate the need to install these explicitly. -RUN pip3 install grpcio==1.39.0 \ - grpcio-tools==1.39.0 +RUN pip3 install grpcio==1.51.1 \ + grpcio-tools==1.51.1 # Barefoot platform vendors' sonic_platform packages import these Python libraries RUN pip3 install thrift==0.13.0 netifaces diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm b/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm index 04542d6eff2a..e3e4626ea6a8 100644 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm +++ b/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm @@ -1,6 +1,6 @@ -applibs==1.mlnx.4.6.2134 -kernel-mft-dkms==4.25.0-62 -libnl-3-200==3.5.0-1 +applibs==1.mlnx.4.6.2202 +kernel-mft-dkms==4.27.0-83 +libdashapi==1.0.0 libnl-3-dev==3.5.0-1 libnl-cli-3-200==3.5.0-1 libnl-cli-3-dev==3.5.0-1 @@ -8,12 +8,20 @@ libnl-genl-3-200==3.5.0-1 libnl-genl-3-dev==3.5.0-1 libnl-nf-3-200==3.5.0-1 libnl-nf-3-dev==3.5.0-1 -libnl-route-3-200==3.5.0-1 libnl-route-3-dev==3.5.0-1 +libsaimetadata==1.0.0 +libsaimetadata-dev==1.0.0 +libsairedis==1.0.0 +libsairedis-dev==1.0.0 +libsaivs==1.0.0 libswsscommon==1.0.0 libswsscommon-dev==1.0.0 libtac-dev==1.4.1-1 libtac2==1.4.1-1 +libteam-dev==1.31-1 +libteam-utils==1.31-1 +libteam5==1.31-1 +libteamdctl0==1.31-1 libyang==1.0.73 libyang-cpp==1.0.73 libyang-dev==1.0.73 @@ -25,9 +33,9 @@ python3-swsscommon==1.0.0 python3-yang==1.0.73 sonic-platform-pddf==1.1 sonic-platform-pddf-sym==1.1 -sx-complib==1.mlnx.4.6.2134 -sx-complib-dev==1.mlnx.4.6.2134 -sx-gen-utils==1.mlnx.4.6.2134 -sx-gen-utils-dev==1.mlnx.4.6.2134 -sxd-libs==1.mlnx.4.6.2134 -sxd-libs-dev==1.mlnx.4.6.2134 +sx-complib==1.mlnx.4.6.2202 +sx-complib-dev==1.mlnx.4.6.2202 +sx-gen-utils==1.mlnx.4.6.2202 +sx-gen-utils-dev==1.mlnx.4.6.2202 +sxd-libs==1.mlnx.4.6.2202 +sxd-libs-dev==1.mlnx.4.6.2202 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf b/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf index 9096b1dd63e2..247d032a3eb9 100644 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf +++ b/files/build/versions/build/build-sonic-slave-bookworm/versions-deb-bookworm-armhf @@ -1 +1,3 @@ +libnl-3-200==3.5.0-1 +libnl-route-3-200==3.5.0-1 linux-headers-6.1.0-11-2-armmp==6.1.38-4 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 index 3278e5b870b2..d9fff43be029 100644 --- a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3 @@ -1,21 +1,19 @@ -bitarray==2.8.1 blessed==1.20.0 cffi==1.16.0 -click==7.0 click-log==0.4.0 colorful==0.5.6 deepdiff==6.2.2 docker==7.0.0 docker-image-py==0.1.12 enlighten==1.12.4 -filelock==3.13.1 +filelock==3.13.3 +freezegun==1.4.0 ijson==3.2.3 ipaddress==1.0.23 jsondiff==2.0.0 jsonpatch==1.33 jsonpointer==2.4 jsonschema==2.6.0 -lxml==4.9.1 natsort==6.2.1 netaddr==0.8.0 netifaces==0.11.0 @@ -24,17 +22,16 @@ paramiko==2.11.0 pexpect==4.9.0 prefixed==0.7.0 prettyprinter==0.18.0 +psutil==5.9.8 ptyprocess==0.7.0 -pycairo==1.25.1 -pycparser==2.21 +pycairo==1.26.0 +pycparser==2.22 pynacl==1.5.0 pyroute2==0.5.19 -pyyaml==6.0.1 semantic-version==2.10.0 systemd-python==235 tabulate==0.9.0 toposort==1.6 -urllib3==2.1.0 wcwidth==0.2.13 www-authenticate==0.9.2 xmltodict==0.12.0 diff --git a/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf new file mode 100644 index 000000000000..f766c98db67d --- /dev/null +++ b/files/build/versions/build/build-sonic-slave-bookworm/versions-py3-all-armhf @@ -0,0 +1,5 @@ +bitarray==2.8.1 +click==7.0 +lxml==4.9.1 +pyyaml==6.0.1 +urllib3==2.2.1 diff --git a/files/build/versions/build/build-sonic-slave-bullseye/versions-deb-bullseye b/files/build/versions/build/build-sonic-slave-bullseye/versions-deb-bullseye index fe066a23f61b..bc64b529a8bf 100644 --- a/files/build/versions/build/build-sonic-slave-bullseye/versions-deb-bullseye +++ b/files/build/versions/build/build-sonic-slave-bullseye/versions-deb-bullseye @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.6.2134 -applibs-dev==1.mlnx.4.6.2134 +applibs==1.mlnx.4.6.2202 +applibs-dev==1.mlnx.4.6.2202 libdashapi==1.0.0 libnl-3-200==3.5.0-1 libnl-3-dev==3.5.0-1 @@ -25,10 +25,10 @@ libsaithrift-dev==0.9.4 libsaivs==1.0.0 libswsscommon==1.0.0 libswsscommon-dev==1.0.0 -libteam-dev==1.30-1 -libteam-utils==1.30-1 -libteam5==1.30-1 -libteamdctl0==1.30-1 +libteam-dev==1.31-1 +libteam-utils==1.31-1 +libteam5==1.31-1 +libteamdctl0==1.31-1 libthrift-0.11.0==0.11.0-4 libthrift-dev==0.11.0-4 libyang==1.0.73 @@ -40,19 +40,19 @@ python3-swsscommon==1.0.0 python3-yang==1.0.73 sonic-mgmt-common==1.0.0 sonic-mgmt-common-codegen==1.0.0 -sx-acl-helper==1.mlnx.4.6.2134 -sx-acl-helper-dev==1.mlnx.4.6.2134 -sx-complib==1.mlnx.4.6.2134 -sx-complib-dev==1.mlnx.4.6.2134 -sx-examples==1.mlnx.4.6.2134 -sx-examples-dev==1.mlnx.4.6.2134 -sx-gen-utils==1.mlnx.4.6.2134 -sx-gen-utils-dev==1.mlnx.4.6.2134 -sx-hash-calc==1.mlnx.4.6.2134 -sx-obj-desc-lib==1.mlnx.4.6.2134 -sx-obj-desc-lib-dev==1.mlnx.4.6.2134 -sxd-libs==1.mlnx.4.6.2134 -sxd-libs-dev==1.mlnx.4.6.2134 +sx-acl-helper==1.mlnx.4.6.2202 +sx-acl-helper-dev==1.mlnx.4.6.2202 +sx-complib==1.mlnx.4.6.2202 +sx-complib-dev==1.mlnx.4.6.2202 +sx-examples==1.mlnx.4.6.2202 +sx-examples-dev==1.mlnx.4.6.2202 +sx-gen-utils==1.mlnx.4.6.2202 +sx-gen-utils-dev==1.mlnx.4.6.2202 +sx-hash-calc==1.mlnx.4.6.2202 +sx-obj-desc-lib==1.mlnx.4.6.2202 +sx-obj-desc-lib-dev==1.mlnx.4.6.2202 +sxd-libs==1.mlnx.4.6.2202 +sxd-libs-dev==1.mlnx.4.6.2202 thrift-compiler==0.11.0-4 -wjh-libs==1.mlnx.4.6.2134 -wjh-libs-dev==1.mlnx.4.6.2134 +wjh-libs==1.mlnx.4.6.2202 +wjh-libs-dev==1.mlnx.4.6.2202 diff --git a/files/build/versions/build/build-sonic-slave-bullseye/versions-py3 b/files/build/versions/build/build-sonic-slave-bullseye/versions-py3 index 8cdab5b72d31..ecfaa45c53e4 100644 --- a/files/build/versions/build/build-sonic-slave-bullseye/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-bullseye/versions-py3 @@ -9,8 +9,7 @@ colorful==0.5.6 docker==7.0.0 docker-image-py==0.1.12 enlighten==1.12.4 -filelock==3.13.1 -freezegun==1.4.0 +filelock==3.13.3 ijson==3.2.3 ipaddress==1.0.23 jsondiff==2.0.0 @@ -24,8 +23,8 @@ paramiko==2.11.0 prefixed==0.7.0 prettyprinter==0.18.0 psutil==5.9.8 -pycairo==1.25.1 -pycparser==2.21 +pycairo==1.26.0 +pycparser==2.22 pynacl==1.5.0 pyroute2==0.5.19 python-arptable==0.0.2 @@ -35,7 +34,7 @@ semantic-version==2.10.0 systemd-python==235 tabulate==0.9.0 toposort==1.6 -urllib3==2.1.0 +urllib3==2.2.1 wcwidth==0.2.13 www-authenticate==0.9.2 xmltodict==0.12.0 diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py2 b/files/build/versions/build/build-sonic-slave-buster/versions-py2 index fcf28ba4bb38..370f7127e9e5 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py2 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py2 @@ -1,6 +1,6 @@ bitarray==2.8.1 contextlib2==0.6.0.post1 -future==0.18.3 +future==1.0.0 importlib-resources==3.3.1 ipaddress==1.0.23 natsort==6.2.1 diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index a1c053f5a871..6a0a8332a467 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -1,15 +1,18 @@ -amd64:amd64/debian:bullseye==sha256:4cb3f4198e4af2d03dffe6bfa4f3686773596494ef298f3882553d52e885634b -amd64:amd64/debian:buster==sha256:d39357a2a8840e450e387df33a5aaf8f0c8f99e388a0e18169f3dd240fc2393d -amd64:debian:bookworm==sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67 -amd64:debian:bullseye==sha256:71cb300d5448af821aedfe63afd55ba05f45a6a79f00dcd131b96b780bb99fe4 -amd64:debian:buster==sha256:defa5d214292f2aaf7905d3e4bcdf8f628019feb63e7c8746df563d1a941f8d7 -arm64:arm64v8/debian:bullseye==sha256:c4a762841d008c85d809f0981c47e2a490c43483e4a169e17afa2dc83d18b2b1 -arm64:arm64v8/debian:buster==sha256:7d6cb4b56f1230b8692ed0c5fa5fa838ddd7ebd436a6463a6e9b29d1aa4c6e24 -arm64:debian:bookworm==sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67 -arm64:debian:bullseye==sha256:71cb300d5448af821aedfe63afd55ba05f45a6a79f00dcd131b96b780bb99fe4 -arm64:debian:buster==sha256:defa5d214292f2aaf7905d3e4bcdf8f628019feb63e7c8746df563d1a941f8d7 -armhf:arm32v7/debian:bullseye==sha256:70dcc7f2c51acbeaff85f700d9c1ef936371e60bdec8da15729c19503ef1fb8f -armhf:arm32v7/debian:buster==sha256:d984bf6bd66a53445e82ca3e6ae8d3c40a866c053339acfd5f3fa705a7092b90 -armhf:debian:bookworm==sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67 -armhf:debian:bullseye==sha256:71cb300d5448af821aedfe63afd55ba05f45a6a79f00dcd131b96b780bb99fe4 -armhf:debian:buster==sha256:defa5d214292f2aaf7905d3e4bcdf8f628019feb63e7c8746df563d1a941f8d7 +amd64:amd64/debian:bookworm==sha256:c2cedd7f80a4dd0f9f80d3699bd433ccf3de33ab63bfa2d4c4ba870c998222d6 +amd64:amd64/debian:bullseye==sha256:90afe482786743f51e30f5fe673b71d787d34242f9f3b68755b1eb9c7c901f8e +amd64:amd64/debian:buster==sha256:c6296b63c2ec4c500d6386660beedb1783f162c3c1a681ae93fef28f39b8f2a4 +amd64:debian:bookworm==sha256:e97ee92bf1e11a2de654e9f3da827d8dce32b54e0490ac83bfc65c8706568116 +amd64:debian:bullseye==sha256:5a87974e73c64b3fb161d444a84bdd47c0e6b6058eacaeea64342e7cbce1f04d +amd64:debian:buster==sha256:f6b3b7c7b049c2c7d0f19ae988b4eac64fd8e127fa891c9de1d3cf3f8c33cad4 +arm64:arm64v8/debian:bookworm==sha256:6fc9b50711023adfca7c7b4236948e120d1332ff01bf46c93e5b64ca0830a81a +arm64:arm64v8/debian:bullseye==sha256:64f4252c791692432233602d3a3dea4453a57ea268dc397e96bdac828d08df28 +arm64:arm64v8/debian:buster==sha256:f6f84d5d8145c7b86e09bbed0ffa3486cccff7c993e91803a462245fc68c28b2 +arm64:debian:bookworm==sha256:e97ee92bf1e11a2de654e9f3da827d8dce32b54e0490ac83bfc65c8706568116 +arm64:debian:bullseye==sha256:5a87974e73c64b3fb161d444a84bdd47c0e6b6058eacaeea64342e7cbce1f04d +arm64:debian:buster==sha256:f6b3b7c7b049c2c7d0f19ae988b4eac64fd8e127fa891c9de1d3cf3f8c33cad4 +armhf:arm32v7/debian:bookworm==sha256:1129497179f83b39970c5e03e6341e6be3d2e6997e521f57b814522920f01c73 +armhf:arm32v7/debian:bullseye==sha256:9f73ebca334a142cd23aec641d2051f3a60783eb7dc7c2037d1bd676ebd2c8f8 +armhf:arm32v7/debian:buster==sha256:1f61a6065e5ba6bb38a94607a16c219d6fbd9f97711886d42e4cdf5ae008d0e5 +armhf:debian:bookworm==sha256:e97ee92bf1e11a2de654e9f3da827d8dce32b54e0490ac83bfc65c8706568116 +armhf:debian:bullseye==sha256:5a87974e73c64b3fb161d444a84bdd47c0e6b6058eacaeea64342e7cbce1f04d +armhf:debian:buster==sha256:f6b3b7c7b049c2c7d0f19ae988b4eac64fd8e127fa891c9de1d3cf3f8c33cad4 diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index d1971d19c98d..7b7c196e5896 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,24 +1,22 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==00ae0c065cac5c7fd0855a38249dc17f4092bc14 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==90d54ff344a0e8188214058614b5bab46db5bf0e https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==fc4dbd923e044006c93df020590a1e5a8656c09e https://github.com/daveolson53/audisp-tacplus.git==559c9f22edd4f2dea0ecedffb3ad9502b12a75b6 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 -https://github.com/flashrom/flashrom.git==a21be9153abe50ae26cd833db62d9493e7eadf54 -https://github.com/FreeRADIUS/freeradius-server.git==30951a836a404e1305fd145eed7c3587432a4a30 +https://github.com/flashrom/flashrom.git==2a5d2920d8817f1bc7e479a2ed868a6e2a46dcbe +https://github.com/FreeRADIUS/freeradius-server.git==ddef42d8417bfcb16ab16214e6e86281e9c73feb https://github.com/FreeRADIUS/pam_radius.git==53c0cfff686ab48ae3bac5449d5461b6e1b83d27 -https://github.com/jeroennijhof/pam_tacplus.git==b89dba44b58ec7fdc9b5365b982aa4a316484a3c -https://github.com/jpirko/libteam.git==8b843e93cee1dab61fb79b01791201cdad45e1d1 +https://github.com/jeroennijhof/pam_tacplus.git==b839c440e33c36eced9dcbc287fcfe6237c4c4ce https://github.com/lguohan/gnxi.git==3adf8b97755b49947e465b5a14645f11e79fa0cd -https://github.com/Marvell-switching/mrvl-prestera.git==22ac73bff81451571002df88e5a39cf390a4d8cd +https://github.com/Marvell-switching/mrvl-prestera.git==d524292106abbef63df6d0853d4557a5097546f0 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/openconfig/oc-pyang.git==4607fd1987d4f586aba03b40f222015cb3ef8161 -https://github.com/p4lang/ptf.git==252facba471842f7e88db353cffc2872c0e13909 +https://github.com/p4lang/ptf.git==e8b545f3f281fc509c7bdd6c8a4f55bc829149e7 https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479 -https://github.com/sflow/host-sflow==6f50c161d3dc2b78c66b1f8cd69fcd7957e2730f -https://github.com/sflow/sflowtool==c1eeb55ad6bfd76283833614a8296f635627e1db -https://github.com/thom311/libnl==8693347fe9c47d08ce5899602ab4f208c1249619 -https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d +https://github.com/sflow/host-sflow==f2cd42fae58bbf76a067ad8b12a07ca37e1f786b +https://github.com/sflow/sflowtool==c42c49cb80b927a4c02e54fc26430417f18f4833 +https://github.com/thom311/libnl==19d48b0fe924085f28c9410fae448d385f5f9a23 https://salsa.debian.org/kernel-team/initramfs-tools.git==cf964bfb4362019fd7fba1e839e403ff950dca8e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==1d67ef8053a0ea5e9a57c0e6ad33604d17e95456 +https://salsa.debian.org/ssh-team/openssh.git==e4f80d7ae4c9bb1125ff1987b1a0ead33b577ec4 diff --git a/files/build/versions/default/versions-mirror b/files/build/versions/default/versions-mirror index d53f85a4d29d..735e459b1259 100644 --- a/files/build/versions/default/versions-mirror +++ b/files/build/versions/default/versions-mirror @@ -1,23 +1,23 @@ -deb.debian.org_debian-security_dists_bookworm-security==2024-01-23T21:49:41Z -deb.debian.org_debian_dists_bookworm==2023-12-10T17:43:24Z -deb.debian.org_debian_dists_bookworm-updates==2024-01-23T20:15:19Z +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm==2024-02-10T11:07:25Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T14:12:26Z deb.nodesource.com_node%5f14.x_dists_bookworm==2023-02-17T00:35:29Z deb.nodesource.com_node%5f14.x_dists_bullseye==2023-02-17T00:35:28Z deb.nodesource.com_node%5f14.x_dists_buster==2023-02-17T00:35:28Z -debian==20240123T000238Z -debian-security==20240123T000351Z -download.docker.com_linux_debian_dists_bookworm==2024-01-19T10:37:46Z -download.docker.com_linux_debian_dists_bullseye==2024-01-19T10:37:46Z -download.docker.com_linux_debian_dists_buster==2024-01-19T10:37:46Z -packages.trafficmanager.net_snapshot_debian-security_20240123T000351Z_dists_bookworm-security==2024-01-22T18:13:05Z -packages.trafficmanager.net_snapshot_debian-security_20240123T000351Z_dists_bullseye-security==2024-01-22T18:13:06Z -packages.trafficmanager.net_snapshot_debian-security_20240123T000351Z_dists_buster_updates==2024-01-22T18:13:05Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bookworm==2023-12-10T17:43:24Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bookworm-backports==2024-01-22T20:16:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bookworm-updates==2024-01-22T20:16:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bullseye==2023-10-07T11:07:16Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bullseye-backports==2024-01-22T20:16:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_bullseye-updates==2024-01-22T20:16:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_buster==2023-06-10T08:53:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_buster-backports==2024-01-22T20:16:33Z -packages.trafficmanager.net_snapshot_debian_20240123T000238Z_dists_buster-updates==2023-06-10T08:55:10Z +debian==20240404T000223Z +debian-security==20240404T000228Z +download.docker.com_linux_debian_dists_bookworm==2024-03-22T10:38:47Z +download.docker.com_linux_debian_dists_bullseye==2024-03-22T10:38:47Z +download.docker.com_linux_debian_dists_buster==2024-03-20T18:01:13Z +packages.trafficmanager.net_snapshot_debian-security_20240404T000228Z_dists_bookworm-security==2024-04-03T19:14:43Z +packages.trafficmanager.net_snapshot_debian-security_20240404T000228Z_dists_bullseye-security==2024-04-03T19:14:43Z +packages.trafficmanager.net_snapshot_debian-security_20240404T000228Z_dists_buster_updates==2024-04-03T19:14:43Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bookworm==2024-02-10T11:07:25Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bookworm-backports==2024-04-03T20:13:52Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bookworm-updates==2024-04-03T20:13:52Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bullseye==2024-02-10T12:40:37Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bullseye-backports==2024-04-03T20:13:52Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_bullseye-updates==2024-04-03T20:13:53Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_buster==2023-06-10T08:53:33Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_buster-backports==2024-03-09T20:54:54Z +packages.trafficmanager.net_snapshot_debian_20240404T000223Z_dists_buster-updates==2023-06-10T08:55:10Z diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index be448a72afad..67cf4cd99023 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -6,28 +6,36 @@ http://deb.debian.org/debian/pool/main/i/iproute2/iproute2_5.10.0.orig.tar.xz==f http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.7-1.debian.tar.xz==bacfd4f463240af61c4a50298e5f7560 http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.7-1.dsc==c7b1880f0d2e7a9306007969f3b541ee http://deb.debian.org/debian/pool/main/i/iptables/iptables_1.8.7.orig.tar.bz2==602ba7e937c72fbb7b1c2b71c3b0004b -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.1-2.3+deb11u2.debian.tar.xz==126081bf0da3c1e5ca722edeb5a3aed1 -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.1-2.3+deb11u2.dsc==c35e75da314bce54f53b2e0847c6bc9b -http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.1.orig.tar.gz==dbcba5108f659278200218ac0847ce3f +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.debian.tar.xz==64fbb939e9c93d14e5a9040b45e5b459 +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1-2.dsc==9f39c78ebbf7d66194de179dc12de49e +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz==36c6ca77212373b0cff478ae9e5d32af +http://deb.debian.org/debian/pool/main/i/isc-dhcp/isc-dhcp_4.4.3-P1.orig.tar.gz.asc==6db320501d5766198bc2da9515c62bbb http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.debian.tar.xz==8eab143a53c71c03695ebc78e4b5ed36 http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0-7.dsc==983d68fb43001bb2fc94862bc4bc2e2b http://deb.debian.org/debian/pool/main/l/lm-sensors/lm-sensors_3.6.0.orig.tar.gz==f60e47b5eb50bbeed48a9f43bb08dd5e http://deb.debian.org/debian/pool/main/p/protobuf/protobuf_3.21.12-3.debian.tar.xz==f457e44218a7d4cc7b7ab0ed696096e3 http://deb.debian.org/debian/pool/main/p/protobuf/protobuf_3.21.12-3.dsc==d8e34e7b07473c6903f9d245934524fb http://deb.debian.org/debian/pool/main/p/protobuf/protobuf_3.21.12.orig.tar.gz==d38562490234d8080bdbe8eb7baf937a -http://ftp.us.debian.org/debian/pool/main/s/scapy/python-scapy_2.4.0-2_all.deb==d87d7b22de51937b1e706e4751b86251 -http://www.mellanox.com/downloads/MFT/mft-4.25.0-62-x86_64-deb.tgz==658a7f7170f6798c98ef8b8045c70f0d +http://ftp.us.debian.org/debian/pool/main/s/scapy/python3-scapy_2.4.0-2_all.deb==b8717ca83b3b60da54bc3f72018964a7 +http://www.iana.org/assignments/enterprise-numbers.txt==6337b3342894343f8d43f229c5bca8c1 +http://www.mellanox.com/downloads/MFT/mft-4.27.0-83-x86_64-deb.tgz==e475ca87a9252ba8d0abb6b05d5d94d0 https://archive.apache.org/dist/thrift/0.14.1/thrift-0.14.1.tar.gz==c64434548438df2cb1e53fb27c600e85 https://bootstrap.pypa.io/pip/2.7/get-pip.py==60e8267eb1b7bc71dc4843eb7bd294d3 +https://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-4.debian.tar.xz==aee97d7c05ca32815652bf899a029f9d +https://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19-4.dsc==72f67264021488c0219de23b840d0336 +https://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_1.8.19.orig.tar.gz==0aa41c99d93ce129cf00a9b8803ed8c9 https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.8.1.dsc==cf20d7dc926e6efb6946622f25728074 https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.8.1.tar.xz==bf690b241ae1ef3ac9226ba40995575a +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.debian.tar.xz==26fef506b62eb28e3356781a707c2440 +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31-1.dsc==f27b8eee722b8595ab45344e4bd3cbe7 +https://deb.debian.org/debian/pool/main/libt/libteam/libteam_1.31.orig.tar.xz==eec2e9c38e9a4c2cdb7e4954d110a118 https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2dea3117 https://deb.nodesource.com/node_14.x/dists/bookworm/Release==249bac8daff55b81a1b40c2c283e317d https://deb.nodesource.com/node_14.x/dists/bullseye/Release==6b7d50c433d129d4c6fd95bdf56070fa https://deb.nodesource.com/node_14.x/dists/buster/Release==42875141604382f0abb4d047f645dfe1 https://deb.nodesource.com/setup_14.x==c30873f4a513bb935afaf8f65e7de9e1 https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 -https://github.com/aristanetworks/sonic-firmware/raw/446f30ccd8626f904d89d5798da7294948e090a6/phy/phy-credo_1.0_amd64.deb==6c3d6c32477615cbe049b9161ce15bd5 +https://github.com/aristanetworks/sonic-firmware/raw/9e34da2a2d2d1e7e972cda3064b7b73c0558b322/phy/phy-credo_1.0_amd64.deb==a9c38d11ae4e34ca728d9b3b92fd89af https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64==44124b7ea28b7ffc38cb7a6b770b7844 https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-arm64==13442c16ab9043c7f351f74001c565ac https://github.com/CentecNetworks/sonic-binaries/raw/master/amd64/sai/libsaictc-dev_1.13.0-1_amd64.deb==b2e4b33541d4ab5de4c1b8eb4a783761 @@ -39,39 +47,39 @@ https://github.com/CentecNetworks/sonic-binaries/raw/master/arm64/sai/libsaictc_ https://github.com/CumulusNetworks/ifupdown2/archive/3.0.0-1.tar.gz==755459b3a58fbc11625336846cea7420 https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/arm64/sai-plugin/mrvllibsai_1.12.0-2_arm64.deb==60c59c062572deac78c25b8c52bcb76f https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/armhf/sai-plugin/mrvllibsai_1.13.0-1_armhf.deb==264acf1919d544ed64e53f0af2215a6b -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2134/fw-SPC-rel-13_2012_2134-EVB.mfa==a50d2bcc1d3e742e583d592288594444 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2134/fw-SPC2-rel-29_2012_2134-EVB.mfa==0d040575a0a347ca70ef9f37655d3321 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2134/fw-SPC3-rel-30_2012_2134-EVB.mfa==ebb0bacc32466089ff2167878b5fc0fd -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2134/fw-SPC4-rel-34_2012_2134-EVB.mfa==9542291b29bc4f3fca7455d5b94f6fce +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2202/fw-SPC-rel-13_2012_2202-EVB.mfa==a77569575da124cdcee7d9b4f09dc5f2 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2202/fw-SPC2-rel-29_2012_2202-EVB.mfa==5b1138d4f422eebfdabb17ef15dd9d4b +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2202/fw-SPC3-rel-30_2012_2202-EVB.mfa==006291d10adf09b230ee20317b984379 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/fw-2012.2202/fw-SPC4-rel-34_2012_2202-EVB.mfa==99205ae3ecd7f7bab2fd2e5657abd974 https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2311.26.0.28-bullseye-amd64/mlnx-sai-dbgsym_1.mlnx.SAIBuild2311.26.0.28_amd64.deb==a54897d02becbfa8e3b57e89d80b1a66 https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sai-SAIBuild2311.26.0.28-bullseye-amd64/mlnx-sai_1.mlnx.SAIBuild2311.26.0.28_amd64.deb==dc93d3163e4acd4876de7c4b39175b26 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/applibs-dev_1.mlnx.4.6.2134_amd64.deb==15149ca9fe03eb5e2340e2f18469be64 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/applibs_1.mlnx.4.6.2134_amd64.deb==2a41a4b0e13ba29256d790c78efdac48 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sx-complib-dev_1.mlnx.4.6.2134_amd64.deb==14e239c58de10ea9389c8e427f568d36 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sx-complib_1.mlnx.4.6.2134_amd64.deb==38f6460babc1cc863cf914225c423639 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sx-gen-utils-dev_1.mlnx.4.6.2134_amd64.deb==6e4ad0ec7e2643a6dd4ad9b248f53e38 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sx-gen-utils_1.mlnx.4.6.2134_amd64.deb==30cbd0844d91983c286beffb8ebcf7c5 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sxd-libs-dev_1.mlnx.4.6.2134_amd64.deb==a1f0791578148c42a6026253555a65b9 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bookworm-amd64/sxd-libs_1.mlnx.4.6.2134_amd64.deb==d35804d21aa0105ad15d4ca7825987f5 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/applibs-dev_1.mlnx.4.6.2134_amd64.deb==15149ca9fe03eb5e2340e2f18469be64 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/applibs_1.mlnx.4.6.2134_amd64.deb==0c7bd2ee3630ef836f3e14b5902be53d -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/python-sdk-api_1.mlnx.4.6.2134_amd64.deb==3a9c3b6b6dd027e15a51f9855ce19e03 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-acl-helper-dev_1.mlnx.4.6.2134_amd64.deb==9d5ee168b7b350acccaae4d44580aea0 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-acl-helper_1.mlnx.4.6.2134_amd64.deb==43710bc5830e797dd9c4a5319b5b64e2 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-complib-dev_1.mlnx.4.6.2134_amd64.deb==14e239c58de10ea9389c8e427f568d36 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-complib_1.mlnx.4.6.2134_amd64.deb==d37f3e3f22013b1f733ef1cbb364c1d3 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-examples-dev_1.mlnx.4.6.2134_amd64.deb==5700029cfa1cbf9797e9742ebc9079d5 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-examples_1.mlnx.4.6.2134_amd64.deb==67d433a0b1364d8679354bd0ddc705e1 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-gen-utils-dev_1.mlnx.4.6.2134_amd64.deb==f16637de98bc626f627cc084fdc708be -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-gen-utils_1.mlnx.4.6.2134_amd64.deb==720f167a853a8b72f7897f0787d5bc16 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-hash-calc_1.mlnx.4.6.2134_amd64.deb==9c789356eb185ed0884cf3047e478878 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-obj-desc-lib-dev_1.mlnx.4.6.2134_amd64.deb==07d626287b14a26dbf41b083d52cf40e -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sx-obj-desc-lib_1.mlnx.4.6.2134_amd64.deb==83c087c3c08c12bca3a604eb8d685f49 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sxd-libs-dev_1.mlnx.4.6.2134_amd64.deb==a1f0791578148c42a6026253555a65b9 -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/sxd-libs_1.mlnx.4.6.2134_amd64.deb==9f87dc3d959d7317a5660257d809482f -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/wjh-libs-dev_1.mlnx.4.6.2134_amd64.deb==224012ba52edb71e6c2b64dcc2f5a58f -https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2134-bullseye-amd64/wjh-libs_1.mlnx.4.6.2134_amd64.deb==38da8dfb98d6c95faebd026ac1fd64c6 -https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads/4.6.2134.zip==00864904463c139da4e2654eef31d503 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/applibs-dev_1.mlnx.4.6.2202_amd64.deb==ebfd6c3fc04ffa476a1dce5b66d44596 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/applibs_1.mlnx.4.6.2202_amd64.deb==d0d3c9892c9cdd995b7c64a7123aca91 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sx-complib-dev_1.mlnx.4.6.2202_amd64.deb==1cab8319bdc99a1d620adf3f855affa2 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sx-complib_1.mlnx.4.6.2202_amd64.deb==dc4c6711f0c4d4fd436d762dd2177335 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sx-gen-utils-dev_1.mlnx.4.6.2202_amd64.deb==8ba8149ba850cd0cb746171b53ebf873 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sx-gen-utils_1.mlnx.4.6.2202_amd64.deb==753706a5d3ea576dd51e27f4237399d1 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sxd-libs-dev_1.mlnx.4.6.2202_amd64.deb==fe94691ba8da67928faa50e618242848 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bookworm-amd64/sxd-libs_1.mlnx.4.6.2202_amd64.deb==5147b480f575bd54a0df695fc1f740eb +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/applibs-dev_1.mlnx.4.6.2202_amd64.deb==ebfd6c3fc04ffa476a1dce5b66d44596 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/applibs_1.mlnx.4.6.2202_amd64.deb==2acd562c1c28cd373c35bd2f66301339 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/python-sdk-api_1.mlnx.4.6.2202_amd64.deb==69e6543617825b2dbd1a6191ca5cff8e +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-acl-helper-dev_1.mlnx.4.6.2202_amd64.deb==9cc5b35e0a0630b0a8f639cdc039c3c1 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-acl-helper_1.mlnx.4.6.2202_amd64.deb==5187fca944b21b2859e800b39871ddc0 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-complib-dev_1.mlnx.4.6.2202_amd64.deb==1cab8319bdc99a1d620adf3f855affa2 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-complib_1.mlnx.4.6.2202_amd64.deb==2644363c7f0b8832e05329c86c6e9164 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-examples-dev_1.mlnx.4.6.2202_amd64.deb==637b81546cd1bf9dd6cb0f42f3fce846 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-examples_1.mlnx.4.6.2202_amd64.deb==b7cabdf4c84e1cab8a34796e3fe47058 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-gen-utils-dev_1.mlnx.4.6.2202_amd64.deb==7410da8e7603d48378b6d0b8a6a19fed +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-gen-utils_1.mlnx.4.6.2202_amd64.deb==271db53cba7c0bab35599113b8134fce +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-hash-calc_1.mlnx.4.6.2202_amd64.deb==d997b3a9adfa0fa5aef34414d4bc94c9 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-obj-desc-lib-dev_1.mlnx.4.6.2202_amd64.deb==c61007a50d203f0d08cd905909255ef7 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sx-obj-desc-lib_1.mlnx.4.6.2202_amd64.deb==3ef17ef44493ab90629b5c3a9d39b2cb +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sxd-libs-dev_1.mlnx.4.6.2202_amd64.deb==fe94691ba8da67928faa50e618242848 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/sxd-libs_1.mlnx.4.6.2202_amd64.deb==d6bb87c432d60d656ad053b9b1d42e44 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/wjh-libs-dev_1.mlnx.4.6.2202_amd64.deb==984e5be1dbb1fb1ab8c15e57eaa979d6 +https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins/releases/download/sdk-4.6.2202-bullseye-amd64/wjh-libs_1.mlnx.4.6.2202_amd64.deb==aa1e61b1d91de49c170079ea5b2fca19 +https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads/4.6.2202.zip==2d839bdb59974f4018e10296af2a147a https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz==6f56ef28c93cee644e8c4aaaef7cfb55 https://github.com/pensando/dsc-artifacts/blob/main/docker-dpu-base.gz?raw=true==26caa959af69bc5f895dce0cd02557a8 https://github.com/pensando/dsc-artifacts/blob/main/libsai_1.10.1-0_arm64.deb?raw=true==f6f9619ecb727c0491431f3f019ac5b3 @@ -93,55 +101,78 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang/libyang https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.9+dfsg-4+deb11u1.debian.tar.xz==a3e626b1ed5adc26430e1727d81641df https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.9+dfsg-4+deb11u1.dsc==a36ed553b5034b7400d9e9a8d529b27e https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.9+dfsg.orig.tar.xz==6c2d346ce3320e8999500497e9bacc99 -https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.4.1-3.debian.tar.xz?sv=2020-04-08&st=2021-12-14T08%3A00%3A00Z&se=2030-12-14T18%3A18%3A00Z&sr=b&sp=r&sig=C8aYSvaQgMJ58Z13kFY0Wr0J0QF6i7WCeET9%2BpF%2BAxc%3D==e8d1e99b4b9e93f5dde860f6d55f42e3 -https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.4.1-3.dsc?sv=2020-04-08&st=2021-12-14T00%3A00%3A00Z&se=2050-12-15T00%3A00%3A00Z&sr=b&sp=r&sig=fIy6dVz3s59K0TiMkTlwSWN8lCzRl3i76ruAtROhfWA%3D==df3ed0dd965589fd09bf6a2920bc273e -https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.4.1.orig.tar.gz?sv=2020-04-08&st=2021-12-14T00%3A00%3A00Z&se=2050-12-15T00%3A00%3A00Z&sr=b&sp=r&sig=gpihyZv%2Fr0bVrCUKCKwpS4bIoqiPpdd%2BgCfuUGNHOUc%3D==780d14908dc1a6aa2790de376ab56b7a -https://sonicstorage.blob.core.windows.net/packages/debian/thrift_0.11.0-4.debian.tar.xz?sv=2015-04-05&sr=b&sig=dj9uJ5YjUNupcmuxSX6%2F5IS9NqaGAyM9iF2h%2F2rROZA%3D&se=2156-02-02T17%3A19%3A34Z&sp=r==52ad383b97ad051f4d1d25b54aaad569 -https://sonicstorage.blob.core.windows.net/packages/debian/thrift_0.11.0-4.dsc?sv=2015-04-05&sr=b&sig=pWfg55owvQ2jZtZ6ylHp0OP8uZyfc9sxO6H%2BP4Ez7w4%3D&se=2156-02-02T17%3A20%3A05Z&sp=r==6917fe7b3ada9313be94713dd50fee7b -https://sonicstorage.blob.core.windows.net/packages/debian/thrift_0.11.0.orig.tar.gz?sv=2015-04-05&sr=b&sig=%2BrAjWESiSNRCMN7NGqEqVGceLefpwwS%2FWPKEfJpPLSQ%3D&se=2156-02-02T17%3A17%3A20Z&sp=r==0be59730ebce071eceaf6bfdb8d3a20e -https://sonicstorage.blob.core.windows.net/packages/onie/onie-recovery-x86_64-kvm_x86_64-r0.iso?sv=2015-04-05&sr=b&sig=XMAk1cttBFM369CMbihe5oZgXwe4uaDVfwg4CTLT%2F5U%3D&se=2155-10-13T10%3A40%3A13Z&sp=r==54e11e450a461b1f4ae39c3ce3f15eff -https://sonicstorage.blob.core.windows.net/packages/onie/onie-recovery-x86_64-kvm_x86_64_4_asic-r0.iso?sv=2020-04-08&st=2021-08-27T22%3A41%3A07Z&se=2030-08-28T22%3A41%3A00Z&sr=b&sp=r&sig=zyaX7rHnE5jXldpgrnWq1nvsfmMTrVCSuESZqrIxDLc%3D==1d8b8d3fa37f842d0184b5205be22be9 -https://sonicstorage.blob.core.windows.net/packages/onie/onie-recovery-x86_64-kvm_x86_64_6_asic-r0.iso?sv=2020-04-08&st=2021-08-27T22%3A42%3A24Z&se=2030-08-28T22%3A42%3A00Z&sr=b&sp=r&sig=RqbtHJt8Hvy7j78jt3TgXo27T7zjdUDfSxqmOID1YUU%3D==58494305d4ac201daedf9364a1018a1b +https://sonicstorage.blob.core.windows.net/public/20190307/bcmcmd==b8aefc751bdf93218716bca6797460ff +https://sonicstorage.blob.core.windows.net/public/20190307/dsserve==f9d4b815ebb9be9f755dedca8a51170d +https://sonicstorage.blob.core.windows.net/public/credosai/libsaicredo-owl_0.9.3_amd64.deb?==c69922a1589cf5615a3fddd5b66aa296 +https://sonicstorage.blob.core.windows.net/public/credosai/libsaicredo_0.9.3_amd64.deb==0400bc2015f56bff7d4283c030be26cc +https://sonicstorage.blob.core.windows.net/public/debian/socat_1.7.4.1-3.debian.tar.xz==e8d1e99b4b9e93f5dde860f6d55f42e3 +https://sonicstorage.blob.core.windows.net/public/debian/socat_1.7.4.1-3.dsc==df3ed0dd965589fd09bf6a2920bc273e +https://sonicstorage.blob.core.windows.net/public/debian/socat_1.7.4.1.orig.tar.gz==780d14908dc1a6aa2790de376ab56b7a +https://sonicstorage.blob.core.windows.net/public/debian/thrift_0.11.0-4.debian.tar.xz==52ad383b97ad051f4d1d25b54aaad569 +https://sonicstorage.blob.core.windows.net/public/debian/thrift_0.11.0-4.dsc==6917fe7b3ada9313be94713dd50fee7b +https://sonicstorage.blob.core.windows.net/public/debian/thrift_0.11.0.orig.tar.gz==0be59730ebce071eceaf6bfdb8d3a20e https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/amd64/golang-1.15-go_1.15.15-1~deb11u4%2Bfips_amd64.deb==b60f6db62805696b47ab422ab798fe56 https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/amd64/golang-1.15-src_1.15.15-1~deb11u4%2Bfips_amd64.deb==1c920937aa49b602a1bfec3c49747131 https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/arm64/golang-1.15-go_1.15.15-1~deb11u4%2Bfips_arm64.deb==0b70c104b907db13ff2fe5d52b3d0008 https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/arm64/golang-1.15-src_1.15.15-1~deb11u4%2Bfips_arm64.deb==1d06900f03424fa5ce34a782605983fe -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/golang-1.15-doc_1.15.15-1~deb11u4+fips_all.deb==72ead09139135d4ecd91b76c89128567 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/golang-1.15-go_1.15.15-1~deb11u4+fips_amd64.deb==145e103357a915cc759cc93de602b631 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/golang-1.15-src_1.15.15-1~deb11u4+fips_amd64.deb==1c1a46d5599be92777702643c37d5751 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/golang-1.15_1.15.15-1~deb11u4+fips_all.deb==847bc1fc5ce9c8ebae5176947ab34d30 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libk5crypto3_1.18.3-6+deb11u1+fips_amd64.deb==5e8de29d5f6844f71f15cbf0c3993f1c -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libpython3.9-minimal_3.9.2-1+fips_amd64.deb==e47afaa81099fa2949a2dce75cffb6da -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libpython3.9-stdlib_3.9.2-1+fips_amd64.deb==ab079d683259b241186cc1b3c68f3d73 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libpython3.9_3.9.2-1+fips_amd64.deb==c405132eacaf059c7c903f853d48be7e -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libssl-dev_1.1.1n-0+deb11u5+fips_amd64.deb==7deccb6cb0197bd9dc257d54505533cf -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libssl-doc_1.1.1n-0+deb11u5+fips_all.deb==3ac7462c370d85e42c03b11d26f35016 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/libssl1.1_1.1.1n-0+deb11u5+fips_amd64.deb==6a4505b82957d711e983e03364275521 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/openssh-client_8.4p1-5+deb11u2+fips_amd64.deb==1fb734b040398b0fb9c674385253b993 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/openssh-server_8.4p1-5+deb11u2+fips_amd64.deb==8ec9f1fbfedd6c36312c5181d9950b58 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/openssh-sftp-server_8.4p1-5+deb11u2+fips_amd64.deb==02e8be0633aff33497655261256eadca -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/openssl_1.1.1n-0+deb11u5+fips_amd64.deb==ee086d7e1fb0cfd36513ec242381af53 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/python3.9-minimal_3.9.2-1+fips_amd64.deb==44c28ede910f014efc84118bc8a4b73c -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/python3.9_3.9.2-1+fips_amd64.deb==30be224443931a2a3428aa270b87384a -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/amd64/symcrypt-openssl_0.9_amd64.deb==9095ce7fd2283806f0c3ce8a60d36ad2 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/golang-1.15-doc_1.15.15-1~deb11u4+fips_all.deb==72ead09139135d4ecd91b76c89128567 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/golang-1.15-go_1.15.15-1~deb11u4+fips_arm64.deb==b59f315800ca2ec31de79136dfb8979d -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/golang-1.15-src_1.15.15-1~deb11u4+fips_arm64.deb==0038c68ed1e3adb1b43434af81cff678 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/golang-1.15_1.15.15-1~deb11u4+fips_all.deb==847bc1fc5ce9c8ebae5176947ab34d30 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libk5crypto3_1.18.3-6+deb11u1+fips_arm64.deb==0bb2a2d23f73e882d91b2e256aad08f6 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libpython3.9-minimal_3.9.2-1+fips_arm64.deb==7e6ac5f9bce1ecd59532ed669040436d -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libpython3.9-stdlib_3.9.2-1+fips_arm64.deb==1b86a9d8bafe7cddc484f4ac1010ee07 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libpython3.9_3.9.2-1+fips_arm64.deb==edae5c269e2c401873e7cff3d4f93a7a -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libssl-dev_1.1.1n-0+deb11u5+fips_arm64.deb==2116b0e949a521b02098f01aee5a33d4 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libssl-doc_1.1.1n-0+deb11u5+fips_all.deb==3ac7462c370d85e42c03b11d26f35016 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/libssl1.1_1.1.1n-0+deb11u5+fips_arm64.deb==a6a6a6f2d23d91398f44570da6e2e80c -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/openssh-client_8.4p1-5+deb11u2+fips_arm64.deb==b30c745ca94e392740c67225802e9068 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/openssh-server_8.4p1-5+deb11u2+fips_arm64.deb==8ab6d9e3bac9d486bda5664e40f634ef -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/openssh-sftp-server_8.4p1-5+deb11u2+fips_arm64.deb==73c51fa8f165a014571c2bdbd843c517 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/openssl_1.1.1n-0+deb11u5+fips_arm64.deb==5c16b501e97678e7f55c616afa6423bb -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/python3.9-minimal_3.9.2-1+fips_arm64.deb==3ea50a9bb61102b7e2ffe8f7b79c3d5f -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/python3.9_3.9.2-1+fips_arm64.deb==4d6307dabcd3060235d6188cfa0346b8 -https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.9/arm64/symcrypt-openssl_0.9_arm64.deb==5138fe3d77f84c995ed412f064c07951 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/golang-1.15-doc_1.15.15-1~deb11u4+fips_all.deb==72ead09139135d4ecd91b76c89128567 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/golang-1.15-go_1.15.15-1~deb11u4+fips_amd64.deb==145e103357a915cc759cc93de602b631 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/golang-1.15-src_1.15.15-1~deb11u4+fips_amd64.deb==1c1a46d5599be92777702643c37d5751 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/golang-1.15_1.15.15-1~deb11u4+fips_all.deb==847bc1fc5ce9c8ebae5176947ab34d30 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/krb5-multidev_1.18.3-6+deb11u4+fips_amd64.deb==41c7aecaf738ceb8e0348b9420d0aa3f +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libgssapi-krb5-2_1.18.3-6+deb11u4+fips_amd64.deb==9ab263ae9192bf4c964ea3ad86012c9a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libgssrpc4_1.18.3-6+deb11u4+fips_amd64.deb==4913523ed341663cd9a8bd2ea0e5c64a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libk5crypto3_1.18.3-6+deb11u4+fips_amd64.deb==5c89f642c4265a2f53d8788f93b37aaf +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libkadm5clnt-mit12_1.18.3-6+deb11u4+fips_amd64.deb==19a7a6eeae8387d4114a6b76ff5fc7c8 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libkadm5srv-mit12_1.18.3-6+deb11u4+fips_amd64.deb==2bdb2e358091302bb66f9208cf082807 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libkrb5-3_1.18.3-6+deb11u4+fips_amd64.deb==ba2b9c93e084c442cb1495eef5979b05 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libkrb5-dev_1.18.3-6+deb11u4+fips_amd64.deb==6ffd25f46089ad674fe20f074454297c +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libkrb5support0_1.18.3-6+deb11u4+fips_amd64.deb==851abebe415c61f98bfc5024ef2e54fb +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libpython3.9-minimal_3.9.2-1+fips_amd64.deb==71b75222c8bcd5ede55693a9223a3246 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libpython3.9-stdlib_3.9.2-1+fips_amd64.deb==f4274260999ba26346dc60f95b1cf91c +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libpython3.9_3.9.2-1+fips_amd64.deb==c405132eacaf059c7c903f853d48be7e +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libssl-dev_1.1.1n-0+deb11u5+fips_amd64.deb==7deccb6cb0197bd9dc257d54505533cf +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libssl-doc_1.1.1n-0+deb11u5+fips_all.deb==3ac7462c370d85e42c03b11d26f35016 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libssl1.1_1.1.1n-0+deb11u5+fips_amd64.deb==6a4505b82957d711e983e03364275521 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/openssh-client_8.4p1-5+deb11u2+fips_amd64.deb==1fb734b040398b0fb9c674385253b993 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/openssh-server_8.4p1-5+deb11u2+fips_amd64.deb==8ec9f1fbfedd6c36312c5181d9950b58 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/openssh-sftp-server_8.4p1-5+deb11u2+fips_amd64.deb==02e8be0633aff33497655261256eadca +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/openssl_1.1.1n-0+deb11u5+fips_amd64.deb==ee086d7e1fb0cfd36513ec242381af53 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/python3.9-minimal_3.9.2-1+fips_amd64.deb==ff2d0b457ef7872e0a9c6da65cd2f146 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/python3.9_3.9.2-1+fips_amd64.deb==30be224443931a2a3428aa270b87384a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/symcrypt-openssl_0.10_amd64.deb==01bc30a1bc6fc07be723258f7a6566b6 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/golang-1.15-doc_1.15.15-1~deb11u4+fips_all.deb==72ead09139135d4ecd91b76c89128567 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/golang-1.15-go_1.15.15-1~deb11u4+fips_arm64.deb==b59f315800ca2ec31de79136dfb8979d +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/golang-1.15-src_1.15.15-1~deb11u4+fips_arm64.deb==0038c68ed1e3adb1b43434af81cff678 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/golang-1.15_1.15.15-1~deb11u4+fips_all.deb==847bc1fc5ce9c8ebae5176947ab34d30 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/krb5-multidev_1.18.3-6+deb11u4+fips_arm64.deb==53130dd865aeedf3f99cc0deca4ae50a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libgssapi-krb5-2_1.18.3-6+deb11u4+fips_arm64.deb==49255677e3c149d29d059aa2af18747a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libgssrpc4_1.18.3-6+deb11u4+fips_arm64.deb==1f939eb23261667a9e920d1acb08969c +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libk5crypto3_1.18.3-6+deb11u4+fips_arm64.deb==5b7eb6aa93b20949d7422ad25fe73549 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libkadm5clnt-mit12_1.18.3-6+deb11u4+fips_arm64.deb==c5d5a81770b64a33d6d87f288fdb974c +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libkadm5srv-mit12_1.18.3-6+deb11u4+fips_arm64.deb==267114332521c5de4c88de464fc098de +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libkrb5-3_1.18.3-6+deb11u4+fips_arm64.deb==ce88c2527f79baa4cd29c71580e57807 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libkrb5-dev_1.18.3-6+deb11u4+fips_arm64.deb==6af1cfd53e8e55b5619365d4a462ee35 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libkrb5support0_1.18.3-6+deb11u4+fips_arm64.deb==86768f22a3d883d9d19a814e075a9a1b +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libpython3.9-minimal_3.9.2-1+fips_arm64.deb==870a96b0d9d7fe753d495ad6574e4c03 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libpython3.9-stdlib_3.9.2-1+fips_arm64.deb==f944ca0b75549d6f24d07deb1ea897d4 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libpython3.9_3.9.2-1+fips_arm64.deb==edae5c269e2c401873e7cff3d4f93a7a +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libssl-dev_1.1.1n-0+deb11u5+fips_arm64.deb==2116b0e949a521b02098f01aee5a33d4 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libssl-doc_1.1.1n-0+deb11u5+fips_all.deb==3ac7462c370d85e42c03b11d26f35016 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/libssl1.1_1.1.1n-0+deb11u5+fips_arm64.deb==a6a6a6f2d23d91398f44570da6e2e80c +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/openssh-client_8.4p1-5+deb11u2+fips_arm64.deb==b30c745ca94e392740c67225802e9068 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/openssh-server_8.4p1-5+deb11u2+fips_arm64.deb==8ab6d9e3bac9d486bda5664e40f634ef +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/openssh-sftp-server_8.4p1-5+deb11u2+fips_arm64.deb==73c51fa8f165a014571c2bdbd843c517 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/openssl_1.1.1n-0+deb11u5+fips_arm64.deb==5c16b501e97678e7f55c616afa6423bb +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/python3.9-minimal_3.9.2-1+fips_arm64.deb==3ad5f86b07a3f5794ddee1dcd69c1d7e +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/python3.9_3.9.2-1+fips_arm64.deb==4d6307dabcd3060235d6188cfa0346b8 +https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/arm64/symcrypt-openssl_0.10_arm64.deb==7b709cbe2ccbe62fa207b8cae0f88d46 +https://sonicstorage.blob.core.windows.net/public/onie/onie-recovery-x86_64-kvm_x86_64-r0.iso==54e11e450a461b1f4ae39c3ce3f15eff +https://sonicstorage.blob.core.windows.net/public/onie/onie-recovery-x86_64-kvm_x86_64_4_asic-r0.iso==1d8b8d3fa37f842d0184b5205be22be9 +https://sonicstorage.blob.core.windows.net/public/onie/onie-recovery-x86_64-kvm_x86_64_6_asic-r0.iso==58494305d4ac201daedf9364a1018a1b +https://sonicstorage.blob.core.windows.net/public/redis/redis-tools_6.0.6-1_bpo10+1_arm64.deb==282b4766cc9ac7d8bb70622bd69d9f5c +https://sonicstorage.blob.core.windows.net/public/redis/redis-tools_6.0.6-1_bpo10+1_armhf.deb==62f287117afab6caaec564232ebbb5de +https://sonicstorage.blob.core.windows.net/public/redis/redis-tools_6.0.6-1~bpo10+1_amd64.deb==2d58c3c3358290c04d5e0ba70f297f18 https://sonicstorage.blob.core.windows.net/public/sai/bcmpai/REL_3.11/3.11/libsaibroncos_3.11_amd64.deb==6e21a16126e833516a9659d4c35c284e https://storage.googleapis.com/golang/go1.15.15.linux-amd64.tar.gz==b75227438c6129b5013da053b3aa3f38 https://storage.googleapis.com/golang/go1.15.15.linux-arm64.tar.gz==6d721146a9195592d92a80cf27d475f9 diff --git a/files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm b/files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm new file mode 100644 index 000000000000..6001510d7ab3 --- /dev/null +++ b/files/build/versions/dockers/docker-base-bookworm/versions-deb-bookworm @@ -0,0 +1,80 @@ +ca-certificates==20230311 +curl==7.88.1-10+deb12u5 +iproute2==6.1.0-3 +jq==1.6-2.1 +less==590-2 +libatomic1==12.2.0-14 +libbpf1==1:1.1.0-1 +libbrotli1==1.0.9-2+b6 +libbsd0==0.11.7-2 +libc-bin==2.36-9+deb12u4 +libc6==2.36-9+deb12u4 +libcap2-bin==1:2.66-4 +libcurl4==7.88.1-10+deb12u5 +libdaemon0==0.14-7.1 +libdbus-1-3==1.14.10-1~deb12u1 +libelf1==0.188-2.1 +libestr0==0.1.11-1 +libexpat1==2.5.0-1 +libfastjson4==1.2304.0-1 +libgdbm-compat4==1.23-3 +libgdbm6==1.23-3 +libgssapi-krb5-2==1.20.1-2+deb12u1 +libjansson4==2.14-2 +libjemalloc2==5.3.0-1 +libjq1==1.6-2.1 +libk5crypto3==1.20.1-2+deb12u1 +libkeyutils1==1.6.3-2 +libkrb5-3==1.20.1-2+deb12u1 +libkrb5support0==1.20.1-2+deb12u1 +libldap-2.5-0==2.5.13+dfsg-5 +liblognorm5==2.0.6-4 +liblzf1==3.6-3 +libmnl0==1.0.4-3 +libncursesw6==6.4-4 +libnghttp2-14==1.52.0-1+deb12u1 +libnorm1==1.5.9+dfsg-2 +libnsl2==1.3.0-2 +libonig5==6.9.8-1 +libperl5.36==5.36.0-7+deb12u1 +libpgm-5.3-0==5.3.128~dfsg-2 +libproc2-0==2:4.0.2-3 +libpsl5==0.21.2-1 +libpython3-stdlib==3.11.2-1+b1 +libpython3.11-minimal==3.11.2-6 +libpython3.11-stdlib==3.11.2-6 +libreadline8==8.2-1.3 +librtmp1==2.4+20151223.gitfa8646d.1-2+b2 +libsasl2-2==2.1.28+dfsg-10 +libsasl2-modules-db==2.1.28+dfsg-10 +libsodium23==1.0.18-1 +libsqlite3-0==3.40.1-2 +libssh2-1==1.10.0-3+b1 +libssl3==3.0.11-1~deb12u2 +libtirpc-common==1.3.3+ds-1 +libtirpc3==1.3.3+ds-1 +libwrap0==7.6.q-32 +libxtables12==1.8.9-2 +libzmq5==4.3.4-6 +media-types==10.0.0 +net-tools==2.10-0.1 +openssl==3.0.11-1~deb12u2 +perl==5.36.0-7+deb12u1 +perl-modules-5.36==5.36.0-7+deb12u1 +procps==2:4.0.2-3 +python-is-python3==3.11.1-3 +python3==3.11.2-1+b1 +python3-distutils==3.11.2-3 +python3-lib2to3==3.11.2-3 +python3-minimal==3.11.2-1+b1 +python3-pkg-resources==66.1.1-1 +python3-setuptools==66.1.1-1 +python3-wheel==0.38.4-2 +python3.11==3.11.2-6 +python3.11-minimal==3.11.2-6 +readline-common==8.2-1.3 +redis-tools==5:7.0.15-1~deb12u1 +rsyslog==8.2302.0-1 +socat==1.7.4.1-3 +vim-common==2:9.0.1378-2 +vim-tiny==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-base-bookworm/versions-py3 b/files/build/versions/dockers/docker-base-bookworm/versions-py3 new file mode 100644 index 000000000000..0ef39410ff1a --- /dev/null +++ b/files/build/versions/dockers/docker-base-bookworm/versions-py3 @@ -0,0 +1,13 @@ +async-timeout==4.0.3 +j2cli==0.3.10 +jinja2==3.1.3 +markupsafe==2.1.5 +pip==24.0 +python-lzf==0.2.4 +rdbtools==0.1.15 +redis==5.0.3 +setuptools==66.1.1 +supervisor==4.2.5 +supervisord-dependent-startup==1.4.0 +toposort==1.10 +wheel==0.38.4 diff --git a/files/build/versions/dockers/docker-base-bullseye/versions-deb-bullseye b/files/build/versions/dockers/docker-base-bullseye/versions-deb-bullseye index 7ab5e0cfbcb9..716540f65ecb 100644 --- a/files/build/versions/dockers/docker-base-bullseye/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-base-bullseye/versions-deb-bullseye @@ -21,7 +21,7 @@ libgdbm6==1.19-2 libjansson4==2.13.1-1.1 libjemalloc2==5.2.1-3 libjq1==1.6-2.1 -libk5crypto3==1.18.3-6+deb11u1+fips +libk5crypto3==1.18.3-6+deb11u4+fips libldap-2.4-2==2.4.57+dfsg-3+deb11u1 liblognorm5==2.0.5-1.1 liblua5.1-0==5.1.5-8.1+b3 @@ -34,7 +34,7 @@ libncursesw6==6.2+20201114-2+deb11u2 libnghttp2-14==1.43.0-1+deb11u1 libnorm1==1.5.9+dfsg-2 libonig5==6.9.6-1.1 -libperl5.32==5.32.1-4+deb11u2 +libperl5.32==5.32.1-4+deb11u3 libpgm-5.3-0==5.3.128~dfsg-2 libprocps8==2:3.3.17-5 libpsl5==0.21.0-1.2 @@ -52,14 +52,14 @@ libssl-dev==1.1.1n-0+deb11u5+fips libssl1.1==1.1.1n-0+deb11u5+fips libwrap0==7.6.q-31 libxtables12==1.8.7-1 -libzmq5==4.3.4-1 +libzmq5==4.3.4-1+deb11u1 lua-bitop==1.0.2-5 lua-cjson==2.1.0+dfsg-2.1 media-types==4.0.0 net-tools==1.60+git20181103.0eebece-1 openssl==1.1.1n-0+deb11u5+fips -perl==5.32.1-4+deb11u2 -perl-modules-5.32==5.32.1-4+deb11u2 +perl==5.32.1-4+deb11u3 +perl-modules-5.32==5.32.1-4+deb11u3 procps==2:3.3.17-5 python-is-python3==3.9.2-1 python3==3.9.2-3 diff --git a/files/build/versions/dockers/docker-base-bullseye/versions-py3 b/files/build/versions/dockers/docker-base-bullseye/versions-py3 index 5145466a0c52..78376cb1748e 100644 --- a/files/build/versions/dockers/docker-base-bullseye/versions-py3 +++ b/files/build/versions/dockers/docker-base-bullseye/versions-py3 @@ -1,11 +1,11 @@ async-timeout==4.0.3 j2cli==0.3.10 jinja2==3.1.3 -markupsafe==2.1.4 -pip==23.3.2 +markupsafe==2.1.5 +pip==24.0 python-lzf==0.2.4 rdbtools==0.1.15 -redis==5.0.1 +redis==5.0.3 setuptools==49.6.0 supervisor==4.2.1 supervisord-dependent-startup==1.4.0 diff --git a/files/build/versions/dockers/docker-base-buster/versions-deb-buster b/files/build/versions/dockers/docker-base-buster/versions-deb-buster index ab4875803369..7ecdb0a85696 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -1,9 +1,9 @@ ca-certificates==20200601~deb10u2 -curl==7.64.0-4+deb10u8 +curl==7.64.0-4+deb10u9 jq==1.5+dfsg-2+b1 less==487-0.1+b1 libatomic1==8.3.0-6 -libcurl4==7.64.0-4+deb10u8 +libcurl4==7.64.0-4+deb10u9 libdaemon0==0.14-7 libdbus-1-3==1.12.28-0+deb10u1 libestr0==0.1.10-2.1 @@ -33,8 +33,8 @@ libpgm-5.2-0==5.2.122~dfsg-3 libprocps7==2:3.3.15-2 libpsl5==0.20.2-2 libpython3-stdlib==3.7.3-1 -libpython3.7-minimal==3.7.3-2+deb10u6 -libpython3.7-stdlib==3.7.3-2+deb10u6 +libpython3.7-minimal==3.7.3-2+deb10u7 +libpython3.7-stdlib==3.7.3-2+deb10u7 libreadline7==7.0-5 librtmp1==2.4+20151223.gitfa8646d.1-2 libsasl2-2==2.1.27+dfsg-1+deb10u2 @@ -58,8 +58,8 @@ python3==3.7.3-1 python3-distutils==3.7.3-1 python3-lib2to3==3.7.3-1 python3-minimal==3.7.3-1 -python3.7==3.7.3-2+deb10u6 -python3.7-minimal==3.7.3-2+deb10u6 +python3.7==3.7.3-2+deb10u7 +python3.7-minimal==3.7.3-2+deb10u7 readline-common==7.0-5 redis-tools==5:6.0.6-1~bpo10+1 rsyslog==8.1901.0-1+deb10u2 diff --git a/files/build/versions/dockers/docker-base-buster/versions-py3 b/files/build/versions/dockers/docker-base-buster/versions-py3 index 09ce5c537272..927a1686e911 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-py3 +++ b/files/build/versions/dockers/docker-base-buster/versions-py3 @@ -1,7 +1,7 @@ j2cli==0.3.10 jinja2==3.1.3 -markupsafe==2.1.4 -pip==23.3.2 +markupsafe==2.1.5 +pip==24.0 setuptools==49.6.0 supervisor==4.2.1 supervisord-dependent-startup==1.4.0 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm b/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm new file mode 100644 index 000000000000..dd20b082d8f7 --- /dev/null +++ b/files/build/versions/dockers/docker-config-engine-bookworm/versions-deb-bookworm @@ -0,0 +1,37 @@ +apt-utils==2.6.1 +binutils-common==2.40-2 +dpkg-dev==1.21.22 +icu-devtools==72.1-3 +libboost-serialization1.74.0==1.74.0+ds1-21 +libc-dev-bin==2.36-9+deb12u4 +libc6-dev==2.36-9+deb12u4 +libcrypt-dev==1:4.4.33-2 +libhiredis0.14==0.14.1-3 +libicu-dev==72.1-3 +libicu72==72.1-3 +libjs-jquery==3.6.1+dfsg+~3.5.14-1 +libnl-3-200==3.5.0-1 +libnl-cli-3-200==3.5.0-1 +libnl-genl-3-200==3.5.0-1 +libnl-nf-3-200==3.5.0-1 +libnl-route-3-200==3.5.0-1 +libnsl-dev==1.3.0-2 +libpcre3==2:8.39-15 +libpython3.11==3.11.2-6 +libswsscommon==1.0.0 +libtirpc-dev==1.3.3+ds-1 +libxml2==2.9.14+dfsg-1.3~deb12u1 +libxml2-dev==2.9.14+dfsg-1.3~deb12u1 +libxslt1-dev==1.1.35-1 +libxslt1.1==1.1.35-1 +libyaml-0-2==0.2.5-1 +libyang==1.0.73 +libyang-cpp==1.0.73 +linux-libc-dev==6.1.76-1 +python3-swsscommon==1.0.0 +python3-yaml==6.0-3+b2 +python3-yang==1.0.73 +rpcsvc-proto==1.4.3-1 +sonic-db-cli==1.0.0 +sonic-eventd==1.0.0-0 +zlib1g-dev==1:1.2.13.dfsg-1 diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-mirror b/files/build/versions/dockers/docker-config-engine-bookworm/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-config-engine-bookworm/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 b/files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 new file mode 100644 index 000000000000..cf2c539922ff --- /dev/null +++ b/files/build/versions/dockers/docker-config-engine-bookworm/versions-py3 @@ -0,0 +1,16 @@ +bitarray==2.8.1 +ijson==3.2.3 +ipaddress==1.0.23 +jsondiff==2.0.0 +lxml==4.9.1 +natsort==6.2.1 +netaddr==0.8.0 +pyang==2.6.0 +pyangbind==0.8.2 +pyyaml==6.0.1 +redis==5.0.1 +redis-dump-load==1.1 +regex==2023.12.25 +six==1.16.0 +tabulate==0.9.0 +xmltodict==0.12.0 diff --git a/files/build/versions/dockers/docker-config-engine-bullseye/versions-deb-bullseye b/files/build/versions/dockers/docker-config-engine-bullseye/versions-deb-bullseye index af8fc851e192..0eb227fc7d91 100644 --- a/files/build/versions/dockers/docker-config-engine-bullseye/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-config-engine-bullseye/versions-deb-bullseye @@ -2,8 +2,8 @@ apt-utils==2.2.4 dpkg-dev==1.20.13 icu-devtools==67.1-7 libboost-serialization1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcrypt-dev==1:4.4.18-4 libhiredis0.14==0.14.1-1 libicu-dev==67.1-7 @@ -24,7 +24,7 @@ libxslt1-dev==1.1.34-4+deb11u1 libxslt1.1==1.1.34-4+deb11u1 libyang==1.0.73 libyang-cpp==1.0.73 -linux-libc-dev==5.10.205-2 +linux-libc-dev==5.10.209-2 python3-swsscommon==1.0.0 python3-yang==1.0.73 sonic-db-cli==1.0.0 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster index 4709ef8e955a..1801e2a268cc 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster @@ -16,7 +16,7 @@ libnl-cli-3-200==3.5.0-1 libnl-genl-3-200==3.5.0-1 libnl-nf-3-200==3.5.0-1 libnl-route-3-200==3.5.0-1 -libpython3.7==3.7.3-2+deb10u6 +libpython3.7==3.7.3-2+deb10u7 libswsscommon==1.0.0 libxml2==2.9.4+dfsg1-7+deb10u6 libxml2-dev==2.9.4+dfsg1-7+deb10u6 diff --git a/files/build/versions/dockers/docker-database/versions-deb-bookworm b/files/build/versions/dockers/docker-database/versions-deb-bookworm new file mode 100644 index 000000000000..dbb9241216ff --- /dev/null +++ b/files/build/versions/dockers/docker-database/versions-deb-bookworm @@ -0,0 +1,31 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdashapi==1.0.0 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libprotobuf-lite32==3.21.12-3 +libprotobuf32==3.21.12-3 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +openssh-client==1:9.2p1-2+deb12u2 +redis-server==5:7.0.15-1~deb12u1 +sensible-utils==0.0.17+nmu1 +sshpass==1.09-1+b1 +strace==6.1-0.1 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-database/versions-deb-bullseye b/files/build/versions/dockers/docker-database/versions-deb-bullseye deleted file mode 100644 index c5d9dce1290f..000000000000 --- a/files/build/versions/dockers/docker-database/versions-deb-bullseye +++ /dev/null @@ -1,25 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libmpfr6==4.1.0-3 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libunwind8==1.3.2-2 -openssh-client==1:8.4p1-5+deb11u3 -redis-server==5:6.0.16-1+deb11u2 -sshpass==1.09-1+b1 -strace==5.10-1 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-database/versions-mirror b/files/build/versions/dockers/docker-database/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-database/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-database/versions-py3 b/files/build/versions/dockers/docker-database/versions-py3 new file mode 100644 index 000000000000..2f72dd5e19b9 --- /dev/null +++ b/files/build/versions/dockers/docker-database/versions-py3 @@ -0,0 +1 @@ +click==8.1.7 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm new file mode 100644 index 000000000000..acd363bffa5d --- /dev/null +++ b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bookworm @@ -0,0 +1,40 @@ +gdb==13.1-3 +gdbserver==13.1-3 +isc-dhcp-relay==4.4.3-P1-2 +isc-dhcp-relay-dbgsym==4.4.3-P1-2 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libevent-2.1-7==2.1.12-stable-8 +libexplain51==1.4.D001-12+b1 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libjsoncpp-dev==1.9.5-4 +libjsoncpp25==1.9.5-4 +liblua5.1-0==5.1.5-9 +libmpfr6==4.2.0-1 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +lsof==4.95.0-1 +openssh-client==1:9.2p1-2+deb12u2 +sensible-utils==0.0.17+nmu1 +sonic-dhcp6relay==1.0.0-0 +sonic-dhcp6relay-dbgsym==1.0.0-0 +sonic-dhcpmon==1.0.0-0 +sonic-dhcpmon-dbgsym==1.0.0-0 +sonic-rsyslog-plugin==1.0.0-0 +sshpass==1.09-1+b1 +strace==6.1-0.1 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bullseye b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bullseye deleted file mode 100644 index 5e65ac7c303e..000000000000 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-bullseye +++ /dev/null @@ -1,40 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -isc-dhcp-relay==4.4.1-2.3+deb11u2 -isc-dhcp-relay-dbgsym==4.4.1-2.3+deb11u2 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdns-export1110==1:9.11.19+dfsg-2.1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libevent-2.1-7==2.1.12-stable-1 -libexplain51==1.4.D001-11+deb11u1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libirs-export161==1:9.11.19+dfsg-2.1 -libisc-export1105==1:9.11.19+dfsg-2.1 -libisccfg-export163==1:9.11.19+dfsg-2.1 -libjsoncpp-dev==1.9.4-4 -libjsoncpp24==1.9.4-4 -libmpfr6==4.1.0-3 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libunwind8==1.3.2-2 -lsof==4.93.2+dfsg-1.1 -openssh-client==1:8.4p1-5+deb11u3 -sonic-dhcp6relay==1.0.0-0 -sonic-dhcp6relay-dbgsym==1.0.0-0 -sonic-dhcpmon==1.0.0-0 -sonic-dhcpmon-dbgsym==1.0.0-0 -sonic-rsyslog-plugin==1.0.0-0 -sshpass==1.09-1+b1 -strace==5.10-1 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-mirror b/files/build/versions/dockers/docker-dhcp-relay/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-dhcp-relay/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-py3 b/files/build/versions/dockers/docker-dhcp-relay/versions-py3 index f26ca9b37c67..0ff1a8722e47 100644 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-py3 +++ b/files/build/versions/dockers/docker-dhcp-relay/versions-py3 @@ -1,3 +1,3 @@ freezegun==1.4.0 psutil==5.9.8 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 diff --git a/files/build/versions/dockers/docker-eventd/versions-deb-bullseye b/files/build/versions/dockers/docker-eventd/versions-deb-bullseye index 10c7dbc37ff3..eb7f7e9c5906 100644 --- a/files/build/versions/dockers/docker-eventd/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-eventd/versions-deb-bullseye @@ -8,7 +8,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-fpm-frr/versions-deb-bullseye b/files/build/versions/dockers/docker-fpm-frr/versions-deb-bullseye index c122570ea15e..7d076b3f8a5c 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-fpm-frr/versions-deb-bullseye @@ -14,7 +14,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bullseye b/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bullseye index 5dc6c13134fb..bf8acc56c2c3 100644 --- a/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-gbsyncd-broncos/versions-deb-bullseye @@ -2,8 +2,8 @@ gdb==10.1-1.7 gdbserver==10.1-1.7 libbabeltrace1==1.5.8-1+b3 libboost-regex1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcbor0==0.5.0+dfsg-2 libcrypt-dev==1:4.4.18-4 libcurl3-gnutls==7.74.0-1.3+deb11u11 @@ -11,7 +11,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 @@ -28,7 +28,7 @@ libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.1-1+deb11u1 libunwind8==1.3.2-2 -linux-libc-dev==5.10.205-2 +linux-libc-dev==5.10.209-2 openssh-client==1:8.4p1-5+deb11u3 sshpass==1.09-1+b1 strace==5.10-1 diff --git a/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bullseye b/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bullseye index b993d31f2bff..272f7dca37ab 100644 --- a/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-gbsyncd-credo/versions-deb-bullseye @@ -8,7 +8,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bullseye b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bullseye index cdfa7d2de06d..c280c1bb856b 100644 --- a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-bullseye @@ -8,7 +8,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libhiredis0.14-dbgsym==0.14.1-1 libicu67==67.1-7 @@ -16,10 +16,13 @@ libipt2==2.0.3-1 libmpfr6==4.1.0-3 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 +libsaimetadata-dbgsym==1.0.0 libsairedis==1.0.0 libsairedis-dbg==1.0.0 +libsairedis-dbgsym==1.0.0 libsaivs==1.0.0 libsaivs-dbg==1.0.0 +libsaivs-dbgsym==1.0.0 libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbg==1.0.0 @@ -30,5 +33,6 @@ sshpass==1.09-1+b1 strace==5.10-1 syncd-vs==1.0.0 syncd-vs-dbg==1.0.0 +syncd-vs-dbgsym==1.0.0 vim==2:8.2.2434-3+deb11u1 vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-lldp/versions-deb-bullseye b/files/build/versions/dockers/docker-lldp/versions-deb-bullseye index 5ef03846819a..2454215e4ad7 100644 --- a/files/build/versions/dockers/docker-lldp/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-lldp/versions-deb-bullseye @@ -9,7 +9,7 @@ libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libevent-2.1-7==2.1.12-stable-1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-macsec/versions-deb-bookworm b/files/build/versions/dockers/docker-macsec/versions-deb-bookworm new file mode 100644 index 000000000000..24a19338a1fb --- /dev/null +++ b/files/build/versions/dockers/docker-macsec/versions-deb-bookworm @@ -0,0 +1,31 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libpcsclite1==1.9.9-2 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +openssh-client==1:9.2p1-2+deb12u2 +sensible-utils==0.0.17+nmu1 +sshpass==1.09-1+b1 +strace==6.1-0.1 +swss-dbg==1.0.0 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 +wpasupplicant==2:2.9.0-14 +wpasupplicant-dbgsym==2:2.9.0-14 diff --git a/files/build/versions/dockers/docker-macsec/versions-deb-bullseye b/files/build/versions/dockers/docker-macsec/versions-deb-bullseye deleted file mode 100644 index a24cc64c4978..000000000000 --- a/files/build/versions/dockers/docker-macsec/versions-deb-bullseye +++ /dev/null @@ -1,37 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdashapi==1.0.0 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libmpfr6==4.1.0-3 -libpcsclite1==1.9.1-1 -libprotobuf-lite32==3.21.12-3 -libprotobuf32==3.21.12-3 -libsaimetadata==1.0.0 -libsairedis==1.0.0 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libteam5==1.30-1 -libteamdctl0==1.30-1 -libunwind8==1.3.2-2 -openssh-client==1:8.4p1-5+deb11u3 -python3-protobuf==3.21.12-3 -sshpass==1.09-1+b1 -strace==5.10-1 -swss==1.0.0 -swss-dbg==1.0.0 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 -wpasupplicant==2:2.9.0-14 -wpasupplicant-dbgsym==2:2.9.0-14 diff --git a/files/build/versions/dockers/docker-macsec/versions-mirror b/files/build/versions/dockers/docker-macsec/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-macsec/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-macsec/versions-py3 b/files/build/versions/dockers/docker-macsec/versions-py3 deleted file mode 100644 index 2f66c6818b60..000000000000 --- a/files/build/versions/dockers/docker-macsec/versions-py3 +++ /dev/null @@ -1 +0,0 @@ -protobuf==4.21.12 diff --git a/files/build/versions/dockers/docker-mux/versions-deb-bookworm b/files/build/versions/dockers/docker-mux/versions-deb-bookworm new file mode 100644 index 000000000000..e67021248c2d --- /dev/null +++ b/files/build/versions/dockers/docker-mux/versions-deb-bookworm @@ -0,0 +1,33 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-filesystem1.74.0==1.74.0+ds1-21 +libboost-log1.74.0==1.74.0+ds1-21 +libboost-program-options1.74.0==1.74.0+ds1-21 +libboost-regex1.74.0==1.74.0+ds1-21 +libboost-thread1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +openssh-client==1:9.2p1-2+deb12u2 +sensible-utils==0.0.17+nmu1 +sonic-linkmgrd==1.0.0-1 +sonic-linkmgrd-dbgsym==1.0.0-1 +sshpass==1.09-1+b1 +strace==6.1-0.1 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-mux/versions-deb-bullseye b/files/build/versions/dockers/docker-mux/versions-deb-bullseye deleted file mode 100644 index 04ef7009f0b4..000000000000 --- a/files/build/versions/dockers/docker-mux/versions-deb-bullseye +++ /dev/null @@ -1,30 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -libbabeltrace1==1.5.8-1+b3 -libboost-filesystem1.74.0==1.74.0-9 -libboost-log1.74.0==1.74.0-9 -libboost-program-options1.74.0==1.74.0-9 -libboost-regex1.74.0==1.74.0-9 -libboost-thread1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libmpfr6==4.1.0-3 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libunwind8==1.3.2-2 -openssh-client==1:8.4p1-5+deb11u3 -sonic-linkmgrd==1.0.0-1 -sonic-linkmgrd-dbgsym==1.0.0-1 -sshpass==1.09-1+b1 -strace==5.10-1 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-mux/versions-mirror b/files/build/versions/dockers/docker-mux/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-mux/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-nat/versions-deb-bullseye b/files/build/versions/dockers/docker-nat/versions-deb-bullseye index ae4e94d4ffde..fa4f16b3aacf 100644 --- a/files/build/versions/dockers/docker-nat/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-nat/versions-deb-bullseye @@ -11,7 +11,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libip4tc2==1.8.7-1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm b/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm new file mode 100644 index 000000000000..113b60aed8e4 --- /dev/null +++ b/files/build/versions/dockers/docker-orchagent/versions-deb-bookworm @@ -0,0 +1,47 @@ +arping==2.23-1 +bridge-utils==1.7.1-1 +conntrack==1:1.4.7-1+b2 +gdb==13.1-3 +gdbserver==13.1-3 +ifupdown==0.8.41 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libkmod2==30+20221128-1 +liblua5.1-0==5.1.5-9 +libmpfr6==4.2.0-1 +libnet1==1.1.6+dfsg-3.2 +libnetfilter-conntrack3==1.0.9-3 +libnfnetlink0==1.0.2-2 +libpcap0.8==1.10.3-1 +libpci3==1:3.9.0-4 +libsairedis-dbgsym==1.0.0 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +ndisc6==1.0.5-1+b2 +ndppd==0.2.5-6 +openssh-client==1:9.2p1-2+deb12u2 +pci.ids==0.0~2023.04.11-1 +pciutils==1:3.9.0-4 +sensible-utils==0.0.17+nmu1 +sgml-base==1.31 +sonic-rsyslog-plugin==1.0.0-0 +sshpass==1.09-1+b1 +strace==6.1-0.1 +swss-dbg==1.0.0 +tcpdump==4.99.3-1 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-bullseye b/files/build/versions/dockers/docker-orchagent/versions-deb-bullseye deleted file mode 100644 index fb351d232c97..000000000000 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-bullseye +++ /dev/null @@ -1,41 +0,0 @@ -arping==2.21-2 -bridge-utils==1.7-1 -conntrack==1:1.4.6-2 -gdb==10.1-1.7 -gdbserver==10.1-1.7 -ifupdown==0.8.36 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libkmod2==28-1 -libmpfr6==4.1.0-3 -libnet1==1.1.6+dfsg-3.1 -libnetfilter-conntrack3==1.0.8-3 -libnfnetlink0==1.0.1-3+b1 -libpcap0.8==1.10.0-2 -libpci3==1:3.7.0-5 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libunwind8==1.3.2-2 -ndisc6==1.0.4-2 -ndppd==0.2.5-6 -openssh-client==1:8.4p1-5+deb11u3 -pci.ids==0.0~2021.02.08-1 -pciutils==1:3.7.0-5 -sonic-rsyslog-plugin==1.0.0-0 -sshpass==1.09-1+b1 -strace==5.10-1 -swss-dbg==1.0.0 -tcpdump==4.99.0-2+deb11u1 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-mirror b/files/build/versions/dockers/docker-orchagent/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-orchagent/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bullseye b/files/build/versions/dockers/docker-platform-monitor/versions-deb-bullseye index eff86a1a1adc..5a6a51f8b2da 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-bullseye @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.6.2134 -applibs-dev==1.mlnx.4.6.2134 +applibs==1.mlnx.4.6.2202 +applibs-dev==1.mlnx.4.6.2202 dmidecode==3.3-2 ethtool==1:5.9-1 fancontrol==1:3.6.0-7 @@ -27,7 +27,7 @@ libfontconfig1==2.13.1-4.2 libfreeipmi17==1.6.6-4+deb11u1 libfreetype6==2.10.4+dfsg-1+deb11u1 libfribidi0==1.0.8-2+deb11u1 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libgraphite2-3==1.3.14-1 libharfbuzz0b==2.7.4-1 @@ -69,7 +69,7 @@ openssh-client==1:8.4p1-5+deb11u3 pci.ids==0.0~2021.02.08-1 pciutils==1:3.7.0-5 psmisc==23.4-2 -python-sdk-api==1.mlnx.4.6.2134 +python-sdk-api==1.mlnx.4.6.2202 python3-attr==20.3.0-1 python3-importlib-metadata==1.6.0-2 python3-jsonschema==3.2.0-3 @@ -87,12 +87,12 @@ sensord-dbgsym==1:3.6.0-7 smartmontools==7.2-1 sshpass==1.09-1+b1 strace==5.10-1 -sx-complib==1.mlnx.4.6.2134 -sx-complib-dev==1.mlnx.4.6.2134 -sx-gen-utils==1.mlnx.4.6.2134 -sx-gen-utils-dev==1.mlnx.4.6.2134 -sxd-libs==1.mlnx.4.6.2134 -sxd-libs-dev==1.mlnx.4.6.2134 +sx-complib==1.mlnx.4.6.2202 +sx-complib-dev==1.mlnx.4.6.2202 +sx-gen-utils==1.mlnx.4.6.2202 +sx-gen-utils-dev==1.mlnx.4.6.2202 +sxd-libs==1.mlnx.4.6.2202 +sxd-libs-dev==1.mlnx.4.6.2202 ucf==3.0043 udev==247.3-7+deb11u4 vim==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions/dockers/docker-platform-monitor/versions-py3 index 2c02139a0182..2c8725dc1b93 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py3 @@ -1,5 +1,5 @@ attrs==20.3.0 -certifi==2023.11.17 +certifi==2024.2.2 charset-normalizer==3.3.2 grpcio==1.39.0 grpcio-tools==1.39.0 @@ -12,8 +12,8 @@ more-itertools==4.2.0 netifaces==0.11.0 protobuf==3.20.3 pyrsistent==0.15.5 -python_sdk_api==4.6.2134 +python_sdk_api==4.6.2202 requests==2.31.0 thrift==0.13.0 -urllib3==2.1.0 +urllib3==2.2.1 zipp==1.0.0 diff --git a/files/build/versions/dockers/docker-ptf-sai/versions-py3 b/files/build/versions/dockers/docker-ptf-sai/versions-py3 index 9a32487b4f2a..08550dfeb0ac 100644 --- a/files/build/versions/dockers/docker-ptf-sai/versions-py3 +++ b/files/build/versions/dockers/docker-ptf-sai/versions-py3 @@ -2,7 +2,7 @@ crc16==0.1.1 getmac==0.9.4 importlib-metadata==6.7.0 netifaces==0.11.0 -packaging==23.2 +packaging==24.0 packet-helper==0.0.1 psutil==5.9.8 ptf==0.0.0 diff --git a/files/build/versions/dockers/docker-ptf/versions-deb-buster b/files/build/versions/dockers/docker-ptf/versions-deb-buster index e3414d16c786..380fa0be7bda 100644 --- a/files/build/versions/dockers/docker-ptf/versions-deb-buster +++ b/files/build/versions/dockers/docker-ptf/versions-deb-buster @@ -18,7 +18,7 @@ cmake-data==3.13.4-1 cpp==4:8.3.0-1 cpp-8==8.3.0-6 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u8 +curl==7.64.0-4+deb10u9 dbus==1.12.28-0+deb10u1 dbus-user-session==1.12.28-0+deb10u1 dconf-gsettings-backend==0.30.1-2 @@ -114,8 +114,8 @@ libcryptsetup12==2:2.1.0-5+deb10u2 libcups2==2.2.10-6+deb10u9 libcupsfilters1==1.21.6-5+deb10u1 libcupsimage2==2.2.10-6+deb10u9 -libcurl3-gnutls==7.64.0-4+deb10u8 -libcurl4==7.64.0-4+deb10u8 +libcurl3-gnutls==7.64.0-4+deb10u9 +libcurl4==7.64.0-4+deb10u9 libdaemon0==0.14-7 libdata-dump-perl==1.23-1 libdatrie1==0.2.12-2 @@ -177,7 +177,7 @@ libglib2.0-data==2.58.3-2+deb10u5 libglvnd0==1.1.0-1 libglx-mesa0==18.3.6-2+deb10u1 libglx0==1.1.0-1 -libgnutls-dane0==3.6.7-4+deb10u11 +libgnutls-dane0==3.6.7-4+deb10u12 libgnutls30==3.6.7-4+deb10u10 libgomp1==8.3.0-6 libgpm2==1.20.7-5 @@ -309,16 +309,16 @@ libpython-dev==2.7.16-1 libpython-stdlib==2.7.16-1 libpython2-dev==2.7.16-1 libpython2-stdlib==2.7.16-1 -libpython2.7==2.7.16-2+deb10u3 -libpython2.7-dev==2.7.16-2+deb10u3 -libpython2.7-minimal==2.7.16-2+deb10u3 -libpython2.7-stdlib==2.7.16-2+deb10u3 +libpython2.7==2.7.16-2+deb10u4 +libpython2.7-dev==2.7.16-2+deb10u4 +libpython2.7-minimal==2.7.16-2+deb10u4 +libpython2.7-stdlib==2.7.16-2+deb10u4 libpython3-dev==3.7.3-1 libpython3-stdlib==3.7.3-1 -libpython3.7==3.7.3-2+deb10u6 -libpython3.7-dev==3.7.3-2+deb10u6 -libpython3.7-minimal==3.7.3-2+deb10u6 -libpython3.7-stdlib==3.7.3-2+deb10u6 +libpython3.7==3.7.3-2+deb10u7 +libpython3.7-dev==3.7.3-2+deb10u7 +libpython3.7-minimal==3.7.3-2+deb10u7 +libpython3.7-stdlib==3.7.3-2+deb10u7 libqt5core5a==5.11.3+dfsg1-1+deb10u5 libqt5dbus5==5.11.3+dfsg1-1+deb10u5 libqt5gui5==5.11.3+dfsg1-1+deb10u5 @@ -375,17 +375,17 @@ libthai0==0.1.28-2 libtheora0==1.1.1+dfsg.1-15 libthrift-0.11.0==0.11.0-4 libtie-ixhash-perl==1.23-2 -libtiff5==4.1.0+git191117-2~deb10u8 +libtiff5==4.1.0+git191117-2~deb10u9 libtimedate-perl==2.3000-2+deb10u1 libtk8.6==8.6.9-2 libtry-tiny-perl==0.30-1 libtsan0==8.3.0-6 libubsan1==8.3.0-6 libudev1==241-7~deb10u10 -libunbound8==1.9.0-2+deb10u3 +libunbound8==1.9.0-2+deb10u4 liburi-perl==1.76-1 libutempter0==1.1.6-3 -libuv1==1.24.1-1+deb10u1 +libuv1==1.24.1-1+deb10u2 libvisual-0.4-0==0.4.0-15 libvorbis0a==1.3.6-2 libvorbisenc2==1.3.6-2 @@ -399,13 +399,13 @@ libwayland-server0==1.16.0-1 libwebp6==0.6.1-2+deb10u3 libwebpdemux2==0.6.1-2+deb10u3 libwebpmux3==0.6.1-2+deb10u3 -libwireshark-data==2.6.20-0+deb10u7 -libwireshark11==2.6.20-0+deb10u7 -libwiretap8==2.6.20-0+deb10u7 +libwireshark-data==2.6.20-0+deb10u8 +libwireshark11==2.6.20-0+deb10u8 +libwiretap8==2.6.20-0+deb10u8 libwoff1==1.0.2-1 libwrap0==7.6.q-28 -libwscodecs2==2.6.20-0+deb10u7 -libwsutil9==2.6.20-0+deb10u7 +libwscodecs2==2.6.20-0+deb10u8 +libwsutil9==2.6.20-0+deb10u8 libwww-perl==6.36-2 libwww-robotrules-perl==6.02-1 libx11-6==2:1.6.7-1+deb10u4 @@ -506,9 +506,9 @@ python-thrift==0.11.0-4 python2==2.7.16-1 python2-dev==2.7.16-1 python2-minimal==2.7.16-1 -python2.7==2.7.16-2+deb10u3 -python2.7-dev==2.7.16-2+deb10u3 -python2.7-minimal==2.7.16-2+deb10u3 +python2.7==2.7.16-2+deb10u4 +python2.7-dev==2.7.16-2+deb10u4 +python2.7-minimal==2.7.16-2+deb10u4 python3==3.7.3-1 python3-asn1crypto==0.24.0-1 python3-cffi-backend==1.12.2-1 @@ -534,7 +534,7 @@ python3-numpy==1:1.16.2-1 python3-olefile==0.46-1 python3-pexpect==4.6.0-1 python3-pickleshare==0.7.5-1 -python3-pil==5.4.1-2+deb10u3 +python3-pil==5.4.1-2+deb10u5 python3-pip==18.1-5 python3-pkg-resources==40.8.0-1 python3-prompt-toolkit==1.0.15-1 @@ -553,10 +553,10 @@ python3-venv==3.7.3-1 python3-wcwidth==0.1.7+dfsg1-3 python3-wheel==0.32.3-2 python3-xdg==0.25-5 -python3.7==3.7.3-2+deb10u6 -python3.7-dev==3.7.3-2+deb10u6 -python3.7-minimal==3.7.3-2+deb10u6 -python3.7-venv==3.7.3-2+deb10u6 +python3.7==3.7.3-2+deb10u7 +python3.7-dev==3.7.3-2+deb10u7 +python3.7-minimal==3.7.3-2+deb10u7 +python3.7-venv==3.7.3-2+deb10u7 qt5-gtk-platformtheme==5.11.3+dfsg1-1+deb10u5 qttranslations5-l10n==5.11.3-2 readline-common==7.0-5 @@ -586,9 +586,9 @@ vim==2:8.1.0875-5+deb10u6 vim-common==2:8.1.0875-5+deb10u6 vim-runtime==2:8.1.0875-5+deb10u6 wget==1.20.1-1.1 -wireshark==2.6.20-0+deb10u7 -wireshark-common==2.6.20-0+deb10u7 -wireshark-qt==2.6.20-0+deb10u7 +wireshark==2.6.20-0+deb10u8 +wireshark-common==2.6.20-0+deb10u8 +wireshark-qt==2.6.20-0+deb10u8 x11-common==1:7.7+19 x11-utils==7.7+4 x11-xserver-utils==7.7+8 diff --git a/files/build/versions/dockers/docker-ptf/versions-py2 b/files/build/versions/dockers/docker-ptf/versions-py2 index e3a3025a7aa5..0ed72342365e 100644 --- a/files/build/versions/dockers/docker-ptf/versions-py2 +++ b/files/build/versions/dockers/docker-ptf/versions-py2 @@ -11,7 +11,7 @@ enum34==1.1.6 exabgp==3.4.17 flask==1.0 flask-httpauth==2.5.0 -future==0.18.3 +future==1.0.0 futures==3.2.0 grpcio==1.41.1 grpcio-tools==1.41.1 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm new file mode 100644 index 000000000000..ef60589684cc --- /dev/null +++ b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm @@ -0,0 +1,28 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libunwind8==1.6.2-3 +openssh-client==1:9.2p1-2+deb12u2 +radvd==1:2.19-1+b1 +sensible-utils==0.0.17+nmu1 +sshpass==1.09-1+b1 +strace==6.1-0.1 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 new file mode 100644 index 000000000000..122e75fd733f --- /dev/null +++ b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-arm64 @@ -0,0 +1 @@ +radvd==1:2.19-1 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-armhf b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-armhf new file mode 100644 index 000000000000..122e75fd733f --- /dev/null +++ b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bookworm-armhf @@ -0,0 +1 @@ +radvd==1:2.19-1 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bullseye b/files/build/versions/dockers/docker-router-advertiser/versions-deb-bullseye deleted file mode 100644 index c96c2d625623..000000000000 --- a/files/build/versions/dockers/docker-router-advertiser/versions-deb-bullseye +++ /dev/null @@ -1,25 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libmpfr6==4.1.0-3 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libunwind8==1.3.2-2 -openssh-client==1:8.4p1-5+deb11u3 -radvd==1:2.18-3 -sshpass==1.09-1+b1 -strace==5.10-1 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-mirror b/files/build/versions/dockers/docker-router-advertiser/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-router-advertiser/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-sflow/versions-deb-bullseye b/files/build/versions/dockers/docker-sflow/versions-deb-bullseye index 889af0d45430..9c2e1a810961 100644 --- a/files/build/versions/dockers/docker-sflow/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-sflow/versions-deb-bullseye @@ -11,7 +11,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-bullseye b/files/build/versions/dockers/docker-snmp/versions-deb-bullseye index 02097494e3e4..247f77f7900a 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-snmp/versions-deb-bullseye @@ -4,7 +4,7 @@ gdbserver==10.1-1.7 ipmitool==1.8.18-10.1 libbabeltrace1==1.5.8-1+b3 libboost-regex1.74.0==1.74.0-9 -libc-l10n==2.31-13+deb11u7 +libc-l10n==2.31-13+deb11u8 libcbor0==0.5.0+dfsg-2 libcurl3-gnutls==7.74.0-1.3+deb11u11 libdebuginfod1==0.183-1 @@ -12,7 +12,7 @@ libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 libfreeipmi17==1.6.6-4+deb11u1 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 @@ -27,7 +27,7 @@ libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbgsym==1.0.0 libunwind8==1.3.2-2 -locales==2.31-13+deb11u7 +locales==2.31-13+deb11u8 openssh-client==1:8.4p1-5+deb11u3 pci.ids==0.0~2021.02.08-1 snmp==5.9+dfsg-4+deb11u1 diff --git a/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bullseye b/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bullseye index 33c2b2450252..7ae0b391e217 100644 --- a/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-sonic-gnmi/versions-deb-bullseye @@ -8,7 +8,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster index 989ddfd32b5b..84f912677860 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libcjson-dev==1.7.10-1.1+deb10u2 libcjson1==1.7.10-1.1+deb10u2 -libcurl3-gnutls==7.64.0-4+deb10u8 +libcurl3-gnutls==7.64.0-4+deb10u9 libdw1==0.176-1.1+deb10u1 libedit2==3.1-20181209-1 libglib2.0-0==2.58.3-2+deb10u5 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-bullseye b/files/build/versions/dockers/docker-sonic-vs/versions-deb-bullseye index 683c92343d54..6766a3285ffb 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-bullseye @@ -31,14 +31,15 @@ icu-devtools==67.1-7 ifupdown==0.8.36 iproute2==5.10.0-4sonic1 iptables==1.8.7-1 -krb5-multidev==1.18.3-6+deb11u4 +krb5-multidev==1.18.3-6+deb11u4+fips libapparmor1==2.13.6-10 libassuan0==2.5.3-7.1 -libblkid-dev==2.36.1-8+deb11u1 +libblkid-dev==2.36.1-8+deb11u2 +libblkid1==2.36.1-8+deb11u2 libbsd-dev==0.11.3-1+deb11u1 libc-ares2==1.17.1-1+deb11u3 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcbor0==0.5.0+dfsg-2 libcrypt-dev==1:4.4.18-4 libdevmapper1.02.1==2:1.02.175-2.1 @@ -51,9 +52,10 @@ libfreetype6==2.10.4+dfsg-1+deb11u1 libfreetype6-dev==2.10.4+dfsg-1+deb11u1 libfuse2==2.9.9-5 libgirepository-1.0-1==1.66.1-1+b1 -libglib2.0-0==2.66.8-1 -libglib2.0-data==2.66.8-1 -libgssrpc4==1.18.3-6+deb11u4 +libglib2.0-0==2.66.8-1+deb11u1 +libglib2.0-data==2.66.8-1+deb11u1 +libgssapi-krb5-2==1.18.3-6+deb11u4+fips +libgssrpc4==1.18.3-6+deb11u4+fips libicu-dev==67.1-7 libicu67==67.1-7 libip4tc2==1.8.7-1 @@ -63,12 +65,15 @@ libjs-underscore==1.9.1~dfsg-3 libjson-c5==0.15-2+deb11u1 libjudydebian1==1.0.5-5+b2 libk5crypto3==1.18.3-6+deb11u4 -libkadm5clnt-mit12==1.18.3-6+deb11u4 -libkadm5srv-mit12==1.18.3-6+deb11u4 +libkadm5clnt-mit12==1.18.3-6+deb11u4+fips +libkadm5srv-mit12==1.18.3-6+deb11u4+fips libkdb5-10==1.18.3-6+deb11u4 -libkrb5-dev==1.18.3-6+deb11u4 +libkrb5-3==1.18.3-6+deb11u4+fips +libkrb5-dev==1.18.3-6+deb11u4+fips +libkrb5support0==1.18.3-6+deb11u4+fips libksba8==1.5.0-3+deb11u2 libmd-dev==1.0.3-3 +libmount1==2.36.1-8+deb11u2 libnet1==1.1.6+dfsg-3.1 libnetfilter-conntrack3==1.0.8-3 libnfnetlink0==1.0.1-3+b1 @@ -91,14 +96,15 @@ libsaivs==1.0.0 libsodium-dev==1.0.18-1 libssl1.1==1.1.1w-0+deb11u1 libsystemd0==247.3-7+deb11u2 -libteam-utils==1.30-1 +libteam-utils==1.31-1 libtirpc-dev==1.3.1-1+deb11u1 libunwind8==1.3.2-2 +libuuid1==2.36.1-8+deb11u2 libxml2==2.9.10+dfsg-6.7+deb11u4 libxml2-dev==2.9.10+dfsg-6.7+deb11u4 libyang2==2.0.112-6 -libzmq3-dev==4.3.4-1 -linux-libc-dev==5.10.205-2 +libzmq3-dev==4.3.4-1+deb11u1 +linux-libc-dev==5.10.209-2 logrotate==3.18.0-2+deb11u2 lsof==4.93.2+dfsg-1.1 mailcap==3.69 @@ -128,6 +134,6 @@ sphinx-rtd-theme-common==0.5.1+dfsg-1 syncd-vs==1.0.0 tcpdump==4.99.0-2+deb11u1 ucf==3.0043 -uuid-dev==2.36.1-8+deb11u1 +uuid-dev==2.36.1-8+deb11u2 x11-common==1:7.7+22 xz-utils==5.2.5-2.1~deb11u1 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index f603a7695cdd..b61f5b32c2ff 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,35 +1,35 @@ async-timeout==4.0.2 bcrypt==3.2.2 blessed==1.20.0 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==7.0 click-log==0.4.0 colorful==0.5.6 -cryptography==42.0.0 +cryptography==42.0.5 dbus-python==1.3.2 docker==7.0.0 docker-image-py==0.1.12 enlighten==1.12.4 -filelock==3.13.1 +filelock==3.13.3 idna==3.6 importlib-metadata==6.1.0 jsonpatch==1.33 jsonpointer==2.4 lazy-object-proxy==1.10.0 -m2crypto==0.40.1 +m2crypto==0.41.0 netifaces==0.10.9 -packaging==23.2 +packaging==24.0 paramiko==2.11.0 pexpect==4.9.0 prefixed==0.7.0 prettyprinter==0.18.0 ptyprocess==0.7.0 -pycairo==1.25.1 -pycparser==2.21 +pycairo==1.26.0 +pycparser==2.22 pygments==2.17.2 -pygobject==3.46.0 +pygobject==3.48.1 pynacl==1.5.0 pyroute2==0.5.14 redis==4.5.2 @@ -39,7 +39,7 @@ semantic-version==2.10.0 systemd-python==235 toposort==1.6 typing_extensions==4.7.1 -urllib3==2.1.0 +urllib3==2.2.1 wcwidth==0.2.13 websocket-client==1.6.3 www-authenticate==0.9.2 diff --git a/files/build/versions/dockers/docker-swss-layer-bookworm/versions-deb-bookworm b/files/build/versions/dockers/docker-swss-layer-bookworm/versions-deb-bookworm new file mode 100644 index 000000000000..b28759926049 --- /dev/null +++ b/files/build/versions/dockers/docker-swss-layer-bookworm/versions-deb-bookworm @@ -0,0 +1,9 @@ +iputils-ping==3:20221126-1 +libdashapi==1.0.0 +libprotobuf-lite32==3.21.12-3 +libprotobuf32==3.21.12-3 +libsaimetadata==1.0.0 +libsairedis==1.0.0 +libteam5==1.31-1 +libteamdctl0==1.31-1 +swss==1.0.0 diff --git a/files/build/versions/dockers/docker-swss-layer-bookworm/versions-mirror b/files/build/versions/dockers/docker-swss-layer-bookworm/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-swss-layer-bookworm/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/docker-swss-layer-bullseye/versions-deb-bullseye b/files/build/versions/dockers/docker-swss-layer-bullseye/versions-deb-bullseye index 653aa8fe9518..214df182b81c 100644 --- a/files/build/versions/dockers/docker-swss-layer-bullseye/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-swss-layer-bullseye/versions-deb-bullseye @@ -4,7 +4,7 @@ libprotobuf-lite32==3.21.12-3 libprotobuf32==3.21.12-3 libsaimetadata==1.0.0 libsairedis==1.0.0 -libteam5==1.30-1 -libteamdctl0==1.30-1 +libteam5==1.31-1 +libteamdctl0==1.31-1 python3-protobuf==3.21.12-3 swss==1.0.0 diff --git a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bullseye index 053ffe835326..5aa883cb4d99 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-brcm-dnx-rpc/versions-deb-bullseye @@ -15,8 +15,8 @@ libarchive13==3.4.3-2+deb11u1 libasan6==10.2.1-6 libbinutils==2.35.2-2 libboost-atomic1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcc1-0==10.2.1-6 libcrypt-dev==1:4.4.18-4 libctf-nobfd0==2.35.2-2 @@ -26,7 +26,7 @@ libdpkg-perl==1.20.13 libexpat1-dev==2.2.10-2+deb11u5 libffi-dev==3.3-6 libgcc-10-dev==10.2.1-6 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgomp1==10.2.1-6 libicu67==67.1-7 libisl23==0.23-1 @@ -55,9 +55,9 @@ libthrift-0.11.0==0.11.0-4 libtirpc-dev==1.3.1-1+deb11u1 libtsan0==10.2.1-6 libubsan1==10.2.1-6 -libuv1==1.40.0-2 +libuv1==1.40.0-2+deb11u1 libxml2==2.9.10+dfsg-6.7+deb11u4 -linux-libc-dev==5.10.205-2 +linux-libc-dev==5.10.209-2 mailcap==3.69 make==4.3-4.1 mime-support==3.66 diff --git a/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bullseye index 1b0765aa1d78..6a726d5dff63 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-brcm-dnx/versions-deb-bullseye @@ -10,21 +10,25 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 libkmod2==28-1 libmpfr6==4.1.0-3 libsaimetadata==1.0.0 +libsaimetadata-dbgsym==1.0.0 libsairedis==1.0.0 +libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbgsym==1.0.0 libunwind8==1.3.2-2 +lz4==1.9.3-2 openssh-client==1:8.4p1-5+deb11u3 sshpass==1.09-1+b1 strace==5.10-1 syncd==1.0.0 +syncd-dbgsym==1.0.0 vim==2:8.2.2434-3+deb11u1 vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bullseye index 053ffe835326..5aa883cb4d99 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-bullseye @@ -15,8 +15,8 @@ libarchive13==3.4.3-2+deb11u1 libasan6==10.2.1-6 libbinutils==2.35.2-2 libboost-atomic1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcc1-0==10.2.1-6 libcrypt-dev==1:4.4.18-4 libctf-nobfd0==2.35.2-2 @@ -26,7 +26,7 @@ libdpkg-perl==1.20.13 libexpat1-dev==2.2.10-2+deb11u5 libffi-dev==3.3-6 libgcc-10-dev==10.2.1-6 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgomp1==10.2.1-6 libicu67==67.1-7 libisl23==0.23-1 @@ -55,9 +55,9 @@ libthrift-0.11.0==0.11.0-4 libtirpc-dev==1.3.1-1+deb11u1 libtsan0==10.2.1-6 libubsan1==10.2.1-6 -libuv1==1.40.0-2 +libuv1==1.40.0-2+deb11u1 libxml2==2.9.10+dfsg-6.7+deb11u4 -linux-libc-dev==5.10.205-2 +linux-libc-dev==5.10.209-2 mailcap==3.69 make==4.3-4.1 mime-support==3.66 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bullseye index 1dd59320fbf9..225a59d00758 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-bullseye @@ -10,14 +10,16 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libicu67==67.1-7 libipt2==2.0.3-1 libkmod2==28-1 libmpfr6==4.1.0-3 libsaimetadata==1.0.0 +libsaimetadata-dbgsym==1.0.0 libsairedis==1.0.0 +libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbgsym==1.0.0 @@ -28,5 +30,6 @@ openssh-client==1:8.4p1-5+deb11u3 sshpass==1.09-1+b1 strace==5.10-1 syncd==1.0.0 +syncd-dbgsym==1.0.0 vim==2:8.2.2434-3+deb11u1 vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-bullseye index 053ffe835326..5aa883cb4d99 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-bullseye @@ -15,8 +15,8 @@ libarchive13==3.4.3-2+deb11u1 libasan6==10.2.1-6 libbinutils==2.35.2-2 libboost-atomic1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcc1-0==10.2.1-6 libcrypt-dev==1:4.4.18-4 libctf-nobfd0==2.35.2-2 @@ -26,7 +26,7 @@ libdpkg-perl==1.20.13 libexpat1-dev==2.2.10-2+deb11u5 libffi-dev==3.3-6 libgcc-10-dev==10.2.1-6 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgomp1==10.2.1-6 libicu67==67.1-7 libisl23==0.23-1 @@ -55,9 +55,9 @@ libthrift-0.11.0==0.11.0-4 libtirpc-dev==1.3.1-1+deb11u1 libtsan0==10.2.1-6 libubsan1==10.2.1-6 -libuv1==1.40.0-2 +libuv1==1.40.0-2+deb11u1 libxml2==2.9.10+dfsg-6.7+deb11u4 -linux-libc-dev==5.10.205-2 +linux-libc-dev==5.10.209-2 mailcap==3.69 make==4.3-4.1 mime-support==3.66 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-centec/versions-deb-bullseye index f28efa949102..a3b48eb31ab1 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-bullseye @@ -9,7 +9,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libhiredis0.14-dbgsym==0.14.1-1 libicu67==67.1-7 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bullseye index 6bced6505e64..1d9e6ff2a63f 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-bullseye @@ -22,7 +22,7 @@ libdouble-conversion3==3.1.5-6.1 libdpkg-perl==1.20.13 libffi-dev==3.3-6 libgcc-10-dev==10.2.1-6 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgomp1==10.2.1-6 libisl23==0.23-1 libitm1==10.2.1-6 @@ -48,7 +48,7 @@ libstdc++-10-dev==10.2.1-6 libthrift-0.11.0==0.11.0-4 libtsan0==10.2.1-6 libubsan1==10.2.1-6 -libuv1==1.40.0-2 +libuv1==1.40.0-2+deb11u1 mailcap==3.69 make==4.3-4.1 mime-support==3.66 @@ -65,6 +65,7 @@ python2-minimal==2.7.18-3 python2.7==2.7.18-8+deb11u1 python2.7-dev==2.7.18-8+deb11u1 python2.7-minimal==2.7.18-8+deb11u1 +python3-scapy==2.4.0-2 shared-mime-info==2.0-1 syncd-rpc==1.0.0 wget==1.21-1+deb11u1 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 new file mode 100644 index 000000000000..9ad41d81dc2f --- /dev/null +++ b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-py3 @@ -0,0 +1,5 @@ +cffi==1.16.0 +nnpy==1.4.2 +ptf==0.10.0 +pycparser==2.22 +scapy==2.4.0 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bullseye index 2c1fb9b9d573..c1dd4638db6e 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-bullseye @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.6.2134 -applibs-dev==1.mlnx.4.6.2134 +applibs==1.mlnx.4.6.2202 +applibs-dev==1.mlnx.4.6.2202 gdb==10.1-1.7 gdbserver==10.1-1.7 iproute2==1.mlnx.4.5.4206 @@ -7,8 +7,8 @@ iproute2-dev==1.mlnx.4.5.4206 iproute2-mlnx==5.10.0-4~bpo10+1 libbabeltrace1==1.5.8-1+b3 libboost-regex1.74.0==1.74.0-9 -libc-dev-bin==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 libcbor0==0.5.0+dfsg-2 libcrypt-dev==1:4.4.18-4 libcurl3-gnutls==7.74.0-1.3+deb11u11 @@ -18,7 +18,7 @@ libedit2==3.1-20191231-2+b1 libelf1==0.183-1 libexpat1-dev==2.2.10-2+deb11u5 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libhiredis0.14-dbgsym==0.14.1-1 libicu67==67.1-7 @@ -31,8 +31,10 @@ libpython3-dev==3.9.2-3 libpython3.9-dev==3.9.2-1 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 +libsaimetadata-dbgsym==1.0.0 libsairedis==1.0.0 libsairedis-dbg==1.0.0 +libsairedis-dbgsym==1.0.0 libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbg==1.0.0 @@ -40,13 +42,13 @@ libswsscommon-dbgsym==1.0.0 libtirpc-dev==1.3.1-1+deb11u1 libunwind8==1.3.2-2 libxml2==2.9.10+dfsg-6.7+deb11u4 -linux-libc-dev==5.10.205-2 -mft==4.25.0-62 +linux-libc-dev==5.10.209-2 +mft==4.27.0-83 mft-fwtrace-cfg==1.0.0 mlnx-sai==1.mlnx.SAIBuild2311.26.0.28 openssh-client==1:8.4p1-5+deb11u3 python-pip-whl==20.3.4-4+deb11u1 -python-sdk-api==1.mlnx.4.6.2134 +python-sdk-api==1.mlnx.4.6.2202 python3-attr==20.3.0-1 python3-dev==3.9.2-3 python3-importlib-metadata==1.6.0-2 @@ -62,25 +64,26 @@ python3-zipp==1.0.0-3 python3.9-dev==3.9.2-1 sshpass==1.09-1+b1 strace==5.10-1 -sx-acl-helper==1.mlnx.4.6.2134 -sx-acl-helper-dev==1.mlnx.4.6.2134 -sx-complib==1.mlnx.4.6.2134 -sx-complib-dev==1.mlnx.4.6.2134 -sx-examples==1.mlnx.4.6.2134 -sx-examples-dev==1.mlnx.4.6.2134 -sx-gen-utils==1.mlnx.4.6.2134 -sx-gen-utils-dev==1.mlnx.4.6.2134 -sx-hash-calc==1.mlnx.4.6.2134 -sx-obj-desc-lib==1.mlnx.4.6.2134 -sx-obj-desc-lib-dev==1.mlnx.4.6.2134 +sx-acl-helper==1.mlnx.4.6.2202 +sx-acl-helper-dev==1.mlnx.4.6.2202 +sx-complib==1.mlnx.4.6.2202 +sx-complib-dev==1.mlnx.4.6.2202 +sx-examples==1.mlnx.4.6.2202 +sx-examples-dev==1.mlnx.4.6.2202 +sx-gen-utils==1.mlnx.4.6.2202 +sx-gen-utils-dev==1.mlnx.4.6.2202 +sx-hash-calc==1.mlnx.4.6.2202 +sx-obj-desc-lib==1.mlnx.4.6.2202 +sx-obj-desc-lib-dev==1.mlnx.4.6.2202 sx-scew==1.mlnx.4.5.5142 sx-scew-dev==1.mlnx.4.5.5142 -sxd-libs==1.mlnx.4.6.2134 -sxd-libs-dev==1.mlnx.4.6.2134 +sxd-libs==1.mlnx.4.6.2202 +sxd-libs-dev==1.mlnx.4.6.2202 syncd==1.0.0 syncd-dbg==1.0.0 +syncd-dbgsym==1.0.0 vim==2:8.2.2434-3+deb11u1 vim-runtime==2:8.2.2434-3+deb11u1 -wjh-libs==1.mlnx.4.6.2134 -wjh-libs-dev==1.mlnx.4.6.2134 +wjh-libs==1.mlnx.4.6.2202 +wjh-libs-dev==1.mlnx.4.6.2202 zlib1g-dev==1:1.2.11.dfsg-2+deb11u2 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 index 8d8f2bcb4d9a..d49cf202c9dc 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 @@ -3,5 +3,5 @@ importlib-metadata==1.6.0 jsonschema==3.2.0 more-itertools==4.2.0 pyrsistent==0.15.5 -python_sdk_api==4.6.2134 +python_sdk_api==4.6.2202 zipp==1.0.0 diff --git a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-arm64 b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-arm64 index 50830ad960ec..55419d341c51 100644 --- a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-arm64 +++ b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-arm64 @@ -6,7 +6,7 @@ libdevmapper1.02.1==2:1.02.175-2.1 libdpkg-perl==1.20.13 libevent-2.1-7==2.1.12-stable-1 libexpat1-dev==2.2.10-2+deb11u5 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libnfsidmap2==0.25-6 libpcap-dev==1.10.0-2 libpcap0.8==1.10.0-2 diff --git a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-armhf b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-armhf index bb286f115e7d..4b3754d4e00f 100644 --- a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-armhf +++ b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-bullseye-armhf @@ -6,7 +6,7 @@ libdevmapper1.02.1==2:1.02.175-2.1 libdpkg-perl==1.20.13 libevent-2.1-7==2.1.12-stable-1 libexpat1-dev==2.2.10-2+deb11u5 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libnfsidmap2==0.25-6 libpcap-dev==1.10.0-2 libpcap0.8==1.10.0-2 diff --git a/files/build/versions/dockers/docker-syncd-vs/versions-deb-bullseye b/files/build/versions/dockers/docker-syncd-vs/versions-deb-bullseye index 526f470f7e22..fcb2674a5523 100644 --- a/files/build/versions/dockers/docker-syncd-vs/versions-deb-bullseye +++ b/files/build/versions/dockers/docker-syncd-vs/versions-deb-bullseye @@ -9,7 +9,7 @@ libdebuginfod1==0.183-1 libdw1==0.183-1 libedit2==3.1-20191231-2+b1 libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 libgpm2==1.20.7-8 libhiredis0.14-dbgsym==0.14.1-1 libicu67==67.1-7 @@ -17,10 +17,13 @@ libipt2==2.0.3-1 libmpfr6==4.1.0-3 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 +libsaimetadata-dbgsym==1.0.0 libsairedis==1.0.0 libsairedis-dbg==1.0.0 +libsairedis-dbgsym==1.0.0 libsaivs==1.0.0 libsaivs-dbg==1.0.0 +libsaivs-dbgsym==1.0.0 libsource-highlight-common==3.1.9-3 libsource-highlight4v5==3.1.9-3+b1 libswsscommon-dbgsym==1.0.0 @@ -30,5 +33,6 @@ sshpass==1.09-1+b1 strace==5.10-1 syncd-vs==1.0.0 syncd-vs-dbg==1.0.0 +syncd-vs-dbgsym==1.0.0 vim==2:8.2.2434-3+deb11u1 vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-teamd/versions-deb-bookworm b/files/build/versions/dockers/docker-teamd/versions-deb-bookworm new file mode 100644 index 000000000000..22d08f783258 --- /dev/null +++ b/files/build/versions/dockers/docker-teamd/versions-deb-bookworm @@ -0,0 +1,31 @@ +gdb==13.1-3 +gdbserver==13.1-3 +libbabeltrace1==1.5.11-1+b2 +libboost-regex1.74.0==1.74.0+ds1-21 +libcbor0.8==0.8.0-2+b1 +libcurl3-gnutls==7.88.1-10+deb12u5 +libdebuginfod-common==0.188-2.1 +libdebuginfod1==0.188-2.1 +libdw1==0.188-2.1 +libedit2==3.1-20221030-2 +libfido2-1==1.12.0-2+b1 +libglib2.0-0==2.74.6-2 +libgpm2==1.20.7-10+b1 +libicu72==72.1-3 +libipt2==2.0.5-1 +libmpfr6==4.2.0-1 +libsource-highlight-common==3.1.9-4.2 +libsource-highlight4v5==3.1.9-4.2+b3 +libswsscommon-dbgsym==1.0.0 +libteam-utils==1.31-1 +libteam-utils-dbgsym==1.31-1 +libteamdctl0-dbgsym==1.31-1 +libunwind8==1.6.2-3 +openssh-client==1:9.2p1-2+deb12u2 +sensible-utils==0.0.17+nmu1 +sshpass==1.09-1+b1 +strace==6.1-0.1 +swss-dbg==1.0.0 +ucf==3.0043+nmu1 +vim==2:9.0.1378-2 +vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/dockers/docker-teamd/versions-deb-bullseye b/files/build/versions/dockers/docker-teamd/versions-deb-bullseye deleted file mode 100644 index 7b97b16842d9..000000000000 --- a/files/build/versions/dockers/docker-teamd/versions-deb-bullseye +++ /dev/null @@ -1,28 +0,0 @@ -gdb==10.1-1.7 -gdbserver==10.1-1.7 -libbabeltrace1==1.5.8-1+b3 -libboost-regex1.74.0==1.74.0-9 -libcbor0==0.5.0+dfsg-2 -libcurl3-gnutls==7.74.0-1.3+deb11u11 -libdebuginfod1==0.183-1 -libdw1==0.183-1 -libedit2==3.1-20191231-2+b1 -libfido2-1==1.6.0-2 -libglib2.0-0==2.66.8-1 -libgpm2==1.20.7-8 -libicu67==67.1-7 -libipt2==2.0.3-1 -libmpfr6==4.1.0-3 -libsource-highlight-common==3.1.9-3 -libsource-highlight4v5==3.1.9-3+b1 -libswsscommon-dbgsym==1.0.0 -libteam-utils==1.30-1 -libteam-utils-dbgsym==1.30-1 -libteamdctl0-dbgsym==1.30-1 -libunwind8==1.3.2-2 -openssh-client==1:8.4p1-5+deb11u3 -sshpass==1.09-1+b1 -strace==5.10-1 -swss-dbg==1.0.0 -vim==2:8.2.2434-3+deb11u1 -vim-runtime==2:8.2.2434-3+deb11u1 diff --git a/files/build/versions/dockers/docker-teamd/versions-mirror b/files/build/versions/dockers/docker-teamd/versions-mirror new file mode 100644 index 000000000000..8d5ca2a61ab6 --- /dev/null +++ b/files/build/versions/dockers/docker-teamd/versions-mirror @@ -0,0 +1,2 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T18:53:21Z +deb.debian.org_debian_dists_bookworm-updates==2024-04-04T20:12:41Z diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm index 6319662ec1af..9cfdc36f640a 100644 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm +++ b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm @@ -26,9 +26,9 @@ autopoint==0.21-12 autotools-dev==20220109.1 bash-completion==1:2.11-6 bc==1.07.1-3+b1 -bind9-dnsutils==1:9.18.19-1~deb12u1 -bind9-host==1:9.18.19-1~deb12u1 -bind9-libs==1:9.18.19-1~deb12u1 +bind9-dnsutils==1:9.18.24-1 +bind9-host==1:9.18.24-1 +bind9-libs==1:9.18.24-1 binutils==2.40-2 binutils-aarch64-linux-gnu==2.40-2 binutils-arm-linux-gnueabihf==2.40-2 @@ -37,7 +37,8 @@ binutils-x86-64-linux-gnu==2.40-2 bison==2:3.8.2+dfsg-1+b1 blt==2.5.3+dfsg-4.1 bsd-mailx==8.1.2-0.20220412cvs-1 -bsdextrautils==2.38.1-5+b1 +bsdextrautils==2.38.1-5+deb12u1 +bsdutils==1:2.38.1-5+deb12u1 build-essential==12.9 byacc==1:2.0.20221106-1 bzip2==1.0.8-5+b1 @@ -98,7 +99,7 @@ dirmngr==2.2.40-1.1 distro-info-data==0.58+deb12u1 dkms==3.0.10-8+deb12u1 dmsetup==2:1.02.185-2 -dnsutils==1:9.18.19-1~deb12u1 +dnsutils==1:9.18.24-1 docbook==4.5-10 docbook-dsssl==1.79-10 docbook-to-man==1:2.0.0-45 @@ -107,7 +108,7 @@ docbook-xml==4.5-12 docker-buildx-plugin==0.10.5-1~debian.12~bookworm docker-ce==5:24.0.2-1~debian.12~bookworm docker-ce-cli==5:24.0.2-1~debian.12~bookworm -docker-ce-rootless-extras==5:25.0.0-1~debian.12~bookworm +docker-ce-rootless-extras==5:26.0.0-1~debian.12~bookworm docker-compose-plugin==2.18.1-1~debian.12~bookworm docutils-common==0.19+dfsg-6 dosfstools==4.2-1 @@ -210,9 +211,9 @@ i965-va-driver==2.4.1+dfsg1-1 ibverbs-providers==44.0-2 icc-profiles-free==2.0.1+dfsg-1.1 icu-devtools==72.1-3 -imagemagick==8:6.9.11.60+dfsg-1.6 -imagemagick-6-common==8:6.9.11.60+dfsg-1.6 -imagemagick-6.q16==8:6.9.11.60+dfsg-1.6 +imagemagick==8:6.9.11.60+dfsg-1.6+deb12u1 +imagemagick-6-common==8:6.9.11.60+dfsg-1.6+deb12u1 +imagemagick-6.q16==8:6.9.11.60+dfsg-1.6+deb12u1 inetutils-telnet==2:2.4-2+deb12u1 install-info==6.8-6+b1 intel-media-va-driver==23.1.1+dfsg1-1 @@ -315,7 +316,8 @@ libberkeleydb-perl==0.64-2+b1 libbinutils==2.40-2 libbit-vector-perl==7.4-2+b1 libblas3==3.11.0-2 -libblkid-dev==2.38.1-5+b1 +libblkid-dev==2.38.1-5+deb12u1 +libblkid1==2.38.1-5+deb12u1 libbluray2==1:1.3.4-1 libboost-atomic-dev==1.74.0.3 libboost-atomic1.74-dev==1.74.0+ds1-21 @@ -382,16 +384,16 @@ libbsh-java==2.0b4-20 libbz2-dev==1.0.8-5+b1 libc-ares-dev==1.18.1-3 libc-ares2==1.18.1-3 -libc-dev-bin==2.36-9+deb12u3 -libc-devtools==2.36-9+deb12u3 -libc-l10n==2.36-9+deb12u3 +libc-dev-bin==2.36-9+deb12u4 +libc-devtools==2.36-9+deb12u4 +libc-l10n==2.36-9+deb12u4 libc6-armhf-cross==2.36-8cross1 -libc6-dbg==2.36-9+deb12u3 -libc6-dev==2.36-9+deb12u3 -libc6-dev-i386==2.36-9+deb12u3 -libc6-dev-x32==2.36-9+deb12u3 -libc6-i386==2.36-9+deb12u3 -libc6-x32==2.36-9+deb12u3 +libc6-dbg==2.36-9+deb12u4 +libc6-dev==2.36-9+deb12u4 +libc6-dev-i386==2.36-9+deb12u4 +libc6-dev-x32==2.36-9+deb12u4 +libc6-i386==2.36-9+deb12u4 +libc6-x32==2.36-9+deb12u4 libcaca0==0.99.beta20-3 libcacard0==1:2.8.0-3 libcairo-gobject2==1.16.0-7 @@ -456,7 +458,7 @@ libconvert-binhex-perl==1.125-3 libcpanel-json-xs-perl==4.35-1 libcrypt-dev==1:4.4.33-2 libcrypt-rc4-perl==2.02-5 -libcryptsetup12==2:2.6.1-4~deb12u1 +libcryptsetup12==2:2.6.1-4~deb12u2 libctf-nobfd0==2.40-2 libctf0==2.40-2 libcunit1==2.1-3-dfsg-2.6 @@ -491,7 +493,7 @@ libdbus-glib-1-2==0.112-3 libdbus-glib-1-dev==0.112-3 libdbus-glib-1-dev-bin==0.112-3 libdconf1==0.40.0-4 -libde265-0==1.0.11-1+deb12u1 +libde265-0==1.0.11-1+deb12u2 libdebhelper-perl==13.11.4 libdebuginfod-common==0.188-2.1 libdebuginfod1==0.188-2.1 @@ -568,7 +570,7 @@ libfastjson4==1.2304.0-1 libfcgi-bin==2.4.2-2 libfcgi-perl==0.82+ds-2 libfcgi0ldbl==2.4.2-2 -libfdisk1==2.38.1-5+b1 +libfdisk1==2.38.1-5+deb12u1 libfdt1==1.6.1-4+b1 libfeature-compat-class-perl==0.05-1 libfeature-compat-try-perl==0.05-1 @@ -662,7 +664,7 @@ libgme0==0.6.3-6 libgmock-dev==1.12.1-0.2 libgmp-dev==2:6.2.1+dfsg1-1.1 libgmpxx4ldbl==2:6.2.1+dfsg1-1.1 -libgnutls-dane0==3.7.9-2+deb12u1 +libgnutls-dane0==3.7.9-2+deb12u2 libgomp1==12.2.0-14 libgomp1-armhf-cross==12.2.0-14cross1 libgoogle-perftools4==2.10-1 @@ -757,7 +759,7 @@ libipc-system-simple-perl==1.30-2 libipt2==2.0.5-1 libiptc-dev==1.8.9-2 libiscsi7==1.19.0-3 -libisl23==0.25-1 +libisl23==0.25-1.1 libiterator-perl==0.03+ds1-2 libiterator-util-perl==0.02+ds1-2 libitext1-java==1.4-7 @@ -796,6 +798,7 @@ libjson-c5==0.16-2 libjson-maybexs-perl==1.004004-1 libjson-perl==4.10000-1 libjson-xs-perl==4.030-2+b1 +libjsoncpp-dev==1.9.5-4 libjsoncpp25==1.9.5-4 libjsoup-java==1.15.3-1 libjsp-api-java==2.3.4-3 @@ -854,14 +857,14 @@ liblzo2-2==2.10-2 liblzo2-dev==2.10-2 libmagic-mgc==1:5.44-3 libmagic1==1:5.44-3 -libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.6 -libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.6 -libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.6 +libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u1 +libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.6+deb12u1 +libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.6+deb12u1 libmail-sendmail-perl==0.80-3 libmailtools-perl==2.21-2 -libmariadb-dev==1:10.11.4-1~deb12u1 -libmariadb-dev-compat==1:10.11.4-1~deb12u1 -libmariadb3==1:10.11.4-1~deb12u1 +libmariadb-dev==1:10.11.6-0+deb12u1 +libmariadb-dev-compat==1:10.11.6-0+deb12u1 +libmariadb3==1:10.11.6-0+deb12u1 libmarkdown2==2.2.7-2 libmath-base85-perl==0.5+dfsg-2 libmaven-archiver-java==3.6.0-1 @@ -899,7 +902,8 @@ libmoo-perl==2.005005-1 libmoose-perl==2.2203-1 libmoosex-aliases-perl==0.11-2 libmoox-aliases-perl==0.001006-2 -libmount-dev==2.38.1-5+b1 +libmount-dev==2.38.1-5+deb12u1 +libmount1==2.38.1-5+deb12u1 libmouse-perl==2.5.10-1+b3 libmp3lame0==3.100-6 libmpc3==1.3.1-1 @@ -949,7 +953,7 @@ libnpth0==1.6-3 libnsl-dev==1.3.0-2 libnsl2==1.3.0-2 libnspr4==2:4.35-1 -libnss-systemd==252.19-1~deb12u1 +libnss-systemd==252.22-1~deb12u1 libnss3==2:3.87.1-1 libnuma-dev==2.0.16-1 libnuma1==2.0.16-1 @@ -983,7 +987,7 @@ libpackage-stash-xs-perl==0.30-1+b1 libpackagekit-glib2-18==1.2.6-5 libpadwalker-perl==2.5-1+b3 libpam-cap==1:2.66-4 -libpam-systemd==252.19-1~deb12u1 +libpam-systemd==252.22-1~deb12u1 libpam0g-dev==1.5.2-6+deb12u1 libpango-1.0-0==1.50.12+ds-1 libpango1.0-dev==1.50.12+ds-1 @@ -1166,6 +1170,7 @@ libslf4j-java==1.7.32-1 libslirp0==4.7.0-1 libsm-dev==2:1.2.3-1 libsm6==2:1.2.3-1 +libsmartcols1==2.38.1-5+deb12u1 libsnappy-java==1.1.8.3-1 libsnappy-jni==1.1.8.3-1 libsnappy1v5==1.1.9-3 @@ -1225,8 +1230,8 @@ libsynctex2==2022.20220321.62855-5.1+deb12u1 libsyntax-keyword-try-perl==0.28-1 libsys-cpuaffinity-perl==1.13~03-2+b1 libsys-hostname-long-perl==1.5-3 -libsystemd-dev==252.19-1~deb12u1 -libsystemd-shared==252.19-1~deb12u1 +libsystemd-dev==252.22-1~deb12u1 +libsystemd-shared==252.22-1~deb12u1 libtag1v5==1.13-2 libtag1v5-vanilla==1.13-2 libtask-weaken-perl==1.06-2 @@ -1280,9 +1285,9 @@ libubsan1==12.2.0-14 libubsan1-armhf-cross==12.2.0-14cross1 libuchardet0==0.0.7-1 libucx0==1.13.1-1 -libudev-dev==252.19-1~deb12u1 +libudev-dev==252.22-1~deb12u1 libudfread0==1.1.2-1 -libunbound8==1.17.1-2+deb12u1 +libunbound8==1.17.1-2+deb12u2 libunicode-map-perl==0.112-13+b1 libunicode-utf8-perl==0.62-2 libunivocity-parsers-java==2.9.1-1 @@ -1296,7 +1301,8 @@ libusb-1.0-0-dev==2:1.0.26-1 libusb-1.0-doc==2:1.0.26-1 libusb-dev==2:0.1.12-32 libusbredirparser1==0.13.0-2 -libuv1==1.44.2-1 +libuuid1==2.38.1-5+deb12u1 +libuv1==1.44.2-1+deb12u1 libv4l-0==1.22.1-5+b2 libv4lconvert0==1.22.1-5+b2 libva-drm2==2.17.0-1 @@ -1473,14 +1479,14 @@ libzvbi0==0.2.41-1 libzzip-0-13==0.13.72+dfsg.1-1.1 licensecheck==3.3.5-1 lintian==2.116.3 -linux-compiler-gcc-12-x86==6.1.69-1 -linux-headers-6.1.0-17-amd64==6.1.69-1 -linux-headers-6.1.0-17-arm64==6.1.69-1 -linux-headers-6.1.0-17-common==6.1.69-1 -linux-headers-amd64==6.1.69-1 -linux-headers-arm64==6.1.69-1 -linux-kbuild-6.1==6.1.69-1 -linux-libc-dev==6.1.69-1 +linux-compiler-gcc-12-x86==6.1.76-1 +linux-headers-6.1.0-18-amd64==6.1.76-1 +linux-headers-6.1.0-18-arm64==6.1.76-1 +linux-headers-6.1.0-18-common==6.1.76-1 +linux-headers-amd64==6.1.76-1 +linux-headers-arm64==6.1.76-1 +linux-kbuild-6.1==6.1.76-1 +linux-libc-dev==6.1.76-1 linuxdoc-tools==0.9.82-1 llvm-14==1:14.0.6-12 llvm-14-dev==1:14.0.6-12 @@ -1488,7 +1494,7 @@ llvm-14-linker-tools==1:14.0.6-12 llvm-14-runtime==1:14.0.6-12 llvm-14-tools==1:14.0.6-12 lmodern==2.005-1 -locales==2.36-9+deb12u3 +locales==2.36-9+deb12u4 logrotate==3.21.0-1 lsb-release==12.0-1 lsof==4.95.0-1 @@ -1507,7 +1513,7 @@ man-db==2.11.2-2 man2html-base==1.6g-14 manpages==6.03-2 manpages-dev==6.03-2 -mariadb-common==1:10.11.4-1~deb12u1 +mariadb-common==1:10.11.6-0+deb12u1 maven==3.8.7-1 maven-debian-helper==2.6.3 maven-repo-helper==1.11 @@ -1517,6 +1523,7 @@ mesa-vdpau-drivers==22.3.6-1+deb12u1 mesa-vulkan-drivers==22.3.6-1+deb12u1 mime-support==3.66 module-assistant==0.11.11 +mount==2.38.1-5+deb12u1 mupdf-tools==1.21.1+ds2-1+b4 mysql-common==5.8+1.1.0 ncurses-term==6.4-4 @@ -1535,16 +1542,16 @@ nodejs-doc==18.19.0+dfsg-6~deb12u1 nss-plugin-pem==1.0.8+1-1 ocl-icd-libopencl1==2.3.1-1 openjade==1.4devel1-22 -openjdk-17-jdk==17.0.9+9-1~deb12u1 -openjdk-17-jdk-headless==17.0.9+9-1~deb12u1 -openjdk-17-jre==17.0.9+9-1~deb12u1 -openjdk-17-jre-headless==17.0.9+9-1~deb12u1 +openjdk-17-jdk==17.0.10+7-1~deb12u1 +openjdk-17-jdk-headless==17.0.10+7-1~deb12u1 +openjdk-17-jre==17.0.10+7-1~deb12u1 +openjdk-17-jre-headless==17.0.10+7-1~deb12u1 opensp==1.5.2-13+b2 openssh-client==1:9.2p1-2+deb12u2 openssh-server==1:9.2p1-2+deb12u2 openssh-sftp-server==1:9.2p1-2+deb12u2 openssl==3.0.11-1~deb12u2 -ovmf==2022.11-6 +ovmf==2022.11-6+deb12u1 packagekit==1.2.6-5 packagekit-tools==1.2.6-5 pahole==1.24-4.1 @@ -1740,12 +1747,12 @@ python3.11-dbg==3.11.2-6 python3.11-dev==3.11.2-6 python3.11-minimal==3.11.2-6 python3.11-venv==3.11.2-6 -qemu-block-extra==1:7.2+dfsg-7+deb12u3 -qemu-system-common==1:7.2+dfsg-7+deb12u3 -qemu-system-data==1:7.2+dfsg-7+deb12u3 -qemu-system-gui==1:7.2+dfsg-7+deb12u3 -qemu-system-x86==1:7.2+dfsg-7+deb12u3 -qemu-utils==1:7.2+dfsg-7+deb12u3 +qemu-block-extra==1:7.2+dfsg-7+deb12u5 +qemu-system-common==1:7.2+dfsg-7+deb12u5 +qemu-system-data==1:7.2+dfsg-7+deb12u5 +qemu-system-gui==1:7.2+dfsg-7+deb12u5 +qemu-system-x86==1:7.2+dfsg-7+deb12u5 +qemu-utils==1:7.2+dfsg-7+deb12u5 qt5-gtk-platformtheme==5.15.8+dfsg-11 qt5-qmake==5.15.8+dfsg-11 qt5-qmake-bin==5.15.8+dfsg-11 @@ -1794,9 +1801,9 @@ strace==6.1-0.1 sudo==1.9.13p3-1+deb12u1 swig==4.1.0-0.2 swig4.0==4.1.0-0.2 -systemd==252.19-1~deb12u1 -systemd-sysv==252.19-1~deb12u1 -systemd-timesyncd==252.19-1~deb12u1 +systemd==252.22-1~deb12u1 +systemd-sysv==252.22-1~deb12u1 +systemd-timesyncd==252.22-1~deb12u1 t1utils==1.41-4 tcl==8.6.13 tcl8.6==8.6.13+dfsg-2 @@ -1823,7 +1830,9 @@ tk8.6==8.6.13-2 tk8.6-blt2.5==2.5.3+dfsg-4.1 ucf==3.0043+nmu1 unzip==6.0-28 -uuid-dev==2.38.1-5+b1 +util-linux==2.38.1-5+deb12u1 +util-linux-extra==2.38.1-5+deb12u1 +uuid-dev==2.38.1-5+deb12u1 va-driver-all==2.17.0-1 vdpau-driver-all==1.5-2 velocity==1.7-6 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf index 42afef5cde73..c574ebc8d07e 100644 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf +++ b/files/build/versions/dockers/sonic-slave-bookworm/versions-deb-bookworm-armhf @@ -3,7 +3,7 @@ dctrl-tools==2.24-3 dvipng==1.15-1.1 libnanomsg-dev==1.1.5+dfsg-1.1 libnanomsg5==1.1.5+dfsg-1.1 -linux-compiler-gcc-12-arm==6.1.69-1 -linux-headers-6.1.0-17-armmp==6.1.69-1 -linux-headers-armmp==6.1.69-1 +linux-compiler-gcc-12-arm==6.1.76-1 +linux-headers-6.1.0-18-armmp==6.1.76-1 +linux-headers-armmp==6.1.76-1 wget==1.21.3-1+b1 diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror b/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror new file mode 100644 index 000000000000..1b3c7013d7d5 --- /dev/null +++ b/files/build/versions/dockers/sonic-slave-bookworm/versions-mirror @@ -0,0 +1 @@ +deb.debian.org_debian-security_dists_bookworm-security==2024-04-04T01:14:25Z diff --git a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 b/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 index 1ba64419fcff..f84159bb039e 100644 --- a/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-bookworm/versions-py3 @@ -63,7 +63,7 @@ parse==1.19.0 pep517==0.13.0 pexpect==4.8.0 pillow==10.0.0 -pip==23.3.2 +pip==24.0 platformdirs==2.6.0 pluggy==1.0.0+repack ptyprocess==0.7.0 @@ -72,7 +72,7 @@ pyang==2.4.0 pyangbind==0.8.2 pyasn1==0.4.8 pyasn1-modules==0.2.8 -pyfakefs==5.3.4 +pyfakefs==5.3.5 pygments==2.14.0 pygobject==3.42.2 pyhamcrest==2.0.3 @@ -91,13 +91,15 @@ python-magic==0.4.26 pytz==2022.7.1 pyxdg==0.28 pyyaml==6.0 -redis==5.0.1 +redis==5.0.3 regex==2023.12.25 requests==2.28.1 roman==3.3 scour==0.38.2 service-identity==18.1.0 setuptools==66.1.1 +setuptools-scm==8.0.4 +setuptools-scm-git-archive==1.4.1 six==1.16.0 snowballstemmer==2.2.0 soupsieve==2.3.2 diff --git a/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye b/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye index 28a5458df186..8b5a7f3159aa 100644 --- a/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye +++ b/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye @@ -24,9 +24,9 @@ autopoint==0.21-4 autotools-dev==20180224.1+nmu1 bash-completion==1:2.11-2 bc==1.07.1-2+b2 -bind9-dnsutils==1:9.16.44-1~deb11u1 -bind9-host==1:9.16.44-1~deb11u1 -bind9-libs==1:9.16.44-1~deb11u1 +bind9-dnsutils==1:9.16.48-1 +bind9-host==1:9.16.48-1 +bind9-libs==1:9.16.48-1 binfmt-support==2.2.1-1+deb11u1 binutils==2.35.2-2 binutils-aarch64-linux-gnu==2.35.2-2 @@ -35,7 +35,8 @@ binutils-common==2.35.2-2 binutils-x86-64-linux-gnu==2.35.2-2 bison==2:3.7.5+dfsg-1 blt==2.5.3+dfsg-4.1 -bsdextrautils==2.36.1-8+deb11u1 +bsdextrautils==2.36.1-8+deb11u2 +bsdutils==1:2.36.1-8+deb11u2 build-essential==12.9 byacc==20140715-1+b1 bzip2==1.0.8-4 @@ -72,7 +73,7 @@ dconf-service==0.38.0-2 dctrl-tools==2.24-3+b1 debhelper==13.3.4 debian-keyring==2021.07.26 -debootstrap==1.0.123+deb11u1 +debootstrap==1.0.123+deb11u2 default-jdk==2:1.11-72 default-jdk-headless==2:1.11-72 default-jre==2:1.11-72 @@ -91,11 +92,11 @@ dh-strip-nondeterminism==1.12.0-1 dictionaries-common==1.28.4 diffstat==1.64-1 dirmngr==2.2.27-2+deb11u2 -distro-info-data==0.51+deb11u4 +distro-info-data==0.51+deb11u5 dkms==2.8.4-3 dmeventd==2:1.02.175-2.1 dmsetup==2:1.02.175-2.1 -dnsutils==1:9.16.44-1~deb11u1 +dnsutils==1:9.16.48-1 docbook==4.5-6 docbook-dsssl==1.79-9.2 docbook-to-man==1:2.0.0-45 @@ -105,7 +106,7 @@ docbook-xsl==1.79.2+dfsg-1 docker-buildx-plugin==0.10.5-1~debian.11~bullseye docker-ce==5:24.0.2-1~debian.11~bullseye docker-ce-cli==5:24.0.2-1~debian.11~bullseye -docker-ce-rootless-extras==5:25.0.0-1~debian.11~bullseye +docker-ce-rootless-extras==5:26.0.0-1~debian.11~bullseye docker-compose-plugin==2.18.1-1~debian.11~bullseye docutils-common==0.16+dfsg-4 dosfstools==4.2-1 @@ -212,9 +213,9 @@ i965-va-driver==2.4.1+dfsg1-1 ibverbs-providers==33.2-1 icc-profiles-free==2.0.1+dfsg-1.1 icu-devtools==67.1-7 -imagemagick==8:6.9.11.60+dfsg-1.3+deb11u1 -imagemagick-6-common==8:6.9.11.60+dfsg-1.3+deb11u1 -imagemagick-6.q16==8:6.9.11.60+dfsg-1.3+deb11u1 +imagemagick==8:6.9.11.60+dfsg-1.3+deb11u3 +imagemagick-6-common==8:6.9.11.60+dfsg-1.3+deb11u3 +imagemagick-6.q16==8:6.9.11.60+dfsg-1.3+deb11u3 install-info==6.7.0.dfsg.2-6 intel-media-va-driver==21.1.1+dfsg1-1 intltool-debian==0.35.0+20060710.5 @@ -316,7 +317,8 @@ libbind-export-dev==1:9.11.19+dfsg-2.1 libbinutils==2.35.2-2 libbit-vector-perl==7.4-1+b7 libblas3==3.9.0-3+deb11u1 -libblkid-dev==2.36.1-8+deb11u1 +libblkid-dev==2.36.1-8+deb11u2 +libblkid1==2.36.1-8+deb11u2 libbluray2==1:1.2.1-4+deb11u2 libboost-atomic-dev==1.74.0.3 libboost-atomic1.74-dev==1.74.0-9 @@ -382,16 +384,16 @@ libbsh-java==2.0b4-20 libbz2-dev==1.0.8-4 libc-ares-dev==1.17.1-1+deb11u3 libc-ares2==1.17.1-1+deb11u3 -libc-dev-bin==2.31-13+deb11u7 -libc-devtools==2.31-13+deb11u7 -libc-l10n==2.31-13+deb11u7 +libc-dev-bin==2.31-13+deb11u8 +libc-devtools==2.31-13+deb11u8 +libc-l10n==2.31-13+deb11u8 libc6-armhf-cross==2.31-9cross4 -libc6-dbg==2.31-13+deb11u7 -libc6-dev==2.31-13+deb11u7 -libc6-dev-i386==2.31-13+deb11u7 -libc6-dev-x32==2.31-13+deb11u7 -libc6-i386==2.31-13+deb11u7 -libc6-x32==2.31-13+deb11u7 +libc6-dbg==2.31-13+deb11u8 +libc6-dev==2.31-13+deb11u8 +libc6-dev-i386==2.31-13+deb11u8 +libc6-dev-x32==2.31-13+deb11u8 +libc6-i386==2.31-13+deb11u8 +libc6-x32==2.31-13+deb11u8 libcaca0==0.99.beta19-2.2 libcacard0==1:2.8.0-3 libcairo-gobject2==1.16.0-5 @@ -483,7 +485,7 @@ libdbus-glib-1-2==0.110-6 libdbus-glib-1-dev==0.110-6 libdbus-glib-1-dev-bin==0.110-6 libdconf1==0.38.0-2 -libde265-0==1.0.11-0+deb11u1 +libde265-0==1.0.11-0+deb11u3 libdebhelper-perl==13.3.4 libdebian-source-perl==0.116 libdebuginfod1==0.183-1 @@ -499,7 +501,7 @@ libdevel-stacktrace-perl==2.0400-1 libdevmapper-event1.02.1==2:1.02.175-2.1 libdevmapper1.02.1==2:1.02.175-2.1 libdist-checkconflicts-perl==0.11-1.1 -libdistro-info-perl==1.0 +libdistro-info-perl==1.0+deb11u1 libdjvulibre-text==3.5.28-2 libdjvulibre21==3.5.28-2 libdns-export1110==1:9.11.19+dfsg-2.1 @@ -625,11 +627,11 @@ libglapi-mesa==20.3.5-1 libgles-dev==1.3.2-1 libgles1==1.3.2-1 libgles2==1.3.2-1 -libglib2.0-0==2.66.8-1 -libglib2.0-bin==2.66.8-1 -libglib2.0-data==2.66.8-1 -libglib2.0-dev==2.66.8-1 -libglib2.0-dev-bin==2.66.8-1 +libglib2.0-0==2.66.8-1+deb11u1 +libglib2.0-bin==2.66.8-1+deb11u1 +libglib2.0-data==2.66.8-1+deb11u1 +libglib2.0-dev==2.66.8-1+deb11u1 +libglib2.0-dev-bin==2.66.8-1+deb11u1 libglu1-mesa==9.0.1-1 libglu1-mesa-dev==9.0.1-1 libglvnd-dev==1.3.2-1 @@ -641,7 +643,7 @@ libgme0==0.6.3-2 libgmock-dev==1.10.0.20201025-1.1 libgmp-dev==2:6.2.1+dfsg-1+deb11u1 libgmpxx4ldbl==2:6.2.1+dfsg-1+deb11u1 -libgnutls-dane0==3.7.1-5+deb11u3 +libgnutls-dane0==3.7.1-5+deb11u4 libgomp1==10.2.1-6 libgomp1-armhf-cross==10.2.1-6cross1 libgoogle-gson-java==2.8.6-1+deb11u1 @@ -824,15 +826,15 @@ liblzo2-2==2.10-2 liblzo2-dev==2.10-2 libmagic-mgc==1:5.39-3+deb11u1 libmagic1==1:5.39-3+deb11u1 -libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.3+deb11u1 -libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.3+deb11u1 -libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.3+deb11u1 +libmagickcore-6.q16-6==8:6.9.11.60+dfsg-1.3+deb11u3 +libmagickcore-6.q16-6-extra==8:6.9.11.60+dfsg-1.3+deb11u3 +libmagickwand-6.q16-6==8:6.9.11.60+dfsg-1.3+deb11u3 libmail-sendmail-perl==0.80-1.1 libmailtools-perl==2.21-1 libmailutils7==1:3.10-3+b1 -libmariadb-dev==1:10.5.21-0+deb11u1 -libmariadb-dev-compat==1:10.5.21-0+deb11u1 -libmariadb3==1:10.5.21-0+deb11u1 +libmariadb-dev==1:10.5.23-0+deb11u1 +libmariadb-dev-compat==1:10.5.23-0+deb11u1 +libmariadb3==1:10.5.23-0+deb11u1 libmarkdown2==2.2.6-1 libmaven-archiver-java==3.2.0-2.1 libmaven-clean-plugin-java==3.1.0-1 @@ -872,7 +874,8 @@ libmoose-perl==2.2014-2 libmoosex-aliases-perl==0.11-1.1 libmoox-aliases-perl==0.001006-1.1 libmoox-struct-perl==0.020-1 -libmount-dev==2.36.1-8+deb11u1 +libmount-dev==2.36.1-8+deb11u2 +libmount1==2.36.1-8+deb11u2 libmouse-perl==2.5.10-1+b1 libmp3lame0==3.100-3 libmpc3==1.2.0-1 @@ -904,7 +907,7 @@ libnewt-dev==0.52.21-4+b3 libnewt0.52==0.52.21-4+b3 libnfnetlink-dev==1.0.1-3+b1 libnfnetlink0==1.0.1-3+b1 -libnftables1==0.9.8-3.1+deb11u1 +libnftables1==0.9.8-3.1+deb11u2 libnftnl-dev==1.1.9-1 libnftnl11==1.1.9-1 libnghttp2-14==1.43.0-1+deb11u1 @@ -989,8 +992,8 @@ libpcsclite-dev==1.9.1-1 libpcsclite1==1.9.1-1 libpdfbox-java==1:1.8.16-2 libpegdown-java==1.6.0-1.1 -libperl-dev==5.32.1-4+deb11u2 -libperl5.32==5.32.1-4+deb11u2 +libperl-dev==5.32.1-4+deb11u3 +libperl5.32==5.32.1-4+deb11u3 libperlio-gzip-perl==0.19-1+b7 libpfm4==4.11.1+git32-gd0b85fb-1 libpgm-5.3-0==5.3.128~dfsg-2 @@ -1122,6 +1125,7 @@ libslf4j-java==1.7.30-1 libslirp0==4.4.0-1+deb11u2 libsm-dev==2:1.2.3-1 libsm6==2:1.2.3-1 +libsmartcols1==2.36.1-8+deb11u2 libsnappy-java==1.1.8.3-1 libsnappy-jni==1.1.8.3-1 libsnappy1v5==1.1.8-1 @@ -1222,7 +1226,7 @@ libuchardet0==0.0.7-1 libucx0==1.10.1~rc1+really.1.10.0-1 libudev-dev==247.3-7+deb11u4 libudfread0==1.1.1-1 -libunbound8==1.13.1-1+deb11u1 +libunbound8==1.13.1-1+deb11u2 libunicode-linebreak-perl==0.0.20190101-1+b3 libunicode-utf8-perl==0.62-1+b2 libunivocity-parsers-java==2.8.3-2 @@ -1236,7 +1240,8 @@ libusb-1.0-0-dev==2:1.0.24-3 libusb-1.0-doc==2:1.0.24-3 libusb-dev==2:0.1.12-32 libusbredirparser1==0.8.0-1+b1 -libuv1==1.40.0-2 +libuuid1==2.36.1-8+deb11u2 +libuv1==1.40.0-2+deb11u1 libv4l-0==1.20.0-2 libv4lconvert0==1.20.0-2 libva-drm2==2.10.0-1 @@ -1410,26 +1415,26 @@ libyaml-libyaml-perl==0.82+repack-1+b1 libyaml-tiny-perl==1.73-1 libz3-4==4.8.10-1 libz3-dev==4.8.10-1 -libzmq3-dev==4.3.4-1 -libzmq5==4.3.4-1 +libzmq3-dev==4.3.4-1+deb11u1 +libzmq5==4.3.4-1+deb11u1 libzvbi-common==0.2.35-18 libzvbi0==0.2.35-18 libzzip-0-13==0.13.62-3.3+deb11u1 licensecheck==3.1.1-2 lintian==2.104.0 -linux-compiler-gcc-10-x86==5.10.205-2 -linux-headers-5.10.0-27-amd64==5.10.205-2 -linux-headers-5.10.0-27-arm64==5.10.205-2 -linux-headers-5.10.0-27-common==5.10.205-2 -linux-headers-amd64==5.10.205-2 -linux-headers-arm64==5.10.205-2 -linux-kbuild-5.10==5.10.205-2 -linux-libc-dev==5.10.205-2 +linux-compiler-gcc-10-x86==5.10.209-2 +linux-headers-5.10.0-28-amd64==5.10.209-2 +linux-headers-5.10.0-28-arm64==5.10.209-2 +linux-headers-5.10.0-28-common==5.10.209-2 +linux-headers-amd64==5.10.209-2 +linux-headers-arm64==5.10.209-2 +linux-kbuild-5.10==5.10.209-2 +linux-libc-dev==5.10.209-2 linuxdoc-tools==0.9.82-1 llvm-11==1:11.0.1-2 llvm-11-runtime==1:11.0.1-2 lmodern==2.004.5-6.1 -locales==2.31-13+deb11u7 +locales==2.31-13+deb11u8 logrotate==3.18.0-2+deb11u2 lsb-release==11.1.0 lsof==4.93.2+dfsg-1.1 @@ -1452,7 +1457,7 @@ man-db==2.9.4-2 man2html-base==1.6g-14 manpages==5.10-1 manpages-dev==5.10-1 -mariadb-common==1:10.5.21-0+deb11u1 +mariadb-common==1:10.5.23-0+deb11u1 maven==3.6.3-5 maven-debian-helper==2.6 maven-repo-helper==1.10 @@ -1462,26 +1467,27 @@ mesa-vdpau-drivers==20.3.5-1 mesa-vulkan-drivers==20.3.5-1 mime-support==3.66 module-assistant==0.11.10 +mount==2.36.1-8+deb11u2 mysql-common==5.8+1.0.7 ncurses-term==6.2+20201114-2+deb11u2 netbase==6.3 netpbm==2:10.0-15.4 -nftables==0.9.8-3.1+deb11u1 +nftables==0.9.8-3.1+deb11u2 nlohmann-json3-dev==3.9.1-1 node-jquery==3.5.1+dfsg+~3.5.5-7 nodejs==14.21.3-deb-1nodesource1 ocl-icd-libopencl1==2.2.14-2 openjade==1.4devel1-22 -openjdk-11-jdk==11.0.21+9-1~deb11u1 -openjdk-11-jdk-headless==11.0.21+9-1~deb11u1 -openjdk-11-jre==11.0.21+9-1~deb11u1 -openjdk-11-jre-headless==11.0.21+9-1~deb11u1 +openjdk-11-jdk==11.0.22+7-1~deb11u1 +openjdk-11-jdk-headless==11.0.22+7-1~deb11u1 +openjdk-11-jre==11.0.22+7-1~deb11u1 +openjdk-11-jre-headless==11.0.22+7-1~deb11u1 opensp==1.5.2-13+b2 openssh-client==1:8.4p1-5+deb11u3 openssh-server==1:8.4p1-5+deb11u3 openssh-sftp-server==1:8.4p1-5+deb11u3 openssl==1.1.1w-0+deb11u1 -ovmf==2020.11-2+deb11u1 +ovmf==2020.11-2+deb11u2 packagekit==1.2.2-2 packagekit-tools==1.2.2-2 pango1.0-tools==1.46.2-3 @@ -1490,8 +1496,8 @@ patchutils==0.4.2-1 pbuilder==0.231 pbzip2==1.1.13-1 pci.ids==0.0~2021.02.08-1 -perl==5.32.1-4+deb11u2 -perl-modules-5.32==5.32.1-4+deb11u2 +perl==5.32.1-4+deb11u3 +perl-modules-5.32==5.32.1-4+deb11u3 perl-openssl-defaults==5 php-cli==2:7.4+76 php-codecoverage==9.2.5+dfsg-3 @@ -1595,7 +1601,7 @@ python3-dbg==3.9.2-3 python3-dbus==1.2.16-5 python3-debian==0.1.39 python3-dev==3.9.2-3 -python3-distro-info==1.0 +python3-distro-info==1.0+deb11u1 python3-distutils==3.9.2-1 python3-docutils==0.16+dfsg-4 python3-gi==3.38.0-2 @@ -1766,7 +1772,8 @@ tk8.6-blt2.5==2.5.3+dfsg-4.1 ucf==3.0043 unattended-upgrades==2.8 unzip==6.0-26+deb11u1 -uuid-dev==2.36.1-8+deb11u1 +util-linux==2.36.1-8+deb11u2 +uuid-dev==2.36.1-8+deb11u2 va-driver-all==2.10.0-1 vdpau-driver-all==1.4-3 velocity==1.7-6 diff --git a/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye-armhf b/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye-armhf index faf01b85446e..05c16b6c8182 100644 --- a/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye-armhf +++ b/files/build/versions/dockers/sonic-slave-bullseye/versions-deb-bullseye-armhf @@ -5,7 +5,7 @@ golang-1.15-src==1.15.15-1~deb11u4 libjpeg-dev==1:2.0.6-4 libjpeg62-turbo-dev==1:2.0.6-4 libunicode-linebreak-perl==0.0.20190101-1+b2 -linux-compiler-gcc-10-arm==5.10.205-2 -linux-headers-5.10.0-27-armmp==5.10.205-2 -linux-headers-armmp==5.10.205-2 +linux-compiler-gcc-10-arm==5.10.209-2 +linux-headers-5.10.0-28-armmp==5.10.209-2 +linux-headers-armmp==5.10.209-2 nasm==2.15.05-1 diff --git a/files/build/versions/dockers/sonic-slave-bullseye/versions-py3 b/files/build/versions/dockers/sonic-slave-bullseye/versions-py3 index 3b9b3be6d65a..2130d9b09ea7 100644 --- a/files/build/versions/dockers/sonic-slave-bullseye/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-bullseye/versions-py3 @@ -20,7 +20,7 @@ ctypesgen==1.0.2 dblatex==0.3.12 dbus-python==1.2.16 devscripts==2.21.3+deb11u1 -distro-info==1.0 +distro-info==1.0+deb11u1 docutils==0.16 fastentrypoints==0.12 gbp==0.9.22 @@ -60,9 +60,9 @@ parameterized==0.8.1 parse==1.6.6 pexpect==4.8.0 pillow==9.4.0 -pip==23.3.2 +pip==24.0 pluggy==0.13.0 -protobuf==4.25.2 +protobuf==4.25.3 ptyprocess==0.7.0 py==1.10.0 pyang==2.4.0 @@ -70,7 +70,7 @@ pyangbind==0.8.1 pyasn1==0.4.8 pyasn1-modules==0.2.1 pycurl==7.43.0.6 -pyfakefs==5.3.4 +pyfakefs==5.3.5 pygments==2.7.1 pygobject==3.38.0 pyhamcrest==1.9.0 @@ -88,7 +88,7 @@ python-magic==0.4.20 pytz==2021.1 pyxdg==0.27 pyyaml==5.4.1 -redis==5.0.1 +redis==5.0.3 regex==2023.12.25 requests==2.25.1 roman==2.0.0 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index 84fc7427ed9f..bd7630fea439 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -23,7 +23,7 @@ autopoint==0.19.8.1-9 autotools-dev==20180224.1 bash-completion==1:2.8-6 bc==1.07.1-2+b1 -bind9-host==1:9.11.5.P4+dfsg-5.1+deb10u9 +bind9-host==1:9.11.5.P4+dfsg-5.1+deb10u10 binfmt-support==2.2.0-2 binutils==2.31.1-16 binutils-aarch64-linux-gnu==2.31.1-16 @@ -57,7 +57,7 @@ cpp==4:8.3.0-1 cpp-8==8.3.0-6 cppcheck==1.86-1 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u8 +curl==7.64.0-4+deb10u9 dbus==1.12.28-0+deb10u1 dbus-user-session==1.12.28-0+deb10u1 dconf-gsettings-backend==0.30.1-2 @@ -86,7 +86,7 @@ distro-info-data==0.41+deb10u8 dkms==2.6.1-4 dmeventd==2:1.02.155-3 dmsetup==2:1.02.155-3 -dnsutils==1:9.11.5.P4+dfsg-5.1+deb10u9 +dnsutils==1:9.11.5.P4+dfsg-5.1+deb10u10 docbook==4.5-6 docbook-dsssl==1.79-9.1 docbook-to-man==1:2.0.0-42 @@ -95,7 +95,7 @@ docbook-xml==4.5-8 docker-buildx-plugin==0.10.5-1~debian.10~buster docker-ce==5:24.0.2-1~debian.10~buster docker-ce-cli==5:24.0.2-1~debian.10~buster -docker-ce-rootless-extras==5:25.0.0-1~debian.10~buster +docker-ce-rootless-extras==5:26.0.0-1~debian.10~buster docker-compose-plugin==2.18.1-1~debian.10~buster docutils-common==0.14+dfsg-4 docutils-doc==0.14+dfsg-4 @@ -191,9 +191,9 @@ i965-va-driver==2.3.0+dfsg1-1 ibverbs-providers==22.1-1 icc-profiles-free==2.0.1+dfsg-1 icu-devtools==63.1-6+deb10u3 -imagemagick==8:6.9.10.23+dfsg-2.1+deb10u5 -imagemagick-6-common==8:6.9.10.23+dfsg-2.1+deb10u5 -imagemagick-6.q16==8:6.9.10.23+dfsg-2.1+deb10u5 +imagemagick==8:6.9.10.23+dfsg-2.1+deb10u7 +imagemagick-6-common==8:6.9.10.23+dfsg-2.1+deb10u7 +imagemagick-6.q16==8:6.9.10.23+dfsg-2.1+deb10u7 install-info==6.5.0.dfsg.1-4+b1 intel-media-va-driver==18.4.1+dfsg1-1 intltool-debian==0.35.0+20060710.5 @@ -287,8 +287,8 @@ libbabeltrace-dev==1.5.6-2+deb10u1 libbabeltrace1==1.5.6-2+deb10u1 libbatik-java==1.10-2+deb10u3 libbdplus0==0.1.2-3 -libbind-export-dev==1:9.11.5.P4+dfsg-5.1+deb10u9 -libbind9-161==1:9.11.5.P4+dfsg-5.1+deb10u9 +libbind-export-dev==1:9.11.5.P4+dfsg-5.1+deb10u10 +libbind9-161==1:9.11.5.P4+dfsg-5.1+deb10u10 libbinutils==2.31.1-16 libbison-dev==2:3.3.2.dfsg-1 libbit-vector-perl==7.4-1+b5 @@ -418,9 +418,9 @@ libcunit1-dev==2.1-3-dfsg-2+b12 libcups2==2.2.10-6+deb10u9 libcupsfilters1==1.21.6-5+deb10u1 libcupsimage2==2.2.10-6+deb10u9 -libcurl3-gnutls==7.64.0-4+deb10u8 -libcurl4==7.64.0-4+deb10u8 -libcurl4-openssl-dev==7.64.0-4+deb10u8 +libcurl3-gnutls==7.64.0-4+deb10u9 +libcurl4==7.64.0-4+deb10u9 +libcurl4-openssl-dev==7.64.0-4+deb10u9 libdaemon-dev==0.14-7 libdaemon0==0.14-7 libdata-dump-perl==1.23-1 @@ -452,8 +452,8 @@ libdist-checkconflicts-perl==0.11-1 libdistro-info-perl==0.21+deb10u1 libdjvulibre-text==3.5.27.1-10+deb10u1 libdjvulibre21==3.5.27.1-10+deb10u1 -libdns-export1104==1:9.11.5.P4+dfsg-5.1+deb10u9 -libdns1104==1:9.11.5.P4+dfsg-5.1+deb10u9 +libdns-export1104==1:9.11.5.P4+dfsg-5.1+deb10u10 +libdns1104==1:9.11.5.P4+dfsg-5.1+deb10u10 libdom4j-java==2.1.1-2 libdouble-conversion1==3.1.0-3 libdoxia-core-java==1.7-2 @@ -581,10 +581,10 @@ libgme0==0.6.2-1 libgmock-dev==1.8.1-3 libgmp-dev==2:6.1.2+dfsg-4+deb10u1 libgmpxx4ldbl==2:6.1.2+dfsg-4+deb10u1 -libgnutls-dane0==3.6.7-4+deb10u11 -libgnutls-openssl27==3.6.7-4+deb10u11 -libgnutls28-dev==3.6.7-4+deb10u11 -libgnutlsxx28==3.6.7-4+deb10u11 +libgnutls-dane0==3.6.7-4+deb10u12 +libgnutls-openssl27==3.6.7-4+deb10u12 +libgnutls28-dev==3.6.7-4+deb10u12 +libgnutlsxx28==3.6.7-4+deb10u12 libgomp1==8.3.0-6 libgoogle-perftools4==2.7-1 libgpgme11==1.12.0-6 @@ -675,14 +675,14 @@ libipc-system-simple-perl==1.25-4 libipt2==2.0-2 libiptc-dev==1.8.2-4 libiptc0==1.8.2-4 -libirs-export161==1:9.11.5.P4+dfsg-5.1+deb10u9 -libirs161==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisc-export1100==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisc1100==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisccc-export161==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisccc161==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisccfg-export163==1:9.11.5.P4+dfsg-5.1+deb10u9 -libisccfg163==1:9.11.5.P4+dfsg-5.1+deb10u9 +libirs-export161==1:9.11.5.P4+dfsg-5.1+deb10u10 +libirs161==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisc-export1100==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisc1100==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisccc-export161==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisccc161==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisccfg-export163==1:9.11.5.P4+dfsg-5.1+deb10u10 +libisccfg163==1:9.11.5.P4+dfsg-5.1+deb10u10 libisl19==0.20-2 libitext1-java==1.4-7 libitm1==8.3.0-6 @@ -762,20 +762,20 @@ liblua5.1-0-dev==5.1.5-8.1+b2 liblvm2cmd2.03==2.03.02-3 liblwp-mediatypes-perl==6.02-1 liblwp-protocol-https-perl==6.07-2 -liblwres161==1:9.11.5.P4+dfsg-5.1+deb10u9 +liblwres161==1:9.11.5.P4+dfsg-5.1+deb10u10 liblzma-dev==5.2.4-1+deb10u1 liblzo2-2==2.10-0.1 liblzo2-dev==2.10-0.1 libmagic-mgc==1:5.35-4+deb10u2 libmagic1==1:5.35-4+deb10u2 -libmagickcore-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u5 -libmagickcore-6.q16-6-extra==8:6.9.10.23+dfsg-2.1+deb10u5 -libmagickwand-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u5 +libmagickcore-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u7 +libmagickcore-6.q16-6-extra==8:6.9.10.23+dfsg-2.1+deb10u7 +libmagickwand-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u7 libmail-sendmail-perl==0.80-1 libmailtools-perl==2.18-1 -libmariadb-dev==1:10.3.39-0+deb10u1 -libmariadb-dev-compat==1:10.3.39-0+deb10u1 -libmariadb3==1:10.3.39-0+deb10u1 +libmariadb-dev==1:10.3.39-0+deb10u2 +libmariadb-dev-compat==1:10.3.39-0+deb10u2 +libmariadb3==1:10.3.39-0+deb10u2 libmaven-archiver-java==3.2.0-2 libmaven-clean-plugin-java==3.1.0-1 libmaven-common-artifact-filters-java==3.0.1-3 @@ -849,7 +849,7 @@ libnorm1==1.5.8+dfsg2-1 libnpth0==1.6-1 libnspr4==2:4.20-1 libnss-systemd==241-7~deb10u10 -libnss3==2:3.42.1-1+deb10u7 +libnss3==2:3.42.1-1+deb10u8 libnuma-dev==2.0.12-1 libnuma1==2.0.12-1 libnumber-compare-perl==0.03-1 @@ -974,20 +974,20 @@ libpython-dev==2.7.16-1 libpython-stdlib==2.7.16-1 libpython2-dev==2.7.16-1 libpython2-stdlib==2.7.16-1 -libpython2.7==2.7.16-2+deb10u3 -libpython2.7-dev==2.7.16-2+deb10u3 -libpython2.7-minimal==2.7.16-2+deb10u3 -libpython2.7-stdlib==2.7.16-2+deb10u3 +libpython2.7==2.7.16-2+deb10u4 +libpython2.7-dev==2.7.16-2+deb10u4 +libpython2.7-minimal==2.7.16-2+deb10u4 +libpython2.7-stdlib==2.7.16-2+deb10u4 libpython3-all-dbg==3.7.3-1 libpython3-all-dev==3.7.3-1 libpython3-dbg==3.7.3-1 libpython3-dev==3.7.3-1 libpython3-stdlib==3.7.3-1 -libpython3.7==3.7.3-2+deb10u6 -libpython3.7-dbg==3.7.3-2+deb10u6 -libpython3.7-dev==3.7.3-2+deb10u6 -libpython3.7-minimal==3.7.3-2+deb10u6 -libpython3.7-stdlib==3.7.3-2+deb10u6 +libpython3.7==3.7.3-2+deb10u7 +libpython3.7-dbg==3.7.3-2+deb10u7 +libpython3.7-dev==3.7.3-2+deb10u7 +libpython3.7-minimal==3.7.3-2+deb10u7 +libpython3.7-stdlib==3.7.3-2+deb10u7 libqdox-java==1.12.1-3 libqdox2-java==2.0~M10-1 libqt4-dbus==4:4.8.7+dfsg-18+deb10u2 @@ -1147,7 +1147,7 @@ libthai-data==0.1.28-2 libthai0==0.1.28-2 libtheora0==1.1.1+dfsg.1-15 libtie-ixhash-perl==1.23-2 -libtiff5==4.1.0+git191117-2~deb10u8 +libtiff5==4.1.0+git191117-2~deb10u9 libtimedate-perl==2.3000-2+deb10u1 libtinyxml2-6a==7.0.0+dfsg-1 libtinyxml2-dev==7.0.0+dfsg-1 @@ -1163,7 +1163,7 @@ libtypes-serialiser-perl==1.0-1 libubsan1==8.3.0-6 libuchardet0==0.0.6-3 libudev-dev==241-7~deb10u10 -libunbound8==1.9.0-2+deb10u3 +libunbound8==1.9.0-2+deb10u4 libunicode-utf8-perl==0.62-1 libunwind-dev==1.2.1-10~deb10u1 libunwind8==1.2.1-10~deb10u1 @@ -1175,7 +1175,7 @@ libusb-1.0-doc==2:1.0.22-2 libusb-dev==2:0.1.12-32 libusbredirparser1==0.8.0-1 libutempter0==1.1.6-3 -libuv1==1.24.1-1+deb10u1 +libuv1==1.24.1-1+deb10u2 libv4l-0==1.16.3-3 libv4lconvert0==1.16.3-3 libva-drm2==2.4.0-1 @@ -1188,8 +1188,8 @@ libvdpau1==1.1.1-10 libvelocity-tools-java==2.0-7 libvidstab1.1==1.1.0-2 libvirglrenderer0==0.7.0-2+deb10u1 -libvirt-clients==5.0.0-4+deb10u1 -libvirt0==5.0.0-4+deb10u1 +libvirt-clients==5.0.0-4+deb10u2 +libvirt0==5.0.0-4+deb10u2 libvisual-0.4-0==0.4.0-15 libvorbis0a==1.3.6-2 libvorbisenc2==1.3.6-2 @@ -1384,11 +1384,11 @@ lynx==2.8.9rel.1-3+deb10u1 lynx-common==2.8.9rel.1-3+deb10u1 m4==1.4.18-2 make==4.2.1-1.2 -man-db==2.8.5-2 +man-db==2.8.5-2+deb10u1 man2html-base==1.6g-11 manpages==4.16-2 manpages-dev==4.16-2 -mariadb-common==1:10.3.39-0+deb10u1 +mariadb-common==1:10.3.39-0+deb10u2 maven==3.6.0-1 maven-debian-helper==2.3.2 maven-repo-helper==1.9.3 @@ -1407,10 +1407,10 @@ nlohmann-json3-dev==3.5.0-0.1 nodejs==14.21.3-deb-1nodesource1 ocl-icd-libopencl1==2.2.12-2 openjade==1.4devel1-21.3+b1 -openjdk-11-jdk==11.0.21+9-1~deb10u1 -openjdk-11-jdk-headless==11.0.21+9-1~deb10u1 -openjdk-11-jre==11.0.21+9-1~deb10u1 -openjdk-11-jre-headless==11.0.21+9-1~deb10u1 +openjdk-11-jdk==11.0.22+7-1~deb10u1 +openjdk-11-jdk-headless==11.0.22+7-1~deb10u1 +openjdk-11-jre==11.0.22+7-1~deb10u1 +openjdk-11-jre-headless==11.0.22+7-1~deb10u1 openmpi-bin==3.1.3-11 openmpi-common==3.1.3-11 opensp==1.5.2-13+b1 @@ -1528,7 +1528,7 @@ python-incremental==16.10.1-3 python-ipaddr==2.2.0-2 python-ipaddress==1.0.17-1+deb10u1 python-isort==4.3.4+ds1-1.1 -python-jinja2==2.10-2 +python-jinja2==2.10-2+deb10u1 python-keyring==17.1.1-1 python-keyrings.alt==3.1.1-1 python-lazy-object-proxy==1.3.1-1+b1 @@ -1546,7 +1546,7 @@ python-packaging==19.0-1 python-parse==1.6.6-0.1 python-pathlib2==2.3.3-1 python-pbr==4.2.0-5 -python-pil==5.4.1-2+deb10u3 +python-pil==5.4.1-2+deb10u5 python-pip-whl==18.1-5 python-pkg-resources==40.8.0-1 python-pluggy==0.8.0-1 @@ -1583,9 +1583,9 @@ python-zope.interface==4.3.2-1+b2 python2==2.7.16-1 python2-dev==2.7.16-1 python2-minimal==2.7.16-1 -python2.7==2.7.16-2+deb10u3 -python2.7-dev==2.7.16-2+deb10u3 -python2.7-minimal==2.7.16-2+deb10u3 +python2.7==2.7.16-2+deb10u4 +python2.7-dev==2.7.16-2+deb10u4 +python2.7-minimal==2.7.16-2+deb10u4 python3==3.7.3-1 python3-alabaster==0.7.8-1 python3-all==3.7.3-1 @@ -1616,7 +1616,7 @@ python3-gi==3.30.4-1 python3-gpg==1.12.0-6 python3-idna==2.6-1 python3-imagesize==1.0.0-1 -python3-jinja2==2.10-2 +python3-jinja2==2.10-2+deb10u1 python3-keyring==17.1.1-1 python3-keyrings.alt==3.1.1-1 python3-lib2to3==3.7.3-1 @@ -1631,7 +1631,7 @@ python3-nose2==0.8.0-1 python3-olefile==0.46-1 python3-packaging==19.0-1 python3-pbr==4.2.0-5 -python3-pil==5.4.1-2+deb10u3 +python3-pil==5.4.1-2+deb10u5 python3-pkg-resources==40.8.0-1 python3-pluggy==0.8.0-1 python3-py==1.7.0-2 @@ -1653,17 +1653,17 @@ python3-unidiff==0.5.4-1 python3-urllib3==1.24.1-1+deb10u2 python3-wheel==0.32.3-2 python3-xdg==0.25-5 -python3.7==3.7.3-2+deb10u6 -python3.7-dbg==3.7.3-2+deb10u6 -python3.7-dev==3.7.3-2+deb10u6 -python3.7-minimal==3.7.3-2+deb10u6 +python3.7==3.7.3-2+deb10u7 +python3.7-dbg==3.7.3-2+deb10u7 +python3.7-dev==3.7.3-2+deb10u7 +python3.7-minimal==3.7.3-2+deb10u7 qdbus==4:4.8.7+dfsg-18+deb10u2 -qemu-kvm==1:3.1+dfsg-8+deb10u11 -qemu-system-common==1:3.1+dfsg-8+deb10u11 -qemu-system-data==1:3.1+dfsg-8+deb10u11 -qemu-system-gui==1:3.1+dfsg-8+deb10u11 -qemu-system-x86==1:3.1+dfsg-8+deb10u11 -qemu-utils==1:3.1+dfsg-8+deb10u11 +qemu-kvm==1:3.1+dfsg-8+deb10u12 +qemu-system-common==1:3.1+dfsg-8+deb10u12 +qemu-system-data==1:3.1+dfsg-8+deb10u12 +qemu-system-gui==1:3.1+dfsg-8+deb10u12 +qemu-system-x86==1:3.1+dfsg-8+deb10u12 +qemu-utils==1:3.1+dfsg-8+deb10u12 qt-at-spi==0.4.0-9 qt4-linguist-tools==4:4.8.7+dfsg-18+deb10u2 qt4-qmake==4:4.8.7+dfsg-18+deb10u2 @@ -1711,7 +1711,7 @@ sphinx-rtd-theme-common==0.4.3+dfsg-1 squashfs-tools==1:4.3-12+deb10u2 stgit==0.18-1 strace==4.26-0.2 -sudo==1.8.27-1+deb10u5 +sudo==1.8.27-1+deb10u6 swig==3.0.12-2 swig3.0==3.0.12-2 systemd==241-7~deb10u10 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-py3 b/files/build/versions/dockers/sonic-slave-buster/versions-py3 index 27cb1be11f1f..eb0bb0009222 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-py3 @@ -25,7 +25,7 @@ jinja2==3.0.3 keyring==17.1.1 keyrings.alt==3.1.1 lxml==4.9.1 -m2crypto==0.40.1 +m2crypto==0.41.0 mako==1.0.7 markdown==3.0.1 markupsafe==2.0.1 @@ -41,7 +41,7 @@ parameterized==0.8.1 pbr==4.2.0 pexpect==4.8.0 pillow==9.4.0 -pip==23.3.2 +pip==24.0 pluggy==0.8.0 ptyprocess==0.7.0 py==1.7.0 @@ -49,7 +49,7 @@ pyang==2.4.0 pyangbind==0.8.1 pycrypto==2.6.1 pycurl==7.43.0.2 -pyfakefs==5.3.4 +pyfakefs==5.3.5 pygments==2.3.1 pygobject==3.30.4 pympler==0.8 @@ -64,7 +64,7 @@ python-magic==0.4.16 pytz==2019.1 pyxdg==0.25 pyyaml==5.4.1 -redis==5.0.1 +redis==5.0.3 regex==2023.12.25 requests==2.21.0 roman==2.0.0 diff --git a/files/build/versions/host-base-image/versions-deb-bookworm b/files/build/versions/host-base-image/versions-deb-bookworm index 7f4b57b3383f..6d97d65c7f1b 100644 --- a/files/build/versions/host-base-image/versions-deb-bookworm +++ b/files/build/versions/host-base-image/versions-deb-bookworm @@ -1,6 +1,6 @@ adduser==3.134 apt==2.6.1 -base-files==12.4+deb12u4 +base-files==12.4+deb12u5 base-passwd==3.6.1 bash==5.2.15-2+b2 bsdutils==1:2.38.1-5+b1 @@ -26,8 +26,8 @@ libaudit-common==1:3.0.9-1 libaudit1==1:3.0.9-1 libblkid1==2.38.1-5+b1 libbz2-1.0==1.0.8-5+b1 -libc-bin==2.36-9+deb12u3 -libc6==2.36-9+deb12u3 +libc-bin==2.36-9+deb12u4 +libc6==2.36-9+deb12u4 libcap-ng0==0.8.3-1+b3 libcap2==1:2.66-4 libcom-err2==1.47.0-2 @@ -39,7 +39,7 @@ libffi8==3.4.4-1 libgcc-s1==12.2.0-14 libgcrypt20==1.10.1-3 libgmp10==2:6.2.1+dfsg1-1.1 -libgnutls30==3.7.9-2+deb12u1 +libgnutls30==3.7.9-2+deb12u2 libgpg-error0==1.46-1 libhogweed6==3.8.1-2 libidn2-0==2.3.3-1+b1 @@ -62,10 +62,10 @@ libsepol2==3.4-2.1 libsmartcols1==2.38.1-5+b1 libss2==1.47.0-2 libstdc++6==12.2.0-14 -libsystemd0==252.19-1~deb12u1 +libsystemd0==252.22-1~deb12u1 libtasn1-6==4.19.0-2 libtinfo6==6.4-4 -libudev1==252.19-1~deb12u1 +libudev1==252.22-1~deb12u1 libunistring2==1.0-2 libuuid1==2.38.1-5+b1 libxxhash0==0.8.1-1 @@ -80,9 +80,9 @@ passwd==1:4.13+dfsg1-1+b1 perl-base==5.36.0-7+deb12u1 sed==4.9-1 sysvinit-utils==3.06-4 -tar==1.34+dfsg-1.2 -tzdata==2023c-5+deb12u1 -usr-is-merged==35 +tar==1.34+dfsg-1.2+deb12u1 +tzdata==2024a-0+deb12u1 +usr-is-merged==37~deb12u1 util-linux==2.38.1-5+b1 util-linux-extra==2.38.1-5+b1 zlib1g==1:1.2.13.dfsg-1 diff --git a/files/build/versions/host-image/versions-deb-bookworm b/files/build/versions/host-image/versions-deb-bookworm index 0ba23f1d48f0..000547c5190f 100644 --- a/files/build/versions/host-image/versions-deb-bookworm +++ b/files/build/versions/host-image/versions-deb-bookworm @@ -12,8 +12,9 @@ binutils-aarch64-linux-gnu==2.40-2 binutils-common==2.40-2 binutils-x86-64-linux-gnu==2.40-2 bridge-utils==1.7.1-1 -bsdextrautils==2.38.1-5+b1 +bsdextrautils==2.38.1-5+deb12u1 bsdmainutils==12.1.8 +bsdutils==1:2.38.1-5+deb12u1 busybox==1:1.35.0-4+b3 ca-certificates==20230311 cgroup-tools==2.0.2-2 @@ -41,7 +42,7 @@ eatmydata==130-2 ebtables==2.0.11-5 efibootmgr==17-2 efitools==1.9.2-3 -fdisk==2.38.1-5+b1 +fdisk==2.38.1-5+deb12u1 file==1:5.44-3 firmware-amd-graphics==20230210-5 firmware-linux-nonfree==20230210-5 @@ -49,7 +50,6 @@ firmware-misc-nonfree==20230210-5 flashrom==0.9.7 fontconfig-config==2.14.1-4 fonts-dejavu-core==2.37-6 -freeipmi-common==1.6.10-1 gcc==4:12.2.0-3 gcc-12==12.2.0-14 gdisk==1.0.9-2.1 @@ -79,7 +79,7 @@ isc-dhcp-client==4.4.3-P1-2 j2cli==0.3.12b-4 jq==1.6-2.1 kdump-tools==1:1.8.1 -kernel-mft-dkms-modules-6.1.0-11-2-amd64==4.25.0 +kernel-mft-dkms-modules-6.1.0-11-2-amd64==4.27.0 kexec-tools==1:2.0.25-3+b1 klibc-utils==2.0.12-1 kmod==30+20221128-1 @@ -93,21 +93,22 @@ libatomic1==12.2.0-14 libauparse0==1:3.0.9-1 libbabeltrace1==1.5.11-1+b2 libbinutils==2.40-2 +libblkid1==2.38.1-5+deb12u1 libboost-serialization1.74.0==1.74.0+ds1-21 libbpf1==1:1.1.0-1 libbrotli1==1.0.9-2+b6 libbsd0==0.11.7-2 libc-ares2==1.18.1-3 -libc-dev-bin==2.36-9+deb12u3 -libc-l10n==2.36-9+deb12u3 -libc6-dev==2.36-9+deb12u3 +libc-dev-bin==2.36-9+deb12u4 +libc-l10n==2.36-9+deb12u4 +libc6-dev==2.36-9+deb12u4 libcap2-bin==1:2.66-4 libcbor0.8==0.8.0-2+b1 libcc1-0==12.2.0-14 libcgroup2==2.0.2-2 libcrack2==2.9.6-5+b1 libcrypt-dev==1:4.4.33-2 -libcryptsetup12==2:2.6.1-4~deb12u1 +libcryptsetup12==2:2.6.1-4~deb12u2 libctf-nobfd0==2.40-2 libctf0==2.40-2 libcurl4==7.88.1-10+deb12u5 @@ -124,11 +125,10 @@ libelf1==0.188-2.1 libestr0==0.1.11-1 libexpat1==2.5.0-1 libfastjson4==1.2304.0-1 -libfdisk1==2.38.1-5+b1 +libfdisk1==2.38.1-5+deb12u1 libfdt1==1.6.1-4+b1 libffi-dev==3.4.4-1 libfido2-1==1.12.0-2+b1 -libfreeipmi17==1.6.10-1+b1 libfreetype6==2.12.1+dfsg-5 libfuse2==2.9.9-6+b1 libgcc-12-dev==12.2.0-14 @@ -139,6 +139,7 @@ libglib2.0-0==2.74.6-2 libgomp1==12.2.0-14 libgpm2==1.20.7-10+b1 libgprofng0==2.40-2 +libgrpc++1.51==1.51.1-3+b1 libgrpc29==1.51.1-3+b1 libgssapi-krb5-2==1.20.1-2+deb12u1 libhavege2==1.9.14-1+b1 @@ -150,7 +151,7 @@ libicu72==72.1-3 libiniparser1==4.1-6 libip4tc2==1.8.9-2 libip6tc2==1.8.9-2 -libisl23==0.25-1 +libisl23==0.25-1.1 libitm1==12.2.0-14 libjansson4==2.14-2 libjq1==1.6-2.1 @@ -170,6 +171,7 @@ liblzo2-2==2.10-2 libmagic-mgc==1:5.44-3 libmagic1==1:5.44-3 libmnl0==1.0.4-3 +libmount1==2.38.1-5+deb12u1 libmpc3==1.3.1-1 libmpfr6==4.2.0-1 libncurses6==6.4-4 @@ -221,6 +223,7 @@ libsasl2-modules-db==2.1.28+dfsg-10 libsensors-config==1:3.6.0-7.1 libsensors5==1:3.6.0-7.1 libslang2==2.3.3-3 +libsmartcols1==2.38.1-5+deb12u1 libsodium23==1.0.18-1 libsqlite3-0==3.40.1-2 libssh2-1==1.10.0-3+b1 @@ -228,7 +231,7 @@ libssl-dev==3.0.11-1~deb12u2 libssl3==3.0.11-1~deb12u2 libswsscommon==1.0.0 libsysfs2==2.1.1-4 -libsystemd-shared==252.19-1~deb12u1 +libsystemd-shared==252.22-1~deb12u1 libtac2==1.4.1-1 libtcl8.6==8.6.13+dfsg-2 libtirpc-common==1.3.3+ds-1 @@ -241,17 +244,18 @@ libubsan1==12.2.0-14 libunwind8==1.6.2-3 libusb-1.0-0==2:1.0.26-1 libutempter0==1.2.1-3 +libuuid1==2.38.1-5+deb12u1 libwrap0==7.6.q-32 -libxencall1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxendevicemodel1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxenevtchn1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxenforeignmemory1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxengnttab1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxenhypfs1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxenmisc4.17==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxenstore4==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxentoolcore1==4.17.2+76-ge1f9cb16e2-1~deb12u1 -libxentoollog1==4.17.2+76-ge1f9cb16e2-1~deb12u1 +libxencall1==4.17.3+10-g091466ba55-1~deb12u1 +libxendevicemodel1==4.17.3+10-g091466ba55-1~deb12u1 +libxenevtchn1==4.17.3+10-g091466ba55-1~deb12u1 +libxenforeignmemory1==4.17.3+10-g091466ba55-1~deb12u1 +libxengnttab1==4.17.3+10-g091466ba55-1~deb12u1 +libxenhypfs1==4.17.3+10-g091466ba55-1~deb12u1 +libxenmisc4.17==4.17.3+10-g091466ba55-1~deb12u1 +libxenstore4==4.17.3+10-g091466ba55-1~deb12u1 +libxentoolcore1==4.17.3+10-g091466ba55-1~deb12u1 +libxentoollog1==4.17.3+10-g091466ba55-1~deb12u1 libxml2==2.9.14+dfsg-1.3~deb12u1 libxml2-dev==2.9.14+dfsg-1.3~deb12u1 libxslt1-dev==1.1.35-1 @@ -265,19 +269,20 @@ libzmq5==4.3.4-6 linux-base==4.9 linux-image-6.1.0-11-2-amd64-unsigned==6.1.38-4 linux-image-6.1.0-11-2-arm64-unsigned==6.1.38-4 -linux-libc-dev==6.1.69-1 -linux-perf==6.1.69-1 -locales==2.36-9+deb12u3 +linux-libc-dev==6.1.76-1 +linux-perf==6.1.76-1 +locales==2.36-9+deb12u4 logrotate==3.21.0-1 lsof==4.95.0-1 makedev==2.3.1-97 makedumpfile==1:1.7.2-1 media-types==10.0.0 -mft==4.25.0-62 +mft==4.27.0-83 mft-fwtrace-cfg==1.0.0 -mft-oem==4.25.0-62 +mft-oem==4.27.0-83 mokutil==0.6.0-2 monit==1:5.20.0-6 +mount==2.38.1-5+deb12u1 mtd-utils==1:2.1.5-1 mtr-tiny==0.95-1 ncal==12.1.8 @@ -341,7 +346,7 @@ sbsigntool==0.9.4-3.1 screen==4.9.0-4 sensible-utils==0.0.17+nmu1 sgml-base==1.31 -smartmontools==7.3-1+b1 +smartmontools==7.4-2~bpo12+1 sonic-db-cli==1.0.0 sonic-device-data==1.0-1 sonic-host-services-data==1.0-1 @@ -351,21 +356,23 @@ sonic-utilities-data==1.0-1 sqlite3==3.40.1-2 squashfs-tools==1:4.5.1-1 sudo==1.9.13p3-1+deb12u1 -sx-kernel==1.mlnx.4.6.2134 +sx-kernel==1.mlnx.4.6.2202 sysfsutils==2.1.1-4 sysstat==12.6.1-1 -systemd==252.19-1~deb12u1 +systemd==252.22-1~deb12u1 systemd-bootchart==234-2+b1 systemd-sonic-generator==1.0.0 -systemd-sysv==252.19-1~deb12u1 +systemd-sysv==252.22-1~deb12u1 tcpdump==4.99.3-1 tcptraceroute==1.5beta7+debian-4.1+b1 traceroute==1:2.1.2-1 u-boot-tools==2023.01+dfsg-2 ucf==3.0043+nmu1 -udev==252.19-1~deb12u1 +udev==252.22-1~deb12u1 unzip==6.0-28 -usbutils==1:014-1 +usbutils==1:014-1+deb12u1 +util-linux==2.38.1-5+deb12u1 +util-linux-extra==2.38.1-5+deb12u1 vim==2:9.0.1378-2 vim-common==2:9.0.1378-2 vim-runtime==2:9.0.1378-2 diff --git a/files/build/versions/host-image/versions-deb-bookworm-armhf b/files/build/versions/host-image/versions-deb-bookworm-armhf index e4f4b198341d..85aa015ee127 100644 --- a/files/build/versions/host-image/versions-deb-bookworm-armhf +++ b/files/build/versions/host-image/versions-deb-bookworm-armhf @@ -2,3 +2,4 @@ binutils-arm-linux-gnueabihf==2.40-2 linux-image-6.1.0-11-2-armmp==6.1.38-4 mrvlprestera==1.0 ntpstat==0.0.0.1-2 +python3-gi==3.42.2-3+b1 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 68eb83d7a14d..eee9a3df5f43 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -4,7 +4,7 @@ azure-storage==0.36.0 bcrypt==3.2.2 bitarray==2.8.1 blessed==1.20.0 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.15.1 charset-normalizer==3.3.2 click==7.0 @@ -15,7 +15,7 @@ dbus-python==1.3.2 docker==6.1.1 docker-image-py==0.1.12 enlighten==1.12.4 -filelock==3.13.1 +filelock==3.13.3 grpcio==1.51.1 grpcio-tools==1.51.1 idna==3.6 @@ -36,7 +36,7 @@ natsort==6.2.1 netaddr==0.8.0 netifaces==0.11.0 ntpsec==1.2.2 -packaging==23.2 +packaging==24.0 paramiko==2.11.0 pathtools==0.1.2 perf==0.1 @@ -45,19 +45,19 @@ pip==23.0.1 ply==3.11 prefixed==0.7.0 prettyprinter==0.18.0 -protobuf==4.25.2 +protobuf==4.25.3 psutil==5.9.8 ptyprocess==0.7.0 pyang==2.6.0 pyangbind==0.8.2 -pycairo==1.25.1 +pycairo==1.26.0 pycparser==2.21 pygments==2.17.2 -pygobject==3.46.0 +pygobject==3.48.1 pynacl==1.5.0 pyroute2==0.5.19 python-apt==2.6.0 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 pyyaml==6.0.1 redis==3.5.3 regex==2023.12.25 @@ -69,7 +69,7 @@ six==1.16.0 systemd-python==235 tabulate==0.9.0 toposort==1.6 -urllib3==2.1.0 +urllib3==2.2.1 watchdog==0.10.3 wcwidth==0.2.13 websocket-client==1.7.0 diff --git a/files/build/versions/host-image/versions-py3-all-armhf b/files/build/versions/host-image/versions-py3-all-armhf new file mode 100644 index 000000000000..fe39c407f7f6 --- /dev/null +++ b/files/build/versions/host-image/versions-py3-all-armhf @@ -0,0 +1 @@ +pygobject==3.42.2 diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 95c2e1fa52a8..694fdd1f85a9 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -341,6 +341,18 @@ start() { source $PLATFORM_ENV_CONF fi + # Parse the platform.json file to get the platform specific information + PLATFORM_JSON=/usr/share/sonic/device/$PLATFORM/platform.json + if [ -f "$PLATFORM_JSON" ]; then + NUM_DPU=$(jq -r '.DPUS | length' $PLATFORM_JSON 2>/dev/null) + jq -e '.DPU' $PLATFORM_JSON >/dev/null + if [[ $? -eq 0 ]]; then + IS_DPU_DEVICE="true" + else + IS_DPU_DEVICE="false" + fi + fi + {%- if sonic_asic_platform == "broadcom" %} {%- if docker_container_name == "syncd" %} # Set the SYNCD_SHM_SIZE if this variable not defined @@ -490,7 +502,7 @@ start() { redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \ global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \ print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\ - for elem in data['INCLUDES'] if 'namespace' in elem])); f.close()" $SONIC_DB_GLOBAL_JSON` + for elem in data['INCLUDES'] if 'namespace' in elem or 'container_name' in elem ])); f.close()" $SONIC_DB_GLOBAL_JSON` fi {%- if docker_container_name == "database" %} @@ -533,6 +545,7 @@ start() { DB_OPT=$DB_OPT" -v /var/run/redis$DEV:/var/run/redis:rw " DB_OPT=$DB_OPT" --env DATABASE_TYPE=$DATABASE_TYPE " DB_OPT=$DB_OPT" --env NUM_DPU=$NUM_DPU " + DB_OPT=$DB_OPT" --env IS_DPU_DEVICE=$IS_DPU_DEVICE " if [[ "$DEV" ]]; then DB_OPT=$DB_OPT" -v /var/run/redis$DEV:/var/run/redis$DEV:rw " fi diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index a1e102759e6e..32e68e95095f 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -47,6 +47,7 @@ DOCKER_CTL_SCRIPT="$DOCKER_CTL_DIR/docker.sh" FILESYSTEM_ROOT_USR="$FILESYSTEM_ROOT/usr" FILESYSTEM_ROOT_USR_LIB="$FILESYSTEM_ROOT/usr/lib/" FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM="$FILESYSTEM_ROOT_USR_LIB/systemd/system" +FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK="$FILESYSTEM_ROOT_USR_LIB/systemd/network" FILESYSTEM_ROOT_USR_SHARE="$FILESYSTEM_ROOT_USR/share" FILESYSTEM_ROOT_USR_SHARE_SONIC="$FILESYSTEM_ROOT_USR_SHARE/sonic" FILESYSTEM_ROOT_USR_SHARE_SONIC_SCRIPTS="$FILESYSTEM_ROOT_USR_SHARE_SONIC/scripts" @@ -241,6 +242,15 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark manu # Install systemd-python for SONiC host services sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install systemd-python +if [[ $CONFIGURED_ARCH == armhf ]]; then + # Install pygobject from apt repos, since it has armhf prebuilt. The version in Debian is + # a bit older than what is in pip. + # + # When doing the next Debian upgrade (to Trixie), consider installing this package for all + # architectures instead of just armhf. + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-gi +fi + # Install SONiC host services package SONIC_HOST_SERVICES_PY3_WHEEL_NAME=$(basename {{sonic_host_services_py3_wheel_path}}) sudo cp {{sonic_host_services_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_HOST_SERVICES_PY3_WHEEL_NAME @@ -637,6 +647,34 @@ sudo cp $IMAGE_CONFIGS/config-chassisdb/config-chassisdb $FILESYSTEM_ROOT/usr/bi echo "config-chassisdb.service" | sudo tee -a $GENERATED_SERVICE_FILE sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable config-chassisdb.service +# Copy midplane network service file for smart switch +sudo cp $IMAGE_CONFIGS/midplane-network/bridge-midplane.netdev $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/bridge-midplane.netdev +sudo cp $IMAGE_CONFIGS/midplane-network/bridge-midplane.network $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/bridge-midplane.network +sudo cp $IMAGE_CONFIGS/midplane-network/dummy-midplane.netdev $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/dummy-midplane.netdev +sudo cp $IMAGE_CONFIGS/midplane-network/dummy-midplane.network $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/dummy-midplane.network +sudo cp $IMAGE_CONFIGS/midplane-network/midplane-network-npu.network $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/midplane-network-npu.network +sudo cp $IMAGE_CONFIGS/midplane-network/midplane-network-dpu.network $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_NETWORK/midplane-network-dpu.network +sudo cp $IMAGE_CONFIGS/midplane-network/midplane-network-npu.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/midplane-network-npu.service +sudo cp $IMAGE_CONFIGS/midplane-network/midplane-network-dpu.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/midplane-network-dpu.service + +# Disable smart switch unit by default, these units will be controlled by systemd-sonic-generator +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/bridge-midplane.netdev +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/bridge-midplane.network +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/dummy-midplane.netdev +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/dummy-midplane.network +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/midplane-network-npu.network +sudo ln -s /dev/null $FILESYSTEM_ROOT/etc/systemd/network/midplane-network-dpu.network +echo "midplane-network-npu.service" | sudo tee -a $GENERATED_SERVICE_FILE +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable midplane-network-npu.service +echo "midplane-network-dpu.service" | sudo tee -a $GENERATED_SERVICE_FILE +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable midplane-network-dpu.service + +# According to the issue: https://github.com/systemd/systemd/issues/19106, To disable ManageForeignRoutingPolicyRules to avoid the ip rules being deleted by systemd-networkd +sudo sed -i 's/#ManageForeignRoutingPolicyRules=yes/ManageForeignRoutingPolicyRules=no/g' $FILESYSTEM_ROOT/etc/systemd/networkd.conf + +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable systemd-networkd +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable systemd-networkd-wait-online.service + # Copy backend-acl script and service file sudo cp $IMAGE_CONFIGS/backend_acl/backend-acl.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM/backend-acl.service sudo cp $IMAGE_CONFIGS/backend_acl/backend_acl.py $FILESYSTEM_ROOT/usr/bin/backend_acl.py diff --git a/files/image_config/midplane-network/bridge-midplane.netdev b/files/image_config/midplane-network/bridge-midplane.netdev new file mode 100644 index 000000000000..829d65989342 --- /dev/null +++ b/files/image_config/midplane-network/bridge-midplane.netdev @@ -0,0 +1,5 @@ +# Bridge interface for midplane network + +[NetDev] +Name=bridge-midplane +Kind=bridge diff --git a/files/image_config/midplane-network/bridge-midplane.network b/files/image_config/midplane-network/bridge-midplane.network new file mode 100644 index 000000000000..5a7cabf8fb31 --- /dev/null +++ b/files/image_config/midplane-network/bridge-midplane.network @@ -0,0 +1,8 @@ +# Network configuration for bridge midplane + +[Match] +Name=bridge-midplane + +[Network] +Address=169.254.200.254/24 +LinkLocalAddressing=no diff --git a/files/image_config/midplane-network/dummy-midplane.netdev b/files/image_config/midplane-network/dummy-midplane.netdev new file mode 100644 index 000000000000..ea92c87532ef --- /dev/null +++ b/files/image_config/midplane-network/dummy-midplane.netdev @@ -0,0 +1,5 @@ +# Dummy interface for midplane network + +[NetDev] +Name=dummy-midplane +Kind=dummy diff --git a/files/image_config/midplane-network/dummy-midplane.network b/files/image_config/midplane-network/dummy-midplane.network new file mode 100644 index 000000000000..dd4b8d6559ae --- /dev/null +++ b/files/image_config/midplane-network/dummy-midplane.network @@ -0,0 +1,9 @@ +# The systemd-networkd requires that the bridge interface(bridge-midplane) has at least one member interface, otherwise the IP address will not be configured. +# This dummy interface will be added into the bridge-midplane as a member to guarantee the IP address configuration correctly. +# Refer: https://github.com/systemd/systemd/issues/9252#issuecomment-771540028 + +[Match] +Name=dummy-midplane + +[Network] +Bridge=bridge-midplane diff --git a/files/image_config/midplane-network/midplane-network-dpu.network b/files/image_config/midplane-network/midplane-network-dpu.network new file mode 100644 index 000000000000..bb4c58ed9a54 --- /dev/null +++ b/files/image_config/midplane-network/midplane-network-dpu.network @@ -0,0 +1,5 @@ +[Match] +Name=eth0-midplane + +[Network] +DHCP=yes diff --git a/files/image_config/midplane-network/midplane-network-dpu.service b/files/image_config/midplane-network/midplane-network-dpu.service new file mode 100644 index 000000000000..5750850b731d --- /dev/null +++ b/files/image_config/midplane-network/midplane-network-dpu.service @@ -0,0 +1,15 @@ +# Oneshot midplane network service + +[Unit] +Description=Midplane network service +Requires=systemd-networkd.service +After=systemd-networkd.service +Before=database.service + +[Service] +Type=oneshot +User=root +ExecStart=/usr/lib/systemd/systemd-networkd-wait-online -i eth0-midplane --timeout=600 + +[Install] +WantedBy=multi-user.target diff --git a/files/image_config/midplane-network/midplane-network-npu.network b/files/image_config/midplane-network/midplane-network-npu.network new file mode 100644 index 000000000000..8cc4a2264989 --- /dev/null +++ b/files/image_config/midplane-network/midplane-network-npu.network @@ -0,0 +1,5 @@ +[Match] +Name=dpu* + +[Network] +Bridge=bridge-midplane diff --git a/files/image_config/midplane-network/midplane-network-npu.service b/files/image_config/midplane-network/midplane-network-npu.service new file mode 100644 index 000000000000..785f048ac795 --- /dev/null +++ b/files/image_config/midplane-network/midplane-network-npu.service @@ -0,0 +1,14 @@ +# Oneshot midplane network service + +[Unit] +Description=Midplane network service +Requires=systemd-networkd.service +After=systemd-networkd.service + +[Service] +Type=oneshot +User=root +ExecStart=/usr/lib/systemd/systemd-networkd-wait-online -i bridge-midplane + +[Install] +WantedBy=multi-user.target diff --git a/files/image_config/monit/container_checker b/files/image_config/monit/container_checker index f6be2cda9fcd..f4e4995060c8 100755 --- a/files/image_config/monit/container_checker +++ b/files/image_config/monit/container_checker @@ -25,6 +25,19 @@ from swsscommon import swsscommon EVENTS_PUBLISHER_SOURCE = "sonic-events-host" EVENTS_PUBLISHER_TAG = "event-down-ctr" +def check_docker_image(image_name): + """ + @summary: This function will check if docker image exists. + @return: True if the image exists, otherwise False. + """ + try: + DOCKER_CLIENT = docker.DockerClient(base_url='unix://var/run/docker.sock') + DOCKER_CLIENT.images.get(image_name) + return True + except (docker.errors.ImageNotFound, docker.errors.APIError) as err: + print("Failed to get image '{}'. Error: '{}'".format(image_name, err)) + return False + def get_expected_running_containers(): """ @summary: This function will get the expected running & always-enabled containers by following the rule: @@ -55,7 +68,24 @@ def get_expected_running_containers(): # it will be removed from exception list. run_all_instance_list = ['database', 'bgp'] + container_list = [] for container_name in feature_table.keys(): + # slim image does not have telemetry container and corresponding docker image + if container_name == "telemetry": + ret = check_docker_image("docker-sonic-telemetry") + if not ret: + # If telemetry container image is not present, check gnmi container image + # If gnmi container image is not present, ignore telemetry container check + # if gnmi container image is present, check gnmi container instead of telemetry + ret = check_docker_image("docker-sonic-gnmi") + if not ret: + print("Ignoring telemetry container check on image which has no corresponding docker image") + else: + container_list.append("gnmi") + continue + container_list.append(container_name) + + for container_name in container_list: if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: if multi_asic.is_multi_asic(): if feature_table[container_name].get("has_global_scope", "True") == "True": diff --git a/files/image_config/rsyslog/rsyslog.conf.j2 b/files/image_config/rsyslog/rsyslog.conf.j2 index c29d803d085a..f6d480494091 100644 --- a/files/image_config/rsyslog/rsyslog.conf.j2 +++ b/files/image_config/rsyslog/rsyslog.conf.j2 @@ -107,7 +107,7 @@ $RepeatedMsgReduction on {% set regex = conf.get('filter_regex') -%} {% set fmodifier = '!' if filter == 'exclude' else '' %} -{% set device = 'eth0' if vrf == 'default' else vrf -%} +{% set device = vrf if vrf != '' and vrf != 'default' -%} {% set template = 'WelfRemoteFormat' if format == 'welf' else 'SONiCFileFormat' -%} {# Server extra options -#} @@ -115,11 +115,16 @@ $RepeatedMsgReduction on {% if source -%} {% set options = options ~ ' Address="' ~ source ~ '"'-%} + {% set device = device if device != 'eth0' else '' -%} +{% endif -%} + +{% if device -%} + {% set options = options ~ ' Device="' ~ device ~ '"'-%} {% endif -%} {% if filter %} :msg, {{ fmodifier }}ereregex, "{{ regex }}" {% endif %} *.{{ severity }} -action(type="omfwd" Target="{{ server }}" Port="{{ port }}" Protocol="{{ proto }}" Device="{{ device }}" Template="{{ template }}"{{ options }}) +action(type="omfwd" Target="{{ server }}" Port="{{ port }}" Protocol="{{ proto }}" Template="{{ template }}"{{ options }}) {% endfor %} diff --git a/files/scripts/asic_status.py b/files/scripts/asic_status.py index 81a7aabc9758..a518caac8b43 100755 --- a/files/scripts/asic_status.py +++ b/files/scripts/asic_status.py @@ -69,8 +69,9 @@ def main(): logger.log_info('Detected asic{} is online'.format(global_asic_id)) sys.exit(0) elif asic_op == 'DEL': - logger.log_info('Detected asic{} is offline'.format(global_asic_id)) - sys.exit(1) + if (global_asic_id == args_asic_id): + logger.log_info('Detected asic{} is offline'.format(global_asic_id)) + sys.exit(1) else: continue diff --git a/onie-mk-demo.sh b/onie-mk-demo.sh index c197731faefd..72140407f2ec 100755 --- a/onie-mk-demo.sh +++ b/onie-mk-demo.sh @@ -174,7 +174,7 @@ if [ "$SECURE_UPGRADE_MODE" = "dev" -o "$SECURE_UPGRADE_MODE" = "prod" ]; then # append signature to binary cat ${CMS_SIG} >> ${output_file} sudo rm -rf ${CMS_SIG} -elif [ "$SECURE_UPGRADE_MODE" -ne "no_sign" ]; then +elif [ "$SECURE_UPGRADE_MODE" != "no_sign" ]; then echo "SECURE_UPGRADE_MODE not defined or defined as $SECURE_UPGRADE_MODE - build without signing" fi diff --git a/platform/broadcom/sonic-platform-modules-cel/haliburton/systemd/platform-modules-haliburton.service b/platform/broadcom/sonic-platform-modules-cel/haliburton/systemd/platform-modules-haliburton.service index bf1295038856..e2101a74aa88 100644 --- a/platform/broadcom/sonic-platform-modules-cel/haliburton/systemd/platform-modules-haliburton.service +++ b/platform/broadcom/sonic-platform-modules-cel/haliburton/systemd/platform-modules-haliburton.service @@ -2,7 +2,7 @@ [Unit] Description=Celestica haliburton platform modules After=local-fs.target -Before=pmon.service +Before=process-reboot-cause.service determine-reboot-cause.service pmon.service [Service] Type=oneshot diff --git a/platform/broadcom/sonic-platform-modules-dell/common/dell_fpga_ocores.c b/platform/broadcom/sonic-platform-modules-dell/common/dell_fpga_ocores.c index c4175fd05a91..8c119bb7e2f7 100644 --- a/platform/broadcom/sonic-platform-modules-dell/common/dell_fpga_ocores.c +++ b/platform/broadcom/sonic-platform-modules-dell/common/dell_fpga_ocores.c @@ -213,6 +213,8 @@ enum { STATE_READ, STATE_STOP, STATE_ERROR, + STATE_NACK, + STATE_ARBLOST, }; #define TYPE_FPGALOGIC 0 @@ -527,7 +529,8 @@ static void fpgai2c_process(struct fpgalogic_i2c *i2c) return; } - if ((i2c->state == STATE_STOP) || (i2c->state == STATE_ERROR)) { + if ((i2c->state == STATE_STOP) || (i2c->state == STATE_NACK) || + (i2c->state == STATE_ARBLOST)) { /* stop has been sent */ PRINT("fpgai2c_process FPGAI2C_REG_CMD_IACK stat = 0x%x Set FPGAI2C_REG_CMD(0%x) FPGAI2C_REG_CMD_IACK = 0x%x\n" \ ,stat, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_IACK); @@ -535,6 +538,9 @@ static void fpgai2c_process(struct fpgalogic_i2c *i2c) if(i2c->state == STATE_STOP) { i2c->state = STATE_DONE; } + if ((i2c->state == STATE_NACK) || (i2c->state == STATE_ARBLOST)) { + i2c->state = STATE_ERROR; + } wake_up(&i2c->wait); return; } @@ -542,7 +548,7 @@ static void fpgai2c_process(struct fpgalogic_i2c *i2c) /* error? */ if (stat & FPGAI2C_REG_STAT_ARBLOST) { - i2c->state = STATE_ERROR; + i2c->state = STATE_ARBLOST; PRINT("fpgai2c_process FPGAI2C_REG_STAT_ARBLOST FPGAI2C_REG_CMD_STOP\n"); fpgai2c_stop(i2c); return; @@ -559,7 +565,7 @@ static void fpgai2c_process(struct fpgalogic_i2c *i2c) (msg->flags & I2C_M_RD) ? STATE_READ : STATE_WRITE; if (stat & FPGAI2C_REG_STAT_NACK) { - i2c->state = STATE_ERROR; + i2c->state = STATE_NACK; fpgai2c_stop(i2c); return; } @@ -712,7 +718,8 @@ static int fpgai2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) fpgai2c_reg_set(i2c, FPGAI2C_REG_CMD, FPGAI2C_REG_CMD_START); /* Interrupt mode, wait for MSI, timeout in error conditions */ - if (wait_event_timeout(i2c->wait, (i2c->state == STATE_DONE), HZ/4)) + if (wait_event_timeout(i2c->wait, + ((i2c->state == STATE_DONE) || (i2c->state == STATE_ERROR)), HZ/2)) ret = (i2c->state == STATE_DONE) ? num : -EIO; return ret; } @@ -1531,4 +1538,4 @@ module_exit (fpgapci_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("joyce_yu@dell.com"); MODULE_DESCRIPTION ("Driver for FPGA Logic I2C bus"); -MODULE_VERSION ("01.01"); +MODULE_VERSION ("02.02"); diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py index 02aa59595417..7b9e6b3a0b63 100755 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/scripts/platform_sensors.py @@ -10,24 +10,24 @@ output = "" try: rc = 0 - output = subprocess.check_output('/usr/bin/sensors').splitlines() + output = subprocess.check_output('/usr/bin/sensors', text=True).splitlines() valid = False for line in output: if line.startswith('acpitz') or line.startswith('coretemp'): valid = True if valid: - print line + print(line) if line == '': valid = False - print "Onboard Temperature Sensors:" + print("Onboard Temperature Sensors:") idx = 0 for line in output: if line.startswith('tmp75'): - print '\t' + output[idx+2].split('(')[0] + print('\t' + output[idx+2].split('(')[0]) idx += 1 - print "\nFanTrays:" + print("\nFanTrays:") idx = 0 found_emc = False for line in output: @@ -37,50 +37,50 @@ line = f.readline() present = int(line, 0) if present : - print '\t' + 'FanTray1:' - print '\t\t' + 'Fan Speed:' + (output[idx+2].split('(')[0]).split(':')[1] + print('\t' + 'FanTray1:') + print('\t\t' + 'Fan Speed:' + (output[idx+2].split('(')[0]).split(':')[1]) with open('/sys/devices/platform/dell-n3248te-cpld.0/fan0_dir') as f: line = f.readline() dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust' - print '\t\t' + 'Airflow:\t' + dir - else : print '\t' + 'FanTray1:\tNot Present' + print('\t\t' + 'Airflow:\t' + dir) + else : print('\t' + 'FanTray1:\tNot Present') with open('/sys/devices/platform/dell-n3248te-cpld.0/fan1_prs') as f: line = f.readline() present = int(line, 0) if present : - print '\t' + 'FanTray2:' - print '\t\t' + 'Fan Speed:' + (output[idx+3].split('(')[0]).split(':')[1] + print('\t' + 'FanTray2:') + print('\t\t' + 'Fan Speed:' + (output[idx+3].split('(')[0]).split(':')[1]) with open('/sys/devices/platform/dell-n3248te-cpld.0/fan1_dir') as f: line = f.readline() dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust' - print '\t\t' + 'Airflow:\t' + dir - else : print '\t' + 'FanTray2:\tNot Present' + print('\t\t' + 'Airflow:\t' + dir) + else : print('\t' + 'FanTray2:\tNot Present') with open('/sys/devices/platform/dell-n3248te-cpld.0/fan2_prs') as f: line = f.readline() present = int(line, 0) if present : - print '\t' + 'FanTray3:' - print '\t\t' + 'Fan Speed:' + (output[idx+4].split('(')[0]).split(':')[1] + print('\t' + 'FanTray3:') + print('\t\t' + 'Fan Speed:' + (output[idx+4].split('(')[0]).split(':')[1]) with open('/sys/devices/platform/dell-n3248te-cpld.0/fan2_dir') as f: line = f.readline() dir = 'Intake' if line[:-1] == 'B2F' else 'Exhaust' - print '\t\t' + 'Airflow:\t' + dir - else : print '\t' + 'FanTray3:\tNot Present' + print('\t\t' + 'Airflow:\t' + dir) + else : print('\t' + 'FanTray3:\tNot Present') idx += 1 if not found_emc : - print '\t' + 'FanTray1:\tNot Present' - print '\t' + 'FanTray2:\tNot Present' - print '\t' + 'FanTray3:\tNot Present' + print('\t' + 'FanTray1:\tNot Present') + print('\t' + 'FanTray2:\tNot Present') + print('\t' + 'FanTray3:\tNot Present') - print '\nPSUs:' + print('\nPSUs:') idx = 0 with open('/sys/devices/platform/dell-n3248te-cpld.0/psu0_prs') as f: line = f.readline() found_psu1 = int(line, 0) if not found_psu1 : - print '\tPSU1:\tNot Present' + print('\tPSU1:\tNot Present') with open('/sys/devices/platform/dell-n3248te-cpld.0/psu1_prs') as f: line = f.readline() found_psu2 = int(line, 0) @@ -90,46 +90,46 @@ line = f.readline() status = int(line, 0) if not status : - print '\tPSU1:\tNot OK' + print('\tPSU1:\tNot OK') break - with open('/sys/bus/i2c/devices/10-0056/eeprom') as f: + with open('/sys/bus/i2c/devices/10-0056/eeprom', encoding='iso-8859-1') as f: line = f.readline() dir = 'Exhaust' if 'FORWARD' in line else 'Intake' - print '\tPSU1:' - print '\t\t' + output[idx+2].split('(')[0] - print '\t\t' + output[idx+4].split('(')[0] - print '\t\t' + output[idx+6].split('(')[0] - print '\t\t' + output[idx+7].split('(')[0] - print '\t\t' + output[idx+9].split('(')[0] - print '\t\t' + output[idx+11].split('(')[0] - print '\t\t' + output[idx+12].split('(')[0] - print '\t\t' + output[idx+14].split('(')[0] - print '\t\t' + output[idx+15].split('(')[0] - print '\t\t' + 'Airflow:\t\t ' + dir + print('\tPSU1:') + print('\t\t' + output[idx+2].split('(')[0]) + print('\t\t' + output[idx+4].split('(')[0]) + print('\t\t' + output[idx+6].split('(')[0]) + print('\t\t' + output[idx+7].split('(')[0]) + print('\t\t' + output[idx+9].split('(')[0]) + print('\t\t' + output[idx+11].split('(')[0]) + print('\t\t' + output[idx+12].split('(')[0]) + print('\t\t' + output[idx+14].split('(')[0]) + print('\t\t' + output[idx+15].split('(')[0]) + print('\t\t' + 'Airflow:\t\t ' + dir) if line.startswith('dps460-i2c-11'): with open('/sys/devices/platform/dell-n3248te-cpld.0/psu1_status') as f: line = f.readline() status = int(line, 0) if not status : - print '\tPSU2:\tNot OK' + print('\tPSU2:\tNot OK') break - print '\tPSU2:' - with open('/sys/bus/i2c/devices/11-0056/eeprom') as f: + print('\tPSU2:') + with open('/sys/bus/i2c/devices/11-0056/eeprom', encoding='iso-8859-1') as f: line = f.readline() dir = 'Exhaust' if 'FORWARD' in line else 'Intake' - print '\t\t' + output[idx+2].split('(')[0] - print '\t\t' + output[idx+4].split('(')[0] - print '\t\t' + output[idx+6].split('(')[0] - print '\t\t' + output[idx+7].split('(')[0] - print '\t\t' + output[idx+9].split('(')[0] - print '\t\t' + output[idx+11].split('(')[0] - print '\t\t' + output[idx+12].split('(')[0] - print '\t\t' + output[idx+14].split('(')[0] - print '\t\t' + output[idx+15].split('(')[0] - print '\t\t' + 'Airflow:\t\t ' + dir + print('\t\t' + output[idx+2].split('(')[0]) + print('\t\t' + output[idx+4].split('(')[0]) + print('\t\t' + output[idx+6].split('(')[0]) + print('\t\t' + output[idx+7].split('(')[0]) + print('\t\t' + output[idx+9].split('(')[0]) + print('\t\t' + output[idx+11].split('(')[0]) + print('\t\t' + output[idx+12].split('(')[0]) + print('\t\t' + output[idx+14].split('(')[0]) + print('\t\t' + output[idx+15].split('(')[0]) + print('\t\t' + 'Airflow:\t\t ' + dir) idx += 1 if not found_psu2 : - print '\tPSU2:\tNot Present' + print('\tPSU2:\tNot Present') except subprocess.CalledProcessError as err: print ("Exception when calling get_sonic_error -> %s\n" %(err)) diff --git a/platform/broadcom/sonic-platform-modules-nokia b/platform/broadcom/sonic-platform-modules-nokia index 1ef68bdba5df..84092782791e 160000 --- a/platform/broadcom/sonic-platform-modules-nokia +++ b/platform/broadcom/sonic-platform-modules-nokia @@ -1 +1 @@ -Subproject commit 1ef68bdba5dfcb1b7946c952ee233f0ee5b7738a +Subproject commit 84092782791ecc42b4f597fbea0c16204e4a8f9d diff --git a/platform/innovium/docker-syncd-invm/Dockerfile.j2 b/platform/innovium/docker-syncd-invm/Dockerfile.j2 index 449f0d3467ae..514e2237315f 100755 --- a/platform/innovium/docker-syncd-invm/Dockerfile.j2 +++ b/platform/innovium/docker-syncd-invm/Dockerfile.j2 @@ -17,6 +17,9 @@ debs/ RUN apt-get install -y net-tools RUN apt-get install -y libjansson4 RUN apt-get install -y libyaml-dev +RUN apt-get install -y binutils +RUN pip3 install numpy +RUN pip3 install yamlordereddictloader RUN dpkg -i \ {% for deb in docker_syncd_invm_debs.split(' ') -%} diff --git a/platform/mellanox/docker-syncd-mlnx/sai-common.profile b/platform/mellanox/docker-syncd-mlnx/sai-common.profile index 3b9e6fe00573..d3b91a00e106 100644 --- a/platform/mellanox/docker-syncd-mlnx/sai-common.profile +++ b/platform/mellanox/docker-syncd-mlnx/sai-common.profile @@ -1,2 +1,3 @@ SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps SAI_DUMP_STORE_AMOUNT=10 +SAI_HOSTIF_OPER_STATUS_UPDATE_BY_APP=1 diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 7bfdee4026b4..603fee4f8507 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -21,33 +21,33 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH) # Place an URL here to FW if you want to download FW instead MLNX_FW_BASE_URL = -SIMX_VERSION = 23.10-1123 +SIMX_VERSION = 24.4-1067 FW_FROM_URL = y -MLNX_FW_ASSETS_RELEASE_TAG = fw-2012.2202 +MLNX_FW_ASSETS_RELEASE_TAG = fw-2012.3064 MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG) ifeq ($(MLNX_FW_BASE_URL), ) MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL) endif -MLNX_SPC_FW_VERSION = 13.2012.2202 +MLNX_SPC_FW_VERSION = 13.2012.3064 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2012.2202 +MLNX_SPC2_FW_VERSION = 29.2012.3064 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2012.2202 +MLNX_SPC3_FW_VERSION = 30.2012.3064 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) -MLNX_SPC4_FW_VERSION = 34.2012.2202 +MLNX_SPC4_FW_VERSION = 34.2012.3064 MLNX_SPC4_FW_FILE = fw-SPC4-rel-$(subst .,_,$(MLNX_SPC4_FW_VERSION))-EVB.mfa $(MLNX_SPC4_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC4_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC4_FW_FILE) diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index b46d67307fec..e2de01b04b93 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -16,7 +16,7 @@ # # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = 7.0030.2008 +MLNX_HW_MANAGEMENT_VERSION = 7.0030.3008 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index f0cbd0e61f77..82a14a789e87 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit f0cbd0e61f77ca0d8ca37612abc5fe8339e0f884 +Subproject commit 82a14a789e8755cfe7be863833d41817a9b07ad9 diff --git a/platform/mellanox/hw-management/hwmgmt_nonup_patches b/platform/mellanox/hw-management/hwmgmt_nonup_patches index 35bc2c3cca17..a247853ce55a 100644 --- a/platform/mellanox/hw-management/hwmgmt_nonup_patches +++ b/platform/mellanox/hw-management/hwmgmt_nonup_patches @@ -1,33 +1 @@ # Current non-upstream patch list, should be updated by hwmgmt_kernel_patches.py script -0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch -0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch -0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch -0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch -0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch -0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch -0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch -0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch -0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch -0054-platform-mellanox-Introduce-support-for-switches-equ.patch -0055-mellanox-Relocate-mlx-platform-driver.patch -0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch -0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch -0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch -0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch -0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch -0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch -0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch -0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch -0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch -0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch -0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch -0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch -0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch -0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch -0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch -0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch -0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch -0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch -0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch -8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch -8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index 2fd01811eae5..4dbdf07cff1f 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -16,8 +16,8 @@ # # Mellanox SAI -MFT_VERSION = 4.25.0 -MFT_REVISION = 62 +MFT_VERSION = 4.27.0 +MFT_REVISION = 83 MLNX_MFT_INTERNAL_SOURCE_BASE_URL = diff --git a/platform/mellanox/mft/Makefile b/platform/mellanox/mft/Makefile index 2447e4b2aa3f..2f331ea879ce 100644 --- a/platform/mellanox/mft/Makefile +++ b/platform/mellanox/mft/Makefile @@ -42,8 +42,7 @@ DERIVED_TARGETS = mft-oem_$(MFT_VERSION)-$(MFT_REVISION)_$(CONFIGURED_ARCH).deb DKMS_CTRL = /var/lib/dkms/kernel-mft-dkms/ DKMS_TMP := $(shell mktemp -u -d -t dkms.XXXXXXXXXX) -MFT_DEB_TMP := $(shell mktemp -u -d -t mft.deb.XXXXXXXXXX) -MFT_TMP := $(shell mktemp -u -d -t mft.XXXXXXXXXX) +MFT_TMP = /tmp/mft_build/ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : mkdir -p $(MFT_TMP) @@ -51,19 +50,6 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : wget -O $(MFT_TGZ) $(MFT_TGZ_URL) tar xzf $(MFT_TGZ) - # w/a: disable bash autocompletion - mkdir -p $(MFT_DEB_TMP)/DEBIAN - - dpkg -e $(MFT_NAME)/DEBS/$(MAIN_TARGET) $(MFT_DEB_TMP)/DEBIAN - dpkg -x $(MFT_NAME)/DEBS/$(MAIN_TARGET) $(MFT_DEB_TMP) - - rm -rf $(MFT_DEB_TMP)/etc/bash_completion.d - sed -i '/bash_completion.d/d' $(MFT_DEB_TMP)/DEBIAN/conffiles - - dpkg -b $(MFT_DEB_TMP) $(MFT_NAME)/DEBS/$(MAIN_TARGET) - - rm -rf $(MFT_DEB_TMP) - # fix timestamp touch $(MFT_NAME)/DEBS/*.deb mv $(MFT_NAME)/DEBS/*.deb $(DEST) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py index 5870d7e6b602..f216f6de2c36 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -329,7 +329,13 @@ def get_num_sfps(self): Returns: An integer, the number of sfps available on this chassis """ - return DeviceDataManager.get_sfp_count() + if not self._RJ45_port_inited: + self._RJ45_port_list = extract_RJ45_ports_index() + self._RJ45_port_inited = True + if self._RJ45_port_list is not None: + return DeviceDataManager.get_sfp_count() + len(self._RJ45_port_list) + else: + return DeviceDataManager.get_sfp_count() def get_all_sfps(self): """ diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py b/platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py index ddc5ac599e03..448e0ca06809 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/modules_mgmt.py @@ -103,10 +103,10 @@ def __init__(self, namespaces=None, main_thread_stop_event=None, q=None): # SFPs state machine def get_sm_func(self, sm, port): SFP_SM_ENUM = {STATE_HW_NOT_PRESENT: self.check_if_hw_present - , STATE_HW_PRESENT: self.check_if_module_available - , STATE_MODULE_AVAILABLE: self.check_if_power_on + , STATE_HW_PRESENT: self.check_if_power_on , STATE_NOT_POWERED: self.power_on_module - , STATE_POWERED: self.check_module_type + , STATE_POWERED: self.check_if_module_available + , STATE_MODULE_AVAILABLE: self.check_module_type , STATE_FW_CONTROL: self.save_module_control_mode , STATE_SW_CONTROL: self.save_module_control_mode , STATE_ERROR_HANDLER: STATE_ERROR_HANDLER diff --git a/platform/mellanox/mlnx-platform-api/tests/test_chassis.py b/platform/mellanox/mlnx-platform-api/tests/test_chassis.py index ffe86aaf3d08..ad23cd8dde85 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_chassis.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_chassis.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -169,6 +169,13 @@ def test_sfp(self): assert len(sfp_list) == 3 assert chassis.sfp_initialized_count == 3 + # Get all SFPs, with RJ45 ports + sonic_platform.chassis.extract_RJ45_ports_index = mock.MagicMock(return_value=[0,1,2]) + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=3) + chassis = Chassis() + assert chassis.get_num_sfps() == 6 + sonic_platform.chassis.extract_RJ45_ports_index = mock.MagicMock(return_value=[]) + def test_create_sfp_in_multi_thread(self): DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=3) diff --git a/platform/mellanox/mlnx-platform-api/tests/test_modules_mgmt.py b/platform/mellanox/mlnx-platform-api/tests/test_modules_mgmt.py new file mode 100644 index 000000000000..d0cab978cf2f --- /dev/null +++ b/platform/mellanox/mlnx-platform-api/tests/test_modules_mgmt.py @@ -0,0 +1,800 @@ +# +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import os +import queue +import sys +import threading +import time +import types +import unittest + +from mock import MagicMock, patch, mock_open, Mock +if sys.version_info.major == 3: + from unittest import mock +else: + import mock + +test_path = os.path.dirname(os.path.abspath(__file__)) +modules_path = os.path.dirname(test_path) +sys.path.insert(0, modules_path) + +from sonic_platform.device_data import DeviceDataManager +from sonic_py_common import device_info +from sonic_platform import modules_mgmt +from sonic_platform.modules_mgmt import ModulesMgmtTask +from sonic_platform_base.sonic_xcvr.api.public.cmis import CmisApi +from sonic_platform_base.sonic_xcvr.xcvr_eeprom import XcvrEeprom +from sonic_platform_base.sonic_xcvr.codes.public.cmis import CmisCodes +from sonic_platform_base.sonic_xcvr.mem_maps.public.cmis import CmisMemMap +from sonic_platform_base.sonic_xcvr.fields import consts + +DEFAULT_NUM_OF_PORTS_1 = 1 +DEFAULT_NUM_OF_PORTS_3 = 3 +DEFAULT_NUM_OF_PORTS_32 = 32 +POLLER_EXECUTED = False + +def _mock_sysfs_default_file_content(): + return { + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("0"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("1"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("2"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("0"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("1"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("2"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("0"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("1"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("2"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("0"): "48", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("1"): "48", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("2"): "48", + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("0"): "0", + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("1"): "0", + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("2"): "0", + modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET: "", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT: "48", + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("0"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("1"): "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("2"): "1", + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE: "1", + modules_mgmt.PROC_CMDLINE: "" + } + + +mock_file_content = _mock_sysfs_default_file_content() + + +class MockPoller: + + def __init__(self, modules_mgmt_task_stopping_event, modules_mgmt_thrd=None, num_of_ports=3, port_plug_out=False + , feature_enabled=True, warm_reboot=False, port_plug_in=False, sleep_timeout=False): + self.fds_dict = {} + self.poller_iteration_count = 0 + self.modules_mgmt_task_stopping_event = modules_mgmt_task_stopping_event + self.modules_mgmt_thrd = modules_mgmt_thrd + self.num_of_ports = num_of_ports + self.port_plug_out = port_plug_out + self.port_plug_in = port_plug_in + self.feature_enabled = feature_enabled + self.warm_reboot = warm_reboot + self.port_plug_out_changed = False + self.port_plug_in_changed = False + self.sleep_timeout = sleep_timeout + + def register(self, fd, attrs): + self.fds_dict[fd.fileno()] = { fd : attrs } + assert fd.fileno() in self.fds_dict + + def unregister(self, fd): + if fd.fileno() in self.fds_dict.keys(): + del self.fds_dict[fd.fileno()] + assert fd.fileno() not in self.fds_dict.keys() + + def poll(self, timeout=1000): + global POLLER_EXECUTED + assert len(self.modules_mgmt_thrd.sfp_port_dict_initial) == self.num_of_ports + assert self.modules_mgmt_thrd.is_supported_indep_mods_system == self.feature_enabled + # counting the number of poller iterations to know when to do the checks after plug out (and plug in) + # have to check at least on iteration 7 to let ports reach final state + self.poller_iteration_count += 1 + if self.num_of_ports > 0: + if not self.port_plug_out_changed: + if self.port_plug_out: + # return first fd registered with some made up event number 870 + fd_no_to_return = list(self.fds_dict.keys())[0] + fd = list(self.fds_dict[fd_no_to_return].keys())[0] + fd.set_file_int_content(0) + event_to_return = 870 + self.port_plug_out_changed = True + return [(fd_no_to_return, event_to_return)] + if not self.port_plug_in_changed: + if self.port_plug_in: + # return first fd registered with some made up event number 871 + fd_no_to_return = list(self.fds_dict.keys())[0] + fd = list(self.fds_dict[fd_no_to_return].keys())[0] + fd.set_file_int_content(1) + event_to_return = 871 + self.port_plug_in_changed = True + return [(fd_no_to_return, event_to_return)] + if 7 == self.poller_iteration_count: + # when feature is enabled, need to check for each port both power_good and hw_present sysfs for + # cmis non-flat memory cables + num_of_sysfs_to_check = self.num_of_ports if (not self.port_plug_out or not self.feature_enabled + or self.warm_reboot) else self.num_of_ports * 2 + for i in range(num_of_sysfs_to_check): + # when feature is enabled, power_good sysfs is also registered for cmis non-flat memory cables + # so each SW controlled port has 2 fds registered + port_to_test = i if not self.feature_enabled else int(i / 2) + assert self.modules_mgmt_thrd.sfp_port_dict_initial[port_to_test].port_num == port_to_test + assert self.modules_mgmt_thrd.sfp_port_dict_initial[ + port_to_test].initial_state == modules_mgmt.STATE_HW_NOT_PRESENT + if self.feature_enabled: + module_obj = self.modules_mgmt_thrd.fds_mapping_to_obj[list(self.fds_dict.keys())[i]][ + 'module_obj'] + assert module_obj.port_num == port_to_test + if not self.warm_reboot: + # in tests other than warm reboot it creates only SW control ports + if not self.port_plug_out: + assert module_obj.final_state == modules_mgmt.STATE_SW_CONTROL + else: + assert module_obj.final_state == modules_mgmt.STATE_HW_NOT_PRESENT + else: + if not self.port_plug_out: + assert module_obj.final_state == modules_mgmt.STATE_HW_PRESENT + # in warm reboot test with plug out plug in test creates only FW control ports + elif self.port_plug_out and self.port_plug_in: + assert module_obj.final_state == modules_mgmt.STATE_FW_CONTROL + else: + assert module_obj.final_state == modules_mgmt.STATE_HW_NOT_PRESENT + POLLER_EXECUTED = True + self.modules_mgmt_task_stopping_event.set() + if self.sleep_timeout: + time.sleep(timeout/1000) + return [] + + +class MockOpen: + + def __init__(self, name='', file_no=None, indep_mode_supported=True): + self.name = name + self.file_no = file_no + self.indep_mode_supported = indep_mode_supported + self.retint = None + self.curr = 0 + + def read(self): + if self.fileno() in [SAI_PROFILE_FD_FILENO]: + pass + else: + # if return value was changed, i.e. sysfs content changed from 1 to 0 to simulate plug out + if self.retint is not None: + return str(self.retint) + # return default values (can be changed per test) + else: + return mock_file_content[self.name] + + def readline(self): + # if trying to read sai profile file, according to fd fileno + if self.fileno() in [SAI_PROFILE_FD_FILENO]: + if self.indep_mode_supported: + return "SAI_INDEPENDENT_MODULE_MODE=1" + else: + return "" + else: + return mock_file_content[self.name] + + def fileno(self): + return self.file_no + + def seek(self, seek_val): + self.curr = seek_val + + def close(self): + pass + + def write(self, write_val): + self.set_file_int_content(write_val) + + def set_file_int_content(self, retint): + self.retint = str(retint) + mock_file_content[self.name] = str(retint) + + def __enter__(self): + return self + + def __exit__(self, filename, *args, **kwargs): + pass + +class MockPollerStopEvent: + + def __init__(self, modules_mgmt_task_stopping_event, modules_mgmt_thrd=None, num_of_ports=DEFAULT_NUM_OF_PORTS_3 + , feature_enabled=True, ports_connected=True, fw_controlled_ports=False, sleep_timeout=False): + self.fds_dict = {} + self.modules_mgmt_task_stopping_event = modules_mgmt_task_stopping_event + self.modules_mgmt_thrd = modules_mgmt_thrd + self.num_of_ports = num_of_ports + self.feature_enabled = feature_enabled + self.ports_connected = ports_connected + self.sleep_timeout = sleep_timeout + self.fw_controlled_ports = fw_controlled_ports + + def register(self, fd, attrs): + self.fds_dict[fd.fileno()] = 1 & attrs + assert fd.fileno() in self.fds_dict + + def poll(self, timeout=0): + assert len(self.modules_mgmt_thrd.sfp_port_dict_initial) == self.num_of_ports + assert self.modules_mgmt_thrd.is_supported_indep_mods_system == self.feature_enabled + global POLLER_EXECUTED + if self.num_of_ports > 0: + # when feature is enabled, need to check for each port both power_good and hw_present sysfs for + # cmis non-flat memory cables + ports_to_test = self.num_of_ports if (not self.feature_enabled or not self.ports_connected + or self.fw_controlled_ports) else self.num_of_ports * 2 + for i in range(ports_to_test): + # when feature is enabled, power_good sysfs is also registered for cmis non-flat memory cables + port_to_test = i if (not self.feature_enabled or not self.ports_connected + or self.fw_controlled_ports) else int(i / 2) + assert self.modules_mgmt_thrd.sfp_port_dict_initial[port_to_test].port_num == port_to_test + assert self.modules_mgmt_thrd.sfp_port_dict_initial[port_to_test].initial_state == modules_mgmt.STATE_HW_NOT_PRESENT + module_obj = self.modules_mgmt_thrd.fds_mapping_to_obj[list(self.fds_dict.keys())[i]]['module_obj'] + assert module_obj.port_num == port_to_test + if self.ports_connected: + if self.feature_enabled: + if self.fw_controlled_ports: + assert module_obj.final_state == modules_mgmt.STATE_FW_CONTROL + else: + assert module_obj.final_state == modules_mgmt.STATE_SW_CONTROL + else: + assert module_obj.final_state == modules_mgmt.STATE_HW_PRESENT + else: + assert module_obj.final_state == modules_mgmt.STATE_HW_NOT_PRESENT + POLLER_EXECUTED = True + else: + POLLER_EXECUTED = True + self.modules_mgmt_task_stopping_event.set() + if self.sleep_timeout: + time.sleep(timeout/1000) + return [] + + +def _mock_is_file_indep_mode_disabled_content(): + return { + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL: True, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"): True, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1"): True, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2"): True, + '//usr/share/sonic/platform/ACS-MSN4700/sai.profile' : True + } + +mock_is_file_indep_mode_disabled_content = _mock_is_file_indep_mode_disabled_content() + +def mock_is_file_indep_mode_disabled(file_path, **kwargs): + return mock_is_file_indep_mode_disabled_content[file_path] + +def _mock_is_file_indep_mode_enabled_content(): + return { + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT: True, + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL: True, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("0"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("1"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("2"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("0"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("1"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("2"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("0"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("1"): True, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("2"): True, + '//usr/share/sonic/platform/ACS-MSN4700/sai.profile' : True + } + +mock_is_file_indep_mode_enabled_content = _mock_is_file_indep_mode_enabled_content() + + +def mock_is_file_indep_mode_enabled(file_path, **kwargs): + return mock_is_file_indep_mode_enabled_content[file_path] + + +def mock_read_int_from_file(filename, *args): + return_dict = { + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0") : 1, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1") : 1, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2") : 1 + } + + return return_dict[filename] + + +class MockXcvrEeprom(): + def __init__(self, is_flat_memory, mem_map): + self.is_flat_memory = is_flat_memory + self.mem_map = mem_map + + def is_cmis_api(self): + return self.is_cmis_api + + def is_flat_memory(self): + return self.is_flat_memory + + def read(self, field): + if consts.FLAT_MEM_FIELD == field: + return 0 if self.is_flat_memory else 1 + else: + return 0 + + +class MockXcvrapi: + def __init__(self, is_cmis_api=True, is_flat_memory_bool=False): + self.is_cmis_api = is_cmis_api + self.is_flat_memory_bool = is_flat_memory_bool + self.xcvr_eeprom = MagicMock(autospec=XcvrEeprom, return_value=MockXcvrEeprom(is_flat_memory_bool, CmisMemMap(CmisCodes))) + + def is_flat_memory(self): + return self.is_flat_memory_bool + + def xcvr_eeprom(self): + return self.xcvr_eeprom + + +class MockSFPxcvrapi: + def __init__(self, xcvr_api_is_cmis_api=True, xcvr_eeprom_is_flat_memory=False): + self.xcvr_api = Mock(spec=CmisApi(MockXcvrEeprom(False, CmisMemMap(CmisCodes))), return_value=MockXcvrapi(xcvr_api_is_cmis_api, xcvr_eeprom_is_flat_memory)) + self.xcvr_api_is_cmis_api = xcvr_api_is_cmis_api + self.xcvr_eeprom_is_flat_memory = xcvr_eeprom_is_flat_memory + self.xcvr_api.is_flat_memory = types.MethodType(self.is_flat_memory, self) + + def get_xcvr_api(self): + return self.xcvr_api + + def is_flat_memory(self, ref): + return self.xcvr_eeprom_is_flat_memory + + +def check_power_cap(port, module_sm_obj): + pass + +SAI_PROFILE_FD_FILENO = 99 + + +class TestModulesMgmt(unittest.TestCase): + """Test class to test modules_mgmt.py. The test cases covers: + 1. cables detection for 1 to 3 ports - feature disabled / enabled / poller + 2. cable disconnection - plug out + 3. cable reconnection - plug in + 4. warm reboot normal flow with FW ports + 5. warm reboot flow with FW ports plugged out + 6. warm reboot flow with FW ports plugged out and then plugged in (stays FW controlled, no SFP mock change) + 7. test 32 FW controlled (non cmis flat mem) cables powered off + 8. test 32 SW controlled (cmis active non flat mem) cables powered off + """ + + def _mock_sysfs_file_content(self): + return { + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE : "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD : "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON : "0", + modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET : "", + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT : "48", + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL : "1", + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0") : "1", + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1") : "1", + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2") : "1", + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("0"): "0" + } + + def mock_open_builtin(self, file_name, feature_enabled=True): + return_dict = { + (modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"), 'r') : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"), 100), + (modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1"), 'r') : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1"), 101), + (modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2"), 'r') : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2"), 102), + '//usr/share/sonic/platform/ACS-MSN4700/sai.profile' : MockOpen('//usr/share/sonic/platform/ACS-MSN4700/sai.profile' + , SAI_PROFILE_FD_FILENO, feature_enabled), + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0") : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0"), 100), + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1") : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1"), 101), + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2") : MockOpen(modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2"), 102), + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("0"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("0"), 0), + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("1"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("1"), 1), + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("2"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("2"), 2), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("0"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("0"), 200), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("1"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("1"), 201), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("2"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("2"), 202), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("0"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("0"), 300), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("1"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("1"), 301), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("2"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("2"), 302), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("0"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("0"), 500), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("1"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("1"), 501), + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("2"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("2"), 502), + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("0"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("0"), 602), + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("1"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("1"), 602), + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("2"): MockOpen(modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("2"), 602), + modules_mgmt.PROC_CMDLINE: MockOpen(modules_mgmt.PROC_CMDLINE, self.fd_number_by_fd_name_dict[modules_mgmt.PROC_CMDLINE]) + } + return return_dict[file_name] + + # side effects are used in mock when want to create different mocks per variable, i.e. here it's filename + # see below mock_open_new_side_effect_poller_test where returning a new MockOpen passing it the filename + def mock_open_new_side_effect_feature_disabled(self, filename, *args, **kwargs): + mock_context = MagicMock() + mock_context.__enter__.return_value = self.mock_open_builtin(filename, False) + mock_context.__exit__.return_value = False + return mock_context + + def mock_open_new_side_effect_feature_enabled(self, filename, *args, **kwargs): + mock_context = MagicMock() + mock_context.__enter__.return_value = self.mock_open_builtin(filename) + mock_context.__exit__.return_value = False + return mock_context + + def mock_open_new_side_effect_poller_test(self, filename, *args, **kwargs): + if filename in ['//usr/share/sonic/platform/ACS-MSN4700/sai.profile']: + mock_context = MagicMock() + mock_context.__enter__.return_value = MockOpen(filename, SAI_PROFILE_FD_FILENO) + mock_context.__exit__.return_value = False + return mock_context + else: + mock_context = MagicMock() + mock_open_new = MockOpen(filename, self.fd_number_by_fd_name_dict[filename]) + mock_context.return_value = mock_open_new + mock_context.__enter__.return_value = mock_open_new + mock_context.__exit__.return_value = False + if 'hw_present' in filename or 'power_on' in filename or 'freq' in filename or 'control' in filename: + return mock_context + else: + return mock_context.return_value + + def mock_open_new_side_effect_warm_reboot(self, filename, *args, **kwargs): + if filename in ['//usr/share/sonic/platform/ACS-MSN4700/sai.profile']: + mock_context = MagicMock() + mock_context.__enter__.return_value = MockOpen(filename, SAI_PROFILE_FD_FILENO) + mock_context.__exit__.return_value = False + return mock_context + else: + mock_open_new = MockOpen(filename, self.fd_number_by_fd_name_dict[filename]) + return mock_open_new + + def setUp(cls): + cls.modules_mgmt_task_stopping_event = threading.Event() + cls.modules_changes_queue = queue.Queue() + global POLLER_EXECUTED + POLLER_EXECUTED = False + # start modules_mgmt thread and the test in poller part + cls.modules_mgmt_thrd = ModulesMgmtTask(main_thread_stop_event=cls.modules_mgmt_task_stopping_event, + q=cls.modules_changes_queue) + cls.modules_mgmt_thrd.check_power_cap = check_power_cap + assert cls.modules_mgmt_thrd.sfp_port_dict_initial == {} + + @classmethod + def setup_class(cls): + os.environ["MLNX_PLATFORM_API_UNIT_TESTING"] = "1" + cls.fd_number_by_fd_name_dict = { + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("0") : 100, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("1") : 101, + modules_mgmt.SYSFS_LEGACY_FD_PRESENCE.format("2") : 102, + '//usr/share/sonic/platform/ACS-MSN4700/sai.profile' : SAI_PROFILE_FD_FILENO, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("0") : 0, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("1") : 1, + modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format("2") : 2, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("0") : 200, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("1") : 201, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format("2") : 202, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("0") : 300, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("1") : 301, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format("2") : 302, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("0") : 500, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("1") : 501, + modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_LIMIT.format("2") : 502, + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("0") : 600, + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("1") : 601, + modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format("2") : 602, + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("0") : 700, + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("1") : 701, + modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("2") : 702, + modules_mgmt.PROC_CMDLINE : 800 + } + # mock the directory holding relevant sai.profile + device_info.get_paths_to_platform_and_hwsku_dirs = mock.MagicMock(return_value=('', '/usr/share/sonic/platform/ACS-MSN4700')) + + + @patch('sonic_platform.device_data.DeviceDataManager.get_sfp_count', MagicMock(return_value=DEFAULT_NUM_OF_PORTS_3)) + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_disabled)) + @patch('sonic_platform.utils.read_int_from_file', MagicMock(side_effect=mock_read_int_from_file)) + @patch('builtins.open', spec=open) + def test_mdf_all_ports_feature_disabled(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_feature_disabled + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_3 + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, feature_enabled=False))): + self.modules_mgmt_thrd.run() + + @patch('sonic_platform.device_data.DeviceDataManager.get_sfp_count', MagicMock(return_value=DEFAULT_NUM_OF_PORTS_3)) + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi())) + def test_mdf_all_ports_feature_enabled(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_feature_enabled + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_3 + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi())) + def test_modules_mgmt_poller_events_3_ports(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_3) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_3 + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi())) + def test_modules_mgmt_poller_events_single_port(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports))): + #with patch('builtins.open', MagicMock(side_effect=self.mock_open_new_side_effect_poller_test)): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_normal_warm_reboot(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_warm_reboot + # mock /proc/cmdline with warm reboot boot type key value + mock_file_content[modules_mgmt.PROC_CMDLINE] = f'{modules_mgmt.CMDLINE_STR_TO_LOOK_FOR}{modules_mgmt.CMDLINE_VAL_TO_LOOK_FOR}' + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + # set the port to start with FW controlled before warm reboot takes place + mock_file_content[modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("0")] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPoller(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, warm_reboot=True))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_plug_out_fw_cable_after_warm_reboot(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_warm_reboot + # mock /proc/cmdline with warm reboot boot type key value + mock_file_content[modules_mgmt.PROC_CMDLINE] = f'{modules_mgmt.CMDLINE_STR_TO_LOOK_FOR}{modules_mgmt.CMDLINE_VAL_TO_LOOK_FOR}' + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + + # set the port to start with FW controlled before warm reboot takes place + mock_file_content[modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("0")] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPoller(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, port_plug_out=True, warm_reboot=True))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_plug_out_plug_in_fw_cable_after_warm_reboot(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_warm_reboot + # mock /proc/cmdline with warm reboot boot type key value + mock_file_content[modules_mgmt.PROC_CMDLINE] = f'{modules_mgmt.CMDLINE_STR_TO_LOOK_FOR}{modules_mgmt.CMDLINE_VAL_TO_LOOK_FOR}' + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + + mock_file_content[modules_mgmt.SYSFS_INDEPENDENT_FD_FW_CONTROL.format("0")] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPoller(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, port_plug_out=True, warm_reboot=True, port_plug_in=True))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_no_ports(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=0) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == 0 + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_ports_disconnected(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_3) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_3 + + # update hw_present sysfs with value of 0 for each port + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format(f"{i}") + mock_file_content[modules_sysfs] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, ports_connected=False))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_bad_flows_port_disconnected(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + + # update hw_present sysfs with value of 0 for each port + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format(f"{i}") + mock_file_content[modules_sysfs] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, ports_connected=False))): + self.modules_mgmt_thrd.run() + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_bad_flows_power_good(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_1) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_1 + + # update power_good sysfs with value of 0 for each port + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format(f"{i}") + mock_file_content[modules_sysfs] = "0" + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, ports_connected=False))): + self.modules_mgmt_thrd.run() + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format(f"{i}") + mock_file_content[modules_sysfs] = "1" + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi(False, True))) + def test_modules_mgmt_bad_flows_ports_powered_off_fw_controlled(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_32) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_32 + + # create or update different sysfs and is_file mocking with relevant value for each port + for i in range(num_of_tested_ports): + # mock power_on sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format(f"{i}") + mock_file_content[modules_sysfs] = "0" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 300 + i + # mock hw_presence sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format(f'{i}') + mock_file_content[modules_sysfs] = "1" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = i + # mock power_good sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format(f'{i}') + mock_file_content[modules_sysfs] = "1" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 200 + i + # mock hw_reset sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET.format(f'{i}') + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 400 + i + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports, fw_controlled_ports=True))): + self.modules_mgmt_thrd.run() + + # change power_on sysfs values back to the default ones + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format(f"{i}") + mock_file_content[modules_sysfs] = "1" + + @patch('os.path.isfile', MagicMock(side_effect=mock_is_file_indep_mode_enabled)) + @patch('builtins.open', spec=open) + @patch('sonic_platform.sfp.SFP', MagicMock(return_value=MockSFPxcvrapi())) + def test_modules_mgmt_bad_flows_ports_powered_off_sw_controlled(self, mock_open): + mock_open.side_effect = self.mock_open_new_side_effect_poller_test + DeviceDataManager.get_sfp_count = mock.MagicMock(return_value=DEFAULT_NUM_OF_PORTS_32) + num_of_tested_ports = DeviceDataManager.get_sfp_count() + assert num_of_tested_ports == DEFAULT_NUM_OF_PORTS_32 + + # create or update different sysfs and is_file mocking with relevant value for each port + for i in range(num_of_tested_ports): + # mock power_on sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format(f"{i}") + mock_file_content[modules_sysfs] = "0" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 300 + i + # mock hw_presence sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_PRESENCE.format(f'{i}') + mock_file_content[modules_sysfs] = "1" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = i + # mock power_good sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_GOOD.format(f'{i}') + mock_file_content[modules_sysfs] = "1" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 200 + i + # mock hw_reset sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_HW_RESET.format(f'{i}') + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 400 + i + # mock frequency_support sysfs for all ports + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_FREQ_SUPPORT.format(f'{i}') + mock_file_content[modules_sysfs] = "0" + mock_is_file_indep_mode_enabled_content[modules_sysfs] = True + self.fd_number_by_fd_name_dict[modules_sysfs] = 600 + i + + # start modules_mgmt thread and the test in poller part + with patch('select.poll', MagicMock(return_value=MockPollerStopEvent(self.modules_mgmt_task_stopping_event + , self.modules_mgmt_thrd, num_of_tested_ports))): + self.modules_mgmt_thrd.run() + + # change power_on sysfs values back to the default ones + for i in range(num_of_tested_ports): + modules_sysfs = modules_mgmt.SYSFS_INDEPENDENT_FD_POWER_ON.format(f"{i}") + mock_file_content[modules_sysfs] = "1" + + def tearDown(cls): + mock_file_content[modules_mgmt.PROC_CMDLINE] = '' + cls.modules_mgmt_thrd = None + # a check that modules mgmt thread ran and got into the poller part where the tests here has all checks + assert POLLER_EXECUTED diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk index 626c167d5d78..d9b3102b3f73 100644 --- a/platform/mellanox/mlnx-sai.mk +++ b/platform/mellanox/mlnx-sai.mk @@ -1,6 +1,6 @@ # Mellanox SAI -MLNX_SAI_VERSION = SAIBuild2311.26.0.28 +MLNX_SAI_VERSION = SAIBuild2311.27.0.16 MLNX_SAI_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins MLNX_SAI_ASSETS_RELEASE_TAG = sai-$(MLNX_SAI_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH) MLNX_SAI_ASSETS_URL = $(MLNX_SAI_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SAI_ASSETS_RELEASE_TAG) diff --git a/platform/mellanox/non-upstream-patches/external-changes.patch b/platform/mellanox/non-upstream-patches/external-changes.patch index 76cb7240d61c..8b137891791f 100644 --- a/platform/mellanox/non-upstream-patches/external-changes.patch +++ b/platform/mellanox/non-upstream-patches/external-changes.patch @@ -1,53 +1 @@ ---- a/patch/series -+++ b/patch/series -@@ -113,17 +113,49 @@ - 0039-mlxsw-reg-Limit-MTBR-register-payload-to-a-single-da.patch - 0040-mlxsw-core-Extend-allowed-list-of-external-cooling-d.patch - 0041-mlxsw-i2c-Utilize-standard-macros-for-dividing-buffe.patch -+0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch - 0043-hwmon-mlxreg-fan-Extend-number-of-supporetd-fans.patch -+0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch -+0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch -+0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch -+0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch -+0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch -+0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch -+0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch - 0051-platform-mellanox-mlxreg-hotplug-Allow-more-flexible.patch - 0052-i2c-mux-Add-register-map-based-mux-driver.patch -+0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch -+0054-platform-mellanox-Introduce-support-for-switches-equ.patch -+0055-mellanox-Relocate-mlx-platform-driver.patch - 0056-Documentation-ABI-Add-new-attribute-for-mlxreg-io-sy.patch - 0057-Documentation-ABI-Add-new-attribute-for-mlxreg-io-sy.patch - 0061-pinctrl-Introduce-struct-pinfunction-and-PINCTRL_PIN.patch - 0062-pinctrl-mlxbf3-Add-pinctrl-driver-support.patch - 0063-gpio-mlxbf3-Add-gpio-driver-support.patch - 0064-pinctrl-mlxbf3-set-varaiable-mlxbf3_pmx_funcs-storag.patch -+0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch -+0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch -+0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch -+0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch -+0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch -+0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch -+0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch -+0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch -+0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch -+0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch -+0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch -+0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch -+0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch -+0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch -+0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch -+0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch -+0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch -+0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch -+0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch - 0085-hwmon-mlxreg-fan-Separate-methods-of-fan-setting-com.patch -+8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch - 8003-mlxsw-i2c-SONIC-ISSU-Prevent-transaction-execution-f.patch -+8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch - 8005-leds-leds-mlxreg-Downstream-Send-udev-event-from-led.patch - 8006-i2c-mlxcpld-Downstream-WA-to-avoid-error-for-SMBUS-r.patch - 8007-hwmon-mlxreg-fan-Downstream-Allow-fan-speed-setting-.patch diff --git a/platform/mellanox/non-upstream-patches/patches/0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch b/platform/mellanox/non-upstream-patches/patches/0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch deleted file mode 100644 index df8454321a83..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch +++ /dev/null @@ -1,65 +0,0 @@ -From bb46d45ce13c8faf9c2ab57b945c3a3adc587918 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Sun, 23 Jul 2023 06:26:09 +0000 -Subject: [PATCH backport 6.1.42 42/85] hwmon: (mlxreg-fan) Add support for new - flavour of capability register - -FAN platform data is common across the various systems, while fan -driver should be able to apply only the fan instances relevant -to specific system. - -For example, platform data might contain descriptions for fan1, -fan2, ..., fan{n}, while some systems equipped with all 'n' fans, -others with less. -Also, on some systems fan drawer can be equipped with several -tachometers and on others only with one. - -For detection of the real number of equipped drawers and tachometers -special capability registers are used. -These registers used to indicate presence of drawers and tachometers -through the bitmap. - -For some new big modular systems this register will provide presence -data by counter. - -Use slot parameter to distinct whether capability register contains -bitmask or counter. - -Signed-off-by: Vadim Pasternak ---- - drivers/hwmon/mlxreg-fan.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c -index 96017cc8da7e..dad94d2892b2 100644 ---- a/drivers/hwmon/mlxreg-fan.c -+++ b/drivers/hwmon/mlxreg-fan.c -@@ -390,7 +390,7 @@ static int mlxreg_fan_connect_verify(struct mlxreg_fan *fan, - return err; - } - -- return !!(regval & data->bit); -+ return data->slot ? (data->slot <= regval ? 1 : 0) : !!(regval & data->bit); - } - - static int mlxreg_pwm_connect_verify(struct mlxreg_fan *fan, -@@ -527,7 +527,15 @@ static int mlxreg_fan_config(struct mlxreg_fan *fan, - return err; - } - -- drwr_avail = hweight32(regval); -+ /* -+ * The number of drawers could be specified in registers by counters for newer -+ * systems, or by bitmasks for older systems. In case the data is provided by -+ * counter, it is indicated through 'version' field. -+ */ -+ if (pdata->version) -+ drwr_avail = regval; -+ else -+ drwr_avail = hweight32(regval); - if (!tacho_avail || !drwr_avail || tacho_avail < drwr_avail) { - dev_err(fan->dev, "Configuration is invalid: drawers num %d tachos num %d\n", - drwr_avail, tacho_avail); --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch b/platform/mellanox/non-upstream-patches/patches/0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch deleted file mode 100644 index 225ef9b30a17..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 46c4b0cdf2a3abe321e137bcb87e5639c39fd655 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Thu, 20 Jul 2023 11:01:56 +0000 -Subject: [PATCH backport 6.1.42 44/85] leds: mlxreg: Add support for new - flavour of capability register - -LED platform data is common across the various systems, while LED -driver should be able to apply only the LED instances relevant -to specific system. - -For example, platform data might contain descriptions for fan1, -fan2, ..., fan{n} LEDs, while some systems equipped with all 'n' fan -LEDs, others with less. - -For detection of the real number of equipped LEDs special capability -register is used. -This register used to indicate presence of LED through the bitmap. - -For some new big modular systems this register will provide presence -data by counter. - -Use slot parameter to distinct whether capability register contains -bitmask or counter. - -Signed-off-by: Vadim Pasternak ---- - drivers/leds/leds-mlxreg.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c -index b7855c93bd72..063a9cb50a2b 100644 ---- a/drivers/leds/leds-mlxreg.c -+++ b/drivers/leds/leds-mlxreg.c -@@ -206,16 +206,22 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv) - dev_err(&priv->pdev->dev, "Failed to query capability register\n"); - return err; - } -- if (!(regval & data->bit)) -+ /* -+ * If slot is specified - validate if slot is equipped on system. -+ * In case slot is specified in platform data, capability register -+ * comtains the counter of untits. -+ */ -+ if (data->slot && data->slot > regval) -+ continue; -+ else if (!(regval & data->bit)) - continue; - /* - * Field "bit" can contain one capability bit in 0 byte - * and offset bit in 1-3 bytes. Clear capability bit and -- * keep only offset bit. -+ * contains the counter of units. - */ - data->bit &= MLXREG_LED_CAPABILITY_CLEAR; - } -- - led_cdev = &led_data->led_cdev; - led_data->data_parent = priv; - if (strstr(data->label, "red") || --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch b/platform/mellanox/non-upstream-patches/patches/0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch deleted file mode 100644 index a20c6183bc65..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch +++ /dev/null @@ -1,47 +0,0 @@ -From af93d2527b5af3f2e53507c7e35bcd9c9bd521cb Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Thu, 20 Jul 2023 11:17:31 +0000 -Subject: [PATCH backport 6.1.42 45/85] leds: mlxreg: Remove code for amber LED - colour - -Remove unused code for amber LED colour. - -In case system LED color is "green", "orange" or "amber" same code is -to be used for colour setting. - -Signed-off-by: Vadim Pasternak ---- - drivers/leds/leds-mlxreg.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c -index 063a9cb50a2b..215132f67c07 100644 ---- a/drivers/leds/leds-mlxreg.c -+++ b/drivers/leds/leds-mlxreg.c -@@ -19,7 +19,6 @@ - #define MLXREG_LED_IS_OFF 0x00 /* Off */ - #define MLXREG_LED_RED_SOLID 0x05 /* Solid red */ - #define MLXREG_LED_GREEN_SOLID 0x0D /* Solid green */ --#define MLXREG_LED_AMBER_SOLID 0x09 /* Solid amber */ - #define MLXREG_LED_BLINK_3HZ 167 /* ~167 msec off/on - HW support */ - #define MLXREG_LED_BLINK_6HZ 83 /* ~83 msec off/on - HW support */ - #define MLXREG_LED_CAPABILITY_CLEAR GENMASK(31, 8) /* Clear mask */ -@@ -224,13 +223,10 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv) - } - led_cdev = &led_data->led_cdev; - led_data->data_parent = priv; -- if (strstr(data->label, "red") || -- strstr(data->label, "orange")) { -+ if (strstr(data->label, "red") || strstr(data->label, "orange") || -+ strstr(data->label, "amber")) { - brightness = LED_OFF; - led_data->base_color = MLXREG_LED_RED_SOLID; -- } else if (strstr(data->label, "amber")) { -- brightness = LED_OFF; -- led_data->base_color = MLXREG_LED_AMBER_SOLID; - } else { - brightness = LED_OFF; - led_data->base_color = MLXREG_LED_GREEN_SOLID; --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch b/platform/mellanox/non-upstream-patches/patches/0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch deleted file mode 100644 index 7d242bac5454..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 276c9eae3cf83bb65c575b423c785d0ff37b6da0 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Mon, 17 Jul 2023 15:40:08 +0000 -Subject: [PATCH backport 6.1.42 46/85] Extend driver to support Infineon - Digital Multi-phase XDPE1A2G7 device. - -From telemetry perspective device is almost the same as XDPE15284, but -does not support READ_EIN (86h) and READ_EOUT (87h) commands. - -Signed-off-by: Vadim Pasternak ---- - drivers/hwmon/pmbus/xdpe152c4.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/hwmon/pmbus/xdpe152c4.c b/drivers/hwmon/pmbus/xdpe152c4.c -index b8a36ef73e45..1ef1141ba537 100644 ---- a/drivers/hwmon/pmbus/xdpe152c4.c -+++ b/drivers/hwmon/pmbus/xdpe152c4.c -@@ -44,6 +44,7 @@ static int xdpe152_probe(struct i2c_client *client) - } - - static const struct i2c_device_id xdpe152_id[] = { -+ {"xdpe1a2g7", 0}, - {"xdpe152c4", 0}, - {"xdpe15284", 0}, - {} -@@ -52,6 +53,7 @@ static const struct i2c_device_id xdpe152_id[] = { - MODULE_DEVICE_TABLE(i2c, xdpe152_id); - - static const struct of_device_id __maybe_unused xdpe152_of_match[] = { -+ {.compatible = "infineon,xdpe1a2g7"}, - {.compatible = "infineon,xdpe152c4"}, - {.compatible = "infineon,xdpe15284"}, - {} --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch b/platform/mellanox/non-upstream-patches/patches/0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch deleted file mode 100644 index cafc9b58d6b2..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 62520e9d0ab641b36fb770477792073e6aad4d54 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Mon, 17 Jul 2023 16:24:58 +0000 -Subject: [PATCH backport 6.1.42 47/85] dt-bindings: trivial-devices: Add - infineon,xdpe1a2g7 - -Add new Infineon Multi-phase Digital VR Controller xdpe1a2g7 - -Signed-off-by: Vadim Pasternak ---- - Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml -index 61746755c107..7637390dfe09 100644 ---- a/Documentation/devicetree/bindings/trivial-devices.yaml -+++ b/Documentation/devicetree/bindings/trivial-devices.yaml -@@ -145,6 +145,8 @@ properties: - - infineon,tlv493d-a1b6 - # Infineon Multi-phase Digital VR Controller xdpe11280 - - infineon,xdpe11280 -+ # Infineon Multi-phase Digital VR Controller xdpe1a2g7 -+ - infineon,xdpe1a2g7 - # Infineon Multi-phase Digital VR Controller xdpe12254 - - infineon,xdpe12254 - # Infineon Multi-phase Digital VR Controller xdpe12284 --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch b/platform/mellanox/non-upstream-patches/patches/0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch deleted file mode 100644 index 860a7d220adf..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch +++ /dev/null @@ -1,563 +0,0 @@ -From c8a04a4c79a9fb99215e93884ff76b89e9947275 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Thu, 13 Jul 2023 06:16:53 +0000 -Subject: [PATCH backport 6.1.42 48/85] hwmon: (pmbus) Add support for MPS - Multi-phase mp2891 controller -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Introduce driver for dual-loop, digital, multi-phase controller MP2891 from -Monolithic Power Systems, Inc. (MPS) vendor. - -The MP2891 can work with MPS’s Intelli-PhaseTM products to complete the -multi-phase voltage regulator (VR) solution with minimal external -components. - -This device supports: -- Two power rails. -- Programmable Multi-Phase up to 16 Phases on rail 1, and a maximum of 8 - phases on rail 2. - -Signed-off-by: Vadim Pasternak ---- - Documentation/hwmon/mp2891.rst | 128 ++++++++++++ - drivers/hwmon/pmbus/Kconfig | 9 + - drivers/hwmon/pmbus/Makefile | 1 + - drivers/hwmon/pmbus/mp2891.c | 357 +++++++++++++++++++++++++++++++++ - 4 files changed, 495 insertions(+) - create mode 100644 Documentation/hwmon/mp2891.rst - create mode 100644 drivers/hwmon/pmbus/mp2891.c - -diff --git a/Documentation/hwmon/mp2891.rst b/Documentation/hwmon/mp2891.rst -new file mode 100644 -index 000000000000..c4bda3d7ee8a ---- /dev/null -+++ b/Documentation/hwmon/mp2891.rst -@@ -0,0 +1,128 @@ -+.. SPDX-License-Identifier: GPL-2.0 -+ -+Kernel driver mp2891 -+==================== -+ -+Supported chips: -+ -+ * MPS MP2891 -+ -+ Prefix: 'mp2891' -+ -+Author: -+ -+ Vadim Pasternak -+ -+Description -+----------- -+ -+This driver implements support for Monolithic Power Systems, Inc. (MPS) -+vendor dual-loop, digital, multi-phase controller MP2891. -+The MP2891 can work with MPS’s Intelli-PhaseTM products to complete the -+multi-phase voltage regulator (VR) solution with minimal external components. -+ -+MP2891 is available in a QFN-56 (7mmx7mm) package. -+ -+This device supports: -+ -+- Two power rails. -+- Programmable Multi-Phase up to 16 Phases on rail 1, and a maximum of 8 phases -+ on rail 2. -+- PWM-VID Interface. -+- Two pages for telemetry. -+- Programmable pins for PMBus Address. -+- Ability to store and restore device configurations. -+- 200kHz to 3MHz Switching Frequency. -+- Automatic Loop Compensation. -+- Couple Inductor Mode. -+- Supports Multi-Configuration for 6 Different Applications. -+- Flexible Pulse-Width Modulation (PWM) Assignment for 2 Rails. -+- Automatic Phase-Shedding (APS) to Improve Overall Efficiency. -+- Phase-to-Phase Active Current Balancing with Configurable Offsets for Thermal -+ Balance. -+- Digital Load-Line Regulation. -+- Overclocking Mode by Adding Offset to VOUT. -+ -+Device complaint with: -+ -+- PMBus rev 1.3 interface. -+ -+Device supports direct format for reading output current, output voltage, -+input and output power and temperature. -+Device supports linear format for reading input voltage and input power. -+ -+The driver provides the next attributes for the current: -+ -+- for current out input and maximum alarm; -+- for phase current: input and label. -+ -+The driver exports the following attributes via the 'sysfs' files, where: -+ -+- 'n' is number of configured phases (from 1 to 10); -+- index 1 for "iout"; -+- indexes 2 ... 1 + n for phases. -+ -+**curr[1-{1+n}]_input** -+ -+**curr[1-{1+n}]_label** -+ -+**curr1_max** -+ -+**curr1_max_alarm** -+ -+The driver provides the next attributes for the voltage: -+ -+- for voltage in: input, low and high critical thresholds, low and high -+ critical alarms; -+- for voltage out: input and high alarm; -+ -+The driver exports the following attributes via the 'sysfs' files, where -+ -+**in1_crit** -+ -+**in1_crit_alarm** -+ -+**in1_input** -+ -+**in1_label** -+ -+**in1_min** -+ -+**in1_min_alarm** -+ -+**in2_alarm** -+ -+**in2_input** -+ -+**in2_label** -+ -+The driver provides the next attributes for the power: -+ -+- for power in alarm and input. -+- for power out: cap, cap alarm an input. -+ -+The driver exports the following attributes via the 'sysfs' files, where -+- indexes 1 for "pin"; -+- indexes 2 for "pout"; -+ -+**power1_alarm** -+ -+**power1_input** -+ -+**power1_label** -+ -+**power2_input** -+ -+**power2_label** -+ -+**power2_max** -+ -+**power2_max_alarm** -+ -+The driver provides the next attributes for the temperature: -+ -+**temp1_input** -+ -+**temp1_max** -+ -+**temp1_max_alarm** -diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig -index 89668af67206..77d67344cee4 100644 ---- a/drivers/hwmon/pmbus/Kconfig -+++ b/drivers/hwmon/pmbus/Kconfig -@@ -299,6 +299,15 @@ config SENSORS_MP2888 - This driver can also be built as a module. If so, the module will - be called mp2888. - -+config SENSORS_MP2891 -+ tristate "MPS MP2891" -+ help -+ If you say yes here you get hardware monitoring support for MPS -+ MP2891 Dual Loop Digital Multi-Phase Controller. -+ -+ This driver can also be built as a module. If so, the module will -+ be called mp2891. -+ - config SENSORS_MP2975 - tristate "MPS MP2975" - help -diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile -index 0002dbe22d52..8e767d7b8c5b 100644 ---- a/drivers/hwmon/pmbus/Makefile -+++ b/drivers/hwmon/pmbus/Makefile -@@ -32,6 +32,7 @@ obj-$(CONFIG_SENSORS_MAX31785) += max31785.o - obj-$(CONFIG_SENSORS_MAX34440) += max34440.o - obj-$(CONFIG_SENSORS_MAX8688) += max8688.o - obj-$(CONFIG_SENSORS_MP2888) += mp2888.o -+obj-$(CONFIG_SENSORS_MP2891) += mp2891.o - obj-$(CONFIG_SENSORS_MP2975) += mp2975.o - obj-$(CONFIG_SENSORS_MP5023) += mp5023.o - obj-$(CONFIG_SENSORS_PLI1209BC) += pli1209bc.o -diff --git a/drivers/hwmon/pmbus/mp2891.c b/drivers/hwmon/pmbus/mp2891.c -new file mode 100644 -index 000000000000..e9e82844ee2a ---- /dev/null -+++ b/drivers/hwmon/pmbus/mp2891.c -@@ -0,0 +1,357 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* -+ * Hardware monitoring driver for MPS Multi-phase Digital VR Controllers(MP2891) -+ * -+ * Copyright (C) 2023 Nvidia -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include "pmbus.h" -+ -+/* Vendor specific registers. */ -+/* -+ * MP2891_MFR_SVI3_IOUT_PRT: -+ * bits 15:5 - reserved zeros; -+ * bits 4:3 - set SVI3 Vout digital filter -+ * b00: 5kHz -+ * b01: 2kHz -+ * b10: 1kHz -+ * b11: no filter -+ * bits 2:0 - define output current scaling selection of rail1. -+ * b000: 1 A/LSB -+ * b001: (1/32) A/LSB -+ * b010: (1/16) A/LSB -+ * b011: (1/8) A/LSB -+ * b100: (1/4) A/LSB -+ * b101: (1/2) A/LSB -+ * b110: 1 A/LSB -+ * b111: 2 A/LSB -+ */ -+#define MP2891_MFR_SVI3_IOUT_PRT 0x65 -+/* -+ * MP2891_MFR_VOUT_LOOP_CTRL: -+ * bits 15:14 define the VID step. -+ * b00: 6.25mV -+ * b01: 5mV -+ * b10: 2mV -+ * b11: 1mV -+ * bit 13 enable bit of 2.5mV resolution. -+ * b0: disable -+ * b1: enable -+ * bits 12:11 reserved zeros -+ * bit 10 defines rail remote sense amplifier gain: -+ * b0: 1 -+ * b1: 0.5 -+ * bit 9 DC reference_select -+ * b0: Comp EA uses Vfb and Vref -+ * b1: Comp EA uses Vdiff and Vref -+ * bit 8 enables DC loop calibration at DCM. -+ * b0: disable -+ * b1: enable -+ * bit 7 enables DC loop calibration both at DCM and CCM operation. -+ * b0: disable -+ * b1: enable -+ * bit 6 - holds DC loop when the PWM time interval meets PWM switching period condition -+ * set with PMBus command MFR_VR_CONFIG1 (B7h), bit [3:2]. -+ * b0: disable hold DC loop when PWM switching period condition meets -+ * b1: hold DC loop when PWM switching period condition meets -+ * bit 5 hold DC loop when phase count is changed. -+ * b0: disable hold DC loop when phase number change -+ * b1: hold the DC loop when phase number change. -+ * bit 4 hold DC loop regulation when a load transient event is detected. -+ * b0: disable hold DC loop when meets VFB+/- window condition -+ * b1: hold DC loop when meets VFB+/- window condition -+ * bits 3:0 set the DC loop minimal holding time in direct format. -+ */ -+#define MP2891_MFR_VOUT_LOOP_CTRL 0xbd -+ -+#define MP2891_VID_STEP_POS 14 -+#define MP2891_VID_STEP_MASK GENMASK(MP2891_VID_STEP_POS + 1, MP2891_VID_STEP_POS) -+#define MP2891_DAC_2P5MV_MASK BIT(13) -+#define MP2891_IOUT_SCALE_MASK GENMASK(2, 0) -+ -+#define MP2891_PAGE_NUM 2 -+#define MP2891_RAIL1_FUNC (PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT | \ -+ PMBUS_HAVE_TEMP | PMBUS_HAVE_POUT | PMBUS_HAVE_PIN | \ -+ PMBUS_PHASE_VIRTUAL) -+ -+#define MP2891_RAIL2_FUNC (PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT | PMBUS_HAVE_TEMP | \ -+ PMBUS_HAVE_POUT | PMBUS_PHASE_VIRTUAL) -+ -+struct mp2891_data { -+ struct pmbus_driver_info info; -+ int vid_step[MP2891_PAGE_NUM]; -+ int iout_scale[MP2891_PAGE_NUM]; -+}; -+ -+#define to_mp2891_data(x) container_of(x, struct mp2891_data, info) -+ -+static int mp2891_read_vout(struct i2c_client *client, int page, int phase, int reg) -+{ -+ int ret; -+ -+ const struct pmbus_driver_info *info = pmbus_get_driver_info(client); -+ struct mp2891_data *data = to_mp2891_data(info); -+ -+ ret = pmbus_read_word_data(client, page, phase, reg); -+ -+ return ret < 0 ? ret : ret * data->vid_step[page] / 100; -+} -+ -+static int mp2891_read_iout(struct i2c_client *client, int page, int phase, int reg) -+{ -+ int ret; -+ -+ const struct pmbus_driver_info *info = pmbus_get_driver_info(client); -+ struct mp2891_data *data = to_mp2891_data(info); -+ -+ ret = pmbus_read_word_data(client, page, phase, reg); -+ -+ return ret < 0 ? ret : ret * data->iout_scale[page]; -+} -+ -+static int mp2891_read_byte_data(struct i2c_client *client, int page, int reg) -+{ -+ int ret; -+ -+ switch (reg) { -+ case PMBUS_VOUT_MODE: -+ /* -+ * Enforce VOUT direct format, since device allows to set the -+ * different formats for the different rails. Conversion from -+ * VID to direct provided by driver internally, in case it is -+ * necessary. -+ */ -+ ret = PB_VOUT_MODE_DIRECT; -+ break; -+ default: -+ ret = -EINVAL; -+ break; -+ } -+ -+ return ret; -+} -+ -+static int mp2891_read_word_data(struct i2c_client *client, int page, int phase, int reg) -+{ -+ switch (reg) { -+ case PMBUS_READ_VOUT: -+ return mp2891_read_vout(client, page, phase, reg); -+ case PMBUS_READ_IOUT: -+ return mp2891_read_iout(client, page, phase, reg); -+ case PMBUS_OT_WARN_LIMIT: -+ case PMBUS_OT_FAULT_LIMIT: -+ case PMBUS_UT_WARN_LIMIT: -+ case PMBUS_UT_FAULT_LIMIT: -+ case PMBUS_VOUT_OV_WARN_LIMIT: -+ case PMBUS_VIN_OV_WARN_LIMIT: -+ case PMBUS_POUT_MAX: -+ case PMBUS_POUT_OP_FAULT_LIMIT: -+ case PMBUS_MFR_VIN_MIN: -+ case PMBUS_MFR_VOUT_MIN: -+ case PMBUS_MFR_VIN_MAX: -+ case PMBUS_MFR_VOUT_MAX: -+ case PMBUS_MFR_IIN_MAX: -+ case PMBUS_MFR_IOUT_MAX: -+ case PMBUS_MFR_PIN_MAX: -+ case PMBUS_MFR_POUT_MAX: -+ case PMBUS_MFR_MAX_TEMP_1: -+ return -ENXIO; -+ default: -+ return -EINVAL; -+ } -+} -+ -+static int mp2891_identify_vid(struct i2c_client *client, struct mp2891_data *data, u32 reg, -+ int page) -+{ -+ int ret; -+ -+ ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, page); -+ if (ret < 0) -+ return ret; -+ -+ ret = i2c_smbus_read_word_data(client, reg); -+ if (ret < 0) -+ return ret; -+ -+ /* -+ * Obtain vid_step from MP2891_MFR_VOUT_LOOP_CTRL register: -+ * bit 13 = 1, the vid_step is below 2.5mV/LSB; -+ * bit 13 = 0, the vid_step is defined by bits 15:14: -+ * 00b - 6.25mV/LSB, 01b - 5mV/LSB, 10b - 2mV/LSB, 11b - 1mV -+ */ -+ if ((ret & MP2891_DAC_2P5MV_MASK) >> MP2891_VID_STEP_POS) { -+ data->vid_step[page] = 250; -+ return 0; -+ } -+ -+ switch ((ret & MP2891_VID_STEP_MASK) >> MP2891_VID_STEP_POS) { -+ case 0: -+ data->vid_step[page] = 625; -+ break; -+ case 1: -+ data->vid_step[page] = 500; -+ break; -+ case 2: -+ data->vid_step[page] = 200; -+ break; -+ default: -+ data->vid_step[page] = 100; -+ break; -+ } -+ -+ return 0; -+} -+ -+static int mp2891_identify_rails_vid(struct i2c_client *client, struct mp2891_data *data) -+{ -+ int ret; -+ -+ /* Identify vid_step for rail 1. */ -+ ret = mp2891_identify_vid(client, data, MP2891_MFR_VOUT_LOOP_CTRL, 0); -+ if (ret < 0) -+ return ret; -+ -+ /* Identify vid_step for rail 2. */ -+ return mp2891_identify_vid(client, data, MP2891_MFR_VOUT_LOOP_CTRL, 1); -+} -+ -+static int -+mp2891_iout_scale_get(struct i2c_client *client, struct mp2891_data *data, u32 reg, int page) -+{ -+ int ret; -+ -+ ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, page); -+ if (ret < 0) -+ return ret; -+ -+ ret = i2c_smbus_read_word_data(client, reg); -+ if (ret < 0) -+ return ret; -+ -+ /* -+ * Obtain iout_scale from the register MP2891_MFR_SVI3_IOUT_PRT, bits 2-0. -+ * The value is selected as below: -+ * 000b - 1A/LSB, 001b - (1/32)A/LSB, 010b - (1/16)A/LSB, -+ * 011b - (1/8)A/LSB, 100b - (1/4)A/LSB, 101b - (1/2)A/LSB -+ * 110b - 1A/LSB, 111b - 2A/LSB -+ */ -+ switch (ret & MP2891_IOUT_SCALE_MASK) { -+ case 0: -+ case 6: -+ data->iout_scale[page] = 32; -+ return 0; -+ case 1: -+ data->iout_scale[page] = 1; -+ return 0; -+ case 2: -+ data->iout_scale[page] = 2; -+ return 0; -+ case 3: -+ data->iout_scale[page] = 4; -+ return 0; -+ case 4: -+ data->iout_scale[page] = 8; -+ return 0; -+ case 5: -+ data->iout_scale[page] = 16; -+ return 0; -+ default: -+ data->iout_scale[page] = 64; -+ return 0; -+ } -+} -+ -+static int mp2891_rails_iout_scale_get(struct i2c_client *client, struct mp2891_data *data) -+{ -+ int ret; -+ -+ /* Get iout_scale for rail 1. */ -+ ret = mp2891_iout_scale_get(client, data, MP2891_MFR_SVI3_IOUT_PRT, 0); -+ /* Get iout_scale for rail 2. */ -+ return ret < 0 ? ret : mp2891_iout_scale_get(client, data, MP2891_MFR_SVI3_IOUT_PRT, 1); -+} -+ -+static struct pmbus_driver_info mp2891_info = { -+ .pages = MP2891_PAGE_NUM, -+ .format[PSC_VOLTAGE_IN] = direct, -+ .format[PSC_VOLTAGE_OUT] = direct, -+ .format[PSC_CURRENT_OUT] = direct, -+ .format[PSC_TEMPERATURE] = direct, -+ .format[PSC_POWER] = linear, -+ .m[PSC_VOLTAGE_IN] = 1, -+ .m[PSC_VOLTAGE_OUT] = 1, -+ .m[PSC_CURRENT_OUT] = 32, -+ .m[PSC_TEMPERATURE] = 1, -+ .R[PSC_VOLTAGE_IN] = 3, -+ .R[PSC_VOLTAGE_OUT] = 3, -+ .R[PSC_CURRENT_OUT] = 0, -+ .R[PSC_TEMPERATURE] = 0, -+ .b[PSC_VOLTAGE_IN] = 0, -+ .b[PSC_VOLTAGE_OUT] = 0, -+ .b[PSC_CURRENT_OUT] = 0, -+ .b[PSC_TEMPERATURE] = 0, -+ .func[0] = MP2891_RAIL1_FUNC, -+ .func[1] = MP2891_RAIL2_FUNC, -+ .read_word_data = mp2891_read_word_data, -+ .read_byte_data = mp2891_read_byte_data, -+}; -+ -+static int mp2891_probe(struct i2c_client *client) -+{ -+ struct pmbus_driver_info *info; -+ struct mp2891_data *data; -+ int ret; -+ -+ data = devm_kzalloc(&client->dev, sizeof(struct mp2891_data), GFP_KERNEL); -+ -+ if (!data) -+ return -ENOMEM; -+ -+ memcpy(&data->info, &mp2891_info, sizeof(*info)); -+ info = &data->info; -+ -+ /* Identify VID setting per rail - obtain the vid_step of output voltage. */ -+ ret = mp2891_identify_rails_vid(client, data); -+ if (ret < 0) -+ return ret; -+ -+ /* Get iout scale per rail - obtain current scale. */ -+ ret = mp2891_rails_iout_scale_get(client, data); -+ if (ret < 0) -+ return ret; -+ -+ return pmbus_do_probe(client, info); -+} -+ -+static const struct i2c_device_id mp2891_id[] = { -+ {"mp2891", 0}, -+ {} -+}; -+MODULE_DEVICE_TABLE(i2c, mp2891_id); -+ -+static const struct of_device_id __maybe_unused mp2891_of_match[] = { -+ {.compatible = "mps,mp2891"}, -+ {} -+}; -+MODULE_DEVICE_TABLE(of, mp2891_of_match); -+ -+static struct i2c_driver mp2891_driver = { -+ .driver = { -+ .name = "mp2891", -+ .of_match_table = mp2891_of_match, -+ }, -+ .probe_new = mp2891_probe, -+ .id_table = mp2891_id, -+}; -+ -+module_i2c_driver(mp2891_driver); -+ -+MODULE_DESCRIPTION("PMBus driver for MPS MP2891 device"); -+MODULE_LICENSE("GPL"); -+MODULE_IMPORT_NS(PMBUS); --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch b/platform/mellanox/non-upstream-patches/patches/0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch deleted file mode 100644 index 9bf39cb2b022..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 98b6b44b7b190c664f41e482de4597571e700e7f Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Thu, 13 Jul 2023 06:20:05 +0000 -Subject: [PATCH backport 6.1.42 49/85] dt-bindings: trivial-devices: Add - mps,mp2891 - -Add new dual-loop, digital, multi-phase controller MP2891 fro -Monolithic Power Systems, Inc. (MPS) to trivial devices. - -Signed-off-by: Vadim Pasternak ---- - Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml -index 7637390dfe09..8e6c0bc60ee3 100644 ---- a/Documentation/devicetree/bindings/trivial-devices.yaml -+++ b/Documentation/devicetree/bindings/trivial-devices.yaml -@@ -113,6 +113,8 @@ properties: - - fsl,mpl3115 - # MPR121: Proximity Capacitive Touch Sensor Controller - - fsl,mpr121 -+ # Monolithic Power Systems Inc. multi-phase controller mp2891 -+ - mps,mp2891 - # Monolithic Power Systems Inc. multi-phase controller mp2888 - - mps,mp2888 - # Monolithic Power Systems Inc. multi-phase controller mp2975 --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch b/platform/mellanox/non-upstream-patches/patches/0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch deleted file mode 100644 index 3118617ea74c..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 519742b99a6a2d6b8d5797d70608fdc954d2871a Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Wed, 7 Jul 2021 10:18:14 +0000 -Subject: [PATCH backport 6.1.42 55/85] leds: mlxreg: Skip setting LED color - during initialization - -Hardware controls LED through CPLD device and LED control ownership -passes to the software after it performs the first write operation for -any LED on a system. -For example, hardware sets "system" LED "green blink" during boot and -might change it to "red", in case something is went wrong from hardware -point of view. -The motivation for not setting LED during kernel initialization is for -keeping hardware settings visible for user, until user will not decide -to set LEDs according to user OS specific requirements. - -Signed-off-by: Vadim Pasternak -Reviewed-by: Michael Shych ---- - drivers/leds/leds-mlxreg.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c -index 215132f67c07..c0caf810b6d0 100644 ---- a/drivers/leds/leds-mlxreg.c -+++ b/drivers/leds/leds-mlxreg.c -@@ -246,9 +246,6 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv) - if (err) - return err; - -- if (led_cdev->brightness) -- mlxreg_led_brightness_set(led_cdev, -- led_cdev->brightness); - dev_info(led_cdev->dev, "label: %s, mask: 0x%02x, offset:0x%02x\n", - data->label, data->mask, data->reg); - } --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch b/platform/mellanox/non-upstream-patches/patches/0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch deleted file mode 100644 index f396cf234c0b..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 7831c5d10460c08cb5837827784677e0286d14e7 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Sun, 30 Jul 2023 21:31:54 +0000 -Subject: [PATH backport v6.1 53/54] platform/mellanox: Add support for dynamic - I2C channels infrastructure - -Allow to support platform configuration for dynamically allocated I2C -channels. -Motivation is to support I2C channels allocated in a non-continuous -way. - -Currently hotplug platform driver data structure contains static mux -channels for I2C hotplug devices. These channels numbers can be updated -dynamically and returned by mux driver's callback through the adapters -array. -Thus, hotplug mux channels will be aligned according to the dynamic -adapters data. - -Signed-off-by: Vadim Pasternak -Reviewed-by: Michael Shych ---- - drivers/platform/x86/mlx-platform.c | 69 ++++++++++++++++++++++++----- - 1 file changed, 59 insertions(+), 10 deletions(-) - -diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c -index 44f107965832..9021597b5446 100644 ---- a/drivers/platform/x86/mlx-platform.c -+++ b/drivers/platform/x86/mlx-platform.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -350,6 +351,7 @@ - * @hotplug_resources: system hotplug resources - * @hotplug_resources_size: size of system hotplug resources - * @hi2c_main_init_status: init status of I2C main bus -+ * @mux_added: number of added mux segments - * @irq_fpga: FPGA IRQ number - */ - struct mlxplat_priv { -@@ -364,6 +366,7 @@ struct mlxplat_priv { - struct resource *hotplug_resources; - unsigned int hotplug_resources_size; - u8 i2c_main_init_status; -+ int mux_added; - int irq_fpga; - }; - -@@ -453,7 +456,9 @@ static struct i2c_mux_reg_platform_data mlxplat_default_mux_data[] = { - /* Platform mux configuration variables */ - static int mlxplat_max_adap_num; - static int mlxplat_mux_num; -+static int mlxplat_mux_hotplug_num; - static struct i2c_mux_reg_platform_data *mlxplat_mux_data; -+static struct i2c_mux_regmap_platform_data *mlxplat_mux_regmap_data; - static struct notifier_block *mlxplat_reboot_nb; - - /* Platform extended mux data */ -@@ -6126,12 +6131,17 @@ static int mlxplat_mlxcpld_verify_bus_topology(int *nr) - /* Shift adapter ids, since expected parent adapter is not free. */ - *nr = i; - for (i = 0; i < mlxplat_mux_num; i++) { -- shift = *nr - mlxplat_mux_data[i].parent; -- mlxplat_mux_data[i].parent = *nr; -- mlxplat_mux_data[i].base_nr += shift; -+ if (mlxplat_mux_data) { -+ shift = *nr - mlxplat_mux_data[i].parent; -+ mlxplat_mux_data[i].parent = *nr; -+ mlxplat_mux_data[i].base_nr += shift; -+ } else if (mlxplat_mux_regmap_data) { -+ mlxplat_mux_regmap_data[i].parent = *nr; -+ } - } - -- if (shift > 0) -+ /* Shift bus only if mux provided by 'mlxplat_mux_data'. */ -+ if (shift > 0 && mlxplat_mux_data) - mlxplat_hotplug->shift_nr = shift; - - return 0; -@@ -6428,8 +6438,31 @@ mlxplat_i2c_mux_complition_notify(void *handle, struct i2c_adapter *parent, - struct i2c_adapter *adapters[]) - { - struct mlxplat_priv *priv = handle; -+ struct mlxreg_core_item *item; -+ int i, j; -+ -+ /* -+ * Hotplug platform driver data structure contains static mux channels for I2C hotplug -+ * devices. These channels numbers can be updated dynamically and returned by mux callback -+ * through the adapters array. Update mux channels according to the dynamic adapters data. -+ */ -+ if (priv->mux_added == mlxplat_mux_hotplug_num) { -+ item = mlxplat_hotplug->items; -+ for (i = 0; i < mlxplat_hotplug->counter; i++, item++) { -+ struct mlxreg_core_data *data = item->data; -+ -+ for (j = 0; j < item->count; j++, data++) { -+ if (data->hpdev.nr != MLXPLAT_CPLD_NR_NONE) -+ data->hpdev.nr = adapters[data->hpdev.nr - 2]->nr; -+ } -+ } -+ } - -- return mlxplat_post_init(priv); -+ /* Start post initialization only after last nux segment is added */ -+ if (++priv->mux_added == mlxplat_mux_num) -+ return mlxplat_post_init(priv); -+ -+ return 0; - } - - static int mlxplat_i2c_mux_topology_init(struct mlxplat_priv *priv) -@@ -6443,17 +6476,33 @@ static int mlxplat_i2c_mux_topology_init(struct mlxplat_priv *priv) - - priv->i2c_main_init_status = MLXPLAT_I2C_MAIN_BUS_HANDLE_CREATED; - for (i = 0; i < mlxplat_mux_num; i++) { -- priv->pdev_mux[i] = platform_device_register_resndata(&priv->pdev_i2c->dev, -- "i2c-mux-reg", i, NULL, 0, -- &mlxplat_mux_data[i], -- sizeof(mlxplat_mux_data[i])); -+ if (mlxplat_mux_data) { -+ priv->pdev_mux[i] = -+ platform_device_register_resndata(&priv->pdev_i2c->dev, -+ "i2c-mux-reg", i, NULL, 0, -+ &mlxplat_mux_data[i], -+ sizeof(mlxplat_mux_data[i])); -+ } else { -+ mlxplat_mux_regmap_data[i].handle = priv; -+ mlxplat_mux_regmap_data[i].regmap = priv->regmap; -+ mlxplat_mux_regmap_data[i].completion_notify = -+ mlxplat_i2c_mux_complition_notify; -+ priv->pdev_mux[i] = -+ platform_device_register_resndata(&priv->pdev_i2c->dev, -+ "i2c-mux-regmap", i, NULL, 0, -+ &mlxplat_mux_regmap_data[i], -+ sizeof(mlxplat_mux_regmap_data[i])); -+ } - if (IS_ERR(priv->pdev_mux[i])) { - err = PTR_ERR(priv->pdev_mux[i]); - goto fail_platform_mux_register; - } - } - -- return mlxplat_i2c_mux_complition_notify(priv, NULL, NULL); -+ if (mlxplat_mux_regmap_data && mlxplat_mux_regmap_data->completion_notify) -+ return 0; -+ -+ return mlxplat_post_init(priv); - - fail_platform_mux_register: - while (--i >= 0) --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0054-platform-mellanox-Introduce-support-for-switches-equ.patch b/platform/mellanox/non-upstream-patches/patches/0054-platform-mellanox-Introduce-support-for-switches-equ.patch deleted file mode 100644 index f1c90d620363..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0054-platform-mellanox-Introduce-support-for-switches-equ.patch +++ /dev/null @@ -1,312 +0,0 @@ -From 3e4ff8f2195a3dc7b04bb5a1b9fd6b655f78a75e Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Mon, 24 Jul 2023 11:10:50 +0000 -Subject: [PATH backport v6.1 54/54] platform: mellanox: Introduce support for - switches equipped with new FPGA device - -Add support for Nvidia MQM97xx and MSN47xx family switches equipped with -new FPGA device. - -These switches are based on previous generation of MQM97xx and MSN47xx -switches, but COMe module uses new FPGA device. - -Platform configuration for new switches is based on the new VMOD0016 -class. Configuration is extended to support new register map with -callbacks supporting indirect addressing for PCIe-to-LPC bridge. -This bridge provides interface between FPGA at COMe board (directly -connected to CPU PCIe root complex) to CPLDs on switch board (which -cannot be connected directly to PCIe root complex). - -Signed-off-by: Vadim Pasternak -Reviewed-by: Michael Shych ---- - drivers/platform/x86/mlx-platform.c | 196 ++++++++++++++++++++++++++++ - 1 file changed, 196 insertions(+) - -diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c -index 9021597b5446..46958810e972 100644 ---- a/drivers/platform/x86/mlx-platform.c -+++ b/drivers/platform/x86/mlx-platform.c -@@ -183,6 +183,9 @@ - #define MLXPLAT_CPLD_LPC_REG_CONFIG1_OFFSET 0xfb - #define MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET 0xfc - #define MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET 0xfd -+#define MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET 0x100 -+#define MLXPLAT_CPLD_LPC_REG_EXT_MID_OFFSET 0x195 -+#define MLXPLAT_CPLD_LPC_REG_EXT_MAX_OFFSET 0x1ff - #define MLXPLAT_CPLD_LPC_IO_RANGE 0x100 - - #define MLXPLAT_CPLD_LPC_PIO_OFFSET 0x10000UL -@@ -277,6 +280,7 @@ - /* Maximum number of possible physical buses equipped on system */ - #define MLXPLAT_CPLD_MAX_PHYS_ADAPTER_NUM 16 - #define MLXPLAT_CPLD_MAX_PHYS_EXT_ADAPTER_NUM 24 -+#define MLXPLAT_CPLD_DEFAULT_MUX_HOTPLUG_VECTOR 0 - - /* Number of channels in group */ - #define MLXPLAT_CPLD_GRP_CHNL_NUM 8 -@@ -338,6 +342,21 @@ - #define PCI_DEVICE_ID_LATTICE_I2C_BRIDGE 0x9c2f - #define PCI_DEVICE_ID_LATTICE_JTAG_BRIDGE 0x9c30 - #define PCI_DEVICE_ID_LATTICE_LPC_BRIDGE 0x9c32 -+#define MLXPLAT_FPGA_PCI_BAR0_SIZE 0x4000 -+#define MLXPLAT_FPGA_PCI_BASE_OFFSET 0x00000000 -+#define MLXPLAT_FPGA_PCI_MSB_ADDR 0x25 -+#define MLXPLAT_FPGA_PCI_MSB_EXT_ADDR 0x20 -+#define MLXPLAT_FPGA_PCI_LSB_ADDR_OFFSET MLXPLAT_FPGA_PCI_BASE_OFFSET -+#define MLXPLAT_FPGA_PCI_MSB_ADDR_OFFSET (MLXPLAT_FPGA_PCI_BASE_OFFSET + 0x01) -+#define MLXPLAT_FPGA_PCI_DATA_OUT_OFFSET (MLXPLAT_FPGA_PCI_BASE_OFFSET + 0x02) -+#define MLXPLAT_FPGA_PCI_DATA_IN_OFFSET (MLXPLAT_FPGA_PCI_BASE_OFFSET + 0x03) -+#define MLXPLAT_FPGA_PCI_CTRL_OFFSET (MLXPLAT_FPGA_PCI_BASE_OFFSET + 0x04) -+#define MLXPLAT_FPGA_PCI_STAT_OFFSET (MLXPLAT_FPGA_PCI_BASE_OFFSET + 0x05) -+ -+#define MLXPLAT_FPGA_PCI_CTRL_READ BIT(0) -+#define MLXPLAT_FPGA_PCI_CTRL_WRITE BIT(1) -+#define MLXPLAT_FPGA_PCI_COMPLETED GENMASK(1, 0) -+#define MLXPLAT_FPGA_PCI_TO 50 /* usec */ - - /* mlxplat_priv - platform private data - * @pdev_i2c - i2c controller platform device -@@ -453,6 +472,28 @@ static struct i2c_mux_reg_platform_data mlxplat_default_mux_data[] = { - - }; - -+/* Default channels vector for regmap mux. */ -+static int mlxplat_default_regmap_mux_chan[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; -+ -+/* Platform regmap mux data */ -+static struct i2c_mux_regmap_platform_data mlxplat_default_regmap_mux_data[] = { -+ { -+ .parent = 1, -+ .chan_ids = mlxplat_default_regmap_mux_chan, -+ .num_adaps = ARRAY_SIZE(mlxplat_default_regmap_mux_chan), -+ .sel_reg_addr = MLXPLAT_CPLD_LPC_REG_I2C_CH1_OFFSET, -+ .reg_size = 1, -+ }, -+ { -+ .parent = 1, -+ .chan_ids = mlxplat_default_regmap_mux_chan, -+ .num_adaps = ARRAY_SIZE(mlxplat_default_regmap_mux_chan), -+ .sel_reg_addr = MLXPLAT_CPLD_LPC_REG_I2C_CH2_OFFSET, -+ .reg_size = 1, -+ }, -+ -+}; -+ - /* Platform mux configuration variables */ - static int mlxplat_max_adap_num; - static int mlxplat_mux_num; -@@ -3540,6 +3581,12 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = { - .mask = GENMASK(7, 0) & ~BIT(2), - .mode = 0200, - }, -+ { -+ .label = "kexec_activated", -+ .reg = MLXPLAT_CPLD_LPC_REG_RESET_GP2_OFFSET, -+ .mask = GENMASK(7, 0) & ~BIT(1), -+ .mode = 0644, -+ }, - { - .label = "erot1_reset", - .reg = MLXPLAT_CPLD_LPC_REG_RESET_GP2_OFFSET, -@@ -5065,6 +5112,7 @@ static bool mlxplat_mlxcpld_writeable_reg(struct device *dev, unsigned int reg) - case MLXPLAT_CPLD_LPC_REG_PWM3_OFFSET: - case MLXPLAT_CPLD_LPC_REG_PWM4_OFFSET: - case MLXPLAT_CPLD_LPC_REG_PWM_CONTROL_OFFSET: -+ case MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET ... MLXPLAT_CPLD_LPC_REG_EXT_MAX_OFFSET: - return true; - } - return false; -@@ -5230,6 +5278,7 @@ static bool mlxplat_mlxcpld_readable_reg(struct device *dev, unsigned int reg) - case MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET: - case MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET: - case MLXPLAT_CPLD_LPC_REG_UFM_VERSION_OFFSET: -+ case MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET ... MLXPLAT_CPLD_LPC_REG_EXT_MAX_OFFSET: - return true; - } - return false; -@@ -5387,6 +5436,7 @@ static bool mlxplat_mlxcpld_volatile_reg(struct device *dev, unsigned int reg) - case MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET: - case MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET: - case MLXPLAT_CPLD_LPC_REG_UFM_VERSION_OFFSET: -+ case MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET ... MLXPLAT_CPLD_LPC_REG_EXT_MAX_OFFSET: - return true; - } - return false; -@@ -5417,6 +5467,14 @@ static const struct reg_default mlxplat_mlxcpld_regmap_ng400[] = { - { MLXPLAT_CPLD_LPC_REG_WD3_ACT_OFFSET, 0x00 }, - }; - -+static const struct reg_default mlxplat_mlxcpld_regmap_bf3[] = { -+ { MLXPLAT_CPLD_LPC_REG_GP2_OFFSET, 0xc1 }, -+ { MLXPLAT_CPLD_LPC_REG_PWM_CONTROL_OFFSET, 0x00 }, -+ { MLXPLAT_CPLD_LPC_REG_WD1_ACT_OFFSET, 0x00 }, -+ { MLXPLAT_CPLD_LPC_REG_WD2_ACT_OFFSET, 0x00 }, -+ { MLXPLAT_CPLD_LPC_REG_WD3_ACT_OFFSET, 0x00 }, -+}; -+ - static const struct reg_default mlxplat_mlxcpld_regmap_rack_switch[] = { - { MLXPLAT_CPLD_LPC_REG_PWM_CONTROL_OFFSET, MLXPLAT_REGMAP_NVSWITCH_PWM_DEFAULT }, - { MLXPLAT_CPLD_LPC_REG_WD1_ACT_OFFSET, 0x00 }, -@@ -5545,6 +5603,114 @@ static const struct regmap_config mlxplat_mlxcpld_regmap_config_eth_modular = { - .reg_write = mlxplat_mlxcpld_reg_write, - }; - -+/* Wait completion routine for indirect access for register map */ -+static int mlxplat_fpga_completion_wait(struct mlxplat_mlxcpld_regmap_context *ctx) -+{ -+ unsigned long end; -+ u8 status; -+ -+ end = jiffies + msecs_to_jiffies(MLXPLAT_FPGA_PCI_TO); -+ do { -+ status = ioread8(ctx->base + MLXPLAT_FPGA_PCI_STAT_OFFSET); -+ if (!(status & MLXPLAT_FPGA_PCI_COMPLETED)) -+ return 0; -+ cond_resched(); -+ } while (time_before(jiffies, end)); -+ -+ return -EIO; -+} -+ -+/* Read callback for indirect register map access */ -+static int mlxplat_fpga_reg_read(void *context, unsigned int reg, unsigned int *val) -+{ -+ struct mlxplat_mlxcpld_regmap_context *ctx = context; -+ unsigned int msb_off = MLXPLAT_FPGA_PCI_MSB_ADDR; -+ int err; -+ -+ if (reg >= MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET) { -+ if (reg <= MLXPLAT_CPLD_LPC_REG_EXT_MID_OFFSET) { -+ /* Access to 2-nd FPGA bank */ -+ *val = ioread8(i2c_bridge_addr + reg - -+ MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET); -+ return 0; -+ } -+ /* Access to 3-rd FPGA bank */ -+ reg -= MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET; -+ msb_off = MLXPLAT_FPGA_PCI_MSB_EXT_ADDR; -+ } -+ -+ /* Verify there is no pending transactions */ -+ err = mlxplat_fpga_completion_wait(ctx); -+ if (err) -+ return err; -+ -+ /* Set address in register space */ -+ iowrite8(msb_off, ctx->base + MLXPLAT_FPGA_PCI_MSB_ADDR_OFFSET); -+ iowrite8(reg, ctx->base + MLXPLAT_FPGA_PCI_LSB_ADDR_OFFSET); -+ /* Activate read operation */ -+ iowrite8(MLXPLAT_FPGA_PCI_CTRL_READ, ctx->base + MLXPLAT_FPGA_PCI_CTRL_OFFSET); -+ /* Verify transaction completion */ -+ err = mlxplat_fpga_completion_wait(ctx); -+ if (err) -+ return err; -+ -+ /* Read data */ -+ *val = ioread8(ctx->base + MLXPLAT_FPGA_PCI_DATA_IN_OFFSET); -+ -+ return 0; -+} -+ -+/* Write callback for indirect register map access */ -+static int mlxplat_fpga_reg_write(void *context, unsigned int reg, unsigned int val) -+{ -+ struct mlxplat_mlxcpld_regmap_context *ctx = context; -+ unsigned int msb_off = MLXPLAT_FPGA_PCI_MSB_ADDR; -+ int err; -+ -+ if (reg >= MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET) { -+ if (reg <= MLXPLAT_CPLD_LPC_REG_EXT_MID_OFFSET) { -+ /* Access to 2-nd FPGA bank */ -+ iowrite8(val, i2c_bridge_addr + reg - MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET); -+ /* Flush modification */ -+ wmb(); -+ return 0; -+ } -+ -+ /* Access to 3-rd FPGA bank */ -+ reg -= MLXPLAT_CPLD_LPC_REG_EXT_MIN_OFFSET; -+ msb_off = MLXPLAT_FPGA_PCI_MSB_EXT_ADDR; -+ } -+ -+ /* Verify there is no pending transactions */ -+ err = mlxplat_fpga_completion_wait(ctx); -+ if (err) -+ return err; -+ -+ /* Set address in register space */ -+ iowrite8(msb_off, ctx->base + MLXPLAT_FPGA_PCI_MSB_ADDR_OFFSET); -+ iowrite8(reg, ctx->base + MLXPLAT_FPGA_PCI_LSB_ADDR_OFFSET); -+ /* Set data to be written */ -+ iowrite8(val, ctx->base + MLXPLAT_FPGA_PCI_DATA_OUT_OFFSET); -+ /* Activate write operation */ -+ iowrite8(MLXPLAT_FPGA_PCI_CTRL_WRITE, ctx->base + MLXPLAT_FPGA_PCI_CTRL_OFFSET); -+ -+ return mlxplat_fpga_completion_wait(ctx); -+} -+ -+static const struct regmap_config mlxplat_fpga_regmap_config_bf3_comex_default = { -+ .reg_bits = 9, -+ .val_bits = 8, -+ .max_register = 511, -+ .cache_type = REGCACHE_FLAT, -+ .writeable_reg = mlxplat_mlxcpld_writeable_reg, -+ .readable_reg = mlxplat_mlxcpld_readable_reg, -+ .volatile_reg = mlxplat_mlxcpld_volatile_reg, -+ .reg_defaults = mlxplat_mlxcpld_regmap_bf3, -+ .num_reg_defaults = ARRAY_SIZE(mlxplat_mlxcpld_regmap_bf3), -+ .reg_read = mlxplat_fpga_reg_read, -+ .reg_write = mlxplat_fpga_reg_write, -+}; -+ - static struct resource mlxplat_mlxcpld_resources[] = { - [0] = DEFINE_RES_IRQ_NAMED(MLXPLAT_CPLD_LPC_SYSIRQ, "mlxreg-hotplug"), - }; -@@ -5927,6 +6093,30 @@ static int __init mlxplat_dmi_l1_switch_matched(const struct dmi_system_id *dmi) - return mlxplat_register_platform_device(); - } - -+static int __init mlxplat_dmi_bf3_comex_default_matched(const struct dmi_system_id *dmi) -+{ -+ int i; -+ -+ mlxplat_max_adap_num = MLXPLAT_CPLD_MAX_PHYS_ADAPTER_NUM; -+ mlxplat_mux_hotplug_num = MLXPLAT_CPLD_DEFAULT_MUX_HOTPLUG_VECTOR; -+ mlxplat_mux_num = ARRAY_SIZE(mlxplat_default_regmap_mux_data); -+ mlxplat_mux_regmap_data = mlxplat_default_regmap_mux_data; -+ mlxplat_hotplug = &mlxplat_mlxcpld_ext_data; -+ mlxplat_hotplug->deferred_nr = -+ mlxplat_msn21xx_channels[MLXPLAT_CPLD_GRP_CHNL_NUM - 1]; -+ mlxplat_led = &mlxplat_default_ng_led_data; -+ mlxplat_regs_io = &mlxplat_default_ng_regs_io_data; -+ mlxplat_fan = &mlxplat_default_fan_data; -+ for (i = 0; i < ARRAY_SIZE(mlxplat_mlxcpld_wd_set_type2); i++) -+ mlxplat_wd_data[i] = &mlxplat_mlxcpld_wd_set_type2[i]; -+ mlxplat_i2c = &mlxplat_mlxcpld_i2c_ng_data; -+ mlxplat_regmap_config = &mlxplat_fpga_regmap_config_bf3_comex_default; -+ mlxplat_reboot_nb = &mlxplat_reboot_default_nb; -+ pm_power_off = mlxplat_poweroff; -+ -+ return 1; -+} -+ - static const struct dmi_system_id mlxplat_dmi_table[] __initconst = { - { - .callback = mlxplat_dmi_default_wc_matched, -@@ -6015,6 +6205,12 @@ static const struct dmi_system_id mlxplat_dmi_table[] __initconst = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0015"), - }, - }, -+ { -+ .callback = mlxplat_dmi_bf3_comex_default_matched, -+ .matches = { -+ DMI_MATCH(DMI_BOARD_NAME, "VMOD0016"), -+ }, -+ }, - { - .callback = mlxplat_dmi_l1_switch_matched, - .matches = { --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0055-mellanox-Relocate-mlx-platform-driver.patch b/platform/mellanox/non-upstream-patches/patches/0055-mellanox-Relocate-mlx-platform-driver.patch deleted file mode 100644 index 3b5f6b9400fe..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0055-mellanox-Relocate-mlx-platform-driver.patch +++ /dev/null @@ -1,98 +0,0 @@ -From a4eca7c60f361575fb15bcab6fdcd39c795c8244 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Mon, 24 Jul 2023 11:52:56 +0000 -Subject: [PATCH backport 6.1.42 58/85] mellanox: Relocate mlx-platform driver - -Move 'mlx-platform' driver 'x86' to 'mellanox' folder. - -Motivation to allow running it on systems with ARM architecture. - -Signed-off-by: Vadim Pasternak -Reviewed-by: Michael Shych ---- - drivers/platform/mellanox/Kconfig | 12 ++++++++++++ - drivers/platform/mellanox/Makefile | 1 + - drivers/platform/{x86 => mellanox}/mlx-platform.c | 0 - drivers/platform/x86/Kconfig | 13 ------------- - drivers/platform/x86/Makefile | 1 - - 5 files changed, 13 insertions(+), 14 deletions(-) - rename drivers/platform/{x86 => mellanox}/mlx-platform.c (100%) - -diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig -index 382793e73a60..70b628834b4f 100644 ---- a/drivers/platform/mellanox/Kconfig -+++ b/drivers/platform/mellanox/Kconfig -@@ -14,6 +14,18 @@ menuconfig MELLANOX_PLATFORM - - if MELLANOX_PLATFORM - -+config MLX_PLATFORM -+ tristate "Mellanox Technologies platform support" -+ depends on I2C && REGMAP -+ help -+ This option enables system support for the Mellanox Technologies -+ platform. The Mellanox systems provide data center networking -+ solutions based on Virtual Protocol Interconnect (VPI) technology -+ enable seamless connectivity to 56/100Gb/s InfiniBand or 10/40/56GbE -+ connection. -+ -+ If you have a Mellanox system, say Y or M here. -+ - config MLXREG_HOTPLUG - tristate "Mellanox platform hotplug driver support" - depends on HWMON -diff --git a/drivers/platform/mellanox/Makefile b/drivers/platform/mellanox/Makefile -index 04703c0416b1..ba56485cbe8c 100644 ---- a/drivers/platform/mellanox/Makefile -+++ b/drivers/platform/mellanox/Makefile -@@ -3,6 +3,7 @@ - # Makefile for linux/drivers/platform/mellanox - # Mellanox Platform-Specific Drivers - # -+obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o - obj-$(CONFIG_MLXBF_BOOTCTL) += mlxbf-bootctl.o - obj-$(CONFIG_MLXBF_PMC) += mlxbf-pmc.o - obj-$(CONFIG_MLXBF_TMFIFO) += mlxbf-tmfifo.o -diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/mellanox/mlx-platform.c -similarity index 100% -rename from drivers/platform/x86/mlx-platform.c -rename to drivers/platform/mellanox/mlx-platform.c -diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 1396a839dd8a..f11136bbf88d 100644 ---- a/drivers/platform/x86/Kconfig -+++ b/drivers/platform/x86/Kconfig -@@ -954,19 +954,6 @@ config SERIAL_MULTI_INSTANTIATE - To compile this driver as a module, choose M here: the module - will be called serial-multi-instantiate. - --config MLX_PLATFORM -- tristate "Mellanox Technologies platform support" -- depends on I2C -- select REGMAP -- help -- This option enables system support for the Mellanox Technologies -- platform. The Mellanox systems provide data center networking -- solutions based on Virtual Protocol Interconnect (VPI) technology -- enable seamless connectivity to 56/100Gb/s InfiniBand or 10/40/56GbE -- connection. -- -- If you have a Mellanox system, say Y or M here. -- - config TOUCHSCREEN_DMI - bool "DMI based touchscreen configuration info" - depends on ACPI && DMI && I2C=y && TOUCHSCREEN_SILEAD -diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 1d3d1b02541b..aee1bc4b0a80 100644 ---- a/drivers/platform/x86/Makefile -+++ b/drivers/platform/x86/Makefile -@@ -109,7 +109,6 @@ obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o - # Platform drivers - obj-$(CONFIG_FW_ATTR_CLASS) += firmware_attributes_class.o - obj-$(CONFIG_SERIAL_MULTI_INSTANTIATE) += serial-multi-instantiate.o --obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o - obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o - obj-$(CONFIG_WIRELESS_HOTKEY) += wireless-hotkey.o - obj-$(CONFIG_X86_ANDROID_TABLETS) += x86-android-tablets.o --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch b/platform/mellanox/non-upstream-patches/patches/0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch deleted file mode 100644 index fafb84df869a..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b7b422bbd95928b213444692d5b00ef081160c0b Mon Sep 17 00:00:00 2001 -From: Liming Sun -Date: Sat, 10 Dec 2022 13:55:54 -0500 -Subject: [PATCH backport 6.1.42 66/85] UBUNTU: SAUCE: sdhci-of-dwcmshc: Enable - host V4 support for BlueField-3 SoC - -BugLink: https://bugs.launchpad.net/bugs/1999309 - -This commit enables SDHCI Host V4 support on Bluefield-3 SoC to be -consistent with UEFI setting. - -Signed-off-by: Liming Sun -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -[bzolnier: use a short URL version for BugLink] -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/mmc/host/sdhci-of-dwcmshc.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c -index a7343d4bc50e..a1188508e75d 100644 ---- a/drivers/mmc/host/sdhci-of-dwcmshc.c -+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c -@@ -528,6 +528,12 @@ static int dwcmshc_probe(struct platform_device *pdev) - goto err_clk; - } - -+#ifdef CONFIG_ACPI -+ if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { -+ sdhci_enable_v4_mode(host); -+ } -+#endif -+ - host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY; - - err = sdhci_setup_host(host); --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch b/platform/mellanox/non-upstream-patches/patches/0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch deleted file mode 100644 index bfd038d7c3ad..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 07163b7fab5b23c01195a456d92e3dc9e73b538c Mon Sep 17 00:00:00 2001 -From: Liming Sun -Date: Fri, 3 Feb 2023 07:52:18 -0500 -Subject: [PATCH backport 6.1.42 67/85] UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: - add the missing device table IDs for acpi - -BugLink: https://bugs.launchpad.net/bugs/2004645 - -This commit adds the missing MODULE_DEVICE_TABLE for acpi, or else -it won't be loaded automatically when compiled as a kernel module. - -Signed-off-by: Liming Sun -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -[bzolnier: use a short URL version for BugLink] -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c -index a1188508e75d..7d657d29af21 100644 ---- a/drivers/mmc/host/sdhci-of-dwcmshc.c -+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c -@@ -446,6 +446,7 @@ static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = { - }, - {} - }; -+MODULE_DEVICE_TABLE(acpi, sdhci_dwcmshc_acpi_ids); - #endif - - static int dwcmshc_probe(struct platform_device *pdev) --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch b/platform/mellanox/non-upstream-patches/patches/0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch deleted file mode 100644 index 88d54dc706fb..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch +++ /dev/null @@ -1,158 +0,0 @@ -From be8912e006b49c4f9febcd2556030876737e1b72 Mon Sep 17 00:00:00 2001 -From: Liming Sun -Date: Tue, 4 Apr 2023 19:30:00 -0400 -Subject: [PATCH backport 6.1.42 68/85] UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: - Add runtime PM operations for BlueField-3 - -BugLink: https://bugs.launchpad.net/bugs/2015307 - -This commit implements the runtime PM operations For BlueField-3 SoC -to disable eMMC card clock when idle. - -Reviewed-by: Khalil Blaiech -Signed-off-by: Liming Sun -Acked-by: Bartlomiej Zolnierkiewicz -Acked-by: Andrei Gherzan -[bzolnier: use a short URL version for BugLink] -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/mmc/host/sdhci-of-dwcmshc.c | 102 +++++++++++++++++++++++++++- - 1 file changed, 101 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c -index 7d657d29af21..32fd0668b427 100644 ---- a/drivers/mmc/host/sdhci-of-dwcmshc.c -+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - #include "sdhci-pltfm.h" - -@@ -91,6 +92,21 @@ struct dwcmshc_priv { - void *priv; /* pointer to SoC private stuff */ - }; - -+/* Last jiffies when entering idle state */ -+static uint64_t idle_last_jiffies; -+ -+/* Total jiffies in idle state */ -+static uint64_t idle_total_jiffies; -+ -+/* Total idle time */ -+static int idle_time; -+module_param(idle_time, int, 0444); -+MODULE_PARM_DESC(idle_time, "idle time (seconds)"); -+ -+/* The current idle state */ -+static int idle_state; -+module_param(idle_state, int, 0444); -+MODULE_PARM_DESC(idle_state, "idle state (0: not idle, 1: idle)"); - /* - * If DMA addr spans 128MB boundary, we split the DMA transfer into two - * so that each DMA transfer doesn't exceed the boundary. -@@ -532,6 +548,7 @@ static int dwcmshc_probe(struct platform_device *pdev) - #ifdef CONFIG_ACPI - if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { - sdhci_enable_v4_mode(host); -+ pm_runtime_enable(dev); - } - #endif - -@@ -635,7 +652,90 @@ static int dwcmshc_resume(struct device *dev) - } - #endif - --static SIMPLE_DEV_PM_OPS(dwcmshc_pmops, dwcmshc_suspend, dwcmshc_resume); -+#ifdef CONFIG_PM -+ -+#ifdef CONFIG_ACPI -+static void dwcmshc_enable_card_clk(struct sdhci_host *host) -+{ -+ u16 ctrl; -+ -+ ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); -+ ctrl |= SDHCI_CLOCK_CARD_EN; -+ sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); -+} -+ -+static void dwcmshc_disable_card_clk(struct sdhci_host *host) -+{ -+ u16 ctrl; -+ -+ ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); -+ ctrl &= ~SDHCI_CLOCK_CARD_EN; -+ sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); -+} -+#endif -+ -+static int dwcmshc_runtime_suspend(struct device *dev) -+{ -+ struct sdhci_host *host = dev_get_drvdata(dev); -+ const struct sdhci_pltfm_data *pltfm_data; -+ int ret = 0; -+ -+ pltfm_data = device_get_match_data(dev); -+ if (!pltfm_data) -+ return -ENODEV; -+ -+#ifdef CONFIG_ACPI -+ if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { -+ ret = sdhci_runtime_suspend_host(host); -+ if (!ret) { -+ dwcmshc_disable_card_clk(host); -+ -+ if (!idle_state) { -+ idle_state = 1; -+ idle_last_jiffies = jiffies; -+ } -+ } -+ } -+#endif -+ -+ return ret; -+} -+ -+static int dwcmshc_runtime_resume(struct device *dev) -+{ -+ struct sdhci_host *host = dev_get_drvdata(dev); -+ const struct sdhci_pltfm_data *pltfm_data; -+ int ret = 0; -+ -+ pltfm_data = device_get_match_data(dev); -+ if (!pltfm_data) -+ return -ENODEV; -+ -+#ifdef CONFIG_ACPI -+ if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { -+ dwcmshc_enable_card_clk(host); -+ -+ if (idle_state) { -+ idle_state = 0; -+ idle_total_jiffies = jiffies - idle_last_jiffies; -+ idle_time += jiffies_to_msecs( -+ idle_total_jiffies) / 1000; -+ } -+ -+ ret = sdhci_runtime_resume_host(host, 0); -+ } -+#endif -+ -+ return ret; -+} -+ -+#endif -+ -+static const struct dev_pm_ops dwcmshc_pmops = { -+ SET_SYSTEM_SLEEP_PM_OPS(dwcmshc_suspend, dwcmshc_resume) -+ SET_RUNTIME_PM_OPS(dwcmshc_runtime_suspend, -+ dwcmshc_runtime_resume, NULL) -+}; - - static struct platform_driver sdhci_dwcmshc_driver = { - .driver = { --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch b/platform/mellanox/non-upstream-patches/patches/0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch deleted file mode 100644 index add9431adac3..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 8c4980bc00f7be2d1172f047e148ecb07c43d955 Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Thu, 14 Jul 2022 17:47:18 -0400 -Subject: [PATCH backport 6.1.42 69/85] UBUNTU: SAUCE: mlxbf_gige: add ethtool - mlxbf_gige_set_ringparam - -This patch adds the "set_ringparam" callback, to be used by -ethtool when changing the size of the mlxbf_gige driver rings. - -BugLink: https://launchpad.net/bugs/1981766 - -Change-Id: I0198f6fbf6b8ea13bd34ed152e13298265138c76 -Signed-off-by: David Thompson -Signed-off-by: Asmaa Mnebhi -Signed-off-by: Ike Panhc ---- - .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 40 +++++++++++++++++++ - 1 file changed, 40 insertions(+) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -index 41ebef25a930..4becb39b5664 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -@@ -45,6 +45,45 @@ mlxbf_gige_get_ringparam(struct net_device *netdev, - ering->tx_pending = priv->tx_q_entries; - } - -+static int mlxbf_gige_set_ringparam(struct net_device *netdev, -+ struct ethtool_ringparam *ering, -+ struct kernel_ethtool_ringparam *kernel_ring, -+ struct netlink_ext_ack *extack) -+{ -+ const struct net_device_ops *ops = netdev->netdev_ops; -+ struct mlxbf_gige *priv = netdev_priv(netdev); -+ int new_rx_q_entries, new_tx_q_entries; -+ -+ /* Device does not have separate queues for small/large frames */ -+ if (ering->rx_mini_pending || ering->rx_jumbo_pending) -+ return -EINVAL; -+ -+ /* Round up to supported values */ -+ new_rx_q_entries = roundup_pow_of_two(ering->rx_pending); -+ new_tx_q_entries = roundup_pow_of_two(ering->tx_pending); -+ -+ /* Check against min values, core checks against max values */ -+ if (new_tx_q_entries < MLXBF_GIGE_MIN_TXQ_SZ || -+ new_rx_q_entries < MLXBF_GIGE_MIN_RXQ_SZ) -+ return -EINVAL; -+ -+ /* If queue sizes did not change, exit now */ -+ if (new_rx_q_entries == priv->rx_q_entries && -+ new_tx_q_entries == priv->tx_q_entries) -+ return 0; -+ -+ if (netif_running(netdev)) -+ ops->ndo_stop(netdev); -+ -+ priv->rx_q_entries = new_rx_q_entries; -+ priv->tx_q_entries = new_tx_q_entries; -+ -+ if (netif_running(netdev)) -+ ops->ndo_open(netdev); -+ -+ return 0; -+} -+ - static const struct { - const char string[ETH_GSTRING_LEN]; - } mlxbf_gige_ethtool_stats_keys[] = { -@@ -127,6 +166,7 @@ static void mlxbf_gige_get_pauseparam(struct net_device *netdev, - const struct ethtool_ops mlxbf_gige_ethtool_ops = { - .get_link = ethtool_op_get_link, - .get_ringparam = mlxbf_gige_get_ringparam, -+ .set_ringparam = mlxbf_gige_set_ringparam, - .get_regs_len = mlxbf_gige_get_regs_len, - .get_regs = mlxbf_gige_get_regs, - .get_strings = mlxbf_gige_get_strings, --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch b/platform/mellanox/non-upstream-patches/patches/0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch deleted file mode 100644 index 6550158ceb56..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 8864f5ec2e1c0e1271a202859325900bd6727139 Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Wed, 20 Jul 2022 17:50:36 -0400 -Subject: [PATCH backport 6.1.42 70/85] UBUNTU: SAUCE: Fix OOB handling RX - packets in heavy traffic - -BugLink: https://bugs.launchpad.net/bugs/1982424 - -This is reproducible on systems which already have heavy background -traffic. On top of that, the user issues one of the 2 docker pulls below: -docker pull nvcr.io/ea-doca-hbn/hbn/hbn:latest -OR -docker pull gitlab-master.nvidia.com:5005/dl/dgx/tritonserver:22.02-py3-qa - -The second one is a very large container (17GB) - -When they run docker pull, the OOB interface stops being pingable, -the docker pull is interrupted for a very long time (>3mn) or -times out. - -The main reason for the above is because RX PI = RX CI. I have verified that -by reading RX_CQE_PACKET_CI and RX_WQE_PI. This means the WQEs are full and -HW has nowhere else to put the RX packets. - -I believe there is a race condition after SW receives a RX interrupt, -and the interrupt is disabled. I believe HW still tries to add RX -packets to the RX WQEs. So we need to stop the RX traffic by disabling -the DMA. Also, move reading the RX CI before writing the increased value -of RX PI to MLXBF_GIGE_RX_WQE_PI. Normally RX PI should always be > RX CI. -I suspect that when entering mlxbf_gige_rx_packet, for example we have: -MLXBF_GIGE_RX_WQE_PI = 128 -RX_CQE_PACKET_CI = 128 -(128 being the max size of the WQE) - -Then this code will make MLXBF_GIGE_RX_WQE_PI = 129: -rx_pi++; -/* Ensure completion of all writes before notifying HW of replenish */ -wmb(); -writeq(rx_pi, priv->base + MLXBF_GIGE_RX_WQE_PI); - -which means HW has one more slot to populate and in that time span, the HW -populates that WQE and increases the RX_CQE_PACKET_CI = 129. - -Then this code is subject to a race condition: - -rx_ci = readq(priv->base + MLXBF_GIGE_RX_CQE_PACKET_CI); -rx_ci_rem = rx_ci % priv->rx_q_entries; -return rx_pi_rem != rx_ci_rem; - -because rx_pi_rem will be equal to rx_ci_rem. -so remaining_pkts will be 0 and we will exit mlxbf_gige_poll - -Change-Id: I25a816b9182471643db95b05c803b9f6349bcc87 -Signed-off-by: David Thompson -Signed-off-by: Asmaa Mnebhi -Signed-off-by: Ike Panhc ---- - .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -index 0d5a41a2ae01..dc05ab5b042a 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -@@ -267,6 +267,9 @@ static bool mlxbf_gige_rx_packet(struct mlxbf_gige *priv, int *rx_pkts) - priv->stats.rx_truncate_errors++; - } - -+ rx_ci = readq(priv->base + MLXBF_GIGE_RX_CQE_PACKET_CI); -+ rx_ci_rem = rx_ci % priv->rx_q_entries; -+ - /* Let hardware know we've replenished one buffer */ - rx_pi++; - -@@ -279,8 +282,6 @@ static bool mlxbf_gige_rx_packet(struct mlxbf_gige *priv, int *rx_pkts) - rx_pi_rem = rx_pi % priv->rx_q_entries; - if (rx_pi_rem == 0) - priv->valid_polarity ^= 1; -- rx_ci = readq(priv->base + MLXBF_GIGE_RX_CQE_PACKET_CI); -- rx_ci_rem = rx_ci % priv->rx_q_entries; - - if (skb) - netif_receive_skb(skb); -@@ -300,6 +301,10 @@ int mlxbf_gige_poll(struct napi_struct *napi, int budget) - - mlxbf_gige_handle_tx_complete(priv); - -+ data = readq(priv->base + MLXBF_GIGE_RX_DMA); -+ data &= ~MLXBF_GIGE_RX_DMA_EN; -+ writeq(data, priv->base + MLXBF_GIGE_RX_DMA); -+ - do { - remaining_pkts = mlxbf_gige_rx_packet(priv, &work_done); - } while (remaining_pkts && work_done < budget); -@@ -315,6 +320,10 @@ int mlxbf_gige_poll(struct napi_struct *napi, int budget) - data = readq(priv->base + MLXBF_GIGE_INT_MASK); - data &= ~MLXBF_GIGE_INT_MASK_RX_RECEIVE_PACKET; - writeq(data, priv->base + MLXBF_GIGE_INT_MASK); -+ -+ data = readq(priv->base + MLXBF_GIGE_RX_DMA); -+ data |= MLXBF_GIGE_RX_DMA_EN; -+ writeq(data, priv->base + MLXBF_GIGE_RX_DMA); - } - - return work_done; --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch b/platform/mellanox/non-upstream-patches/patches/0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch deleted file mode 100644 index f8e11a70453a..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 7a9c30f4e3f19eb533acce3d3c63de87d18bac1d Mon Sep 17 00:00:00 2001 -From: Asmaa Mnebhi -Date: Tue, 28 Feb 2023 18:03:12 -0500 -Subject: [PATCH backport 6.1.42 71/85] UBUNTU: SAUCE: mlxbf-gige: Fix - intermittent no ip issue - -BugLink: https://bugs.launchpad.net/bugs/2008833 - -During the reboot test, the OOB might not get an ip assigned. -This is due to a race condition between phy_startcall and the -RX DMA being enabled and depends on the amount of background -traffic received by the OOB. Enable the RX DMA after teh phy -is started. - -Signed-off-by: Asmaa Mnebhi -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 14 +++++++------- - .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c | 6 +++--- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -index 2292d63a279c..eafc0d3313fd 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -@@ -147,14 +147,14 @@ static int mlxbf_gige_open(struct net_device *netdev) - */ - priv->valid_polarity = 0; - -- err = mlxbf_gige_rx_init(priv); -+ phy_start(phydev); -+ -+ err = mlxbf_gige_tx_init(priv); - if (err) - goto free_irqs; -- err = mlxbf_gige_tx_init(priv); -+ err = mlxbf_gige_rx_init(priv); - if (err) -- goto rx_deinit; -- -- phy_start(phydev); -+ goto tx_deinit; - - netif_napi_add(netdev, &priv->napi, mlxbf_gige_poll); - napi_enable(&priv->napi); -@@ -176,8 +176,8 @@ static int mlxbf_gige_open(struct net_device *netdev) - - return 0; - --rx_deinit: -- mlxbf_gige_rx_deinit(priv); -+tx_deinit: -+ mlxbf_gige_tx_deinit(priv); - - free_irqs: - mlxbf_gige_free_irqs(priv); -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -index dc05ab5b042a..b9cf0a3c8b0f 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c -@@ -142,6 +142,9 @@ int mlxbf_gige_rx_init(struct mlxbf_gige *priv) - writeq(MLXBF_GIGE_RX_MAC_FILTER_COUNT_PASS_EN, - priv->base + MLXBF_GIGE_RX_MAC_FILTER_COUNT_PASS); - -+ writeq(ilog2(priv->rx_q_entries), -+ priv->base + MLXBF_GIGE_RX_WQE_SIZE_LOG2); -+ - /* Clear MLXBF_GIGE_INT_MASK 'receive pkt' bit to - * indicate readiness to receive interrupts - */ -@@ -154,9 +157,6 @@ int mlxbf_gige_rx_init(struct mlxbf_gige *priv) - data |= MLXBF_GIGE_RX_DMA_EN; - writeq(data, priv->base + MLXBF_GIGE_RX_DMA); - -- writeq(ilog2(priv->rx_q_entries), -- priv->base + MLXBF_GIGE_RX_WQE_SIZE_LOG2); -- - return 0; - - free_wqe_and_skb: --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch b/platform/mellanox/non-upstream-patches/patches/0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch deleted file mode 100644 index 9dc9c986208b..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch +++ /dev/null @@ -1,496 +0,0 @@ -From 0d3a669288079d5a197b95d1a4615301e61fb039 Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Thu, 12 Jan 2023 15:26:06 -0500 -Subject: [PATCH backport 6.1.42 72/85] mlxbf_gige: add MDIO support for - BlueField-3 - -BugLink: https://bugs.launchpad.net/bugs/2012649 - -This patch adds initial MDIO support for the BlueField-3 -SoC. Separate header files for the BlueField-2 and the -BlueField-3 SoCs have been created. These header files -hold the SoC-specific MDIO macros since the register -offsets and bit fields have changed. Also, in BlueField-3 -there is a separate register for writing and reading the -MDIO data. Finally, instead of having "if" statements -everywhere to differentiate between SoC-specific logic, -a mlxbf_gige_mdio_gw_t struct was created for this purpose. - -Signed-off-by: David Thompson -Signed-off-by: Asmaa Mnebhi -Signed-off-by: Jakub Kicinski -(cherry picked from commit 2321d69f92aa7e6aa2cc98e7a8e005566943922f) -Signed-off-by: David Thompson -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h | 19 ++ - .../mellanox/mlxbf_gige/mlxbf_gige_main.c | 2 + - .../mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 178 +++++++++++++----- - .../mellanox/mlxbf_gige/mlxbf_gige_mdio_bf2.h | 53 ++++++ - .../mellanox/mlxbf_gige/mlxbf_gige_mdio_bf3.h | 54 ++++++ - .../mellanox/mlxbf_gige/mlxbf_gige_regs.h | 1 + - 6 files changed, 256 insertions(+), 51 deletions(-) - create mode 100644 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf2.h - create mode 100644 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf3.h - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -index 5a1027b07215..421a0b1b766c 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -@@ -67,6 +67,23 @@ struct mlxbf_gige_stats { - u64 rx_filter_discard_pkts; - }; - -+struct mlxbf_gige_reg_param { -+ u32 mask; -+ u32 shift; -+}; -+ -+struct mlxbf_gige_mdio_gw { -+ u32 gw_address; -+ u32 read_data_address; -+ struct mlxbf_gige_reg_param busy; -+ struct mlxbf_gige_reg_param write_data; -+ struct mlxbf_gige_reg_param read_data; -+ struct mlxbf_gige_reg_param devad; -+ struct mlxbf_gige_reg_param partad; -+ struct mlxbf_gige_reg_param opcode; -+ struct mlxbf_gige_reg_param st1; -+}; -+ - struct mlxbf_gige { - void __iomem *base; - void __iomem *llu_base; -@@ -102,6 +119,8 @@ struct mlxbf_gige { - u8 valid_polarity; - struct napi_struct napi; - struct mlxbf_gige_stats stats; -+ u8 hw_version; -+ struct mlxbf_gige_mdio_gw *mdio_gw; - }; - - /* Rx Work Queue Element definitions */ -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -index eafc0d3313fd..a3bd14d5dbff 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -@@ -315,6 +315,8 @@ static int mlxbf_gige_probe(struct platform_device *pdev) - - spin_lock_init(&priv->lock); - -+ priv->hw_version = readq(base + MLXBF_GIGE_VERSION); -+ - /* Attach MDIO device */ - err = mlxbf_gige_mdio_probe(pdev, priv); - if (err) -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c -index aa780b1614a3..4ee3df30c402 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c -@@ -23,9 +23,75 @@ - - #include "mlxbf_gige.h" - #include "mlxbf_gige_regs.h" -+#include "mlxbf_gige_mdio_bf2.h" -+#include "mlxbf_gige_mdio_bf3.h" - --#define MLXBF_GIGE_MDIO_GW_OFFSET 0x0 --#define MLXBF_GIGE_MDIO_CFG_OFFSET 0x4 -+static struct mlxbf_gige_mdio_gw mlxbf_gige_mdio_gw_t[] = { -+ [MLXBF_GIGE_VERSION_BF2] = { -+ .gw_address = MLXBF2_GIGE_MDIO_GW_OFFSET, -+ .read_data_address = MLXBF2_GIGE_MDIO_GW_OFFSET, -+ .busy = { -+ .mask = MLXBF2_GIGE_MDIO_GW_BUSY_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_BUSY_SHIFT, -+ }, -+ .read_data = { -+ .mask = MLXBF2_GIGE_MDIO_GW_AD_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_AD_SHIFT, -+ }, -+ .write_data = { -+ .mask = MLXBF2_GIGE_MDIO_GW_AD_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_AD_SHIFT, -+ }, -+ .devad = { -+ .mask = MLXBF2_GIGE_MDIO_GW_DEVAD_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_DEVAD_SHIFT, -+ }, -+ .partad = { -+ .mask = MLXBF2_GIGE_MDIO_GW_PARTAD_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_PARTAD_SHIFT, -+ }, -+ .opcode = { -+ .mask = MLXBF2_GIGE_MDIO_GW_OPCODE_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_OPCODE_SHIFT, -+ }, -+ .st1 = { -+ .mask = MLXBF2_GIGE_MDIO_GW_ST1_MASK, -+ .shift = MLXBF2_GIGE_MDIO_GW_ST1_SHIFT, -+ }, -+ }, -+ [MLXBF_GIGE_VERSION_BF3] = { -+ .gw_address = MLXBF3_GIGE_MDIO_GW_OFFSET, -+ .read_data_address = MLXBF3_GIGE_MDIO_DATA_READ, -+ .busy = { -+ .mask = MLXBF3_GIGE_MDIO_GW_BUSY_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_BUSY_SHIFT, -+ }, -+ .read_data = { -+ .mask = MLXBF3_GIGE_MDIO_GW_DATA_READ_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_DATA_READ_SHIFT, -+ }, -+ .write_data = { -+ .mask = MLXBF3_GIGE_MDIO_GW_DATA_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_DATA_SHIFT, -+ }, -+ .devad = { -+ .mask = MLXBF3_GIGE_MDIO_GW_DEVAD_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_DEVAD_SHIFT, -+ }, -+ .partad = { -+ .mask = MLXBF3_GIGE_MDIO_GW_PARTAD_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_PARTAD_SHIFT, -+ }, -+ .opcode = { -+ .mask = MLXBF3_GIGE_MDIO_GW_OPCODE_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_OPCODE_SHIFT, -+ }, -+ .st1 = { -+ .mask = MLXBF3_GIGE_MDIO_GW_ST1_MASK, -+ .shift = MLXBF3_GIGE_MDIO_GW_ST1_SHIFT, -+ }, -+ }, -+}; - - #define MLXBF_GIGE_MDIO_FREQ_REFERENCE 156250000ULL - #define MLXBF_GIGE_MDIO_COREPLL_CONST 16384ULL -@@ -47,30 +113,10 @@ - /* Busy bit is set by software and cleared by hardware */ - #define MLXBF_GIGE_MDIO_SET_BUSY 0x1 - --/* MDIO GW register bits */ --#define MLXBF_GIGE_MDIO_GW_AD_MASK GENMASK(15, 0) --#define MLXBF_GIGE_MDIO_GW_DEVAD_MASK GENMASK(20, 16) --#define MLXBF_GIGE_MDIO_GW_PARTAD_MASK GENMASK(25, 21) --#define MLXBF_GIGE_MDIO_GW_OPCODE_MASK GENMASK(27, 26) --#define MLXBF_GIGE_MDIO_GW_ST1_MASK GENMASK(28, 28) --#define MLXBF_GIGE_MDIO_GW_BUSY_MASK GENMASK(30, 30) -- --/* MDIO config register bits */ --#define MLXBF_GIGE_MDIO_CFG_MDIO_MODE_MASK GENMASK(1, 0) --#define MLXBF_GIGE_MDIO_CFG_MDIO3_3_MASK GENMASK(2, 2) --#define MLXBF_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK GENMASK(4, 4) --#define MLXBF_GIGE_MDIO_CFG_MDC_PERIOD_MASK GENMASK(15, 8) --#define MLXBF_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK GENMASK(23, 16) --#define MLXBF_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK GENMASK(31, 24) -- --#define MLXBF_GIGE_MDIO_CFG_VAL (FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_MODE_MASK, 1) | \ -- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO3_3_MASK, 1) | \ -- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK, 1) | \ -- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK, 6) | \ -- FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK, 13)) -- - #define MLXBF_GIGE_BF2_COREPLL_ADDR 0x02800c30 - #define MLXBF_GIGE_BF2_COREPLL_SIZE 0x0000000c -+#define MLXBF_GIGE_BF3_COREPLL_ADDR 0x13409824 -+#define MLXBF_GIGE_BF3_COREPLL_SIZE 0x00000010 - - static struct resource corepll_params[] = { - [MLXBF_GIGE_VERSION_BF2] = { -@@ -78,6 +124,11 @@ static struct resource corepll_params[] = { - .end = MLXBF_GIGE_BF2_COREPLL_ADDR + MLXBF_GIGE_BF2_COREPLL_SIZE - 1, - .name = "COREPLL_RES" - }, -+ [MLXBF_GIGE_VERSION_BF3] = { -+ .start = MLXBF_GIGE_BF3_COREPLL_ADDR, -+ .end = MLXBF_GIGE_BF3_COREPLL_ADDR + MLXBF_GIGE_BF3_COREPLL_SIZE - 1, -+ .name = "COREPLL_RES" -+ } - }; - - /* Returns core clock i1clk in Hz */ -@@ -134,19 +185,23 @@ static u8 mdio_period_map(struct mlxbf_gige *priv) - return mdio_period; - } - --static u32 mlxbf_gige_mdio_create_cmd(u16 data, int phy_add, -+static u32 mlxbf_gige_mdio_create_cmd(struct mlxbf_gige_mdio_gw *mdio_gw, u16 data, int phy_add, - int phy_reg, u32 opcode) - { - u32 gw_reg = 0; - -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_AD_MASK, data); -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_DEVAD_MASK, phy_reg); -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_PARTAD_MASK, phy_add); -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_OPCODE_MASK, opcode); -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_ST1_MASK, -- MLXBF_GIGE_MDIO_CL22_ST1); -- gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_BUSY_MASK, -- MLXBF_GIGE_MDIO_SET_BUSY); -+ gw_reg |= ((data << mdio_gw->write_data.shift) & -+ mdio_gw->write_data.mask); -+ gw_reg |= ((phy_reg << mdio_gw->devad.shift) & -+ mdio_gw->devad.mask); -+ gw_reg |= ((phy_add << mdio_gw->partad.shift) & -+ mdio_gw->partad.mask); -+ gw_reg |= ((opcode << mdio_gw->opcode.shift) & -+ mdio_gw->opcode.mask); -+ gw_reg |= ((MLXBF_GIGE_MDIO_CL22_ST1 << mdio_gw->st1.shift) & -+ mdio_gw->st1.mask); -+ gw_reg |= ((MLXBF_GIGE_MDIO_SET_BUSY << mdio_gw->busy.shift) & -+ mdio_gw->busy.mask); - - return gw_reg; - } -@@ -162,25 +217,26 @@ static int mlxbf_gige_mdio_read(struct mii_bus *bus, int phy_add, int phy_reg) - return -EOPNOTSUPP; - - /* Send mdio read request */ -- cmd = mlxbf_gige_mdio_create_cmd(0, phy_add, phy_reg, MLXBF_GIGE_MDIO_CL22_READ); -+ cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, 0, phy_add, phy_reg, -+ MLXBF_GIGE_MDIO_CL22_READ); - -- writel(cmd, priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ writel(cmd, priv->mdio_io + priv->mdio_gw->gw_address); - -- ret = readl_poll_timeout_atomic(priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET, -- val, !(val & MLXBF_GIGE_MDIO_GW_BUSY_MASK), -+ ret = readl_poll_timeout_atomic(priv->mdio_io + priv->mdio_gw->gw_address, -+ val, !(val & priv->mdio_gw->busy.mask), - 5, 1000000); - - if (ret) { -- writel(0, priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ writel(0, priv->mdio_io + priv->mdio_gw->gw_address); - return ret; - } - -- ret = readl(priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ ret = readl(priv->mdio_io + priv->mdio_gw->read_data_address); - /* Only return ad bits of the gw register */ -- ret &= MLXBF_GIGE_MDIO_GW_AD_MASK; -+ ret &= priv->mdio_gw->read_data.mask; - - /* The MDIO lock is set on read. To release it, clear gw register */ -- writel(0, priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ writel(0, priv->mdio_io + priv->mdio_gw->gw_address); - - return ret; - } -@@ -197,17 +253,17 @@ static int mlxbf_gige_mdio_write(struct mii_bus *bus, int phy_add, - return -EOPNOTSUPP; - - /* Send mdio write request */ -- cmd = mlxbf_gige_mdio_create_cmd(val, phy_add, phy_reg, -+ cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, val, phy_add, phy_reg, - MLXBF_GIGE_MDIO_CL22_WRITE); -- writel(cmd, priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ writel(cmd, priv->mdio_io + priv->mdio_gw->gw_address); - - /* If the poll timed out, drop the request */ -- ret = readl_poll_timeout_atomic(priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET, -- temp, !(temp & MLXBF_GIGE_MDIO_GW_BUSY_MASK), -+ ret = readl_poll_timeout_atomic(priv->mdio_io + priv->mdio_gw->gw_address, -+ temp, !(temp & priv->mdio_gw->busy.mask), - 5, 1000000); - - /* The MDIO lock is set on read. To release it, clear gw register */ -- writel(0, priv->mdio_io + MLXBF_GIGE_MDIO_GW_OFFSET); -+ writel(0, priv->mdio_io + priv->mdio_gw->gw_address); - - return ret; - } -@@ -219,9 +275,20 @@ static void mlxbf_gige_mdio_cfg(struct mlxbf_gige *priv) - - mdio_period = mdio_period_map(priv); - -- val = MLXBF_GIGE_MDIO_CFG_VAL; -- val |= FIELD_PREP(MLXBF_GIGE_MDIO_CFG_MDC_PERIOD_MASK, mdio_period); -- writel(val, priv->mdio_io + MLXBF_GIGE_MDIO_CFG_OFFSET); -+ if (priv->hw_version == MLXBF_GIGE_VERSION_BF2) { -+ val = MLXBF2_GIGE_MDIO_CFG_VAL; -+ val |= FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDC_PERIOD_MASK, mdio_period); -+ writel(val, priv->mdio_io + MLXBF2_GIGE_MDIO_CFG_OFFSET); -+ } else { -+ val = FIELD_PREP(MLXBF3_GIGE_MDIO_CFG_MDIO_MODE_MASK, 1) | -+ FIELD_PREP(MLXBF3_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK, 1); -+ writel(val, priv->mdio_io + MLXBF3_GIGE_MDIO_CFG_REG0); -+ val = FIELD_PREP(MLXBF3_GIGE_MDIO_CFG_MDC_PERIOD_MASK, mdio_period); -+ writel(val, priv->mdio_io + MLXBF3_GIGE_MDIO_CFG_REG1); -+ val = FIELD_PREP(MLXBF3_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK, 6) | -+ FIELD_PREP(MLXBF3_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK, 13); -+ writel(val, priv->mdio_io + MLXBF3_GIGE_MDIO_CFG_REG2); -+ } - } - - int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv) -@@ -230,7 +297,14 @@ int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv) - struct resource *res; - int ret; - -- priv->mdio_io = devm_platform_ioremap_resource(pdev, MLXBF_GIGE_RES_MDIO9); -+ if (priv->hw_version > MLXBF_GIGE_VERSION_BF3) -+ return -ENODEV; -+ -+ res = platform_get_resource(pdev, IORESOURCE_MEM, MLXBF_GIGE_RES_MDIO9); -+ if (!res) -+ return -ENODEV; -+ -+ priv->mdio_io = devm_ioremap_resource(dev, res); - if (IS_ERR(priv->mdio_io)) - return PTR_ERR(priv->mdio_io); - -@@ -242,13 +316,15 @@ int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv) - /* For backward compatibility with older ACPI tables, also keep - * CLK resource internal to the driver. - */ -- res = &corepll_params[MLXBF_GIGE_VERSION_BF2]; -+ res = &corepll_params[priv->hw_version]; - } - - priv->clk_io = devm_ioremap(dev, res->start, resource_size(res)); - if (!priv->clk_io) - return -ENOMEM; - -+ priv->mdio_gw = &mlxbf_gige_mdio_gw_t[priv->hw_version]; -+ - mlxbf_gige_mdio_cfg(priv); - - priv->mdiobus = devm_mdiobus_alloc(dev); -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf2.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf2.h -new file mode 100644 -index 000000000000..7f1ff0ac7699 ---- /dev/null -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf2.h -@@ -0,0 +1,53 @@ -+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */ -+ -+/* MDIO support for Mellanox Gigabit Ethernet driver -+ * -+ * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED. -+ * -+ * This software product is a proprietary product of NVIDIA CORPORATION & -+ * AFFILIATES (the "Company") and all right, title, and interest in and to the -+ * software product, including all associated intellectual property rights, are -+ * and shall remain exclusively with the Company. -+ * -+ * This software product is governed by the End User License Agreement -+ * provided with the software product. -+ */ -+ -+#ifndef __MLXBF_GIGE_MDIO_BF2_H__ -+#define __MLXBF_GIGE_MDIO_BF2_H__ -+ -+#include -+ -+#define MLXBF2_GIGE_MDIO_GW_OFFSET 0x0 -+#define MLXBF2_GIGE_MDIO_CFG_OFFSET 0x4 -+ -+/* MDIO GW register bits */ -+#define MLXBF2_GIGE_MDIO_GW_AD_MASK GENMASK(15, 0) -+#define MLXBF2_GIGE_MDIO_GW_DEVAD_MASK GENMASK(20, 16) -+#define MLXBF2_GIGE_MDIO_GW_PARTAD_MASK GENMASK(25, 21) -+#define MLXBF2_GIGE_MDIO_GW_OPCODE_MASK GENMASK(27, 26) -+#define MLXBF2_GIGE_MDIO_GW_ST1_MASK GENMASK(28, 28) -+#define MLXBF2_GIGE_MDIO_GW_BUSY_MASK GENMASK(30, 30) -+ -+#define MLXBF2_GIGE_MDIO_GW_AD_SHIFT 0 -+#define MLXBF2_GIGE_MDIO_GW_DEVAD_SHIFT 16 -+#define MLXBF2_GIGE_MDIO_GW_PARTAD_SHIFT 21 -+#define MLXBF2_GIGE_MDIO_GW_OPCODE_SHIFT 26 -+#define MLXBF2_GIGE_MDIO_GW_ST1_SHIFT 28 -+#define MLXBF2_GIGE_MDIO_GW_BUSY_SHIFT 30 -+ -+/* MDIO config register bits */ -+#define MLXBF2_GIGE_MDIO_CFG_MDIO_MODE_MASK GENMASK(1, 0) -+#define MLXBF2_GIGE_MDIO_CFG_MDIO3_3_MASK GENMASK(2, 2) -+#define MLXBF2_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK GENMASK(4, 4) -+#define MLXBF2_GIGE_MDIO_CFG_MDC_PERIOD_MASK GENMASK(15, 8) -+#define MLXBF2_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK GENMASK(23, 16) -+#define MLXBF2_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK GENMASK(31, 24) -+ -+#define MLXBF2_GIGE_MDIO_CFG_VAL (FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDIO_MODE_MASK, 1) | \ -+ FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDIO3_3_MASK, 1) | \ -+ FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK, 1) | \ -+ FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK, 6) | \ -+ FIELD_PREP(MLXBF2_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK, 13)) -+ -+#endif /* __MLXBF_GIGE_MDIO_BF2_H__ */ -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf3.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf3.h -new file mode 100644 -index 000000000000..9dd9144b9173 ---- /dev/null -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio_bf3.h -@@ -0,0 +1,54 @@ -+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */ -+ -+/* MDIO support for Mellanox Gigabit Ethernet driver -+ * -+ * Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED. -+ * -+ * This software product is a proprietary product of NVIDIA CORPORATION & -+ * AFFILIATES (the "Company") and all right, title, and interest in and to the -+ * software product, including all associated intellectual property rights, are -+ * and shall remain exclusively with the Company. -+ * -+ * This software product is governed by the End User License Agreement -+ * provided with the software product. -+ */ -+ -+#ifndef __MLXBF_GIGE_MDIO_BF3_H__ -+#define __MLXBF_GIGE_MDIO_BF3_H__ -+ -+#include -+ -+#define MLXBF3_GIGE_MDIO_GW_OFFSET 0x80 -+#define MLXBF3_GIGE_MDIO_DATA_READ 0x8c -+#define MLXBF3_GIGE_MDIO_CFG_REG0 0x100 -+#define MLXBF3_GIGE_MDIO_CFG_REG1 0x104 -+#define MLXBF3_GIGE_MDIO_CFG_REG2 0x108 -+ -+/* MDIO GW register bits */ -+#define MLXBF3_GIGE_MDIO_GW_ST1_MASK GENMASK(1, 1) -+#define MLXBF3_GIGE_MDIO_GW_OPCODE_MASK GENMASK(3, 2) -+#define MLXBF3_GIGE_MDIO_GW_PARTAD_MASK GENMASK(8, 4) -+#define MLXBF3_GIGE_MDIO_GW_DEVAD_MASK GENMASK(13, 9) -+/* For BlueField-3, this field is only used for mdio write */ -+#define MLXBF3_GIGE_MDIO_GW_DATA_MASK GENMASK(29, 14) -+#define MLXBF3_GIGE_MDIO_GW_BUSY_MASK GENMASK(30, 30) -+ -+#define MLXBF3_GIGE_MDIO_GW_DATA_READ_MASK GENMASK(15, 0) -+ -+#define MLXBF3_GIGE_MDIO_GW_ST1_SHIFT 1 -+#define MLXBF3_GIGE_MDIO_GW_OPCODE_SHIFT 2 -+#define MLXBF3_GIGE_MDIO_GW_PARTAD_SHIFT 4 -+#define MLXBF3_GIGE_MDIO_GW_DEVAD_SHIFT 9 -+#define MLXBF3_GIGE_MDIO_GW_DATA_SHIFT 14 -+#define MLXBF3_GIGE_MDIO_GW_BUSY_SHIFT 30 -+ -+#define MLXBF3_GIGE_MDIO_GW_DATA_READ_SHIFT 0 -+ -+/* MDIO config register bits */ -+#define MLXBF3_GIGE_MDIO_CFG_MDIO_MODE_MASK GENMASK(1, 0) -+#define MLXBF3_GIGE_MDIO_CFG_MDIO_FULL_DRIVE_MASK GENMASK(2, 2) -+#define MLXBF3_GIGE_MDIO_CFG_MDC_PERIOD_MASK GENMASK(7, 0) -+#define MLXBF3_GIGE_MDIO_CFG_MDIO_IN_SAMP_MASK GENMASK(7, 0) -+#define MLXBF3_GIGE_MDIO_CFG_MDIO_OUT_SAMP_MASK GENMASK(15, 8) -+ -+#endif /* __MLXBF_GIGE_MDIO_BF3_H__ */ -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -index 7be3a793984d..8d52dbef4adf 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -@@ -10,6 +10,7 @@ - - #define MLXBF_GIGE_VERSION 0x0000 - #define MLXBF_GIGE_VERSION_BF2 0x0 -+#define MLXBF_GIGE_VERSION_BF3 0x1 - #define MLXBF_GIGE_STATUS 0x0010 - #define MLXBF_GIGE_STATUS_READY BIT(0) - #define MLXBF_GIGE_INT_STATUS 0x0028 --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch b/platform/mellanox/non-upstream-patches/patches/0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch deleted file mode 100644 index de0aab88310a..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 4c1187581e9c7dc8cf354278c3257d8542209269 Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Thu, 12 Jan 2023 15:26:07 -0500 -Subject: [PATCH backport 6.1.42 73/85] mlxbf_gige: support 10M/100M/1G speeds - on BlueField-3 - -BugLink: https://bugs.launchpad.net/bugs/2012649 - -The BlueField-3 OOB interface supports 10Mbps, 100Mbps, and 1Gbps speeds. -The external PHY is responsible for autonegotiating the speed with the -link partner. Once the autonegotiation is done, the BlueField PLU needs -to be configured accordingly. - -This patch does two things: -1) Initialize the advertised control flow/duplex/speed in the probe - based on the BlueField SoC generation (2 or 3) -2) Adjust the PLU speed config in the PHY interrupt handler - -Signed-off-by: David Thompson -Signed-off-by: Asmaa Mnebhi -Reviewed-by: Andrew Lunn -Signed-off-by: Jakub Kicinski -(cherry picked from commit 20d03d4d9437771a9b6d38d4a6027a70d78d9865) -Signed-off-by: David Thompson -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h | 8 ++ - .../mellanox/mlxbf_gige/mlxbf_gige_main.c | 105 +++++++++++++++--- - .../mellanox/mlxbf_gige/mlxbf_gige_regs.h | 21 ++++ - 3 files changed, 119 insertions(+), 15 deletions(-) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -index 421a0b1b766c..a453b9cd9033 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - /* The silicon design supports a maximum RX ring size of - * 32K entries. Based on current testing this maximum size -@@ -84,6 +85,12 @@ struct mlxbf_gige_mdio_gw { - struct mlxbf_gige_reg_param st1; - }; - -+struct mlxbf_gige_link_cfg { -+ void (*set_phy_link_mode)(struct phy_device *phydev); -+ void (*adjust_link)(struct net_device *netdev); -+ phy_interface_t phy_mode; -+}; -+ - struct mlxbf_gige { - void __iomem *base; - void __iomem *llu_base; -@@ -121,6 +128,7 @@ struct mlxbf_gige { - struct mlxbf_gige_stats stats; - u8 hw_version; - struct mlxbf_gige_mdio_gw *mdio_gw; -+ int prev_speed; - }; - - /* Rx Work Queue Element definitions */ -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -index a3bd14d5dbff..0af086703bcd 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -@@ -263,13 +263,99 @@ static const struct net_device_ops mlxbf_gige_netdev_ops = { - .ndo_get_stats64 = mlxbf_gige_get_stats64, - }; - --static void mlxbf_gige_adjust_link(struct net_device *netdev) -+static void mlxbf_gige_bf2_adjust_link(struct net_device *netdev) - { - struct phy_device *phydev = netdev->phydev; - - phy_print_status(phydev); - } - -+static void mlxbf_gige_bf3_adjust_link(struct net_device *netdev) -+{ -+ struct mlxbf_gige *priv = netdev_priv(netdev); -+ struct phy_device *phydev = netdev->phydev; -+ u8 sgmii_mode; -+ u16 ipg_size; -+ u32 val; -+ -+ if (phydev->link && phydev->speed != priv->prev_speed) { -+ switch (phydev->speed) { -+ case 1000: -+ ipg_size = MLXBF_GIGE_1G_IPG_SIZE; -+ sgmii_mode = MLXBF_GIGE_1G_SGMII_MODE; -+ break; -+ case 100: -+ ipg_size = MLXBF_GIGE_100M_IPG_SIZE; -+ sgmii_mode = MLXBF_GIGE_100M_SGMII_MODE; -+ break; -+ case 10: -+ ipg_size = MLXBF_GIGE_10M_IPG_SIZE; -+ sgmii_mode = MLXBF_GIGE_10M_SGMII_MODE; -+ break; -+ default: -+ return; -+ } -+ -+ val = readl(priv->plu_base + MLXBF_GIGE_PLU_TX_REG0); -+ val &= ~(MLXBF_GIGE_PLU_TX_IPG_SIZE_MASK | MLXBF_GIGE_PLU_TX_SGMII_MODE_MASK); -+ val |= FIELD_PREP(MLXBF_GIGE_PLU_TX_IPG_SIZE_MASK, ipg_size); -+ val |= FIELD_PREP(MLXBF_GIGE_PLU_TX_SGMII_MODE_MASK, sgmii_mode); -+ writel(val, priv->plu_base + MLXBF_GIGE_PLU_TX_REG0); -+ -+ val = readl(priv->plu_base + MLXBF_GIGE_PLU_RX_REG0); -+ val &= ~MLXBF_GIGE_PLU_RX_SGMII_MODE_MASK; -+ val |= FIELD_PREP(MLXBF_GIGE_PLU_RX_SGMII_MODE_MASK, sgmii_mode); -+ writel(val, priv->plu_base + MLXBF_GIGE_PLU_RX_REG0); -+ -+ priv->prev_speed = phydev->speed; -+ } -+ -+ phy_print_status(phydev); -+} -+ -+static void mlxbf_gige_bf2_set_phy_link_mode(struct phy_device *phydev) -+{ -+ /* MAC only supports 1000T full duplex mode */ -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Full_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); -+ -+ /* Only symmetric pause with flow control enabled is supported so no -+ * need to negotiate pause. -+ */ -+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->advertising); -+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->advertising); -+} -+ -+static void mlxbf_gige_bf3_set_phy_link_mode(struct phy_device *phydev) -+{ -+ /* MAC only supports full duplex mode */ -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); -+ phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); -+ -+ /* Only symmetric pause with flow control enabled is supported so no -+ * need to negotiate pause. -+ */ -+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->advertising); -+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->advertising); -+} -+ -+static struct mlxbf_gige_link_cfg mlxbf_gige_link_cfgs[] = { -+ [MLXBF_GIGE_VERSION_BF2] = { -+ .set_phy_link_mode = mlxbf_gige_bf2_set_phy_link_mode, -+ .adjust_link = mlxbf_gige_bf2_adjust_link, -+ .phy_mode = PHY_INTERFACE_MODE_GMII -+ }, -+ [MLXBF_GIGE_VERSION_BF3] = { -+ .set_phy_link_mode = mlxbf_gige_bf3_set_phy_link_mode, -+ .adjust_link = mlxbf_gige_bf3_adjust_link, -+ .phy_mode = PHY_INTERFACE_MODE_SGMII -+ } -+}; -+ - static int mlxbf_gige_probe(struct platform_device *pdev) - { - struct phy_device *phydev; -@@ -359,25 +445,14 @@ static int mlxbf_gige_probe(struct platform_device *pdev) - phydev->irq = phy_irq; - - err = phy_connect_direct(netdev, phydev, -- mlxbf_gige_adjust_link, -- PHY_INTERFACE_MODE_GMII); -+ mlxbf_gige_link_cfgs[priv->hw_version].adjust_link, -+ mlxbf_gige_link_cfgs[priv->hw_version].phy_mode); - if (err) { - dev_err(&pdev->dev, "Could not attach to PHY\n"); - goto out; - } - -- /* MAC only supports 1000T full duplex mode */ -- phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); -- phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Full_BIT); -- phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); -- phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Full_BIT); -- phy_remove_link_mode(phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); -- -- /* Only symmetric pause with flow control enabled is supported so no -- * need to negotiate pause. -- */ -- linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->advertising); -- linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->advertising); -+ mlxbf_gige_link_cfgs[priv->hw_version].set_phy_link_mode(phydev); - - /* Display information about attached PHY device */ - phy_attached_info(phydev); -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -index 8d52dbef4adf..cd0973229c9b 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h -@@ -8,6 +8,8 @@ - #ifndef __MLXBF_GIGE_REGS_H__ - #define __MLXBF_GIGE_REGS_H__ - -+#include -+ - #define MLXBF_GIGE_VERSION 0x0000 - #define MLXBF_GIGE_VERSION_BF2 0x0 - #define MLXBF_GIGE_VERSION_BF3 0x1 -@@ -78,4 +80,23 @@ - */ - #define MLXBF_GIGE_MMIO_REG_SZ (MLXBF_GIGE_MAC_CFG + 8) - -+#define MLXBF_GIGE_PLU_TX_REG0 0x80 -+#define MLXBF_GIGE_PLU_TX_IPG_SIZE_MASK GENMASK(11, 0) -+#define MLXBF_GIGE_PLU_TX_SGMII_MODE_MASK GENMASK(15, 14) -+ -+#define MLXBF_GIGE_PLU_RX_REG0 0x10 -+#define MLXBF_GIGE_PLU_RX_SGMII_MODE_MASK GENMASK(25, 24) -+ -+#define MLXBF_GIGE_1G_SGMII_MODE 0x0 -+#define MLXBF_GIGE_10M_SGMII_MODE 0x1 -+#define MLXBF_GIGE_100M_SGMII_MODE 0x2 -+ -+/* ipg_size default value for 1G is fixed by HW to 11 + End = 12. -+ * So for 100M it is 12 * 10 - 1 = 119 -+ * For 10M, it is 12 * 100 - 1 = 1199 -+ */ -+#define MLXBF_GIGE_1G_IPG_SIZE 11 -+#define MLXBF_GIGE_100M_IPG_SIZE 119 -+#define MLXBF_GIGE_10M_IPG_SIZE 1199 -+ - #endif /* !defined(__MLXBF_GIGE_REGS_H__) */ --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch b/platform/mellanox/non-upstream-patches/patches/0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch deleted file mode 100644 index e3dc4f7f8d0a..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 58d63cc90771fb493f5cf735a05eb95331041be3 Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Thu, 12 Jan 2023 15:26:08 -0500 -Subject: [PATCH backport 6.1.42 74/85] mlxbf_gige: add "set_link_ksettings" - ethtool callback - -BugLink: https://bugs.launchpad.net/bugs/2012649 - -This patch extends the "ethtool_ops" data structure to -include the "set_link_ksettings" callback. This change -enables configuration of the various interface speeds -that the BlueField-3 supports (10Mbps, 100Mbps, and 1Gbps). - -Signed-off-by: David Thompson -Signed-off-by: Asmaa Mnebhi -Reviewed-by: Andrew Lunn -Signed-off-by: Jakub Kicinski -(cherry picked from commit cedd97737a1f302b3d0493d7054a35e0c5997b99) -Signed-off-by: David Thompson -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -index 4becb39b5664..8c5c81981ce7 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c -@@ -175,4 +175,5 @@ const struct ethtool_ops mlxbf_gige_ethtool_ops = { - .nway_reset = phy_ethtool_nway_reset, - .get_pauseparam = mlxbf_gige_get_pauseparam, - .get_link_ksettings = phy_ethtool_get_link_ksettings, -+ .set_link_ksettings = phy_ethtool_set_link_ksettings, - }; --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch b/platform/mellanox/non-upstream-patches/patches/0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch deleted file mode 100644 index a79977d3c7a6..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 7124b7b040a0cda35c09be51ac40e8e52026ec2d Mon Sep 17 00:00:00 2001 -From: Asmaa Mnebhi -Date: Fri, 2 Jun 2023 13:04:25 -0400 -Subject: [PATCH backport 6.1.42 75/85] UBUNTU: SAUCE: mlxbf-gige: Fix kernel - panic at shutdown - -BugLink: https://bugs.launchpad.net/bugs/2022370 - -We occasionally see a race condition (once every 350 reboots) where napi is still -running (mlxbf_gige_poll) while a shutdown has been initiated through "reboot". -Since mlxbf_gige_poll is still running, it tries to access a NULL pointer and as -a result causes a kernel panic. - -The fix is to explicitly disable napi and dequeue it during shutdown. -mlxbf_gige_remove already calls: -unregister_netdev->unregister_netdevice->unregister_netdev_queue-> -rollback_registered->rollback_registered_many->dev_close_many-> -__dev_close_many->ndo_stop->mlxbf_gige_stop which stops napi - -So use mlxbf_gige_remove in place of the existing shutdown logic. - -Signed-off-by: Asmaa Mnebhi -Acked-by: Bartlomiej Zolnierkiewicz -Acked-by: Tim Gardner -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -index 0af086703bcd..fe35b5a24219 100644 ---- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c -@@ -485,10 +485,7 @@ static int mlxbf_gige_remove(struct platform_device *pdev) - - static void mlxbf_gige_shutdown(struct platform_device *pdev) - { -- struct mlxbf_gige *priv = platform_get_drvdata(pdev); -- -- writeq(0, priv->base + MLXBF_GIGE_INT_EN); -- mlxbf_gige_clean_port(priv); -+ mlxbf_gige_remove(pdev); - } - - static const struct acpi_device_id __maybe_unused mlxbf_gige_acpi_match[] = { --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch b/platform/mellanox/non-upstream-patches/patches/0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch deleted file mode 100644 index d320f09fecea..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch +++ /dev/null @@ -1,1719 +0,0 @@ -From 4651b1520abcc8744493d41e1ebc1dbee3035904 Mon Sep 17 00:00:00 2001 -From: Shravan Kumar Ramani -Date: Wed, 6 Jul 2022 07:37:22 -0400 -Subject: [PATCH backport 6.1.42 76/85] UBUNTU: SAUCE: platform/mellanox: - Updates to mlxbf-bootctl - -BugLink: https://launchpad.net/bugs/1980832 - -The driver supports the VPD fields in the EEPROM and exposes -sysfs files for configuring and reading the same. -Also address buffer overflow and exclusion issues. - -Signed-off-by: Shravan Kumar Ramani -Signed-off-by: Ike Panhc ---- - drivers/platform/mellanox/mlxbf-bootctl.c | 1410 ++++++++++++++++++--- - drivers/platform/mellanox/mlxbf-bootctl.h | 88 +- - 2 files changed, 1268 insertions(+), 230 deletions(-) - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.c b/drivers/platform/mellanox/mlxbf-bootctl.c -index 1c7a288b59a5..2302e1e09c7e 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.c -+++ b/drivers/platform/mellanox/mlxbf-bootctl.c -@@ -1,51 +1,129 @@ --// SPDX-License-Identifier: GPL-2.0+ -+// SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause - /* -- * Mellanox boot control driver -+ * Mellanox boot control driver -+ * This driver provides a sysfs interface for systems management -+ * software to manage reset-time actions. - * -- * This driver provides a sysfs interface for systems management -- * software to manage reset-time actions. -+ * Copyright (C) 2020 Mellanox Technologies. All rights reserved. - * -- * Copyright (C) 2019 Mellanox Technologies -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License v2.0 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. - */ - - #include - #include -+#include -+#include - #include - #include -- - #include "mlxbf-bootctl.h" - --#define MLXBF_BOOTCTL_SB_SECURE_MASK 0x03 --#define MLXBF_BOOTCTL_SB_TEST_MASK 0x0c -+#define DRIVER_NAME "mlxbf-bootctl" -+#define DRIVER_VERSION "1.5" -+#define DRIVER_DESCRIPTION "Mellanox boot control driver" -+ -+#define SB_MODE_SECURE_MASK 0x03 -+#define SB_MODE_TEST_MASK 0x0c -+#define SB_MODE_DEV_MASK 0x10 - --#define MLXBF_SB_KEY_NUM 4 -+#define SB_KEY_NUM 4 -+ -+struct boot_name { -+ int value; -+ const char name[12]; -+}; - --/* UUID used to probe ATF service. */ --static const char *mlxbf_bootctl_svc_uuid_str = -- "89c036b4-e7d7-11e6-8797-001aca00bfc4"; -+static struct boot_name boot_names[] = { -+ { MLNX_BOOT_EXTERNAL, "external" }, -+ { MLNX_BOOT_EMMC, "emmc" }, -+ { MLNX_BOOT_SWAP_EMMC, "swap_emmc" }, -+ { MLNX_BOOT_EMMC_LEGACY, "emmc_legacy" }, -+ { MLNX_BOOT_NONE, "none" }, -+ { -1, "" } -+}; - --struct mlxbf_bootctl_name { -- u32 value; -- const char *name; -+enum { -+ SB_LIFECYCLE_PRODUCTION = 0, -+ SB_LIFECYCLE_GA_SECURE = 1, -+ SB_LIFECYCLE_GA_NON_SECURE = 2, -+ SB_LIFECYCLE_RMA = 3 - }; - --static struct mlxbf_bootctl_name boot_names[] = { -- { MLXBF_BOOTCTL_EXTERNAL, "external" }, -- { MLXBF_BOOTCTL_EMMC, "emmc" }, -- { MLNX_BOOTCTL_SWAP_EMMC, "swap_emmc" }, -- { MLXBF_BOOTCTL_EMMC_LEGACY, "emmc_legacy" }, -- { MLXBF_BOOTCTL_NONE, "none" }, -+static char lifecycle_states[][16] = { -+ [SB_LIFECYCLE_PRODUCTION] = "Production", -+ [SB_LIFECYCLE_GA_SECURE] = "GA Secured", -+ [SB_LIFECYCLE_GA_NON_SECURE] = "GA Non-Secured", -+ [SB_LIFECYCLE_RMA] = "RMA", - }; - --static const char * const mlxbf_bootctl_lifecycle_states[] = { -- [0] = "Production", -- [1] = "GA Secured", -- [2] = "GA Non-Secured", -- [3] = "RMA", -+/* ctl/data register within the resource. */ -+#define RSH_SCRATCH_BUF_CTL_OFF 0 -+#define RSH_SCRATCH_BUF_DATA_OFF 0x10 -+ -+static void __iomem *rsh_boot_data; -+static void __iomem *rsh_boot_cnt; -+static void __iomem *rsh_semaphore; -+static void __iomem *rsh_scratch_buf_ctl; -+static void __iomem *rsh_scratch_buf_data; -+ -+static int rsh_log_clear_on_read; -+module_param(rsh_log_clear_on_read, int, 0644); -+MODULE_PARM_DESC(rsh_log_clear_on_read, "Clear rshim logging buffer after read."); -+ -+/* -+ * Objects are stored within the MFG partition per type. Type 0 is not -+ * supported. -+ */ -+enum { -+ MLNX_MFG_TYPE_OOB_MAC = 1, -+ MLNX_MFG_TYPE_OPN_0, -+ MLNX_MFG_TYPE_OPN_1, -+ MLNX_MFG_TYPE_OPN_2, -+ MLNX_MFG_TYPE_SKU_0, -+ MLNX_MFG_TYPE_SKU_1, -+ MLNX_MFG_TYPE_SKU_2, -+ MLNX_MFG_TYPE_MODL_0, -+ MLNX_MFG_TYPE_MODL_1, -+ MLNX_MFG_TYPE_MODL_2, -+ MLNX_MFG_TYPE_SN_0, -+ MLNX_MFG_TYPE_SN_1, -+ MLNX_MFG_TYPE_SN_2, -+ MLNX_MFG_TYPE_UUID_0, -+ MLNX_MFG_TYPE_UUID_1, -+ MLNX_MFG_TYPE_UUID_2, -+ MLNX_MFG_TYPE_UUID_3, -+ MLNX_MFG_TYPE_UUID_4, -+ MLNX_MFG_TYPE_REV, - }; - --/* ARM SMC call which is atomic and no need for lock. */ --static int mlxbf_bootctl_smc(unsigned int smc_op, int smc_arg) -+/* This mutex is used to serialize MFG write and lock operations. */ -+static DEFINE_MUTEX(mfg_ops_lock); -+ -+#define MLNX_MFG_OOB_MAC_LEN ETH_ALEN -+#define MLNX_MFG_OPN_VAL_LEN 24 -+#define MLNX_MFG_SKU_VAL_LEN 24 -+#define MLNX_MFG_MODL_VAL_LEN 24 -+#define MLNX_MFG_SN_VAL_LEN 24 -+#define MLNX_MFG_UUID_VAL_LEN 40 -+#define MLNX_MFG_REV_VAL_LEN 8 -+#define MLNX_MFG_VAL_QWORD_CNT(type) \ -+ (MLNX_MFG_##type##_VAL_LEN / sizeof(u64)) -+ -+/* -+ * The MAC address consists of 6 bytes (2 digits each) separated by ':'. -+ * The expected format is: "XX:XX:XX:XX:XX:XX" -+ */ -+#define MLNX_MFG_OOB_MAC_FORMAT_LEN \ -+ ((MLNX_MFG_OOB_MAC_LEN * 2) + (MLNX_MFG_OOB_MAC_LEN - 1)) -+ -+/* The SMC calls in question are atomic, so we don't have to lock here. */ -+static int smc_call1(unsigned int smc_op, int smc_arg) - { - struct arm_smccc_res res; - -@@ -54,268 +132,1212 @@ static int mlxbf_bootctl_smc(unsigned int smc_op, int smc_arg) - return res.a0; - } - --/* Return the action in integer or an error code. */ --static int mlxbf_bootctl_reset_action_to_val(const char *action) -+/* Syntactic sugar to avoid having to specify an unused argument. */ -+#define smc_call0(smc_op) smc_call1(smc_op, 0) -+ -+static int reset_action_to_val(const char *action, size_t len) - { -- int i; -+ struct boot_name *bn; -+ -+ /* Accept string either with or without a newline terminator */ -+ if (action[len-1] == '\n') -+ --len; - -- for (i = 0; i < ARRAY_SIZE(boot_names); i++) -- if (sysfs_streq(boot_names[i].name, action)) -- return boot_names[i].value; -+ for (bn = boot_names; bn->value >= 0; ++bn) -+ if (strncmp(bn->name, action, len) == 0) -+ break; - -- return -EINVAL; -+ return bn->value; - } - --/* Return the action in string. */ --static const char *mlxbf_bootctl_action_to_string(int action) -+static const char *reset_action_to_string(int action) - { -- int i; -+ struct boot_name *bn; - -- for (i = 0; i < ARRAY_SIZE(boot_names); i++) -- if (boot_names[i].value == action) -- return boot_names[i].name; -+ for (bn = boot_names; bn->value >= 0; ++bn) -+ if (bn->value == action) -+ break; - -- return "invalid action"; -+ return bn->name; - } - --static ssize_t post_reset_wdog_show(struct device *dev, -- struct device_attribute *attr, char *buf) -+static ssize_t post_reset_wdog_show(struct device_driver *drv, -+ char *buf) - { -- int ret; -+ return snprintf(buf, PAGE_SIZE, "%d\n", -+ smc_call0(MLNX_GET_POST_RESET_WDOG)); -+} - -- ret = mlxbf_bootctl_smc(MLXBF_BOOTCTL_GET_POST_RESET_WDOG, 0); -- if (ret < 0) -- return ret; -+static ssize_t post_reset_wdog_store(struct device_driver *drv, -+ const char *buf, size_t count) -+{ -+ int err; -+ unsigned long watchdog; -+ -+ err = kstrtoul(buf, 10, &watchdog); -+ if (err) -+ return err; -+ -+ if (smc_call1(MLNX_SET_POST_RESET_WDOG, watchdog) < 0) -+ return -EINVAL; - -- return sprintf(buf, "%d\n", ret); -+ return count; - } - --static ssize_t post_reset_wdog_store(struct device *dev, -- struct device_attribute *attr, -- const char *buf, size_t count) -+static ssize_t reset_action_show(struct device_driver *drv, -+ char *buf) - { -- unsigned long value; -- int ret; -+ return snprintf(buf, PAGE_SIZE, "%s\n", reset_action_to_string( -+ smc_call0(MLNX_GET_RESET_ACTION))); -+} - -- ret = kstrtoul(buf, 10, &value); -- if (ret) -- return ret; -+static ssize_t reset_action_store(struct device_driver *drv, -+ const char *buf, size_t count) -+{ -+ int action = reset_action_to_val(buf, count); - -- ret = mlxbf_bootctl_smc(MLXBF_BOOTCTL_SET_POST_RESET_WDOG, value); -- if (ret < 0) -- return ret; -+ if (action < 0 || action == MLNX_BOOT_NONE) -+ return -EINVAL; -+ -+ if (smc_call1(MLNX_SET_RESET_ACTION, action) < 0) -+ return -EINVAL; - - return count; - } - --static ssize_t mlxbf_bootctl_show(int smc_op, char *buf) -+static ssize_t second_reset_action_show(struct device_driver *drv, -+ char *buf) - { -- int action; -+ return snprintf(buf, PAGE_SIZE, "%s\n", reset_action_to_string( -+ smc_call0(MLNX_GET_SECOND_RESET_ACTION))); -+} -+ -+static ssize_t second_reset_action_store(struct device_driver *drv, -+ const char *buf, size_t count) -+{ -+ int action = reset_action_to_val(buf, count); - -- action = mlxbf_bootctl_smc(smc_op, 0); - if (action < 0) -- return action; -+ return -EINVAL; -+ -+ if (smc_call1(MLNX_SET_SECOND_RESET_ACTION, action) < 0) -+ return -EINVAL; - -- return sprintf(buf, "%s\n", mlxbf_bootctl_action_to_string(action)); -+ return count; - } - --static int mlxbf_bootctl_store(int smc_op, const char *buf, size_t count) -+static ssize_t lifecycle_state_show(struct device_driver *drv, -+ char *buf) - { -- int ret, action; -+ int lc_state = smc_call1(MLNX_GET_TBB_FUSE_STATUS, -+ MLNX_FUSE_STATUS_LIFECYCLE); - -- action = mlxbf_bootctl_reset_action_to_val(buf); -- if (action < 0) -- return action; -+ if (lc_state < 0) -+ return -EINVAL; -+ -+ lc_state &= (SB_MODE_TEST_MASK | -+ SB_MODE_SECURE_MASK | -+ SB_MODE_DEV_MASK); - -- ret = mlxbf_bootctl_smc(smc_op, action); -- if (ret < 0) -- return ret; -+ /* -+ * If the test bits are set, we specify that the current state may be -+ * due to using the test bits. -+ */ -+ if ((lc_state & SB_MODE_TEST_MASK) != 0) { -+ -+ lc_state &= SB_MODE_SECURE_MASK; -+ -+ return snprintf(buf, PAGE_SIZE, "%s(test)\n", -+ lifecycle_states[lc_state]); -+ } else if ((lc_state & SB_MODE_SECURE_MASK) == SB_LIFECYCLE_GA_SECURE -+ && (lc_state & SB_MODE_DEV_MASK)) { -+ return snprintf(buf, PAGE_SIZE, "Secured (development)\n"); -+ } -+ -+ return snprintf(buf, PAGE_SIZE, "%s\n", lifecycle_states[lc_state]); -+} -+ -+static ssize_t secure_boot_fuse_state_show(struct device_driver *drv, -+ char *buf) -+{ -+ int key; -+ int buf_len = 0; -+ int upper_key_used = 0; -+ int sb_key_state = smc_call1(MLNX_GET_TBB_FUSE_STATUS, -+ MLNX_FUSE_STATUS_KEYS); -+ -+ if (sb_key_state < 0) -+ return -EINVAL; -+ -+ for (key = SB_KEY_NUM - 1; key >= 0; key--) { -+ int burnt = ((sb_key_state & (1 << key)) != 0); -+ int valid = ((sb_key_state & (1 << (key + SB_KEY_NUM))) != 0); -+ -+ buf_len += sprintf(buf + buf_len, "Ver%d:", key); -+ if (upper_key_used) { -+ if (burnt) { -+ if (valid) -+ buf_len += sprintf(buf + buf_len, -+ "Used"); -+ else -+ buf_len += sprintf(buf + buf_len, -+ "Wasted"); -+ } else { -+ if (valid) -+ buf_len += sprintf(buf + buf_len, -+ "Invalid"); -+ else -+ buf_len += sprintf(buf + buf_len, -+ "Skipped"); -+ } -+ } else { -+ if (burnt) { -+ if (valid) { -+ upper_key_used = 1; -+ buf_len += sprintf(buf + buf_len, -+ "In use"); -+ } else -+ buf_len += sprintf(buf + buf_len, -+ "Burn incomplete"); -+ } else { -+ if (valid) -+ buf_len += sprintf(buf + buf_len, -+ "Invalid"); -+ else -+ buf_len += sprintf(buf + buf_len, -+ "Free"); -+ } -+ } -+ buf_len += sprintf(buf + buf_len, "\n"); -+ } -+ -+ return buf_len; -+} -+ -+static ssize_t fw_reset_store(struct device_driver *drv, -+ const char *buf, size_t count) -+{ -+ int err; -+ unsigned long key; -+ -+ err = kstrtoul(buf, 16, &key); -+ if (err) -+ return err; -+ -+ if (smc_call1(MLNX_HANDLE_FW_RESET, key) < 0) -+ return -EINVAL; - - return count; - } - --static ssize_t reset_action_show(struct device *dev, -- struct device_attribute *attr, char *buf) -+static ssize_t oob_mac_show(struct device_driver *drv, char *buf) - { -- return mlxbf_bootctl_show(MLXBF_BOOTCTL_GET_RESET_ACTION, buf); -+ char mac_str[MLNX_MFG_OOB_MAC_FORMAT_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ u8 *mac_byte_ptr; -+ -+ mutex_lock(&mfg_ops_lock); -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, MLNX_MFG_TYPE_OOB_MAC, 0, 0, 0, -+ 0, 0, 0, &res); -+ mutex_unlock(&mfg_ops_lock); -+ if (res.a0) -+ return -EPERM; -+ -+ mac_byte_ptr = (u8 *)&res.a1; -+ -+ sprintf(mac_str, "%02X:%02X:%02X:%02X:%02X:%02X", -+ mac_byte_ptr[0], mac_byte_ptr[1], mac_byte_ptr[2], -+ mac_byte_ptr[3], mac_byte_ptr[4], mac_byte_ptr[5]); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", mac_str); - } - --static ssize_t reset_action_store(struct device *dev, -- struct device_attribute *attr, -- const char *buf, size_t count) -+static ssize_t oob_mac_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ int byte[MLNX_MFG_OOB_MAC_FORMAT_LEN] = { 0 }; -+ struct arm_smccc_res res; -+ u64 mac_addr = 0; -+ u8 *mac_byte_ptr; -+ int byte_idx, len; -+ -+ if ((count - 1) != MLNX_MFG_OOB_MAC_FORMAT_LEN) -+ return -EINVAL; -+ -+ len = sscanf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", -+ &byte[0], &byte[1], &byte[2], -+ &byte[3], &byte[4], &byte[5]); -+ if (len != MLNX_MFG_OOB_MAC_LEN) -+ return -EINVAL; -+ -+ mac_byte_ptr = (u8 *)&mac_addr; -+ -+ for (byte_idx = 0; byte_idx < MLNX_MFG_OOB_MAC_LEN; byte_idx++) -+ mac_byte_ptr[byte_idx] = (u8) byte[byte_idx]; -+ -+ mutex_lock(&mfg_ops_lock); -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, MLNX_MFG_TYPE_OOB_MAC, -+ MLNX_MFG_OOB_MAC_LEN, mac_addr, 0, 0, 0, 0, &res); -+ mutex_unlock(&mfg_ops_lock); -+ -+ return res.a0 ? -EPERM : count; -+} -+ -+static ssize_t opn_show(struct device_driver *drv, char *buf) - { -- return mlxbf_bootctl_store(MLXBF_BOOTCTL_SET_RESET_ACTION, buf, count); -+ u64 opn_data[MLNX_MFG_VAL_QWORD_CNT(OPN)] = { 0 }; -+ char opn[MLNX_MFG_OPN_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(OPN); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_OPN_0 + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ opn_data[word] = res.a1; -+ } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(opn, opn_data, MLNX_MFG_OPN_VAL_LEN); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", opn); - } - --static ssize_t second_reset_action_show(struct device *dev, -- struct device_attribute *attr, -- char *buf) -+static ssize_t opn_store(struct device_driver *drv, const char *buf, -+ size_t count) - { -- return mlxbf_bootctl_show(MLXBF_BOOTCTL_GET_SECOND_RESET_ACTION, buf); -+ u64 opn[MLNX_MFG_VAL_QWORD_CNT(OPN)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ if (count > MLNX_MFG_OPN_VAL_LEN) -+ return -EINVAL; -+ -+ memcpy(opn, buf, count); -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(OPN); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_OPN_0 + word, -+ sizeof(u64), opn[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; - } - --static ssize_t second_reset_action_store(struct device *dev, -- struct device_attribute *attr, -- const char *buf, size_t count) -+static ssize_t sku_show(struct device_driver *drv, char *buf) - { -- return mlxbf_bootctl_store(MLXBF_BOOTCTL_SET_SECOND_RESET_ACTION, buf, -- count); -+ u64 sku_data[MLNX_MFG_VAL_QWORD_CNT(SKU)] = { 0 }; -+ char sku[MLNX_MFG_SKU_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(SKU); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_SKU_0 + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ sku_data[word] = res.a1; -+ } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(sku, sku_data, MLNX_MFG_SKU_VAL_LEN); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", sku); - } - --static ssize_t lifecycle_state_show(struct device *dev, -- struct device_attribute *attr, char *buf) -+static ssize_t sku_store(struct device_driver *drv, const char *buf, -+ size_t count) - { -- int lc_state; -+ u64 sku[MLNX_MFG_VAL_QWORD_CNT(SKU)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; - -- lc_state = mlxbf_bootctl_smc(MLXBF_BOOTCTL_GET_TBB_FUSE_STATUS, -- MLXBF_BOOTCTL_FUSE_STATUS_LIFECYCLE); -- if (lc_state < 0) -- return lc_state; -+ if (count > MLNX_MFG_SKU_VAL_LEN) -+ return -EINVAL; - -- lc_state &= -- MLXBF_BOOTCTL_SB_TEST_MASK | MLXBF_BOOTCTL_SB_SECURE_MASK; -+ memcpy(sku, buf, count); - -- /* -- * If the test bits are set, we specify that the current state may be -- * due to using the test bits. -- */ -- if (lc_state & MLXBF_BOOTCTL_SB_TEST_MASK) { -- lc_state &= MLXBF_BOOTCTL_SB_SECURE_MASK; -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(SKU); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_SKU_0 + word, -+ sizeof(u64), sku[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); - -- return sprintf(buf, "%s(test)\n", -- mlxbf_bootctl_lifecycle_states[lc_state]); -+ return count; -+} -+ -+static ssize_t modl_show(struct device_driver *drv, char *buf) -+{ -+ u64 modl_data[MLNX_MFG_VAL_QWORD_CNT(MODL)] = { 0 }; -+ char modl[MLNX_MFG_MODL_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(MODL); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_MODL_0 + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ modl_data[word] = res.a1; - } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(modl, modl_data, MLNX_MFG_MODL_VAL_LEN); - -- return sprintf(buf, "%s\n", mlxbf_bootctl_lifecycle_states[lc_state]); -+ return snprintf(buf, PAGE_SIZE, "%s", modl); - } - --static ssize_t secure_boot_fuse_state_show(struct device *dev, -- struct device_attribute *attr, -- char *buf) -+static ssize_t modl_store(struct device_driver *drv, const char *buf, -+ size_t count) - { -- int burnt, valid, key, key_state, buf_len = 0, upper_key_used = 0; -- const char *status; -+ u64 modl[MLNX_MFG_VAL_QWORD_CNT(MODL)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ if (count > MLNX_MFG_MODL_VAL_LEN) -+ return -EINVAL; -+ -+ memcpy(modl, buf, count); -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(MODL); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_MODL_0 + word, -+ sizeof(u64), modl[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; -+} -+ -+static ssize_t sn_show(struct device_driver *drv, char *buf) -+{ -+ u64 sn_data[MLNX_MFG_VAL_QWORD_CNT(SN)] = { 0 }; -+ char sn[MLNX_MFG_SN_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(SN); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_SN_0 + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ sn_data[word] = res.a1; -+ } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(sn, sn_data, MLNX_MFG_SN_VAL_LEN); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", sn); -+} -+ -+static ssize_t sn_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ u64 sn[MLNX_MFG_VAL_QWORD_CNT(SN)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ if (count > MLNX_MFG_SN_VAL_LEN) -+ return -EINVAL; -+ -+ memcpy(sn, buf, count); -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(SN); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_SN_0 + word, -+ sizeof(u64), sn[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; -+} -+ -+static ssize_t uuid_show(struct device_driver *drv, char *buf) -+{ -+ u64 uuid_data[MLNX_MFG_VAL_QWORD_CNT(UUID)] = { 0 }; -+ char uuid[MLNX_MFG_UUID_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(UUID); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_UUID_0 + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ uuid_data[word] = res.a1; -+ } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(uuid, uuid_data, MLNX_MFG_UUID_VAL_LEN); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", uuid); -+} -+ -+static ssize_t uuid_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ u64 uuid[MLNX_MFG_VAL_QWORD_CNT(UUID)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; - -- key_state = mlxbf_bootctl_smc(MLXBF_BOOTCTL_GET_TBB_FUSE_STATUS, -- MLXBF_BOOTCTL_FUSE_STATUS_KEYS); -- if (key_state < 0) -- return key_state; -+ if (count > MLNX_MFG_UUID_VAL_LEN) -+ return -EINVAL; -+ -+ memcpy(uuid, buf, count); -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(UUID); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_UUID_0 + word, -+ sizeof(u64), uuid[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; -+} -+ -+static ssize_t rev_show(struct device_driver *drv, char *buf) -+{ -+ u64 rev_data[MLNX_MFG_VAL_QWORD_CNT(REV)] = { 0 }; -+ char rev[MLNX_MFG_REV_VAL_LEN + 1] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(REV); word++) { -+ arm_smccc_smc(MLNX_HANDLE_GET_MFG_INFO, -+ MLNX_MFG_TYPE_REV + word, -+ 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ rev_data[word] = res.a1; -+ } -+ mutex_unlock(&mfg_ops_lock); -+ memcpy(rev, rev_data, MLNX_MFG_REV_VAL_LEN); -+ -+ return snprintf(buf, PAGE_SIZE, "%s", rev); -+} -+ -+static ssize_t rev_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ u64 rev[MLNX_MFG_VAL_QWORD_CNT(REV)] = { 0 }; -+ struct arm_smccc_res res; -+ int word; -+ -+ if (count > MLNX_MFG_REV_VAL_LEN) -+ return -EINVAL; -+ -+ memcpy(rev, buf, count); -+ -+ mutex_lock(&mfg_ops_lock); -+ for (word = 0; word < MLNX_MFG_VAL_QWORD_CNT(REV); word++) { -+ arm_smccc_smc(MLNX_HANDLE_SET_MFG_INFO, -+ MLNX_MFG_TYPE_REV + word, -+ sizeof(u64), rev[word], 0, 0, 0, 0, &res); -+ if (res.a0) { -+ mutex_unlock(&mfg_ops_lock); -+ return -EPERM; -+ } -+ } -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; -+} -+ -+static ssize_t mfg_lock_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ unsigned long val; -+ int err; -+ -+ err = kstrtoul(buf, 10, &val); -+ if (err) -+ return err; -+ -+ if (val != 1) -+ return -EINVAL; -+ -+ mutex_lock(&mfg_ops_lock); -+ smc_call0(MLNX_HANDLE_LOCK_MFG_INFO); -+ mutex_unlock(&mfg_ops_lock); -+ -+ return count; -+} -+ -+/* Log header format. */ -+#define RSH_LOG_TYPE_SHIFT 56 -+#define RSH_LOG_LEN_SHIFT 48 -+#define RSH_LOG_LEVEL_SHIFT 0 -+ -+/* Module ID and type used here. */ -+#define BF_RSH_LOG_TYPE_UNKNOWN 0x00ULL -+#define BF_RSH_LOG_TYPE_PANIC 0x01ULL -+#define BF_RSH_LOG_TYPE_EXCEPTION 0x02ULL -+#define BF_RSH_LOG_TYPE_UNUSED 0x03ULL -+#define BF_RSH_LOG_TYPE_MSG 0x04ULL -+ -+/* Utility macro. */ -+#define BF_RSH_LOG_MOD_MASK 0x0FULL -+#define BF_RSH_LOG_MOD_SHIFT 60 -+#define BF_RSH_LOG_TYPE_MASK 0x0FULL -+#define BF_RSH_LOG_TYPE_SHIFT 56 -+#define BF_RSH_LOG_LEN_MASK 0x7FULL -+#define BF_RSH_LOG_LEN_SHIFT 48 -+#define BF_RSH_LOG_ARG_MASK 0xFFFFFFFFULL -+#define BF_RSH_LOG_ARG_SHIFT 16 -+#define BF_RSH_LOG_HAS_ARG_MASK 0xFFULL -+#define BF_RSH_LOG_HAS_ARG_SHIFT 8 -+#define BF_RSH_LOG_LEVEL_MASK 0xFFULL -+#define BF_RSH_LOG_LEVEL_SHIFT 0 -+#define BF_RSH_LOG_PC_MASK 0xFFFFFFFFULL -+#define BF_RSH_LOG_PC_SHIFT 0 -+#define BF_RSH_LOG_SYNDROME_MASK 0xFFFFFFFFULL -+#define BF_RSH_LOG_SYNDROME_SHIFT 0 -+ -+#define BF_RSH_LOG_HEADER_GET(f, h) \ -+ (((h) >> BF_RSH_LOG_##f##_SHIFT) & BF_RSH_LOG_##f##_MASK) -+ -+/* Log message level. */ -+enum { -+ RSH_LOG_INFO, -+ RSH_LOG_WARN, -+ RSH_LOG_ERR -+}; -+ -+/* Log module */ -+const char * const rsh_log_mod[] = { -+ "MISC", "BL1", "BL2", "BL2R", "BL31", "UEFI" -+}; -+ -+const char *rsh_log_level[] = {"INFO", "WARN", "ERR", "ASSERT"}; -+ -+#define AARCH64_MRS_REG_SHIFT 5 -+#define AARCH64_MRS_REG_MASK 0xffff -+#define AARCH64_ESR_ELX_EXCEPTION_CLASS_SHIFT 26 -+ -+struct rsh_log_reg { -+ char *name; -+ u32 opcode; -+} rsh_log_reg; -+ -+static struct rsh_log_reg rsh_log_regs[] = { -+ {"actlr_el1", 0b1100000010000001}, -+ {"actlr_el2", 0b1110000010000001}, -+ {"actlr_el3", 0b1111000010000001}, -+ {"afsr0_el1", 0b1100001010001000}, -+ {"afsr0_el2", 0b1110001010001000}, -+ {"afsr0_el3", 0b1111001010001000}, -+ {"afsr1_el1", 0b1100001010001001}, -+ {"afsr1_el2", 0b1110001010001001}, -+ {"afsr1_el3", 0b1111001010001001}, -+ {"amair_el1", 0b1100010100011000}, -+ {"amair_el2", 0b1110010100011000}, -+ {"amair_el3", 0b1111010100011000}, -+ {"ccsidr_el1", 0b1100100000000000}, -+ {"clidr_el1", 0b1100100000000001}, -+ {"cntkctl_el1", 0b1100011100001000}, -+ {"cntp_ctl_el0", 0b1101111100010001}, -+ {"cntp_cval_el0", 0b1101111100010010}, -+ {"cntv_ctl_el0", 0b1101111100011001}, -+ {"cntv_cval_el0", 0b1101111100011010}, -+ {"contextidr_el1", 0b1100011010000001}, -+ {"cpacr_el1", 0b1100000010000010}, -+ {"cptr_el2", 0b1110000010001010}, -+ {"cptr_el3", 0b1111000010001010}, -+ {"vtcr_el2", 0b1110000100001010}, -+ {"ctr_el0", 0b1101100000000001}, -+ {"currentel", 0b1100001000010010}, -+ {"dacr32_el2", 0b1110000110000000}, -+ {"daif", 0b1101101000010001}, -+ {"dczid_el0", 0b1101100000000111}, -+ {"dlr_el0", 0b1101101000101001}, -+ {"dspsr_el0", 0b1101101000101000}, -+ {"elr_el1", 0b1100001000000001}, -+ {"elr_el2", 0b1110001000000001}, -+ {"elr_el3", 0b1111001000000001}, -+ {"esr_el1", 0b1100001010010000}, -+ {"esr_el2", 0b1110001010010000}, -+ {"esr_el3", 0b1111001010010000}, -+ {"esselr_el1", 0b1101000000000000}, -+ {"far_el1", 0b1100001100000000}, -+ {"far_el2", 0b1110001100000000}, -+ {"far_el3", 0b1111001100000000}, -+ {"fpcr", 0b1101101000100000}, -+ {"fpexc32_el2", 0b1110001010011000}, -+ {"fpsr", 0b1101101000100001}, -+ {"hacr_el2", 0b1110000010001111}, -+ {"har_el2", 0b1110000010001000}, -+ {"hpfar_el2", 0b1110001100000100}, -+ {"hstr_el2", 0b1110000010001011}, -+ {"far_el1", 0b1100001100000000}, -+ {"far_el2", 0b1110001100000000}, -+ {"far_el3", 0b1111001100000000}, -+ {"hcr_el2", 0b1110000010001000}, -+ {"hpfar_el2", 0b1110001100000100}, -+ {"id_aa64afr0_el1", 0b1100000000101100}, -+ {"id_aa64afr1_el1", 0b1100000000101101}, -+ {"id_aa64dfr0_el1", 0b1100000000101100}, -+ {"id_aa64isar0_el1", 0b1100000000110000}, -+ {"id_aa64isar1_el1", 0b1100000000110001}, -+ {"id_aa64mmfr0_el1", 0b1100000000111000}, -+ {"id_aa64mmfr1_el1", 0b1100000000111001}, -+ {"id_aa64pfr0_el1", 0b1100000000100000}, -+ {"id_aa64pfr1_el1", 0b1100000000100001}, -+ {"ifsr32_el2", 0b1110001010000001}, -+ {"isr_el1", 0b1100011000001000}, -+ {"mair_el1", 0b1100010100010000}, -+ {"mair_el2", 0b1110010100010000}, -+ {"mair_el3", 0b1111010100010000}, -+ {"midr_el1", 0b1100000000000000}, -+ {"mpidr_el1", 0b1100000000000101}, -+ {"nzcv", 0b1101101000010000}, -+ {"revidr_el1", 0b1100000000000110}, -+ {"rmr_el3", 0b1111011000000010}, -+ {"par_el1", 0b1100001110100000}, -+ {"rvbar_el3", 0b1111011000000001}, -+ {"scr_el3", 0b1111000010001000}, -+ {"sctlr_el1", 0b1100000010000000}, -+ {"sctlr_el2", 0b1110000010000000}, -+ {"sctlr_el3", 0b1111000010000000}, -+ {"sp_el0", 0b1100001000001000}, -+ {"sp_el1", 0b1110001000001000}, -+ {"spsel", 0b1100001000010000}, -+ {"spsr_abt", 0b1110001000011001}, -+ {"spsr_el1", 0b1100001000000000}, -+ {"spsr_el2", 0b1110001000000000}, -+ {"spsr_el3", 0b1111001000000000}, -+ {"spsr_fiq", 0b1110001000011011}, -+ {"spsr_irq", 0b1110001000011000}, -+ {"spsr_und", 0b1110001000011010}, -+ {"tcr_el1", 0b1100000100000010}, -+ {"tcr_el2", 0b1110000100000010}, -+ {"tcr_el3", 0b1111000100000010}, -+ {"tpidr_el0", 0b1101111010000010}, -+ {"tpidr_el1", 0b1100011010000100}, -+ {"tpidr_el2", 0b1110011010000010}, -+ {"tpidr_el3", 0b1111011010000010}, -+ {"tpidpro_el0", 0b1101111010000011}, -+ {"vbar_el1", 0b1100011000000000}, -+ {"vbar_el2", 0b1110011000000000}, -+ {"vbar_el3", 0b1111011000000000}, -+ {"vmpidr_el2", 0b1110000000000101}, -+ {"vpidr_el2", 0b1110000000000000}, -+ {"ttbr0_el1", 0b1100000100000000}, -+ {"ttbr0_el2", 0b1110000100000000}, -+ {"ttbr0_el3", 0b1111000100000000}, -+ {"ttbr1_el1", 0b1100000100000001}, -+ {"vtcr_el2", 0b1110000100001010}, -+ {"vttbr_el2", 0b1110000100001000}, -+ {NULL, 0b0000000000000000}, -+}; -+ -+/* Size(8-byte words) of the log buffer. */ -+#define RSH_SCRATCH_BUF_CTL_IDX_MASK 0x7f -+ -+static int rsh_log_sem_lock(void) -+{ -+ unsigned long timeout; -+ -+ /* Take the semaphore. */ -+ timeout = jiffies + msecs_to_jiffies(100); -+ while (readq(rsh_semaphore)) { -+ if (time_after(jiffies, timeout)) -+ return -ETIMEDOUT; -+ } -+ -+ return 0; -+} -+ -+static void rsh_log_sem_unlock(void) -+{ -+ writeq(0, rsh_semaphore); -+} -+ -+static ssize_t rsh_log_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ int idx, num, len, size = (int)count, level = RSH_LOG_INFO, rc; -+ u64 data; -+ -+ if (!size) -+ return -EINVAL; -+ -+ if (!rsh_semaphore || !rsh_scratch_buf_ctl) -+ return -EOPNOTSUPP; -+ -+ /* Ignore line break at the end. */ -+ if (buf[size-1] == 0xa) -+ size--; -+ -+ /* Check the message prefix. */ -+ for (idx = 0; idx < ARRAY_SIZE(rsh_log_level); idx++) { -+ len = strlen(rsh_log_level[idx]); -+ if (len + 1 < size && !strncmp(buf, rsh_log_level[idx], len)) { -+ buf += len + 1; -+ size -= len + 1; -+ level = idx; -+ break; -+ } -+ } -+ -+ /* Ignore leading spaces. */ -+ while (size > 0 && buf[0] == ' ') { -+ size--; -+ buf++; -+ } -+ -+ /* Take the semaphore. */ -+ rc = rsh_log_sem_lock(); -+ if (rc) -+ return rc; -+ -+ /* Calculate how many words are available. */ -+ num = (size + sizeof(u64) - 1) / sizeof(u64); -+ idx = readq(rsh_scratch_buf_ctl); -+ if (idx + num + 1 >= RSH_SCRATCH_BUF_CTL_IDX_MASK) -+ num = RSH_SCRATCH_BUF_CTL_IDX_MASK - idx - 1; -+ if (num <= 0) -+ goto done; -+ -+ /* Write Header. */ -+ data = (BF_RSH_LOG_TYPE_MSG << RSH_LOG_TYPE_SHIFT) | -+ ((u64)num << RSH_LOG_LEN_SHIFT) | -+ ((u64)level << RSH_LOG_LEVEL_SHIFT); -+ writeq(data, rsh_scratch_buf_data); -+ -+ /* Write message. */ -+ for (idx = 0, len = size; idx < num && len > 0; idx++) { -+ if (len <= sizeof(u64)) { -+ data = 0; -+ memcpy(&data, buf, len); -+ len = 0; -+ } else { -+ memcpy(&data, buf, sizeof(u64)); -+ len -= sizeof(u64); -+ buf += sizeof(u64); -+ } -+ writeq(data, rsh_scratch_buf_data); -+ } -+ -+done: -+ /* Release the semaphore. */ -+ rsh_log_sem_unlock(); -+ -+ /* Ignore the rest if no more space. */ -+ return count; -+} -+ -+static char *rsh_log_get_reg_name(u64 opcode) -+{ -+ struct rsh_log_reg *reg = rsh_log_regs; -+ -+ while (reg->name) { -+ if (reg->opcode == opcode) -+ return reg->name; -+ reg++; -+ } -+ -+ return "unknown"; -+} -+ -+static int rsh_log_show_crash(u64 hdr, char *buf, int size) -+{ -+ int i, module, type, len, n = 0; -+ u32 pc, syndrome, ec; -+ u64 opcode, data; -+ char *p = buf; -+ -+ module = BF_RSH_LOG_HEADER_GET(MOD, hdr); -+ if (module >= ARRAY_SIZE(rsh_log_mod)) -+ module = 0; -+ type = BF_RSH_LOG_HEADER_GET(TYPE, hdr); -+ len = BF_RSH_LOG_HEADER_GET(LEN, hdr); -+ -+ if (type == BF_RSH_LOG_TYPE_EXCEPTION) { -+ syndrome = BF_RSH_LOG_HEADER_GET(SYNDROME, hdr); -+ ec = syndrome >> AARCH64_ESR_ELX_EXCEPTION_CLASS_SHIFT; -+ n = snprintf(p, size, " Exception(%s): syndrome = 0x%x%s\n", -+ rsh_log_mod[module], syndrome, -+ (ec == 0x24 || ec == 0x25) ? "(Data Abort)" : -+ (ec == 0x2f) ? "(SError)" : ""); -+ } else if (type == BF_RSH_LOG_TYPE_PANIC) { -+ pc = BF_RSH_LOG_HEADER_GET(PC, hdr); -+ n = snprintf(p, size, -+ " PANIC(%s): PC = 0x%x\n", rsh_log_mod[module], -+ pc); -+ } -+ if (n > 0) { -+ p += n; -+ size -= n; -+ } - - /* -- * key_state contains the bits for 4 Key versions, loaded from eFuses -- * after a hard reset. Lower 4 bits are a thermometer code indicating -- * key programming has started for key n (0000 = none, 0001 = version 0, -- * 0011 = version 1, 0111 = version 2, 1111 = version 3). Upper 4 bits -- * are a thermometer code indicating key programming has completed for -- * key n (same encodings as the start bits). This allows for detection -- * of an interruption in the programming process which has left the key -- * partially programmed (and thus invalid). The process is to burn the -- * eFuse for the new key start bit, burn the key eFuses, then burn the -- * eFuse for the new key complete bit. -- * -- * For example 0000_0000: no key valid, 0001_0001: key version 0 valid, -- * 0011_0011: key 1 version valid, 0011_0111: key version 2 started -- * programming but did not complete, etc. The most recent key for which -- * both start and complete bit is set is loaded. On soft reset, this -- * register is not modified. -+ * Read the registers in a loop. 'len' is the total number of words in -+ * 8-bytes. Two words are read in each loop. - */ -- for (key = MLXBF_SB_KEY_NUM - 1; key >= 0; key--) { -- burnt = key_state & BIT(key); -- valid = key_state & BIT(key + MLXBF_SB_KEY_NUM); -+ for (i = 0; i < len/2; i++) { -+ opcode = readq(rsh_scratch_buf_data); -+ data = readq(rsh_scratch_buf_data); -+ -+ opcode = (opcode >> AARCH64_MRS_REG_SHIFT) & -+ AARCH64_MRS_REG_MASK; -+ n = snprintf(p, size, -+ " %-16s0x%llx\n", rsh_log_get_reg_name(opcode), -+ (unsigned long long)data); -+ if (n > 0) { -+ p += n; -+ size -= n; -+ } -+ } - -- if (burnt && valid) -- upper_key_used = 1; -+ return p - buf; -+} - -- if (upper_key_used) { -- if (burnt) -- status = valid ? "Used" : "Wasted"; -- else -- status = valid ? "Invalid" : "Skipped"; -- } else { -- if (burnt) -- status = valid ? "InUse" : "Incomplete"; -- else -- status = valid ? "Invalid" : "Free"; -+static int rsh_log_format_msg(char *buf, int size, const char *msg, ...) -+{ -+ va_list args; -+ int len; -+ -+ va_start(args, msg); -+ len = vsnprintf(buf, size, msg, args); -+ va_end(args); -+ -+ return len; -+} -+ -+static int rsh_log_show_msg(u64 hdr, char *buf, int size) -+{ -+ int has_arg = BF_RSH_LOG_HEADER_GET(HAS_ARG, hdr); -+ int level = BF_RSH_LOG_HEADER_GET(LEVEL, hdr); -+ int module = BF_RSH_LOG_HEADER_GET(MOD, hdr); -+ int len = BF_RSH_LOG_HEADER_GET(LEN, hdr); -+ u32 arg = BF_RSH_LOG_HEADER_GET(ARG, hdr); -+ char *msg, *p; -+ u64 data; -+ -+ if (len <= 0) -+ return -EINVAL; -+ -+ if (module >= ARRAY_SIZE(rsh_log_mod)) -+ module = 0; -+ -+ if (level >= ARRAY_SIZE(rsh_log_level)) -+ level = 0; -+ -+ msg = kmalloc(len * sizeof(u64) + 1, GFP_KERNEL); -+ if (!msg) -+ return 0; -+ p = msg; -+ -+ while (len--) { -+ data = readq(rsh_scratch_buf_data); -+ memcpy(p, &data, sizeof(data)); -+ p += sizeof(data); -+ } -+ *p = '\0'; -+ if (!has_arg) { -+ len = snprintf(buf, size, " %s[%s]: %s\n", rsh_log_level[level], -+ rsh_log_mod[module], msg); -+ } else { -+ len = snprintf(buf, size, " %s[%s]: ", rsh_log_level[level], -+ rsh_log_mod[module]); -+ len += rsh_log_format_msg(buf + len, size - len, msg, arg); -+ len += snprintf(buf + len, size - len, "\n"); -+ } -+ -+ kfree(msg); -+ return len; -+} -+ -+static ssize_t rsh_log_show(struct device_driver *drv, char *buf) -+{ -+ u64 hdr; -+ char *p = buf; -+ int i, n, rc, idx, type, len, size = PAGE_SIZE; -+ -+ if (!rsh_semaphore || !rsh_scratch_buf_ctl) -+ return -EOPNOTSUPP; -+ -+ /* Take the semaphore. */ -+ rc = rsh_log_sem_lock(); -+ if (rc) -+ return rc; -+ -+ /* Save the current index and read from 0. */ -+ idx = readq(rsh_scratch_buf_ctl) & RSH_SCRATCH_BUF_CTL_IDX_MASK; -+ if (!idx) -+ goto done; -+ writeq(0, rsh_scratch_buf_ctl); -+ -+ i = 0; -+ while (i < idx) { -+ hdr = readq(rsh_scratch_buf_data); -+ type = BF_RSH_LOG_HEADER_GET(TYPE, hdr); -+ len = BF_RSH_LOG_HEADER_GET(LEN, hdr); -+ i += 1 + len; -+ if (i > idx) -+ break; -+ -+ switch (type) { -+ case BF_RSH_LOG_TYPE_PANIC: -+ case BF_RSH_LOG_TYPE_EXCEPTION: -+ n = rsh_log_show_crash(hdr, p, size); -+ p += n; -+ size -= n; -+ break; -+ case BF_RSH_LOG_TYPE_MSG: -+ n = rsh_log_show_msg(hdr, p, size); -+ p += n; -+ size -= n; -+ break; -+ default: -+ /* Drain this message. */ -+ while (len--) -+ (void) readq(rsh_scratch_buf_data); -+ break; - } -- buf_len += sprintf(buf + buf_len, "%d:%s ", key, status); - } -- buf_len += sprintf(buf + buf_len, "\n"); - -- return buf_len; -+ if (rsh_log_clear_on_read) -+ writeq(0, rsh_scratch_buf_ctl); -+ else -+ writeq(idx, rsh_scratch_buf_ctl); -+ -+done: -+ /* Release the semaphore. */ -+ rsh_log_sem_unlock(); -+ -+ return p - buf; - } - --static DEVICE_ATTR_RW(post_reset_wdog); --static DEVICE_ATTR_RW(reset_action); --static DEVICE_ATTR_RW(second_reset_action); --static DEVICE_ATTR_RO(lifecycle_state); --static DEVICE_ATTR_RO(secure_boot_fuse_state); -+static DRIVER_ATTR_RW(post_reset_wdog); -+static DRIVER_ATTR_RW(reset_action); -+static DRIVER_ATTR_RW(second_reset_action); -+static DRIVER_ATTR_RO(lifecycle_state); -+static DRIVER_ATTR_RO(secure_boot_fuse_state); -+static DRIVER_ATTR_WO(fw_reset); -+static DRIVER_ATTR_RW(oob_mac); -+static DRIVER_ATTR_RW(opn); -+static DRIVER_ATTR_RW(sku); -+static DRIVER_ATTR_RW(modl); -+static DRIVER_ATTR_RW(sn); -+static DRIVER_ATTR_RW(uuid); -+static DRIVER_ATTR_RW(rev); -+static DRIVER_ATTR_WO(mfg_lock); -+static DRIVER_ATTR_RW(rsh_log); - --static struct attribute *mlxbf_bootctl_attrs[] = { -- &dev_attr_post_reset_wdog.attr, -- &dev_attr_reset_action.attr, -- &dev_attr_second_reset_action.attr, -- &dev_attr_lifecycle_state.attr, -- &dev_attr_secure_boot_fuse_state.attr, -+static struct attribute *mbc_dev_attrs[] = { -+ &driver_attr_post_reset_wdog.attr, -+ &driver_attr_reset_action.attr, -+ &driver_attr_second_reset_action.attr, -+ &driver_attr_lifecycle_state.attr, -+ &driver_attr_secure_boot_fuse_state.attr, -+ &driver_attr_fw_reset.attr, -+ &driver_attr_oob_mac.attr, -+ &driver_attr_opn.attr, -+ &driver_attr_sku.attr, -+ &driver_attr_modl.attr, -+ &driver_attr_sn.attr, -+ &driver_attr_uuid.attr, -+ &driver_attr_rev.attr, -+ &driver_attr_mfg_lock.attr, -+ &driver_attr_rsh_log.attr, - NULL - }; - --ATTRIBUTE_GROUPS(mlxbf_bootctl); -+static struct attribute_group mbc_attr_group = { -+ .attrs = mbc_dev_attrs -+}; - --static const struct acpi_device_id mlxbf_bootctl_acpi_ids[] = { -+static const struct attribute_group *mbc_attr_groups[] = { -+ &mbc_attr_group, -+ NULL -+}; -+ -+static const struct of_device_id mbc_dt_ids[] = { -+ {.compatible = "mellanox,bootctl"}, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, mbc_dt_ids); -+ -+static const struct acpi_device_id mbc_acpi_ids[] = { - {"MLNXBF04", 0}, -- {} -+ {}, - }; - --MODULE_DEVICE_TABLE(acpi, mlxbf_bootctl_acpi_ids); -+MODULE_DEVICE_TABLE(acpi, mbc_acpi_ids); - --static bool mlxbf_bootctl_guid_match(const guid_t *guid, -- const struct arm_smccc_res *res) -+static ssize_t mbc_bootfifo_read_raw(struct file *filp, struct kobject *kobj, -+ struct bin_attribute *bin_attr, -+ char *buf, loff_t pos, size_t count) - { -- guid_t id = GUID_INIT(res->a0, res->a1, res->a1 >> 16, -- res->a2, res->a2 >> 8, res->a2 >> 16, -- res->a2 >> 24, res->a3, res->a3 >> 8, -- res->a3 >> 16, res->a3 >> 24); -+ unsigned long timeout = jiffies + HZ / 2; -+ char *p = buf; -+ int cnt = 0; -+ u64 data; - -- return guid_equal(guid, &id); -+ /* Give up reading if no more data within 500ms. */ -+ while (count >= sizeof(data)) { -+ if (!cnt) { -+ cnt = readq(rsh_boot_cnt); -+ if (!cnt) { -+ if (time_after(jiffies, timeout)) -+ break; -+ udelay(10); -+ continue; -+ } -+ } -+ -+ data = readq(rsh_boot_data); -+ memcpy(p, &data, sizeof(data)); -+ count -= sizeof(data); -+ p += sizeof(data); -+ cnt--; -+ timeout = jiffies + HZ / 2; -+ } -+ -+ return p - buf; - } - --static int mlxbf_bootctl_probe(struct platform_device *pdev) -+static struct bin_attribute mbc_bootfifo_sysfs_attr = { -+ .attr = { .name = "bootfifo", .mode = 0400 }, -+ .read = mbc_bootfifo_read_raw, -+}; -+ -+static int mbc_probe(struct platform_device *pdev) - { -- struct arm_smccc_res res = { 0 }; -- guid_t guid; -- int ret; -+ struct resource *resource; -+ struct arm_smccc_res res; -+ void __iomem *data; -+ int err; - -- /* Ensure we have the UUID we expect for this service. */ -- arm_smccc_smc(MLXBF_BOOTCTL_SIP_SVC_UID, 0, 0, 0, 0, 0, 0, 0, &res); -- guid_parse(mlxbf_bootctl_svc_uuid_str, &guid); -- if (!mlxbf_bootctl_guid_match(&guid, &res)) -+ resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ if (!resource) - return -ENODEV; -+ rsh_boot_data = devm_ioremap_resource(&pdev->dev, resource); -+ if (IS_ERR(rsh_boot_data)) -+ return PTR_ERR(rsh_boot_data); -+ -+ resource = platform_get_resource(pdev, IORESOURCE_MEM, 1); -+ if (!resource) -+ return -ENODEV; -+ rsh_boot_cnt = devm_ioremap_resource(&pdev->dev, resource); -+ if (IS_ERR(rsh_boot_cnt)) -+ return PTR_ERR(rsh_boot_cnt); -+ -+ resource = platform_get_resource(pdev, IORESOURCE_MEM, 2); -+ if (resource) { -+ data = devm_ioremap_resource(&pdev->dev, resource); -+ if (!IS_ERR(data)) -+ rsh_semaphore = data; -+ } -+ -+ resource = platform_get_resource(pdev, IORESOURCE_MEM, 3); -+ if (resource) { -+ data = devm_ioremap_resource(&pdev->dev, resource); -+ if (!IS_ERR(data)) { -+ rsh_scratch_buf_ctl = data + RSH_SCRATCH_BUF_CTL_OFF; -+ rsh_scratch_buf_data = data + RSH_SCRATCH_BUF_DATA_OFF; -+ } -+ } - - /* -- * When watchdog is used, it sets boot mode to MLXBF_BOOTCTL_SWAP_EMMC -+ * Ensure we have the UUID we expect for this service. -+ * Note that the functionality we want is present in the first -+ * released version of this service, so we don't check the version. -+ */ -+ arm_smccc_smc(MLNX_SIP_SVC_UID, 0, 0, 0, 0, 0, 0, 0, &res); -+ if (res.a0 != 0x89c036b4 || res.a1 != 0x11e6e7d7 || -+ res.a2 != 0x1a009787 || res.a3 != 0xc4bf00ca) -+ return -ENODEV; -+ -+ /* -+ * When watchdog is used, it sets the boot mode to MLNX_BOOT_SWAP_EMMC - * in case of boot failures. However it doesn't clear the state if there - * is no failure. Restore the default boot mode here to avoid any - * unnecessary boot partition swapping. - */ -- ret = mlxbf_bootctl_smc(MLXBF_BOOTCTL_SET_RESET_ACTION, -- MLXBF_BOOTCTL_EMMC); -- if (ret < 0) -- dev_warn(&pdev->dev, "Unable to reset the EMMC boot mode\n"); -+ if (smc_call1(MLNX_SET_RESET_ACTION, MLNX_BOOT_EMMC) < 0) -+ pr_err("Unable to reset the EMMC boot mode\n"); -+ -+ err = sysfs_create_bin_file(&pdev->dev.kobj, &mbc_bootfifo_sysfs_attr); -+ if (err) { -+ pr_err("Unable to create bootfifo sysfs file, error %d\n", err); -+ return err; -+ } -+ -+ pr_info("%s (version %s)\n", DRIVER_DESCRIPTION, DRIVER_VERSION); -+ -+ return 0; -+} -+ -+static int mbc_remove(struct platform_device *pdev) -+{ -+ sysfs_remove_bin_file(&pdev->dev.kobj, &mbc_bootfifo_sysfs_attr); - - return 0; - } - --static struct platform_driver mlxbf_bootctl_driver = { -- .probe = mlxbf_bootctl_probe, -+static struct platform_driver mbc_driver = { -+ .probe = mbc_probe, -+ .remove = mbc_remove, - .driver = { -- .name = "mlxbf-bootctl", -- .dev_groups = mlxbf_bootctl_groups, -- .acpi_match_table = mlxbf_bootctl_acpi_ids, -+ .name = DRIVER_NAME, -+ .groups = mbc_attr_groups, -+ .of_match_table = mbc_dt_ids, -+ .acpi_match_table = ACPI_PTR(mbc_acpi_ids), - } - }; - --module_platform_driver(mlxbf_bootctl_driver); -+module_platform_driver(mbc_driver); - --MODULE_DESCRIPTION("Mellanox boot control driver"); --MODULE_LICENSE("GPL v2"); --MODULE_AUTHOR("Mellanox Technologies"); -+MODULE_DESCRIPTION(DRIVER_DESCRIPTION); -+MODULE_VERSION(DRIVER_VERSION); -+MODULE_AUTHOR("Shravan Kumar Ramani "); -+MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.h b/drivers/platform/mellanox/mlxbf-bootctl.h -index 148fdb43b435..3e9dda829d6d 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.h -+++ b/drivers/platform/mellanox/mlxbf-bootctl.h -@@ -1,11 +1,22 @@ --/* SPDX-License-Identifier: GPL-2.0 */ -+// SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause - /* -- * Copyright (c) 2019, Mellanox Technologies. All rights reserved. -+ * Copyright (C) 2020 Mellanox Technologies. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License v2.0 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. - */ - - #ifndef __MLXBF_BOOTCTL_H__ - #define __MLXBF_BOOTCTL_H__ - -+/* BlueField-specific SMC function IDs */ -+ - /* - * Request that the on-chip watchdog be enabled, or disabled, after - * the next chip soft reset. This call does not affect the current -@@ -14,14 +25,14 @@ - * will not be enabled after the next soft reset. Non-zero errors are - * returned as documented below. - */ --#define MLXBF_BOOTCTL_SET_POST_RESET_WDOG 0x82000000 -+#define MLNX_SET_POST_RESET_WDOG 0x82000000 - - /* - * Query the status which has been requested for the on-chip watchdog - * after the next chip soft reset. Returns the interval as set by -- * MLXBF_BOOTCTL_SET_POST_RESET_WDOG. -+ * MLNX_SET_POST_RESET_WDOG. - */ --#define MLXBF_BOOTCTL_GET_POST_RESET_WDOG 0x82000001 -+#define MLNX_GET_POST_RESET_WDOG 0x82000001 - - /* - * Request that a specific boot action be taken at the next soft -@@ -32,72 +43,77 @@ - * invoked. See below for the available MLNX_BOOT_xxx parameter - * values. Non-zero errors are returned as documented below. - */ --#define MLXBF_BOOTCTL_SET_RESET_ACTION 0x82000002 -+#define MLNX_SET_RESET_ACTION 0x82000002 - - /* - * Return the specific boot action which will be taken at the next - * soft reset. Returns the reset action (see below for the parameter -- * values for MLXBF_BOOTCTL_SET_RESET_ACTION). -+ * values for MLNX_SET_RESET_ACTION). - */ --#define MLXBF_BOOTCTL_GET_RESET_ACTION 0x82000003 -+#define MLNX_GET_RESET_ACTION 0x82000003 - - /* - * Request that a specific boot action be taken at the soft reset - * after the next soft reset. For a specified valid boot mode, the - * effect of this call is identical to that of invoking -- * MLXBF_BOOTCTL_SET_RESET_ACTION after the next chip soft reset; in -+ * MLNX_SET_RESET_ACTION after the next chip soft reset; in - * particular, after that reset, the action for the now next reset can -- * be queried with MLXBF_BOOTCTL_GET_RESET_ACTION and modified with -- * MLXBF_BOOTCTL_SET_RESET_ACTION. You may also specify the parameter as -+ * be queried with MLNX_GET_RESET_ACTION and modified with -+ * MLNX_SET_RESET_ACTION. You may also specify the parameter as - * MLNX_BOOT_NONE, which is equivalent to specifying that no call to -- * MLXBF_BOOTCTL_SET_RESET_ACTION be taken after the next chip soft reset. -+ * MLNX_SET_RESET_ACTION be taken after the next chip soft reset. - * This call does not affect the action to be taken at the next soft - * reset. Non-zero errors are returned as documented below. - */ --#define MLXBF_BOOTCTL_SET_SECOND_RESET_ACTION 0x82000004 -+#define MLNX_SET_SECOND_RESET_ACTION 0x82000004 - - /* - * Return the specific boot action which will be taken at the soft - * reset after the next soft reset; this will be one of the valid -- * actions for MLXBF_BOOTCTL_SET_SECOND_RESET_ACTION. -+ * actions for MLNX_SET_SECOND_RESET_ACTION. - */ --#define MLXBF_BOOTCTL_GET_SECOND_RESET_ACTION 0x82000005 -+#define MLNX_GET_SECOND_RESET_ACTION 0x82000005 - - /* - * Return the fuse status of the current chip. The caller should specify - * with the second argument if the state of the lifecycle fuses or the - * version of secure boot fuse keys left should be returned. - */ --#define MLXBF_BOOTCTL_GET_TBB_FUSE_STATUS 0x82000006 -+#define MLNX_GET_TBB_FUSE_STATUS 0x82000006 - --/* Reset eMMC by programming the RST_N register. */ --#define MLXBF_BOOTCTL_SET_EMMC_RST_N 0x82000007 -+/* -+ * Initiate Firmware Reset via TYU. This might be invoked during the reset -+ * flow in isolation mode. -+ */ -+#define MLNX_HANDLE_FW_RESET 0x8200000D - --#define MLXBF_BOOTCTL_GET_DIMM_INFO 0x82000008 -+/* -+ * SMC function IDs to set, get and reset the manufacturing information -+ * stored within the eeprom. -+ */ -+#define MLNX_HANDLE_SET_MFG_INFO 0x8200000E -+#define MLNX_HANDLE_GET_MFG_INFO 0x8200000F -+#define MLNX_HANDLE_LOCK_MFG_INFO 0x82000011 - - /* SMC function IDs for SiP Service queries */ --#define MLXBF_BOOTCTL_SIP_SVC_CALL_COUNT 0x8200ff00 --#define MLXBF_BOOTCTL_SIP_SVC_UID 0x8200ff01 --#define MLXBF_BOOTCTL_SIP_SVC_VERSION 0x8200ff03 -- --/* ARM Standard Service Calls version numbers */ --#define MLXBF_BOOTCTL_SVC_VERSION_MAJOR 0x0 --#define MLXBF_BOOTCTL_SVC_VERSION_MINOR 0x2 -+#define MLNX_SIP_SVC_CALL_COUNT 0x8200ff00 -+#define MLNX_SIP_SVC_UID 0x8200ff01 -+#define MLNX_SIP_SVC_VERSION 0x8200ff03 - - /* Number of svc calls defined. */ --#define MLXBF_BOOTCTL_NUM_SVC_CALLS 12 -+#define MLNX_NUM_SVC_CALLS 16 - --/* Valid reset actions for MLXBF_BOOTCTL_SET_RESET_ACTION. */ --#define MLXBF_BOOTCTL_EXTERNAL 0 /* Not boot from eMMC */ --#define MLXBF_BOOTCTL_EMMC 1 /* From primary eMMC boot partition */ --#define MLNX_BOOTCTL_SWAP_EMMC 2 /* Swap eMMC boot partitions and reboot */ --#define MLXBF_BOOTCTL_EMMC_LEGACY 3 /* From primary eMMC in legacy mode */ -+/* Valid reset actions for MLNX_SET_RESET_ACTION. */ -+#define MLNX_BOOT_EXTERNAL 0 /* Do not boot from eMMC */ -+#define MLNX_BOOT_EMMC 1 /* Boot from primary eMMC boot partition */ -+#define MLNX_BOOT_SWAP_EMMC 2 /* Swap eMMC boot partitions and reboot */ -+#define MLNX_BOOT_EMMC_LEGACY 3 /* Boot from primary eMMC in legacy mode */ - - /* Valid arguments for requesting the fuse status. */ --#define MLXBF_BOOTCTL_FUSE_STATUS_LIFECYCLE 0 /* Return lifecycle status. */ --#define MLXBF_BOOTCTL_FUSE_STATUS_KEYS 1 /* Return secure boot key status */ -+#define MLNX_FUSE_STATUS_LIFECYCLE 0 /* Return the lifecycle status. */ -+#define MLNX_FUSE_STATUS_KEYS 1 /* Return secure boot key status */ - --/* Additional value to disable the MLXBF_BOOTCTL_SET_SECOND_RESET_ACTION. */ --#define MLXBF_BOOTCTL_NONE 0x7fffffff /* Don't change next boot action */ -+/* Additional parameter value to disable the MLNX_SET_SECOND_RESET_ACTION. */ -+#define MLNX_BOOT_NONE 0x7fffffff /* Don't change next boot action */ - - #endif /* __MLXBF_BOOTCTL_H__ */ --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch b/platform/mellanox/non-upstream-patches/patches/0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch deleted file mode 100644 index f46df5f9dd43..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 61618188dadb1cc9b6708916e0e7a1c2e31d469d Mon Sep 17 00:00:00 2001 -From: Asmaa Mnebhi -Date: Mon, 31 Oct 2022 12:18:52 -0400 -Subject: [PATCH backport 6.1.42 77/85] UBUNTU: SAUCE: mlx-bootctl: support icm - carveout eeprom region read/write - -BugLink: https://bugs.launchpad.net/bugs/1995296 - -The BlueField-3 ICM carveout feature will enable NIC FW to bypass the SMMU block -to access DRAM memory. The amount of memory accessible by FW will be controlled by ARM. -This patch enables setting the size of the large ICM carveout from -userspace. The max size is 1TB, has a granularity of 128MB and will be passed -and printed in hex. The size unit is MB. - -Signed-off-by: Asmaa Mnebhi -Acked-by: Tim Gardner -Acked-by: Cory Todd -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-bootctl.c | 40 +++++++++++++++++++++++ - drivers/platform/mellanox/mlxbf-bootctl.h | 9 +++++ - 2 files changed, 49 insertions(+) - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.c b/drivers/platform/mellanox/mlxbf-bootctl.c -index 2302e1e09c7e..e8877a19dda9 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.c -+++ b/drivers/platform/mellanox/mlxbf-bootctl.c -@@ -104,6 +104,7 @@ enum { - - /* This mutex is used to serialize MFG write and lock operations. */ - static DEFINE_MUTEX(mfg_ops_lock); -+static DEFINE_MUTEX(icm_ops_lock); - - #define MLNX_MFG_OOB_MAC_LEN ETH_ALEN - #define MLNX_MFG_OPN_VAL_LEN 24 -@@ -383,6 +384,43 @@ static ssize_t oob_mac_store(struct device_driver *drv, const char *buf, - return res.a0 ? -EPERM : count; - } - -+static ssize_t large_icm_show(struct device_driver *drv, char *buf) -+{ -+ char icm_str[MAX_ICM_BUFFER_SIZE] = { 0 }; -+ struct arm_smccc_res res; -+ -+ arm_smccc_smc(MLNX_HANDLE_GET_ICM_INFO, 0, 0, 0, 0, -+ 0, 0, 0, &res); -+ if (res.a0) -+ return -EPERM; -+ -+ sprintf(icm_str, "0x%lx", res.a1); -+ -+ return snprintf(buf, sizeof(icm_str), "%s", icm_str); -+} -+ -+static ssize_t large_icm_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ struct arm_smccc_res res; -+ unsigned long icm_data; -+ int err; -+ -+ err = kstrtoul(buf, 16, &icm_data); -+ if (err) -+ return err; -+ -+ if (((icm_data != 0) && (icm_data < 0x80)) || -+ (icm_data > 0x100000) || (icm_data % 128)) -+ return -EPERM; -+ -+ mutex_lock(&icm_ops_lock); -+ arm_smccc_smc(MLNX_HANDLE_SET_ICM_INFO, icm_data, 0, 0, 0, 0, 0, 0, &res); -+ mutex_unlock(&icm_ops_lock); -+ -+ return res.a0 ? -EPERM : count; -+} -+ - static ssize_t opn_show(struct device_driver *drv, char *buf) - { - u64 opn_data[MLNX_MFG_VAL_QWORD_CNT(OPN)] = { 0 }; -@@ -1170,6 +1208,7 @@ static DRIVER_ATTR_RW(uuid); - static DRIVER_ATTR_RW(rev); - static DRIVER_ATTR_WO(mfg_lock); - static DRIVER_ATTR_RW(rsh_log); -+static DRIVER_ATTR_RW(large_icm); - - static struct attribute *mbc_dev_attrs[] = { - &driver_attr_post_reset_wdog.attr, -@@ -1187,6 +1226,7 @@ static struct attribute *mbc_dev_attrs[] = { - &driver_attr_rev.attr, - &driver_attr_mfg_lock.attr, - &driver_attr_rsh_log.attr, -+ &driver_attr_large_icm.attr, - NULL - }; - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.h b/drivers/platform/mellanox/mlxbf-bootctl.h -index 3e9dda829d6d..c70204770af3 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.h -+++ b/drivers/platform/mellanox/mlxbf-bootctl.h -@@ -95,6 +95,15 @@ - #define MLNX_HANDLE_GET_MFG_INFO 0x8200000F - #define MLNX_HANDLE_LOCK_MFG_INFO 0x82000011 - -+/* -+ * SMC function IDs to set and get the large ICM carveout size -+ * stored in the eeprom. -+ */ -+#define MLNX_HANDLE_SET_ICM_INFO 0x82000012 -+#define MLNX_HANDLE_GET_ICM_INFO 0x82000013 -+ -+#define MAX_ICM_BUFFER_SIZE 10 -+ - /* SMC function IDs for SiP Service queries */ - #define MLNX_SIP_SVC_CALL_COUNT 0x8200ff00 - #define MLNX_SIP_SVC_UID 0x8200ff01 --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch b/platform/mellanox/non-upstream-patches/patches/0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch deleted file mode 100644 index 94cc1d37bb56..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 63f46d5beb56293f64ebb39f94a005acbe381f25 Mon Sep 17 00:00:00 2001 -From: Asmaa Mnebhi -Date: Thu, 30 Mar 2023 14:42:33 -0400 -Subject: [PATCH backport 6.1.42 78/85] UBUNTU: SAUCE: mlxbf-bootctl: support - SMC call for setting ARM boot state - -BugLink: https://bugs.launchpad.net/bugs/2013383 - -Add a new SMC call which allows setting the ARM boot progress state to "OS is up". - -Signed-off-by: Asmaa Mnebhi -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-bootctl.c | 23 +++++++++++++++++++++++ - drivers/platform/mellanox/mlxbf-bootctl.h | 5 +++++ - 2 files changed, 28 insertions(+) - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.c b/drivers/platform/mellanox/mlxbf-bootctl.c -index e8877a19dda9..a68bf5b27013 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.c -+++ b/drivers/platform/mellanox/mlxbf-bootctl.c -@@ -105,6 +105,7 @@ enum { - /* This mutex is used to serialize MFG write and lock operations. */ - static DEFINE_MUTEX(mfg_ops_lock); - static DEFINE_MUTEX(icm_ops_lock); -+static DEFINE_MUTEX(os_up_lock); - - #define MLNX_MFG_OOB_MAC_LEN ETH_ALEN - #define MLNX_MFG_OPN_VAL_LEN 24 -@@ -747,6 +748,26 @@ static ssize_t mfg_lock_store(struct device_driver *drv, const char *buf, - return count; - } - -+static ssize_t os_up_store(struct device_driver *drv, const char *buf, -+ size_t count) -+{ -+ unsigned long val; -+ int err; -+ -+ err = kstrtoul(buf, 10, &val); -+ if (err) -+ return err; -+ -+ if (val != 1) -+ return -EINVAL; -+ -+ mutex_lock(&os_up_lock); -+ smc_call0(MLNX_HANDLE_OS_UP); -+ mutex_unlock(&os_up_lock); -+ -+ return count; -+} -+ - /* Log header format. */ - #define RSH_LOG_TYPE_SHIFT 56 - #define RSH_LOG_LEN_SHIFT 48 -@@ -1209,6 +1230,7 @@ static DRIVER_ATTR_RW(rev); - static DRIVER_ATTR_WO(mfg_lock); - static DRIVER_ATTR_RW(rsh_log); - static DRIVER_ATTR_RW(large_icm); -+static DRIVER_ATTR_WO(os_up); - - static struct attribute *mbc_dev_attrs[] = { - &driver_attr_post_reset_wdog.attr, -@@ -1227,6 +1249,7 @@ static struct attribute *mbc_dev_attrs[] = { - &driver_attr_mfg_lock.attr, - &driver_attr_rsh_log.attr, - &driver_attr_large_icm.attr, -+ &driver_attr_os_up.attr, - NULL - }; - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.h b/drivers/platform/mellanox/mlxbf-bootctl.h -index c70204770af3..dc73f7e88914 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.h -+++ b/drivers/platform/mellanox/mlxbf-bootctl.h -@@ -102,6 +102,11 @@ - #define MLNX_HANDLE_SET_ICM_INFO 0x82000012 - #define MLNX_HANDLE_GET_ICM_INFO 0x82000013 - -+/* -+ * SMC function ID to set the ARM boot state to up -+ */ -+#define MLNX_HANDLE_OS_UP 0x82000014 -+ - #define MAX_ICM_BUFFER_SIZE 10 - - /* SMC function IDs for SiP Service queries */ --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch b/platform/mellanox/non-upstream-patches/patches/0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch deleted file mode 100644 index 1b7f14260bc1..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch +++ /dev/null @@ -1,281 +0,0 @@ -From 2734b1f7ca9acafd126706be280844d962e1b368 Mon Sep 17 00:00:00 2001 -From: Jitendra Lanka -Date: Mon, 16 Jan 2023 11:39:34 -0500 -Subject: [PATCH backport 6.1.42 79/85] UBUNTU: SAUCE: mlxbf-ptm: power and - thermal management debugfs driver - -BugLink: https://bugs.launchpad.net/bugs/2002852 - -mlxbf-ptm driver implements debugfs interface for Bluefield -devices power and thermal management. It provides some parameters -that can be monitored by system software. - -Signed-off-by: Jitendra Lanka -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/Kconfig | 10 ++ - drivers/platform/mellanox/Makefile | 1 + - drivers/platform/mellanox/mlxbf-ptm.c | 216 ++++++++++++++++++++++++++ - 3 files changed, 227 insertions(+) - create mode 100644 drivers/platform/mellanox/mlxbf-ptm.c - -diff --git a/drivers/platform/mellanox/Kconfig b/drivers/platform/mellanox/Kconfig -index 70b628834b4f..75efd345b22e 100644 ---- a/drivers/platform/mellanox/Kconfig -+++ b/drivers/platform/mellanox/Kconfig -@@ -90,6 +90,16 @@ config MLXBF_PMC - to performance monitoring counters within various blocks in the - Mellanox BlueField SoC via a sysfs interface. - -+config MLXBF_PTM -+ tristate "BlueField Power and Thermal Management debugfs interface" -+ depends on ARM64 -+ depends on DEBUG_FS -+ help -+ If you say yes to this option, support will added for the -+ mlxbf-ptm driver. This driver provides debugfs interface -+ to userspace with information related to power and thermal -+ management of the Bluefield device. -+ - config NVSW_SN2201 - tristate "Nvidia SN2201 platform driver support" - depends on HWMON -diff --git a/drivers/platform/mellanox/Makefile b/drivers/platform/mellanox/Makefile -index ba56485cbe8c..d7f4d940c505 100644 ---- a/drivers/platform/mellanox/Makefile -+++ b/drivers/platform/mellanox/Makefile -@@ -7,6 +7,7 @@ obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o - obj-$(CONFIG_MLXBF_BOOTCTL) += mlxbf-bootctl.o - obj-$(CONFIG_MLXBF_PMC) += mlxbf-pmc.o - obj-$(CONFIG_MLXBF_TMFIFO) += mlxbf-tmfifo.o -+obj-$(CONFIG_MLXBF_PTM) += mlxbf-ptm.o - obj-$(CONFIG_MLXREG_HOTPLUG) += mlxreg-hotplug.o - obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o - obj-$(CONFIG_MLXREG_LC) += mlxreg-lc.o -diff --git a/drivers/platform/mellanox/mlxbf-ptm.c b/drivers/platform/mellanox/mlxbf-ptm.c -new file mode 100644 -index 000000000000..3692018b9d60 ---- /dev/null -+++ b/drivers/platform/mellanox/mlxbf-ptm.c -@@ -0,0 +1,216 @@ -+// SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause -+/* -+ * Nvidia Bluefield power and thermal debugfs driver -+ * This driver provides a debugfs interface for systems management -+ * software to monitor power and thermal actions. -+ * -+ * Copyright (C) 2023 NVIDIA Corporation. All rights reserved. -+ * This Software is licensed under one of the following licenses: -+ * -+ * 1) under the terms of the "Common Public License 1.0" a copy of which is -+ * available from the Open Source Initiative, see -+ * http://www.opensource.org/licenses/cpl.php. -+ * -+ * 2) under the terms of the "The BSD License" a copy of which is -+ * available from the Open Source Initiative, see -+ * http://www.opensource.org/licenses/bsd-license.php. -+ * -+ * 3) under the terms of the "GNU General Public License (GPL) Version 2" a -+ * copy of which is available from the Open Source Initiative, see -+ * http://www.opensource.org/licenses/gpl-license.php. -+ * -+ * Licensee has the right to choose one of the above licenses. -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice and one of the license notices. -+ * -+ * Redistributions in binary form must reproduce both the above copyright -+ * notice, one of the license notices in the documentation -+ * and/or other materials provided with the distribution. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+/* SMC IDs */ -+#define MLNX_PTM_GET_VR0_POWER 0x82000101 -+#define MLNX_PTM_GET_VR1_POWER 0x82000102 -+#define MLNX_PTM_GET_THROTTLE_STATE 0x82000103 -+#define MLNX_PTM_GET_DDR_THLD 0x82000104 -+#define MLNX_PTM_GET_STATUS_REG 0x82000105 -+#define MLNX_PTM_GET_PTHROTTLE 0x82000106 -+#define MLNX_PTM_GET_TTHROTTLE 0x82000107 -+#define MLNX_PTM_GET_MAX_TEMP 0x82000108 -+#define MLNX_PTM_GET_PWR_EVT_CNT 0x82000109 -+#define MLNX_PTM_GET_TEMP_EVT_CNT 0x8200010A -+ -+#define MLNX_POWER_ERROR 300 -+ -+struct dentry *monitors; -+ -+static int smc_call1(unsigned int smc_op, int smc_arg) -+{ -+ struct arm_smccc_res res; -+ -+ arm_smccc_smc(smc_op, smc_arg, 0, 0, 0, 0, 0, 0, &res); -+ -+ return res.a0; -+} -+ -+#define smc_call0(smc_op) smc_call1(smc_op, 0) -+ -+static int throttling_state_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_THROTTLE_STATE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(throttling_state_fops, -+ throttling_state_show, NULL, "%llu\n"); -+ -+static int pthrottling_state_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_PTHROTTLE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(pthrottling_state_fops, -+ pthrottling_state_show, NULL, "%llu\n"); -+ -+static int tthrottling_state_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_TTHROTTLE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(tthrottling_state_fops, -+ tthrottling_state_show, NULL, "%llu\n"); -+ -+static int core_temp_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_MAX_TEMP); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(core_temp_fops, -+ core_temp_show, NULL, "%lld\n"); -+ -+static int pwr_evt_counter_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_PWR_EVT_CNT); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(pwr_evt_counter_fops, -+ pwr_evt_counter_show, NULL, "%llu\n"); -+ -+static int temp_evt_counter_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_TEMP_EVT_CNT); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(temp_evt_counter_fops, -+ temp_evt_counter_show, NULL, "%llu\n"); -+ -+static int vr0_power_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_VR0_POWER); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(vr0_power_fops, vr0_power_show, NULL, "%llu\n"); -+ -+static int vr1_power_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_VR1_POWER); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(vr1_power_fops, vr1_power_show, NULL, "%llu\n"); -+ -+static int total_power_show(void *data, u64 *val) -+{ -+ u64 v0, v1; -+ -+ v0 = smc_call0(MLNX_PTM_GET_VR0_POWER); -+ if (v0 > MLNX_POWER_ERROR) -+ v0 = 0; -+ v1 = smc_call0(MLNX_PTM_GET_VR1_POWER); -+ if (v1 > MLNX_POWER_ERROR) -+ v1 = 0; -+ *val = (v0 + v1); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(total_power_fops, total_power_show, NULL, "%llu\n"); -+ -+static int ddr_thld_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_DDR_THLD); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(ddr_thld_fops, ddr_thld_show, NULL, "%llu\n"); -+ -+static int error_status_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_STATUS_REG); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(error_status_fops, -+ error_status_show, NULL, "%llu\n"); -+ -+ -+static int __init mlxbf_ptm_init(void) -+{ -+ struct dentry *ptm_root, *status; -+ -+ ptm_root = debugfs_lookup("mlxbf-ptm", NULL); -+ if (!ptm_root) -+ ptm_root = debugfs_create_dir("mlxbf-ptm", NULL); -+ -+ monitors = debugfs_create_dir("monitors", ptm_root); -+ status = debugfs_create_dir("status", monitors); -+ -+ debugfs_create_file("vr0_power", S_IRUGO, status, NULL, -+ &vr0_power_fops); -+ debugfs_create_file("vr1_power", S_IRUGO, status, NULL, -+ &vr1_power_fops); -+ debugfs_create_file("total_power", S_IRUGO, status, NULL, -+ &total_power_fops); -+ debugfs_create_file("ddr_temp", S_IRUGO, status, -+ NULL, &ddr_thld_fops); -+ debugfs_create_file("core_temp", S_IRUGO, status, -+ NULL, &core_temp_fops); -+ debugfs_create_file("power_throttling_event_count", S_IRUGO, status, -+ NULL, &pwr_evt_counter_fops); -+ debugfs_create_file("thermal_throttling_event_count", S_IRUGO, status, -+ NULL, &temp_evt_counter_fops); -+ debugfs_create_file("throttling_state", S_IRUGO, status, -+ NULL, &throttling_state_fops); -+ debugfs_create_file("power_throttling_state", S_IRUGO, status, -+ NULL, &pthrottling_state_fops); -+ debugfs_create_file("thermal_throttling_state", S_IRUGO, status, -+ NULL, &tthrottling_state_fops); -+ debugfs_create_file("error_state", S_IRUGO, status, -+ NULL, &error_status_fops); -+ -+ return 0; -+} -+ -+static void __exit mlxbf_ptm_exit(void) -+{ -+ debugfs_remove_recursive(monitors); -+} -+ -+module_init(mlxbf_ptm_init); -+module_exit(mlxbf_ptm_exit); -+ -+MODULE_AUTHOR("Jitendra Lanka "); -+MODULE_DESCRIPTION("Nvidia Bluefield power and thermal debugfs driver"); -+MODULE_LICENSE("Dual BSD/GPL"); -+MODULE_VERSION("1.0"); --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch b/platform/mellanox/non-upstream-patches/patches/0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch deleted file mode 100644 index d2d604bb3a86..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch +++ /dev/null @@ -1,60 +0,0 @@ -From d6703416953dd1c3fe6e84a76c6d85a73fcbdc4b Mon Sep 17 00:00:00 2001 -From: Jitendra Lanka -Date: Wed, 22 Mar 2023 11:39:54 -0400 -Subject: [PATCH backport 6.1.42 80/85] UBUNTU: SAUCE: mlxbf-ptm: update - license - -BugLink: https://bugs.launchpad.net/bugs/2011738 - -Update license - -Signed-off-by: Jitendra Lanka -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-ptm.c | 26 ++------------------------ - 1 file changed, 2 insertions(+), 24 deletions(-) - -diff --git a/drivers/platform/mellanox/mlxbf-ptm.c b/drivers/platform/mellanox/mlxbf-ptm.c -index 3692018b9d60..79c3e2902070 100644 ---- a/drivers/platform/mellanox/mlxbf-ptm.c -+++ b/drivers/platform/mellanox/mlxbf-ptm.c -@@ -1,32 +1,10 @@ - // SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause - /* -+ * Copyright (C) 2023 NVIDIA Corporation & Affiliates. -+ * - * Nvidia Bluefield power and thermal debugfs driver - * This driver provides a debugfs interface for systems management - * software to monitor power and thermal actions. -- * -- * Copyright (C) 2023 NVIDIA Corporation. All rights reserved. -- * This Software is licensed under one of the following licenses: -- * -- * 1) under the terms of the "Common Public License 1.0" a copy of which is -- * available from the Open Source Initiative, see -- * http://www.opensource.org/licenses/cpl.php. -- * -- * 2) under the terms of the "The BSD License" a copy of which is -- * available from the Open Source Initiative, see -- * http://www.opensource.org/licenses/bsd-license.php. -- * -- * 3) under the terms of the "GNU General Public License (GPL) Version 2" a -- * copy of which is available from the Open Source Initiative, see -- * http://www.opensource.org/licenses/gpl-license.php. -- * -- * Licensee has the right to choose one of the above licenses. -- * -- * Redistributions of source code must retain the above copyright -- * notice and one of the license notices. -- * -- * Redistributions in binary form must reproduce both the above copyright -- * notice, one of the license notices in the documentation -- * and/or other materials provided with the distribution. - */ - - #include --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch b/platform/mellanox/non-upstream-patches/patches/0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch deleted file mode 100644 index c9816d481c8b..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c3c93684288a230ebf63ca8e07cc420db07d5f89 Mon Sep 17 00:00:00 2001 -From: Jitendra Lanka -Date: Wed, 22 Mar 2023 11:39:55 -0400 -Subject: [PATCH backport 6.1.42 81/85] UBUNTU: SAUCE: mlxbf-ptm: use 0444 - instead of S_IRUGO - -BugLink: https://bugs.launchpad.net/bugs/2011738 - -As recommended by checkscript, change S_IRUGO to 0444 - -Signed-off-by: Jitendra Lanka -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-ptm.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/drivers/platform/mellanox/mlxbf-ptm.c b/drivers/platform/mellanox/mlxbf-ptm.c -index 79c3e2902070..aeb68dc42e32 100644 ---- a/drivers/platform/mellanox/mlxbf-ptm.c -+++ b/drivers/platform/mellanox/mlxbf-ptm.c -@@ -154,27 +154,27 @@ static int __init mlxbf_ptm_init(void) - monitors = debugfs_create_dir("monitors", ptm_root); - status = debugfs_create_dir("status", monitors); - -- debugfs_create_file("vr0_power", S_IRUGO, status, NULL, -+ debugfs_create_file("vr0_power", 0444, status, NULL, - &vr0_power_fops); -- debugfs_create_file("vr1_power", S_IRUGO, status, NULL, -+ debugfs_create_file("vr1_power", 0444, status, NULL, - &vr1_power_fops); -- debugfs_create_file("total_power", S_IRUGO, status, NULL, -+ debugfs_create_file("total_power", 0444, status, NULL, - &total_power_fops); -- debugfs_create_file("ddr_temp", S_IRUGO, status, -+ debugfs_create_file("ddr_temp", 0444, status, - NULL, &ddr_thld_fops); -- debugfs_create_file("core_temp", S_IRUGO, status, -+ debugfs_create_file("core_temp", 0444, status, - NULL, &core_temp_fops); -- debugfs_create_file("power_throttling_event_count", S_IRUGO, status, -+ debugfs_create_file("power_throttling_event_count", 0444, status, - NULL, &pwr_evt_counter_fops); -- debugfs_create_file("thermal_throttling_event_count", S_IRUGO, status, -+ debugfs_create_file("thermal_throttling_event_count", 0444, status, - NULL, &temp_evt_counter_fops); -- debugfs_create_file("throttling_state", S_IRUGO, status, -+ debugfs_create_file("throttling_state", 0444, status, - NULL, &throttling_state_fops); -- debugfs_create_file("power_throttling_state", S_IRUGO, status, -+ debugfs_create_file("power_throttling_state", 0444, status, - NULL, &pthrottling_state_fops); -- debugfs_create_file("thermal_throttling_state", S_IRUGO, status, -+ debugfs_create_file("thermal_throttling_state", 0444, status, - NULL, &tthrottling_state_fops); -- debugfs_create_file("error_state", S_IRUGO, status, -+ debugfs_create_file("error_state", 0444, status, - NULL, &error_status_fops); - - return 0; --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch b/platform/mellanox/non-upstream-patches/patches/0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch deleted file mode 100644 index 2fbe1b9a843d..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 82305cf0e95a8c711cbcb9f74193c5a2fe62f6fa Mon Sep 17 00:00:00 2001 -From: Jitendra Lanka -Date: Wed, 22 Mar 2023 11:39:56 -0400 -Subject: [PATCH backport 6.1.42 82/85] UBUNTU: SAUCE: mlxbf-ptm: add atx - debugfs nodes - -BugLink: https://bugs.launchpad.net/bugs/2011738 - -Add additional debugfs nodes that provide ATX status and -power profile data. - -Signed-off-by: Jitendra Lanka -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-ptm.c | 36 +++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) - -diff --git a/drivers/platform/mellanox/mlxbf-ptm.c b/drivers/platform/mellanox/mlxbf-ptm.c -index aeb68dc42e32..a2845aa57c5b 100644 ---- a/drivers/platform/mellanox/mlxbf-ptm.c -+++ b/drivers/platform/mellanox/mlxbf-ptm.c -@@ -23,6 +23,9 @@ - #define MLNX_PTM_GET_MAX_TEMP 0x82000108 - #define MLNX_PTM_GET_PWR_EVT_CNT 0x82000109 - #define MLNX_PTM_GET_TEMP_EVT_CNT 0x8200010A -+#define MLNX_PTM_GET_POWER_ENVELOPE 0x8200010B -+#define MLNX_PTM_GET_ATX_PWR_STATE 0x8200010C -+#define MLNX_PTM_GET_CUR_PPROFILE 0x8200010D - - #define MLNX_POWER_ERROR 300 - -@@ -142,6 +145,33 @@ static int error_status_show(void *data, u64 *val) - DEFINE_SIMPLE_ATTRIBUTE(error_status_fops, - error_status_show, NULL, "%llu\n"); - -+static int power_envelope_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_POWER_ENVELOPE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(power_envelope_fops, -+ power_envelope_show, NULL, "%llu\n"); -+ -+static int atx_status_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_ATX_PWR_STATE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(atx_status_fops, -+ atx_status_show, NULL, "%lld\n"); -+ -+static int current_pprofile_show(void *data, u64 *val) -+{ -+ *val = smc_call0(MLNX_PTM_GET_CUR_PPROFILE); -+ -+ return 0; -+} -+DEFINE_SIMPLE_ATTRIBUTE(current_pprofile_fops, -+ current_pprofile_show, NULL, "%llu\n"); -+ - - static int __init mlxbf_ptm_init(void) - { -@@ -176,6 +206,12 @@ static int __init mlxbf_ptm_init(void) - NULL, &tthrottling_state_fops); - debugfs_create_file("error_state", 0444, status, - NULL, &error_status_fops); -+ debugfs_create_file("power_envelope", 0444, status, -+ NULL, &power_envelope_fops); -+ debugfs_create_file("atx_power_available", 0444, status, -+ NULL, &atx_status_fops); -+ debugfs_create_file("active_power_profile", 0444, status, -+ NULL, ¤t_pprofile_fops); - - return 0; - } --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch b/platform/mellanox/non-upstream-patches/patches/0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch deleted file mode 100644 index 4498da412ef8..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch +++ /dev/null @@ -1,31 +0,0 @@ -From efaf25dc1e11de91140b9010e743182bc763124c Mon Sep 17 00:00:00 2001 -From: Jitendra Lanka -Date: Wed, 22 Mar 2023 11:39:57 -0400 -Subject: [PATCH backport 6.1.42 83/85] UBUNTU: SAUCE: mlxbf-ptm: update module - version - -BugLink: https://bugs.launchpad.net/bugs/2011738 - -update module version - -Signed-off-by: Jitendra Lanka -Acked-by: Tim Gardner -Acked-by: Bartlomiej Zolnierkiewicz -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-ptm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/platform/mellanox/mlxbf-ptm.c b/drivers/platform/mellanox/mlxbf-ptm.c -index a2845aa57c5b..eb4460cb058b 100644 ---- a/drivers/platform/mellanox/mlxbf-ptm.c -+++ b/drivers/platform/mellanox/mlxbf-ptm.c -@@ -227,4 +227,4 @@ module_exit(mlxbf_ptm_exit); - MODULE_AUTHOR("Jitendra Lanka "); - MODULE_DESCRIPTION("Nvidia Bluefield power and thermal debugfs driver"); - MODULE_LICENSE("Dual BSD/GPL"); --MODULE_VERSION("1.0"); -+MODULE_VERSION("1.1"); --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch b/platform/mellanox/non-upstream-patches/patches/0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch deleted file mode 100644 index 433d88f1363a..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9c9944b7c98fc61161c204b7ef397a3ac05977ba Mon Sep 17 00:00:00 2001 -From: Asmaa Mnebhi -Date: Thu, 20 Jul 2023 16:37:37 -0400 -Subject: [PATCH backport 6.1.42 13/20] UBUNTU: SAUCE: mlxbf-bootctl: Fix - kernel panic due to buffer overflow - -BugLink: https://bugs.launchpad.net/bugs/2028309 - -Running the following LTP (linux-test-project) script, causes -a kernel panic and a reboot of the DPU: -ltp/testcases/bin/read_all -d /sys -q -r 10 - -The above test reads all directory and files under /sys. -Reading the sysfs entry "large_icm" causes the kernel panic -due to a garbage value returned via i2c read. That garbage -value causes a buffer overflow in sprintf. - -Replace sprintf with snprintf. And also add missing lock and -increase the buffer size to PAGE_SIZE. - -Signed-off-by: Asmaa Mnebhi -Acked-by: Bartlomiej Zolnierkiewicz -Acked-by: Tim Gardner -Signed-off-by: Bartlomiej Zolnierkiewicz ---- - drivers/platform/mellanox/mlxbf-bootctl.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/drivers/platform/mellanox/mlxbf-bootctl.c b/drivers/platform/mellanox/mlxbf-bootctl.c -index a68bf5b27013..52666ee360b2 100644 ---- a/drivers/platform/mellanox/mlxbf-bootctl.c -+++ b/drivers/platform/mellanox/mlxbf-bootctl.c -@@ -387,17 +387,16 @@ static ssize_t oob_mac_store(struct device_driver *drv, const char *buf, - - static ssize_t large_icm_show(struct device_driver *drv, char *buf) - { -- char icm_str[MAX_ICM_BUFFER_SIZE] = { 0 }; - struct arm_smccc_res res; - -+ mutex_lock(&icm_ops_lock); - arm_smccc_smc(MLNX_HANDLE_GET_ICM_INFO, 0, 0, 0, 0, - 0, 0, 0, &res); -+ mutex_unlock(&icm_ops_lock); - if (res.a0) - return -EPERM; - -- sprintf(icm_str, "0x%lx", res.a1); -- -- return snprintf(buf, sizeof(icm_str), "%s", icm_str); -+ return snprintf(buf, PAGE_SIZE, "0x%lx", res.a1); - } - - static ssize_t large_icm_store(struct device_driver *drv, const char *buf, --- -2.25.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch b/platform/mellanox/non-upstream-patches/patches/8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch deleted file mode 100644 index ba8f2fd77720..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 646a7ca330eddb18e915380c9e8296a8cbce3c81 Mon Sep 17 00:00:00 2001 -From: Vadim Pasternak -Date: Wed, 20 Oct 2021 09:49:28 +0000 -Subject: [PATCH backport 6.1.42 40/85] mlxsw: Use weak reverse dependencies - for firmware flashing selection - -Replace configuration options "select" by "imply". It allows to set -'MLXFW' symbol to 'n' from a direct dependency or with a visible -prompt. - -User might wish to disable this option in case only 'mlxsw_minimal' is -configured, since it does not support firmware flashing. - -Signed-off-by: Vadim Pasternak ---- - drivers/net/ethernet/mellanox/mlxsw/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig b/drivers/net/ethernet/mellanox/mlxsw/Kconfig -index a510bf2cff2f..efc7ec8fa33c 100644 ---- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig -+++ b/drivers/net/ethernet/mellanox/mlxsw/Kconfig -@@ -6,7 +6,7 @@ - config MLXSW_CORE - tristate "Mellanox Technologies Switch ASICs support" - select NET_DEVLINK -- select MLXFW -+ imply MLXFW - select AUXILIARY_BUS - help - This driver supports Mellanox Technologies Switch ASICs family. --- -2.20.1 - diff --git a/platform/mellanox/non-upstream-patches/patches/8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch b/platform/mellanox/non-upstream-patches/patches/8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch deleted file mode 100644 index 3a220713e0ff..000000000000 --- a/platform/mellanox/non-upstream-patches/patches/8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a742d55ed36a0bd3b6346563665b951dad9ad469 Mon Sep 17 00:00:00 2001 -From: root -Date: Tue, 5 Apr 2022 21:35:55 +0300 -Subject: [PATH backport v6.1 2/3] mlxsw: minimal: Downstream: Ignore error - reading SPAD register - -SPAD register is not supported for IB systems. - -Signed-off-by: Vadim Pasternak ---- - drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c -index 15116d9305f8..7396b37bc880 100644 ---- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c -+++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c -@@ -53,6 +53,7 @@ struct mlxsw_m_port { - - static int mlxsw_m_base_mac_get(struct mlxsw_m *mlxsw_m) - { -+#if 0 - char spad_pl[MLXSW_REG_SPAD_LEN] = {0}; - int err; - -@@ -60,6 +61,7 @@ static int mlxsw_m_base_mac_get(struct mlxsw_m *mlxsw_m) - if (err) - return err; - mlxsw_reg_spad_base_mac_memcpy_from(spad_pl, mlxsw_m->base_mac); -+#endif - return 0; - } - --- -2.20.1 - diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index d91823d41d46..8554e9a03792 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -MLNX_SDK_VERSION = 4.6.2202 +MLNX_SDK_VERSION = 4.6.3064 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DRIVERS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers diff --git a/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c b/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c index e13b65e704c6..338b0432de56 100644 --- a/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c +++ b/platform/pddf/i2c/modules/fan/driver/pddf_fan_driver.c @@ -516,7 +516,7 @@ static int pddf_fan_probe(struct i2c_client *client, goto exit_free; } - data->hwmon_dev = hwmon_device_register_with_info(&client->dev, client->name, NULL, NULL, NULL); + data->hwmon_dev = hwmon_device_register_with_groups(&client->dev, client->name, NULL, NULL); if (IS_ERR(data->hwmon_dev)) { status = PTR_ERR(data->hwmon_dev); goto exit_remove; diff --git a/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c b/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c index 3af93b91a7a3..9fbf652a09c9 100644 --- a/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c +++ b/platform/pddf/i2c/modules/psu/driver/pddf_psu_driver.c @@ -243,7 +243,7 @@ static int psu_probe(struct i2c_client *client, goto exit_free; } - data->hwmon_dev = hwmon_device_register_with_info(&client->dev, client->name, NULL, NULL, NULL); + data->hwmon_dev = hwmon_device_register_with_groups(&client->dev, client->name, NULL, NULL); if (IS_ERR(data->hwmon_dev)) { status = PTR_ERR(data->hwmon_dev); goto exit_remove; diff --git a/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c b/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c index 57b6f8b99e06..d611fa6efcc9 100644 --- a/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c +++ b/platform/pddf/i2c/modules/xcvr/driver/pddf_xcvr_driver.c @@ -159,7 +159,7 @@ static int xcvr_probe(struct i2c_client *client, goto exit_free; } - data->xdev = hwmon_device_register_with_info(&client->dev, client->name, NULL, NULL, NULL); + data->xdev = hwmon_device_register_with_groups(&client->dev, client->name, NULL, NULL); if (IS_ERR(data->xdev)) { status = PTR_ERR(data->xdev); goto exit_remove; diff --git a/platform/vs/syncd-vs.mk b/platform/vs/syncd-vs.mk index 7070240cbd25..e9edf78b2520 100644 --- a/platform/vs/syncd-vs.mk +++ b/platform/vs/syncd-vs.mk @@ -4,7 +4,7 @@ SYNCD_VS = syncd-vs_1.0.0_$(CONFIGURED_ARCH).deb $(SYNCD_VS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBSAIVS) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_VS))) -SYNCD_VS_DBGSYM = syncd-vs-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb -$(SYNCD_VS_DBGSYM)_DEPENDS += $(SYNCD_VS) -$(SYNCD_VS_DBGSYM)_RDEPENDS += $(SYNCD_VS) -$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_VS_DBGSYM))) +SYNCD_VS_DBG = syncd-vs-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb +$(SYNCD_VS_DBG)_DEPENDS += $(SYNCD_VS) +$(SYNCD_VS_DBG)_RDEPENDS += $(SYNCD_VS) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(SYNCD_VS_DBG))) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 13915a49e44a..6462b4d41165 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -8,12 +8,12 @@ $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM) $(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCPRELAY) $(LIBSWSSCOMMON) $(SONIC_RSYSLOG_PLUGIN) -$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCPRELAY_DBG) $(SONIC_DHCPMON_DBG) $(SONIC_RSYSLOG_PLUGIN) -$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) $(DOCKER_DHCP_RELAY)_INSTALL_PYTHON_WHEELS = $(SONIC_UTILITIES_PY3) $(DOCKER_DHCP_RELAY)_INSTALL_DEBS = $(PYTHON3_SWSSCOMMON) @@ -29,9 +29,7 @@ $(DOCKER_DHCP_RELAY)_SERVICE_BEFORE = ntp-config $(DOCKER_DHCP_RELAY)_SERVICE_DEPENDENT_OF = swss SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) -SONIC_BULLSEYE_DOCKERS += $(DOCKER_DHCP_RELAY) SONIC_DOCKER_DBG_IMAGES += $(DOCKER_DHCP_RELAY_DBG) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG) ifeq ($(INCLUDE_KUBERNETES),y) $(DOCKER_DHCP_RELAY)_DEFAULT_FEATURE_OWNER = kube diff --git a/rules/docker-eventd.mk b/rules/docker-eventd.mk index 49ac4f46838b..77c4fad21ea8 100644 --- a/rules/docker-eventd.mk +++ b/rules/docker-eventd.mk @@ -6,12 +6,12 @@ DOCKER_EVENTD_DBG = $(DOCKER_EVENTD_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_EVENTD)_DEPENDS += $(SONIC_EVENTD) -$(DOCKER_EVENTD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_EVENTD)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) $(DOCKER_EVENTD)_DBG_DEPENDS += $(SONIC_EVENTD_DBG) $(LIBSWSSCOMMON_DBG) -$(DOCKER_EVENTD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_EVENTD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_EVENTD)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_EVENTD)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) $(DOCKER_EVENTD)_PATH = $(DOCKERS_PATH)/$(DOCKER_EVENTD_STEM) @@ -37,5 +37,5 @@ $(DOCKER_EVENTD)_RUN_OPT += -t $(DOCKER_EVENTD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_EVENTD)_RUN_OPT += -v /etc/timezone:/etc/timezone:ro -SONIC_BULLSEYE_DOCKERS += $(DOCKER_EVENTD) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_EVENTD_DBG) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_EVENTD) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_EVENTD_DBG) diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index a225ec99bc93..99cca6f70084 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -6,7 +6,7 @@ DOCKER_PLATFORM_MONITOR_DBG = $(DOCKER_PLATFORM_MONITOR_STEM)-$(DBG_IMAGE_MARK). $(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/$(DOCKER_PLATFORM_MONITOR_STEM) -$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL) $(SENSORD) $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) +$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL) $(SENSORD) $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(IPMITOOL) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) @@ -27,13 +27,14 @@ ifeq ($(PDDF_SUPPORT),y) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(PDDF_PLATFORM_API_BASE_PY3) endif -$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG) $(LIBSENSORS_DBG) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LM_SENSORS_DBG) $(SENSORD_DBG) +$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(IPMITOOL_DBG) -$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) $(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 $(DOCKER_PLATFORM_MONITOR)_PACKAGE_NAME = pmon @@ -66,5 +67,5 @@ $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/sbin/SmartCmd $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/bin/ethtool $(DOCKER_PLATFORM_MONITOR)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) -SONIC_BULLSEYE_DOCKERS += $(DOCKER_PLATFORM_MONITOR) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_PLATFORM_MONITOR) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) diff --git a/rules/isc-dhcp.mk b/rules/isc-dhcp.mk index 5dc98d5d5653..803ffba7a0d1 100644 --- a/rules/isc-dhcp.mk +++ b/rules/isc-dhcp.mk @@ -1,7 +1,7 @@ # isc-dhcp packages -ISC_DHCP_VERSION = 4.4.1 -ISC_DHCP_VERSION_FULL = ${ISC_DHCP_VERSION}-2.3+deb11u2 +ISC_DHCP_VERSION = 4.4.3-P1 +ISC_DHCP_VERSION_FULL = ${ISC_DHCP_VERSION}-2 export ISC_DHCP_VERSION ISC_DHCP_VERSION_FULL diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index b33f7cc3a61c..d5a76f076ec9 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -7,7 +7,7 @@ LM_SENSORS_PATCH_VERSION = 0 LIBSENSORS_VERSION = 5 LM_SENSORS_VERSION=$(LM_SENSORS_MAJOR_VERSION).$(LM_SENSORS_MINOR_VERSION).$(LM_SENSORS_PATCH_VERSION) -LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-7 +LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-7.1 LM_SENSORS = lm-sensors_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(LM_SENSORS)_SRC_PATH = $(SRC_PATH)/lm-sensors diff --git a/rules/phy-credo.mk b/rules/phy-credo.mk index 2ade08eba19d..cfc62e77ebb9 100644 --- a/rules/phy-credo.mk +++ b/rules/phy-credo.mk @@ -1,3 +1,3 @@ PHY_CREDO = phy-credo_1.0_amd64.deb -$(PHY_CREDO)_URL = "https://github.com/aristanetworks/sonic-firmware/raw/446f30ccd8626f904d89d5798da7294948e090a6/phy/phy-credo_1.0_amd64.deb" +$(PHY_CREDO)_URL = "https://github.com/aristanetworks/sonic-firmware/raw/9e34da2a2d2d1e7e972cda3064b7b73c0558b322/phy/phy-credo_1.0_amd64.deb" SONIC_ONLINE_DEBS += $(PHY_CREDO) diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 163e9b797645..1dae3b6bb8d4 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -29,20 +29,20 @@ LIBSAIMETADATA_DEV = libsaimetadata-dev_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH $(LIBSAIMETADATA_DEV)_DEPENDS += $(LIBSAIMETADATA) $(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_DEV))) -LIBSAIREDIS_DBGSYM = $(LIBSAIREDIS_NAME)-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb -$(LIBSAIREDIS_DBGSYM)_DEPENDS += $(LIBSAIREDIS) -$(LIBSAIREDIS_DBGSYM)_RDEPENDS += $(LIBSAIREDIS) -$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIREDIS_DBGSYM))) - -LIBSAIVS_DBGSYM = libsaivs-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb -$(LIBSAIVS_DBGSYM)_DEPENDS += $(LIBSAIVS) -$(LIBSAIVS_DBGSYM)_RDEPENDS += $(LIBSAIVS) -$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DBGSYM))) - -LIBSAIMETADATA_DBGSYM = libsaimetadata-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb -$(LIBSAIMETADATA_DBGSYM)_DEPENDS += $(LIBSAIMETADATA) -$(LIBSAIMETADATA_DBGSYM)_RDEPENDS += $(LIBSAIMETADATA) -$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_DBGSYM))) +LIBSAIREDIS_DBG = $(LIBSAIREDIS_NAME)-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb +$(LIBSAIREDIS_DBG)_DEPENDS += $(LIBSAIREDIS) +$(LIBSAIREDIS_DBG)_RDEPENDS += $(LIBSAIREDIS) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIREDIS_DBG))) + +LIBSAIVS_DBG = libsaivs-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb +$(LIBSAIVS_DBG)_DEPENDS += $(LIBSAIVS) +$(LIBSAIVS_DBG)_RDEPENDS += $(LIBSAIVS) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIVS_DBG))) + +LIBSAIMETADATA_DBG = libsaimetadata-dbgsym_$(LIBSAIREDIS_VERSION)_$(CONFIGURED_ARCH).deb +$(LIBSAIMETADATA_DBG)_DEPENDS += $(LIBSAIMETADATA) +$(LIBSAIMETADATA_DBG)_RDEPENDS += $(LIBSAIMETADATA) +$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_DBG))) ifeq ($(ENABLE_PY2_MODULES), n) $(LIBSAIREDIS)_DEB_BUILD_PROFILES += nopython2 diff --git a/rules/sonic-fips.mk b/rules/sonic-fips.mk index 3ce37224bf64..b6c0d1743ff2 100644 --- a/rules/sonic-fips.mk +++ b/rules/sonic-fips.mk @@ -53,9 +53,10 @@ FIPS_KRB5_ALL = $(FIPS_KRB5) $(FIPS_KRB5_SUPPORT0) $(FIPS_KRB5_3) $(FIPS_KRB5_LI FIPS_DERIVED_TARGET = $(FIPS_OPENSSL_ALL) $(FIPS_OPENSSH_ALL) $(FIPS_GOLANG_ALL) $(FIPS_PYTHON_ALL) $(FIPS_KRB5_ALL) FIPS_PACKAGE_ALL = $(SYMCRYPT_OPENSSL) $(FIPS_DERIVED_TARGET) -$(foreach package,$(FIPS_DERIVED_TARGET),$(eval $(call add_extra_package,$(SYMCRYPT_OPENSSL),$(package)))) ifeq ($(INCLUDE_FIPS), y) FIPS_BASEIMAGE_INSTALLERS = $(FIPS_OPENSSL_LIBSSL) $(FIPS_OPENSSL_LIBSSL_DEV) $(FIPS_OPENSSL) $(SYMCRYPT_OPENSSL) $(FIPS_OPENSSH) $(FIPS_OPENSSH_CLIENT) $(FIPS_OPENSSH_SFTP_SERVER) $(FIPS_OPENSSH_SERVER) $(FIPS_KRB5) SONIC_MAKE_DEBS += $(SYMCRYPT_OPENSSL) + +$(foreach package,$(FIPS_DERIVED_TARGET),$(eval $(call add_extra_package,$(SYMCRYPT_OPENSSL),$(package)))) endif diff --git a/rules/syncd.mk b/rules/syncd.mk index 2f5cce6cebff..cbed33fbf50f 100644 --- a/rules/syncd.mk +++ b/rules/syncd.mk @@ -21,16 +21,16 @@ $(SYNCD)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV) $(SYNCD)_DEB_BUILD_PROFILES += rpc endif -SYNCD_DBGSYM = syncd-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb -$(SYNCD_DBGSYM)_DEPENDS += $(SYNCD) -$(SYNCD_DBGSYM)_RDEPENDS += $(SYNCD) -$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_DBGSYM))) +SYNCD_DBG = syncd-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb +$(SYNCD_DBG)_DEPENDS += $(SYNCD) +$(SYNCD_DBG)_RDEPENDS += $(SYNCD) +$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_DBG))) ifeq ($(ENABLE_SYNCD_RPC),y) -SYNCD_RPC_DBGSYM = syncd-rpc-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb -$(SYNCD_RPC_DBGSYM)_DEPENDS += $(SYNCD_RPC) -$(SYNCD_RPC_DBGSYM)_RDEPENDS += $(SYNCD_RPC) -$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC_DBGSYM))) +SYNCD_RPC_DBG = syncd-rpc-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb +$(SYNCD_RPC_DBG)_DEPENDS += $(SYNCD_RPC) +$(SYNCD_RPC_DBG)_RDEPENDS += $(SYNCD_RPC) +$(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC_DBG))) endif ifeq ($(ENABLE_PY2_MODULES), n) diff --git a/scripts/wait_for_docker.sh b/scripts/wait_for_docker.sh index 744646732826..e76af076b991 100755 --- a/scripts/wait_for_docker.sh +++ b/scripts/wait_for_docker.sh @@ -3,7 +3,7 @@ total_time=$1 cnt=0 while [ $cnt -le $total_time ]; do - docker info 1>/dev/null + docker info &>/dev/null rv=$? if [ $rv -eq 0 ]; then exit 0 @@ -12,4 +12,9 @@ while [ $cnt -le $total_time ]; do cnt=$((cnt+1)) done +echo 'Timed out waiting for internal docker daemon to start' > /dev/stderr +echo '==== START OF /var/log/docker.log ====' +cat /var/log/docker.log +echo '==== END OF /var/log/docker.log ====' + exit 1 diff --git a/sonic-slave-bookworm/Dockerfile.j2 b/sonic-slave-bookworm/Dockerfile.j2 index 4af1b401cc25..34d517556733 100644 --- a/sonic-slave-bookworm/Dockerfile.j2 +++ b/sonic-slave-bookworm/Dockerfile.j2 @@ -258,6 +258,7 @@ RUN apt-get update && apt-get install -y \ python3-nose \ python3-venv \ gcovr \ + lcov \ python3-pytest-cov \ python3-pytest-cov \ python3-parse \ @@ -418,7 +419,9 @@ RUN apt-get update && apt-get install -y \ auditd \ # For protobuf protobuf-compiler \ - libprotobuf-dev + libprotobuf-dev \ +# For sonic-dhcp6relay build + libjsoncpp-dev {%- if CROSS_BUILD_ENVIRON == "y" %} # Arm vs. amd64 versions conflict - remove amd64 packages @@ -479,6 +482,10 @@ RUN patch -p1 -i /disable-non-manylinux.patch /usr/local/lib/python3.11/dist-pac # For building sonic-utilities RUN pip3 install fastentrypoints mock +# For building sonic_ycabled +# Note: Match version in bookworm +RUN pip3 install grpcio==1.51.1 grpcio-tools==1.51.1 + # For running Python unit tests RUN pip3 install pytest-runner==5.2 RUN pip3 install mockredispy==2.9.3 diff --git a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index e6d09dedc711..7eafe3b7790e 100644 --- a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -4,11 +4,11 @@ Date: Thu, 25 Apr 2019 22:07:20 +0000 Subject: [PATCH] Customizable Option 82 circuit ID and remote ID fields --- - relay/dhcrelay.c | 171 ++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 147 insertions(+), 24 deletions(-) + relay/dhcrelay.c | 178 +++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 150 insertions(+), 28 deletions(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 0cb2ef6..418b943 100644 +index 3b9c71b..19843f7 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -75,6 +75,8 @@ int bad_circuit_id = 0; /* Circuit ID option in matching RAI option @@ -20,7 +20,7 @@ index 0cb2ef6..418b943 100644 int max_hop_count = 10; /* Maximum hop count */ int no_daemon = 0; -@@ -151,10 +153,20 @@ static const char url[] = +@@ -160,10 +162,20 @@ static const char url[] = char *progname; @@ -42,7 +42,7 @@ index 0cb2ef6..418b943 100644 " [-A ] [-c ]\n" \ " [-p | -rp ]\n" \ " [-pf ] [--no-pid]\n"\ -@@ -171,11 +183,11 @@ char *progname; +@@ -180,11 +192,11 @@ char *progname; " -l lower0 [ ... -l lowerN]\n" \ " -u upper0 [ ... -u upperN]\n" \ " lower (client link): [address%%]interface[#index]\n" \ @@ -56,7 +56,7 @@ index 0cb2ef6..418b943 100644 " [-A ] [-c ] [-p ]\n" \ " [-pf ] [--no-pid]\n"\ " [-m append|replace|forward|discard]\n" \ -@@ -190,13 +202,13 @@ char *progname; +@@ -199,13 +211,13 @@ char *progname; " -l lower0 [ ... -l lowerN]\n" \ " -u upper0 [ ... -u upperN]\n" \ " lower (client link): [address%%]interface[#index]\n" \ @@ -72,10 +72,10 @@ index 0cb2ef6..418b943 100644 " [-p | -rp ]\n" \ " [-pf ] [--no-pid]\n" \ " [-m append|replace|forward|discard]\n" \ -@@ -204,18 +216,18 @@ char *progname; +@@ -213,18 +225,18 @@ char *progname; " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ -" server0 [ ... serverN]\n\n" \ +" server0 [ ... serverN]\n\n" DHCRELAY_OPTION82_USAGE \ " %s {--version|--help|-h}" @@ -88,13 +88,13 @@ index 0cb2ef6..418b943 100644 " [-i interface0 [ ... -i interfaceN]\n" \ " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ -" server0 [ ... serverN]\n\n" \ +" server0 [ ... serverN]\n\n" DHCRELAY_OPTION82_USAGE \ " %s {--version|--help|-h}" #endif #endif -@@ -471,6 +483,15 @@ main(int argc, char **argv) { +@@ -480,6 +492,15 @@ main(int argc, char **argv) { local_family_set = 1; local_family = AF_INET; #endif @@ -110,7 +110,7 @@ index 0cb2ef6..418b943 100644 add_agent_options = 1; } else if (!strcmp(argv[i], "-A")) { #ifdef DHCPv6 -@@ -1171,6 +1192,81 @@ find_interface_by_agent_option(struct dhcp_packet *packet, +@@ -1207,6 +1228,81 @@ find_interface_by_agent_option(struct dhcp_packet *packet, return (-1); } @@ -192,7 +192,7 @@ index 0cb2ef6..418b943 100644 /* * Examine a packet to see if it's a candidate to have a Relay * Agent Information option tacked onto its tail. If it is, tack -@@ -1180,9 +1276,12 @@ static int +@@ -1216,9 +1312,12 @@ int add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, unsigned length, struct in_addr giaddr) { int is_dhcp = 0, mms; @@ -206,7 +206,7 @@ index 0cb2ef6..418b943 100644 /* If we're not adding agent options to packets, we can skip this. */ -@@ -1316,17 +1415,40 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1357,17 +1456,40 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, op = sp; #endif @@ -258,7 +258,7 @@ index 0cb2ef6..418b943 100644 } if (adding_link_select) { -@@ -1351,7 +1473,7 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1392,7 +1514,7 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, * If not, forward without adding the option. */ if (max - sp >= optlen + 3) { @@ -267,7 +267,7 @@ index 0cb2ef6..418b943 100644 /* Okay, cons up *our* Relay Agent Information option. */ *sp++ = DHO_DHCP_AGENT_OPTIONS; -@@ -1359,16 +1481,16 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1400,16 +1522,16 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, /* Copy in the circuit id... */ *sp++ = RAI_CIRCUIT_ID; @@ -292,5 +292,5 @@ index 0cb2ef6..418b943 100644 /* RFC3527: Use the inbound packet's interface address in -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch index f26871019b63..ec12771524b1 100644 --- a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -9,10 +9,10 @@ Subject: [PATCH] Support for loading port alias map file to replace port name 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 00c81d3..54f132a 100644 +index 0d9b2e7..b72b1bc 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c -@@ -129,6 +129,14 @@ static void setup_streams(void); +@@ -133,6 +133,14 @@ static void setup_streams(void); char *dhcrelay_sub_id = NULL; #endif @@ -24,11 +24,11 @@ index 00c81d3..54f132a 100644 +static struct interface_name_alias_tuple *g_interface_name_alias_map = NULL; +static size_t g_interface_name_alias_map_size = 0; + + #ifndef UNIT_TEST static void do_relay4(struct interface_info *, struct dhcp_packet *, unsigned int, unsigned int, struct iaddr, - struct hardware *); -@@ -143,6 +151,10 @@ static int strip_relay_agent_options(struct interface_info *, - +@@ -152,6 +160,10 @@ extern int strip_relay_agent_options(struct interface_info *, + #ifndef UNIT_TEST static void request_v4_interface(const char* name, int flags); +static int load_interface_alias_map(const char *port_alias_map_file_path); @@ -36,9 +36,9 @@ index 00c81d3..54f132a 100644 +static void free_interface_alias_map(void); + static const char copyright[] = - "Copyright 2004-2018 Internet Systems Consortium."; + "Copyright 2004-2022 Internet Systems Consortium."; static const char arr[] = "All rights reserved."; -@@ -158,7 +170,7 @@ char *progname; +@@ -167,7 +179,7 @@ char *progname; "\n" \ " %%%% A single %%\n" \ " %%h Hostname of device\n" \ @@ -47,7 +47,7 @@ index 00c81d3..54f132a 100644 " %%P Hardware address of interface that generated the request\n" \ " %%C Client hardware address\n" \ " %%I DHCP relay agent IP Address\n" \ -@@ -171,6 +183,7 @@ char *progname; +@@ -180,6 +192,7 @@ char *progname; " [-p | -rp ]\n" \ " [-pf ] [--no-pid]\n"\ " [-m append|replace|forward|discard]\n" \ @@ -55,7 +55,7 @@ index 00c81d3..54f132a 100644 " [-i interface0 [ ... -i interfaceN]\n" \ " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ -@@ -179,6 +192,7 @@ char *progname; +@@ -188,6 +201,7 @@ char *progname; " %s -6 [-d] [-q] [-I] [-c ]\n" \ " [-p | -rp ]\n" \ " [-pf ] [--no-pid]\n" \ @@ -63,7 +63,7 @@ index 00c81d3..54f132a 100644 " [-s ]\n" \ " -l lower0 [ ... -l lowerN]\n" \ " -u upper0 [ ... -u upperN]\n" \ -@@ -619,6 +633,11 @@ main(int argc, char **argv) { +@@ -643,6 +657,11 @@ main(int argc, char **argv) { no_dhcrelay_pid = ISC_TRUE; } else if (!strcmp(argv[i], "--no-pid")) { no_pid_file = ISC_TRUE; @@ -75,7 +75,7 @@ index 00c81d3..54f132a 100644 } else if (argv[i][0] == '-') { usage("Unknown command: %s", argv[i]); } else { -@@ -841,6 +860,7 @@ main(int argc, char **argv) { +@@ -865,6 +884,7 @@ main(int argc, char **argv) { dispatch(); /* In fact dispatch() never returns. */ @@ -83,7 +83,7 @@ index 00c81d3..54f132a 100644 return (0); } -@@ -1271,6 +1291,7 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack +@@ -1307,6 +1327,7 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack */ if (packet->htype && !packet->giaddr.s_addr) { int ret = 0, vlanid = 0; @@ -91,10 +91,11 @@ index 00c81d3..54f132a 100644 ret = _bridgefdbquery(print_hw_addr(packet->htype, packet->hlen, packet->chaddr), ifname, -@@ -1287,6 +1308,18 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack +@@ -1322,6 +1343,18 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack + strncpy(ifname, ip->name, IFNAMSIZ); } - ++ + // Attempt to translate SONiC interface name to vendor alias + ret = get_interface_alias_by_name(ifname, ifalias); + if (ret < 0) { @@ -106,11 +107,10 @@ index 00c81d3..54f132a 100644 + + strncpy(ifname, ifalias, IFNAMSIZ); + } -+ + str = ifname; } - break; -@@ -2313,3 +2346,73 @@ void request_v4_interface(const char* name, int flags) { +@@ -2361,3 +2394,73 @@ void request_v4_interface(const char* name, int flags) { interface_snorf(tmp, (INTERFACE_REQUESTED | flags)); interface_dereference(&tmp, MDL); } @@ -185,5 +185,5 @@ index 00c81d3..54f132a 100644 + g_interface_name_alias_map_size = 0; +} -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0005-Add-enable-use-sockets-to-configure-flags-in-debian-.patch b/src/isc-dhcp/patch/0005-Add-enable-use-sockets-to-configure-flags-in-debian-.patch index 7e9bcc30fb89..48e7f5d20fac 100644 --- a/src/isc-dhcp/patch/0005-Add-enable-use-sockets-to-configure-flags-in-debian-.patch +++ b/src/isc-dhcp/patch/0005-Add-enable-use-sockets-to-configure-flags-in-debian-.patch @@ -9,18 +9,18 @@ Subject: [PATCH 1/3] Add --enable-use-sockets to configure flags in 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules -index d3fcc1d..2a7219d 100755 +index dc2a9b1..3d12fb5 100755 --- a/debian/rules +++ b/debian/rules -@@ -24,7 +24,7 @@ CFLAGS+=-D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"' +@@ -23,7 +23,7 @@ CFLAGS+=-D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"' CFLAGS+=-D_PATH_DHCLIENT_DB='\"$(LEASE_PATH)/dhclient.leases\"' CFLAGS+=-D_PATH_DHCLIENT6_DB='\"$(LEASE_PATH)/dhclient6.leases\"' --CONFFLAGS=--prefix=/usr --with-libbind=/usr --enable-log-pid --enable-paranoia -+CONFFLAGS=--prefix=/usr --with-libbind=/usr --enable-log-pid --enable-paranoia --enable-use-sockets +-CONFFLAGS+=--prefix=/usr --enable-log-pid --enable-paranoia ++CONFFLAGS+=--prefix=/usr --enable-log-pid --enable-paranoia --enable-use-sockets + include /usr/share/dpkg/buildtools.mk # cross-architecture building - ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0006-Bugfix-Ensure-HAVE_SO_BINDTODEVICE-has-a-chance-to-b.patch b/src/isc-dhcp/patch/0006-Bugfix-Ensure-HAVE_SO_BINDTODEVICE-has-a-chance-to-b.patch index 5553180f40e2..f0e06b692e1b 100644 --- a/src/isc-dhcp/patch/0006-Bugfix-Ensure-HAVE_SO_BINDTODEVICE-has-a-chance-to-b.patch +++ b/src/isc-dhcp/patch/0006-Bugfix-Ensure-HAVE_SO_BINDTODEVICE-has-a-chance-to-b.patch @@ -9,10 +9,10 @@ Subject: [PATCH 2/3] Bugfix: Ensure HAVE_SO_BINDTODEVICE has a chance to be 1 file changed, 120 insertions(+), 119 deletions(-) diff --git a/includes/osdep.h b/includes/osdep.h -index cfae90b..f07c43c 100644 +index 0742858..dfccb8c 100644 --- a/includes/osdep.h +++ b/includes/osdep.h -@@ -48,37 +48,6 @@ +@@ -47,37 +47,6 @@ #define BYTE_ORDER DHCP_BYTE_ORDER #endif /* BYTE_ORDER */ @@ -50,7 +50,7 @@ index cfae90b..f07c43c 100644 #if !defined (TIME_MAX) # define TIME_MAX 2147483647 #endif -@@ -91,94 +60,6 @@ +@@ -90,98 +59,10 @@ # define vsnprintf isc_print_vsnprintf #endif @@ -102,6 +102,10 @@ index cfae90b..f07c43c 100644 -# define USE_UPF_RECEIVE -#endif - + #if defined (SO_BINDTODEVICE) && !defined (HAVE_SO_BINDTODEVICE) + # define HAVE_SO_BINDTODEVICE + #endif + -/* Porting:: - - If you add support for sending packets directly out an interface, @@ -145,7 +149,7 @@ index cfae90b..f07c43c 100644 /* If we don't have a DLPI packet filter, we have to filter in userland. Probably not worth doing, actually. */ #if defined (USE_DLPI_RECEIVE) && !defined (USE_DLPI_PFMOD) -@@ -288,4 +169,124 @@ +@@ -287,4 +168,124 @@ # define STDERR_FILENO 2 #endif @@ -271,5 +275,5 @@ index cfae90b..f07c43c 100644 + #endif /* __ISC_DHCP_OSDEP_H__ */ -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0007-If-destination-of-BOOTREQUEST-is-directed-broadcast-.patch b/src/isc-dhcp/patch/0007-If-destination-of-BOOTREQUEST-is-directed-broadcast-.patch index bf24e448ea1a..63d14701fe9a 100644 --- a/src/isc-dhcp/patch/0007-If-destination-of-BOOTREQUEST-is-directed-broadcast-.patch +++ b/src/isc-dhcp/patch/0007-If-destination-of-BOOTREQUEST-is-directed-broadcast-.patch @@ -6,16 +6,16 @@ Subject: [PATCH 3/3] If destination of BOOTREQUEST is directed broadcast, interfaces --- - common/discover.c | 46 +++++++++++++++++++--- + common/discover.c | 40 +++++++++++++++++++-- includes/dhcpd.h | 3 ++ - relay/dhcrelay.c | 98 +++++++++++++++++++++++++++++++++++++++++------ - 3 files changed, 131 insertions(+), 16 deletions(-) + relay/dhcrelay.c | 90 +++++++++++++++++++++++++++++++++++++++++++---- + 3 files changed, 123 insertions(+), 10 deletions(-) diff --git a/common/discover.c b/common/discover.c -index 98ac46a..53afecc 100644 +index 0c5ad39..32f2516 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -236,6 +236,7 @@ struct iface_conf_list { +@@ -239,6 +239,7 @@ struct iface_conf_list { struct iface_info { char name[IF_NAMESIZE+1]; /* name of the interface, e.g. "bge0" */ struct sockaddr_storage addr; /* address information */ @@ -23,7 +23,7 @@ index 98ac46a..53afecc 100644 isc_uint64_t flags; /* interface flags, e.g. IFF_LOOPBACK */ }; -@@ -367,6 +368,17 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) { +@@ -370,6 +371,17 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) { } info->flags = tmp.lifr_flags; @@ -41,7 +41,7 @@ index 98ac46a..53afecc 100644 ifaces->next++; *err = 0; return 1; -@@ -410,6 +422,7 @@ struct iface_conf_list { +@@ -413,6 +425,7 @@ struct iface_conf_list { struct iface_info { char name[IFNAMSIZ]; /* name of the interface, e.g. "bge0" */ struct sockaddr_storage addr; /* address information */ @@ -49,17 +49,17 @@ index 98ac46a..53afecc 100644 isc_uint64_t flags; /* interface flags, e.g. IFF_LOOPBACK */ }; -@@ -487,7 +500,8 @@ end_iface_scan(struct iface_conf_list *ifaces) { +@@ -490,7 +503,8 @@ end_iface_scan(struct iface_conf_list *ifaces) { /* XXX: perhaps create drealloc() rather than do it manually */ void - add_ipv4_addr_to_interface(struct interface_info *iface, + add_ipv4_addr_to_interface(struct interface_info *iface, - const struct in_addr *addr) { + const struct in_addr *addr, + const struct in_addr *netmask) { /* * We don't expect a lot of addresses per IPv4 interface, so * we use 4, as our "chunk size" for collecting addresses. -@@ -498,6 +512,11 @@ add_ipv4_addr_to_interface(struct interface_info *iface, +@@ -501,6 +515,11 @@ add_ipv4_addr_to_interface(struct interface_info *iface, log_fatal("Out of memory saving IPv4 address " "on interface."); } @@ -71,7 +71,7 @@ index 98ac46a..53afecc 100644 iface->address_count = 0; iface->address_max = 4; } else if (iface->address_count >= iface->address_max) { -@@ -515,9 +534,23 @@ add_ipv4_addr_to_interface(struct interface_info *iface, +@@ -518,9 +537,23 @@ add_ipv4_addr_to_interface(struct interface_info *iface, iface->address_max * sizeof(struct in_addr)); dfree(iface->addresses, MDL); iface->addresses = tmp; @@ -96,15 +96,15 @@ index 98ac46a..53afecc 100644 } #ifdef DHCPv6 -@@ -656,6 +689,7 @@ discover_interfaces(int state) { - if ((info.addr.ss_family == AF_INET) && +@@ -661,6 +694,7 @@ discover_interfaces(int state) { + if ((info.addr.ss_family == AF_INET) && (local_family == AF_INET)) { struct sockaddr_in *a = (struct sockaddr_in*)&info.addr; + struct sockaddr_in *n = (struct sockaddr_in*)&info.netmask; struct iaddr addr; /* We don't want the loopback interface. */ -@@ -670,7 +704,7 @@ discover_interfaces(int state) { +@@ -675,7 +709,7 @@ discover_interfaces(int state) { if (a->sin_addr.s_addr != htonl(INADDR_ANY)) tmp->configured = 1; @@ -114,10 +114,10 @@ index 98ac46a..53afecc 100644 /* invoke the setup hook */ addr.len = 4; diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index df3da59..2c7f059 100644 +index 20f9bfb..b54a36e 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -1369,6 +1369,9 @@ struct interface_info { +@@ -1380,6 +1380,9 @@ struct interface_info { struct in_addr *addresses; /* Addresses associated with this * interface. */ @@ -128,7 +128,7 @@ index df3da59..2c7f059 100644 int address_max; /* Size of addresses buffer. */ struct in6_addr *v6addresses; /* IPv6 addresses associated with diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 54f132a..beae977 100644 +index b72b1bc..9143e85 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -30,6 +30,7 @@ @@ -139,7 +139,7 @@ index 54f132a..beae977 100644 #include TIME default_lease_time = 43200; /* 12 hours... */ -@@ -1001,20 +1002,95 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1030,20 +1031,95 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, /* Otherwise, it's a BOOTREQUEST, so forward it to all the servers. */ for (sp = servers; sp; sp = sp->next) { @@ -147,7 +147,6 @@ index 54f132a..beae977 100644 - ? fallback_interface : interfaces), - NULL, packet, length, ip->addresses[0], - &sp->to, NULL) < 0) { -- ++client_packet_errors; + int packet_relay_attempted = 0; + + log_debug("Server IP: %s", inet_ntoa(sp->to.sin_addr)); @@ -180,14 +179,16 @@ index 54f132a..beae977 100644 + log_debug("Packet destined for broadcast IP of %s", out->name); + if (send_packet(out, NULL, packet, + length, ip->addresses[0],&sp->to, NULL) < 0) { -+ ++client_packet_errors; -+ } else { -+ log_debug("Forwarded BOOTREQUEST for %s to %s on interface %s", -+ print_hw_addr(packet->htype, packet->hlen, -+ packet->chaddr), -+ inet_ntoa(sp->to.sin_addr), out->name); -+ -+ ++client_packets_relayed; + ++client_packet_errors; + } else { +- log_debug("Forwarded BOOTREQUEST for %s to %s", ++ log_debug("Forwarded BOOTREQUEST for %s to %s on interface %s", + print_hw_addr(packet->htype, packet->hlen, + packet->chaddr), +- inet_ntoa(sp->to.sin_addr)); ++ inet_ntoa(sp->to.sin_addr), out->name); ++ + ++client_packets_relayed; + } + + packet_relay_attempted = 1; @@ -198,8 +199,9 @@ index 54f132a..beae977 100644 + + if (packet_relay_attempted) + break; -+ } -+ + } +- } + + if (packet_relay_attempted) + continue; + @@ -217,12 +219,7 @@ index 54f132a..beae977 100644 + + ++client_packets_relayed; + } - } else { -- log_debug("Forwarded BOOTREQUEST for %s to %s", -- print_hw_addr(packet->htype, packet->hlen, -- packet->chaddr), -- inet_ntoa(sp->to.sin_addr)); -- ++client_packets_relayed; ++ } else { + for (out = interfaces; out; out = out->next) { + // Only relay BOOTREQUEST on upstream interfaces + if (!(out->flags & INTERFACE_UPSTREAM)) @@ -240,12 +237,11 @@ index 54f132a..beae977 100644 + ++client_packets_relayed; + } + } - } - } -- ++ } ++ } } - /* Strip any Relay Agent Information options from the DHCP packet + #endif /* UNIT_TEST */ -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0008-Don-t-skip-down-interfaces-when-discovering-interfac.patch b/src/isc-dhcp/patch/0008-Don-t-skip-down-interfaces-when-discovering-interfac.patch index f088b035edb4..212445307e38 100644 --- a/src/isc-dhcp/patch/0008-Don-t-skip-down-interfaces-when-discovering-interfac.patch +++ b/src/isc-dhcp/patch/0008-Don-t-skip-down-interfaces-when-discovering-interfac.patch @@ -14,10 +14,10 @@ didn't discover the interface(s) when it started up. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/discover.c b/common/discover.c -index 8d5b958..5efff49 100644 +index 32f2516..31dae3c 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -1016,7 +1016,8 @@ discover_interfaces(int state) { +@@ -668,7 +668,8 @@ discover_interfaces(int state) { info.flags & IFF_LOOPBACK || info.flags & IFF_POINTOPOINT) && !tmp) || (!(info.flags & IFF_UP) && @@ -25,8 +25,8 @@ index 8d5b958..5efff49 100644 + state != DISCOVER_UNCONFIGURED && + state != DISCOVER_RELAY)) continue; - + /* If there isn't already an interface by this name, -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0009-Support-for-dual-tor-scenario.patch b/src/isc-dhcp/patch/0009-Support-for-dual-tor-scenario.patch index 0f7495f49e7c..2fa3f0ed71de 100644 --- a/src/isc-dhcp/patch/0009-Support-for-dual-tor-scenario.patch +++ b/src/isc-dhcp/patch/0009-Support-for-dual-tor-scenario.patch @@ -4,11 +4,11 @@ Date: Tue, 1 Dec 2020 16:33:34 -0800 Subject: [PATCH] support for dual tor scenario --- - relay/dhcrelay.c | 117 +++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 98 insertions(+), 19 deletions(-) + relay/dhcrelay.c | 115 +++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 97 insertions(+), 18 deletions(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index e158efe..055d97f 100644 +index 9143e85..4134a58 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -56,6 +56,8 @@ int bogus_agent_drops = 0; /* Packets dropped because agent option @@ -34,52 +34,51 @@ index e158efe..055d97f 100644 #ifdef DHCPv6 /* Force use of DHCPv6 interface-id option. */ isc_boolean_t use_if_id = ISC_FALSE; -@@ -156,6 +165,8 @@ static int load_interface_alias_map(const char *port_alias_map_file_path); +@@ -165,6 +174,8 @@ static int load_interface_alias_map(const char *port_alias_map_file_path); static int get_interface_alias_by_name(const char *if_name, char *if_alias_out); static void free_interface_alias_map(void); +static void free_downstream_intfs(void); + static const char copyright[] = - "Copyright 2004-2018 Internet Systems Consortium."; + "Copyright 2004-2022 Internet Systems Consortium."; static const char arr[] = "All rights reserved."; -@@ -189,6 +200,7 @@ char *progname; +@@ -198,6 +209,7 @@ char *progname; " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ +" [-dt]\n"\ " server0 [ ... serverN]\n\n" \ " %s -6 [-d] [-q] [-I] [-c ]\n" \ " [-p | -rp ]\n" \ -@@ -210,6 +222,7 @@ char *progname; +@@ -219,6 +231,7 @@ char *progname; " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ +" [-dt]\n"\ " server0 [ ... serverN]\n\n" \ " %s -6 [-d] [-q] [-I] [-c ] [-p ]\n" \ " [-pf ] [--no-pid]\n" \ -@@ -231,6 +244,7 @@ char *progname; +@@ -240,6 +253,7 @@ char *progname; " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ +" [-dt]\n"\ " server0 [ ... serverN]\n\n" DHCRELAY_OPTION82_USAGE \ " %s {--version|--help|-h}" #else -@@ -242,6 +256,7 @@ char *progname; +@@ -251,6 +265,7 @@ char *progname; " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ +" [-dt]\n"\ " server0 [ ... serverN]\n\n" DHCRELAY_OPTION82_USAGE \ " %s {--version|--help|-h}" #endif -@@ -639,7 +654,16 @@ main(int argc, char **argv) { +@@ -663,6 +678,15 @@ main(int argc, char **argv) { usage(use_noarg, argv[i-1]); if (load_interface_alias_map(argv[i]) != 0) log_fatal("Failed to load interface name-alias map."); -- } else if (argv[i][0] == '-') { + } else if (!strcmp(argv[i], "-dt")) { +#ifdef DHCPv6 + if (local_family_set && (local_family == AF_INET6)) { @@ -89,11 +88,10 @@ index e158efe..055d97f 100644 + local_family = AF_INET; +#endif + enable_support_for_dual_tor = 1; -+ } else if (argv[i][0] == '-') { + } else if (argv[i][0] == '-') { usage("Unknown command: %s", argv[i]); } else { - struct hostent *he; -@@ -747,7 +771,6 @@ main(int argc, char **argv) { +@@ -771,7 +795,6 @@ main(int argc, char **argv) { log_fatal("No servers specified."); } @@ -101,7 +99,7 @@ index e158efe..055d97f 100644 /* Set up the server sockaddrs. */ for (sp = servers; sp; sp = sp->next) { sp->to.sin_port = local_port; -@@ -862,6 +885,8 @@ main(int argc, char **argv) { +@@ -886,6 +909,8 @@ main(int argc, char **argv) { /* In fact dispatch() never returns. */ free_interface_alias_map(); @@ -110,7 +108,7 @@ index e158efe..055d97f 100644 return (0); } -@@ -885,25 +910,50 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, +@@ -909,25 +934,50 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, return; } @@ -174,7 +172,7 @@ index e158efe..055d97f 100644 } /* If it's a bootreply, forward it to the client. */ -@@ -913,6 +963,10 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, +@@ -937,6 +987,10 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, return; } @@ -182,10 +180,10 @@ index e158efe..055d97f 100644 + if (enable_support_for_dual_tor && !out) + return; + + log_debug("BOOTREPLY giaddr: %s\n", inet_ntoa(packet->giaddr)); if (!(packet->flags & htons(BOOTP_BROADCAST)) && can_unicast_without_arp(out)) { - to.sin_addr = packet->yiaddr; -@@ -945,9 +999,13 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, +@@ -970,9 +1024,13 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, return; if (!out) { @@ -202,7 +200,7 @@ index e158efe..055d97f 100644 return; } -@@ -989,6 +1047,7 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1023,6 +1081,7 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, that set giaddr, so we won't see it. */ if (!packet->giaddr.s_addr) packet->giaddr = ip->addresses[0]; @@ -210,7 +208,7 @@ index e158efe..055d97f 100644 if (packet->hops < max_hop_count) packet->hops = packet->hops + 1; else -@@ -1264,7 +1323,6 @@ find_interface_by_agent_option(struct dhcp_packet *packet, +@@ -1305,7 +1364,6 @@ find_interface_by_agent_option(struct dhcp_packet *packet, /* Scan the interface list looking for an interface whose name matches the one specified in circuit_id. */ @@ -218,7 +216,7 @@ index e158efe..055d97f 100644 for (ip = interfaces; ip; ip = ip->next) { if (ip->circuit_id && ip->circuit_id_len == circuit_id_len && -@@ -1668,6 +1726,7 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, +@@ -1714,6 +1772,7 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, *sp++ = 4u; memcpy(sp, &giaddr.s_addr, 4); sp += 4; @@ -226,7 +224,7 @@ index e158efe..055d97f 100644 packet->giaddr = uplink->addresses[0]; log_debug ("Adding link selection suboption" " with addr: %s", inet_ntoa(giaddr)); -@@ -2398,6 +2457,7 @@ void request_v4_interface(const char* name, int flags) { +@@ -2451,6 +2510,7 @@ void request_v4_interface(const char* name, int flags) { struct interface_info *tmp = NULL; int len = strlen(name); isc_result_t status; @@ -234,7 +232,7 @@ index e158efe..055d97f 100644 if (len >= sizeof(tmp->name)) { log_fatal("%s: interface name too long (is %d)", name, len); -@@ -2413,6 +2473,15 @@ void request_v4_interface(const char* name, int flags) { +@@ -2466,6 +2526,15 @@ void request_v4_interface(const char* name, int flags) { (flags & INTERFACE_UPSTREAM ? 'Y' : 'N'), (flags & INTERFACE_DOWNSTREAM ? 'Y' : 'N')); @@ -247,10 +245,10 @@ index e158efe..055d97f 100644 + ci->interface = tmp; + } + - strncpy(tmp->name, name, len); + memcpy(tmp->name, name, len); interface_snorf(tmp, (INTERFACE_REQUESTED | flags)); interface_dereference(&tmp, MDL); -@@ -2487,3 +2556,13 @@ free_interface_alias_map(void) { +@@ -2540,3 +2609,13 @@ free_interface_alias_map(void) { free(g_interface_name_alias_map); g_interface_name_alias_map_size = 0; } @@ -265,5 +263,5 @@ index e158efe..055d97f 100644 + } +} -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch b/src/isc-dhcp/patch/0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch index 19a1192032db..039c4479e23c 100644 --- a/src/isc-dhcp/patch/0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch +++ b/src/isc-dhcp/patch/0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch @@ -4,13 +4,13 @@ Date: Fri, 12 Mar 2021 23:30:56 -0800 Subject: [PATCH] add option -si to support using src intf ip in relay --- - common/socket.c | 119 ++++++++++++++++++++++++++++++++++++----------- + common/socket.c | 120 +++++++++++++++++++++++++++++++++++------------ includes/dhcpd.h | 1 + - relay/dhcrelay.c | 8 ++++ - 3 files changed, 100 insertions(+), 28 deletions(-) + relay/dhcrelay.c | 2 + + 3 files changed, 94 insertions(+), 29 deletions(-) diff --git a/common/socket.c b/common/socket.c -index 483eb9c..da9f501 100644 +index 3953eac..eae86e8 100644 --- a/common/socket.c +++ b/common/socket.c @@ -83,6 +83,29 @@ static unsigned int global_v4_socket_references = 0; @@ -43,7 +43,7 @@ index 483eb9c..da9f501 100644 /* * If we can't bind() to a specific interface, then we can only have * a single socket. This variable insures that we don't try to listen -@@ -712,37 +735,77 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) +@@ -722,38 +745,77 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) struct hardware *hto; { int result; @@ -59,8 +59,9 @@ index 483eb9c..da9f501 100644 - pktinfo.ipi_ifindex = interface->ifp->ifr_index; - if (setsockopt(interface->wfdesc, IPPROTO_IP, - IP_PKTINFO, (char *)&pktinfo, -- sizeof(pktinfo)) < 0) -- log_fatal("setsockopt: IP_PKTINFO: %m"); +- sizeof(pktinfo)) < 0) +- log_fatal("setsockopt: IP_PKTINFO for %s: %m", +- (char*)(interface->ifp)); + struct msghdr m; + struct iovec v; + struct sockaddr_in dst; @@ -150,10 +151,10 @@ index 483eb9c..da9f501 100644 } diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 36cd518..0c25582 100644 +index b54a36e..68d44cf 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -2660,6 +2660,7 @@ ssize_t send_fallback6(struct interface_info *, struct packet *, +@@ -2676,6 +2676,7 @@ ssize_t send_fallback6(struct interface_info *, struct packet *, #endif #ifdef USE_SOCKET_SEND @@ -162,10 +163,10 @@ index 36cd518..0c25582 100644 void if_register_send (struct interface_info *); void if_deregister_send (struct interface_info *); diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 221106a..c44a79d 100644 +index ccf7417..6aa1179 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c -@@ -431,6 +431,8 @@ main(int argc, char **argv) { +@@ -440,6 +440,8 @@ main(int argc, char **argv) { #endif } else if (!strcmp(argv[i], "-d")) { /* no_daemon = 1; */ @@ -175,5 +176,5 @@ index 221106a..c44a79d 100644 quiet = 1; quiet_interface_discovery = 1; -- -2.17.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch b/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch deleted file mode 100644 index 051b58966cae..000000000000 --- a/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0a2f9a62bceb90b0d30461add2e25c4ce7a24547 Mon Sep 17 00:00:00 2001 -From: Thomas Markwalder -Date: Fri, 20 Dec 2019 10:11:54 -0500 -Subject: [PATCH] [#71] Fix dhcrelay agent option buffer pointer logic - -relay/dhcrelay.c - strip_relay_agent_options() - strip_relay_agent_options() - - corrected buffer pointer logic - ---- - relay/dhcrelay.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 896e1e2e..980dacae 100644 ---- a/relay/dhcrelay.c -+++ b/relay/dhcrelay.c -@@ -1238,8 +1238,13 @@ strip_relay_agent_options(struct interface_info *in, - return (0); - - if (sp != op) { -- memmove(sp, op, op[1] + 2); -- sp += op[1] + 2; -+ size_t mlen = op[1] + 2; -+ memmove(sp, op, mlen); -+ sp += mlen; -+ if (sp > max) { -+ return (0); -+ } -+ - op = nextop; - } else - op = sp = nextop; -@@ -1620,8 +1620,13 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, - end_pad = NULL; - - if (sp != op) { -- memmove(sp, op, op[1] + 2); -- sp += op[1] + 2; -+ size_t mlen = op[1] + 2; -+ memmove(sp, op, mlen); -+ sp += mlen; -+ if (sp > max) { -+ return (0); -+ } -+ - op = nextop; - } else - op = sp = nextop; --- -2.17.1 - diff --git a/src/isc-dhcp/patch/0014-enable-parallel-build.patch b/src/isc-dhcp/patch/0014-enable-parallel-build.patch index 4b451b910c15..38860e21d94e 100644 --- a/src/isc-dhcp/patch/0014-enable-parallel-build.patch +++ b/src/isc-dhcp/patch/0014-enable-parallel-build.patch @@ -1,8 +1,8 @@ diff --git a/debian/rules b/debian/rules -index 3c8318f..28f4657 100755 +index 0906e53..6e96ffe 100755 --- a/debian/rules +++ b/debian/rules -@@ -37,6 +37,13 @@ export DO_LPF=1 +@@ -38,6 +38,13 @@ export DO_LPF=1 CONFFLAGS+=--enable-use-sockets endif @@ -16,27 +16,27 @@ index 3c8318f..28f4657 100755 %: dh $@ --parallel --with autoreconf -@@ -46,17 +53,17 @@ override_dh_auto_build: +@@ -59,17 +66,17 @@ override_dh_auto_build: # ldap-enabled build test -f Makefile && $(MAKE) distclean || true - ./configure --with-ldap --with-ldapcrypto CFLAGS="$(CFLAGS) -DNSUPDATE" LIBS="-lirs-export $(LIBS)" $(CONFFLAGS) + ./configure --with-ldap --with-ldapcrypto CFLAGS="$(CFLAGS) -DNSUPDATE" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) mv server/dhcpd dhcpd # ddns-disabled build test -f Makefile && $(MAKE) distclean || true - ./configure CFLAGS="$(CFLAGS)" $(CONFFLAGS) + ./configure CFLAGS="$(CFLAGS)" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) mv client/dhclient dhclient # ldap-disabled build test -f Makefile && $(MAKE) distclean || true - ./configure CFLAGS="$(CFLAGS) -DNSUPDATE" LIBS="-lirs-export $(LIBS)" $(CONFFLAGS) + ./configure CFLAGS="$(CFLAGS) -DNSUPDATE" $(CONFFLAGS) LIBS="$(LIBS) -latomic" - $(MAKE) + $(MAKE) $(PARALLEL) override_dh_install: # rename some upstream files -- -2.34.1 +2.25.1 diff --git a/src/isc-dhcp/patch/0015-option-to-set-primary-address-in-interface.patch b/src/isc-dhcp/patch/0015-option-to-set-primary-address-in-interface.patch index 67283ba02c0a..b68ce0cb2db3 100644 --- a/src/isc-dhcp/patch/0015-option-to-set-primary-address-in-interface.patch +++ b/src/isc-dhcp/patch/0015-option-to-set-primary-address-in-interface.patch @@ -1,8 +1,8 @@ diff --git a/common/discover.c b/common/discover.c -index ab50234..40e13f5 100644 +index 20d7c54..9ee8bc2 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -1614,3 +1614,16 @@ void interface_snorf (struct interface_info *tmp, int ir) +@@ -1619,3 +1619,16 @@ void interface_snorf (struct interface_info *tmp, int ir) } interface_reference (&interfaces, tmp, MDL); } @@ -21,10 +21,10 @@ index ab50234..40e13f5 100644 +} \ No newline at end of file diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 257b31e..e7f9f06 100644 +index 68d44cf..8c307b6 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -2873,6 +2873,7 @@ extern int interface_count; +@@ -2885,6 +2885,7 @@ extern int interface_count; extern int interface_max; isc_result_t interface_initialize(omapi_object_t *, const char *, int); void discover_interfaces(int); @@ -33,7 +33,7 @@ index 257b31e..e7f9f06 100644 int if_readsocket (omapi_object_t *); void reinitialize_interfaces (void); diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index ff0ad17..31fe61b 100644 +index 6aa1179..a1aa234 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -92,6 +92,11 @@ struct downstream_intf_list { @@ -48,23 +48,23 @@ index ff0ad17..31fe61b 100644 #ifdef DHCPv6 /* Force use of DHCPv6 interface-id option. */ isc_boolean_t use_if_id = ISC_FALSE; -@@ -199,6 +204,7 @@ char *progname; +@@ -208,6 +213,7 @@ char *progname; " [-i interface0 [ ... -i interfaceN]\n" \ " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ +" [-pg ip-address0 [ ... -pg ip-addressN]]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ " [-dt]\n"\ " server0 [ ... serverN]\n\n" \ -@@ -221,6 +227,7 @@ char *progname; +@@ -230,6 +236,7 @@ char *progname; " [-i interface0 [ ... -i interfaceN]\n" \ " [-iu interface0 [ ... -iu interfaceN]\n" \ " [-id interface0 [ ... -id interfaceN]\n" \ +" [-pg ip-address0 [ ... -pg ip-addressN]]\n" \ - " [-U interface]\n" \ + " [-U interface] [-g ]\n" \ " [-dt]\n"\ " server0 [ ... serverN]\n\n" \ -@@ -649,6 +656,34 @@ main(int argc, char **argv) { +@@ -673,6 +680,34 @@ main(int argc, char **argv) { usage(use_noarg, argv[i-1]); path_dhcrelay_pid = argv[i]; no_dhcrelay_pid = ISC_TRUE; @@ -99,7 +99,7 @@ index ff0ad17..31fe61b 100644 } else if (!strcmp(argv[i], "--no-pid")) { no_pid_file = ISC_TRUE; } else if (!strcmp(argv[i], "--name-alias-map-file")) { -@@ -818,6 +853,12 @@ main(int argc, char **argv) { +@@ -842,6 +877,12 @@ main(int argc, char **argv) { /* Discover all the network interfaces. */ discover_interfaces(DISCOVER_RELAY); @@ -112,3 +112,6 @@ index ff0ad17..31fe61b 100644 #ifdef DHCPv6 if (local_family == AF_INET6) setup_streams(); +-- +2.25.1 + diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index 5a58b41b1552..755200d9eb99 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -11,7 +11,6 @@ 0010-Bugfix-correctly-set-interface-netmask.patch 0011-dhcp-relay-Prevent-Buffer-Overrun.patch 0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch -0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch 0014-enable-parallel-build.patch 0015-option-to-set-primary-address-in-interface.patch 0016-Don-t-look-up-the-ifindex-for-fallback.patch diff --git a/src/sonic-config-engine/portconfig.py b/src/sonic-config-engine/portconfig.py index 81b3dfb8f5bc..dcc535eed0f1 100644 --- a/src/sonic-config-engine/portconfig.py +++ b/src/sonic-config-engine/portconfig.py @@ -37,7 +37,7 @@ BRKOUT_MODE = "default_brkout_mode" CUR_BRKOUT_MODE = "brkout_mode" INTF_KEY = "interfaces" -OPTIONAL_HWSKU_ATTRIBUTES = ["fec", "autoneg", "subport"] +OPTIONAL_HWSKU_ATTRIBUTES = ["fec", "autoneg", "subport", "role"] BRKOUT_PATTERN = r'(\d{1,6})x(\d{1,6}G?)(\[(\d{1,6}G?,?)*\])?(\((\d{1,6})\))?' BRKOUT_PATTERN_GROUPS = 6 diff --git a/src/sonic-config-engine/tests/sample_hwsku.json b/src/sonic-config-engine/tests/sample_hwsku.json index 3615cda2680b..53754a2eabec 100644 --- a/src/sonic-config-engine/tests/sample_hwsku.json +++ b/src/sonic-config-engine/tests/sample_hwsku.json @@ -268,7 +268,8 @@ "default_brkout_mode": "2x25G(2)+1x50000(2)" }, "Ethernet142": { - "default_brkout_mode": "2x25G(2)+1x50000(2)" + "default_brkout_mode": "2x25G(2)+1x50000(2)", + "role": "Dpc" }, "Ethernet144": { "default_brkout_mode": "1x100000[50G,40000,25G,10000]" diff --git a/src/sonic-config-engine/tests/sample_output/platform_output.json b/src/sonic-config-engine/tests/sample_output/platform_output.json index 4c6cf197c389..15bd4a29da50 100644 --- a/src/sonic-config-engine/tests/sample_output/platform_output.json +++ b/src/sonic-config-engine/tests/sample_output/platform_output.json @@ -908,7 +908,8 @@ "mtu": "9100", "alias": "Eth36/3", "pfc_asym": "off", - "speed": "50000" + "speed": "50000", + "role": "Dpc" }, "Ethernet144": { "index": "37", diff --git a/src/sonic-device-data/tests/hwsku_json_checker b/src/sonic-device-data/tests/hwsku_json_checker index 4abf62c159ba..f2016ed6bb98 100755 --- a/src/sonic-device-data/tests/hwsku_json_checker +++ b/src/sonic-device-data/tests/hwsku_json_checker @@ -7,7 +7,7 @@ import sys # Global variable PORT_ATTRIBUTES = ["default_brkout_mode"] -OPTIONAL_PORT_ATTRIBUTES = ["fec", "autoneg", "port_type", "subport"] +OPTIONAL_PORT_ATTRIBUTES = ["fec", "autoneg", "port_type", "subport", "role"] PORT_REG = "Ethernet(\d+)" HWSKU_JSON = '*hwsku.json' INTF_KEY = "interfaces" diff --git a/src/sonic-gnmi b/src/sonic-gnmi index 3fa77c6148d7..6b63a50c6816 160000 --- a/src/sonic-gnmi +++ b/src/sonic-gnmi @@ -1 +1 @@ -Subproject commit 3fa77c6148d7b9c9d00d5d6142fa05effdbecfcc +Subproject commit 6b63a50c68165f26cfd930a154c77efd97d85ab1 diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index fdb31452b4a6..b0dec2c92c57 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit fdb31452b4a6c5d696a2cfdacfe5fa97ea48218f +Subproject commit b0dec2c92c570fa9d7d04d80aca381fd360ff52c diff --git a/src/sonic-mgmt-common b/src/sonic-mgmt-common index fbb5fcdb9c8f..23d8bc1dd0c9 160000 --- a/src/sonic-mgmt-common +++ b/src/sonic-mgmt-common @@ -1 +1 @@ -Subproject commit fbb5fcdb9c8fc142b2840f99c6aa25894c369185 +Subproject commit 23d8bc1dd0c903f5314d70cf59604f8bf439e694 diff --git a/src/sonic-platform-common b/src/sonic-platform-common index 56921d80e429..2606cd5fb0a5 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit 56921d80e42971f2579115f26c5194b9e0ecbc05 +Subproject commit 2606cd5fb0a58fc956577602235a9f8f84a887c6 diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 04b0f88d0653..d0fd1e1c6113 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 04b0f88d06537f934ca1ebb853ba00609650274b +Subproject commit d0fd1e1c6113d4a0e2e7bff1559d89e6105269c9 diff --git a/src/sonic-py-common/sonic_py_common/multi_asic.py b/src/sonic-py-common/sonic_py_common/multi_asic.py index d35c39c44b94..92aa9346335c 100644 --- a/src/sonic-py-common/sonic_py_common/multi_asic.py +++ b/src/sonic-py-common/sonic_py_common/multi_asic.py @@ -7,6 +7,7 @@ from .device_info import get_asic_conf_file_path from .device_info import is_supervisor, is_chassis +from .interface import inband_prefix, backplane_prefix, recirc_prefix, front_panel_prefix ASIC_NAME_PREFIX = 'asic' NAMESPACE_PATH_GLOB = '/run/netns/*' @@ -17,7 +18,8 @@ EXTERNAL_PORT = 'Ext' INTERNAL_PORT = 'Int' INBAND_PORT = 'Inb' -RECIRC_PORT ='Rec' +RECIRC_PORT = 'Rec' +DPU_CONNECT_PORT = 'Dpc' PORT_CHANNEL_MEMBER_CFG_DB_TABLE = 'PORTCHANNEL_MEMBER' PORT_CFG_DB_TABLE = 'PORT' BGP_NEIGH_CFG_DB_TABLE = 'BGP_NEIGHBOR' @@ -271,27 +273,60 @@ def get_port_table(namespace=None): Returns: a dict of all the ports """ - all_ports = {} + return get_table(PORT_CFG_DB_TABLE, namespace) + + +def get_table(table, namespace=None): + """ + Retrieves a merged table containing all entries across specified namespaces + + Returns: + a dict of all entries of table across namespaces + """ + merged_table = {} ns_list = get_namespace_list(namespace) for ns in ns_list: - ports = get_port_table_for_asic(ns) - all_ports.update(ports) + ns_table = get_table_for_asic(table, ns) + merged_table.update(ns_table) + + return merged_table - return all_ports def get_port_entry_for_asic(port, namespace): - config_db = connect_config_db_for_ns(namespace) - ports = config_db.get_entry(PORT_CFG_DB_TABLE, port) - return ports + return get_table_entry_for_asic(PORT_CFG_DB_TABLE, port, namespace) + +def get_table_entry_for_asic(table, entry, namespace): + + config_db = connect_config_db_for_ns(namespace) + return config_db.get_entry(table, entry) def get_port_table_for_asic(namespace): + return get_table_for_asic(PORT_CFG_DB_TABLE, namespace) + + +def get_table_for_asic(table, namespace): + config_db = connect_config_db_for_ns(namespace) - ports = config_db.get_table(PORT_CFG_DB_TABLE) - return ports + return config_db.get_table(table) + + +def mod_entry(table, key, value, namespace=None, modIfExists=False): + """ + Modifies an entry in a table with a value in a specified namespace. + If no namespace is specified all namespaces are modified. + If modIfExists is true, the entry will be modified only if the key + already exists in the table. + """ + ns_list = get_namespace_list(namespace) + + for ns in ns_list: + if not modIfExists or get_table_entry_for_asic(table, key, ns): + config_db = connect_config_db_for_ns(ns) + config_db.mod_entry(table, key, value) def get_namespace_for_port(port_name): @@ -323,15 +358,18 @@ def get_port_role(port_name, namespace=None): role = ports_config[PORT_ROLE] return role +def is_role_internal(role=None): + """ + Check if the role belongs to one of the internal variants + """ + if role and role in [INTERNAL_PORT, INBAND_PORT, RECIRC_PORT, DPU_CONNECT_PORT]: + return True + return False -def is_port_internal(port_name, namespace=None): +def is_port_internal(port_name, namespace=None): role = get_port_role(port_name, namespace) - - if role in [INTERNAL_PORT, INBAND_PORT, RECIRC_PORT]: - return True - - return False + return is_role_internal(role) def get_external_ports(port_names, namespace=None): @@ -487,3 +525,21 @@ def get_asic_presence_list(): # This is not multi-asic, all asics should be present. asics_list = list(range(0, get_num_asics())) return asics_list + + +def is_front_panel_port(port, role=None): + """ + @summary: This function will check if the interface is a front-panel port + @return: Boolean + """ + if not port.startswith(front_panel_prefix()): + return False + + if port.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())): + return False + + # subinterfaces + if '.' in port: + return False + + return not is_role_internal(role) diff --git a/src/sonic-py-common/tests/interface_test.py b/src/sonic-py-common/tests/interface_test.py index 4ee6b3ed98d8..a6e454b9385b 100644 --- a/src/sonic-py-common/tests/interface_test.py +++ b/src/sonic-py-common/tests/interface_test.py @@ -2,6 +2,7 @@ import sys from sonic_py_common import interface +from sonic_py_common.multi_asic import is_front_panel_port class TestInterface(object): def test_get_interface_table_name(self): @@ -39,3 +40,14 @@ def test_get_port_table_name(self): assert result == "VLAN_SUB_INTERFACE" result = interface.get_port_table_name("Po0.1001") assert result == "VLAN_SUB_INTERFACE" + + def test_verify_front_panel_api(self): + assert is_front_panel_port("Ethernet0") + assert not is_front_panel_port("Ethernet-BP") + assert not is_front_panel_port("Ethernet-IB") + assert not is_front_panel_port("Ethernet-Rec") + assert not is_front_panel_port("Ethernet254", "Dpc") + assert not is_front_panel_port("Ethernet254", "Int") + assert is_front_panel_port("Ethernet254", "Ext") + assert not is_front_panel_port("Ethernet254.30") + assert not is_front_panel_port("PortConfigDone") diff --git a/src/sonic-sairedis b/src/sonic-sairedis index bb948f632bed..a1b89c3c37b2 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit bb948f632bed2bec2eaa34085a8cbed92069bf83 +Subproject commit a1b89c3c37b2fe1568974cd76fd62ce7f29d548f diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index 4a6de8b936a5..f6529481013d 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit 4a6de8b936a50fd8b3ea6a3b9931b9c6a03b4c18 +Subproject commit f6529481013dbe736246e7c0b34d4851ce515c2c diff --git a/src/sonic-swss b/src/sonic-swss index 9c995f0c8389..c96a2f84b506 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 9c995f0c83892ae9a4f6657c1c4673164e803169 +Subproject commit c96a2f84b506665dca18765932cc4c0de9d0e507 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index e7917acd2d4a..dc9be6be9387 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit e7917acd2d4a9c0121802437e3c899bd513ac888 +Subproject commit dc9be6be9387ac6fc34c5ef1bf7eb3f88d8a90a7 diff --git a/src/sonic-utilities b/src/sonic-utilities index bf3559604b2b..e914198db543 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit bf3559604b2bcb027093e2d1afa68a8de8503c15 +Subproject commit e914198db543aa5ca7f4801bae46dfaef870225d diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py index 6fd4f4ef4ef5..c1624e69581e 100644 --- a/src/sonic-yang-mgmt/sonic_yang_ext.py +++ b/src/sonic-yang-mgmt/sonic_yang_ext.py @@ -378,10 +378,17 @@ def _createLeafDict(self, model, table): #choices, this is tricky, since leafs are under cases in tree. choices = model.get('choice') if choices: - for choice in choices: - cases = choice['case'] + # If single choice exists in container/list + if isinstance(choices, dict): + cases = choices['case'] for case in cases: self._fillLeafDict(case.get('leaf'), leafDict) + # If multiple choices exist in container/list + else: + for choice in choices: + cases = choice['case'] + for case in cases: + self._fillLeafDict(case.get('leaf'), leafDict) # leaf-lists self._fillLeafDict(model.get('leaf-list'), leafDict, True) @@ -535,6 +542,29 @@ def _xlateType1MapList(self, model, yang, config, table, exceptionList): continue return + """ + Process container inside a List. + This function will call xlateContainer based on Container(s) present + in outer List. + """ + def _xlateContainerInList(self, model, yang, configC, table): + ccontainer = model + ccName = ccontainer.get('@name') + if ccName not in configC: + # Inner container doesn't exist in config + return + + if bool(configC[ccName]): + # Empty container - return + return + + self.sysLog(msg="xlateProcessListOfContainer: {}".format(ccName)) + self.elementPath.append(ccName) + self._xlateContainer(ccontainer, yang, configC[ccName], table) + self.elementPath.pop() + + return + """ Xlate a list This function will xlate from a dict in config DB to a Yang JSON list @@ -553,6 +583,9 @@ def _xlateList(self, model, yang, config, table, exceptionList): self._xlateType1MapList(model, yang, config, table, exceptionList) return + # For handling of container(s) in list + ccontainer = model.get('container') + #create a dict to map each key under primary key with a dict yang model. #This is done to improve performance of mapping from values of TABLEs in #config DB to leaf in YANG LIST. @@ -572,6 +605,19 @@ def _xlateList(self, model, yang, config, table, exceptionList): keyDict = self._extractKey(pkey, listKeys) # fill rest of the values in keyDict for vKey in config[pkey]: + if ccontainer and vKey == ccontainer.get('@name'): + self.sysLog(syslog.LOG_DEBUG, "xlateList Handle container {} in list {}".\ + format(vKey, table)) + yangContainer = dict() + if isinstance(ccontainer, dict) and bool(config): + self._xlateContainerInList(ccontainer, yangContainer, config[pkey], table) + # If multi-list exists in container, + elif ccontainer and isinstance(ccontainer, list) and bool(config): + for modelContainer in ccontainer: + self._xlateContainerInList(modelContainer, yangContainer, config[pkey], table) + if len(yangContainer): + keyDict[vKey] = yangContainer + continue self.elementPath.append(vKey) self.sysLog(syslog.LOG_DEBUG, "xlateList vkey {}".format(vKey)) try: @@ -617,7 +663,7 @@ def _xlateListInContainer(self, model, yang, configC, table, exceptionList): """ def _xlateContainerInContainer(self, model, yang, configC, table): ccontainer = model - ccName = ccontainer['@name'] + ccName = ccontainer.get('@name') yang[ccName] = dict() if ccName not in configC: # Inner container doesn't exist in config @@ -876,6 +922,9 @@ def _revXlateList(self, model, yang, config, table): self._revXlateType1MapList(model, yang, config, table) return + # For handling of container(s) in list + ccontainer = model.get('container') + # get keys from YANG model list itself listKeys = model['key']['@value'] # create a dict to map each key under primary key with a dict yang model. @@ -894,6 +943,17 @@ def _revXlateList(self, model, yang, config, table): # fill rest of the entries for key in entry: if key not in pkeydict: + if ccontainer and key == ccontainer['@name']: + self.sysLog(syslog.LOG_DEBUG, "revXlateList handle container {} in list {}".format(pkey, table)) + # IF container has only one inner container + if isinstance(ccontainer, dict): + self._revXlateContainerInContainer(ccontainer, entry, config[pkey], table) + # IF container has many inner container + elif isinstance(ccontainer, list): + for modelContainer in ccontainer: + self._revXlateContainerInContainer(modelContainer, entry, config[pkey], table) + continue + self.elementPath.append(key) config[pkey][key] = self._revFindYangTypedValue(key, \ entry[key], leafDict) diff --git a/src/sonic-yang-mgmt/tests/libyang-python-tests/config_data.json b/src/sonic-yang-mgmt/tests/libyang-python-tests/config_data.json index 8a4eaed176d2..154ef21b494d 100644 --- a/src/sonic-yang-mgmt/tests/libyang-python-tests/config_data.json +++ b/src/sonic-yang-mgmt/tests/libyang-python-tests/config_data.json @@ -256,5 +256,39 @@ } ] } + }, + + "test-yang-structure:test-yang-container": { + "test-yang-structure:YANG_STRUCT_TEST": { + "YANG_LIST_TEST_LIST": [{ + "name" : "Vlan1001", + "leaf-list-test": [ + "fc02:2000::1", + "fc02:2000::2" + ], + "container-in-list-test": { + "leaf-1": true, + "leaf-2": "test1", + "mc-case-leaf-1": 55, + "mc-case-leaf-3": 1234 + }, + "case-leaf-1": 101 + }, + { + "name" : "Test123", + "leaf-list-test": [ + "3003:2000::1", + "2002:2001::2" + ], + "container-in-list-test": { + "leaf-1": false, + "leaf-2": "test2", + "mc-case-leaf-2": 77, + "mc-case-leaf-3": 4321 + }, + "case-leaf-2": 1001 + } + ] + } } } diff --git a/src/sonic-yang-mgmt/tests/libyang-python-tests/sample-yang-models/test-yang-structure.yang b/src/sonic-yang-mgmt/tests/libyang-python-tests/sample-yang-models/test-yang-structure.yang new file mode 100755 index 000000000000..1f57ae337a47 --- /dev/null +++ b/src/sonic-yang-mgmt/tests/libyang-python-tests/sample-yang-models/test-yang-structure.yang @@ -0,0 +1,105 @@ +module test-yang-structure { + + namespace "http://github.com/sonic-net/test"; + prefix yangstructtest; + + yang-version 1.1; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + import test-head { + prefix head; + revision-date 2019-07-01; + } + + revision 2021-10-30 { + description "First Revision"; + } + + container test-yang-container { + + container YANG_STRUCT_TEST { + + description "sample test container"; + + list YANG_LIST_TEST_LIST { + + key "name"; + + leaf name { + type string; + } + + leaf-list leaf-list-test { + description "Test leaf-list statement"; + type inet:ipv6-address; + } + + container container-in-list-test { + leaf leaf-1 { + description "test leaf in container"; + type string { + pattern "false|true"; + } + } + + leaf leaf-2 { + description "test leaf in container"; + type string; + } + + choice multi-choice-in-container-test-1 { + case mc-case-test-1 { + leaf mc-case-leaf-1 { + description "test leaf in multi choice"; + type uint32; + } + } + + case mc-case-test-2 { + leaf mc-case-leaf-2 { + description "test leaf in multi choice"; + type uint8; + } + } + } + + choice multi-choice-in-container-test-2 { + case mc-case-test-3 { + leaf mc-case-leaf-3 { + description "test leaf in multi choice"; + type uint16; + } + } + } + } + + choice single-choice-in-list-test { + case case-test-1 { + leaf case-leaf-1 { + description "test leaf in single choice"; + type uint32; + } + } + + case case-test-2 { + leaf case-leaf-2 { + description "test leaf in single choice"; + type uint16; + } + } + } + } + /* end of YANG_LIST_TEST_LIST */ + } + /* end of container YANG_STRUCT_TEST */ + } + /* end of container test-yang-container */ +} +/* end of module test-yang-structure */ diff --git a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_SonicYang.json b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_SonicYang.json index b62322d50bdb..2376c357b757 100644 --- a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_SonicYang.json +++ b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_SonicYang.json @@ -168,6 +168,10 @@ { "file" : "test-vlan.yang", "module" : "test-vlan" + }, + { + "file" : "test-yang-structure.yang", + "module" : "test-yang-structure" } ], "new_nodes" : [ @@ -244,6 +248,10 @@ { "module_name" : "test-vlan", "module_prefix" : "vlan" + }, + { + "module_name" : "test-yang-structure", + "module_prefix" : "yangstructtest" } ], "schema_dependencies" : [ diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index 886277d26f7c..2ffbba945f8b 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -85,7 +85,7 @@ Table of Contents * [LOGGER](#logger) * [WRED_PROFILE](#wred_profile) * [PASSWORD_HARDENING](#password_hardening) - * [SSH_SERVER](#ssh_server) + * [SSH_SERVER](#ssh_server) * [SYSTEM_DEFAULTS table](#systemdefaults-table) * [RADIUS](#radius) * [Static DNS](#static-dns) @@ -942,6 +942,8 @@ instance is supported in SONiC. { "DEVICE_METADATA": { "localhost": { + "asic_id": "06:00.0", + "asic_name": "asic0", "hwsku": "Force10-S6100", "default_bgp_status": "up", "docker_routing_config_mode": "unified", @@ -1210,7 +1212,7 @@ The FG_NHG_PREFIX table provides the FG_NHG_PREFIX for which FG behavior is desi ### Hash -Generic hash allows user to configure various aspects of hashing algorithm. +Generic hash allows user to configure various aspects of hashing algorithm. The configuration is applied globally for each ECMP and LAG on a switch. ***ECMP/LAG HASH*** @@ -1808,7 +1810,10 @@ optional attributes. "link_training": "off", "laser_freq": "191300", "tx_power": "-27.3", - "dom_polling": "enabled" + "dom_polling": "enabled", + "coreId": "1", + "corePortId": "1", + "numVoq": "8" }, "Ethernet1": { "index": "1", @@ -1821,7 +1826,10 @@ optional attributes. "link_training": "on", "laser_freq": "191300", "tx_power": "-27.3", - "dom_polling": "enabled" + "dom_polling": "enabled", + "coreId": "0", + "corePortId": "14", + "numVoq": "8" }, "Ethernet63": { "index": "63", @@ -1832,7 +1840,10 @@ optional attributes. "speed": "40000", "laser_freq": "191300", "tx_power": "-27.3", - "dom_polling": "disabled" + "dom_polling": "disabled", + "coreId": "0", + "corePortId": "15", + "numVoq": "8" } } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index 050f4433bac6..47c0e3ec910c 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -351,6 +351,7 @@ "DEVICE_METADATA": { "localhost": { "type": "ToRRouter", + "asic_id": "06:00.0", "mac": "00:11:22:33:dd:5a", "hostname": "asw.dc", "bgp_asn": "64850", @@ -565,6 +566,9 @@ "PORT": { "Ethernet0": { "alias": "Eth1/1", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "65", "description": "", "speed": "11100", @@ -581,6 +585,9 @@ }, "Ethernet1": { "alias": "Eth1/2", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "66", "description": "", "speed": "11100", @@ -596,11 +603,15 @@ }, "Ethernet2": { "alias": "Eth1/3", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", "lanes": "67", "description": "", "speed": "11100", "tpid": "0x8100", "admin_status": "up", + "role": "Dpc", "autoneg": "on", "adv_speeds": "all", "adv_interface_types": "all", @@ -1701,7 +1712,7 @@ "ip_range": [ "10.1.0.0/24" ], - "name": "BGPSentinel", + "name": "BGPSentinel", "src_address": "10.1.0.32" }, "BGPSentinelV6": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py b/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py index d776f479cd37..d46d03623250 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py +++ b/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py @@ -235,7 +235,7 @@ def runVlanSpecialTest(self, test): self.logStartTest(desc) jInput = json.loads(self.readJsonInput(test)) # check all Vlan from 1 to 4094 - for i in range(4095): + for i in range(1,4095): vlan = 'Vlan'+str(i) jInput["sonic-vlan:sonic-vlan"]["sonic-vlan:VLAN"]["VLAN_LIST"]\ [0]["name"] = vlan diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index 141d8b5c8230..1542407f5f3a 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -2,6 +2,12 @@ "DEV_META_DEV_NEIGH_VERSION_TABLE": { "desc": "DEVICE_METADATA DEVICE_NEIGHBOR VERSION TABLE." }, + "DEVICE_METADATA_ASIC_ID": { + "desc": "DEVICE_METADATA ASIC ID." + }, + "DEVICE_METADATA_ASIC_NAME": { + "desc": "DEVICE_METADATA ASIC NAME." + }, "DEVICE_METADATA_DEFAULT_BGP_STATUS": { "desc": "DEVICE_METADATA DEFAULT VALUE FOR BGP_STATUS FIELD.", "eStrKey" : "Verify", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json index a6656b832815..b35f9fd2231f 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json @@ -60,6 +60,15 @@ "PORT_VALID_TYPE_TEST": { "desc": "PORT_VALID_TYPE_TEST no failure." }, + "PORT_COREID_TYPE_TEST": { + "desc": "PORT_COREID_TYPE_TEST no failure." + }, + "PORT_COREPORTID_TYPE_TEST": { + "desc": "PORT_COREPORTID_TYPE_TEST no failure." + }, + "PORT_NUMVOQ_TYPE_TEST": { + "desc": "PORT_NUMVOQ_TYPE_TEST no failure." + }, "PORT_INVALID_TYPE_TEST": { "desc": "PORT_INVALID_TYPE_TEST InvalidValue condition failure.", "eStrKey" : "InvalidValue", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index 941077205df6..0c33f93b668c 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -11,6 +11,34 @@ } } }, + "DEVICE_METADATA_ASIC_ID": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65001", + "default_bgp_status": "up", + "hostname": "DUT-CSW", + "asic_id": "06:00.0", + "asic_name": "asic0", + "platform": "Stone-DX010" + } + } + } + }, + "DEVICE_METADATA_ASIC_NAME": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65001", + "default_bgp_status": "up", + "hostname": "DUT-CSW", + "asic_id": "06:00.0", + "asic_name": "asic0", + "platform": "Stone-DX010" + } + } + } + }, "DEVICE_METADATA_DEFAULT_DOCKER_ROUTING_CONFIG_MODE": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/macsec.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/macsec.json index 5c748606eed9..89abcb386697 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/macsec.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/macsec.json @@ -30,6 +30,18 @@ "replay_window": 64, "send_sci": "true", "rekey_period": 3600 + }, + { + "name": "test_nofallback", + "priority": 64, + "cipher_suite": "GCM-AES-XPN-256", + "primary_cak": "5207554155500e5d5157786d6c2a3d2031425a5e577e7e727f6b6c03312432262706080a00005b554f4e007975707670725b0a54540c0252445e5d7a29252b046a", + "primary_ckn": "6162636465666768696A6B6C6D6E6F706162636465666768696A6B6C6D6E6F70", + "policy": "security", + "enable_replay_protect": "true", + "replay_window": 64, + "send_sci": "true", + "rekey_period": 3600 } ] } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 3e8899b6e6da..562aaf56c4a1 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -278,6 +278,66 @@ } }, + "PORT_COREID_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + + "PORT_COREPORTID_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + + "PORT_NUMVOQ_TYPE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet8", + "alias": "eth8", + "coreId": "1", + "corePortId": "1", + "numVoq": "8", + "lanes": "65", + "speed": 25000, + "autoneg": "on", + "interface_type": "CR4" + } + ] + } + } + }, + "PORT_INVALID_TYPE_TEST": { "sonic-port:sonic-port": { "sonic-port:PORT": { @@ -728,5 +788,21 @@ ] } } + }, + + "PORT_DPC_ROLE_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "alias": "etp1a", + "lanes": "60, 61", + "speed": 100000, + "role": "Dpc" + } + ] + } + } } } diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index 7226b02e53e2..dce3db1541e8 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -40,6 +40,13 @@ module sonic-device_metadata { type stypes:hwsku; } + leaf asic_id { + type string { + length 1..16; + } + description "asic_id is unique identifier of the asic used by SAI for initialization."; + } + leaf default_bgp_status { type enumeration { enum up; diff --git a/src/sonic-yang-models/yang-models/sonic-macsec.yang b/src/sonic-yang-models/yang-models/sonic-macsec.yang index b3d04b725a14..2d76737ee415 100644 --- a/src/sonic-yang-models/yang-models/sonic-macsec.yang +++ b/src/sonic-yang-models/yang-models/sonic-macsec.yang @@ -70,9 +70,9 @@ module sonic-macsec { } } - must "string-length(fallback_cak) = string-length(primary_cak)"; + must "string-length(fallback_cak) = 0 or string-length(fallback_cak) = string-length(primary_cak)"; - must "primary_ckn != fallback_ckn"; + must "string-length(fallback_ckn) = 0 or primary_ckn != fallback_ckn"; leaf policy { type string { diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index f82d74465c97..2036a1f2fdbe 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -39,6 +39,27 @@ module sonic-port{ } } + leaf numVoq { + description "The number of virtual output queue supportted on this port."; + type string { + length 1..16; + } + } + + leaf coreId { + description "The ASIC core where the port belongs to."; + type string { + length 1..16; + } + } + + leaf corePortId { + description "The ASIC core port for this port."; + type string { + length 1..16; + } + } + leaf alias { type string { length 1..128; @@ -51,11 +72,10 @@ module sonic-port{ length 1..128; } } - + leaf mode { description "SwitchPort Modes possible values are routed|access|trunk. Default value for mode is routed"; type stypes:switchport_mode; - default "routed"; } leaf description { @@ -145,9 +165,9 @@ module sonic-port{ leaf role { type string { - pattern "Ext|Int|Inb|Rec"; + pattern "Ext|Int|Inb|Rec|Dpc"; } - description "Internal port or External port for multi-asic platform"; + description "Internal port or External port for multi-asic or SmartSwitch platform"; default "Ext"; } @@ -173,8 +193,8 @@ module sonic-port{ leaf tpid { description "This leaf describes the possible TPID value that can be configured - to the specified port if the HW supports TPID configuration. The possible - values are 0x8100, 0x9100, 0x9200, 0x88a8, and 0x88A8"; + to the specified port if the HW supports TPID configuration. The possible + values are 0x8100, 0x9100, 0x9200, 0x88a8, and 0x88A8"; type stypes:tpid_type; } diff --git a/src/sonic-yang-models/yang-models/sonic-portchannel.yang b/src/sonic-yang-models/yang-models/sonic-portchannel.yang index d5b57f70fc9c..2c61f4eb54ad 100644 --- a/src/sonic-yang-models/yang-models/sonic-portchannel.yang +++ b/src/sonic-yang-models/yang-models/sonic-portchannel.yang @@ -67,7 +67,6 @@ module sonic-portchannel { leaf mode { description "PortChannel SwitchPort Mode possible values are routed|access|trunk. Default value for mode is routed."; type stypes:switchport_mode; - default "routed"; } diff --git a/src/sonic-yang-models/yang-models/sonic-vlan.yang b/src/sonic-yang-models/yang-models/sonic-vlan.yang index ad1ab8d743f3..1e2361adef44 100644 --- a/src/sonic-yang-models/yang-models/sonic-vlan.yang +++ b/src/sonic-yang-models/yang-models/sonic-vlan.yang @@ -36,6 +36,10 @@ module sonic-vlan { description "VLAN yang Module for SONiC OS"; + revision 2021-04-28 { + description "Modify Vlan name constraint to allow only legal Vlan names"; + } + revision 2021-04-22 { description "Modify Vlan Member to include PortChannel along with Port"; } @@ -178,7 +182,7 @@ module sonic-vlan { leaf name { type string { - pattern 'Vlan([0-9]{1,3}|[1-3][0-9]{3}|[4][0][0-8][0-9]|[4][0][9][0-4])'; + pattern 'Vlan(409[0-5]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[1-9])'; } } diff --git a/src/system-health/health_checker/sysmonitor.py b/src/system-health/health_checker/sysmonitor.py index 3a2840e11a63..5312603d7365 100755 --- a/src/system-health/health_checker/sysmonitor.py +++ b/src/system-health/health_checker/sysmonitor.py @@ -10,8 +10,10 @@ from sonic_py_common.logger import Logger from . import utils from sonic_py_common.task_base import ProcessTaskBase +from sonic_py_common import device_info from .config import Config import signal +import jinja2 SYSLOG_IDENTIFIER = "system#monitor" REDIS_TIMEOUT_MS = 0 @@ -159,6 +161,26 @@ def get_all_service_list(self): dir_list.sort() return dir_list + def get_render_value_for_field(self, configuration, device_config, expected_values): + """ Returns the target value by rendering the configuration as J2 template. + + Args: + configuration (str): Table value from CONFIG_DB for given field + device_config (dict): DEVICE_METADATA section of CONFIG_DB and populated Device Running Metadata which is needed for rendering + expected_values (list): Expected set of values for given field + Returns: + (str): Target value for given key + """ + + if configuration is None: + return None + + template = jinja2.Template(configuration) + target_value = template.render(device_config) # nosemgrep: python.flask.security.xss.audit.direct-use-of-jinja2.direct-use-of-jinja2 + if target_value not in expected_values: + raise ValueError('Invalid value rendered for configuration {}: {}'.format(configuration, target_value)) + return target_value + def get_service_from_feature_table(self, dir_list): """Get service from CONFIG DB FEATURE table. During "config reload" command, filling FEATURE table is not an atomic operation, sonic-cfggen do it with two steps: @@ -178,12 +200,16 @@ def get_service_from_feature_table(self, dir_list): while max_retry > 0: success = True feature_table = self.config_db.get_table("FEATURE") + device_config = {} + device_config['DEVICE_METADATA'] = self.config_db.get_table('DEVICE_METADATA') + device_config.update(device_info.get_device_runtime_metadata()) for srv, fields in feature_table.items(): if 'state' not in fields: success = False logger.log_warning("FEATURE table is not fully ready: {}, retrying".format(feature_table)) break - if fields["state"] not in ["disabled", "always_disabled"]: + state = self.get_render_value_for_field(fields["state"], device_config, ['enabled', 'disabled', 'always_enabled', 'always_disabled']) + if state not in ["disabled", "always_disabled"]: srvext = srv + ".service" if srvext not in dir_list: dir_list.append(srvext) @@ -456,7 +482,7 @@ def system_service(self): logger.log_debug("Main process- received event:{} from source:{} time:{}".format(event,event_src,event_time)) logger.log_info("check_unit_status for [ "+event+" ] ") self.check_unit_status(event) - except Empty: + except (Empty, EOFError): pass except Exception as e: logger.log_error("system_service"+str(e)) diff --git a/src/system-health/tests/test_system_health.py b/src/system-health/tests/test_system_health.py index 67f819ecc5ff..cd9a54e8799f 100644 --- a/src/system-health/tests/test_system_health.py +++ b/src/system-health/tests/test_system_health.py @@ -47,6 +47,7 @@ """ device_info.get_platform = MagicMock(return_value='unittest') +device_runtime_metadata = {"DEVICE_RUNTIME_METADATA": {"ETHERNET_PORTS_PRESENT":True}} def setup(): if os.path.exists(ServiceChecker.CRITICAL_PROCESS_CACHE): @@ -583,6 +584,7 @@ def test_utils(): @patch('docker.DockerClient') @patch('health_checker.utils.run_command') @patch('swsscommon.swsscommon.ConfigDBConnector') +@patch('sonic_py_common.device_info.get_device_runtime_metadata', MagicMock(return_value=device_runtime_metadata)) def test_get_all_service_list(mock_config_db, mock_run, mock_docker_client): mock_db_data = MagicMock() mock_get_table = MagicMock() @@ -841,6 +843,7 @@ def test_system_service(): sysmon.task_stop() +@patch('sonic_py_common.device_info.get_device_runtime_metadata', MagicMock(return_value=device_runtime_metadata)) def test_get_service_from_feature_table(): sysmon = Sysmonitor() sysmon.config_db = MagicMock() @@ -851,8 +854,18 @@ def test_get_service_from_feature_table(): 'swss': {} }, { - 'bgp': {'state': 'enabled'}, + 'localhost': { + 'type': 'ToRRouter' + } + }, + { + 'bgp': {'state': "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] is not in ['ToRRouter', 'EPMS', 'MgmtTsToR', 'MgmtToRRouter', 'BmcMgmtToRRouter']) %}enabled{% else %}disabled{% endif %}"}, 'swss': {'state': 'disabled'} + }, + { + 'localhost': { + 'type': 'ToRRouter' + } } ] dir_list = [] diff --git a/src/systemd-sonic-generator/Makefile b/src/systemd-sonic-generator/Makefile index 0e6fb9095dce..c4c01f66f470 100644 --- a/src/systemd-sonic-generator/Makefile +++ b/src/systemd-sonic-generator/Makefile @@ -2,15 +2,15 @@ CC=gcc CFLAGS += -std=gnu99 -D_GNU_SOURCE CXX=g++ -CXXFLAGS += -std=c++11 -D_GNU_SOURCE -LDFLAGS += -lpthread -lboost_filesystem -lboost_system -lgtest +CXXFLAGS += -std=c++11 -D_GNU_SOURCE -I ./ +LDFLAGS += -l stdc++ -lpthread -lboost_filesystem -lboost_system -lgtest -ljson-c BINARY = systemd-sonic-generator -$(BINARY): systemd-sonic-generator.c +$(BINARY): systemd-sonic-generator.cpp rm -f ./systemd-sonic-generator - $(CC) $(CFLAGS) -o $@ $^ + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) install: $(BINARY) mkdir -p $(DESTDIR) @@ -24,10 +24,12 @@ test: ssg_test ./ssg_test ssg_test: ssg-test.cc systemd-sonic-generator.o - $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) + $(CXX) $(CXXFLAGS) -ggdb -o $@ $^ $(LDFLAGS) + +systemd-sonic-generator.o: systemd-sonic-generator.cpp + $(CXX) $(CXXFLAGS) -ggdb -D_SSG_UNITTEST -o $@ -c $^ -systemd-sonic-generator.o: systemd-sonic-generator.c - $(CC) $(CFLAGS) -D_SSG_UNITTEST -o $@ -c $^ +all: $(BINARY) test clean: rm -f ./systemd-sonic-generator diff --git a/src/systemd-sonic-generator/ssg-test.cc b/src/systemd-sonic-generator/ssg-test.cc index 52706358d175..2462c0635ad9 100644 --- a/src/systemd-sonic-generator/ssg-test.cc +++ b/src/systemd-sonic-generator/ssg-test.cc @@ -9,9 +9,11 @@ #include #include #include +#include #include #include #include +#include #include "systemd-sonic-generator.h" namespace fs = boost::filesystem; @@ -19,7 +21,7 @@ namespace fs = boost::filesystem; namespace SSGTest { #define IS_MULTI_ASIC(x) ((x) > 1) #define IS_SINGLE_ASIC(x) ((x) <= 1) -#define NUM_UNIT_FILES 6 +#define NUM_UNIT_FILES 9 /* * This test class uses following directory hierarchy for input and output @@ -40,27 +42,36 @@ namespace SSGTest { */ const std::string TEST_ROOT_DIR = "tests/ssg-test/"; const std::string TEST_UNIT_FILE_PREFIX = TEST_ROOT_DIR + "systemd/"; +const std::string TEST_LIB_NETWORK = TEST_UNIT_FILE_PREFIX + "network/"; const std::string TEST_ASIC_CONF_FORMAT = TEST_ROOT_DIR + "%s/asic.conf"; +const std::string TEST_PLATFORM_CONF_FORMAT = TEST_ROOT_DIR + "%s/platform.json"; const std::string TEST_MACHINE_CONF = TEST_ROOT_DIR + "machine.conf"; const std::string TEST_PLATFORM_DIR = TEST_ROOT_DIR + "test_platform/"; const std::string TEST_ASIC_CONF = TEST_PLATFORM_DIR + "asic.conf"; +const std::string TEST_PLATFORM_CONF = TEST_PLATFORM_DIR + "platform.json"; const std::string TEST_OUTPUT_DIR = TEST_ROOT_DIR + "generator/"; +const std::string TEST_ETC_NETWORK = TEST_OUTPUT_DIR + "network/"; const std::string TEST_CONFIG_FILE = TEST_ROOT_DIR + "generated_services.conf"; const std::string TEST_UNIT_FILES = "tests/testfiles/"; + /* Input data for generated_services.conf */ const std::vector generated_services = { - "multi_inst_a.service", /* Single instance of a multi asic service a */ - "multi_inst_a@.service", /* Multi-instance of a multi asic service a */ - "multi_inst_b@.service", /* Multi-instance of a multi asic service b */ - "single_inst.service", /* A single instance service */ - "test.service", /* A single instance test service - to test dependency creation */ - "test.timer", /* A timer service */ + "multi_inst_a.service", /* Single instance of a multi asic service a */ + "multi_inst_a@.service", /* Multi-instance of a multi asic service a */ + "multi_inst_b@.service", /* Multi-instance of a multi asic service b */ + "single_inst.service", /* A single instance service */ + "test.service", /* A single instance test service + to test dependency creation */ + "test.timer", /* A timer service */ + "midplane-network-npu.service", /* A midplane network service for smart switch NPU*/ + "midplane-network-dpu.service", /* A midplane network service for smart switch DPU*/ + "database.service", /* A database service*/ + "database@.service", /* A database service for multi instances */ }; static std::mutex g_ssg_test_mutex; @@ -120,8 +131,13 @@ class SsgFunctionTest : public SystemdSonicGeneratorFixture { try { fs::path current(file->path()); if(!fs::is_directory(current)) { + std::string ext = boost::filesystem::extension(current); + fs::path dest_path = dest_dir; + if (ext == ".netdev" || ext == ".network" || ext == ".link") { + dest_path = dest_path / "network"; + } /* Copy file */ - fs::copy_file( current, dest_dir / current.filename()); + fs::copy_file( current, dest_path / current.filename()); } } catch(fs::filesystem_error const & e) { @@ -142,6 +158,10 @@ class SsgFunctionTest : public SystemdSonicGeneratorFixture { fs::create_directories(path); path = fs::path(TEST_PLATFORM_DIR.c_str()); fs::create_directories(path); + path = fs::path(TEST_LIB_NETWORK.c_str()); + fs::create_directories(path); + path = fs::path(TEST_ETC_NETWORK.c_str()); + fs::create_directories(path); fp = fopen(TEST_MACHINE_CONF.c_str(), "w"); ASSERT_NE(fp, nullptr); fputs("onie_platform=test_platform", fp); @@ -163,6 +183,15 @@ class SsgFunctionTest : public SystemdSonicGeneratorFixture { private: }; + +struct SsgMainConfig { + int num_asics = 0; + bool is_smart_switch_npu = false; + bool is_smart_switch_dpu = false; + int num_dpus = 0; +}; + + /* * class SsgMainTest * Implements functions to test ssg_main routine. @@ -181,8 +210,7 @@ class SsgMainTest : public SsgFunctionTest { /* Find a string in a file */ bool find_string_in_file(std::string str, - std::string file_name, - int num_asics) { + std::string file_name) { bool found = false; std::string line; @@ -214,7 +242,7 @@ class SsgMainTest : public SsgFunctionTest { /* Run once for single instance */ finished = true; } - EXPECT_EQ(find_string_in_file(str_t, target, num_asics), + EXPECT_EQ(find_string_in_file(str_t, target), expected_result) << "Error validating " + str_t + " in " + target; } @@ -228,10 +256,10 @@ class SsgMainTest : public SsgFunctionTest { void validate_output_unit_files(std::vector strs, std::string target, bool expected_result, - int num_asics) { + int num_instances) { for (std::string str : strs) { bool finished = false; - for (int i = 0 ; i < num_asics && !finished; ++i) { + for (int i = 0 ; i < num_instances && !finished; ++i) { auto str_t = str; if (is_multi_instance(str)) { /* insert instance id in string */ @@ -241,7 +269,10 @@ class SsgMainTest : public SsgFunctionTest { finished = true; } fs::path path{TEST_OUTPUT_DIR + target + "/" + str_t}; - EXPECT_EQ(fs::exists(path), expected_result) + char resolved_path[PATH_MAX]; + realpath(path.c_str(), resolved_path); + bool exist = fs::exists(path) && strcmp(resolved_path, "/dev/null") != 0; + EXPECT_EQ(exist, expected_result) << "Failed validation: " << path; } } @@ -250,7 +281,7 @@ class SsgMainTest : public SsgFunctionTest { /* * This function validates the generated dependencies in a Unit File. */ - void validate_depedency_in_unit_file(int num_asics) { + void validate_depedency_in_unit_file(const SsgMainConfig &cfg) { std::string test_service = "test.service"; /* Validate Unit file dependency creation for multi instance @@ -258,53 +289,83 @@ class SsgMainTest : public SsgFunctionTest { * system but not present for single asic system. */ validate_output_dependency_list(multi_asic_dependency_list, - test_service, IS_MULTI_ASIC(num_asics), num_asics); + test_service, IS_MULTI_ASIC(cfg.num_asics), cfg.num_asics); - /* Validate Unit file dependency creation for single instance - * services. These entries should not be present for multi asic - * system but present for single asic system. + /* This section handles a tricky scenario. + * When the number of DPUs (Data Processing Units) is greater than 0, + * the dependency list will be split. Otherwise, it remains in one line. + * Despite the split, the final result remains equivalent. */ - validate_output_dependency_list(single_asic_dependency_list, - test_service, IS_SINGLE_ASIC(num_asics), num_asics); + if (cfg.num_dpus > 0) { + /* Validate Unit file dependency creation for single instance + * services. These entries should not be present for multi asic + * system but present for single asic system. + */ + validate_output_dependency_list(single_asic_dependency_list_split, + test_service, IS_SINGLE_ASIC(cfg.num_asics), cfg.num_asics); + validate_output_dependency_list(npu_dependency_list, + "midplane-network-npu.service", true, cfg.num_dpus); + } else { + /* Validate Unit file dependency creation for single instance + * services. These entries should not be present for multi asic + * system but present for single asic system. + */ + validate_output_dependency_list(single_asic_dependency_list, + test_service, IS_SINGLE_ASIC(cfg.num_asics), cfg.num_asics); + } /* Validate Unit file dependency creation for single instance * common services. These entries should not be present for multi * and single asic system. */ validate_output_dependency_list(common_dependency_list, - test_service, true, num_asics); + test_service, true, cfg.num_asics); } /* * This function validates the list of generated Service Unit Files. */ - void validate_service_file_generated_list(int num_asics) { + void validate_service_file_generated_list(const SsgMainConfig &cfg) { std::string test_target = "multi-user.target.wants"; validate_output_unit_files(multi_asic_service_list, - test_target, IS_MULTI_ASIC(num_asics), num_asics); + test_target, IS_MULTI_ASIC(cfg.num_asics), cfg.num_asics); validate_output_unit_files(single_asic_service_list, - test_target, IS_SINGLE_ASIC(num_asics), num_asics); + test_target, IS_SINGLE_ASIC(cfg.num_asics), cfg.num_asics); validate_output_unit_files(common_service_list, - test_target, true, num_asics); + test_target, true, cfg.num_asics); + validate_output_unit_files(npu_service_list, + test_target, cfg.is_smart_switch_npu, cfg.num_dpus); + validate_output_unit_files(npu_network_service_list, + "network", cfg.is_smart_switch_npu, cfg.num_dpus); + validate_output_unit_files(dpu_service_list, + test_target, cfg.is_smart_switch_dpu, cfg.num_dpus); + validate_output_unit_files(dpu_network_service_list, + "network", cfg.is_smart_switch_dpu, cfg.num_dpus); } /* ssg_main test routine. * input: num_asics number of asics */ - void ssg_main_test(int num_asics) { + void ssg_main_test(const SsgMainConfig &cfg) { FILE* fp; std::vector argv_; std::vector arguments = { "ssg_main", TEST_OUTPUT_DIR.c_str() }; - std::string num_asic_str = "NUM_ASIC=" + std::to_string(num_asics); + std::string num_asic_str = "NUM_ASIC=" + std::to_string(cfg.num_asics); std::string unit_file_path = fs::current_path().string() + "/" +TEST_UNIT_FILE_PREFIX; g_unit_file_prefix = unit_file_path.c_str(); g_config_file = TEST_CONFIG_FILE.c_str(); g_machine_config_file = TEST_MACHINE_CONF.c_str(); g_asic_conf_format = TEST_ASIC_CONF_FORMAT.c_str(); + g_platform_file_format = TEST_PLATFORM_CONF_FORMAT.c_str(); + std::string lib_systemd = fs::current_path().string() + "/" + TEST_UNIT_FILE_PREFIX; + g_lib_systemd = lib_systemd.c_str(); + std::string etc_systemd = fs::current_path().string() + "/" + TEST_OUTPUT_DIR; + g_etc_systemd = etc_systemd.c_str(); + /* Set NUM_ASIC value in asic.conf */ fp = fopen(TEST_ASIC_CONF.c_str(), "w"); @@ -312,6 +373,29 @@ class SsgMainTest : public SsgFunctionTest { fputs(num_asic_str.c_str(), fp); fclose(fp); + /* Set platform file for smart switch */ + if (cfg.is_smart_switch_dpu || cfg.is_smart_switch_npu) { + nlohmann::json platform_config; + if (cfg.is_smart_switch_dpu) { + ASSERT_EQ(cfg.num_dpus, 0); + ASSERT_EQ(cfg.is_smart_switch_npu, false); + + platform_config["DPU"] = nlohmann::json::object(); + } + else if (cfg.is_smart_switch_npu) { + ASSERT_EQ(cfg.is_smart_switch_dpu, false); + nlohmann::json dpus; + for (int i = 0; i < cfg.num_dpus; i++) { + dpus["dpu" + std::to_string(i)] = nlohmann::json::object(); + } + platform_config["DPUS"] = dpus; + } + fp = fopen(TEST_PLATFORM_CONF.c_str(), "w"); + ASSERT_NE(fp, nullptr); + fputs(platform_config.dump().c_str(), fp); + fclose(fp); + } + /* Create argv list for ssg_main. */ for (const auto& arg : arguments) { argv_.push_back((char*)arg.data()); @@ -322,15 +406,22 @@ class SsgMainTest : public SsgFunctionTest { EXPECT_EQ(ssg_main(argv_.size(), argv_.data()), 0); /* Validate systemd service template creation. */ - validate_service_file_generated_list(num_asics); + validate_service_file_generated_list(cfg); /* Validate Test Unit file for dependency creation. */ - validate_depedency_in_unit_file(num_asics); + validate_depedency_in_unit_file(cfg); } /* Save global variables before running tests */ virtual void SetUp() { SsgFunctionTest::SetUp(); + // Create /dev/null symlink for simulation disabled service + std::vector disabled_service; + disabled_service.insert(disabled_service.end(), npu_network_service_list.begin(), npu_network_service_list.end()); + disabled_service.insert(disabled_service.end(), dpu_network_service_list.begin(), dpu_network_service_list.end()); + for (const auto &service : disabled_service) { + fs::create_symlink("/dev/null", TEST_ETC_NETWORK + service); + } } /* Restore global vars */ @@ -343,8 +434,14 @@ class SsgMainTest : public SsgFunctionTest { static const std::vector single_asic_service_list; static const std::vector multi_asic_service_list; static const std::vector common_service_list; + static const std::vector npu_service_list; + static const std::vector npu_network_service_list; + static const std::vector dpu_service_list; + static const std::vector dpu_network_service_list; static const std::vector single_asic_dependency_list; + static const std::vector single_asic_dependency_list_split; static const std::vector multi_asic_dependency_list; + static const std::vector npu_dependency_list; static const std::vector common_dependency_list; }; @@ -368,6 +465,7 @@ const std::vector SsgMainTest::multi_asic_service_list = { "multi_inst_a@%1%.service", "multi_inst_b@%1%.service", + "database@%1%.service", }; /* Common Systemd service Unit file list for single and multi asic system. */ @@ -376,7 +474,36 @@ SsgMainTest::common_service_list = { "multi_inst_a.service", "single_inst.service", "test.service", + "database.service", +}; + +/* Systemd service Unit file list for Smart Switch NPU. */ +const std::vector +SsgMainTest::npu_service_list = { + "database@dpu%1%.service", + "midplane-network-npu.service", +}; +/* Systemd service Unit file list for Smart Switch NPU. */ +const std::vector +SsgMainTest::npu_network_service_list = { + "bridge-midplane.netdev", + "bridge-midplane.network", + "dummy-midplane.netdev", + "dummy-midplane.network", + "midplane-network-npu.network", +}; + +/* Systemd service Unit file list for Smart Switch DPU. */ +const std::vector +SsgMainTest::dpu_service_list = { + "midplane-network-dpu.service", +}; + +/* Systemd service Unit file list for Smart Switch DPU. */ +const std::vector +SsgMainTest::dpu_network_service_list = { + "midplane-network-dpu.network", }; /* @@ -398,6 +525,13 @@ SsgMainTest::single_asic_dependency_list = { "After=multi_inst_a.service multi_inst_b.service", }; +/* Systemd service Unit file dependency entries for Single asic system. */ +const std::vector +SsgMainTest::single_asic_dependency_list_split = { + "After=multi_inst_a.service", + "After=multi_inst_b.service", +}; + /* Systemd service Unit file dependency entries for multi asic system. */ const std::vector SsgMainTest::multi_asic_dependency_list = { @@ -413,6 +547,11 @@ SsgMainTest::common_dependency_list = { "Before=single_inst.service", }; +const std::vector +SsgMainTest::npu_dependency_list = { + "Before=database@dpu%1%.service", +}; + /* Test get functions for global vasr*/ TEST_F(SystemdSonicGeneratorFixture, get_global_vars) { EXPECT_EQ(g_unit_file_prefix, nullptr); @@ -460,9 +599,8 @@ TEST_F(SsgFunctionTest, insert_instance_number) { char input[] = "test@.service"; for (int i = 0; i <= 100; ++i) { std::string out = "test@" + std::to_string(i) + ".service"; - char* ret = insert_instance_number(input, i); - ASSERT_NE(ret, nullptr); - EXPECT_STREQ(ret, out.c_str()); + std::string ret = insert_instance_number(input, i, ""); + EXPECT_EQ(ret, out); } } @@ -495,13 +633,30 @@ TEST_F(SsgFunctionTest, get_num_of_asic) { /* TEST get_unit_files()*/ TEST_F(SsgFunctionTest, get_unit_files) { g_unit_file_prefix = TEST_UNIT_FILE_PREFIX.c_str(); + g_lib_systemd = TEST_UNIT_FILE_PREFIX.c_str(); + g_etc_systemd = TEST_OUTPUT_DIR.c_str(); g_config_file = TEST_CONFIG_FILE.c_str(); - char* unit_files[NUM_UNIT_FILES]; + char* unit_files[NUM_UNIT_FILES] = { NULL }; int num_unit_files = get_unit_files(unit_files); - EXPECT_EQ(num_unit_files, NUM_UNIT_FILES); - for (std::string service : generated_services) { + // Exclude the midplane-network-{npu/dpu}.service which is only used for smart switch + auto non_smart_switch_generated_services = generated_services; + non_smart_switch_generated_services.erase( + std::remove(non_smart_switch_generated_services.begin(), + non_smart_switch_generated_services.end(), + "midplane-network-npu.service"), + non_smart_switch_generated_services.end()); + non_smart_switch_generated_services.erase( + std::remove(non_smart_switch_generated_services.begin(), + non_smart_switch_generated_services.end(), + "midplane-network-dpu.service"), + non_smart_switch_generated_services.end()); + EXPECT_EQ(num_unit_files, non_smart_switch_generated_services.size()); + for (std::string service : non_smart_switch_generated_services) { bool found = false; for (auto& unit_file : unit_files) { + if (unit_file == NULL) { + continue; + } if(unit_file == service) { found = true; break; @@ -513,7 +668,6 @@ TEST_F(SsgFunctionTest, get_unit_files) { /* TEST ssg_main() argv error */ TEST_F(SsgMainTest, ssg_main_argv) { - FILE* fp; std::vector argv_; std::vector arguments = { "ssg_main", @@ -530,18 +684,49 @@ TEST_F(SsgMainTest, ssg_main_argv) { /* TEST ssg_main() single asic */ TEST_F(SsgMainTest, ssg_main_single_npu) { - ssg_main_test(1); + SsgMainConfig cfg; + cfg.num_asics = 1; + ssg_main_test(cfg); } /* TEST ssg_main() multi(10) asic */ TEST_F(SsgMainTest, ssg_main_10_npu) { - ssg_main_test(10); + SsgMainConfig cfg; + cfg.num_asics = 10; + ssg_main_test(cfg); } /* TEST ssg_main() multi(40) asic */ TEST_F(SsgMainTest, ssg_main_40_npu) { - ssg_main_test(40); + SsgMainConfig cfg; + cfg.num_asics = 40; + ssg_main_test(cfg); +} + +TEST_F(SsgMainTest, ssg_main_smart_switch_npu) { + SsgMainConfig cfg; + cfg.num_asics = 1; + cfg.is_smart_switch_npu = true; + cfg.num_dpus = 8; + ssg_main_test(cfg); } + +TEST_F(SsgMainTest, ssg_main_smart_switch_dpu) { + SsgMainConfig cfg; + cfg.num_asics = 1; + cfg.is_smart_switch_dpu = true; + ssg_main_test(cfg); +} + +TEST_F(SsgMainTest, ssg_main_smart_switch_double_execution) { + SsgMainConfig cfg; + cfg.num_asics = 1; + cfg.is_smart_switch_npu = true; + cfg.num_dpus = 8; + ssg_main_test(cfg); + ssg_main_test(cfg); +} + } int main(int argc, char** argv) { diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.c b/src/systemd-sonic-generator/systemd-sonic-generator.c deleted file mode 100644 index d9bb75fea2b6..000000000000 --- a/src/systemd-sonic-generator/systemd-sonic-generator.c +++ /dev/null @@ -1,658 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_NUM_TARGETS 48 -#define MAX_NUM_INSTALL_LINES 48 -#define MAX_NUM_UNITS 128 -#define MAX_BUF_SIZE 512 - -const char* UNIT_FILE_PREFIX = "/usr/lib/systemd/system/"; -const char* CONFIG_FILE = "/etc/sonic/generated_services.conf"; -const char* MACHINE_CONF_FILE = "/host/machine.conf"; -const char* ASIC_CONF_FORMAT = "/usr/share/sonic/device/%s/asic.conf"; - -const char* g_unit_file_prefix = NULL; -const char* get_unit_file_prefix() { - return (g_unit_file_prefix) ? g_unit_file_prefix : UNIT_FILE_PREFIX; -} - -const char* g_config_file = NULL; -const char* get_config_file() { - return (g_config_file) ? g_config_file : CONFIG_FILE; -} - -const char* g_machine_config_file = NULL; -const char* get_machine_config_file() { - return (g_machine_config_file) ? g_machine_config_file : MACHINE_CONF_FILE; -} - -const char* g_asic_conf_format = NULL; -const char* get_asic_conf_format() { - return (g_asic_conf_format) ? g_asic_conf_format : ASIC_CONF_FORMAT; -} - -static int num_asics; -static char** multi_instance_services; -static int num_multi_inst; - -void strip_trailing_newline(char* str) { - /*** - Strips trailing newline from a string if it exists - ***/ - - size_t l = strlen(str); - if (l > 0 && str[l-1] == '\n') - str[l-1] = '\0'; -} - - -static int get_target_lines(char* unit_file, char* target_lines[]) { - /*** - Gets installation information for a given unit file - - Returns lines in the [Install] section of a unit file - ***/ - FILE *fp; - char *line = NULL; - size_t len = 0; - ssize_t nread; - bool found_install; - int num_target_lines; - - - fp = fopen(unit_file, "r"); - - if (fp == NULL) { - fprintf(stderr, "Failed to open file %s\n", unit_file); - return -1; - } - - found_install = false; - num_target_lines = 0; - - while ((nread = getline(&line, &len, fp)) != -1 ) { - // Assumes that [Install] is the last section of the unit file - if (strstr(line, "[Install]") != NULL) { - found_install = true; - } - else if (found_install) { - if (num_target_lines >= MAX_NUM_INSTALL_LINES) { - fprintf(stderr, "Number of lines in [Install] section of %s exceeds MAX_NUM_INSTALL_LINES\n", unit_file); - fputs("Extra [Install] lines will be ignored\n", stderr); - break; - } - target_lines[num_target_lines] = strdup(line); - num_target_lines++; - } - } - - free(line); - - fclose(fp); - - return num_target_lines; -} - -static bool is_multi_instance_service(char *service_name){ - int i; - for(i=0; i < num_multi_inst; i++){ - /* - * The service name may contain @.service or .service. Remove these - * postfixes and extract service name. Compare service name for absolute - * match in multi_instance_services[]. - * This is to prevent services like database-chassis and systemd-timesyncd marked - * as multi instance services as they contain strings 'database' and 'syncd' respectively - * which are multi instance services in multi_instance_services[]. - */ - char *saveptr; - char *token = strtok_r(service_name, "@", &saveptr); - if (token) { - if (strstr(token, ".service") != NULL) { - /* If we are here, service_name did not have '@' delimiter but contains '.service' */ - token = strtok_r(service_name, ".", &saveptr); - } - } - if (strncmp(service_name, multi_instance_services[i], strlen(service_name)) == 0) { - return true; - } - } - return false; - -} - -static int get_install_targets_from_line(char* target_string, char* install_type, char* targets[], int existing_targets) { - /*** - Helper fuction for get_install_targets - - Given a space delimited string of target directories and a suffix, - puts each target directory plus the suffix into the targets array - ***/ - char* token; - char* target; - char* saveptr; - char final_target[PATH_MAX]; - int num_targets = 0; - - assert(target_string); - assert(install_type); - - while ((token = strtok_r(target_string, " ", &target_string))) { - if (num_targets + existing_targets >= MAX_NUM_TARGETS) { - fputs("Number of targets found exceeds MAX_NUM_TARGETS\n", stderr); - fputs("Additional targets will be ignored \n", stderr); - return num_targets; - } - - target = strdup(token); - strip_trailing_newline(target); - - if (strstr(target, "%") != NULL) { - char* prefix = strtok_r(target, ".", &saveptr); - char* suffix = strtok_r(NULL, ".", &saveptr); - int prefix_len = strlen(prefix); - - strncpy(final_target, prefix, prefix_len - 2); - final_target[prefix_len - 2] = '\0'; - strcat(final_target, "."); - strcat(final_target, suffix); - } - else { - strcpy(final_target, target); - } - strcat(final_target, install_type); - - free(target); - - targets[num_targets + existing_targets] = strdup(final_target); - num_targets++; - } - return num_targets; -} - -static void replace_multi_inst_dep(char *src) { - FILE *fp_src; - FILE *fp_tmp; - char buf[MAX_BUF_SIZE]; - char* line = NULL; - int i; - ssize_t len; - char *token; - char *word; - char *line_copy; - char *service_name; - char *type; - char *save_ptr1 = NULL; - char *save_ptr2 = NULL; - ssize_t nread; - bool section_done = false; - char tmp_file_path[PATH_MAX]; - - /* Assumes that the service files has 3 sections, - * in the order: Unit, Service and Install. - * Assumes that the timer file has 3 sections, - * in the order: Unit, Timer and Install. - * Read service dependency from Unit and Install - * sections, replace if dependent on multi instance - * service. - */ - fp_src = fopen(src, "r"); - snprintf(tmp_file_path, PATH_MAX, "%s.tmp", src); - fp_tmp = fopen(tmp_file_path, "w"); - - while ((nread = getline(&line, &len, fp_src)) != -1 ) { - if ((strstr(line, "[Service]") != NULL) || - (strstr(line, "[Timer]") != NULL)) { - section_done = true; - fputs(line,fp_tmp); - } else if (strstr(line, "[Install]") != NULL) { - section_done = false; - fputs(line,fp_tmp); - } else if ((strstr(line, "[Unit]") != NULL) || - (strstr(line, "Description") != NULL) || - (section_done == true)) { - fputs(line,fp_tmp); - } else { - line_copy = strdup(line); - token = strtok_r(line_copy, "=", &save_ptr1); - while ((word = strtok_r(NULL, " ", &save_ptr1))) { - if((strchr(word, '.') == NULL) || - (strchr(word, '@') != NULL)) { - snprintf(buf, MAX_BUF_SIZE,"%s=%s\n",token, word); - fputs(buf,fp_tmp); - } else { - service_name = strdup(word); - service_name = strtok_r(service_name, ".", &save_ptr2); - type = strtok_r(NULL, "\n", &save_ptr2); - if (is_multi_instance_service(word)) { - for(i = 0; i < num_asics; i++) { - snprintf(buf, MAX_BUF_SIZE, "%s=%s@%d.%s\n", - token, service_name, i, type); - fputs(buf,fp_tmp); - } - } else { - snprintf(buf, MAX_BUF_SIZE,"%s=%s.%s\n",token, service_name, type); - fputs(buf, fp_tmp); - } - free(service_name); - } - } - free(line_copy); - } - } - fclose(fp_src); - fclose(fp_tmp); - free(line); - /* remove the .service file, rename the .service.tmp file - * as .service. - */ - remove(src); - rename(tmp_file_path, src); -} - -int get_install_targets(char* unit_file, char* targets[]) { - /*** - Returns install targets for a unit file - - Parses the information in the [Install] section of a given - unit file to determine which directories to install the unit in - ***/ - char file_path[PATH_MAX]; - char *target_lines[MAX_NUM_INSTALL_LINES]; - int num_target_lines; - int num_targets; - int found_targets; - char* token; - char* line = NULL; - bool first; - char* target_suffix = NULL; - char *instance_name; - char *dot_ptr; - - strcpy(file_path, get_unit_file_prefix()); - strcat(file_path, unit_file); - - instance_name = strdup(unit_file); - dot_ptr = strchr(instance_name, '.'); - *dot_ptr = '\0'; - - if((num_asics > 1) && (!is_multi_instance_service(instance_name))) { - replace_multi_inst_dep(file_path); - } - free(instance_name); - - num_target_lines = get_target_lines(file_path, target_lines); - if (num_target_lines < 0) { - fprintf(stderr, "Error parsing targets for %s\n", unit_file); - return -1; - } - - num_targets = 0; - - for (int i = 0; i < num_target_lines; i++) { - line = target_lines[i]; - first = true; - - while ((token = strtok_r(line, "=", &line))) { - if (first) { - first = false; - - if (strstr(token, "RequiredBy") != NULL) { - target_suffix = ".requires"; - } - else if (strstr(token, "WantedBy") != NULL) { - target_suffix = ".wants"; - } else { - break; - } - } - else { - found_targets = get_install_targets_from_line(token, target_suffix, targets, num_targets); - num_targets += found_targets; - } - } - free(target_lines[i]); - } - return num_targets; -} - - -int get_unit_files(char* unit_files[]) { - /*** - Reads a list of unit files to be installed from /etc/sonic/generated_services.conf - ***/ - FILE *fp; - char *line = NULL; - size_t len = 0; - ssize_t read; - char *pos; - const char* config_file = get_config_file(); - - fp = fopen(config_file, "r"); - - if (fp == NULL) { - fprintf(stderr, "Failed to open %s\n", config_file); - exit(EXIT_FAILURE); - } - - int num_unit_files = 0; - num_multi_inst = 0; - - multi_instance_services = calloc(MAX_NUM_UNITS, sizeof(char *)); - - while ((read = getline(&line, &len, fp)) != -1) { - if (num_unit_files >= MAX_NUM_UNITS) { - fprintf(stderr, "Maximum number of units exceeded, ignoring extras\n"); - break; - } - strip_trailing_newline(line); - - /* Get the multi-instance services */ - pos = strchr(line, '@'); - if (pos != NULL) { - multi_instance_services[num_multi_inst] = calloc(strlen(line), sizeof(char)); - strncpy(multi_instance_services[num_multi_inst], line, pos-line); - num_multi_inst++; - } - - /* topology service to be started only for multiasic VS platform */ - if ((strcmp(line, "topology.service") == 0) && - (num_asics == 1)) { - continue; - } - unit_files[num_unit_files] = strdup(line); - num_unit_files++; - } - - free(line); - - fclose(fp); - - return num_unit_files; -} - - -char* insert_instance_number(char* unit_file, int instance) { - /*** - Adds an instance number to a systemd template name - - E.g. given unit_file='example@.service', instance=3, - returns a pointer to 'example@3.service' - ***/ - char* instance_name; - int ret; - int prefix_len; - const char *suffix = strchr(unit_file, '@'); - if (!suffix) { - fprintf(stderr, "Invalid unit file %s for instance %d\n", unit_file, instance); - return NULL; - } - - /*** - suffix is "@.service", set suffix=".service" - prefix_len is length of "example@" - ***/ - prefix_len = ++suffix - unit_file; - ret = asprintf(&instance_name, "%.*s%d%s", prefix_len, unit_file, instance, suffix); - if (ret == -1) { - fprintf(stderr, "Error creating instance %d of %s\n", instance, unit_file); - return NULL; - } - - return instance_name; -} - - -static int create_symlink(char* unit, char* target, char* install_dir, int instance) { - struct stat st; - char src_path[PATH_MAX]; - char dest_path[PATH_MAX]; - char final_install_dir[PATH_MAX]; - char* unit_instance; - int r; - - strcpy(src_path, get_unit_file_prefix()); - strcat(src_path, unit); - - if (instance < 0) { - unit_instance = strdup(unit); - } - else { - unit_instance = insert_instance_number(unit, instance); - } - - strcpy(final_install_dir, install_dir); - strcat(final_install_dir, target); - strcpy(dest_path, final_install_dir); - strcat(dest_path, "/"); - strcat(dest_path, unit_instance); - - free(unit_instance); - - if (stat(final_install_dir, &st) == -1) { - // If doesn't exist, create - r = mkdir(final_install_dir, 0755); - if (r == -1) { - fprintf(stderr, "Unable to create target directory %s\n", final_install_dir); - return -1; - } - } - else if (S_ISREG(st.st_mode)) { - // If is regular file, remove and create - r = remove(final_install_dir); - if (r == -1) { - fprintf(stderr, "Unable to remove file with same name as target directory %s\n", final_install_dir); - return -1; - } - - r = mkdir(final_install_dir, 0755); - if (r == -1) { - fprintf(stderr, "Unable to create target directory %s\n", final_install_dir); - return -1; - } - } - else if (S_ISDIR(st.st_mode)) { - // If directory, verify correct permissions - r = chmod(final_install_dir, 0755); - if (r == -1) { - fprintf(stderr, "Unable to change permissions of existing target directory %s\n", final_install_dir); - return -1; - } - } - - r = symlink(src_path, dest_path); - - if (r < 0) { - if (errno == EEXIST) - return 0; - fprintf(stderr, "Error creating symlink %s from source %s\n", dest_path, src_path); - return -1; - } - - return 0; - -} - - -static int install_unit_file(char* unit_file, char* target, char* install_dir) { - /*** - Creates a symlink for a unit file installation - - For a given unit file and target directory, - create the appropriate symlink in the target directory - to enable the unit and have it started by Systemd - - If a multi ASIC platform is detected, enables multi-instance - services as well - ***/ - char* target_instance; - char* prefix; - char* suffix; - int r; - - assert(unit_file); - assert(target); - - - if ((num_asics > 1) && strstr(unit_file, "@") != NULL) { - - for (int i = 0; i < num_asics; i++) { - - if (strstr(target, "@") != NULL) { - target_instance = insert_instance_number(target, i); - } - else { - target_instance = strdup(target); - } - - r = create_symlink(unit_file, target_instance, install_dir, i); - if (r < 0) - fprintf(stderr, "Error installing %s for target %s\n", unit_file, target_instance); - - free(target_instance); - - } - } - else { - r = create_symlink(unit_file, target, install_dir, -1); - if (r < 0) - fprintf(stderr, "Error installing %s for target %s\n", unit_file, target); - } - - return 0; -} - - -int get_num_of_asic() { - /*** - Determines if the current platform is single or multi-ASIC - ***/ - FILE *fp; - char *line = NULL; - char* token; - char* platform = NULL; - char* saveptr; - size_t len = 0; - ssize_t nread; - bool ans; - char asic_file[512]; - char* str_num_asic; - int num_asic = 1; - const char* machine_config_file = get_machine_config_file(); - - fp = fopen(machine_config_file, "r"); - - if (fp == NULL) { - fprintf(stderr, "Failed to open %s\n", machine_config_file); - exit(EXIT_FAILURE); - } - - while ((nread = getline(&line, &len, fp)) != -1) { - if ((strstr(line, "onie_platform") != NULL) || - (strstr(line, "aboot_platform") != NULL)) { - token = strtok_r(line, "=", &saveptr); - platform = strtok_r(NULL, "=", &saveptr); - strip_trailing_newline(platform); - break; - } - } - fclose(fp); - if(platform != NULL) { - snprintf(asic_file, 512, get_asic_conf_format(), platform); - fp = fopen(asic_file, "r"); - if (fp != NULL) { - while ((nread = getline(&line, &len, fp)) != -1) { - if (strstr(line, "NUM_ASIC") != NULL) { - token = strtok_r(line, "=", &saveptr); - str_num_asic = strtok_r(NULL, "=", &saveptr); - strip_trailing_newline(str_num_asic); - if (str_num_asic != NULL){ - num_asic = strtol(str_num_asic, NULL, 10); - } - break; - } - } - fclose(fp); - free(line); - } - } - return num_asic; - -} - -int ssg_main(int argc, char **argv) { - char* unit_files[MAX_NUM_UNITS]; - char install_dir[PATH_MAX]; - char* targets[MAX_NUM_TARGETS]; - char* unit_instance; - char* prefix; - char* suffix; - char* saveptr; - int num_unit_files; - int num_targets; - int r; - - if (argc <= 1) { - fputs("Installation directory required as argument\n", stderr); - return 1; - } - - num_asics = get_num_of_asic(); - strcpy(install_dir, argv[1]); - strcat(install_dir, "/"); - num_unit_files = get_unit_files(unit_files); - - // For each unit file, get the installation targets and install the unit - for (int i = 0; i < num_unit_files; i++) { - unit_instance = strdup(unit_files[i]); - if ((num_asics == 1) && strstr(unit_instance, "@") != NULL) { - prefix = strdup(strtok_r(unit_instance, "@", &saveptr)); - suffix = strdup(strtok_r(NULL, "@", &saveptr)); - - strcpy(unit_instance, prefix); - strcat(unit_instance, suffix); - - free(prefix); - free(suffix); - } - - num_targets = get_install_targets(unit_instance, targets); - if (num_targets < 0) { - fprintf(stderr, "Error parsing %s\n", unit_instance); - free(unit_instance); - free(unit_files[i]); - continue; - } - - for (int j = 0; j < num_targets; j++) { - if (install_unit_file(unit_instance, targets[j], install_dir) != 0) - fprintf(stderr, "Error installing %s to target directory %s\n", unit_instance, targets[j]); - - free(targets[j]); - } - - free(unit_instance); - free(unit_files[i]); - } - - for (int i = 0; i < num_multi_inst; i++) { - free(multi_instance_services[i]); - } - free(multi_instance_services); - - return 0; -} - - -#ifndef _SSG_UNITTEST -int main(int argc, char **argv) { - return ssg_main(argc, argv); -} -#endif diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.cpp b/src/systemd-sonic-generator/systemd-sonic-generator.cpp new file mode 100644 index 000000000000..d1b61a325d3c --- /dev/null +++ b/src/systemd-sonic-generator/systemd-sonic-generator.cpp @@ -0,0 +1,1141 @@ +#include +#include +#include +#include +#include +// #include +#include +#include +#include +#include +#include +#include +#include + +#define MAX_NUM_TARGETS 48 +#define MAX_NUM_INSTALL_LINES 48 +#define MAX_NUM_UNITS 128 +#define MAX_BUF_SIZE 512 +#define MAX_PLATFORM_NAME_LEN 64 + + + +const char* LIB_SYSTEMD = "/usr/lib/systemd"; +const char* ETC_SYSTEMD = "/etc/systemd"; +const char* UNIT_FILE_PREFIX = "/usr/lib/systemd/system/"; +const char* CONFIG_FILE = "/etc/sonic/generated_services.conf"; +const char* MACHINE_CONF_FILE = "/host/machine.conf"; +const char* ASIC_CONF_FORMAT = "/usr/share/sonic/device/%s/asic.conf"; +const char* PLATFORM_FILE_FORMAT = "/usr/share/sonic/device/%s/platform.json"; +const char* DPU_PREFIX = "dpu"; + + +const char* g_lib_systemd = NULL; +const char* get_lib_systemd () { + return (g_lib_systemd) ? g_lib_systemd : LIB_SYSTEMD; +} + +const char* g_etc_systemd = NULL; +const char* get_etc_systemd () { + return (g_etc_systemd) ? g_etc_systemd : ETC_SYSTEMD; +} + +const char* g_unit_file_prefix = NULL; +const char* get_unit_file_prefix() { + return (g_unit_file_prefix) ? g_unit_file_prefix : UNIT_FILE_PREFIX; +} + +const char* g_config_file = NULL; +const char* get_config_file() { + return (g_config_file) ? g_config_file : CONFIG_FILE; +} + +const char* g_machine_config_file = NULL; +const char* get_machine_config_file() { + return (g_machine_config_file) ? g_machine_config_file : MACHINE_CONF_FILE; +} + +const char* g_asic_conf_format = NULL; +const char* get_asic_conf_format() { + return (g_asic_conf_format) ? g_asic_conf_format : ASIC_CONF_FORMAT; +} + +const char* g_platform_file_format = NULL; +const char* get_platform_file_format() { + return (g_platform_file_format) ? g_platform_file_format : PLATFORM_FILE_FORMAT; +} + +static int num_asics; +static char** multi_instance_services; +static int num_multi_inst; +static bool smart_switch_npu; +static bool smart_switch_dpu; +static bool smart_switch; +static int num_dpus; +static char* platform = NULL; +static struct json_object *platform_info = NULL; + + +#ifdef _SSG_UNITTEST +/** + * @brief Cleans up the cache by resetting cache pointers. + */ +void clean_up_cache() { + platform = NULL; + platform_info = NULL; +} +#endif + +/** + * Sets the value of a pointer to an invalid memory address. + * + * @param pointer A pointer to a pointer variable. + */ +void set_invalid_pointer(void **pointer) { + *pointer = (void *)-1; +} + + +/** + * @brief Checks if a pointer is valid. + * + * This function checks if a pointer is valid by verifying that it is not NULL and not equal to (void *)-1. + * + * @param pointer The pointer to be checked. + * @return true if the pointer is valid, false otherwise. + */ +bool is_valid_pointer(void *pointer) { + return pointer != NULL && pointer != (void *)-1; +} + + +/** + * Checks if a pointer is initialized. + * + * @param pointer The pointer to check. + * @return true if the pointer is not NULL, false otherwise. + */ +bool is_initialized_pointer(void *pointer) { + return pointer != NULL; +} + +void strip_trailing_newline(char* str) { + /*** + Strips trailing newline from a string if it exists + ***/ + + if (str == NULL) { + return; + } + size_t l = strlen(str); + if (l > 0 && str[l-1] == '\n') + str[l-1] = '\0'; +} + +void strip_trailing_newline(std::string& str) { + /*** + Strips trailing newline from a string if it exists + ***/ + if (!str.empty() && str.back() == '\n') { + str.pop_back(); + } +} + + +/** + * Checks if the given path is "/dev/null". + * + * @param path The path to check. + * @return true if the path is "/dev/null", false otherwise. + */ +static bool is_devnull(const char* path) +{ + char resolved_path[PATH_MAX]; + if (realpath(path, resolved_path) == NULL) { + return false; + } + return strcmp(resolved_path, "/dev/null") == 0; +} + + +static int get_target_lines(const char* unit_file, char* target_lines[]) { + /*** + Gets installation information for a given unit file + + Returns lines in the [Install] section of a unit file + ***/ + FILE *fp; + char *line = NULL; + size_t len = 0; + ssize_t nread; + bool found_install; + int num_target_lines; + + + fp = fopen(unit_file, "r"); + + if (fp == NULL) { + fprintf(stderr, "Failed to open file %s\n", unit_file); + return -1; + } + + found_install = false; + num_target_lines = 0; + + while ((nread = getline(&line, &len, fp)) != -1 ) { + // Assumes that [Install] is the last section of the unit file + if (strstr(line, "[Install]") != NULL) { + found_install = true; + } + else if (found_install) { + if (num_target_lines >= MAX_NUM_INSTALL_LINES) { + fprintf(stderr, "Number of lines in [Install] section of %s exceeds MAX_NUM_INSTALL_LINES\n", unit_file); + fputs("Extra [Install] lines will be ignored\n", stderr); + break; + } + target_lines[num_target_lines] = strdup(line); + num_target_lines++; + } + } + + free(line); + + fclose(fp); + + return num_target_lines; +} + +static bool is_multi_instance_service(std::string service_file, std::unordered_set service_list=std::unordered_set()){ + /* + * The service name may contain @.service or .service. Remove these + * postfixes and extract service name. Compare service name for absolute + * match in multi_instance_services[]. + * This is to prevent services like database-chassis and systemd-timesyncd marked + * as multi instance services as they contain strings 'database' and 'syncd' respectively + * which are multi instance services in multi_instance_services[]. + */ + std::string delimiter; + if (service_file.find("@") != std::string::npos) { + delimiter = "@"; + } else { + delimiter = "."; + } + std::string service_name = service_file.substr(0, service_file.find(delimiter)); + + if (service_list.empty()) { + for(int i=0; i < num_multi_inst; i++){ + + if (service_name == multi_instance_services[i]) { + return true; + } + } + } else { + if (service_list.count(service_name) > 0) { + return true; + } + } + return false; + +} + + +/** + * Checks if a service is a multi-instance service for DPU. + * + * @param service_name The name of the service to check. + * @return true if the service is a multi-instance service for DPU, false otherwise. + */ +static bool is_multi_instance_service_for_dpu(const std::string& service_name) { + if (!smart_switch_npu) { + return false; + } + + std::unordered_set multi_instance_services_for_dpu = {"database"}; + return is_multi_instance_service(service_name, multi_instance_services_for_dpu); +} + + +static int get_install_targets_from_line(std::string target_string, std::string install_type, char* targets[], int existing_targets) { + /*** + Helper fuction for get_install_targets + + Given a space delimited string of target directories and a suffix, + puts each target directory plus the suffix into the targets array + ***/ + std::string target; + int num_targets = 0; + + if (target_string.empty() || install_type.empty()) { + fprintf(stderr, "Invalid target string or install type\n"); + exit(EXIT_FAILURE); + } + + std::stringstream ss(target_string); + + while (ss >> target) { + if (num_targets + existing_targets >= MAX_NUM_TARGETS) { + fprintf(stderr, "Number of targets exceeds MAX_NUM_TARGETS\n"); + fputs("Additional targets will be ignored\n", stderr); + break; + } + // handle install targets using the '%i' systemd specifier + if (target.find("%") != std::string::npos) { + target = target.substr(0, target.find("%")) + target.substr(target.find(".")); + } + strip_trailing_newline(target); + target += install_type; + targets[num_targets + existing_targets] = (char*) calloc(target.length() + 1, sizeof(char)); + snprintf(targets[num_targets + existing_targets], PATH_MAX, "%s", target.c_str()); + num_targets++; + } + return num_targets; +} + +static void replace_multi_inst_dep(const char *src) { + FILE *fp_src; + FILE *fp_tmp; + char buf[MAX_BUF_SIZE]; + char* line = NULL; + int i; + size_t len; + char *token; + char *word; + char *line_copy; + char *service_name; + char *type; + char *save_ptr1 = NULL; + char *save_ptr2 = NULL; + ssize_t nread; + bool section_done = false; + char tmp_file_path[PATH_MAX]; + + /* Assumes that the service files has 3 sections, + * in the order: Unit, Service and Install. + * Assumes that the timer file has 3 sections, + * in the order: Unit, Timer and Install. + * Read service dependency from Unit and Install + * sections, replace if dependent on multi instance + * service. + */ + fp_src = fopen(src, "r"); + snprintf(tmp_file_path, PATH_MAX, "%s.tmp", src); + fp_tmp = fopen(tmp_file_path, "w"); + + while ((nread = getline(&line, &len, fp_src)) != -1 ) { + if ((strstr(line, "[Service]") != NULL) || + (strstr(line, "[Timer]") != NULL)) { + section_done = true; + fputs(line,fp_tmp); + } else if (strstr(line, "[Install]") != NULL) { + section_done = false; + fputs(line,fp_tmp); + } else if ((strstr(line, "[Unit]") != NULL) || + (strstr(line, "Description") != NULL) || + (section_done == true)) { + fputs(line,fp_tmp); + } else { + line_copy = strdup(line); + token = strtok_r(line_copy, "=", &save_ptr1); + while ((word = strtok_r(NULL, " ", &save_ptr1))) { + if((strchr(word, '.') == NULL) || + (strchr(word, '@') != NULL)) { + snprintf(buf, MAX_BUF_SIZE,"%s=%s\n",token, word); + fputs(buf,fp_tmp); + } else { + service_name = strdup(word); + service_name = strtok_r(service_name, ".", &save_ptr2); + type = strtok_r(NULL, "\n", &save_ptr2); + if (num_asics > 1 && is_multi_instance_service(word)) { + for(i = 0; i < num_asics; i++) { + snprintf(buf, MAX_BUF_SIZE, "%s=%s@%d.%s\n", + token, service_name, i, type); + fputs(buf,fp_tmp); + } + } else if (smart_switch_npu && is_multi_instance_service_for_dpu(word)) { + for(i = 0; i < num_dpus; i++) { + snprintf(buf, MAX_BUF_SIZE, "%s=%s@%s%d.%s\n", + token, service_name, DPU_PREFIX, i, type); + fputs(buf,fp_tmp); + } + } else { + snprintf(buf, MAX_BUF_SIZE,"%s=%s.%s\n",token, service_name, type); + fputs(buf, fp_tmp); + } + free(service_name); + } + } + free(line_copy); + } + } + fclose(fp_src); + fclose(fp_tmp); + free(line); + /* remove the .service file, rename the .service.tmp file + * as .service. + */ + remove(src); + rename(tmp_file_path, src); +} + +int get_install_targets(std::string unit_file, char* targets[]) { + /*** + Returns install targets for a unit file + + Parses the information in the [Install] section of a given + unit file to determine which directories to install the unit in + ***/ + std::string file_path; + char *target_lines[MAX_NUM_INSTALL_LINES]; + int num_target_lines; + int num_targets; + int found_targets; + char* token; + char* line = NULL; + bool first; + std::string target_suffix; + std::string instance_name; + + file_path = get_unit_file_prefix() + unit_file; + + instance_name = unit_file.substr(0, unit_file.find('.')); + + if(((num_asics > 1) && (!is_multi_instance_service(instance_name))) + || ((num_dpus > 0) && (!is_multi_instance_service_for_dpu(instance_name)))) { + replace_multi_inst_dep(file_path.c_str()); + } + + num_target_lines = get_target_lines(file_path.c_str(), target_lines); + if (num_target_lines < 0) { + fprintf(stderr, "Error parsing targets for %s\n", unit_file.c_str()); + return -1; + } + + num_targets = 0; + + for (int i = 0; i < num_target_lines; i++) { + line = target_lines[i]; + first = true; + + while ((token = strtok_r(line, "=", &line))) { + if (first) { + first = false; + + if (strstr(token, "RequiredBy") != NULL) { + target_suffix = ".requires"; + } + else if (strstr(token, "WantedBy") != NULL) { + target_suffix = ".wants"; + } else { + break; + } + } + else { + found_targets = get_install_targets_from_line(token, target_suffix, targets, num_targets); + num_targets += found_targets; + } + } + free(target_lines[i]); + } + return num_targets; +} + + +int get_unit_files(char* unit_files[]) { + /*** + Reads a list of unit files to be installed from /etc/sonic/generated_services.conf + ***/ + FILE *fp; + char *line = NULL; + size_t len = 0; + ssize_t read; + char *pos; + const char* config_file = get_config_file(); + + fp = fopen(config_file, "r"); + + if (fp == NULL) { + fprintf(stderr, "Failed to open %s\n", config_file); + exit(EXIT_FAILURE); + } + + int num_unit_files = 0; + num_multi_inst = 0; + + multi_instance_services = (char**) calloc(MAX_NUM_UNITS, sizeof(char *)); + + while ((read = getline(&line, &len, fp)) != -1) { + if (num_unit_files >= MAX_NUM_UNITS) { + fprintf(stderr, "Maximum number of units exceeded, ignoring extras\n"); + break; + } + strip_trailing_newline(line); + + /* Get the multi-instance services */ + pos = strchr(line, '@'); + if (pos != NULL) { + multi_instance_services[num_multi_inst] = (char*) calloc(pos-line+1, sizeof(char)); + snprintf(multi_instance_services[num_multi_inst], pos-line+1, "%s", line); + num_multi_inst++; + } + + /* topology service to be started only for multiasic VS platform */ + if ((strcmp(line, "topology.service") == 0) && + (num_asics == 1)) { + continue; + } else if ((strcmp(line, "midplane-network-dpu.service") == 0) && + !smart_switch_dpu) { + continue; + } else if ((strcmp(line, "midplane-network-npu.service") == 0) && + !smart_switch_npu) { + continue; + } + + unit_files[num_unit_files] = strdup(line); + num_unit_files++; + } + + free(line); + + fclose(fp); + + return num_unit_files; +} + + +std::string insert_instance_number(const std::string& unit_file, int instance, const std::string& instance_prefix) { + /*** + Adds an instance number to a systemd template name + + E.g. given unit_file='example@.service', instance=3, + returns a pointer to 'example@3.service' + ***/ + size_t at_pos = unit_file.find("@"); + if (at_pos == std::string::npos) { + fprintf(stderr, "Invalid unit file %s for instance %d\n", unit_file.c_str(), instance); + return ""; + } + + return unit_file.substr(0, at_pos + 1) + instance_prefix + std::to_string(instance) + unit_file.substr(at_pos + 1); +} + + +static int create_symlink(const std::string& unit, const std::string& target, const std::string& install_dir, int instance, const std::string& instance_prefix) { + struct stat st; + std::string src_path; + std::string dest_path; + std::string final_install_dir; + std::string unit_instance; + int r; + + src_path = get_unit_file_prefix() + unit; + + if (instance < 0) { + unit_instance = unit; + } + else { + unit_instance = insert_instance_number(unit, instance, instance_prefix); + } + + final_install_dir = install_dir + std::string(target); + dest_path = final_install_dir + "/" + unit_instance; + + if (stat(final_install_dir.c_str(), &st) == -1) { + // If doesn't exist, create + r = mkdir(final_install_dir.c_str(), 0755); + if (r == -1) { + fprintf(stderr, "Unable to create target directory %s\n", final_install_dir.c_str()); + return -1; + } + } + else if (S_ISREG(st.st_mode)) { + // If is regular file, remove and create + r = remove(final_install_dir.c_str()); + if (r == -1) { + fprintf(stderr, "Unable to remove file with same name as target directory %s\n", final_install_dir.c_str()); + return -1; + } + + r = mkdir(final_install_dir.c_str(), 0755); + if (r == -1) { + fprintf(stderr, "Unable to create target directory %s\n", final_install_dir.c_str()); + return -1; + } + } + else if (S_ISDIR(st.st_mode)) { + // If directory, verify correct permissions + r = chmod(final_install_dir.c_str(), 0755); + if (r == -1) { + fprintf(stderr, "Unable to change permissions of existing target directory %s\n", final_install_dir.c_str()); + return -1; + } + } + + if (is_devnull(dest_path.c_str())) { + if (remove(dest_path.c_str()) != 0) { + fprintf(stderr, "Unable to remove existing symlink %s\n", dest_path.c_str()); + return -1; + } + } + + r = symlink(src_path.c_str(), dest_path.c_str()); + + if (r < 0) { + if (errno == EEXIST) + return 0; + fprintf(stderr, "Error creating symlink %s from source %s\n", dest_path.c_str(), src_path.c_str()); + return -1; + } + + return 0; + +} + + +static int install_unit_file(std::string unit_file, std::string target, std::string install_dir) { + /*** + Creates a symlink for a unit file installation + + For a given unit file and target directory, + create the appropriate symlink in the target directory + to enable the unit and have it started by Systemd + + If a multi ASIC platform is detected, enables multi-instance + services as well + ***/ + std::string target_instance; + int r; + + if (unit_file.empty() || target.empty() || install_dir.empty()){ + fprintf(stderr, "Invalid unit file, target or install directory\n"); + exit(EXIT_FAILURE); + } + + if ((num_asics > 1) && unit_file.find("@") != std::string::npos) { + + for (int i = 0; i < num_asics; i++) { + + if (target.find("@") != std::string::npos) { + target_instance = insert_instance_number(target, i, ""); + } + else { + target_instance = target; + } + + r = create_symlink(unit_file, target_instance, install_dir, i, ""); + if (r < 0) + fprintf(stderr, "Error installing %s for target %s\n", unit_file.c_str(), target_instance.c_str()); + } + } else if (num_dpus > 0 && unit_file.find("@") != std::string::npos) { + // If multi-instance service for DPU + // Install each DPU units to the host main instance only, + // E.g. install database@dpu0.service, database@dpu1.service to multi-user.target.wants + // We don't have case like to install xxx@dpu0.service to swss@dpu0.service.wants + for (int i = 0; i < num_dpus; i++) { + r = create_symlink(unit_file, target, install_dir, i, DPU_PREFIX); + if (r < 0) + fprintf(stderr, "Error installing %s for target %s\n", unit_file.c_str(), target.c_str()); + } + } else { + r = create_symlink(unit_file, target, install_dir, -1, ""); + if (r < 0) + fprintf(stderr, "Error installing %s for target %s\n", unit_file.c_str(), target.c_str()); + } + + return 0; +} + + +/** + * Retrieves the platform name from the machine configuration file. + * If the platform name is already cached, it returns the cached value. + * If the platform name is not found in the configuration file, it sets the platform pointer to NULL. + * + * @return The platform name if found, otherwise NULL. + */ +const char* get_platform() { + if (is_initialized_pointer(platform)) { + if (is_valid_pointer(platform)) { + return platform; + } else { + return NULL; + } + } + + FILE* fp; + char* line = NULL; + char* saveptr; + char *tmp_platform = NULL; + static char platform_buffer[MAX_PLATFORM_NAME_LEN + 1]; + size_t len = 0; + ssize_t nread; + const char* machine_config_file = get_machine_config_file(); + fp = fopen(machine_config_file, "r"); + if (fp == NULL) { + fprintf(stderr, "Failed to open %s\n", machine_config_file); + exit(EXIT_FAILURE); + } + + while ((nread = getline(&line, &len, fp)) != -1) { + if ((strstr(line, "onie_platform") != NULL) || + (strstr(line, "aboot_platform") != NULL)) { + strtok_r(line, "=", &saveptr); + tmp_platform = strtok_r(NULL, "=", &saveptr); + strip_trailing_newline(tmp_platform); + break; + } + } + if (tmp_platform == NULL) { + set_invalid_pointer((void **)&platform); + fclose(fp); + free(line); + return NULL; + } + snprintf(platform_buffer, sizeof(platform_buffer), "%s", tmp_platform); + fclose(fp); + free(line); + + platform = platform_buffer; + return platform; +} + + +int get_num_of_asic() { + /*** + Determines if the current platform is single or multi-ASIC + ***/ + FILE *fp; + char *line = NULL; + const char* platform = NULL; + char* saveptr; + size_t len = 0; + ssize_t nread; + char asic_file[512]; + char* str_num_asic; + int num_asic = 1; + + platform = get_platform(); + + if(platform != NULL) { + snprintf(asic_file, 512, get_asic_conf_format(), platform); + fp = fopen(asic_file, "r"); + if (fp != NULL) { + while ((nread = getline(&line, &len, fp)) != -1) { + if (strstr(line, "NUM_ASIC") != NULL) { + strtok_r(line, "=", &saveptr); + str_num_asic = strtok_r(NULL, "=", &saveptr); + strip_trailing_newline(str_num_asic); + if (str_num_asic != NULL){ + num_asic = strtol(str_num_asic, NULL, 10); + } + break; + } + } + fclose(fp); + free(line); + } + } + return num_asic; + +} + + +/** + * Retrieves the platform information. + * + * This function reads the platform information from a JSON file and returns it as a JSON object. + * If the platform information has already been retrieved, it returns the cached value. + * + * @return The platform information as a JSON object, or NULL if it fails to retrieve or parse the information. + */ +const struct json_object* get_platform_info() { + if (is_initialized_pointer(platform_info)) { + if (is_valid_pointer(platform_info)) { + return platform_info; + } else { + return NULL; + } + } + + char platform_file_path[PATH_MAX]; + const char* platform = get_platform(); + if (platform == NULL) { + set_invalid_pointer((void **)&platform_info); + return NULL; + } + snprintf(platform_file_path, sizeof(platform_file_path), get_platform_file_format(), platform); + + FILE *fp = fopen(platform_file_path, "r"); + if (fp == NULL) { + fprintf(stdout, "Failed to open %s\n", platform_file_path); + set_invalid_pointer((void **)&platform_info); + return NULL; + } + if (fseek(fp, 0, SEEK_END) != 0) { + fprintf(stdout, "Failed to seek to end of %s\n", platform_file_path); + fclose(fp); + exit(EXIT_FAILURE); + } + size_t fsize = ftell(fp); + if (fseek(fp, 0, SEEK_SET) != 0) { + fprintf(stdout, "Failed to seek to beginning of %s\n", platform_file_path); + fclose(fp); + exit(EXIT_FAILURE); + } + char *platform_json = (char*) malloc(fsize + 1); + if (platform_json == NULL) { + fprintf(stdout, "Failed to allocate memory for %s\n", platform_file_path); + fclose(fp); + exit(EXIT_FAILURE); + } + if (fread(platform_json, fsize, 1, fp) != 1) { + fprintf(stdout, "Failed to read %s\n", platform_file_path); + free(platform_json); + fclose(fp); + exit(EXIT_FAILURE); + } + fclose(fp); + platform_json[fsize] = '\0'; + + platform_info = json_tokener_parse(platform_json); + if (platform_info == NULL) { + fprintf(stderr, "Failed to parse %s\n", platform_file_path); + free(platform_json); + return NULL; + } + free(platform_json); + return platform_info; +} + + +/** + * Checks if the platform is a smart switch with an NPU (Network Processing Unit). + * + * @return true if the platform is a smart switch with an NPU, false otherwise. + */ +static bool is_smart_switch_npu() { + struct json_object *dpus; + const struct json_object *platform_info = get_platform_info(); + if (platform_info == NULL) { + return false; + } + return json_object_object_get_ex(platform_info, "DPUS", &dpus); +} + + +/** + * Checks if the current platform is a smart switch with a DPU (Data Processing Unit). + * + * @return true if the platform is a smart switch with a DPU, false otherwise. + */ +static bool is_smart_switch_dpu() { + struct json_object *dpu; + const struct json_object *platform_info = get_platform_info(); + if (platform_info == NULL) { + return false; + } + return json_object_object_get_ex(platform_info, "DPU", &dpu); +} + + +/** + * @brief Retrieves the number of DPUs (Data Processing Units). + * + * This function retrieves the number of DPUs by accessing the platform information + * and extracting the "DPUS" array from it. If the platform information is not available + * or the "DPUS" array does not exist, the function returns 0. + * + * @return The number of DPUs. + */ +static int get_num_of_dpu() { + struct json_object *dpus; + const struct json_object *platform_info = get_platform_info(); + if (platform_info == NULL) { + return 0; + } + if (!json_object_object_get_ex(platform_info, "DPUS", &dpus)) { + return 0; + } + size_t num_dpu = 0; + json_object_object_foreach(dpus, key, val) { + num_dpu++; + } + return num_dpu; +} + + +/** + * Installs the network service. + * + * This function installs the network service by creating a symlink + * to the network service file in the appropriate directory. + * + * @param unit_name The name of the network unit to install. + * @return 0 if the network unit is installed successfully, or -1 if an error occurs. + */ +static int install_network_unit(std::string unit_name) { + if (unit_name.empty()) { + fprintf(stderr, "Invalid network unit\n"); + exit(EXIT_FAILURE); + } + + std::string unit_type = unit_name.substr(unit_name.find(".") + 1); + if (unit_type.empty()) { + fprintf(stderr, "Invalid network unit %s\n", unit_name.c_str()); + return -1; + } + + std::string install_path; + std::string original_path; + std::string subdir = "/network/"; + if (unit_type != "netdev" && unit_type != "network") { + fprintf(stderr, "Invalid network unit %s\n", unit_type.c_str()); + return -1; + } + + install_path = get_etc_systemd() + subdir + unit_name; + original_path = get_lib_systemd() + subdir + unit_name; + + struct stat st; + + if (stat(install_path.c_str(), &st) == 0) { + // If the file already exists, remove it + if (S_ISDIR(st.st_mode)) { + fprintf(stderr, "Error: %s is a directory\n", install_path.c_str()); + return -1; + } + if (remove(install_path.c_str()) != 0) { + fprintf(stderr, "Error removing existing file %s\n", install_path.c_str()); + return -1; + } + } + + if (is_devnull(install_path.c_str())) { + if (remove(install_path.c_str()) != 0) { + fprintf(stderr, "Unable to remove existing symlink %s\n", install_path.c_str()); + return -1; + } + } + + if (symlink(original_path.c_str(), install_path.c_str()) != 0) { + if (errno == EEXIST) + return 0; + fprintf(stderr, "Error creating symlink %s -> %s (%s)\n", install_path.c_str(), original_path.c_str(), strerror(errno)); + return -1; + } + + return 0; +} + + +static int render_network_service_for_smart_switch() { + if (!smart_switch_npu) { + return 0; + } + + // Render Before instruction for midplane network with database service + if (num_dpus == 0) { + return 0; + } + + std::stringstream ss; + ss << "\nBefore="; + for (int i = 0; i < num_dpus; i++) { + ss << "database@dpu" << i << ".service"; + if (i != num_dpus - 1) { + ss << " "; + } + } + std::string buffer_instruction = ss.str(); + std::string unit_path = std::string(get_unit_file_prefix()) + "/midplane-network-npu.service"; + + FILE *fp = fopen(unit_path.c_str(), "r"); + if (fp == NULL) { + fprintf(stderr, "Failed to open %s\n", unit_path.c_str()); + return -1; + } + fseek(fp, 0, SEEK_END); + size_t file_size = ftell(fp); + fseek(fp, 0, SEEK_SET); + size_t len = file_size + buffer_instruction.length() + 1; + char *unit_content = (char*) malloc(len); + if (unit_content == NULL) { + fprintf(stderr, "Failed to allocate memory for %s\n", unit_path.c_str()); + fclose(fp); + exit(EXIT_FAILURE); + } + if (fread(unit_content, file_size, 1, fp) != 1) { + fprintf(stderr, "Failed to read %s\n", unit_path.c_str()); + free(unit_content); + fclose(fp); + exit(EXIT_FAILURE); + } + fclose(fp); + + // Find insert point for Before instruction + char *insert_point = strstr(unit_content, "[Unit]"); + insert_point += strlen("[Unit]"); + // Move the rest of the file to make room for the Before instruction + memmove(insert_point + buffer_instruction.length(), insert_point, file_size - (insert_point - unit_content)); + // Insert the Before instruction + memcpy(insert_point, buffer_instruction.c_str(), buffer_instruction.length()); + // Remove original Before instruction + insert_point += buffer_instruction.length(); + char *before_start = strstr(insert_point, "Before="); + while (before_start != NULL) { + char *before_end = strchr(before_start, '\n'); + if (before_end == NULL) { + before_end = before_start + strlen(before_start); + } else { + // Include newline character + before_end += 1; + } + const char *target_service = strstr(before_start, "database@dpu"); + if (target_service != NULL && target_service < before_end) { + memmove(before_start, before_end, strlen(before_end) + 1); + } else { + before_start = before_end; + } + before_start = strstr(before_start, "Before="); + } + // Write the modified unit file + fp = fopen(unit_path.c_str(), "w"); + if (fp == NULL) { + fprintf(stderr, "Failed to open %s\n", unit_path.c_str()); + free(unit_content); + exit(EXIT_FAILURE); + } + if (fwrite(unit_content, strlen(unit_content), 1, fp) != 1) { + fprintf(stderr, "Failed to write %s\n", unit_path.c_str()); + free(unit_content); + fclose(fp); + exit(EXIT_FAILURE); + } + fclose(fp); + free(unit_content); + + return 0; +} + + +static int install_network_service_for_smart_switch() { + const char** network_units = NULL; + if (smart_switch_npu) { + static const char* npu_network_units[] = { + "bridge-midplane.netdev", + "bridge-midplane.network", + "dummy-midplane.netdev", + "dummy-midplane.network", + "midplane-network-npu.network", + NULL + }; + network_units = npu_network_units; + } else if (smart_switch_dpu) { + static const char* dpu_network_units[] = { + "midplane-network-dpu.network", + NULL + }; + network_units = dpu_network_units; + } else { + return -1; + } + + if (network_units == NULL) { + return 0; + } + + while(*network_units) { + if (install_network_unit(*network_units) != 0) { + return -1; + } + network_units++; + } + + return 0; +} + + +int ssg_main(int argc, char **argv) { + char* unit_files[MAX_NUM_UNITS]; + std::string install_dir; + char* targets[MAX_NUM_TARGETS]; + std::string unit_instance; + std::string prefix; + std::string suffix; + int num_unit_files; + int num_targets; + +#ifdef _SSG_UNITTEST + clean_up_cache(); +#endif + + if (argc <= 1) { + fputs("Installation directory required as argument\n", stderr); + return 1; + } + + num_asics = get_num_of_asic(); + smart_switch_npu = is_smart_switch_npu(); + smart_switch_dpu = is_smart_switch_dpu(); + smart_switch = smart_switch_npu || smart_switch_dpu; + num_dpus = get_num_of_dpu(); + + install_dir = std::string(argv[1]) + "/"; + num_unit_files = get_unit_files(unit_files); + + // Install and render midplane network service for smart switch + if (smart_switch) { + if (render_network_service_for_smart_switch() != 0) { + return -1; + } + if (install_network_service_for_smart_switch() != 0) { + return -1; + } + } + + // For each unit file, get the installation targets and install the unit + for (int i = 0; i < num_unit_files; i++) { + unit_instance = unit_files[i]; + if ((num_asics == 1 && + !is_multi_instance_service_for_dpu(unit_instance)) && + unit_instance.find("@") != std::string::npos) { + prefix = unit_instance.substr(0, unit_instance.find("@")); + suffix = unit_instance.substr(unit_instance.find("@") + 1); + + unit_instance = prefix + suffix; + } + + num_targets = get_install_targets(unit_instance, targets); + if (num_targets < 0) { + fprintf(stderr, "Error parsing %s\n", unit_instance.c_str()); + free(unit_files[i]); + continue; + } + + for (int j = 0; j < num_targets; j++) { + if (install_unit_file(unit_instance, targets[j], install_dir) != 0) + fprintf(stderr, "Error installing %s to target directory %s\n", unit_instance.c_str(), targets[j]); + + free(targets[j]); + } + + free(unit_files[i]); + } + + for (int i = 0; i < num_multi_inst; i++) { + free(multi_instance_services[i]); + } + free(multi_instance_services); + + if (is_valid_pointer(platform_info)) { + json_object_put(platform_info); + } + + return 0; +} + + +#ifndef _SSG_UNITTEST +int main(int argc, char **argv) { + return ssg_main(argc, argv); +} +#endif diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.h b/src/systemd-sonic-generator/systemd-sonic-generator.h index 25c179caa0bf..91e2d476c1ac 100644 --- a/src/systemd-sonic-generator/systemd-sonic-generator.h +++ b/src/systemd-sonic-generator/systemd-sonic-generator.h @@ -6,30 +6,36 @@ * Copyright (c) 2021 by Cisco Systems, Inc. *------------------------------------------------------------------ */ -#ifdef __cplusplus -extern "C" { -#endif +// #ifdef __cplusplus +// extern "C" { +// #endif +#include +#include /* expose global vars for testing purpose */ extern const char* UNIT_FILE_PREFIX; extern const char* CONFIG_FILE; extern const char* MACHINE_CONF_FILE; extern const char* ASIC_CONF_FORMAT; -extern const char* g_unit_file_prefix; +extern const char* PLATFORM_FILE_FORMAT; +extern const char* g_lib_systemd; +extern const char* g_etc_systemd; +extern const char* g_unit_file_prefix; extern const char* g_config_file; extern const char* g_machine_config_file; extern const char* g_asic_conf_format; +extern const char* g_platform_file_format; /* C-functions under test */ extern const char* get_unit_file_prefix(); extern const char* get_config_file(); extern const char* get_machine_config_file(); extern const char* get_asic_conf_format(); -extern char* insert_instance_number(char* unit_file, int instance); +extern std::string insert_instance_number(const std::string& unit_file, int instance, const std::string& instance_prefix); extern int ssg_main(int argc, char** argv); extern int get_num_of_asic(); -extern int get_install_targets(char* unit_file, char* targets[]); +extern int get_install_targets(std::string unit_file, char* targets[]); extern int get_unit_files(char* unit_files[]); -#ifdef __cplusplus -} -#endif +// #ifdef __cplusplus +// } +// #endif diff --git a/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.netdev b/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.netdev new file mode 120000 index 000000000000..a866bb529edc --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.netdev @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/bridge-midplane.netdev \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.network b/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.network new file mode 120000 index 000000000000..cb7ad4965151 --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/bridge-midplane.network @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/bridge-midplane.network \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/database.service b/src/systemd-sonic-generator/tests/testfiles/database.service new file mode 100644 index 000000000000..c730d07c950f --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/database.service @@ -0,0 +1,14 @@ +[Unit] +Description=Database container +StartLimitIntervalSec=1200 +StartLimitBurst=3 + +[Service] +User=root +ExecStartPre=/usr/local/bin/database.sh start +ExecStart=/usr/local/bin/database.sh wait +ExecStop=/usr/local/bin/database.sh stop +RestartSec=30 + +[Install] +WantedBy=multi-user.target diff --git a/src/systemd-sonic-generator/tests/testfiles/database@.service b/src/systemd-sonic-generator/tests/testfiles/database@.service new file mode 100644 index 000000000000..8a1719e05632 --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/database@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Database container +StartLimitIntervalSec=1200 +StartLimitBurst=3 + +[Service] +User=root +ExecStartPre=/usr/local/bin/database.sh start %i +ExecStart=/usr/local/bin/database.sh wait %i +ExecStop=/usr/local/bin/database.sh stop %i +RestartSec=30 + +[Install] +WantedBy=multi-user.target diff --git a/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.netdev b/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.netdev new file mode 120000 index 000000000000..2d4fec18f2a2 --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.netdev @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/dummy-midplane.netdev \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.network b/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.network new file mode 120000 index 000000000000..e8278cf8eff8 --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/dummy-midplane.network @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/dummy-midplane.network \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.network b/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.network new file mode 120000 index 000000000000..e042f502c78f --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.network @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/midplane-network-dpu.network \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.service b/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.service new file mode 120000 index 000000000000..e11f6138fbca --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/midplane-network-dpu.service @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/midplane-network-dpu.service \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.network b/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.network new file mode 120000 index 000000000000..66921589156e --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.network @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/midplane-network-npu.network \ No newline at end of file diff --git a/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.service b/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.service new file mode 120000 index 000000000000..0a8b423a4688 --- /dev/null +++ b/src/systemd-sonic-generator/tests/testfiles/midplane-network-npu.service @@ -0,0 +1 @@ +../../../../files/image_config/midplane-network/midplane-network-npu.service \ No newline at end of file diff --git a/src/tacacs/audisp/patches/0003-Add-local-accounting.patch b/src/tacacs/audisp/patches/0003-Add-local-accounting.patch index 1883f55914fa..00f7b1349505 100644 --- a/src/tacacs/audisp/patches/0003-Add-local-accounting.patch +++ b/src/tacacs/audisp/patches/0003-Add-local-accounting.patch @@ -70,12 +70,12 @@ index 0000000..e23acec +#include "trace.h" + +/* Accounting log format. */ -+#define ACCOUNTING_LOG_FORMAT "Accounting: user: %s, tty: %s, host: %s, command: %s, type: %d, task ID: %d" ++#define ACCOUNTING_LOG_FORMAT "Audisp-tacplus: Accounting: user: %s, tty: %s, host: %s, command: %s, type: %d, task ID: %d" + +/* Write the accounting information to syslog. */ +void accounting_to_syslog(char *user, char *tty, char *host, char *cmdmsg, int type, uint16_t task_id) +{ -+ trace(ACCOUNTING_LOG_FORMAT, user, tty, host, cmdmsg, type, task_id); ++ syslog(LOG_INFO, ACCOUNTING_LOG_FORMAT, user, tty, host, cmdmsg, type, task_id); +} \ No newline at end of file diff --git a/local_accounting.h b/local_accounting.h diff --git a/src/wpasupplicant/sonic-wpa-supplicant b/src/wpasupplicant/sonic-wpa-supplicant index 13e6f11007d3..3c7fd8e10d0e 160000 --- a/src/wpasupplicant/sonic-wpa-supplicant +++ b/src/wpasupplicant/sonic-wpa-supplicant @@ -1 +1 @@ -Subproject commit 13e6f11007d3e6d33a514a702fea5d40daaad055 +Subproject commit 3c7fd8e10d0e675c3cc1376206a2276e4d8e16da