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

[vs]: BMv2-based DPU KVM image #18762

Merged
merged 6 commits into from
May 17, 2024
Merged

[vs]: BMv2-based DPU KVM image #18762

merged 6 commits into from
May 17, 2024

Conversation

Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented Apr 23, 2024

Why I did it

  1. Provide POC for development and cooperation.
  2. Test for CI (Azp)
Work item tracking
  • Microsoft ADO (number only): 27515178

How I did it

HLD: sonic-net/SONiC#1634

How to verify it

Merge PR: sonic-net/sonic-sairedis#1377

  1. Download the vsdpu image from Azp
  2. check the syncd links to the correct DASH SAI
admin@vlab-01:~$ docker exec -ti syncd bash
root@vlab-01:/# dpkg -l | grep sai
ii  libsai                                 1.0.0                          amd64        This package contains DASH libsai
root@vlab-01:/# dpkg -L libsai
/.
/etc
/etc/dash
/etc/dash/dash_pipeline.json
/etc/dash/dash_pipeline_ir.json
/etc/dash/dash_pipeline_p4rt.json
/etc/dash/dash_pipeline_p4rt.txt
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libsai.so
root@vlab-01:/# which syncd_dash
/usr/bin/syncd_dash
root@vlab-01:/# ldd /usr/bin/syncd_dash | grep sai
        libsaimetadata.so.0 => /usr/lib/x86_64-linux-gnu/libsaimetadata.so.0 (0x00007f949e99b000)
        libsaimeta.so.0 => /usr/lib/x86_64-linux-gnu/libsaimeta.so.0 (0x00007f949e8ca000)
        libsai.so => /usr/lib/x86_64-linux-gnu/libsai.so (0x00007f949e417000)
root@vlab-01:/# md5sum /usr/lib/x86_64-linux-gnu/libsai.so
9e86fa2f49a824837064d1b8f95b7e48  /usr/lib/x86_64-linux-gnu/libsai.so
root@vlab-01:/# ls /etc/dash
dash_pipeline.json  dash_pipeline_ir.json  dash_pipeline_p4rt.json  dash_pipeline_p4rt.txt
  1. Check the dash engine logs(BMv2) likes following
admin@vlab-01:~$ docker logs dash_engine
Calling target program-options parser
Adding interface eth1 as port 0
[11:20:12.458] [bmv2] [D] [thread 7] Adding interface eth1 as port 0
[11:20:12.500] [bmv2] [E] [thread 7] Add port operation failed
Adding interface eth2 as port 1
[11:20:12.500] [bmv2] [D] [thread 7] Adding interface eth2 as port 1
[11:20:12.556] [bmv2] [E] [thread 7] Add port operation failed
Server listening on 0.0.0.0:9559
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_dash_pipeline241': dash_pipeline241 -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'dash_ingress.vip': dash_ingress.deny -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_dash_pipeline247': dash_pipeline247 -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'dash_ingress.direction_lookup_stage.direction_lookup': dash_ingress.direction_lookup_stage.set_inbound_direction -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'dash_ingress.appliance': NoAction -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_eni_lookup33': eni_lookup33 -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_eni_lookup33_0': eni_lookup33_0 -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_eni_lookup33_1': eni_lookup33_1 -
[11:22:09.706] [bmv2] [D] [thread 23] Set default default entry for table 
...
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_metering_update92': metering_update92 -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_metering_update94': metering_update94 -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_metering_update97': metering_update97 -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'dash_ingress.metering_update_stage.meter_bucket': NoAction -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_metering_update103': metering_update103 -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_metering_update105': metering_update105 -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'dash_ingress.metering_update_stage.eni_meter': NoAction -
[11:23:32.035] [bmv2] [D] [thread 23] Set default default entry for table 'tbl_drop_action': dash_ingress.drop_action -
[11:23:32.049] [bmv2] [D] [thread 23] simple_switch target has been notified of a config swap

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

🐯

@Pterosaur Pterosaur changed the title init dash lib [vs]: BMv2-based DPU KVM image Apr 23, 2024
Signed-off-by: Ze Gan <ganze718@gmail.com>
@r12f r12f self-requested a review April 24, 2024 00:10
Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

/azp run Azure.sonic-buildimage

Copy link

Commenter does not have sufficient privileges for PR 18762 in repo sonic-net/sonic-buildimage

@Pterosaur
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur force-pushed the bmv2_kvm2 branch 2 times, most recently from 5356946 to 8f60e8b Compare April 28, 2024 15:04
Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur marked this pull request as ready for review April 28, 2024 23:08
@Pterosaur Pterosaur mentioned this pull request Apr 28, 2024
11 tasks
@@ -426,6 +426,37 @@ RUN apt-get update && apt-get install -y eatmydata && eatmydata apt-get install
default-jdk \
libgoogle-gson-java

{%- if CONFIGURED_PLATFORM == "vs" %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we just install them by default in the slave container?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, there are some packages install failure on marvell platform

Copy link
Collaborator

Choose a reason for hiding this comment

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

that's fine, then why not say != marvel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMHO, I didn't test all platforms, so == vs is safer than != marvel.
But I fix it by following your suggestion in the latest commit.

Makefile.work Outdated
@@ -582,6 +583,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
SONIC_ENABLE_BOOTCHART=$(ENABLE_BOOTCHART) \
INCLUDE_FIPS=$(INCLUDE_FIPS) \
ENABLE_FIPS=$(ENABLE_FIPS) \
ENABLE_DASH_SAI=$(ENABLE_DASH_SAI) \
Copy link
Collaborator

Choose a reason for hiding this comment

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

this introduce this kvm image as build option?

but can we include the docker-dash-engine in kvm vs image by default, then we can enable and disable it at runtime?

This comment was marked as outdated.

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur
Copy link
Contributor Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur requested a review from lguohan May 12, 2024 01:30
@@ -445,6 +445,34 @@ RUN apt-get update && apt-get install -y \
hwdata \
libzip-dev

{%- if CONFIGURED_PLATFORM == "vs" %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we really need this?

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

/azpw run ms_conflict

@mssonicbld
Copy link
Collaborator

/AzurePipelines run ms_conflict

Copy link

No pipelines are associated with this pull request.

@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

@Pterosaur Pterosaur requested a review from lguohan May 14, 2024 02:36
@@ -426,6 +426,37 @@ RUN apt-get update && apt-get install -y eatmydata && eatmydata apt-get install
default-jdk \
libgoogle-gson-java

{%- if CONFIGURED_PLATFORM != "marvell" %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it better to use this one?

{%- if CONFIGURED_ARCH == "armhf" and CROSS_BUILD_ENVIRON != "y" %}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand your suggestion. Will CONFIGURED_ARCH == "armhf" match vs platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, @lguohan Please check it again

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

4 similar comments
@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

@Pterosaur
Copy link
Contributor Author

/azpw ms_conflict

@Pterosaur Pterosaur requested a review from lguohan May 17, 2024 11:26
@lguohan lguohan merged commit 3a84ba8 into sonic-net:master May 17, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants