Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add infra for 2 p4 stack support #32

Open
wants to merge 3 commits into
base: azure-buildimage
Choose a base branch
from

Conversation

NStetskovych-zz
Copy link

@NStetskovych-zz NStetskovych-zz commented Nov 21, 2018

Signed-off-by: Nadiya.Stetskovych [email protected]

- What I did
Add infrastructure to build SONiC image either with p4-14 or p4-16 stack
- How I did it
Add changes to build system and systemd service file that is responsible for stack config on the switch
- How to verify it
export CONFIGURED_P4_STACK=p4-14 variable before build sonic-barefoot.bin
and build SONiC image as usual

- A picture of a cute animal (not mandatory but encouraged)

 __         __
/  \.-"""-./  \
\    -   -    /
 |   o   o   |
 \  .-'''-.  /
  '-\__Y__/-'
     `---`

Signed-off-by: Nadiya.Stetskovych <[email protected]>
Copy link

@akokhan akokhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the review comments where applicable

platform/barefoot/bfn-platform.mk Outdated Show resolved Hide resolved
platform/barefoot/systemd/p4stack.service.j2 Outdated Show resolved Hide resolved
platform/barefoot/systemd/p4stack.service.j2 Outdated Show resolved Hide resolved
sonic-slave/Dockerfile Show resolved Hide resolved

"model_json_path" : "share/switch/aug_model.json",

"switchapi_port_add": false,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please align this and below lines

platform/barefoot/bfn-platform.mk Outdated Show resolved Hide resolved

ifeq ($(CONFIGURED_P4_STACK),p4_16)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we do not plan to merge to the upstream p4_16/p4_14 stack selection infrastructure at this moment, probably we can use the same approach but without mentioning p4_16, just to expose the approach itself. Also, we can use this methodology to either build from public DEB package or from the sources $(BFN_SAI)_PATH. Again, without mentioning p4_16.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it will have to be transparent. For same switch.p4 profile, we dont need to maintain both p4-14 and p4-16 versions.

@@ -120,6 +120,8 @@ RUN apt-get update && apt-get install -y \
libcurl3-nss-dev \
libunwind8-dev \
telnet \
libc-ares2 \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we aren't making this the dependencies of our .deb package? (Install them with our .dev)

@@ -11,7 +11,7 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN apt-get install -y libxml2 libpcap-dev libusb-1.0-0-dev libcurl3 libcurl4-gnutls-dev libunwind8-dev libpython3.4
RUN apt-get install -y libxml2 libpcap-dev libusb-1.0-0-dev libcurl3 libcurl4-gnutls-dev libunwind8-dev libpython3.4 libc-ares2 libgoogle-perftools4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we aren't making it a dependency of our .deb package?

"switchsai": "lib/libswitchsai.so",
"agent0": "lib/platform/x86_64-accton_wedge100bf_32x-r0/libpltfm_mgr.so",
"bfrt-config" : "share/tofinopd/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comma EOL

"switchsai": "lib/libswitchsai.so",
"agent0": "lib/platform/x86_64-accton_wedge100bf_65x-r0/libpltfm_mgr.so",
"bfrt-config" : "share/tofinopd/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comma EOL

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants