Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ragile]Add new platform ra-b6010 #13313

Draft
wants to merge 67 commits into
base: 202205
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f353582
update for 202205 branch
pettershao-ragilenetworks Jan 10, 2023
cb0509a
Update sai.mk
pettershao-ragilenetworks Jan 10, 2023
e18fe0b
Update sai.mk
pettershao-ragilenetworks Jan 10, 2023
1cc27ee
triggle rebuild
pettershao-ragilenetworks Jan 10, 2023
ef106eb
Update isc-dhcp.mk
pettershao-ragilenetworks Jan 11, 2023
2855dd6
triggle rebuild
pettershao-ragilenetworks Jan 11, 2023
f0268d6
Update sonic_fit.its
pettershao-ragilenetworks Jan 11, 2023
5a586ce
Update sonic_fit.its
pettershao-ragilenetworks Jan 11, 2023
5508d1b
Update one-image.mk
pettershao-ragilenetworks Jan 16, 2023
a78e751
Update azure-pipelines.yml
pettershao-ragilenetworks Jan 16, 2023
87b2e62
Update azure-pipelines-image-template.yml
pettershao-ragilenetworks Jan 16, 2023
d251e3b
Update azure-pipelines.yml
pettershao-ragilenetworks Jan 16, 2023
dbc4d3e
Update docker-sonic-slave-template.yml
pettershao-ragilenetworks Jan 16, 2023
1233169
speed up docker pull
pettershao-ragilenetworks Jan 17, 2023
4a570fe
speed up docker pull
pettershao-ragilenetworks Jan 17, 2023
c9eb0a8
update bsp code
pettershao-ragilenetworks Jan 17, 2023
eadc0c4
Update azure-pipelines.yml
pettershao-ragilenetworks Jan 17, 2023
bd3e37d
Update azure-pipelines-build.yml
pettershao-ragilenetworks Jan 17, 2023
c01dd29
update i2c-ctc.c
pettershao-ragilenetworks Jan 17, 2023
cfe6e91
update platform
pettershao-ragilenetworks Jan 17, 2023
de0af10
rclocal & mac & device optimize
pettershao-ragilenetworks Jan 17, 2023
95e6235
Update Makefile
pettershao-ragilenetworks Jan 17, 2023
86436e6
Update azure-pipelines-image-template.yml
pettershao-ragilenetworks Jan 17, 2023
6a2a59b
Update azure-pipelines-image-template.yml
pettershao-ragilenetworks Jan 17, 2023
a452ae9
update
pettershao-ragilenetworks Jan 17, 2023
901d642
Update azure-pipelines-image-template.yml
pettershao-ragilenetworks Jan 18, 2023
7173151
Changes: remove firmware upg, fix fanctrl and sysled, fix semgre
pettershao-ragilenetworks Jan 18, 2023
261a5cd
Changes: fix first get value into self
pettershao-ragilenetworks Jan 18, 2023
4263480
Changes: fix shell true,install requests
pettershao-ragilenetworks Jan 19, 2023
8dd24a8
Update redfish_api.py
pettershao-ragilenetworks Jan 20, 2023
0b19c61
Update redfish_api.py
pettershao-ragilenetworks Jan 20, 2023
3e701e7
Update redfish_api.py
pettershao-ragilenetworks Jan 20, 2023
c139450
Changes: fix redfish_api
pettershao-ragilenetworks Jan 20, 2023
9915a49
[Changes]: Update dfd_utest.h for memset check
pettershao-ragilenetworks Jan 20, 2023
add46e0
[Changes]: Update dfd_debug.c for memset check
pettershao-ragilenetworks Jan 20, 2023
95e0ceb
[Changes]: Update rest.py for Semgrep check
pettershao-ragilenetworks Jan 20, 2023
8336cb8
[Changes]: back ssl for 3e72ad8
pettershao-ragilenetworks Jan 20, 2023
adb6063
Changes: fix code check
pettershao-ragilenetworks Jan 27, 2023
4ae2225
Changes: delete extpyh
pettershao-ragilenetworks Jan 28, 2023
faf43e4
Changes: fixed xcvrd errors
pettershao-ragilenetworks Jan 28, 2023
aa2711b
Changes: fix b6010 led status into BuildIn
pettershao-ragilenetworks Jan 29, 2023
6b07438
Update azure-pipelines.yml
pettershao-ragilenetworks Jan 29, 2023
9a7233f
update device and platform code and fix timeout patch
pettershao-ragilenetworks Feb 27, 2023
00b3181
Merge branch '202205' into 202205-b6010
pettershao-ragilenetworks Feb 27, 2023
896f57f
Update azure-pipelines-build.yml
pettershao-ragilenetworks Feb 27, 2023
5833895
Update Dockerfile.j2
pettershao-ragilenetworks Feb 27, 2023
f7208c4
Update azure-pipelines.yml
pettershao-ragilenetworks Feb 27, 2023
b8c3f6f
rebase and add arch
pettershao-ragilenetworks Feb 27, 2023
cdacf13
fix kill exit case
pettershao-ragilenetworks Mar 1, 2023
df4f5d7
Update ctcmac.c
pettershao-ragilenetworks Mar 3, 2023
36db903
update for b6010 202205
pettershao-ragilenetworks Mar 17, 2023
060c27a
Merge branch '202205' into 202205-b6010
pettershao-ragilenetworks Mar 17, 2023
230c2d1
Update azure-pipelines-build.yml
pettershao-ragilenetworks Mar 17, 2023
6ad73ae
update for 6010
pettershao-ragilenetworks Mar 17, 2023
c587cc0
fix code check
pettershao-ragilenetworks Mar 19, 2023
7412242
fix bug
pettershao-ragilenetworks Mar 19, 2023
59cfc67
Update ctcmac.c
pettershao-ragilenetworks Mar 30, 2023
57ef6e2
Update minigraph.py
pettershao-ragilenetworks Mar 30, 2023
09c1d2a
Merge branch '202205' into 202205-b6010
pettershao-ragilenetworks Mar 30, 2023
7c07fb7
Update azure-pipelines.yml
pettershao-ragilenetworks Mar 30, 2023
0ad6296
Update ra-b6010-48gt4x-r0.dts
pettershao-ragilenetworks Mar 31, 2023
2ae95f9
sync PT6 code to po5 for codeql
pettershao-ragilenetworks Apr 1, 2023
5abac06
fix sfp monitor data bug
pettershao-ragilenetworks Apr 19, 2023
a896915
fix syntax error
pettershao-ragilenetworks Apr 20, 2023
d7ef4d9
Merge branch '202205' into 202205-b6010
pettershao-ragilenetworks Jun 28, 2023
298e73a
add platform json file
pettershao-ragilenetworks Jun 28, 2023
63657b8
Update azure-pipelines.yml
pettershao-ragilenetworks Jun 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
default: ''
- name: 'buildOptions'
type: string
default: 'SONIC_CONFIG_BUILD_JOBS=1'
default: 'SONIC_CONFIG_BUILD_JOBS=4'
- name: 'preSteps'
type: stepList
default: []
Expand Down Expand Up @@ -111,6 +111,8 @@ jobs:
- template: .azure-pipelines/template-skipvstest.yml@buildimage
- template: .azure-pipelines/template-daemon.yml@buildimage
- bash: |
patch -p1 < 0001-update-swss-main-cpp.patch
patch -p1 < 0002-update-swss-orch-h.patch
set -ex
if [ $(GROUP_NAME) == vs ]; then
if [ $(dbg_image) == yes ]; then
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
postSteps:
- script: |
mkdir -p $(Build.ArtifactStagingDirectory)/target
mv target/* $(Build.ArtifactStagingDirectory)/target/
mv target/*.bin $(Build.ArtifactStagingDirectory)/target/
displayName: Copy Artifacts
condition: always()
- publish: $(Build.ArtifactStagingDirectory)
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ src/**/*.o
platform/**/*.egg-info
platform/**/*-none-any.whl
platform/**/.pybuild
platform/**/debian/*
# platform/**/debian/*
platform/**/build
platform/**/*.ko
platform/**/*.mod.c
Expand Down
42 changes: 42 additions & 0 deletions 0001-update-swss-main-cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--- sonic-buildimage-one/src/sonic-swss/orchagent/main.cpp 2023-02-08 15:12:59.842183729 +0800
+++ sonic-buildimage-two/src/sonic-swss/orchagent/main.cpp 2023-02-08 15:15:05.767154906 +0800
@@ -569,7 +569,9 @@ int main(int argc, char **argv)
attr.value.u64 = gSwitchId;
attrs.push_back(attr);

