Building PINS SONiC to deploy as a soft switch with p4Runtime enabled

401 views
Skip to first unread message

Serdar Vural

unread,
Mar 7, 2022, 10:08:05 AM3/7/22
to SONiC-PINS-subgroup
Hello,

I'm following the guidelines on the following page to build SONiC with PINS, aiming to deploy ithe build output as a soft switch with p4 enabled:

Here, "p4" is listed as a platform.

I'm following the above page along with the SONiC build documentation here:

When building, at the last two stages, I do:

make configure PLATFORM=p4
make build target/sonic-p4.bin

However, this does not produce the output files for SONiC containers in the "target" directory.

Alternatively, I also tried the following:

make configure PLATFORM=vs
make build target/sonic-vs.bin

Unfortunately, this does not produce a separate P4 container. However, the high level design of the PINS SONiC on this page shows that there should be a separate p4rt container:

Please note that in both cases I modified the rules/config file, and made the following changes, one of which is to include p4 runtime:

SONIC_CONFIG_BUILD_JOBS = 4
INCLUDE_P4RT = y
TELEMETRY_WRITABLE = y
SONIC_CONFIG_ENABLE_COLORS = y
ENABLE_ZTP = y
SHUTDOWN_BGP_ON_START = n
ENABLE_HOST_SERVICE_ON_START = y
SONIC_DPKG_CACHE_METHOD ?= rwcache

I'm building in Ubuntu 18.04, and made the following change in the Makefile:
NOJESSIE ?= 1
NOSTRETCH ?= 1
NOBUSTER ?= 0
NOBULLSEYE ?= 1

Here, NOBUSTER ?=0 allows for building for Buster (hence for 18.04).
(Note that enabling this for Bullseye also returned errors, and the PINS page notes that "Debian Buster is the currently supported version".)

I used these settings for both PLATFORM=vs and PLATFORM=p4 cases.
I can see container files only for the PLATFORM=vs case.
Here are the set of output in the "target" directory in the "vs" case:

docker-base-buster.gz
docker-config-engine-buster.gz
docker-fpm-frr.gz
docker-gbsyncd-vs.gz
docker-lldp.gz
docker-macsec.gz
docker-mux.gz
docker-nat.gz
docker-orchagent.gz
docker-platform-monitor.gz
docker-router-advertiser.gz
docker-sflow.gz
docker-snmp.gz
docker-sonic-mgmt-framework.gz
docker-swss-layer-buster.gz
docker-syncd-vs.gz
docker-teamd.gz

Can you help me identify any missing steps please? Did I follow the instructions as necessary? 

Thanks in advance,
Serdar









Runming Wu

unread,
Mar 7, 2022, 11:57:12 AM3/7/22
to Serdar Vural, SONiC-PINS-subgroup
Hi:

Try to answer with what I know.
Currently we did not integrate P4RT container into the virtual switch. So neither PLATFORM=p4 nor PLATFORM=vs will produce the P4RT container.
You should be able to see the P4RT container if you build a hardware platform.

For a side note, PLATFORM=p4 is not related to PINS P4RT. It was in SONiC before the SONiC PINS development.
Anyone please correct me if I have wrong understanding.
Thanks.

Runming Wu

--
You received this message because you are subscribed to the Google Groups "SONiC-PINS-subgroup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonic-pins-subg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonic-pins-subgroup/69d0e172-adc7-40a1-abb6-439e3e5a742fn%40googlegroups.com.

Serdar Vural

unread,
Mar 8, 2022, 8:33:34 AM3/8/22
to Runming Wu, SONiC-PINS-subgroup
Thanks Runming, I understand now. Then I believe we can't go through (hands-on) the PINS tutorial unless we have a hardware switch today. 
If anyone else would like to add on that, it would be great. I'll go through the tutorial without actually doing the exercises then. 
Is there any plan to add the P4RT container into the virtual switch (VS) platform in the PINS roadmap? I think it would be great to have it in VS, so that we could quickly test on a computer without the need for a hardware based testbed :) 
Thanks again for your reply, Runming.

