[barefoot]: Support for platforms based on Barefoot Networks' device (#1796)
* Initial commit * Add Ingrasys S9180-32X platform dirver. Signed-off-by: Wade He <chihen.he@gmail.com> * Add bfn.service for init barefoot. Signed-off-by: Wade He <chihen.he@gmail.com> * [Barefoot Beta] Add some functions and fixed some bugs. 1. Update sensors.conf. 2. Fixed IO expander init. 3. Fixed PSU EEPROM. 4. Fixed MB EEPROM. 5. Add fancontrol and fan init. 6. Add SYS LED control (sys, fan, fan tray). 7. 2.5V compute and setup max and min. 8. Fixed typo MB eeprom delete address. 9. Remove coretemp to BMC. 10. Add active CPLD. 11. Modify SFP+ GPIO slave address. 12. Modify tmp75 Near Port 32 slave address. Signed-off-by: Wade He <chihen.he@gmail.com> * Add bfn script in /etc/init.d/ Signed-off-by: Wade He <chihen.he@gmail.com> * Add bfn service in debian Signed-off-by: Wade He <chihen.he@gmail.com> * Fixed CPLD switch LED behavior. Signed-off-by: Wade He <chihen.he@gmail.com> * [Barefoot Beta] Fixed sensors and hwmon order. 1. Fixed ignore sensors Vbat. 2. Reorg hwmon order. Signed-off-by: Wade He <chihen.he@gmail.com> * Fixed PSU1 and PSU2 EEPROM order. Signed-off-by: Wade He <chihen.he@gmail.com> * initial barefoot checkin october 2017 * update refpoint * update refpoints * update refpoints to bf-master * update refpoint * update refpoint to tested version * change to platform from asic * update refpoint for swss * revert core creation setting * update refpoints * add telnet for debug shell * update refpoints 11/17/17 * missed change in file on previous merge * [CPLD] Fixed blink LED issue. * Fixed blink LED mask set error. Signed-off-by: Wade He <chihen.he@gmail.com> * Update bf_kdrv.c for 6.0.2.39 * Update bf kernel driver * Add bf_fun kernel module. * Update bf_tun for fixed build error * merge with Azure master (12/12/17) * update swss refpoint * update refpoint of swss * library dependency for stack unroll * update refpoint to bf-master * [DHCP relay]: Fix circuit ID and remote ID bugs (#1248) * [DHCP relay]: Fix circuit ID and remote ID bugs * Set circuit_id_len after setting circuit_id_len to ip->name * [Platform] Add Psuutil and update sensors.conf for S9100-32X, S8810-32Q and S9200-64X (#1272) * Add I2C CPLD kernel module for psuutil. * Support psuutil script. * Add voltage min and max threshold. * Update sensors.conf for tmp75. Signed-off-by: Wade He <chihen.he@gmail.com> * Allow multi platform support - infra (more changes to follow) * update relative path to include platform for clarity * [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC for "branch 201712" (#1274) - What I did Add switch ASIC vendor: Nephos Add Nephos platforms: Ingrasys S9130-32X, Ingrasys S9230-64X - How I did it Add platform/nephos files Add platform/nephos/sonic-platform-modules-ingrasys submodule Add device/ingrasys/x86_64-ingrasys_s9130_32x-r0 files Add device/ingrasys/x86_64-ingrasys_s9230_64x-r0 files Add SONiC to support Nephos platform Update Head of submodule src/sonic-sairedis to "3b817bb" - How to verify it To build SONiC installer image and docker images, run the following commands: make configure PLATFORM=nephos make target/sonic-nephos.bin Check system and network feature is worked as well - Description for the changelog Add switch ASIC vendor and platforms for Nephos - A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Sam Yang <yang.kaiyu@gmail.com> * change source of files to github (from dropbox), update sairedis refpoint * update refpoint of sairedis * [centec] support CENTEC SAI 1.0 on 201712 branch and update e582-48x6q board (#1269) * [marvel]: Marvell's updates for SONiC.201712 & SAI v1.0 (#1287) * update sairedis (fast-boot refpoint) * fix syncd rpc make files * update refpoint to handle Makefile change (no functional change) * [Marvell]: Add support for SLM5401-54x device (#1307) * Marvell's updates for SONiC.201712 & SAI v1.0 * [Platform] Add Marvell's SLM5401-54x for branch 201712 * [Broadcom]: Update Boradcom SAI package to 3.0.3.3-3 (#1312) (#1321) - update Arista 7050-QX32S config.bcm file - update Accton th-as771*-32x100G.config.bcm files * update refpoint for Makefile chnage in sairedis * update refpoint - sairedis * update sairedis to older refpoint till we debug clean build * export asic platform for build * update refpoint for makefiles * [PLATFORM] Centec update E582 driver fan/epprom/sensor (#1332) * Upload wnc-osw1800 * Modify for Barefoot suggest * Revert bfn-platform.mk * Update bfn-platform-wnc.mk Update parameter name * Update parameter name * initial support for WNC platform * change switch name to "switch" * Delete bf modules for rel_7_0 * Add Ingrasys S9180 platform Signed-off-by: Wade He <chihen.he@gmail.com> * Modify bfnsdk for Ingrasys S9180 platform Signed-off-by: Wade He <chihen.he@gmail.com> * Resolved the conflict. * Resolved the conflict. * Update submodule path and url. * Delete unused file. * Update PSU GPIO and EEPROM for psuutil. * Add psuutil in S9180-32X Signed-off-by: Wade He <chihen.he@gmail.com> * update refpoint * update refpoint * change contact email, update refpoint * cleanup and update kernel modules * updates based on review * update refpoint * update refpoint * fix typo in config script to check for platforms * remove stale file * resolve conflicts * cleanup diffs with Azure repo and update SDK debs * update refpoints to Azure * address review comments * revert refpoint of swss-common * porting the build fix from master * porting build fix from master * Minor Fix * Minor fix * Temp to sde deb packages url * Update sonic - sairedis,swss & swss-common refpoints * Update git modules url path to bfn repo * updated paths for swss, swss-common & sairedis * Update refpoint for sonic-swss to local bfn repo * Update URL for downloading sde debian packages * porting fix links of debian git server from master * porting fix links of debian git server from master * [Ingrasys] Add platform support for S9280-64X with Barefoot ASIC * Update ref points for swss, swss-common and sairedis repos * Add sonic platform scripts for bfn montara/maverick * Call sh scripts instead of calling py scripts * Address upstream PR Comments (#10) * Update bf-master with azure/master * Undo changes to some files * Revert "Address upstream PR Comments (#10)" This reverts commita7fddb83ca
. * Address upstream comments (#11) * Remove all non bfn specific changes from upstream PR * Revert "Address upstream comments (#11)" This reverts commit559132103e
. * Undo non bfn changes * Little more cleanup * Add back code removed in merge * export CONFIGURED_PLATFORM * Update sairedis and swss refpoints * Address Upstream PR comment * change deb pkg dependency from 3.16.0-4-amd64 to 3.16.0-5-amd64 * Set default tx queue len for usb0 interface to 64 * Update sairedis refpoint * Update swss ref point * Add bfn buffer cfg files for montara/maverick as per new design * Update buffer cfg templates for bfn montara * add non zero size to buffer profile * add macro to generate port lists * Update buffer cfg templates for bfn mavericks * add non zero size for buffer profiles * add port generation macro * Add missing psmisc package * BGP docker seems to be missing killall utility being used by fast-reboot script. This is causing non graceful termination of BGP sessions. Adding psmisc to resolve this issue. * Update swss ref point * Update swss ref point * Update sairedis refpoint * Update sairedis refpoint * Update sairedis refpoint * Update sairedis refpoint * Update refpoint for sairedis and swss * sairedis to azure master * swss to latest bfn bf-master * Update gitmodules Update url for sairedis to azure master * Correct typo in bfn platform script * Update swss and sairedis ref points * Update swss ref point * Address Review comments * Update swws path in gitmodules to azure master * update swss refpoint * update base docker j2 file -remove psmisc package (could be a concern, would cause fast reboot to not work correctly will fix in another PR) * Fix sairedis refpoint broken in by previous merge * Remove psmisc from docker base image * This will break fast reboot as killall is required for killing bgp process and initiating graceful termination of BGP session. Will fix this in a seperate PR. Need this for SONIC upstreaming * Address upstream comments * Remove bmc interface from interface jinja template and sample output interfaces file * Add bmc interface at boot time to network interfaces for bfn bmc based platforms * Remove autogen ingrasys debian files * Revert "Remove autogen ingrasys debian files" * Buffer and qos config template fix for bfn platforms (#21) SWI-1509 Buffer and qos config template fix for bfn platforms * Fix qos config files for montara & mavericks (#22) * Reference only ppg 3,4 in qos files as no profiles are attached to 0,1 in buffer configs * Fix vs test (#23)
This commit is contained in:
parent
216d2fadb8
commit
93905d3d82
@ -0,0 +1 @@
|
||||
CONSOLE_SPEED=57600
|
1079
device/barefoot/x86_64-accton_wedge100bf_32x-r0/minigraph.xml
Normal file
1079
device/barefoot/x86_64-accton_wedge100bf_32x-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
{%- set default_topo = 't0' %}
|
||||
{%- include 'buffers_config.j2' %}
|
@ -0,0 +1,83 @@
|
||||
{% set default_cable = '5m' %}
|
||||
{% set ingress_lossless_pool_size = '4194304' %}
|
||||
{% set ingress_lossy_pool_size = '7340032' %}
|
||||
{% set egress_lossless_pool_size = '16777152' %}
|
||||
{% set egress_lossy_pool_size = '7340032' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0,32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"0"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-1": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{%- endmacro %}
|
@ -0,0 +1,83 @@
|
||||
{% set default_cable = '5m' %}
|
||||
{% set ingress_lossless_pool_size = '2097152' %}
|
||||
{% set ingress_lossy_pool_size = '5242880' %}
|
||||
{% set egress_lossless_pool_size = '16777152' %}
|
||||
{% set egress_lossy_pool_size = '5242880' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0,32) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"0"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-1": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{%- endmacro %}
|
@ -0,0 +1,17 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold
|
||||
10000 5m 34816 18432 16384 0
|
||||
25000 5m 34816 18432 16384 0
|
||||
40000 5m 34816 18432 16384 0
|
||||
50000 5m 34816 18432 16384 0
|
||||
100000 5m 36864 18432 18432 0
|
||||
10000 40m 36864 18432 18432 0
|
||||
25000 40m 39936 18432 21504 0
|
||||
40000 40m 41984 18432 23552 0
|
||||
50000 40m 41984 18432 23552 0
|
||||
100000 40m 54272 18432 35840 0
|
||||
10000 300m 49152 18432 30720 0
|
||||
25000 300m 71680 18432 53248 0
|
||||
40000 300m 94208 18432 75776 0
|
||||
50000 300m 94208 18432 75776 0
|
||||
100000 300m 184320 18432 165888 0
|
@ -0,0 +1,33 @@
|
||||
# name lanes
|
||||
Ethernet0 0,1,2,3
|
||||
Ethernet4 4,5,6,7
|
||||
Ethernet8 8,9,10,11
|
||||
Ethernet12 12,13,14,15
|
||||
Ethernet16 16,17,18,19
|
||||
Ethernet20 20,21,22,23
|
||||
Ethernet24 24,25,26,27
|
||||
Ethernet28 28,29,30,31
|
||||
Ethernet32 32,33,34,35
|
||||
Ethernet36 36,37,38,39
|
||||
Ethernet40 40,41,42,43
|
||||
Ethernet44 44,45,46,47
|
||||
Ethernet48 48,49,50,51
|
||||
Ethernet52 52,53,54,55
|
||||
Ethernet56 56,57,58,59
|
||||
Ethernet60 60,61,62,63
|
||||
Ethernet64 64,65,66,67
|
||||
Ethernet68 68,69,70,71
|
||||
Ethernet72 72,73,74,75
|
||||
Ethernet76 76,77,78,79
|
||||
Ethernet80 80,81,82,83
|
||||
Ethernet84 84,85,86,87
|
||||
Ethernet88 88,89,90,91
|
||||
Ethernet92 92,93,94,95
|
||||
Ethernet96 96,97,98,99
|
||||
Ethernet100 100,101,102,103
|
||||
Ethernet104 104,105,106,107
|
||||
Ethernet108 108,109,110,111
|
||||
Ethernet112 112,113,114,115
|
||||
Ethernet116 116,117,118,119
|
||||
Ethernet120 120,121,122,123
|
||||
Ethernet124 124,125,126,127
|
@ -0,0 +1,161 @@
|
||||
{
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"MAP_PFC_PRIORITY_TO_QUEUE": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"TC_TO_QUEUE_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.0": {
|
||||
"type":"DWRR",
|
||||
"weight": "25"
|
||||
},
|
||||
"scheduler.1": {
|
||||
"type":"DWRR",
|
||||
"weight": "30"
|
||||
},
|
||||
"scheduler.2": {
|
||||
"type":"DWRR",
|
||||
"weight": "20"
|
||||
}
|
||||
},
|
||||
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||
"pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSY": {
|
||||
"wred_green_enable":"true",
|
||||
"wred_yellow_enable":"true",
|
||||
"ecn":"ecn_all",
|
||||
"red_max_threshold":"516096",
|
||||
"red_min_threshold":"516096",
|
||||
"yellow_max_threshold":"516096",
|
||||
"yellow_min_threshold":"516096",
|
||||
"green_max_threshold": "184320",
|
||||
"green_min_threshold": "184320"
|
||||
},
|
||||
"AZURE_LOSSLESS": {
|
||||
"wred_green_enable":"true",
|
||||
"wred_yellow_enable":"true",
|
||||
"ecn":"ecn_all",
|
||||
"red_max_threshold":"516096",
|
||||
"red_min_threshold":"516096",
|
||||
"yellow_max_threshold":"516096",
|
||||
"yellow_min_threshold":"516096",
|
||||
"green_max_threshold": "184320",
|
||||
"green_min_threshold": "184320"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.1]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.2]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1": {
|
||||
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.0]",
|
||||
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
{
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"instance": 0,
|
||||
"p4_program_list": [
|
||||
{
|
||||
"id": "pgm-0",
|
||||
"instance": 0,
|
||||
"path": "switch",
|
||||
"program-name": "switch",
|
||||
"pd": "lib/tofinopd/switch/libpd.so",
|
||||
"pd-thrift": "lib/tofinopd/switch/libpdthrift.so",
|
||||
"table-config": "share/tofinopd/switch/context.json",
|
||||
"tofino-bin": "share/tofinopd/switch/tofino.bin",
|
||||
"switchapi": "lib/libswitchapi.so",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"agent0": "lib/platform/x86_64-accton_wedge100bf_32x-r0/libpltfm_mgr.so",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
CONSOLE_SPEED=57600
|
@ -0,0 +1,2 @@
|
||||
{%- set default_topo = 't0' %}
|
||||
{%- include 'buffers_config.j2' %}
|
@ -0,0 +1,83 @@
|
||||
{% set default_cable = '5m' %}
|
||||
{% set ingress_lossless_pool_size = '4194304' %}
|
||||
{% set ingress_lossy_pool_size = '7340032' %}
|
||||
{% set egress_lossless_pool_size = '16777152' %}
|
||||
{% set egress_lossy_pool_size = '7340032' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0,64) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"0"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-1": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{%- endmacro %}
|
@ -0,0 +1,83 @@
|
||||
{% set default_cable = '5m' %}
|
||||
{% set ingress_lossless_pool_size = '2097152' %}
|
||||
{% set ingress_lossy_pool_size = '5242880' %}
|
||||
{% set egress_lossless_pool_size = '16777152' %}
|
||||
{% set egress_lossy_pool_size = '5242880' %}
|
||||
|
||||
{%- macro generate_port_lists(PORT_ALL) %}
|
||||
{# Generate list of ports #}
|
||||
{%- for port_idx in range(0,64) %}
|
||||
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_buffer_pool_and_profiles() %}
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "{{ ingress_lossless_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"ingress_lossy_pool": {
|
||||
"size": "{{ ingress_lossy_pool_size }}",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossless_pool": {
|
||||
"size": "{{ egress_lossless_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
},
|
||||
"egress_lossy_pool": {
|
||||
"size": "{{ egress_lossy_pool_size }}",
|
||||
"type": "egress",
|
||||
"mode": "dynamic"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"0"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossless_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"7"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
},
|
||||
"q_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|egress_lossy_pool]",
|
||||
"size":"4096",
|
||||
"dynamic_th":"3"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_pg_profils(port_names) %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
}
|
||||
},
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro generate_queue_buffers(port_names) %}
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-1": {
|
||||
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
|
||||
}
|
||||
}
|
||||
{%- endmacro %}
|
@ -0,0 +1,17 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold
|
||||
10000 5m 34816 18432 16384 0
|
||||
25000 5m 34816 18432 16384 0
|
||||
40000 5m 34816 18432 16384 0
|
||||
50000 5m 34816 18432 16384 0
|
||||
100000 5m 36864 18432 18432 0
|
||||
10000 40m 36864 18432 18432 0
|
||||
25000 40m 39936 18432 21504 0
|
||||
40000 40m 41984 18432 23552 0
|
||||
50000 40m 41984 18432 23552 0
|
||||
100000 40m 54272 18432 35840 0
|
||||
10000 300m 49152 18432 30720 0
|
||||
25000 300m 71680 18432 53248 0
|
||||
40000 300m 94208 18432 75776 0
|
||||
50000 300m 94208 18432 75776 0
|
||||
100000 300m 184320 18432 165888 0
|
@ -0,0 +1,66 @@
|
||||
# name lanes
|
||||
Ethernet0 0,1,2,3
|
||||
Ethernet4 4,5,6,7
|
||||
Ethernet8 8,9,10,11
|
||||
Ethernet12 12,13,14,15
|
||||
Ethernet16 16,17,18,19
|
||||
Ethernet20 20,21,22,23
|
||||
Ethernet24 24,25,26,27
|
||||
Ethernet28 28,29,30,31
|
||||
Ethernet32 32,33,34,35
|
||||
Ethernet36 36,37,38,39
|
||||
Ethernet40 40,41,42,43
|
||||
Ethernet44 44,45,46,47
|
||||
Ethernet48 48,49,50,51
|
||||
Ethernet52 52,53,54,55
|
||||
Ethernet56 56,57,58,59
|
||||
Ethernet60 60,61,62,63
|
||||
Ethernet64 64,65,66,67
|
||||
Ethernet68 68,69,70,71
|
||||
Ethernet72 72,73,74,75
|
||||
Ethernet76 76,77,78,79
|
||||
Ethernet80 80,81,82,83
|
||||
Ethernet84 84,85,86,87
|
||||
Ethernet88 88,89,90,91
|
||||
Ethernet92 92,93,94,95
|
||||
Ethernet96 96,97,98,99
|
||||
Ethernet100 100,101,102,103
|
||||
Ethernet104 104,105,106,107
|
||||
Ethernet108 108,109,110,111
|
||||
Ethernet112 112,113,114,115
|
||||
Ethernet116 116,117,118,119
|
||||
Ethernet120 120,121,122,123
|
||||
Ethernet124 124,125,126,127
|
||||
Ethernet128 128,129,130,131
|
||||
Ethernet132 132,133,134,135
|
||||
Ethernet136 136,137,138,139
|
||||
Ethernet140 140,141,142,143
|
||||
Ethernet144 144,145,146,147
|
||||
Ethernet148 148,149,150,151
|
||||
Ethernet152 152,153,154,155
|
||||
Ethernet156 156,157,158,159
|
||||
Ethernet160 160,161,162,163
|
||||
Ethernet164 164,165,166,167
|
||||
Ethernet168 168,169,170,171
|
||||
Ethernet172 172,173,174,175
|
||||
Ethernet176 176,177,178,179
|
||||
Ethernet180 180,181,182,183
|
||||
Ethernet184 184,185,186,187
|
||||
Ethernet188 188,189,190,191
|
||||
Ethernet192 192,193,194,195
|
||||
Ethernet196 196,197,198,199
|
||||
Ethernet200 200,201,202,203
|
||||
Ethernet204 204,205,206,207
|
||||
Ethernet208 208,209,210,211
|
||||
Ethernet212 212,213,214,215
|
||||
Ethernet216 216,217,218,219
|
||||
Ethernet220 220,221,222,223
|
||||
Ethernet224 224,225,226,227
|
||||
Ethernet228 228,229,230,231
|
||||
Ethernet232 232,233,234,235
|
||||
Ethernet236 236,237,238,239
|
||||
Ethernet240 240,241,242,243
|
||||
Ethernet244 244,245,246,247
|
||||
Ethernet248 248,249,250,251
|
||||
Ethernet252 252,253,254,255
|
||||
Ethernet256 256,257,258,259
|
@ -0,0 +1,161 @@
|
||||
{
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"MAP_PFC_PRIORITY_TO_QUEUE": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"TC_TO_QUEUE_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.0": {
|
||||
"type":"DWRR",
|
||||
"weight": "25"
|
||||
},
|
||||
"scheduler.1": {
|
||||
"type":"DWRR",
|
||||
"weight": "30"
|
||||
},
|
||||
"scheduler.2": {
|
||||
"type":"DWRR",
|
||||
"weight": "20"
|
||||
}
|
||||
},
|
||||
"PFC_PRIORITY_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"3": "3",
|
||||
"4": "4"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124": {
|
||||
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
|
||||
"pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSY": {
|
||||
"wred_green_enable":"true",
|
||||
"wred_yellow_enable":"true",
|
||||
"ecn":"ecn_all",
|
||||
"red_max_threshold":"516096",
|
||||
"red_min_threshold":"516096",
|
||||
"yellow_max_threshold":"516096",
|
||||
"yellow_min_threshold":"516096",
|
||||
"green_max_threshold": "184320",
|
||||
"green_min_threshold": "184320"
|
||||
},
|
||||
"AZURE_LOSSLESS": {
|
||||
"wred_green_enable":"true",
|
||||
"wred_yellow_enable":"true",
|
||||
"ecn":"ecn_all",
|
||||
"red_max_threshold":"516096",
|
||||
"red_min_threshold":"516096",
|
||||
"yellow_max_threshold":"516096",
|
||||
"yellow_min_threshold":"516096",
|
||||
"green_max_threshold": "184320",
|
||||
"green_min_threshold": "184320"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.1]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|1": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.2]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|0-1": {
|
||||
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSY]"
|
||||
},
|
||||
"Ethernet0,Ethernet4,Ethernet8,Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet80,Ethernet84,Ethernet88,Ethernet92,Ethernet96,Ethernet100,Ethernet104,Ethernet108,Ethernet112,Ethernet116,Ethernet120,Ethernet124|3-4": {
|
||||
"scheduler" : "[SCHEDULER|scheduler.0]",
|
||||
"wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
{
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"instance": 0,
|
||||
"p4_program_list": [
|
||||
{
|
||||
"id": "pgm-0",
|
||||
"instance": 0,
|
||||
"path": "switch",
|
||||
"program-name": "switch",
|
||||
"pd": "lib/tofinopd/switch/libpd.so",
|
||||
"pd-thrift": "lib/tofinopd/switch/libpdthrift.so",
|
||||
"table-config": "share/tofinopd/switch/context.json",
|
||||
"tofino-bin": "share/tofinopd/switch/tofino.bin",
|
||||
"switchapi": "lib/libswitchapi.so",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"agent0": "lib/platform/x86_64-accton_wedge100bf_65x-r0/libpltfm_mgr.so",
|
||||
"switchapi_port_add": false,
|
||||
"non_default_port_ppgs": 5
|
||||
}
|
||||
]
|
||||
}
|
1079
device/barefoot/x86_64-accton_wedge100bf_65x-r0/minigraph.xml
Normal file
1079
device/barefoot/x86_64-accton_wedge100bf_65x-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
||||
# name lanes alias speed autoneg fec index
|
||||
Ethernet0 0,1,2,3 Ethernet0 100000 0 none 0
|
||||
Ethernet4 4,5,6,7 Ethernet4 100000 0 none 1
|
||||
Ethernet8 8,9,10,11 Ethernet8 100000 0 none 2
|
||||
Ethernet12 12,13,14,15 Ethernet12 100000 0 none 3
|
||||
Ethernet16 16,17,18,19 Ethernet16 100000 0 none 4
|
||||
Ethernet20 20,21,22,23 Ethernet20 100000 0 none 5
|
||||
Ethernet24 24,25,26,27 Ethernet24 100000 0 none 6
|
||||
Ethernet28 28,29,30,31 Ethernet28 100000 0 none 7
|
||||
Ethernet32 32,33,34,35 Ethernet32 100000 0 none 8
|
||||
Ethernet36 36,37,38,39 Ethernet36 100000 0 none 9
|
||||
Ethernet40 40,41,42,43 Ethernet40 100000 0 none 10
|
||||
Ethernet44 44,45,46,47 Ethernet44 100000 0 none 11
|
||||
Ethernet48 48,49,50,51 Ethernet48 100000 0 none 12
|
||||
Ethernet52 52,53,54,55 Ethernet52 100000 0 none 13
|
||||
Ethernet56 56,57,58,59 Ethernet56 100000 0 none 14
|
||||
Ethernet60 60,61,62,63 Ethernet60 100000 0 none 15
|
||||
Ethernet64 64,65,66,67 Ethernet64 100000 0 none 16
|
||||
Ethernet68 68,69,70,71 Ethernet68 100000 0 none 17
|
||||
Ethernet72 72,73,74,75 Ethernet72 100000 0 none 18
|
||||
Ethernet76 76,77,78,79 Ethernet76 100000 0 none 19
|
||||
Ethernet80 80,81,82,83 Ethernet80 100000 0 none 20
|
||||
Ethernet84 84,85,86,87 Ethernet84 100000 0 none 21
|
||||
Ethernet88 88,89,90,91 Ethernet88 100000 0 none 22
|
||||
Ethernet92 92,93,94,95 Ethernet92 100000 0 none 23
|
||||
Ethernet96 96,97,98,99 Ethernet96 100000 0 none 24
|
||||
Ethernet100 100,101,102,103 Ethernet100 100000 0 none 25
|
||||
Ethernet104 104,105,106,107 Ethernet104 100000 0 none 26
|
||||
Ethernet108 108,109,110,111 Ethernet108 100000 0 none 27
|
||||
Ethernet112 112,113,114,115 Ethernet112 100000 0 none 28
|
||||
Ethernet116 116,117,118,119 Ethernet116 100000 0 none 29
|
||||
Ethernet120 120,121,122,123 Ethernet120 100000 0 none 30
|
||||
Ethernet124 124,125,126,127 Ethernet124 100000 0 none 31
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"instance": 0,
|
||||
"p4_program_list": [
|
||||
{
|
||||
"id": "pgm-0",
|
||||
"instance": 0,
|
||||
"path": "switch",
|
||||
"program-name": "switch",
|
||||
"pd": "lib/tofinopd/switch/libpd.so",
|
||||
"pd-thrift": "lib/tofinopd/switch/libpdthrift.so",
|
||||
"table-config": "share/tofinopd/switch/context.json",
|
||||
"tofino-bin": "share/tofinopd/switch/tofino.bin",
|
||||
"switchapi": "lib/libswitchapi.so",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"agent0": "lib/platform/x86_64-ingrasys_s9180_32x-r0/libpltfm_mgr.so",
|
||||
"switchapi_port_add": false
|
||||
}
|
||||
]
|
||||
}
|
12
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/fancontrol
Normal file
12
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/fancontrol
Normal file
@ -0,0 +1,12 @@
|
||||
# Configuration file generated by pwmconfig, changes will be lost
|
||||
INTERVAL=10
|
||||
DEVPATH=hwmon1=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-56/56-002f
|
||||
DEVNAME=hwmon1=w83795adg
|
||||
FCTEMPS=hwmon1/device/pwm2=hwmon2/temp2_input hwmon1/device/pwm1=hwmon2/temp2_input
|
||||
FCFANS=hwmon1/device/pwm2=hwmon1/device/fan8_input hwmon1/device/pwm2=hwmon1/device/fan7_input hwmon1/device/pwm2=hwmon1/device/fan6_input hwmon1/device/pwm2=hwmon1/device/fan5_input hwmon1/device/pwm1=hwmon1/device/fan4_input hwmon1/device/pwm1=hwmon1/device/fan3_input hwmon1/device/pwm1=hwmon1/device/fan2_input hwmon1/device/pwm1=hwmon1/device/fan1_input
|
||||
# TODO: check the temp value with HW after board ready
|
||||
MINTEMP=hwmon1/device/pwm2=20 hwmon1/device/pwm1=20
|
||||
MAXTEMP=hwmon1/device/pwm2=60 hwmon1/device/pwm1=60
|
||||
MINSTART=hwmon1/device/pwm2=75 hwmon1/device/pwm1=75
|
||||
MINSTOP=hwmon1/device/pwm2=22 hwmon1/device/pwm1=22
|
||||
|
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
151
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/minigraph.xml
Normal file
151
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/minigraph.xml
Normal file
@ -0,0 +1,151 @@
|
||||
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<CpgDec>
|
||||
<IsisRouters xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||
<PeeringSessions>
|
||||
<BGPSession>
|
||||
<StartRouter>OCPSCH0104001MS</StartRouter>
|
||||
<StartPeer>10.10.1.26</StartPeer>
|
||||
<EndRouter>OCPSCH01040GGLF</EndRouter>
|
||||
<EndPeer>10.10.1.25</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>10</HoldTime>
|
||||
<KeepAliveTime>3</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>OCPSCH0104002MS</StartRouter>
|
||||
<StartPeer>10.10.2.26</StartPeer>
|
||||
<EndRouter>OCPSCH01040GGLF</EndRouter>
|
||||
<EndPeer>10.10.2.25</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>10</HoldTime>
|
||||
<KeepAliveTime>3</KeepAliveTime>
|
||||
</BGPSession>
|
||||
</PeeringSessions>
|
||||
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64536</a:ASN>
|
||||
<a:Hostname>OCPSCH01040GGLF</a:Hostname>
|
||||
<a:Peers>
|
||||
<BGPPeer>
|
||||
<Address>10.10.1.26</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.10.2.26</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
</a:Peers>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64542</a:ASN>
|
||||
<a:Hostname>OCPSCH0104001MS</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64543</a:ASN>
|
||||
<a:Hostname>OCPSCH0104002MS</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
</Routers>
|
||||
</CpgDec>
|
||||
<DpgDec>
|
||||
<DeviceDataPlaneInfo>
|
||||
<IPSecTunnels/>
|
||||
<LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||
<a:LoopbackIPInterface>
|
||||
<Name>HostIP</Name>
|
||||
<AttachTo>Loopback0</AttachTo>
|
||||
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.NetMux">
|
||||
<b:IPPrefix>100.0.0.9/32</b:IPPrefix>
|
||||
</a:Prefix>
|
||||
<a:PrefixStr>100.0.0.9/32</a:PrefixStr>
|
||||
</a:LoopbackIPInterface>
|
||||
</LoopbackIPInterfaces>
|
||||
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||
</ManagementIPInterfaces>
|
||||
<MplsInterfaces/>
|
||||
<MplsTeInterfaces/>
|
||||
<RsvpInterfaces/>
|
||||
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||
<PortChannelInterfaces/>
|
||||
<VlanInterfaces/>
|
||||
<IPInterfaces>
|
||||
<IPInterface>
|
||||
<Name i:nil="true"/>
|
||||
<AttachTo>Ethernet0</AttachTo>
|
||||
<Prefix>10.10.1.25/30</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:nil="true"/>
|
||||
<AttachTo>Ethernet4</AttachTo>
|
||||
<Prefix>10.10.2.25/30</Prefix>
|
||||
</IPInterface>
|
||||
</IPInterfaces>
|
||||
<DataAcls/>
|
||||
<AclInterfaces/>
|
||||
<DownstreamSummaries/>
|
||||
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||
</DeviceDataPlaneInfo>
|
||||
</DpgDec>
|
||||
<PngDec>
|
||||
<DeviceInterfaceLinks>
|
||||
<DeviceLinkBase i:type="DeviceInterfaceLink">
|
||||
<Bandwidth>40000</Bandwidth>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>OCPSCH0104001MS</EndDevice>
|
||||
<EndPort>Ethernet24</EndPort>
|
||||
<StartDevice>OCPSCH01040GGLF</StartDevice>
|
||||
<StartPort>Ethernet0</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase i:type="DeviceInterfaceLink">
|
||||
<Bandwidth>40000</Bandwidth>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>OCPSCH0104002MS</EndDevice>
|
||||
<EndPort>Ethernet24</EndPort>
|
||||
<StartDevice>OCPSCH01040GGLF</StartDevice>
|
||||
<StartPort>Ethernet4</StartPort>
|
||||
</DeviceLinkBase>
|
||||
</DeviceInterfaceLinks>
|
||||
<Devices>
|
||||
<Device i:type="LeafRouter">
|
||||
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||
<HwSku>INGRASYS-S9180-32X</HwSku>
|
||||
</Device>
|
||||
</Devices>
|
||||
</PngDec>
|
||||
<MetadataDeclaration>
|
||||
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||
<a:DeviceMetadata>
|
||||
<a:Name>OCPSCH01040GGLF</a:Name>
|
||||
<a:Properties>
|
||||
<a:DeviceProperty>
|
||||
<a:Name>DhcpResources</a:Name>
|
||||
<a:Reference i:nil="true"/>
|
||||
<a:Value></a:Value>
|
||||
</a:DeviceProperty>
|
||||
<a:DeviceProperty>
|
||||
<a:Name>NtpResources</a:Name>
|
||||
<a:Reference i:nil="true"/>
|
||||
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
|
||||
</a:DeviceProperty>
|
||||
<a:DeviceProperty>
|
||||
<a:Name>SyslogResources</a:Name>
|
||||
<a:Reference i:nil="true"/>
|
||||
<a:Value></a:Value>
|
||||
</a:DeviceProperty>
|
||||
<a:DeviceProperty>
|
||||
<a:Name>ErspanDestinationIpv4</a:Name>
|
||||
<a:Reference i:nil="true"/>
|
||||
<a:Value>2.2.2.2</a:Value>
|
||||
</a:DeviceProperty>
|
||||
</a:Properties>
|
||||
</a:DeviceMetadata>
|
||||
</Devices>
|
||||
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||
</MetadataDeclaration>
|
||||
<Hostname>OCPSCH01040GGLF</Hostname>
|
||||
<HwSku>INGRASYS-S9180-32X</HwSku>
|
||||
</DeviceMiniGraph>
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Ingrasys S9180-32X
|
||||
#
|
||||
# Platform and model specific eeprom subclass, inherits from the base class,
|
||||
# and provides the followings:
|
||||
# - the eeprom format definition
|
||||
# - specific encoder/decoder if there is special need
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/class/i2c-adapter/i2c-0/0-0055/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
@ -0,0 +1,90 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
SYS_GPIO_DIR = "/sys/class/gpio/"
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
|
||||
# Get sysfs attribute
|
||||
def get_attr_value(self, attr_path):
|
||||
|
||||
retval = 'ERR'
|
||||
if (not os.path.isfile(attr_path)):
|
||||
return retval
|
||||
|
||||
try:
|
||||
with open(attr_path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
logging.error("Unable to open ", attr_path, " file !")
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
return retval
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
MAX_PSUS = 2
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
status = 0
|
||||
gpio_path = [ 'gpio99/value', 'gpio96/value' ]
|
||||
attr_path = self.SYS_GPIO_DIR + gpio_path[index-1]
|
||||
|
||||
attr_value = self.get_attr_value(attr_path)
|
||||
|
||||
if (attr_value != 'ERR'):
|
||||
attr_value = int(attr_value, 10)
|
||||
# Check for PSU status
|
||||
if (attr_value == 1):
|
||||
status = 1
|
||||
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
gpio_path = [ 'gpio100/value', 'gpio97/value' ]
|
||||
attr_path = self.SYS_GPIO_DIR + gpio_path[index-1]
|
||||
|
||||
attr_value = self.get_attr_value(attr_path)
|
||||
|
||||
if (attr_value != 'ERR'):
|
||||
attr_value = int(attr_value, 10)
|
||||
# Check for PSU status
|
||||
if (attr_value == 1):
|
||||
status = 1
|
||||
|
||||
return status
|
||||
|
290
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/plugins/sfputil.py
Normal file
290
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,290 @@
|
||||
# sfputil.py
|
||||
#
|
||||
# Platform-specific SFP transceiver interface for SONiC
|
||||
#
|
||||
|
||||
try:
|
||||
import time
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform-specific SfpUtil class"""
|
||||
|
||||
PORT_START = 0
|
||||
PORT_END = 33
|
||||
SFP_PORT_START = 32
|
||||
PORTS_IN_BLOCK = 34
|
||||
|
||||
BASE_DIR_PATH = "/sys/class/gpio/gpio{0}/direction"
|
||||
BASE_VAL_PATH = "/sys/class/gpio/gpio{0}/value"
|
||||
|
||||
_port_to_eeprom_mapping = {}
|
||||
port_to_i2c_mapping = {
|
||||
0: 10,
|
||||
1: 9,
|
||||
2: 12,
|
||||
3: 11,
|
||||
4: 14,
|
||||
5: 13,
|
||||
6: 16,
|
||||
7: 15,
|
||||
8: 18,
|
||||
9: 17,
|
||||
10: 20,
|
||||
11: 19,
|
||||
12: 22,
|
||||
13: 21,
|
||||
14: 24,
|
||||
15: 23,
|
||||
16: 26,
|
||||
17: 25,
|
||||
18: 28,
|
||||
19: 27,
|
||||
20: 30,
|
||||
21: 29,
|
||||
22: 32,
|
||||
23: 31,
|
||||
24: 34,
|
||||
25: 33,
|
||||
26: 36,
|
||||
27: 35,
|
||||
28: 38,
|
||||
29: 37,
|
||||
30: 40,
|
||||
31: 39,
|
||||
32: 45,
|
||||
33: 46
|
||||
}
|
||||
|
||||
abs_to_gpio_mapping = {
|
||||
0: 241,
|
||||
1: 240,
|
||||
2: 243,
|
||||
3: 242,
|
||||
4: 245,
|
||||
5: 244,
|
||||
6: 247,
|
||||
7: 246,
|
||||
8: 249,
|
||||
9: 248,
|
||||
10: 251,
|
||||
11: 250,
|
||||
12: 253,
|
||||
13: 252,
|
||||
14: 255,
|
||||
15: 254,
|
||||
16: 225,
|
||||
17: 224,
|
||||
18: 227,
|
||||
19: 226,
|
||||
20: 229,
|
||||
21: 228,
|
||||
22: 231,
|
||||
23: 230,
|
||||
24: 233,
|
||||
25: 232,
|
||||
26: 235,
|
||||
27: 234,
|
||||
28: 237,
|
||||
29: 236,
|
||||
30: 239,
|
||||
31: 238,
|
||||
32: 177,
|
||||
33: 176
|
||||
}
|
||||
|
||||
lpmode_to_gpio_mapping = {
|
||||
0: 161,
|
||||
1: 160,
|
||||
2: 163,
|
||||
3: 162,
|
||||
4: 165,
|
||||
5: 164,
|
||||
6: 167,
|
||||
7: 166,
|
||||
8: 169,
|
||||
9: 168,
|
||||
10: 171,
|
||||
11: 170,
|
||||
12: 173,
|
||||
13: 172,
|
||||
14: 175,
|
||||
15: 174,
|
||||
16: 145,
|
||||
17: 144,
|
||||
18: 147,
|
||||
19: 146,
|
||||
20: 149,
|
||||
21: 148,
|
||||
22: 151,
|
||||
23: 150,
|
||||
24: 153,
|
||||
25: 152,
|
||||
26: 155,
|
||||
27: 154,
|
||||
28: 157,
|
||||
29: 156,
|
||||
30: 159,
|
||||
31: 158
|
||||
}
|
||||
|
||||
reset_to_gpio_mapping = {
|
||||
0: 129,
|
||||
1: 128,
|
||||
2: 131,
|
||||
3: 130,
|
||||
4: 133,
|
||||
5: 132,
|
||||
6: 135,
|
||||
7: 134,
|
||||
8: 137,
|
||||
9: 136,
|
||||
10: 139,
|
||||
11: 138,
|
||||
12: 141,
|
||||
13: 140,
|
||||
14: 143,
|
||||
15: 142,
|
||||
16: 113,
|
||||
17: 112,
|
||||
18: 115,
|
||||
19: 114,
|
||||
20: 117,
|
||||
21: 116,
|
||||
22: 119,
|
||||
23: 118,
|
||||
24: 121,
|
||||
25: 120,
|
||||
26: 123,
|
||||
27: 122,
|
||||
28: 125,
|
||||
29: 124,
|
||||
30: 127,
|
||||
31: 126
|
||||
}
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self.PORT_START
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self.PORT_END
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(0, self.PORTS_IN_BLOCK + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
||||
@property
|
||||
def sfp_port_start(self):
|
||||
return self.SFP_PORT_START
|
||||
|
||||
def __init__(self):
|
||||
# Override port_to_eeprom_mapping for class initialization
|
||||
eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
|
||||
|
||||
for x in range(self.port_start, self.port_end + 1):
|
||||
port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x])
|
||||
self.port_to_eeprom_mapping[x] = port_eeprom_path
|
||||
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
try:
|
||||
abs_device_file = self.BASE_VAL_PATH.format(
|
||||
self.abs_to_gpio_mapping[port_num])
|
||||
val_file = open(abs_device_file)
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = val_file.readline().rstrip()
|
||||
val_file.close()
|
||||
|
||||
# content is a string, either "0" or "1"
|
||||
if content == "1":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.sfp_port_start: # TBD
|
||||
return False
|
||||
|
||||
try:
|
||||
lpmode_val_device_file = self.BASE_VAL_PATH.format(
|
||||
self.lpmode_to_gpio_mapping[port_num])
|
||||
val_file = open(lpmode_val_device_file)
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = val_file.readline().rstrip()
|
||||
val_file.close()
|
||||
|
||||
# content is a string, either "0" or "1"
|
||||
if content == "1":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.sfp_port_start: # TBD
|
||||
return False
|
||||
|
||||
try:
|
||||
lpmode_val_device_file = self.BASE_VAL_PATH.format(
|
||||
self.lpmode_to_gpio_mapping[port_num])
|
||||
val_file = open(lpmode_val_device_file, "w")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
val_file.write("1" if lpmode is True else "0")
|
||||
val_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.sfp_port_start: # TBD
|
||||
return False
|
||||
|
||||
try:
|
||||
reset_val_device_file = self.BASE_VAL_PATH.format(
|
||||
self.reset_to_gpio_mapping[port_num])
|
||||
val_file = open(reset_val_device_file, "w")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
val_file.write("1")
|
||||
val_file.close()
|
||||
|
||||
# Sleep 1 second to allow it to settle
|
||||
time.sleep(1)
|
||||
|
||||
try:
|
||||
reset_val_device_file = self.BASE_VAL_PATH.format(
|
||||
self.reset_to_gpio_mapping[port_num])
|
||||
val_file = open(reset_val_device_file, "w")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
val_file.write("0")
|
||||
val_file.close()
|
||||
|
||||
return True
|
76
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/sensors.conf
Normal file
76
device/ingrasys/x86_64-ingrasys_s9180_32x-r0/sensors.conf
Normal file
@ -0,0 +1,76 @@
|
||||
# libsensors configuration file
|
||||
chip "i350bb-*"
|
||||
ignore loc1
|
||||
|
||||
chip "jc42-*"
|
||||
label temp1 "DIMM Temp"
|
||||
set temp1_max 50
|
||||
set temp1_crit 85
|
||||
|
||||
bus "i2c-0" "I2C I801"
|
||||
chip "tmp75-i2c-*-4f"
|
||||
label temp1 "CPU Board Temp"
|
||||
set temp1_max 50
|
||||
|
||||
bus "i2c-41" "i2c-7-switch (chan_id 0)"
|
||||
chip "tmp75-i2c-*-48"
|
||||
label temp1 "Near PSU1"
|
||||
set temp1_max 50
|
||||
chip "tmp75-i2c-*-4a"
|
||||
label temp1 "Rear MAC"
|
||||
set temp1_max 50
|
||||
chip "tmp75-i2c-*-4b"
|
||||
label temp1 "Near Port 32"
|
||||
set temp1_max 50
|
||||
chip "tmp75-i2c-*-4d"
|
||||
label temp1 "Near PSU2"
|
||||
set temp1_max 50
|
||||
chip "lm86-i2c-*-4c"
|
||||
label temp1 "Front MAC"
|
||||
label temp2 "ASIC Core Temp"
|
||||
set temp1_min 20
|
||||
set temp1_max 65
|
||||
set temp1_crit 70
|
||||
set temp2_min 20
|
||||
set temp2_max 70
|
||||
set temp2_crit 80
|
||||
|
||||
bus "i2c-56" "i2c-0-mux (chan_id 7)"
|
||||
chip "w83795adg-*"
|
||||
label in0 "0.9V"
|
||||
set in0_max 0.927
|
||||
set in0_min 0.873
|
||||
label in1 "0.86V"
|
||||
set in1_max 0.877
|
||||
set in1_min 0.843
|
||||
ignore in2
|
||||
ignore in3
|
||||
ignore in4
|
||||
ignore in5
|
||||
ignore in6
|
||||
ignore in7
|
||||
label in12 "2.5V"
|
||||
#compute in12 (2*4*@)/10, @-(2*4*@/10)
|
||||
compute in12 @/(1+(3/10)), @*(1+(3/10))
|
||||
set in12_max 2.625
|
||||
set in12_min 2.375
|
||||
# in12 and in13 are the same source
|
||||
ignore in13
|
||||
ignore in14
|
||||
ignore in15
|
||||
ignore in16
|
||||
label fan1 "FANTRAY 1-A"
|
||||
label fan2 "FANTRAY 1-B"
|
||||
label fan3 "FANTRAY 2-A"
|
||||
label fan4 "FANTRAY 2-B"
|
||||
label fan5 "FANTRAY 3-A"
|
||||
label fan6 "FANTRAY 3-B"
|
||||
label fan7 "FANTRAY 4-A"
|
||||
label fan8 "FANTRAY 4-B"
|
||||
ignore temp1
|
||||
ignore temp2
|
||||
ignore temp3
|
||||
ignore temp4
|
||||
ignore temp5
|
||||
ignore temp6
|
||||
ignore intrusion0
|
@ -0,0 +1,55 @@
|
||||
# name lanes alias speed autoneg fec
|
||||
Ethernet0 0 Ethernet0 25000 1 rs
|
||||
Ethernet4 1 Ethernet4 25000 1 rs
|
||||
Ethernet8 2 Ethernet8 25000 1 rs
|
||||
Ethernet12 3 Ethernet12 25000 1 rs
|
||||
Ethernet16 4 Ethernet16 25000 1 rs
|
||||
Ethernet20 5 Ethernet20 25000 1 rs
|
||||
Ethernet24 6 Ethernet24 25000 1 rs
|
||||
Ethernet28 7 Ethernet28 25000 1 rs
|
||||
Ethernet32 8 Ethernet32 25000 1 rs
|
||||
Ethernet36 9 Ethernet36 25000 1 rs
|
||||
Ethernet40 10 Ethernet40 25000 1 rs
|
||||
Ethernet44 11 Ethernet44 25000 1 rs
|
||||
Ethernet48 12 Ethernet48 25000 1 rs
|
||||
Ethernet52 13 Ethernet52 25000 1 rs
|
||||
Ethernet56 14 Ethernet56 25000 1 rs
|
||||
Ethernet60 15 Ethernet60 25000 1 rs
|
||||
Ethernet64 16 Ethernet64 25000 1 rs
|
||||
Ethernet68 17 Ethernet68 25000 1 rs
|
||||
Ethernet72 18 Ethernet72 25000 1 rs
|
||||
Ethernet76 19 Ethernet76 25000 1 rs
|
||||
Ethernet80 20 Ethernet80 25000 1 rs
|
||||
Ethernet84 21 Ethernet84 25000 1 rs
|
||||
Ethernet88 22 Ethernet88 25000 1 rs
|
||||
Ethernet92 23 Ethernet92 25000 1 rs
|
||||
Ethernet96 24 Ethernet96 25000 1 rs
|
||||
Ethernet100 25 Ethernet100 25000 1 rs
|
||||
Ethernet104 26 Ethernet104 25000 1 rs
|
||||
Ethernet108 27 Ethernet108 25000 1 rs
|
||||
Ethernet112 28 Ethernet112 25000 1 rs
|
||||
Ethernet116 29 Ethernet116 25000 1 rs
|
||||
Ethernet120 30 Ethernet120 25000 1 rs
|
||||
Ethernet124 31 Ethernet124 25000 1 rs
|
||||
Ethernet128 32 Ethernet128 25000 1 rs
|
||||
Ethernet132 33 Ethernet132 25000 1 rs
|
||||
Ethernet136 34 Ethernet136 25000 1 rs
|
||||
Ethernet140 35 Ethernet140 25000 1 rs
|
||||
Ethernet144 36 Ethernet144 25000 1 rs
|
||||
Ethernet148 37 Ethernet148 25000 1 rs
|
||||
Ethernet152 38 Ethernet152 25000 1 rs
|
||||
Ethernet156 39 Ethernet156 25000 1 rs
|
||||
Ethernet160 40 Ethernet160 25000 1 rs
|
||||
Ethernet164 41 Ethernet164 25000 1 rs
|
||||
Ethernet168 42 Ethernet168 25000 1 rs
|
||||
Ethernet172 43 Ethernet172 25000 1 rs
|
||||
Ethernet176 44 Ethernet176 25000 1 rs
|
||||
Ethernet180 45 Ethernet180 25000 1 rs
|
||||
Ethernet184 46 Ethernet184 25000 1 rs
|
||||
Ethernet188 47 Ethernet188 25000 1 rs
|
||||
Ethernet192 48,49,50,51 Ethernet192 100000 1 rs
|
||||
Ethernet196 52,53,54,55 Ethernet196 100000 1 rs
|
||||
Ethernet200 56,57,58,59 Ethernet200 100000 1 rs
|
||||
Ethernet204 60,61,62,63 Ethernet204 100000 1 rs
|
||||
Ethernet208 64,65,66,67 Ethernet208 100000 1 rs
|
||||
Ethernet212 68,69,70,71 Ethernet212 100000 1 rs
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"chip_list": [
|
||||
{
|
||||
"id": "asic-0",
|
||||
"chip_family": "Tofino",
|
||||
"instance": 0,
|
||||
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
|
||||
"pcie_domain": 0,
|
||||
"pcie_bus": 5,
|
||||
"pcie_fn": 0,
|
||||
"pcie_dev": 0,
|
||||
"pcie_int_mode": 1,
|
||||
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
|
||||
}
|
||||
],
|
||||
"instance": 0,
|
||||
"p4_program_list": [
|
||||
{
|
||||
"id": "pgm-0",
|
||||
"instance": 0,
|
||||
"path": "switch",
|
||||
"program-name": "switch",
|
||||
"pd": "lib/tofinopd/switch/libpd.so",
|
||||
"pd-thrift": "lib/tofinopd/switch/libpdthrift.so",
|
||||
"table-config": "share/tofinopd/switch/context.json",
|
||||
"tofino-bin": "share/tofinopd/switch/tofino.bin",
|
||||
"switchapi": "lib/libswitchapi.so",
|
||||
"switchsai": "lib/libswitchsai.so",
|
||||
"agent0": "lib/platform/x86_64-wnc_osw1800-r0/libpltfm_mgr.so",
|
||||
"switchapi_port_add": false
|
||||
}
|
||||
]
|
||||
}
|
11
device/wnc/x86_64-wnc_osw1800-r0/fancontrol
Normal file
11
device/wnc/x86_64-wnc_osw1800-r0/fancontrol
Normal file
@ -0,0 +1,11 @@
|
||||
INTERVAL=10
|
||||
DEVPATH=hwmon1=devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.2/i2c-2/i2c-5/5-0033 hwmon2=devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.2/i2c-2/i2c-7/7-001e hwmon3=devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.2/i2c-2/i2c-7/7-004e hwmon4=devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.2/1-1.2.3/1-1.2.3:1.2/i2c-2/i2c-7/7-004f
|
||||
DEVNAME=hwmon1=wnc_cpld3 hwmon2=tmp421 hwmon3=tmp75 hwmon4=tmp421
|
||||
FCTEMPS=hwmon1/pwm1=hwmon2/temp1_input hwmon1/pwm2=hwmon2/temp2_input hwmon1/pwm3=hwmon3/temp1_input hwmon1/pwm4=hwmon4/temp1_input hwmon1/pwm5=hwmon4/temp2_input
|
||||
FCFANS=hwmon1/pwm1=hwmon1/fan1_input hwmon1/pwm2=hwmon1/fan2_input hwmon1/pwm3=hwmon1/fan3_input hwmon1/pwm4=hwmon1/fan4_input hwmon1/pwm5=hwmon1/fan5_input
|
||||
MINTEMP=hwmon1/pwm1=20 hwmon1/pwm2=20 hwmon1/pwm3=20 hwmon1/pwm4=20 hwmon1/pwm5=20
|
||||
MAXTEMP=hwmon1/pwm1=50 hwmon1/pwm2=50 hwmon1/pwm3=50 hwmon1/pwm4=50 hwmon1/pwm5=50
|
||||
MINSTART=hwmon1/pwm1=32 hwmon1/pwm2=32 hwmon1/pwm3=32 hwmon1/pwm4=32 hwmon1/pwm5=32
|
||||
MINSTOP=hwmon1/pwm1=22 hwmon1/pwm2=22 hwmon1/pwm3=22 hwmon1/pwm4=22 hwmon1/pwm5=22
|
||||
MINPWM=hwmon1/pwm1=10 hwmon1/pwm2=10 hwmon1/pwm3=10 hwmon1/pwm4=10 hwmon1/pwm5=10
|
||||
MAXPWM=hwmon1/pwm1=100 hwmon1/pwm2=100 hwmon1/pwm3=100 hwmon1/pwm4=100 hwmon1/pwm5=100
|
3
device/wnc/x86_64-wnc_osw1800-r0/installer.conf
Normal file
3
device/wnc/x86_64-wnc_osw1800-r0/installer.conf
Normal file
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x2f8
|
||||
CONSOLE_DEV=1
|
||||
CONSOLE_SPEED=57600
|
1761
device/wnc/x86_64-wnc_osw1800-r0/minigraph.xml
Normal file
1761
device/wnc/x86_64-wnc_osw1800-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
22
device/wnc/x86_64-wnc_osw1800-r0/plugins/eeprom.py
Normal file
22
device/wnc/x86_64-wnc_osw1800-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import exceptions
|
||||
import binascii
|
||||
import time
|
||||
import optparse
|
||||
import warnings
|
||||
import os
|
||||
import sys
|
||||
from sonic_eeprom import eeprom_base
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/class/i2c-adapter/i2c-8/8-0052/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
||||
|
64
device/wnc/x86_64-wnc_osw1800-r0/plugins/psuutil.py
Normal file
64
device/wnc/x86_64-wnc_osw1800-r0/plugins/psuutil.py
Normal file
@ -0,0 +1,64 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
def get_num_psus(self):
|
||||
return 2
|
||||
|
||||
def get_psu_status(self, index):
|
||||
if index == 1:
|
||||
psu_path = "/sys/bus/i2c/devices/6-0050/eeprom"
|
||||
elif index == 2:
|
||||
psu_path = "/sys/bus/i2c/devices/6-0051/eeprom"
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
data = open(psu_path, "rb")
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
result = int(data.read(1).encode("hex"), 16)
|
||||
data.close()
|
||||
|
||||
if result != 255 and result != 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
if index == 1:
|
||||
psu_path = "/sys/bus/i2c/devices/6-0050/eeprom"
|
||||
elif index == 2:
|
||||
psu_path = "/sys/bus/i2c/devices/6-0051/eeprom"
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
data = open(psu_path, "rb")
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
result = int(data.read(1).encode("hex"), 16)
|
||||
data.close()
|
||||
|
||||
if result != 255 and result != 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
205
device/wnc/x86_64-wnc_osw1800-r0/plugins/sfputil.py
Normal file
205
device/wnc/x86_64-wnc_osw1800-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,205 @@
|
||||
#! /usr/bin/python
|
||||
#
|
||||
# Platform-specific SFP transceiver interface for SONiC
|
||||
#
|
||||
|
||||
try:
|
||||
import time
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
import sys
|
||||
sys.path.append('/usr/lib/python2.7/dist-packages/sonic_sfp/')
|
||||
from sff8472 import sff8472InterfaceId
|
||||
from sff8472 import sff8472Dom
|
||||
from sff8436 import sff8436InterfaceId
|
||||
from sff8436 import sff8436Dom
|
||||
except ImportError, e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform-specific SfpUtil class"""
|
||||
|
||||
PORT_START = 0
|
||||
PORT_END = 53
|
||||
PORTS_IN_BLOCK = 54
|
||||
|
||||
EEPROM_OFFSET = 11
|
||||
|
||||
_port_to_eeprom_mapping = {}
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self.PORT_START
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self.PORT_END
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(self.PORT_START + 48, self.PORTS_IN_BLOCK)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
|
||||
|
||||
for x in range(0, self.port_end + 1):
|
||||
self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
|
||||
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_presence(self, port_num):
|
||||
bit_mask = port_num % 8
|
||||
|
||||
if port_num <= 7:
|
||||
presence_path = "/sys/bus/i2c/devices/3-0031/sfp_mod_abs1"
|
||||
elif 8 <= port_num and port_num <= 15:
|
||||
presence_path = "/sys/bus/i2c/devices/3-0031/sfp_mod_abs2"
|
||||
elif 16 <= port_num and port_num <= 23:
|
||||
presence_path = "/sys/bus/i2c/devices/3-0031/sfp_mod_abs3"
|
||||
elif 24 <= port_num and port_num <= 27:
|
||||
presence_path = "/sys/bus/i2c/devices/3-0031/sfp_mod_abs4"
|
||||
elif 28 <= port_num and port_num <= 31:
|
||||
presence_path = "/sys/bus/i2c/devices/4-0032/sfp_mod_abs1"
|
||||
bit_mask = bit_mask - 4
|
||||
elif 32 <= port_num and port_num <= 39:
|
||||
presence_path = "/sys/bus/i2c/devices/4-0032/sfp_mod_abs2"
|
||||
elif 40 <= port_num and port_num <= 47:
|
||||
presence_path = "/sys/bus/i2c/devices/4-0032/sfp_mod_abs3"
|
||||
elif 48 <= port_num and port_num <= 71:
|
||||
presence_path = "/sys/bus/i2c/devices/4-0032/qsfp_modprs"
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
reg_file = open(presence_path, "rb")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = reg_file.readline().rstrip()
|
||||
reg_value = int(content, 16)
|
||||
reg_file.close()
|
||||
|
||||
if reg_value & (1 << bit_mask) == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
if port_num in self.qsfp_ports:
|
||||
bit_mask = port_num % 8
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
reg_file = open("/sys/bus/i2c/devices/4-0032/qsfp_lpmode")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
|
||||
content = reg_file.readline().rstrip()
|
||||
reg_value = int(content, 16)
|
||||
reg_file.close()
|
||||
|
||||
if reg_value & (1 << bit_mask) == 0:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
if port_num in self.qsfp_ports:
|
||||
bit_mask = port_num % 8
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
reg_file = open("/sys/bus/i2c/devices/4-0032/qsfp_lpmode", "r+")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = reg_file.readline().rstrip()
|
||||
reg_value = int(content, 16)
|
||||
|
||||
if lpmode is True:
|
||||
reg_value = reg_value | (1 << bit_mask)
|
||||
else:
|
||||
reg_value = reg_value & ~(1 << bit_mask)
|
||||
|
||||
reg_file.seek(0)
|
||||
reg_file.write(str(reg_value))
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def reset(self, port_num):
|
||||
if port_num in self.qsfp_ports:
|
||||
bit_mask = (port_num % 8) + 2
|
||||
else:
|
||||
return False
|
||||
|
||||
try:
|
||||
reg_file = open("/sys/bus/i2c/devices/4-0032/reset_control", "r+")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = reg_file.readline().rstrip()
|
||||
reg_value = int(content, 16)
|
||||
reg_value = reg_value & ~(1 << bit_mask)
|
||||
|
||||
reg_file.seek(0)
|
||||
reg_file.write(str(reg_value))
|
||||
reg_file.close()
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
try:
|
||||
reg_file = open("/sys/bus/i2c/devices/4-0032/reset_control", "w")
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
reg_value = reg_value | (1 << bit_mask)
|
||||
reg_file.seek(0)
|
||||
reg_file.write(str(reg_value))
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def get_eeprom_dict(self, port_num):
|
||||
if not self.get_presence(port_num):
|
||||
return None
|
||||
|
||||
sfp_data = {}
|
||||
|
||||
eeprom_ifraw = self.get_eeprom_raw(port_num)
|
||||
eeprom_domraw = self.get_eeprom_dom_raw(port_num)
|
||||
|
||||
if eeprom_ifraw is None:
|
||||
return None
|
||||
|
||||
if port_num in self.qsfp_ports:
|
||||
sfpi_obj = sff8436InterfaceId(eeprom_ifraw)
|
||||
if sfpi_obj is not None:
|
||||
sfp_data['interface'] = sfpi_obj.get_data_pretty()
|
||||
|
||||
sfpd_obj = sff8436Dom(eeprom_ifraw)
|
||||
if sfpd_obj is not None:
|
||||
sfp_data['dom'] = sfpd_obj.get_data_pretty()
|
||||
return sfp_data
|
||||
|
||||
sfpi_obj = sff8472InterfaceId(eeprom_ifraw)
|
||||
if sfpi_obj is not None:
|
||||
sfp_data['interface'] = sfpi_obj.get_data_pretty()
|
||||
cal_type = sfpi_obj.get_calibration_type()
|
||||
|
||||
if eeprom_domraw is not None:
|
||||
sfpd_obj = sff8472Dom(eeprom_domraw, cal_type)
|
||||
if sfpd_obj is not None:
|
||||
sfp_data['dom'] = sfpd_obj.get_data_pretty()
|
||||
|
||||
return sfp_data
|
33
device/wnc/x86_64-wnc_osw1800-r0/sensors.conf
Normal file
33
device/wnc/x86_64-wnc_osw1800-r0/sensors.conf
Normal file
@ -0,0 +1,33 @@
|
||||
# libsensors configuration filei
|
||||
# --------------------------------------------------
|
||||
#
|
||||
|
||||
bus "i2c-7" "i2c-2-mux"
|
||||
chip "tmp421-i2c-7-1E"
|
||||
label temp1 "ts1"
|
||||
set temp1_max 50
|
||||
set temp1_max_hyst 25
|
||||
label temp2 "ts4"
|
||||
set temp2_max 50
|
||||
set temp2_max_hyst 25
|
||||
|
||||
chip "tmp75-i2c-7-4E"
|
||||
label temp1 "ts3"
|
||||
set temp1_max 50
|
||||
set temp1_max_hyst 25
|
||||
|
||||
chip "tmp421-i2c-7-4F"
|
||||
label temp1 "ts2"
|
||||
set temp1_max 50
|
||||
set temp1_max_hyst 25
|
||||
label temp2 "ts5"
|
||||
set temp2_max 50
|
||||
set temp2_max_hyst 25
|
||||
|
||||
bus "i2c-5" "i2c-2-mux"
|
||||
chip "wnc_cpld3-i2c-5-33"
|
||||
label fan1 "fan1"
|
||||
label fan2 "fan2"
|
||||
label fan3 "fan3"
|
||||
label fan4 "fan4"
|
||||
label fan5 "fan5"
|
1
dockers/docker-orchagent-bfn
Symbolic link
1
dockers/docker-orchagent-bfn
Symbolic link
@ -0,0 +1 @@
|
||||
docker-orchagent
|
@ -20,6 +20,8 @@ elif [ "$platform" == "cavium" ]; then
|
||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||
elif [ "$platform" == "nephos" ]; then
|
||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||
elif [ "$platform" == "barefoot" ]; then
|
||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||
fi
|
||||
|
||||
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
||||
|
38
dockers/docker-saiserver-bfn/Dockerfile
Executable file
38
dockers/docker-saiserver-bfn/Dockerfile
Executable file
@ -0,0 +1,38 @@
|
||||
FROM docker-base
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
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/iproute2_*.deb", "/deps/mlnx-sai_*.deb", "/deps/libthrift-0.9.3_*.deb", "/deps/libnl-3-200_*.deb", "/deps/libnl-genl-3-200_*.deb", "/deps/libnl-route-3-200_*.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/iproute2_*.deb \
|
||||
&& dpkg_apt /deps/mlnx-sai_*.deb \
|
||||
&& dpkg_apt /deps/libthrift-0.9.3_*.deb \
|
||||
&& dpkg_apt /deps/libnl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-route-3-200_*.deb
|
||||
|
||||
COPY ["deps/saiserver", "start.sh", "/usr/bin/"]
|
||||
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
COPY ["profile.ini", "portmap.ini", "/etc/sai/"]
|
||||
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /deps
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
33
dockers/docker-saiserver-bfn/portmap.ini
Normal file
33
dockers/docker-saiserver-bfn/portmap.ini
Normal file
@ -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
|
1
dockers/docker-saiserver-bfn/profile.ini
Normal file
1
dockers/docker-saiserver-bfn/profile.ini
Normal file
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sai_tofino.xml
|
2
dockers/docker-saiserver-bfn/sai_tofino.xml
Normal file
2
dockers/docker-saiserver-bfn/sai_tofino.xml
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
|
8
dockers/docker-saiserver-bfn/start.sh
Executable file
8
dockers/docker-saiserver-bfn/start.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm -f /var/run/rsyslogd.pid
|
||||
|
||||
supervisorctl start rsyslogd
|
||||
|
||||
supervisorctl start saiserver
|
||||
|
29
dockers/docker-saiserver-bfn/supervisord.conf
Normal file
29
dockers/docker-saiserver-bfn/supervisord.conf
Normal file
@ -0,0 +1,29 @@
|
||||
[supervisord]
|
||||
logfile_maxbytes=1MB
|
||||
logfile_backups=2
|
||||
nodaemon=true
|
||||
|
||||
[program:start.sh]
|
||||
command=/usr/bin/start.sh
|
||||
priority=1
|
||||
autostart=true
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:rsyslogd]
|
||||
command=/usr/sbin/rsyslogd -n
|
||||
priority=2
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:saiserver]
|
||||
command=/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini
|
||||
priority=3
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
@ -125,7 +125,7 @@ def
|
||||
{% endif %}
|
||||
|
||||
{%- if defs.generate_pg_profils is defined %}
|
||||
{{ defs.generate_pg_profils }},
|
||||
{{ defs.generate_pg_profils(port_names_active) }}
|
||||
{% else %}
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names_active }}|0-1": {
|
||||
|
@ -4,6 +4,17 @@ ifdown --force eth0
|
||||
|
||||
sonic-cfggen -d -t /usr/share/sonic/templates/interfaces.j2 > /etc/network/interfaces
|
||||
|
||||
# Add usb0 interface for bfn platforms
|
||||
platform=$(sonic-cfggen -H -v 'DEVICE_METADATA["localhost"]["platform"]')
|
||||
if [[ "$platform" == "x86_64-accton_wedge100bf_32x-r0" || "$platform" == "x86_64-accton_wedge100bf_65x-r0" ]]; then
|
||||
cat <<'EOF' >> /etc/network/interfaces
|
||||
# BMC interface
|
||||
auto usb0
|
||||
iface usb0 inet6 auto
|
||||
up ifconfig usb0 txqueuelen 64
|
||||
EOF
|
||||
fi
|
||||
|
||||
[ -f /var/run/dhclient.eth0.pid ] && kill `cat /var/run/dhclient.eth0.pid` && rm -f /var/run/dhclient.eth0.pid
|
||||
|
||||
systemctl restart networking
|
||||
|
@ -18,6 +18,7 @@ iface lo {{ 'inet' if prefix | ipv4 else 'inet6' }} static
|
||||
{% endfor %}
|
||||
{% endblock loopback %}
|
||||
{% block mgmt_interface %}
|
||||
|
||||
# The management network interface
|
||||
auto eth0
|
||||
{% if MGMT_INTERFACE %}
|
||||
|
5
platform/barefoot/bfn-platform-ingrasys.mk
Normal file
5
platform/barefoot/bfn-platform-ingrasys.mk
Normal file
@ -0,0 +1,5 @@
|
||||
BFN_INGRASYS_PLATFORM = bfnplatform-ingrasys_1.0.0_amd64.deb
|
||||
$(BFN_INGRASYS_PLATFORM)_URL = "https://github.com/Ingrasys-sonic/packages/raw/master/lib/bfnplatform-ingrasys_1.0.0_amd64.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BFN_INGRASYS_PLATFORM) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(BFN_INGRASYS_PLATFORM)
|
5
platform/barefoot/bfn-platform-wnc.mk
Normal file
5
platform/barefoot/bfn-platform-wnc.mk
Normal file
@ -0,0 +1,5 @@
|
||||
WNC_OSW1800_PLATFORM = bfnplatformwnc_1.0.0_amd64.deb
|
||||
$(WNC_OSW1800_PLATFORM)_URL = "https://github.com/YaoTien/download/raw/master/sonic/sde/7_0_0_18/bfnplatformwnc_1.0.0_amd64.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(WNC_OSW1800_PLATFORM) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(WNC_OSW1800_PLATFORM)
|
5
platform/barefoot/bfn-platform.mk
Normal file
5
platform/barefoot/bfn-platform.mk
Normal file
@ -0,0 +1,5 @@
|
||||
BFN_PLATFORM = bfnplatform_1.0.0_amd64.deb
|
||||
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_2/bfnplatform_1.0.0_amd64.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BFN_PLATFORM) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(BFN_PLATFORM)
|
5
platform/barefoot/bfn-sai.mk
Normal file
5
platform/barefoot/bfn-sai.mk
Normal file
@ -0,0 +1,5 @@
|
||||
BFN_SAI = bfnsdk_1.0.0_amd64.deb
|
||||
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_2/bfnsdk_1.0.0_amd64.deb"
|
||||
|
||||
SONIC_ONLINE_DEBS += $(BFN_SAI) # $(BFN_SAI_DEV)
|
||||
$(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI)
|
19
platform/barefoot/docker-orchagent-bfn.mk
Normal file
19
platform/barefoot/docker-orchagent-bfn.mk
Normal file
@ -0,0 +1,19 @@
|
||||
# docker image for orchagent
|
||||
|
||||
DOCKER_ORCHAGENT_BFN = docker-orchagent-bfn.gz
|
||||
$(DOCKER_ORCHAGENT_BFN)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||
$(DOCKER_ORCHAGENT_BFN)_DEPENDS += $(SWSS) $(REDIS_TOOLS)
|
||||
$(DOCKER_ORCHAGENT_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||
|
||||
$(DOCKER_ORCHAGENT_BFN)_CONTAINER_NAME = swss
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT_BFN)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT_BFN)_FILES += $(ARP_UPDATE_SCRIPT)
|
5
platform/barefoot/docker-ptf-bfn.mk
Normal file
5
platform/barefoot/docker-ptf-bfn.mk
Normal file
@ -0,0 +1,5 @@
|
||||
# docker image for docker-ptf
|
||||
|
||||
DOCKER_PTF_BFN = docker-ptf-bfn.gz
|
||||
$(DOCKER_PTF_BFN)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift
|
||||
$(DOCKER_PTF_BFN)_LOAD_DOCKERS += $(DOCKER_PTF)
|
15
platform/barefoot/docker-syncd-bfn-rpc.mk
Normal file
15
platform/barefoot/docker-syncd-bfn-rpc.mk
Normal file
@ -0,0 +1,15 @@
|
||||
# docker image for syncd with rpc
|
||||
|
||||
DOCKER_SYNCD_BFN_RPC = docker-syncd-bfn-rpc.gz
|
||||
$(DOCKER_SYNCD_BFN_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn-rpc
|
||||
$(DOCKER_SYNCD_BFN_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
|
||||
$(DOCKER_SYNCD_BFN_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BFN)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC)
|
||||
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
52
platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Normal file
52
platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Normal file
@ -0,0 +1,52 @@
|
||||
FROM docker-syncd-bfn
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_bfn_rpc_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -P syncd
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||
{% for deb in docker_syncd_bfn_rpc_debs.split(' ') -%}
|
||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||
{%- endfor %}
|
||||
|
||||
## Pre-install the fundamental packages
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install \
|
||||
net-tools \
|
||||
python-pip \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
python-dev \
|
||||
wget \
|
||||
cmake \
|
||||
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
|
||||
&& tar xvfz 1.0.0.tar.gz \
|
||||
&& cd nanomsg-1.0.0 \
|
||||
&& mkdir -p build \
|
||||
&& cmake . \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& cd .. \
|
||||
&& rm -fr nanomsg-1.0.0 \
|
||||
&& rm -f 1.0.0.tar.gz \
|
||||
&& pip install cffi==1.7.0 \
|
||||
&& pip install --upgrade cffi==1.7.0 \
|
||||
&& pip install nnpy \
|
||||
&& mkdir -p /opt \
|
||||
&& cd /opt \
|
||||
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
|
||||
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
|
||||
&& rm -rf /root/deps
|
||||
|
||||
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
10
platform/barefoot/docker-syncd-bfn-rpc/ptf_nn_agent.conf
Normal file
10
platform/barefoot/docker-syncd-bfn-rpc/ptf_nn_agent.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[program:ptf_nn_agent]
|
||||
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400
|
||||
process_name=ptf_nn_agent
|
||||
stdout_logfile=/tmp/ptf_nn_agent.out.log
|
||||
stderr_logfile=/tmp/ptf_nn_agent.err.log
|
||||
redirect_stderr=false
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=1
|
||||
numprocs=1
|
15
platform/barefoot/docker-syncd-bfn.mk
Normal file
15
platform/barefoot/docker-syncd-bfn.mk
Normal file
@ -0,0 +1,15 @@
|
||||
# docker image for syncd
|
||||
|
||||
DOCKER_SYNCD_BFN = docker-syncd-bfn.gz
|
||||
$(DOCKER_SYNCD_BFN)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn
|
||||
$(DOCKER_SYNCD_BFN)_DEPENDS += $(SYNCD)
|
||||
$(DOCKER_SYNCD_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||
endif
|
||||
|
||||
$(DOCKER_SYNCD_BFN)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
29
platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Executable file
29
platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Executable file
@ -0,0 +1,29 @@
|
||||
FROM docker-config-engine
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_syncd_bfn_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN apt-get install -y libxml2 libpcap-dev libusb-1.0-0-dev libcurl3 libcurl4-gnutls-dev libunwind8-dev
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_syncd_bfn_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor %}
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||
|
9
platform/barefoot/docker-syncd-bfn/start.sh
Executable file
9
platform/barefoot/docker-syncd-bfn/start.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm -f /var/run/rsyslogd.pid
|
||||
|
||||
supervisorctl start rsyslogd
|
||||
|
||||
. /opt/bfn/install/bin/dma_setup.sh
|
||||
# . /opt/bfn/install/bin/bf_kdrv_mod_load /opt/bfn/install
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/bfn/install/lib supervisorctl start syncd
|
29
platform/barefoot/docker-syncd-bfn/supervisord.conf
Normal file
29
platform/barefoot/docker-syncd-bfn/supervisord.conf
Normal file
@ -0,0 +1,29 @@
|
||||
[supervisord]
|
||||
logfile_maxbytes=1MB
|
||||
logfile_backups=2
|
||||
nodaemon=true
|
||||
|
||||
[program:start.sh]
|
||||
command=/usr/bin/start.sh
|
||||
priority=1
|
||||
autostart=true
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:rsyslogd]
|
||||
command=/usr/sbin/rsyslogd -n
|
||||
priority=2
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:syncd]
|
||||
command=/usr/bin/syncd_start.sh
|
||||
priority=3
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
7
platform/barefoot/libsaithrift-dev.mk
Normal file
7
platform/barefoot/libsaithrift-dev.mk
Normal file
@ -0,0 +1,7 @@
|
||||
# libsaithrift-dev package
|
||||
|
||||
LIBSAITHRIFT_DEV_BFN = libsaithrift-dev_0.9.4_amd64.deb
|
||||
$(LIBSAITHRIFT_DEV_BFN)_SRC_PATH = $(SRC_PATH)/SAI
|
||||
$(LIBSAITHRIFT_DEV_BFN)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BFN_SAI) $(BFN_SAI_DEV)
|
||||
$(LIBSAITHRIFT_DEV_BFN)_RDEPENDS += $(LIBTHRIFT) $(BFN_SAI)
|
||||
#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BFN)
|
11
platform/barefoot/one-image.mk
Normal file
11
platform/barefoot/one-image.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# sonic one image installer
|
||||
|
||||
SONIC_ONE_IMAGE = sonic-barefoot.bin
|
||||
$(SONIC_ONE_IMAGE)_MACHINE = barefoot
|
||||
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||
$(SONIC_ONE_IMAGE)_INSTALLS += $(BFN_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
|
||||
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
11
platform/barefoot/platform-modules-bfn-montara.mk
Normal file
11
platform/barefoot/platform-modules-bfn-montara.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# BFN Platform modules
|
||||
|
||||
BFN_MONTARA_PLATFORM_MODULE_VERSION = 1.0
|
||||
|
||||
export BFN_MONTARA_PLATFORM_MODULE_VERSION
|
||||
|
||||
BFN_MONTARA_PLATFORM_MODULE = platform-modules-bfn-montara_$(BFN_MONTARA_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(BFN_MONTARA_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn-montara
|
||||
$(BFN_MONTARA_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(BFN_MONTARA_PLATFORM_MODULE)_PLATFORM = x86_64-accton_wedge100bf_32x-r0
|
||||
SONIC_DPKG_DEBS += $(BFN_MONTARA_PLATFORM_MODULE)
|
11
platform/barefoot/platform-modules-bfn.mk
Normal file
11
platform/barefoot/platform-modules-bfn.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# BFN Platform modules
|
||||
|
||||
BFN_PLATFORM_MODULE_VERSION = 1.0
|
||||
|
||||
export BFN_PLATFORM_MODULE_VERSION
|
||||
|
||||
BFN_PLATFORM_MODULE = platform-modules-bfn_$(BFN_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(BFN_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn
|
||||
$(BFN_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(BFN_PLATFORM_MODULE)_PLATFORM = x86_64-accton_wedge100bf_65x-r0
|
||||
SONIC_DPKG_DEBS += $(BFN_PLATFORM_MODULE)
|
11
platform/barefoot/platform-modules-ingrasys.mk
Normal file
11
platform/barefoot/platform-modules-ingrasys.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# Ingrasys S9180-32X Platform modules
|
||||
|
||||
INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION = 1.1.0
|
||||
|
||||
export INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION
|
||||
|
||||
INGRASYS_S9180_32X_PLATFORM_MODULE = sonic-platform-ingrasys-s9180-32x_$(INGRASYS_S9180_32X_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ingrasys
|
||||
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(INGRASYS_S9180_32X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9180_32x-r0
|
||||
SONIC_DPKG_DEBS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
|
11
platform/barefoot/platform-modules-wnc-osw1800.mk
Normal file
11
platform/barefoot/platform-modules-wnc-osw1800.mk
Normal file
@ -0,0 +1,11 @@
|
||||
# BFN Platform modules
|
||||
|
||||
WNC_OSW1800_PLATFORM_MODULE_VERSION = 1.0
|
||||
|
||||
export WNC_OSW1800_PLATFORM_MODULE_VERSION
|
||||
|
||||
WNC_OSW1800_PLATFORM_MODULE = platform-modules-wnc-osw1800_$(WNC_OSW1800_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||
$(WNC_OSW1800_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-wnc-osw1800
|
||||
$(WNC_OSW1800_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||
$(WNC_OSW1800_PLATFORM_MODULE)_PLATFORM = x86_64-wnc_osw1800-r0
|
||||
SONIC_DPKG_DEBS += $(WNC_OSW1800_PLATFORM_MODULE)
|
0
platform/barefoot/platform.conf
Normal file
0
platform/barefoot/platform.conf
Normal file
6
platform/barefoot/python-saithrift.mk
Normal file
6
platform/barefoot/python-saithrift.mk
Normal file
@ -0,0 +1,6 @@
|
||||
# python-saithrift package
|
||||
|
||||
PYTHON_SAITHRIFT_BFN = python-saithrift_0.9.4_amd64.deb
|
||||
$(PYTHON_SAITHRIFT_BFN)_SRC_PATH = $(SRC_PATH)/SAI
|
||||
$(PYTHON_SAITHRIFT_BFN)_DEPENDS += $(BFN_SAI_DEV) $(BFN_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
|
||||
#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BFN)
|
23
platform/barefoot/rules.mk
Normal file
23
platform/barefoot/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
include $(PLATFORM_PATH)/platform-modules-bfn.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-bfn-montara.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-wnc-osw1800.mk
|
||||
include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
|
||||
include $(PLATFORM_PATH)/bfn-sai.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-bfn.mk
|
||||
include $(PLATFORM_PATH)/docker-syncd-bfn-rpc.mk
|
||||
include $(PLATFORM_PATH)/docker-orchagent-bfn.mk
|
||||
include $(PLATFORM_PATH)/one-image.mk
|
||||
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||
include $(PLATFORM_PATH)/python-saithrift.mk
|
||||
include $(PLATFORM_PATH)/docker-ptf-bfn.mk
|
||||
include $(PLATFORM_PATH)/bfn-platform.mk
|
||||
include $(PLATFORM_PATH)/bfn-platform-wnc.mk
|
||||
include $(PLATFORM_PATH)/bfn-platform-ingrasys.mk
|
||||
SONIC_ALL += $(SONIC_ONE_IMAGE) \
|
||||
$(DOCKER_FPM)
|
||||
|
||||
# Inject sai into sairedis
|
||||
$(LIBSAIREDIS)_DEPENDS += $(BFN_SAI) $(WNC_OSW1800_PLATFORM) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM) #$(LIBSAITHRIFT_DEV_BFN)
|
||||
|
||||
# Runtime dependency on sai is set only for syncd
|
||||
$(SYNCD)_RDEPENDS += $(BFN_SAI) $(WNC_OSW1800_PLATFORM) $(BFN_INGRASYS_PLATFORM) $(BFN_PLATFORM)
|
15
platform/barefoot/sonic-platform-modules-bfn-montara/LICENSE
Normal file
15
platform/barefoot/sonic-platform-modules-bfn-montara/LICENSE
Normal file
@ -0,0 +1,15 @@
|
||||
Copyright (C) 2016 Microsoft, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -0,0 +1,3 @@
|
||||
# This file describes the maintainers for sonic-platform-modules-bfn
|
||||
# See the SONiC project governance document for more information
|
||||
Mailinglist = sonicproject@googlegroups.com
|
@ -0,0 +1,2 @@
|
||||
# sonic-platform-modules-bfn
|
||||
Device drivers for support of BFN platform for the SONiC project
|
@ -0,0 +1,5 @@
|
||||
platform-modules-bfn-montara (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Support <support@edge-core.com> Mon, 11 Nov 2015 11:11:11 -0800
|
@ -0,0 +1 @@
|
||||
8
|
@ -0,0 +1,12 @@
|
||||
Source: platform-modules-bfn-montara
|
||||
Section: main
|
||||
Priority: extra
|
||||
Maintainer: Support <support@edge-core.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||
Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-bfn-montara
|
||||
Architecture: amd64
|
||||
Depends: linux-image-3.16.0-5-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
@ -0,0 +1,15 @@
|
||||
Provides linux kernel driver for BF PCIe devices
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
32
platform/barefoot/sonic-platform-modules-bfn-montara/debian/rules
Executable file
32
platform/barefoot/sonic-platform-modules-bfn-montara/debian/rules
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export INSTALL_MOD_DIR:=extra
|
||||
|
||||
PACKAGE_NAME := platform-modules-bfn-montara
|
||||
KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MODULE_SRC := $(shell pwd)/modules
|
||||
SCRIPT_SRC := $(shell pwd)/scripts
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
|
||||
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
override_dh_pysupport:
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
|
||||
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
|
||||
rm -rf $(MODULE_SRC)/.tmp_versions
|
||||
|
@ -0,0 +1 @@
|
||||
../../sonic-platform-modules-bfn/modules/Makefile
|
@ -0,0 +1 @@
|
||||
../../sonic-platform-modules-bfn/modules/bf_kdrv.c
|
@ -0,0 +1 @@
|
||||
../../sonic-platform-modules-bfn/modules/bf_tun.c
|
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom
Executable file
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/eeprom
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd eeprom "$@"
|
11
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol
Executable file
11
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/fancontrol
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd fancontrol "$@"
|
||||
|
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info
Executable file
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/ps_info
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd ps_info "$@"
|
12
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors
Executable file
12
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sensors
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd sensors "$@"
|
||||
|
||||
|
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil
Executable file
10
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/sfputil
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd sfputil "$@"
|
1
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/test
Executable file
1
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/test
Executable file
@ -0,0 +1 @@
|
||||
echo "test"
|
15
platform/barefoot/sonic-platform-modules-bfn/LICENSE
Normal file
15
platform/barefoot/sonic-platform-modules-bfn/LICENSE
Normal file
@ -0,0 +1,15 @@
|
||||
Copyright (C) 2016 Microsoft, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
4
platform/barefoot/sonic-platform-modules-bfn/MAINTAINERS
Normal file
4
platform/barefoot/sonic-platform-modules-bfn/MAINTAINERS
Normal file
@ -0,0 +1,4 @@
|
||||
# This file describes the maintainers for sonic-platform-modules-bfn
|
||||
# See the SONiC project governance document for more information
|
||||
|
||||
Mailinglist = sonicproject@googlegroups.com
|
2
platform/barefoot/sonic-platform-modules-bfn/README.md
Normal file
2
platform/barefoot/sonic-platform-modules-bfn/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# sonic-platform-modules-bfn
|
||||
Device drivers for support of BFN platform for the SONiC project
|
@ -0,0 +1,5 @@
|
||||
platform-modules-bfn (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Support <support@edge-core.com> Mon, 11 Nov 2015 11:11:11 -0800
|
@ -0,0 +1 @@
|
||||
8
|
12
platform/barefoot/sonic-platform-modules-bfn/debian/control
Normal file
12
platform/barefoot/sonic-platform-modules-bfn/debian/control
Normal file
@ -0,0 +1,12 @@
|
||||
Source: platform-modules-bfn
|
||||
Section: main
|
||||
Priority: extra
|
||||
Maintainer: support <support@edge-core.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||
Standards-Version: 3.9.3
|
||||
|
||||
Package: platform-modules-bfn
|
||||
Architecture: amd64
|
||||
Depends: linux-image-3.16.0-5-amd64
|
||||
Description: kernel modules for platform devices such as fan, led, sfp
|
||||
|
@ -0,0 +1,15 @@
|
||||
Provides linux kernel driver for BF PCIe devices
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -0,0 +1 @@
|
||||
platform-modules-bfn_1.0_amd64.deb main extra
|
32
platform/barefoot/sonic-platform-modules-bfn/debian/rules
Executable file
32
platform/barefoot/sonic-platform-modules-bfn/debian/rules
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export INSTALL_MOD_DIR:=extra
|
||||
|
||||
PACKAGE_NAME := platform-modules-bfn
|
||||
KVERSION ?= $(shell uname -r)
|
||||
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||
MODULE_SRC := $(shell pwd)/modules
|
||||
SCRIPT_SRC := $(shell pwd)/scripts
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
|
||||
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
override_dh_pysupport:
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
|
||||
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
|
||||
rm -rf $(MODULE_SRC)/.tmp_versions
|
||||
|
@ -0,0 +1,2 @@
|
||||
obj-m := bf_kdrv.o
|
||||
obj-m += bf_tun.o
|
1254
platform/barefoot/sonic-platform-modules-bfn/modules/bf_kdrv.c
Normal file
1254
platform/barefoot/sonic-platform-modules-bfn/modules/bf_kdrv.c
Normal file
File diff suppressed because it is too large
Load Diff
2396
platform/barefoot/sonic-platform-modules-bfn/modules/bf_tun.c
Normal file
2396
platform/barefoot/sonic-platform-modules-bfn/modules/bf_tun.c
Normal file
File diff suppressed because it is too large
Load Diff
10
platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom
Executable file
10
platform/barefoot/sonic-platform-modules-bfn/scripts/eeprom
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd eeprom "$@"
|
11
platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol
Executable file
11
platform/barefoot/sonic-platform-modules-bfn/scripts/fancontrol
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOCKER_EXEC_FLAGS="i"
|
||||
|
||||
# Determine whether stdout is on a terminal
|
||||
if [ -t 1 ] ; then
|
||||
DOCKER_EXEC_FLAGS+="t"
|
||||
fi
|
||||
|
||||
docker exec -$DOCKER_EXEC_FLAGS syncd fancontrol "$@"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user