- if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet")
+ /* centec create switch take longtime */
+ char *platform = getenv("platform");
+ if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet" || (platform && strstr(platform, CENTEC_PLATFORM_SUBSTRING)))
{
/* We set this long timeout in order for orchagent to wait enough time for
* response from syncd. It is needed since switch create takes more time
@@ -585,6 +587,10 @@ int main(int argc, char **argv)
{
attr.value.u64 = (10 * SAI_REDIS_DEFAULT_SYNC_OPERATION_RESPONSE_TIMEOUT);
}
+ else if (platform && strstr(platform, CENTEC_PLATFORM_SUBSTRING))
+ {
+ attr.value.u64 = (10 * SAI_REDIS_DEFAULT_SYNC_OPERATION_RESPONSE_TIMEOUT);
+ }

attr.id = SAI_REDIS_SWITCH_ATTR_SYNC_OPERATION_RESPONSE_TIMEOUT;
status = sai_switch_api->set_switch_attribute(gSwitchId, &attr);
@@ -607,11 +613,16 @@ int main(int argc, char **argv)
}
SWSS_LOG_NOTICE("Create a switch, id:%" PRIu64, gSwitchId);

- if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet")
+ if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet" || (platform && strstr(platform, CENTEC_PLATFORM_SUBSTRING)))
{
/* Set syncd response timeout back to the default value */
attr.id = SAI_REDIS_SWITCH_ATTR_SYNC_OPERATION_RESPONSE_TIMEOUT;
attr.value.u64 = SAI_REDIS_DEFAULT_SYNC_OPERATION_RESPONSE_TIMEOUT;
+ /* centec platform set 3X default timeout*/
+ if (platform && strstr(platform, CENTEC_PLATFORM_SUBSTRING))
+ {
+ attr.value.u64 = (3 * SAI_REDIS_DEFAULT_SYNC_OPERATION_RESPONSE_TIMEOUT);
+ }
status = sai_switch_api->set_switch_attribute(gSwitchId, &attr);

if (status != SAI_STATUS_SUCCESS)
10 changes: 10 additions & 0 deletions 0002-update-swss-orch-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- sonic-buildimage-one/src/sonic-swss/orchagent/orch.h 2023-02-08 15:12:59.842183729 +0800
+++ sonic-buildimage-two/src/sonic-swss/orchagent/orch.h 2023-02-08 15:15:05.759154842 +0800
@@ -40,6 +40,7 @@ const char state_db_key_delimiter = '|'
#define NPS_PLATFORM_SUBSTRING "nephos"
#define MRVL_PLATFORM_SUBSTRING "marvell"
#define CISCO_8000_PLATFORM_SUBSTRING "cisco-8000"
+#define CENTEC_PLATFORM_SUBSTRING "centec"

#define CONFIGDB_KEY_SEPARATOR "|"
#define DEFAULT_KEY_SEPARATOR ":"
11 changes: 9 additions & 2 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ DOCKER_BASE_BUILD = docker build --no-cache \
DOCKER_BASE_PULL = docker pull \
$(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)

DOCKER_BASE_PUSH = docker push \
$(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)

DOCKER_BUILD = docker build --no-cache \
--build-arg user=$(USER) \
--build-arg uid=$(shell id -u) \
Expand Down Expand Up @@ -435,7 +438,9 @@ endif
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; } } || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; \
docker tag $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) ; \
$(DOCKER_BASE_PUSH) ; }
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
Expand Down Expand Up @@ -470,7 +475,9 @@ endif
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; } } || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; \
docker tag $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) ; \
$(DOCKER_BASE_PUSH) ; }