Cheers,
Serdar

Bhagat Janarthanan

unread,
Mar 10, 2022, 5:43:17 PM3/10/22
to Serdar Vural, Runming Wu, SONiC-PINS-subgroup, pins-upstream-internal, Waqar Mohsin, Brian O'Connor
Hi Serdar,

  Thank you for raising this request. Supporting the P4RT container came up in another discussion as well. I completely agree that this would be a great idea. We will investigate this and look at the changes needed to support this.   

Regards,
Bhagat  


Stephen Wang

unread,
Mar 18, 2022, 2:32:16 AM3/18/22
to Bhagat Janarthanan, Yilan Ji, Serdar Vural, Runming Wu, SONiC-PINS-subgroup, pins-upstream-internal, Waqar Mohsin, Brian O'Connor, Ming Tan
+@Yilan Ji who actually was trying to enable the P4RT container on sonic-vs a while back. 

Yilan, can you help posting an PR to sonic-buildimage 


You received this message because you are subscribed to the Google Groups "pins-upstream-internal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pins-upstream-int...@google.com.
To view this discussion on the web visit https://groups.google.com/a/google.com/d/msgid/pins-upstream-internal/CACU_V3FDun6shuZfJ9Hx8Dbyzi%3DGdJn8WQQ3DRnbmYbTv425YQ%40mail.gmail.com.


--
Thanks,
Stephen

Serdar Vural

unread,
Mar 19, 2022, 1:27:12 PM3/19/22
to Yilan Ji, Bhagat Janarthanan, Brian O'Connor, Ming Tan, Runming Wu, SONiC-PINS-subgroup, Stephen Wang, Waqar Mohsin, pins-upstream-internal
Hi Yilan,

This is great; thank you.

Regards,
Serdar


On Fri, 18 Mar 2022 at 16:51, Yilan Ji <yil...@google.com> wrote:
Hi Stephen,

The task to add the P4RT container in docker-sonic-vs is in progress. Will post updates if it is ready.

Regards,
Yilan

Yilan Ji

unread,
Mar 29, 2022, 10:05:26 PM3/29/22
to Stephen Wang, Bhagat Janarthanan, Serdar Vural, Runming Wu, SONiC-PINS-subgroup, pins-upstream-internal, Waqar Mohsin, Brian O'Connor, Ming Tan
Hi Stephen,

The task to add the P4RT container in docker-sonic-vs is in progress. Will post updates if it is ready.

Regards,
Yilan


On Thu, Mar 17, 2022 at 11:32 PM Stephen Wang <ting...@google.com> wrote:

Simon Knight

unread,
Jun 14, 2022, 11:23:36 PM6/14/22
to SONiC-PINS-subgroup
Hello,
We are also interested in trying out the tutorial, ideally without needing access to a hardware switch.
From the recent update at the P4 summit it looks like the DPDK approach is the way forward.

Being able to spin up a virtual topology of multiple PINS enabled Sonic switches would be ideal for prototyping.

Is there a thread that tracks the progress of this that we can watch?
Thanks

Bhagat Janarthanan

unread,
Jun 14, 2022, 11:37:52 PM6/14/22
to Simon Knight, SONiC-PINS-subgroup

Hi Simon, 
Thank you for your interest. Yes, DPDK provides us with an elegant solution for taking simulation forward.

Reshma,
  Can you help answer this ?

Regards,
Bhagat

Davide Scano

unread,
Jun 15, 2022, 1:07:12 AM6/15/22
to SONiC-PINS-subgroup
Hi Simon,

Here you can find the reoamap of SONiC features https://github.com/sonic-net/SONiC/wiki/Sonic-Roadmap-Planning and there https://groups.google.com/g/sonicproject periodically presents updates related to new feuters etc.
From my point of view SONiC does not support DPDK now, but is an enanched feature.
Best
Davide

Reply all
Reply to author
Forward
0 new messages