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

Add cavm saiserver #114

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions dockers/docker-saiserver-cavm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

FROM docker-base

RUN apt-get update \
&& apt-get install -y libsensors4-dev \
python \
python-dev

COPY deps /root/deps

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
dpkg_apt /root/deps/xp-tools.deb \
&& dpkg_apt /root/deps/libsai.deb \
&& dpkg_apt /root/deps/sai.deb \
&& dpkg_apt /root/deps/libthrift-0.9.3_*.deb \
&& dpkg_apt /root/deps/libnl-3-200_*.deb \
&& dpkg_apt /root/deps/libnl-genl-3-200_*.deb \
&& dpkg_apt /root/deps/libnl-route-3-200_*.deb


COPY ["deps/saiserver", "start.sh", "/usr/bin/"]

COPY ["portmap.ini", "profile.ini", "/etc/sai/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf deps

ENTRYPOINT ["/bin/bash"]
CMD ["/usr/bin/start.sh"]
33 changes: 33 additions & 0 deletions dockers/docker-saiserver-cavm/portmap.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# alias lanes
Ethernet0 16,17,18,19
Ethernet4 20,21,22,23
Ethernet8 24,25,26,27
Ethernet12 28,29,30,31
Ethernet16 32,33,34,35
Ethernet20 36,37,38,39
Ethernet24 40,41,42,43
Ethernet28 44,45,46,47
Ethernet32 0,1,2,3
Ethernet36 4,5,6,7
Ethernet40 8,9,10,11
Ethernet44 12,13,14,15
Ethernet48 48,49,50,51
Ethernet52 52,53,54,55
Ethernet56 56,57,58,59
Ethernet60 60,61,62,63
Ethernet64 127,126,125,124
Ethernet68 123,122,121,120
Ethernet72 115,114,113,112
Ethernet76 119,118,117,116
Ethernet80 79,78,77,76
Ethernet84 75,74,73,72
Ethernet88 64,65,66,67
Ethernet92 71,70,68,69
Ethernet96 111,110,109,108
Ethernet100 107,106,105,104
Ethernet104 103,102,101,100
Ethernet108 99,98,97,96
Ethernet112 95,94,93,92
Ethernet116 91,90,89,88
Ethernet120 87,86,85,84
Ethernet124 83,82,81,80
4 changes: 4 additions & 0 deletions dockers/docker-saiserver-cavm/profile.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#SKU_128X10
mode=0

hwId=as7512
11 changes: 11 additions & 0 deletions dockers/docker-saiserver-cavm/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

function clean_up {
service rsyslog stop
}

trap clean_up SIGTERM SIGKILL

service rsyslog start

/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini
2 changes: 1 addition & 1 deletion platform/mellanox/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/sonic/sdk
MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/9ae5a29e344e23cd4ce92805f990f8ce8fab292a/sdk
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

the above is introduced in other commits, not this one.

MLNX_SDK_VERSION = 4.2.3002
MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2) $(SX_ACL_RM) $(SX_COMPLIB) \
$(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \
Expand Down