sonic-slave-build : sonic-slave-base-build
@echo Checking sonic-slave image: $(SLAVE_IMAGE):$(SLAVE_TAG)
Expand Down
170 changes: 5 additions & 165 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
trigger:
branches:
include:
- master
- 202205
paths:
exclude:
Expand All @@ -15,9 +14,7 @@ trigger:
pr:
branches:
include:
- master
- 202205
- bullseye
paths:
exclude:
- .github
Expand Down Expand Up @@ -50,7 +47,7 @@ stages:
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) BUILD_MULTIASIC_KVM=y ${{ variables.VERSION_CONTROL_OPTIONS }}'
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) BUILD_MULTIASIC_KVM=y'
jobGroups:
- name: vs

Expand All @@ -60,167 +57,10 @@ stages:
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
buildOptions: 'USERNAME=admin ENABLE_DOCKER_BASE_PULL=y SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/centec-arm64 SONIC_BUILD_JOBS=$(nproc)'
jobGroups:
- name: broadcom
variables:
dbg_image: yes
swi_image: yes
docker_syncd_rpc_image: yes
platform_rpc: brcm
- name: mellanox
variables:
dbg_image: yes
docker_syncd_rpc_image: yes
platform_rpc: mlnx
- name: marvell-armhf
pool: sonicbld-armhf
- name: centec-arm64
pool: sonicbld-arm64
timeoutInMinutes: 1200
variables:
PLATFORM_ARCH: armhf

