-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 saiserver docker for mlnx sn2700 platform #12
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM docker-base | ||
|
||
RUN apt-get update | ||
|
||
COPY ["deps/applibs_*.deb", "/deps/applibs-dev_*.deb", "/deps/sx-complib_*.deb", "/deps/sxd-libs_*.deb", "/deps/sx-scew_*.deb", "/deps/sx-examples_*.deb", "/deps/sx-gen-utils_*.deb", "/deps/python-sdk-api_*.deb", "/deps/sx-libnl_*.deb", "/deps/iproute2_*.deb", "/deps/mlnx-sai_*.deb", "/deps/libthrift-0.9.2_*.deb", "/deps/"] | ||
|
||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ | ||
dpkg_apt /deps/applibs_*.deb \ | ||
&& dpkg_apt /deps/applibs-dev_*.deb \ | ||
&& dpkg_apt /deps/sx-complib_*.deb \ | ||
&& dpkg_apt /deps/sxd-libs_*.deb \ | ||
&& dpkg_apt /deps/sx-scew_*.deb \ | ||
&& dpkg_apt /deps/sx-examples_*.deb \ | ||
&& dpkg_apt /deps/sx-gen-utils_*.deb \ | ||
&& dpkg_apt /deps/python-sdk-api_*.deb \ | ||
&& dpkg_apt /deps/sx-libnl_*.deb \ | ||
&& dpkg_apt /deps/iproute2_*.deb \ | ||
&& dpkg_apt /deps/mlnx-sai_*.deb \ | ||
&& dpkg_apt /deps/libthrift-0.9.2_*.deb | ||
|
||
COPY ["deps/saiserver", "start.sh", "/usr/bin/"] | ||
|
||
COPY ["profile.ini", "portmap.ini", "/etc/sai/"] | ||
|
||
COPY ["sai_2700.xml", "/usr/share/"] | ||
|
||
## 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"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# alias lanes | ||
Ethernet1 0,1,2,3 | ||
Ethernet2 4,5,6,7 | ||
Ethernet3 8,9,10,11 | ||
Ethernet4 12,13,14,15 | ||
Ethernet5 16,17,18,19 | ||
Ethernet6 20,21,22,23 | ||
Ethernet7 24,25,26,27 | ||
Ethernet8 28,29,30,31 | ||
Ethernet9 32,33,34,35 | ||
Ethernet10 36,37,38,39 | ||
Ethernet11 40,41,42,43 | ||
Ethernet12 44,45,46,47 | ||
Ethernet13 48,49,50,51 | ||
Ethernet14 52,53,54,55 | ||
Ethernet15 56,57,58,59 | ||
Ethernet16 60,61,62,63 | ||
Ethernet17 64,65,66,67 | ||
Ethernet18 68,69,70,71 | ||
Ethernet19 72,73,74,75 | ||
Ethernet20 76,77,78,79 | ||
Ethernet21 80,81,82,83 | ||
Ethernet22 84,85,86,87 | ||
Ethernet23 88,89,90,91 | ||
Ethernet24 92,93,94,95 | ||
Ethernet25 96,97,98,99 | ||
Ethernet26 100,101,102,103 | ||
Ethernet27 104,105,106,107 | ||
Ethernet28 108,109,110,111 | ||
Ethernet29 112,113,114,115 | ||
Ethernet30 116,117,118,119 | ||
Ethernet31 120,121,122,123 | ||
Ethernet32 124,125,126,127 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SAI_INIT_CONFIG_FILE=/usr/share/sai_2700.xml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add new line at the end? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
<?xml version="1.0"?> | ||
<root> | ||
<platform_info type="2700"> | ||
|
||
<!-- Device MAC address --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace tab with spaces? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file is from mlnx, do not want to change it. |
||
<device-mac-address>00:77:66:55:44:00</device-mac-address> | ||
|
||
<!-- Number of ports in the following port list --> | ||
<number-of-physical-ports>32</number-of-physical-ports> | ||
|
||
<!-- List of ports in the device --> | ||
<ports-list> | ||
<port-info> | ||
<local-port>1</local-port> | ||
<width>4</width> | ||
<module>16</module> | ||
|
||
<!-- 0 none, 1=2, 2=4, 3=2,4 --> | ||
<breakout-modes>3</breakout-modes> | ||
|
||
<!-- (BITMASK) 4096 - 10Gb , 939524096 - 25Gb , 98368 - 40Gb , 3221225472 - 50Gb , 11534336 - 100Gb--> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>3</local-port> | ||
<width>4</width> | ||
<module>17</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>5</local-port> | ||
<width>4</width> | ||
<module>18</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>7</local-port> | ||
<width>4</width> | ||
<module>19</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>9</local-port> | ||
<width>4</width> | ||
<module>20</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>11</local-port> | ||
<width>4</width> | ||
<module>21</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>13</local-port> | ||
<width>4</width> | ||
<module>22</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>15</local-port> | ||
<width>4</width> | ||
<module>23</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>17</local-port> | ||
<width>4</width> | ||
<module>24</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>19</local-port> | ||
<width>4</width> | ||
<module>25</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>21</local-port> | ||
<width>4</width> | ||
<module>26</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>23</local-port> | ||
<width>4</width> | ||
<module>27</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>25</local-port> | ||
<width>4</width> | ||
<module>28</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>27</local-port> | ||
<width>4</width> | ||
<module>29</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>29</local-port> | ||
<width>4</width> | ||
<module>30</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>31</local-port> | ||
<width>4</width> | ||
<module>31</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>33</local-port> | ||
<width>4</width> | ||
<module>14</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>35</local-port> | ||
<width>4</width> | ||
<module>15</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>37</local-port> | ||
<width>4</width> | ||
<module>12</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>39</local-port> | ||
<width>4</width> | ||
<module>13</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>41</local-port> | ||
<width>4</width> | ||
<module>10</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>43</local-port> | ||
<width>4</width> | ||
<module>11</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>45</local-port> | ||
<width>4</width> | ||
<module>8</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>47</local-port> | ||
<width>4</width> | ||
<module>9</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>49</local-port> | ||
<width>4</width> | ||
<module>6</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>51</local-port> | ||
<width>4</width> | ||
<module>7</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>53</local-port> | ||
<width>4</width> | ||
<module>4</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>55</local-port> | ||
<width>4</width> | ||
<module>5</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>57</local-port> | ||
<width>4</width> | ||
<module>2</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>59</local-port> | ||
<width>4</width> | ||
<module>3</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>61</local-port> | ||
<width>4</width> | ||
<module>0</module> | ||
<breakout-modes>3</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
<port-info> | ||
<local-port>63</local-port> | ||
<width>4</width> | ||
<module>1</module> | ||
<breakout-modes>1</breakout-modes> | ||
<port-speed>98368</port-speed> | ||
</port-info> | ||
</ports-list> | ||
</platform_info> | ||
</root> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
function clean_up { | ||
service rsyslog stop | ||
} | ||
|
||
start_mlnx() | ||
{ | ||
[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 ) | ||
} | ||
|
||
trap clean_up SIGTERM SIGKILL | ||
|
||
service rsyslog start | ||
|
||
start_mlnx | ||
|
||
/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new line at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer not to have newline in the end.