- stage: Test
dependsOn: BuildVS
condition: and(succeeded(), and(ne(stageDependencies.BuildVS.outputs['vs.SetVar.SKIP_VSTEST'], 'YES'), in(dependencies.BuildVS.result, 'Succeeded', 'SucceededWithIssues')))
variables:
- group: SONiC-Elastictest
- name: inventory
value: veos_vtb
- name: testbed_file
value: vtestbed.csv

jobs:
- job:
pool: sonictest
displayName: "vstest"
timeoutInMinutes: 60
steps:
- checkout: self
clean: true
submodules: recursive
displayName: 'Checkout code'

- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifact: sonic-swss-common.amd64.ubuntu20_04
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
displayName: "Download sonic swss common deb packages"

- task: DownloadPipelineArtifact@2
inputs:
artifact: sonic-buildimage.vs
displayName: "Download sonic-buildimage.vs artifact"

- script: |
set -x
sudo apt-get update
sudo apt-get install libyang0.16 -y
sudo dpkg -i --force-confask,confnew ../libswsscommon_1.0.0_amd64.deb
sudo dpkg -i ../python3-swsscommon_1.0.0_amd64.deb
sudo docker load -i ../target/docker-sonic-vs.gz
docker tag docker-sonic-vs:latest docker-sonic-vs:$(Build.BuildNumber)
username=$(id -un)

trap "docker ps; docker images; ip netns list; \
docker rmi docker-sonic-vs:$(Build.BuildNumber); \
ip netns list | grep -E [-]srv[0-9]+ | awk '{print $1}' | xargs -I {} sudo ip netns delete {}; \
sudo chown -R ${username}.${username} .; \
sudo chown -R ${username}.${username} $(System.DefaultWorkingDirectory)" EXIT
pushd platform/vs/tests
sudo py.test -v --junitxml=tr.xml --imgname=docker-sonic-vs:$(Build.BuildNumber)
displayName: "Run vs tests"

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/tr.xml'
testRunTitle: vstest

- job: t0_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0 by Elastictest"
timeoutInMinutes: 240
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0
MIN_WORKER: $(T0_INSTANCE_NUM)
MAX_WORKER: $(T0_INSTANCE_NUM)
MGMT_BRANCH: 202205

- job: t0_2vlans_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0-2vlans by Elastictest"
timeoutInMinutes: 240
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0
TEST_SET: t0-2vlans
MIN_WORKER: $(T0_2VLANS_INSTANCE_NUM)
MAX_WORKER: $(T0_2VLANS_INSTANCE_NUM)
DEPLOY_MG_EXTRA_PARAMS: "-e vlan_config=two_vlan_a"
MGMT_BRANCH: 202205

- job: t1_lag_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t1-lag by Elastictest"
timeoutInMinutes: 240
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t1-lag
MIN_WORKER: $(T1_LAG_INSTANCE_NUM)
MAX_WORKER: $(T1_LAG_INSTANCE_NUM)
MGMT_BRANCH: 202205

- job: sonic_t0_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-t0-sonic by Elastictest"
timeoutInMinutes: 240
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t0-64-32
MIN_WORKER: $(T0_SONIC_INSTANCE_NUM)
MAX_WORKER: $(T0_SONIC_INSTANCE_NUM)
TEST_SET: t0-sonic
COMMON_EXTRA_PARAMS: "--neighbor_type=sonic "
VM_TYPE: vsonic
MGMT_BRANCH: 202205

- job: dualtor_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-dualtor-t0 by Elastictest"
timeoutInMinutes: 240
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: dualtor
MIN_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
MAX_WORKER: $(T0_DUALTOR_INSTANCE_NUM)
COMMON_EXTRA_PARAMS: "--disable_loganalyzer "
MGMT_BRANCH: 202205

- job: multi_asic_elastictest
pool: ubuntu-20.04
displayName: "kvmtest-multi-asic-t1-lag by Elastictest"
timeoutInMinutes: 1080
continueOnError: false
steps:
- template: .azure-pipelines/run-test-scheduler-template.yml
parameters:
TOPOLOGY: t1-8-lag
TEST_SET: multi-asic-t1-lag
MIN_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
MAX_WORKER: $(MULTI_ASIC_INSTANCE_NUM)
NUM_ASIC: 4
MGMT_BRANCH: 202205
PLATFORM_ARCH: arm64
Loading