From 0a4c8884efc96cce98404ec96ffd684bebeb69f0 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Tue, 19 Dec 2017 20:26:45 +0200 Subject: [PATCH 001/254] [sonic-py-swsssdk]: Update submodule pointer (#1253) Include commit that makes sdk compatible with python3.6 Signed-off-by: marian-pritsak --- src/sonic-py-swsssdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index 1c7a6b44964..a0418a15a46 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit 1c7a6b4496440a8a9e7e2ab314564ce8e26aa378 +Subproject commit a0418a15a46e20c3d8fcd7c8cf2bb6ab0a4aafaf From f0d59cb00299401e66015edb90744235a474b46b Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 19 Dec 2017 10:28:45 -0800 Subject: [PATCH 002/254] [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 --- ...ion-82-circuit-ID-and-remote-ID-fiel.patch | 65 ++++++++++--------- ...ining-name-of-physical-interface-tha.patch | 6 +- ...ing-port-alias-map-file-to-replace-p.patch | 34 ++++++---- 3 files changed, 61 insertions(+), 44 deletions(-) diff --git a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index 4d47c8185ec..22a8f7faedd 100644 --- a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -1,14 +1,14 @@ -From 42319f1b56ba6362c874cd64383a055ba6498bee Mon Sep 17 00:00:00 2001 +From 284c87ff4b3873d0215904273fe3c86b07b4ba94 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:21:08 +0000 Subject: [PATCH 1/3] Customizable Option 82 circuit ID and remote ID fields --- - relay/dhcrelay.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 147 insertions(+), 25 deletions(-) + relay/dhcrelay.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 152 insertions(+), 30 deletions(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 15b4997..a26efca 100644 +index 15b4997..b9f8326 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -73,6 +73,8 @@ int bad_circuit_id = 0; /* Circuit ID option in matching RAI option @@ -158,9 +158,12 @@ index 15b4997..a26efca 100644 * Examine a packet to see if it's a candidate to have a Relay * Agent Information option tacked onto its tail. If it is, tack * the option on. -@@ -948,6 +1044,9 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, +@@ -946,8 +1042,11 @@ static int + add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, + unsigned length, struct in_addr giaddr) { int is_dhcp = 0, mms; - unsigned optlen; +- unsigned optlen; ++ unsigned optlen = 0; u_int8_t *op, *nextop, *sp, *max, *end_pad = NULL; + char circuit_id_buf[256] = { '\0' }; + char remote_id_buf[256] = { '\0' }; @@ -177,16 +180,32 @@ index 15b4997..a26efca 100644 - log_fatal("Circuit ID length %d out of range [1-255] on " - "%s\n", ip->circuit_id_len, ip->name); - optlen = ip->circuit_id_len + 2; /* RAI_CIRCUIT_ID + len */ +- +- if (ip->remote_id) { +- if (ip->remote_id_len > 255 || ip->remote_id_len < 1) +- log_fatal("Remote ID length %d out of range [1-255] " +- "on %s\n", ip->circuit_id_len, ip->name); +- optlen += ip->remote_id_len + 2; /* RAI_REMOTE_ID + len */ +- } + /* option82: custom string for circuit_id */ + if (agent_circuit_id_fmt) { + circuit_id_len = format_relay_agent_rfc3046_msg(ip, packet, agent_circuit_id_fmt, + circuit_id_buf, sizeof(circuit_id_buf)); + -+ if (circuit_id_len == 0) ++ if (circuit_id_len == 0) { + strncpy(circuit_id_buf, ip->name, sizeof(ip->name)); ++ circuit_id_len = strlen(circuit_id_buf); ++ } ++ ++ /* Sanity check. Had better not ever happen. */ ++ if (circuit_id_len > 255 || circuit_id_len < 1) ++ log_fatal("Circuit ID length %d out of range [1-255] on %s\n", ++ (int)circuit_id_len, ip->name); ++ ++ optlen = circuit_id_len + 2; // RAI_CIRCUIT_ID + len + + //log_debug("Sending on %s option82:circuit_id='%s' (%d)", -+ // ip->name, circuit_id_buf, circuit_id_len); ++ // ip->name, circuit_id_buf, (int)circuit_id_len); + } + + /* option82: custom string for remote_id */ @@ -194,28 +213,15 @@ index 15b4997..a26efca 100644 + remote_id_len = format_relay_agent_rfc3046_msg(ip, packet, agent_remote_id_fmt, + remote_id_buf, sizeof(remote_id_buf)); + -+ //log_debug("Sending on %s option82:remote_id='%s' (%d)", -+ // ip->name, remote_id_buf, remote_id_len); -+ } ++ if (remote_id_len > 255 || remote_id_len < 1) ++ log_fatal("Remote ID length %d out of range [1-255] on %s\n", ++ (int)remote_id_len, ip->name); + -+ /* Sanity check. Had better not ever happen. */ -+ if (circuit_id_len > 255 || circuit_id_len < 1) -+ log_fatal("Circuit ID length %d out of range [1-255] on %s\n", -+ circuit_id_len, ip->name); ++ optlen += remote_id_len + 2; // RAI_REMOTE_ID + len + -+ optlen = circuit_id_len + 2; // RAI_CIRCUIT_ID + len - - if (ip->remote_id) { -- if (ip->remote_id_len > 255 || ip->remote_id_len < 1) -- log_fatal("Remote ID length %d out of range [1-255] " -- "on %s\n", ip->circuit_id_len, ip->name); -- optlen += ip->remote_id_len + 2; /* RAI_REMOTE_ID + len */ -+ if (remote_id_len > 255 || remote_id_len < 1) -+ log_fatal("Remote ID length %d out of range [1-255] on %s\n", -+ remote_id_len, ip->name); -+ -+ optlen += remote_id_len + 2; // RAI_REMOTE_ID + len - } ++ //log_debug("Sending on %s option82:remote_id='%s' (%d)", ++ // ip->name, remote_id_buf, (int)remote_id_len); ++ } - /* We do not support relay option fragmenting(multiple options to - * support an option data exceeding 255 bytes). @@ -250,7 +256,8 @@ index 15b4997..a26efca 100644 + sp += circuit_id_len; /* Copy in remote ID... */ - if (ip->remote_id) { +- if (ip->remote_id) { ++ if (remote_id_len > 0) { *sp++ = RAI_REMOTE_ID; - *sp++ = ip->remote_id_len; - memcpy(sp, ip->remote_id, ip->remote_id_len); diff --git a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch b/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch index 87c9ba266cb..ee85a773628 100644 --- a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch +++ b/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch @@ -1,4 +1,4 @@ -From 18ca48b7c307e1644f653df4c8503f4ce2677f62 Mon Sep 17 00:00:00 2001 +From caad3e05c31c9fad8cda378ce95a1969def771a2 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:39:10 +0000 Subject: [PATCH 2/3] Support for obtaining name of physical interface that is @@ -9,7 +9,7 @@ Subject: [PATCH 2/3] Support for obtaining name of physical interface that is 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index a26efca..84ec79d 100644 +index b9f8326..8458ea9 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -758,6 +758,7 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet, @@ -63,7 +63,7 @@ index a26efca..84ec79d 100644 + if (cmd != NULL) { + while (fgets(buf, sizeof(buf), cmd)) { + sscanf(buf, FDB_LINE_FORMAT, macAddr, interface, vlanid); -+ //log_debug("bridgefdbquery: macAddr:%s interface: %s vlanid %d", ++ //log_debug("bridgefdbquery: macAddr: %s interface: %s vlanid: %d", + // macAddr, interface, *vlanid); + } + pclose(cmd); diff --git a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch index 216abf5ba7b..7411e1c4ff3 100644 --- a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -1,15 +1,15 @@ -From 3be065305283b90ddfef92a8736221cbf7cf06e0 Mon Sep 17 00:00:00 2001 +From 3a42b497716375c9347b51c3a28c5e91e7cd4cf4 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 12 Dec 2017 00:49:09 +0000 -Subject: [PATCH 3/3] Support for loading port alias map file to replace - port name with alias in circuit id +Subject: [PATCH 3/3] Support for loading port alias map file to replace port + name with alias in circuit id --- - relay/dhcrelay.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 102 insertions(+), 1 deletion(-) + relay/dhcrelay.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 84ec79d..0b56e2d 100644 +index 8458ea9..15f0acf 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -122,6 +122,14 @@ static void setup_streams(void); @@ -81,24 +81,34 @@ index 84ec79d..0b56e2d 100644 return (0); } -@@ -1056,6 +1077,16 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack +@@ -1040,6 +1061,7 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack + */ + if (packet->htype && !packet->giaddr.s_addr) { + int ret = 0, vlanid = 0; ++ char ifalias[IFNAMSIZ] = { 0 }; + + ret = _bridgefdbquery(print_hw_addr(packet->htype, packet->hlen, packet->chaddr), + ifname, +@@ -1056,6 +1078,18 @@ format_relay_agent_rfc3046_msg(const struct interface_info *ip, struct dhcp_pack strncpy(ifname, ip->name, IFNAMSIZ); } + // Attempt to translate SONiC interface name to vendor alias -+ if (get_interface_alias_by_name(ip->name, ifname) < 0) { -+ //log_debug("Failed to retrieve alias for interface name '%s'. Defaulting to interface name.", ip->name); -+ strncpy(ifname, ip->name, IFNAMSIZ); ++ ret = get_interface_alias_by_name(ifname, ifalias); ++ if (ret < 0) { ++ //log_debug("Failed to retrieve alias for interface name '%s'. Defaulting to interface name.", ifname); + } + else { + //log_debug("Mapped interface name '%s' to alias '%s'. Adding as option 82 interface alias for MAC Address %s", -+ // ip->name, ifname, print_hw_addr (packet->htype, packet->hlen, packet->chaddr), ++ // ifname, ifalias, print_hw_addr (packet->htype, packet->hlen, packet->chaddr)); ++ ++ strncpy(ifname, ifalias, IFNAMSIZ); + } + str = ifname; } break; -@@ -1922,3 +1953,73 @@ dhcp_set_control_state(control_object_state_t oldstate, +@@ -1922,3 +1956,73 @@ dhcp_set_control_state(control_object_state_t oldstate, exit(0); } From 6e05b670700d8afd8c33f7df03cd5041f297db81 Mon Sep 17 00:00:00 2001 From: Phil Huang Date: Wed, 20 Dec 2017 07:41:48 +0800 Subject: [PATCH 003/254] [device/accton] Correct exception function name (#1249) NotImplementedErro(r) Signed-off-by: Phil Huang --- device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py index 1f2a66d64cc..2e636292bfa 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py @@ -83,10 +83,10 @@ def reset(self, port_num): return True def set_low_power_mode(self, port_nuM, lpmode): - raise NotImplementedErro + raise NotImplementedError def get_low_power_mode(self, port_num): - raise NotImplementedErro + raise NotImplementedError def get_presence(self, port_num): # Check for invalid port_num From ab2d066a4ddf4456b7946a504f29fde9889273a9 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Wed, 20 Dec 2017 02:02:26 +0200 Subject: [PATCH 004/254] [snmp]: Save S/N in state DB prior to starting service (#1246) snmp.service needs to read chassis serial number for one of its mibs. We save this value in state DB so that it is accessible from container. Signed-off-by: marian-pritsak --- files/build_templates/docker_image_ctl.j2 | 3 +++ files/build_templates/snmp.service.j2 | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index a7aee83c70e..628964ec7b6 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -17,6 +17,9 @@ function postStartAction() sleep 1 done {%- endif %} +{%- if docker_container_name == "snmp" %} + docker exec -i database redis-cli -n 6 HSET 'DEVICE_METADATA|localhost' chassis_serial_number $(decode-syseeprom -s) +{%- endif %} } # Obtain our platform as we will mount directories with these names in each docker diff --git a/files/build_templates/snmp.service.j2 b/files/build_templates/snmp.service.j2 index 08c41a52a5f..0c1558ad64a 100644 --- a/files/build_templates/snmp.service.j2 +++ b/files/build_templates/snmp.service.j2 @@ -4,7 +4,6 @@ Requires=database.service swss.service After=database.service swss.service [Service] -User={{ sonicadmin_user }} ExecStartPre=/usr/bin/{{docker_container_name}}.sh start ExecStart=/usr/bin/{{docker_container_name}}.sh attach ExecStop=/usr/bin/{{docker_container_name}}.sh stop From 64602ad5b2294f2e1de6b0f1f1761fb7697b21a7 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 20 Dec 2017 11:22:08 -0800 Subject: [PATCH 005/254] [DHCP relay]: Add patch to always undef VLAN_TCI_PRESENT so as not to treat VLAN-tagged packets differently (#1254) --- ...N_TCI_PRESENT-so-as-not-to-treat-VLA.patch | 30 +++++++++++++++++++ ...on-82-circuit-ID-and-remote-ID-fiel.patch} | 4 +-- ...ning-name-of-physical-interface-tha.patch} | 4 +-- ...ng-port-alias-map-file-to-replace-p.patch} | 4 +-- src/isc-dhcp/patch/series | 7 +++-- 5 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch rename src/isc-dhcp/patch/{0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch => 0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch} (98%) rename src/isc-dhcp/patch/{0002-Support-for-obtaining-name-of-physical-interface-tha.patch => 0003-Support-for-obtaining-name-of-physical-interface-tha.patch} (96%) rename src/isc-dhcp/patch/{0003-Support-for-loading-port-alias-map-file-to-replace-p.patch => 0004-Support-for-loading-port-alias-map-file-to-replace-p.patch} (98%) diff --git a/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch b/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch new file mode 100644 index 00000000000..f5afc5692a5 --- /dev/null +++ b/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch @@ -0,0 +1,30 @@ +From 7fe46584c3d9cb6b1ecdee47ff5ac2b777f96ec6 Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Wed, 20 Dec 2017 02:18:10 +0000 +Subject: [PATCH 1/4] Always undef VLAN_TCI_PRESENT so as not to treat + VLAN-tagged packets differently + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3f1415b..fcfeba0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -600,9 +600,9 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,, + #include + ]) + +-AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, +- [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] +- ,, [#include ]) ++#AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, ++# [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] ++# ,, [#include ]) + + libbind= + AC_ARG_WITH(libbind, +-- +2.1.4 + diff --git a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch similarity index 98% rename from src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch rename to src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index 22a8f7faedd..33197a80b0e 100644 --- a/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -1,7 +1,7 @@ -From 284c87ff4b3873d0215904273fe3c86b07b4ba94 Mon Sep 17 00:00:00 2001 +From c2361e2bf24408cc21a4691c3897cc64c95372f1 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:21:08 +0000 -Subject: [PATCH 1/3] Customizable Option 82 circuit ID and remote ID fields +Subject: [PATCH 2/4] Customizable Option 82 circuit ID and remote ID fields --- relay/dhcrelay.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++--------- diff --git a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch similarity index 96% rename from src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch rename to src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch index ee85a773628..7d9169dc67a 100644 --- a/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch +++ b/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch @@ -1,7 +1,7 @@ -From caad3e05c31c9fad8cda378ce95a1969def771a2 Mon Sep 17 00:00:00 2001 +From 236d4f1cb0afa2bee22f47a48b725427bfcb5a9c Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:39:10 +0000 -Subject: [PATCH 2/3] Support for obtaining name of physical interface that is +Subject: [PATCH 3/4] Support for obtaining name of physical interface that is a member of a bridge interface --- diff --git a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch similarity index 98% rename from src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch rename to src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch index 7411e1c4ff3..1d42e9838f9 100644 --- a/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -1,7 +1,7 @@ -From 3a42b497716375c9347b51c3a28c5e91e7cd4cf4 Mon Sep 17 00:00:00 2001 +From 1092578a8415b9d49182c2b9825753e96481246a Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 12 Dec 2017 00:49:09 +0000 -Subject: [PATCH 3/3] Support for loading port alias map file to replace port +Subject: [PATCH 4/4] Support for loading port alias map file to replace port name with alias in circuit id --- diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index a896563077c..980b9b97e34 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -1,4 +1,5 @@ # This series applies on GIT commit ee3dffdda38a8cfc6ad2005d8d64a165d2a709ba -0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch -0002-Support-for-obtaining-name-of-physical-interface-tha.patch -0003-Support-for-loading-port-alias-map-file-to-replace-p.patch +0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch +0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +0003-Support-for-obtaining-name-of-physical-interface-tha.patch +0004-Support-for-loading-port-alias-map-file-to-replace-p.patch From b57cfd72957ade0056406b083e7a2a64c78d1038 Mon Sep 17 00:00:00 2001 From: yurypm Date: Wed, 20 Dec 2017 22:05:23 +0000 Subject: [PATCH 006/254] [arista] Delete sysfs entries for all Arista Digital Power Monitor/Management devices (#1256) * Bump sonic-platform-modules-arista submodule * [arista] Remove DPM entries from Arista sensors.conf files --- device/arista/x86_64-arista_7050_qx32s/sensors.conf | 8 -------- device/arista/x86_64-arista_7060_cx32s/sensors.conf | 8 -------- platform/broadcom/sonic-platform-modules-arista | 2 +- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/device/arista/x86_64-arista_7050_qx32s/sensors.conf b/device/arista/x86_64-arista_7050_qx32s/sensors.conf index cf4977f1cc1..9c2dd38597a 100644 --- a/device/arista/x86_64-arista_7050_qx32s/sensors.conf +++ b/device/arista/x86_64-arista_7050_qx32s/sensors.conf @@ -29,14 +29,6 @@ chip "max6658-i2c-3-4c" set temp2_max 75 set temp2_crit 80 -chip "pmbus-i2c-3-4e" - label temp1 "Power controller 1 sensor 1" - label temp2 "Power controller 1 sensor 2" - -chip "pmbus-i2c-7-4e" - label temp1 "Power controller 2 sensor 1" - label temp2 "Power controller 2 sensor 2" - chip "pmbus-i2c-6-58" label temp1 "Power supply 1 hotspot sensor" label temp2 "Power supply 1 inlet temp sensor" diff --git a/device/arista/x86_64-arista_7060_cx32s/sensors.conf b/device/arista/x86_64-arista_7060_cx32s/sensors.conf index 7b548f8493e..57e78588191 100644 --- a/device/arista/x86_64-arista_7060_cx32s/sensors.conf +++ b/device/arista/x86_64-arista_7060_cx32s/sensors.conf @@ -40,14 +40,6 @@ chip "max6658-i2c-3-4c" set temp2_max 75 set temp2_crit 80 -chip "pmbus-i2c-3-4e" - label temp1 "Power controller 1 sensor 1" - label temp2 "Power controller 1 sensor 2" - -chip "pmbus-i2c-7-4e" - label temp1 "Power controller 2 sensor 1" - label temp2 "Power controller 2 sensor 2" - chip "pmbus-i2c-6-58" label temp1 "Power supply 1 hotspot sensor" label temp2 "Power supply 1 inlet temp sensor" diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index 8b8411551fa..62b5b7da50f 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit 8b8411551faab9e44aa1f66dae507e3d92ecf468 +Subproject commit 62b5b7da50f29d4299aaca69bdb40bf9172bb4e6 From ee58ee2067cf48f8993e90c64fc45d5f3884eea3 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 20 Dec 2017 15:25:04 -0800 Subject: [PATCH 007/254] [build] make second Accton Debian package extra package of the first one (#1257) Both packages are built with a single build command. We only have to take the second one after the first one is built. --- platform/broadcom/platform-modules-accton.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk index 6a2bf8c04b6..7030ecb441f 100755 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -13,7 +13,6 @@ $(ACCTON_AS7712_32X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7712_32x-r0 SONIC_DPKG_DEBS += $(ACCTON_AS7712_32X_PLATFORM_MODULE) ACCTON_AS5712_54X_PLATFORM_MODULE = sonic-platform-accton-as5712-54x_$(ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION)_amd64.deb -$(ACCTON_AS5712_54X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton -$(ACCTON_AS5712_54X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(ACCTON_AS5712_54X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as5712_54x-r0 +$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS5712_54X_PLATFORM_MODULE))) SONIC_DPKG_DEBS += $(ACCTON_AS5712_54X_PLATFORM_MODULE) From eadd74fb8416b1e3dd00c0fd967ff52182282ada Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 20 Dec 2017 15:25:30 -0800 Subject: [PATCH 008/254] [build] allow user to override the default number of build jobs (#1255) User could issue SONIC_BUILD_JOBS= to set number of concurrent build job(s) to run. With this commit, the default setting is still left at 1. --- Makefile | 4 +++- slave.mk | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d1a28f03174..0adcbb99fa6 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ # * PASSWORD: Desired password -- default at rules/config # * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes. # * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes +# * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run # ############################################################################### @@ -59,7 +60,8 @@ SONIC_BUILD_INSTRUCTION := make \ SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \ ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \ PASSWORD=$(PASSWORD) \ - USERNAME=$(USERNAME) + USERNAME=$(USERNAME) \ + SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) .PHONY: sonic-slave-build sonic-slave-bash init diff --git a/slave.mk b/slave.mk index 8ec6832bd68..4843faee506 100644 --- a/slave.mk +++ b/slave.mk @@ -74,7 +74,11 @@ ifeq ($(PASSWORD),) override PASSWORD := $(DEFAULT_PASSWORD) endif -MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS) +ifeq ($(SONIC_BUILD_JOBS),) +override SONIC_BUILD_JOBS := $(SONIC_CONFIG_BUILD_JOBS) +endif + +MAKEFLAGS += -j $(SONIC_BUILD_JOBS) export SONIC_CONFIG_MAKE_JOBS ############################################################################### @@ -86,7 +90,7 @@ $(info ) $(info Build Configuration) $(info "CONFIGURED_PLATFORM" : "$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))") $(info "SONIC_CONFIG_PRINT_DEPENDENCIES" : "$(SONIC_CONFIG_PRINT_DEPENDENCIES)") -$(info "SONIC_CONFIG_BUILD_JOBS" : "$(SONIC_CONFIG_BUILD_JOBS)") +$(info "SONIC_BUILD_JOBS" : "$(SONIC_BUILD_JOBS)") $(info "SONIC_CONFIG_MAKE_JOBS" : "$(SONIC_CONFIG_MAKE_JOBS)") $(info "DEFAULT_USERNAME" : "$(DEFAULT_USERNAME)") $(info "DEFAULT_PASSWORD" : "$(DEFAULT_PASSWORD)") From db49660b868b81cdc16e8d80f60e8ee3a8871466 Mon Sep 17 00:00:00 2001 From: jostar-yang Date: Thu, 21 Dec 2017 17:54:32 +0800 Subject: [PATCH 009/254] Add set/get lpmode and mode_rst feature for qsfp (#1261) * Add lpmode set/get . mode_reset feature for qsfp * Add lp mode, set/get and mode_rst feature for sfp --- .../plugins/sfputil.py | 76 +++++++++++++++++-- .../broadcom/sonic-platform-modules-accton | 2 +- 2 files changed, 71 insertions(+), 7 deletions(-) diff --git a/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py index c9862957bf3..d554910ac5c 100755 --- a/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py +++ b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py @@ -16,12 +16,13 @@ class SfpUtil(SfpUtilBase): PORT_START = 0 PORT_END = 71 PORTS_IN_BLOCK = 72 - QSFP_PORT_START = 72 + QSFP_PORT_START = 48 QSFP_PORT_END = 72 BASE_VAL_PATH = "/sys/class/i2c-adapter/i2c-{0}/{1}-0050/" _port_to_is_present = {} + _port_to_lp_mode = {} _port_to_eeprom_mapping = {} _port_to_i2c_mapping = { @@ -107,6 +108,14 @@ def port_start(self): def port_end(self): return self.PORT_END + @property + def qsfp_port_start(self): + return self.QSFP_PORT_START + + @property + def qsfp_port_end(self): + return self.QSFP_PORT_END + @property def qsfp_ports(self): return range(self.QSFP_PORT_START, self.PORTS_IN_BLOCK + 1) @@ -148,11 +157,66 @@ def get_presence(self, port_num): return False - def get_low_power_mode(self, port_num): - raise NotImplementedError + def get_low_power_mode(self, port_num): + if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: + return False + + lp_mode_path = self.BASE_VAL_PATH + "sfp_lp_mode" + self.__port_to_lp_mode = lp_mode_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + + try: + val_file = open(self.__port_to_lp_mode) + 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 - def set_low_power_mode(self, port_num, lpmode): - raise NotImplementedError + return False + + def set_low_power_mode(self, port_num, lpmode): + if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: + return False + + lp_mode_path = self.BASE_VAL_PATH + "sfp_lp_mode" + self.__port_to_lp_mode = lp_mode_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + + try: + reg_file = open(self.__port_to_lp_mode, 'r+') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + if lpmode is True: + reg_value = '1' + else: + reg_value = '0' + + reg_file.write(reg_value) + reg_file.close() + + return True def reset(self, port_num): - raise NotImplementedError + if port_num < self.qsfp_port_start or port_num > self.qsfp_port_end: + return False + + mod_rst_path = self.BASE_VAL_PATH + "sfp_mod_rst" + self.__port_to_mod_rst = mod_rst_path.format(self._port_to_i2c_mapping[port_num][0], self._port_to_i2c_mapping[port_num][1]) + try: + reg_file = open(self.__port_to_mod_rst, 'r+') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = '1' + + reg_file.write(reg_value) + reg_file.close() + + return True \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-accton b/platform/broadcom/sonic-platform-modules-accton index 7ba26ec403c..7c39d916d2b 160000 --- a/platform/broadcom/sonic-platform-modules-accton +++ b/platform/broadcom/sonic-platform-modules-accton @@ -1 +1 @@ -Subproject commit 7ba26ec403c7f0d0acb958f794311ac3fd1af9a1 +Subproject commit 7c39d916d2b5d248c8067669e72b75ed7240b348 From c898a04b28f58f7ba6ea0b6268cbf038fb7f12cd Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Thu, 21 Dec 2017 11:03:08 -0800 Subject: [PATCH 010/254] [sudoers] Add 'docker ps' to READ_ONLY_CMDS (#1259) --- files/image_config/sudoers/sudoers | 1 + 1 file changed, 1 insertion(+) diff --git a/files/image_config/sudoers/sudoers b/files/image_config/sudoers/sudoers index 715a1979f1a..317ace3bf99 100644 --- a/files/image_config/sudoers/sudoers +++ b/files/image_config/sudoers/sudoers @@ -21,6 +21,7 @@ Cmnd_Alias READ_ONLY_CMDS = /usr/bin/decode-syseeprom, \ /usr/bin/docker images *, \ /usr/bin/docker exec -it snmp cat /etc/snmp/snmpd.conf, \ /usr/bin/docker exec -it bgp cat /etc/quagga/bgpd.conf, \ + /usr/bin/docker ps, \ /usr/bin/generate_dump, \ /usr/bin/lldpctl, \ /usr/bin/lldpshow, \ From ee73cdec26afae23ba2a712a5c5815b1c958d827 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Thu, 21 Dec 2017 11:15:06 -0800 Subject: [PATCH 011/254] Add 'make reset' target with warning prompt to reset git repo and submodules (#1258) --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0adcbb99fa6..8d864e914aa 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ SONIC_BUILD_INSTRUCTION := make \ USERNAME=$(USERNAME) \ SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) -.PHONY: sonic-slave-build sonic-slave-bash init +.PHONY: sonic-slave-build sonic-slave-bash init reset .DEFAULT_GOAL := all @@ -98,5 +98,18 @@ sonic-slave-bash : @$(DOCKER_RUN) -t $(SLAVE_IMAGE):$(SLAVE_TAG) bash init : - git submodule update --init --recursive - git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $$(realpath --relative-to=. $$(cut -d" " -f2 .git))" > .git' + @git submodule update --init --recursive + @git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $$(realpath --relative-to=. $$(cut -d" " -f2 .git))" > .git' + +reset : + @echo && echo -n "Warning! All local changes will be lost. Proceed? [y/N]: " + @read ans && \ + if [ $$ans == y ]; then \ + git clean -xfdf; \ + git reset --hard; \ + git submodule foreach --recursive git clean -xfdf; \ + git submodule foreach --recursive git reset --hard; \ + git submodule update --init --recursive;\ + else \ + echo "Reset aborted"; \ + fi From 63de341dd605585a126d233b66858a4194600ff2 Mon Sep 17 00:00:00 2001 From: kaiyu22 Date: Sat, 23 Dec 2017 02:04:29 +0800 Subject: [PATCH 012/254] [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC (#1245) * Add switch ASIC vendor and platforms for Nephos - 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 - 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 * Advance sonic-sairedis submodule to include #271 (Add Nephos ASIC) --- .gitmodules | 3 + README.md | 3 + build_debian.sh | 3 + .../INGRASYS-S9130-32X/port_config.ini | 33 ++ .../INGRASYS-S9130-32X/port_config.nps | 0 .../INGRASYS-S9130-32X/sai.profile | 2 + .../x86_64-ingrasys_s9130_32x-r0/fancontrol | 12 + .../installer.conf | 3 + .../led_proc_init.nps | 20 ++ .../minigraph.xml | 151 +++++++++ .../plugins/eeprom.py | 22 ++ .../plugins/sfputil.py | 187 +++++++++++ .../x86_64-ingrasys_s9130_32x-r0/sensors.conf | 69 +++++ .../INGRASYS-S9230-64X/port_config.ini | 65 ++++ .../INGRASYS-S9230-64X/port_config.nps | 0 .../INGRASYS-S9230-64X/sai.profile | 2 + .../x86_64-ingrasys_s9230_64x-r0/fancontrol | 9 + .../installer.conf | 3 + .../led_proc_init.nps | 20 ++ .../minigraph.xml | 151 +++++++++ .../plugins/eeprom.py | 22 ++ .../plugins/psuutil.py | 92 ++++++ .../plugins/sfputil.py | 293 ++++++++++++++++++ .../x86_64-ingrasys_s9230_64x-r0/sensors.conf | 90 ++++++ dockers/docker-orchagent-nephos | 1 + dockers/docker-orchagent/orchagent.sh | 2 + files/build_templates/swss.service.j2 | 4 + platform/nephos/docker-orchagent-nephos.mk | 19 ++ platform/nephos/docker-ptf-nephos.mk | 7 + platform/nephos/docker-syncd-nephos-rpc.mk | 17 + .../docker-syncd-nephos-rpc/Dockerfile.j2 | 51 +++ .../docker-syncd-nephos-rpc/ptf_nn_agent.conf | 10 + platform/nephos/docker-syncd-nephos.mk | 19 ++ .../nephos/docker-syncd-nephos/Dockerfile.j2 | 31 ++ .../base_image_files/npx_diag | 3 + platform/nephos/docker-syncd-nephos/start.sh | 7 + .../docker-syncd-nephos/supervisord.conf | 28 ++ platform/nephos/libsaithrift-dev.mk | 7 + platform/nephos/one-image.mk | 10 + platform/nephos/platform-modules-ingrasys.mk | 18 ++ platform/nephos/platform.conf | 0 platform/nephos/python-saithrift.mk | 6 + platform/nephos/rules.mk | 26 ++ platform/nephos/sai.mk | 9 + platform/nephos/sdk.mk | 4 + .../nephos/sonic-platform-modules-ingrasys | 1 + rules/ixgbe.mk | 8 + slave.mk | 1 + src/ixgbe/Makefile | 22 ++ src/sonic-sairedis | 2 +- 50 files changed, 1567 insertions(+), 1 deletion(-) create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.ini create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/sai.profile create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/installer.conf create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/sai.profile create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/fancontrol create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/installer.conf create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/minigraph.xml create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/sfputil.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf create mode 120000 dockers/docker-orchagent-nephos create mode 100644 platform/nephos/docker-orchagent-nephos.mk create mode 100644 platform/nephos/docker-ptf-nephos.mk create mode 100644 platform/nephos/docker-syncd-nephos-rpc.mk create mode 100644 platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2 create mode 100644 platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf create mode 100644 platform/nephos/docker-syncd-nephos.mk create mode 100755 platform/nephos/docker-syncd-nephos/Dockerfile.j2 create mode 100755 platform/nephos/docker-syncd-nephos/base_image_files/npx_diag create mode 100755 platform/nephos/docker-syncd-nephos/start.sh create mode 100644 platform/nephos/docker-syncd-nephos/supervisord.conf create mode 100644 platform/nephos/libsaithrift-dev.mk create mode 100644 platform/nephos/one-image.mk create mode 100644 platform/nephos/platform-modules-ingrasys.mk create mode 100644 platform/nephos/platform.conf create mode 100644 platform/nephos/python-saithrift.mk create mode 100644 platform/nephos/rules.mk create mode 100644 platform/nephos/sai.mk create mode 100644 platform/nephos/sdk.mk create mode 160000 platform/nephos/sonic-platform-modules-ingrasys create mode 100644 rules/ixgbe.mk create mode 100644 src/ixgbe/Makefile diff --git a/.gitmodules b/.gitmodules index 26763fb1601..1c7a6da0281 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,3 +68,6 @@ [submodule "platform/p4/SAI-P4-BM"] path = platform/p4/SAI-P4-BM url = https://github.com/Mellanox/SAI-P4-BM.git +[submodule "platform/nephos/sonic-platform-modules-ingrasys"] + path = platform/nephos/sonic-platform-modules-ingrasys + url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git diff --git a/README.md b/README.md index 5ba616c027e..0a361e38abe 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ The SONiC installer contains all docker images needed. SONiC uses one image for - PLATFORM=mellanox - PLATFORM=cavium - PLATFORM=centec +- PLATFORM=nephos - PLATFORM=p4 - PLATFORM=vs @@ -96,9 +97,11 @@ This may take a while, but it is a one-time action, so please be patient. - docker-orchagent-brcm.gz: docker image for SWitch State Service (SWSS) on Broadcom platform (gzip tar archive) - docker-orchagent-cavm.gz: docker image for SWitch State Service (SWSS) on Cavium platform (gzip tar archive) - docker-orchagent-mlnx.gz: docker image for SWitch State Service (SWSS) on Mellanox platform (gzip tar archive) + - docker-orchagent-nephos.gz: docker image for SWitch State Service (SWSS) on Nephos platform (gzip tar archive) - docker-syncd-brcm.gz: docker image for the daemon to sync database and Broadcom switch ASIC (gzip tar archive) - docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive) - docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive) + - docker-syncd-nephos.gz: docker image for the daemon to sync database and Nephos switch ASIC (gzip tar archive) - docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive) - docker-sonic-vs.gz: docker image for all-in-one for software virtual switch (gzip tar archive) diff --git a/build_debian.sh b/build_debian.sh index 0c765fdb642..15bde44c112 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -144,6 +144,9 @@ sudo chroot $FILESYSTEM_ROOT update-initramfs -u ## Install latest intel igb driver sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko +## Install latest intel ixgbe driver +sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko + ## Install docker echo '[INFO] Install docker' ## Install apparmor utils since they're missing and apparmor is enabled in the kernel diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.ini b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.ini new file mode 100644 index 00000000000..bb26684cb7d --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias index +Ethernet0 0,1,2,3 Ethernet1/1 0 +Ethernet4 4,5,6,7 Ethernet2/1 1 +Ethernet8 8,9,10,11 Ethernet3/1 2 +Ethernet12 12,13,14,15 Ethernet4/1 3 +Ethernet16 16,17,18,19 Ethernet5/1 4 +Ethernet20 20,21,22,23 Ethernet6/1 5 +Ethernet24 24,25,26,27 Ethernet7/1 6 +Ethernet28 28,29,30,31 Ethernet8/1 7 +Ethernet32 32,33,34,35 Ethernet9/1 8 +Ethernet36 36,37,38,39 Ethernet10/1 9 +Ethernet40 40,41,42,43 Ethernet11/1 10 +Ethernet44 44,45,46,47 Ethernet12/1 11 +Ethernet48 48,49,50,51 Ethernet13/1 12 +Ethernet52 52,53,54,55 Ethernet14/1 13 +Ethernet56 56,57,58,59 Ethernet15/1 14 +Ethernet60 60,61,62,63 Ethernet16/1 15 +Ethernet64 64,65,66,67 Ethernet17/1 16 +Ethernet68 68,69,70,71 Ethernet18/1 17 +Ethernet72 72,73,74,75 Ethernet19/1 18 +Ethernet76 76,77,78,79 Ethernet20/1 19 +Ethernet80 80,81,82,83 Ethernet21/1 20 +Ethernet84 84,85,86,87 Ethernet22/1 21 +Ethernet88 88,89,90,91 Ethernet23/1 22 +Ethernet92 92,93,94,95 Ethernet24/1 23 +Ethernet96 96,97,98,99 Ethernet25/1 24 +Ethernet100 100,101,102,103 Ethernet26/1 25 +Ethernet104 104,105,106,107 Ethernet27/1 26 +Ethernet108 108,109,110,111 Ethernet28/1 27 +Ethernet112 112,113,114,115 Ethernet29/1 28 +Ethernet116 116,117,118,119 Ethernet30/1 29 +Ethernet120 120,121,122,123 Ethernet31/1 30 +Ethernet124 124,125,126,127 Ethernet32/1 31 diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps new file mode 100644 index 00000000000..e69de29bb2d diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/sai.profile b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/sai.profile new file mode 100644 index 00000000000..880f47910ac --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/sai.profile @@ -0,0 +1,2 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/platform/led_proc_init.nps +SAI_DSH_CONFIG_FILE=/usr/share/sonic/hwsku/port_config.nps diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol new file mode 100644 index 00000000000..5ed165966b9 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/fancontrol @@ -0,0 +1,12 @@ +# Configuration file generated by pwmconfig, changes will be lost +INTERVAL=10 +DEVPATH=hwmon5=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-8/8-002f +DEVNAME=hwmon5=w83795adg +FCTEMPS=hwmon5/device/pwm2=hwmon1/temp1_input hwmon5/device/pwm1=hwmon1/temp1_input +FCFANS=hwmon5/device/pwm2=hwmon5/device/fan8_input hwmon5/device/pwm2=hwmon5/device/fan7_input hwmon5/device/pwm2=hwmon5/device/fan6_input hwmon5/device/pwm2=hwmon5/device/fan5_input hwmon5/device/pwm1=hwmon5/device/fan4_input hwmon5/device/pwm1=hwmon5/device/fan3_input hwmon5/device/pwm1=hwmon5/device/fan2_input hwmon5/device/pwm1=hwmon5/device/fan1_input +# TODO: check the temp value with HW after board ready +MINTEMP=hwmon5/device/pwm2=20 hwmon5/device/pwm1=20 +MAXTEMP=hwmon5/device/pwm2=60 hwmon5/device/pwm1=60 +MINSTART=hwmon5/device/pwm2=75 hwmon5/device/pwm1=75 +MINSTOP=hwmon5/device/pwm2=22 hwmon5/device/pwm1=22 + diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/installer.conf b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/installer.conf new file mode 100644 index 00000000000..925a32fc0c3 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps new file mode 100644 index 00000000000..b482a7a0b97 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps @@ -0,0 +1,20 @@ +#This configuration file is for customer init value feature. Please refer to mtk_cfg.h/mtk_cfg.c for detail. +#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. +#2. There are five parameters which can be set. +# 1) the first is unit. +# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. +# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. +# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. +# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. +#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); +#4. Usage under the linux shell: +# 1) ./image-path/image-name -c cfg-path/NPS_Ari_EVB_24.cfg : mamually specify directory path if they are not in current work dirctory. +# 2) ./image-name -c NPS_Ari_EVB_24.cfg : the image and the NPS_Ari_EVB_24.cfg are in the current work directory. + +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml new file mode 100644 index 00000000000..6b29a7eb83b --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/minigraph.xml @@ -0,0 +1,151 @@ + + + + + + OCPSCH0104001MS + 10.10.1.26 + OCPSCH01040GGLF + 10.10.1.25 + 1 + 10 + 3 + + + OCPSCH0104002MS + 10.10.2.26 + OCPSCH01040GGLF + 10.10.2.25 + 1 + 10 + 3 + + + + + 64536 + OCPSCH01040GGLF + + +
10.10.1.26
+ + +
+ +
10.10.2.26
+ + +
+
+ +
+ + 64542 + OCPSCH0104001MS + + + + 64543 + OCPSCH0104002MS + + +
+
+ + + + + + HostIP + Loopback0 + + 100.0.0.9/32 + + 100.0.0.9/32 + + + + + + + + OCPSCH01040GGLF + + + + + + Ethernet0 + 10.10.1.25/30 + + + + Ethernet4 + 10.10.2.25/30 + + + + + + + + + + + + 40000 + DeviceInterfaceLink + OCPSCH0104001MS + Ethernet24 + OCPSCH01040GGLF + Ethernet0 + + + 40000 + DeviceInterfaceLink + OCPSCH0104002MS + Ethernet24 + OCPSCH01040GGLF + Ethernet4 + + + + + OCPSCH01040GGLF + INGRASYS-S9130-32X + + + + + + + OCPSCH01040GGLF + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + OCPSCH01040GGLF + INGRASYS-S9130-32X +
diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..0f47704ed2c --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/eeprom.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +############################################################################# +# Ingrasys S9130-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) diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..387c8155eef --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/sfputil.py @@ -0,0 +1,187 @@ +# 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 = 31 + PORTS_IN_BLOCK = 32 + EEPROM_OFFSET = 21 + ABS_GPIO_BASE_0_15 = 240 + ABS_GPIO_BASE_16_31 = 224 + LP_MODE_GPIO_BASE_0_15 = 176 + LP_MODE_GPIO_BASE_16_31 = 160 + RST_GPIO_BASE_0_15 = 144 + RST_GPIO_BASE_16_31 = 128 + + GPIO_VAL_PATH = "/sys/class/gpio/gpio{0}/value" + + _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(0, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + + 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(x + self.EEPROM_OFFSET) + 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 + + # open corrsponding gpio file + try: + if port_num <= 15: + gpio_base = self.ABS_GPIO_BASE_0_15 + else : + gpio_base = self.ABS_GPIO_BASE_16_31 + gpio_index = gpio_base + (port_num % 16) + gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index) + gpio_file = open(gpio_file_path) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the gpio value + gpio_val = int(gpio_file.readline().rstrip()) + gpio_file.close() + + # the gpio pin is ACTIVE_LOW but reversed + if gpio_val == 0: + return False + + return True + + def get_low_power_mode(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # open corrsponding gpio file + try: + if port_num <= 15: + gpio_base = self.LP_MODE_GPIO_BASE_0_15 + else : + gpio_base = self.LP_MODE_GPIO_BASE_16_31 + gpio_index = gpio_base + (port_num % 16) + gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index) + gpio_file = open(gpio_file_path) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the gpio value + gpio_val = int(gpio_file.readline().rstrip()) + gpio_file.close() + + if gpio_val == 0: + return False + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # open corrsponding gpio file + try: + if port_num <= 15: + gpio_base = self.LP_MODE_GPIO_BASE_0_15 + else : + gpio_base = self.LP_MODE_GPIO_BASE_16_31 + gpio_index = gpio_base + (port_num % 16) + gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index) + gpio_file = open(gpio_file_path, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # the gpio pin is ACTIVE_HIGH + if lpmode is True: + gpio_val = "1" + else: + gpio_val = "0" + + # write value to gpio + gpio_file.seek(0) + gpio_file.write(gpio_val) + gpio_file.close() + + return True + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # open corrsponding gpio file + try: + if port_num <= 15: + gpio_base = self.RST_GPIO_BASE_0_15 + else : + gpio_base = self.RST_GPIO_BASE_16_31 + gpio_index = gpio_base + (port_num % 16) + gpio_file_path = self.GPIO_VAL_PATH.format(gpio_index) + gpio_file = open(gpio_file_path, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # set the gpio to take port into reset + # the gpio pin is ACTIVE_LOW but reversed + gpio_val = "1" + # write value to gpio + gpio_file.seek(0) + gpio_file.write(gpio_val) + gpio_file.close() + + # Sleep 1 second to let it settle + time.sleep(1) + + # open corrsponding gpio file + try: + gpio_file = open(gpio_file_path, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # set gpio back low to take port out of reset + # the gpio pin is ACTIVE_LOW but reversed + gpio_val = "0" + # write value to gpio + gpio_file.seek(0) + gpio_file.write(gpio_val) + gpio_file.close() + + return True diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf new file mode 100644 index 00000000000..9b55f73af2a --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/sensors.conf @@ -0,0 +1,69 @@ +# libsensors configuration file +chip "i350bb-*" + ignore loc1 + +chip "jc42-*" + +bus "i2c-8" "i2c-mux-0 (chan_id 7)" +chip "w83795adg-*" + label in0 "0.9V" + set in0_max 0.945 + set in0_min 0.855 + label in1 "VDD_CORE" + set in1_max 0.945 + set in1_min 0.855 + label in2 "1.2V" + set in2_max 1.26 + set in2_min 1.14 + label in3 "1.8V" + set in3_max 1.89 + set in3_min 1.71 + label in4 "1.01V" + set in4_max 1.0605 + set in4_min 0.9595 + ignore in5 + ignore in6 + ignore in7 + ignore in11 + label in12 "3.3VDD" + set in12_max 3.465 + set in12_min 3.135 + # in12 and in13 are the same source + ignore in13 + 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 + +chip "tmp75-i2c-*-4A" + label temp1 "BMC board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +bus "i2c-0" "i2c-main" +chip "tmp75-i2c-*-4F" + label temp1 "x86 CPU board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +bus "i2c-12" "i2c-mux-1 (chan_id 3)" +chip "tmp75-i2c-*-4C" + label temp1 "rear MAC Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +chip "tmp75-i2c-*-49" + label temp1 "front MAC Temp" + set temp1_max 50 + set temp1_max_hyst 45 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini new file mode 100644 index 00000000000..ddd76b51167 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.ini @@ -0,0 +1,65 @@ +# name lanes alias index +Ethernet0 7,6,5,4 Ethernet1/1 0 +Ethernet4 3,2,1,0 Ethernet2/1 1 +Ethernet8 15,14,13,12 Ethernet3/1 2 +Ethernet12 11,10,9,8 Ethernet4/1 3 +Ethernet16 23,22,21,20 Ethernet5/1 4 +Ethernet20 19,18,17,16 Ethernet6/1 5 +Ethernet24 31,30,29,28 Ethernet7/1 6 +Ethernet28 27,26,25,24 Ethernet8/1 7 +Ethernet32 39,38,37,36 Ethernet9/1 8 +Ethernet36 35,34,33,32 Ethernet10/1 9 +Ethernet40 47,46,45,44 Ethernet11/1 10 +Ethernet44 43,42,41,40 Ethernet12/1 11 +Ethernet48 55,54,53,52 Ethernet13/1 12 +Ethernet52 51,50,49,48 Ethernet14/1 13 +Ethernet56 63,62,61,60 Ethernet15/1 14 +Ethernet60 59,58,57,56 Ethernet16/1 15 +Ethernet64 71,70,69,68 Ethernet17/1 16 +Ethernet68 67,66,65,64 Ethernet18/1 17 +Ethernet72 79,78,77,76 Ethernet19/1 18 +Ethernet76 75,74,73,72 Ethernet20/1 19 +Ethernet80 87,86,85,84 Ethernet21/1 20 +Ethernet84 83,82,81,80 Ethernet22/1 21 +Ethernet88 95,94,93,92 Ethernet23/1 22 +Ethernet92 91,90,89,88 Ethernet24/1 23 +Ethernet96 97,98,99,100 Ethernet25/1 24 +Ethernet100 101,102,103,104 Ethernet26/1 25 +Ethernet104 105,106,107,108 Ethernet27/1 26 +Ethernet108 109,110,111,112 Ethernet28/1 27 +Ethernet112 119,118,117,116 Ethernet29/1 28 +Ethernet116 115,114,113,112 Ethernet30/1 29 +Ethernet120 127,126,125,124 Ethernet31/1 30 +Ethernet124 123,122,121,120 Ethernet32/1 31 +Ethernet128 135,134,133,132 Ethernet33/1 32 +Ethernet132 131,130,129,128 Ethernet34/1 33 +Ethernet136 143,142,141,140 Ethernet35/1 34 +Ethernet140 139,138,137,136 Ethernet36/1 35 +Ethernet144 151,150,149,148 Ethernet37/1 36 +Ethernet148 147,146,145,144 Ethernet38/1 37 +Ethernet152 159,158,157,156 Ethernet39/1 38 +Ethernet156 155,154,153,152 Ethernet40/1 39 +Ethernet160 167,166,165,164 Ethernet41/1 40 +Ethernet164 163,162,161,160 Ethernet42/1 41 +Ethernet168 175,174,173,172 Ethernet43/1 42 +Ethernet172 171,170,169,168 Ethernet44/1 43 +Ethernet176 183,182,181,180 Ethernet45/1 44 +Ethernet180 179,178,177,176 Ethernet46/1 45 +Ethernet184 191,190,189,188 Ethernet47/1 46 +Ethernet188 187,186,185,184 Ethernet48/1 47 +Ethernet192 199,198,197,196 Ethernet49/1 48 +Ethernet196 195,194,193,192 Ethernet50/1 49 +Ethernet200 207,206,205,204 Ethernet51/1 50 +Ethernet204 203,202,201,200 Ethernet52/1 51 +Ethernet208 215,214,213,212 Ethernet53/1 52 +Ethernet212 211,210,209,208 Ethernet54/1 53 +Ethernet216 223,222,221,220 Ethernet55/1 54 +Ethernet220 219,218,217,216 Ethernet56/1 55 +Ethernet224 231,230,229,228 Ethernet57/1 56 +Ethernet228 227,226,225,224 Ethernet58/1 57 +Ethernet232 239,238,237,236 Ethernet59/1 58 +Ethernet236 235,234,233,232 Ethernet60/1 59 +Ethernet240 247,246,245,244 Ethernet61/1 60 +Ethernet244 243,242,241,240 Ethernet62/1 61 +Ethernet248 255,254,253,252 Ethernet63/1 62 +Ethernet252 251,250,249,248 Ethernet64/1 63 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps new file mode 100644 index 00000000000..e69de29bb2d diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/sai.profile b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/sai.profile new file mode 100644 index 00000000000..880f47910ac --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/sai.profile @@ -0,0 +1,2 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/platform/led_proc_init.nps +SAI_DSH_CONFIG_FILE=/usr/share/sonic/hwsku/port_config.nps diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/fancontrol b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/fancontrol new file mode 100644 index 00000000000..86b4e636375 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/fancontrol @@ -0,0 +1,9 @@ +INTERVAL=10 +DEVPATH=hwmon7=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-16/16-002f hwmon4=devices/pci0000:00/0000:00:1f.3/i2c-0/i2c-7/7-004e +DEVNAME=hwmon7=w83795adg +FCTEMPS=hwmon7/device/pwm2=hwmon4/temp1_input +FCFANS=hwmon7/device/pwm2=hwmon7/device/fan7_input hwmon7/device/pwm2=hwmon7/device/fan5_input hwmon7/device/pwm2=hwmon7/device/fan3_input hwmon7/device/pwm2=hwmon7/device/fan1_input +MINTEMP=hwmon7/device/pwm2=20 +MAXTEMP=hwmon7/device/pwm2=60 +MINSTART=hwmon7/device/pwm2=75 +MINSTOP=hwmon7/device/pwm2=22 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/installer.conf b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/installer.conf new file mode 100644 index 00000000000..925a32fc0c3 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/installer.conf @@ -0,0 +1,3 @@ +CONSOLE_PORT=0x3f8 +CONSOLE_DEV=0 +CONSOLE_SPEED=115200 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps new file mode 100644 index 00000000000..e6fe6721350 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps @@ -0,0 +1,20 @@ +#This configuration file is for customer init value feature. Please refer to nps_cfg.h/nps_cfg.c for detail. +#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. +#2. There are five parameters which can be set. +# 1) the first is unit. +# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. +# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. +# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. +# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. +#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); +#4. Usage under the linux shell: +# 1) ./image-path/image-name -c cfg-path/NPS_TAU_EVB_6T4_64.cfg : mamually specify directory path if they are not in current work dirctory. +# 2) ./image-name -c NPS_TAU_EVB_6T4_64.cfg : the image and the NPS_TAU_EVB_3T2_32.cfg are in the current work directory. + +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 2 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/minigraph.xml b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/minigraph.xml new file mode 100644 index 00000000000..9ac02997e44 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/minigraph.xml @@ -0,0 +1,151 @@ + + + + + + OCPSCH0104001MS + 10.10.1.26 + OCPSCH01040GGLF + 10.10.1.25 + 1 + 10 + 3 + + + OCPSCH0104002MS + 10.10.2.26 + OCPSCH01040GGLF + 10.10.2.25 + 1 + 10 + 3 + + + + + 64536 + OCPSCH01040GGLF + + +
10.10.1.26
+ + +
+ +
10.10.2.26
+ + +
+
+ +
+ + 64542 + OCPSCH0104001MS + + + + 64543 + OCPSCH0104002MS + + +
+
+ + + + + + HostIP + Loopback0 + + 100.0.0.9/32 + + 100.0.0.9/32 + + + + + + + + OCPSCH01040GGLF + + + + + + Ethernet0 + 10.10.1.25/30 + + + + Ethernet4 + 10.10.2.25/30 + + + + + + + + + + + + 40000 + DeviceInterfaceLink + OCPSCH0104001MS + Ethernet24 + OCPSCH01040GGLF + Ethernet0 + + + 40000 + DeviceInterfaceLink + OCPSCH0104002MS + Ethernet24 + OCPSCH01040GGLF + Ethernet4 + + + + + OCPSCH01040GGLF + INGRASYS-S9230-64X + + + + + + + OCPSCH01040GGLF + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + OCPSCH01040GGLF + INGRASYS-S9230-64X +
diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..ab398102c9b --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/eeprom.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +############################################################################# +# Ingrasys S9230-64X +# +# 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) diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..91d7de05dc8 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# 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""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-17/17-0050", + "/sys/bus/i2c/devices/i2c-18/18-0050"] + + 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 + :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 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # 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 + :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 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/sfputil.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..70e5ebff403 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/sfputil.py @@ -0,0 +1,293 @@ +# 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 = 63 + PORTS_IN_BLOCK = 64 + #TODO: modify according to port map + EEPROM_OFFSET = 33 + CPLD1_PORTS = 12 + CPLDx_PORTS = 13 + CPLD_OFFSET = 1 + CPLD_PRES_BIT = 1 + CPLD_RESET_BIT = 0 + CPLD_LPMOD_BIT = 2 + CPLDx_I2C_ADDR = "33" + CPLD_PORT_STATUS_KEY = "cpld_qsfp_port_status" + CPLD_PORT_CONFIG_KEY = "cpld_qsfp_port_config" + CPLD_REG_PATH = "/sys/bus/i2c/devices/{0}-00{1}/{2}_{3}" + + _port_to_eeprom_mapping = {} + + _logic_to_phy_port_mapping = { + 0: 0, + 1: 1, + 2: 4, + 3: 5, + 4: 8, + 5: 9, + 6: 12, + 7: 13, + 8: 16, + 9: 17, + 10: 20, + 11: 21, + 12: 24, + 13: 25, + 14: 28, + 15: 29, + 16: 32, + 17: 33, + 18: 36, + 19: 37, + 20: 40, + 21: 41, + 22: 44, + 23: 45, + 24: 48, + 25: 49, + 26: 52, + 27: 53, + 28: 56, + 29: 57, + 30: 60, + 31: 61, + 32: 2, + 33: 3, + 34: 6, + 35: 7, + 36: 10, + 37: 11, + 38: 14, + 39: 15, + 40: 18, + 41: 19, + 42: 22, + 43: 23, + 44: 26, + 45: 27, + 46: 30, + 47: 31, + 48: 34, + 49: 35, + 50: 38, + 51: 39, + 52: 42, + 53: 43, + 54: 46, + 55: 47, + 56: 50, + 57: 51, + 58: 54, + 59: 55, + 60: 58, + 61: 59, + 62: 62, + 63: 63 + } + + @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 + + + 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): + phy_port = self._logic_to_phy_port_mapping[x] + port_eeprom_path = eeprom_path.format(phy_port + self.EEPROM_OFFSET) + self.port_to_eeprom_mapping[x] = port_eeprom_path + + SfpUtilBase.__init__(self) + + def qsfp_to_cpld_index(self, port_num): + if port_num < self.CPLD1_PORTS: + cpld_id = 0 + cpld_port_index = port_num + 1 + else: + cpld_id = 1 + (port_num - self.CPLD1_PORTS) / self.CPLDx_PORTS + cpld_port_index = ((port_num - self.CPLD1_PORTS) % self.CPLDx_PORTS) + 1 + return cpld_id, cpld_port_index + + 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 + + # logic port to physical port mapping + port_num = self._logic_to_phy_port_mapping[port_num] + + cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num) + i2c_id = self.CPLD_OFFSET + cpld_id + reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \ + self.CPLD_PORT_STATUS_KEY, cpld_port_index) + + try: + reg_file = open(reg_path) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the status register value + content = reg_file.readline().rstrip() + reg_file.close() + + reg_value = int(content, 16) + # mask for presence bit (bit 1) + mask = (1 << self.CPLD_PRES_BIT) + + # 0 - presence, 1 - absence + if reg_value & mask == 0: + 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.port_end: + return False + + # logic port to physical port mapping + port_num = self._logic_to_phy_port_mapping[port_num] + + cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num) + i2c_id = self.CPLD_OFFSET + cpld_id + reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \ + self.CPLD_PORT_CONFIG_KEY, cpld_port_index) + + try: + reg_file = open(reg_path) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the status register value + content = reg_file.readline().rstrip() + reg_file.close() + + reg_value = int(content, 16) + # mask for lp_mod bit (bit 2) + mask = (1 << self.CPLD_LPMOD_BIT) + + # 0 - disable, 1 - low power mode + if reg_value & mask == 0: + return False + + return True + + def set_low_power_mode(self, port_num, lpmode): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # logic port to physical port mapping + port_num = self._logic_to_phy_port_mapping[port_num] + + cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num) + i2c_id = self.CPLD_OFFSET + cpld_id + reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \ + self.CPLD_PORT_CONFIG_KEY, cpld_port_index) + + try: + reg_file = open(reg_path, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the status register value + content = reg_file.readline().rstrip() + reg_value = int(content, 16) + # mask for lp_mod bit (bit 2) + mask = (1 << self.CPLD_LPMOD_BIT) + + # 1 - low power mode, 0 - high power mode + if lpmode is True: + reg_value = reg_value | mask + else: + reg_value = reg_value & ~mask + + # convert value to hex string + content = hex(reg_value) + + reg_file.seek(0) + reg_file.write(content) + reg_file.close() + + return True + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + # logic port to physical port mapping + port_num = self._logic_to_phy_port_mapping[port_num] + + cpld_id, cpld_port_index = self.qsfp_to_cpld_index(port_num) + i2c_id = self.CPLD_OFFSET + cpld_id + reg_path = self.CPLD_REG_PATH.format(i2c_id, self.CPLDx_I2C_ADDR, \ + self.CPLD_PORT_CONFIG_KEY, cpld_port_index) + + # reset the port + try: + reg_file = open(reg_path, "r+") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + # content is a string containing the status register value + content = reg_file.readline().rstrip() + reg_value = int(content, 16) + # mask for reset bit (bit 0) + mask = (1 << self.CPLD_RESET_BIT) + + # 1 - out of reset, 0 - reset + reg_value = reg_value & ~mask + + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + # Sleep 1 second to reset done + time.sleep(1) + + # take the port out of reset + try: + reg_file = open(reg_path, "w") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_value | mask + + reg_file.seek(0) + reg_file.write(hex(reg_value)) + reg_file.close() + + return True + diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf new file mode 100644 index 00000000000..b5daa9af42b --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/sensors.conf @@ -0,0 +1,90 @@ +# libsensors configuration file +chip "i350bb-*" + ignore loc1 + +chip "jc42-*" + +bus "i2c-16" "i2c-mux-1 (chan_id 7)" +chip "w83795adg-*" + ignore in0 + label in1 "VDD_CORE" + set in1_min 0.90 * 0.98 + set in1_max 0.90 * 1.02 + ignore in2 + label in3 "1.8V" + set in3_min 1.8 * 0.97 + set in3_max 1.8 * 1.03 + label in4 "3.3V" + compute in4 @/(0.3052), (0.3052)*@ + set in4_min 3.3 * 0.95 + set in4_max 3.3 * 1.05 + label in5 "0.9V" + set in5_min 0.90 * 0.98 + set in5_max 0.90 * 1.02 + ignore in6 + ignore in7 + ignore in8 + ignore in9 + ignore in10 + ignore in11 + ignore in12 + ignore in13 + ignore in14 + ignore in15 + ignore in16 + ignore in17 + ignore in18 + ignore in19 + label fan1 "FANTRAY 1" + #label fan2 "FANTRAY 1-B" + ignore fan2 + label fan3 "FANTRAY 2" + #label fan4 "FANTRAY 2-B" + ignore fan4 + label fan5 "FANTRAY 3" + #label fan6 "FANTRAY 3-B" + ignore fan6 + label fan7 "FANTRAY 4" + #label fan8 "FANTRAY 4-B" + ignore fan8 + ignore temp1 + ignore temp2 + ignore temp3 + ignore temp4 + ignore temp5 + ignore temp6 + ignore intrusion0 + +# TODO: need to confirm the critial temp value with HW after board ready +chip "tmp75-i2c-*-4A" + label temp1 "BMC board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +bus "i2c-0" "SMBus I801 adapter at f000" +chip "tmp75-i2c-*-4F" + label temp1 "x86 CPU board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +bus "i2c-6" "i2c-0-mux (chan_id 5)" +chip "lm75-i2c-6-4D" + label temp1 "Rear Panel Temp" + set temp1_max 50 + set temp1_max_hyst 45 +chip "lm75-i2c-6-4E" + label temp1 "Rear MAC Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +bus "i2c-7" "i2c-0-mux (chan_id 6)" +chip "lm75-i2c-7-4D" + label temp1 "Front Panel Temp" + set temp1_max 50 + set temp1_max_hyst 45 +chip "lm75-i2c-7-4E" + label temp1 "Front MAC Temp" + set temp1_max 50 + set temp1_max_hyst 45 + + diff --git a/dockers/docker-orchagent-nephos b/dockers/docker-orchagent-nephos new file mode 120000 index 00000000000..8d52609c56e --- /dev/null +++ b/dockers/docker-orchagent-nephos @@ -0,0 +1 @@ +docker-orchagent \ No newline at end of file diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index f92dfe5fd54..027c6d52a2f 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -18,6 +18,8 @@ if [ "$platform" == "broadcom" ]; then ORCHAGENT_ARGS+="-m $MAC_ADDRESS" elif [ "$platform" == "cavium" ]; then ORCHAGENT_ARGS+="-m $MAC_ADDRESS" +elif [ "$platform" == "nephos" ]; then + ORCHAGENT_ARGS+="-m $MAC_ADDRESS" fi exec /usr/bin/orchagent ${ORCHAGENT_ARGS} diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index ad52f395d0c..b18321676b7 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -3,11 +3,15 @@ Description=switch state service Requires=database.service {% if sonic_asic_platform == 'broadcom' %} Requires=opennsl-modules-3.16.0-4-amd64.service +{% elif sonic_asic_platform == 'nephos' %} +Requires=nps-modules-3.16.0-4-amd64.service {% endif %} After=database.service After=interfaces-config.service {% if sonic_asic_platform == 'broadcom' %} After=opennsl-modules-3.16.0-4-amd64.service +{% elif sonic_asic_platform == 'nephos' %} +After=nps-modules-3.16.0-4-amd64.service {% endif %} [Service] diff --git a/platform/nephos/docker-orchagent-nephos.mk b/platform/nephos/docker-orchagent-nephos.mk new file mode 100644 index 00000000000..b21e69d6cf8 --- /dev/null +++ b/platform/nephos/docker-orchagent-nephos.mk @@ -0,0 +1,19 @@ +# docker image for orchagent + +DOCKER_ORCHAGENT_NEPHOS = docker-orchagent-nephos.gz +$(DOCKER_ORCHAGENT_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-orchagent +$(DOCKER_ORCHAGENT_NEPHOS)_DEPENDS += $(SWSS) $(REDIS_TOOLS) +$(DOCKER_ORCHAGENT_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) +SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_NEPHOS) + +$(DOCKER_ORCHAGENT_NEPHOS)_CONTAINER_NAME = swss +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += --net=host --privileged -t +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_ORCHAGENT_NEPHOS)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw + +$(DOCKER_ORCHAGENT_NEPHOS)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel +$(DOCKER_ORCHAGENT_NEPHOS)_FILES += $(ARP_UPDATE_SCRIPT) diff --git a/platform/nephos/docker-ptf-nephos.mk b/platform/nephos/docker-ptf-nephos.mk new file mode 100644 index 00000000000..6d7950f7516 --- /dev/null +++ b/platform/nephos/docker-ptf-nephos.mk @@ -0,0 +1,7 @@ +# docker image for docker-ptf-nephos + +DOCKER_PTF_NEPHOS = docker-ptf-nephos.gz +$(DOCKER_PTF_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift +$(DOCKER_PTF_NEPHOS)_DEPENDS += $(PYTHON_SAITHRIFT_NEPHOS) +$(DOCKER_PTF_NEPHOS)_LOAD_DOCKERS += $(DOCKER_PTF) +#SONIC_DOCKER_IMAGES += $(DOCKER_PTF_NEPHOS) diff --git a/platform/nephos/docker-syncd-nephos-rpc.mk b/platform/nephos/docker-syncd-nephos-rpc.mk new file mode 100644 index 00000000000..e891d0b1a68 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos-rpc.mk @@ -0,0 +1,17 @@ +# docker image for nephos syncd with rpc + +DOCKER_SYNCD_NEPHOS_RPC = docker-syncd-nephos-rpc.gz +$(DOCKER_SYNCD_NEPHOS_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos-rpc +$(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) +$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG) +$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_NEPHOS) +SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC) +ifeq ($(ENABLE_SYNCD_RPC),y) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC) +endif + +$(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t +$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf +$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd +$(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2 b/platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2 new file mode 100644 index 00000000000..9a01d4e1e00 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2 @@ -0,0 +1,51 @@ +FROM docker-syncd-nephos + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +COPY \ +{% for deb in docker_syncd_nephos_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_nephos_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"] diff --git a/platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf b/platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf new file mode 100644 index 00000000000..fa1ed0eb162 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos-rpc/ptf_nn_agent.conf @@ -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 diff --git a/platform/nephos/docker-syncd-nephos.mk b/platform/nephos/docker-syncd-nephos.mk new file mode 100644 index 00000000000..a79c8524b89 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos.mk @@ -0,0 +1,19 @@ +# docker image for nephos syncd + +DOCKER_SYNCD_NEPHOS = docker-syncd-nephos.gz +$(DOCKER_SYNCD_NEPHOS)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos +$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD) +$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG) +$(DOCKER_SYNCD_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) +SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS) +ifneq ($(ENABLE_SYNCD_RPC),y) +SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS) +endif + +$(DOCKER_SYNCD_NEPHOS)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += --net=host --privileged -t +$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf +$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd +$(DOCKER_SYNCD_NEPHOS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro + +$(DOCKER_SYNCD_NEPHOS)_BASE_IMAGE_FILES += npx_diag:/usr/bin/npx_diag diff --git a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 new file mode 100755 index 00000000000..e0248d460a1 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 @@ -0,0 +1,31 @@ +FROM docker-config-engine + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update + +COPY \ +{% for deb in docker_syncd_nephos_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor -%} +debs/ + +RUN dpkg -i \ +{% for deb in docker_syncd_nephos_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor %} + +## TODO: add kmod into Depends +RUN apt-get install -f kmod + +COPY ["files/dsserve", "files/npx_diag", "start.sh", "/usr/bin/"] +RUN chmod +x /usr/bin/dsserve /usr/bin/npx_diag + +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"] diff --git a/platform/nephos/docker-syncd-nephos/base_image_files/npx_diag b/platform/nephos/docker-syncd-nephos/base_image_files/npx_diag new file mode 100755 index 00000000000..876bc1816ec --- /dev/null +++ b/platform/nephos/docker-syncd-nephos/base_image_files/npx_diag @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -i syncd npx_diag "$@" diff --git a/platform/nephos/docker-syncd-nephos/start.sh b/platform/nephos/docker-syncd-nephos/start.sh new file mode 100755 index 00000000000..62331605047 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos/start.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +rm -f /var/run/rsyslogd.pid + +supervisorctl start rsyslogd + +supervisorctl start syncd diff --git a/platform/nephos/docker-syncd-nephos/supervisord.conf b/platform/nephos/docker-syncd-nephos/supervisord.conf new file mode 100644 index 00000000000..1af5d70a1d0 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos/supervisord.conf @@ -0,0 +1,28 @@ +[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 diff --git a/platform/nephos/libsaithrift-dev.mk b/platform/nephos/libsaithrift-dev.mk new file mode 100644 index 00000000000..4103d5c0c7b --- /dev/null +++ b/platform/nephos/libsaithrift-dev.mk @@ -0,0 +1,7 @@ +# libsaithrift-dev package + +LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_0.9.4_amd64.deb +$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +$(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) +$(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI) +#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS) diff --git a/platform/nephos/one-image.mk b/platform/nephos/one-image.mk new file mode 100644 index 00000000000..8e9406dca89 --- /dev/null +++ b/platform/nephos/one-image.mk @@ -0,0 +1,10 @@ +# sonic nephos one image installer + +SONIC_ONE_IMAGE = sonic-nephos.bin +$(SONIC_ONE_IMAGE)_MACHINE = nephos +$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie +$(SONIC_ONE_IMAGE)_INSTALLS += $(NEPHOS_NPS_KERNEL) +$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9130_32X_PLATFORM_MODULE) \ + $(INGRASYS_S9230_64X_PLATFORM_MODULE) +$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) +SONIC_INSTALLERS += $(SONIC_ONE_IMAGE) diff --git a/platform/nephos/platform-modules-ingrasys.mk b/platform/nephos/platform-modules-ingrasys.mk new file mode 100644 index 00000000000..dde33e0b874 --- /dev/null +++ b/platform/nephos/platform-modules-ingrasys.mk @@ -0,0 +1,18 @@ +# Ingrasys S9130-32X and S9230-64X Platform modules + +INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION = 1.0.0 +INGRASYS_S9230_64X_PLATFORM_MODULE_VERSION = 1.0.0 + +export INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION +export INGRASYS_S9230_64X_PLATFORM_MODULE_VERSION + +INGRASYS_S9130_32X_PLATFORM_MODULE = sonic-platform-ingrasys-s9130-32x_$(INGRASYS_S9130_32X_PLATFORM_MODULE_VERSION)_amd64.deb +$(INGRASYS_S9130_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-ingrasys +$(INGRASYS_S9130_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +$(INGRASYS_S9130_32X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9130_32x-r0 +SONIC_DPKG_DEBS += $(INGRASYS_S9130_32X_PLATFORM_MODULE) + +INGRASYS_S9230_64X_PLATFORM_MODULE = sonic-platform-ingrasys-s9230-64x_$(INGRASYS_S9230_64X_PLATFORM_MODULE_VERSION)_amd64.deb +$(INGRASYS_S9230_64X_PLATFORM_MODULE)_PLATFORM = x86_64-ingrasys_s9230_64x-r0 + +$(eval $(call add_extra_package,$(INGRASYS_S9130_32X_PLATFORM_MODULE),$(INGRASYS_S9230_64X_PLATFORM_MODULE))) diff --git a/platform/nephos/platform.conf b/platform/nephos/platform.conf new file mode 100644 index 00000000000..e69de29bb2d diff --git a/platform/nephos/python-saithrift.mk b/platform/nephos/python-saithrift.mk new file mode 100644 index 00000000000..bc4a57b64cd --- /dev/null +++ b/platform/nephos/python-saithrift.mk @@ -0,0 +1,6 @@ +# python-saithrift package + +PYTHON_SAITHRIFT_NEPHOS = python-saithrift_0.9.4_amd64.deb +$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +$(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) +#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk new file mode 100644 index 00000000000..fc6200005db --- /dev/null +++ b/platform/nephos/rules.mk @@ -0,0 +1,26 @@ +include $(PLATFORM_PATH)/sdk.mk +include $(PLATFORM_PATH)/sai.mk +include $(PLATFORM_PATH)/platform-modules-ingrasys.mk +include $(PLATFORM_PATH)/docker-orchagent-nephos.mk +include $(PLATFORM_PATH)/docker-syncd-nephos.mk +include $(PLATFORM_PATH)/docker-syncd-nephos-rpc.mk +include $(PLATFORM_PATH)/one-image.mk +include $(PLATFORM_PATH)/libsaithrift-dev.mk +include $(PLATFORM_PATH)/python-saithrift.mk +#include $(PLATFORM_PATH)/docker-ptf-nephos.mk + +NPX_DIAG = npx_diag +$(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag_2.0.1-20171020" + +DSSERVE = dsserve +$(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/dsserve?sv=2015-04-05&sr=b&sig=gyNbgSL%2FvpMXDdpboVkIJcTKMRdGgEaOR9OukHhEsu8%3D&se=2030-03-31T23%3A06%3A35Z&sp=r" + +SONIC_ONLINE_FILES += $(NPX_DIAG) $(DSSERVE) + +SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM) + +# Inject nephos sai into sairedis +$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) #$(LIBSAITHRIFT_DEV_NEPHOS) + +# Runtime dependency on nephos sai is set only for syncd +$(SYNCD)_RDEPENDS += $(NEPHOS_SAI) diff --git a/platform/nephos/sai.mk b/platform/nephos/sai.mk new file mode 100644 index 00000000000..90ee027518e --- /dev/null +++ b/platform/nephos/sai.mk @@ -0,0 +1,9 @@ +NEPHOS_SAI = libsainps_2.0.2-20171204_amd64.deb +$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.2-20171204_amd64.deb" + +NEPHOS_SAI_DEV = libsainps-dev_2.0.2-20171124_amd64.deb +$(eval $(call add_derived_package,$(NEPHOS_SAI),$(NEPHOS_SAI_DEV))) +$(NEPHOS_SAI_DEV)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_2.0.2-20171124_amd64.deb" + +SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) +$(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI) diff --git a/platform/nephos/sdk.mk b/platform/nephos/sdk.mk new file mode 100644 index 00000000000..392ae459cc5 --- /dev/null +++ b/platform/nephos/sdk.mk @@ -0,0 +1,4 @@ +NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.2-20171204_amd64.deb +$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.2-20171204_amd64.deb" + +SONIC_ONLINE_DEBS += $(NEPHOS_NPS_KERNEL) diff --git a/platform/nephos/sonic-platform-modules-ingrasys b/platform/nephos/sonic-platform-modules-ingrasys new file mode 160000 index 00000000000..e8fd460120b --- /dev/null +++ b/platform/nephos/sonic-platform-modules-ingrasys @@ -0,0 +1 @@ +Subproject commit e8fd460120b73cc175b509a344345f30a70e3126 diff --git a/rules/ixgbe.mk b/rules/ixgbe.mk new file mode 100644 index 00000000000..bdd175eac86 --- /dev/null +++ b/rules/ixgbe.mk @@ -0,0 +1,8 @@ +# initramfs-tools package + +IXGBE_DRIVER_VERSION = 5.2.4 +export IXGBE_DRIVER_VERSION + +IXGBE_DRIVER = ixgbe.ko +$(IXGBE_DRIVER)_SRC_PATH = $(SRC_PATH)/ixgbe +SONIC_MAKE_DEBS += $(IXGBE_DRIVER) diff --git a/slave.mk b/slave.mk index 4843faee506..18d870d5056 100644 --- a/slave.mk +++ b/slave.mk @@ -394,6 +394,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(addprefix $(DEBS_PATH)/,$(INITRAMFS_TOOLS) \ $(LINUX_KERNEL) \ $(IGB_DRIVER) \ + $(IXGBE_DRIVER) \ $(SONIC_DEVICE_DATA) \ $(SONIC_UTILS) \ $(LIBPAM_TACPLUS) \ diff --git a/src/ixgbe/Makefile b/src/ixgbe/Makefile new file mode 100644 index 00000000000..133fc7db057 --- /dev/null +++ b/src/ixgbe/Makefile @@ -0,0 +1,22 @@ +.ONESHELL: +SHELL = /bin/bash +.SHELLFLAGS += -e + +MAIN_TARGET = ixgbe.ko + +$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : + rm -rf ./ixgbe-$(IXGBE_DRIVER_VERSION) + wget -O ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz "https://sonicstorage.blob.core.windows.net/packages/ixgbe-5.2.4.tar.gz?sv=2015-04-05&sr=b&sig=AaqJHHaPiJRp8R3HKobi0GNDgHAVnqijk6hpahwJ0Mg%3D&se=2154-10-05T22%3A19%3A29Z&sp=r" + tar xzf ixgbe-$(IXGBE_DRIVER_VERSION).tar.gz + + # Patch + pushd ./ixgbe-$(IXGBE_DRIVER_VERSION) + + # Build the package + pushd src + export BUILD_KERNEL=3.16.0-4-amd64 + make + popd + + popd + mv ./ixgbe-$(IXGBE_DRIVER_VERSION)/src/$* $(DEST)/ diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 345f179482d..3b817bbe14f 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 345f179482dbf5258cad088414bc9eb230decd97 +Subproject commit 3b817bbe14f1e5177e6200c7a80ab74db4768eaa From 683562cf2fff879a6133fc5a720a5687d41b9424 Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Sat, 23 Dec 2017 02:06:21 +0800 Subject: [PATCH 013/254] [Accton AS7816-64X] Add new platform and device for AS7816-64X. (#1260) Signed-off-by: roylee123 --- .../Accton-AS7816-64X/port_config.ini | 1 + .../Accton-AS7816-64X/sai.profile | 0 .../installer.conf | 1 + .../led_proc_init.soc | 0 .../x86_64-accton_as7816_64x-r0/minigraph.xml | 1074 +++++++++++++++++ .../plugins/eeprom.py | 21 + .../plugins/sfputil.py | 159 +++ platform/broadcom/one-image.mk | 1 + platform/broadcom/platform-modules-accton.mk | 7 + .../broadcom/sonic-platform-modules-accton | 2 +- 10 files changed, 1265 insertions(+), 1 deletion(-) create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/installer.conf create mode 100755 device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/plugins/eeprom.py create mode 100644 device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py diff --git a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini new file mode 100644 index 00000000000..f6c7b0c4a87 --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/port_config.ini @@ -0,0 +1 @@ +# name lanes alias diff --git a/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile b/device/accton/x86_64-accton_as7816_64x-r0/Accton-AS7816-64X/sai.profile new file mode 100644 index 00000000000..e69de29bb2d diff --git a/device/accton/x86_64-accton_as7816_64x-r0/installer.conf b/device/accton/x86_64-accton_as7816_64x-r0/installer.conf new file mode 100644 index 00000000000..5e62742c11b --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/installer.conf @@ -0,0 +1 @@ +CONSOLE_SPEED=115200 diff --git a/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7816_64x-r0/led_proc_init.soc new file mode 100755 index 00000000000..e69de29bb2d diff --git a/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml new file mode 100644 index 00000000000..025985c8367 --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml @@ -0,0 +1,1074 @@ + + + + + + ARISTA01T0 + 10.0.0.33 + switch1 + 10.0.0.32 + 1 + 180 + 60 + + + switch1 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 180 + 60 + + + ARISTA02T0 + 10.0.0.35 + switch1 + 10.0.0.34 + 1 + 180 + 60 + + + switch1 + 10.0.0.2 + ARISTA02T2 + 10.0.0.3 + 1 + 180 + 60 + + + ARISTA03T0 + 10.0.0.37 + switch1 + 10.0.0.36 + 1 + 180 + 60 + + + switch1 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 180 + 60 + + + ARISTA04T0 + 10.0.0.39 + switch1 + 10.0.0.38 + 1 + 180 + 60 + + + switch1 + 10.0.0.6 + ARISTA04T2 + 10.0.0.7 + 1 + 180 + 60 + + + ARISTA05T0 + 10.0.0.41 + switch1 + 10.0.0.40 + 1 + 180 + 60 + + + switch1 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 180 + 60 + + + ARISTA06T0 + 10.0.0.43 + switch1 + 10.0.0.42 + 1 + 180 + 60 + + + switch1 + 10.0.0.10 + ARISTA06T2 + 10.0.0.11 + 1 + 180 + 60 + + + ARISTA07T0 + 10.0.0.45 + switch1 + 10.0.0.44 + 1 + 180 + 60 + + + switch1 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 180 + 60 + + + ARISTA08T0 + 10.0.0.47 + switch1 + 10.0.0.46 + 1 + 180 + 60 + + + switch1 + 10.0.0.14 + ARISTA08T2 + 10.0.0.15 + 1 + 180 + 60 + + + ARISTA09T0 + 10.0.0.49 + switch1 + 10.0.0.48 + 1 + 180 + 60 + + + switch1 + 10.0.0.16 + ARISTA09T2 + 10.0.0.17 + 1 + 180 + 60 + + + ARISTA10T0 + 10.0.0.51 + switch1 + 10.0.0.50 + 1 + 180 + 60 + + + switch1 + 10.0.0.18 + ARISTA10T2 + 10.0.0.19 + 1 + 180 + 60 + + + ARISTA11T0 + 10.0.0.53 + switch1 + 10.0.0.52 + 1 + 180 + 60 + + + switch1 + 10.0.0.20 + ARISTA11T2 + 10.0.0.21 + 1 + 180 + 60 + + + ARISTA12T0 + 10.0.0.55 + switch1 + 10.0.0.54 + 1 + 180 + 60 + + + switch1 + 10.0.0.22 + ARISTA12T2 + 10.0.0.23 + 1 + 180 + 60 + + + ARISTA13T0 + 10.0.0.57 + switch1 + 10.0.0.56 + 1 + 180 + 60 + + + switch1 + 10.0.0.24 + ARISTA13T2 + 10.0.0.25 + 1 + 180 + 60 + + + ARISTA14T0 + 10.0.0.59 + switch1 + 10.0.0.58 + 1 + 180 + 60 + + + switch1 + 10.0.0.26 + ARISTA14T2 + 10.0.0.27 + 1 + 180 + 60 + + + ARISTA15T0 + 10.0.0.61 + switch1 + 10.0.0.60 + 1 + 180 + 60 + + + switch1 + 10.0.0.28 + ARISTA15T2 + 10.0.0.29 + 1 + 180 + 60 + + + ARISTA16T0 + 10.0.0.63 + switch1 + 10.0.0.62 + 1 + 180 + 60 + + + switch1 + 10.0.0.30 + ARISTA16T2 + 10.0.0.31 + 1 + 180 + 60 + + + + + 65100 + switch1 + + +
10.0.0.33
+ + +
+ +
10.0.0.1
+ + +
+ +
10.0.0.35
+ + +
+ +
10.0.0.3
+ + +
+ +
10.0.0.37
+ + +
+ +
10.0.0.5
+ + +
+ +
10.0.0.39
+ + +
+ +
10.0.0.7
+ + +
+ +
10.0.0.41
+ + +
+ +
10.0.0.9
+ + +
+ +
10.0.0.43
+ + +
+ +
10.0.0.11
+ + +
+ +
10.0.0.45
+ + +
+ +
10.0.0.13
+ + +
+ +
10.0.0.47
+ + +
+ +
10.0.0.15
+ + +
+ +
10.0.0.49
+ + +
+ +
10.0.0.17
+ + +
+ +
10.0.0.51
+ + +
+ +
10.0.0.19
+ + +
+ +
10.0.0.53
+ + +
+ +
10.0.0.21
+ + +
+ +
10.0.0.55
+ + +
+ +
10.0.0.23
+ + +
+ +
10.0.0.57
+ + +
+ +
10.0.0.25
+ + +
+ +
10.0.0.59
+ + +
+ +
10.0.0.27
+ + +
+ +
10.0.0.61
+ + +
+ +
10.0.0.29
+ + +
+ +
10.0.0.63
+ + +
+ +
10.0.0.31
+ + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 65200 + ARISTA02T2 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 65200 + ARISTA04T2 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 65200 + ARISTA06T2 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 65200 + ARISTA08T2 + + + + 64009 + ARISTA09T0 + + + + 65200 + ARISTA09T2 + + + + 64010 + ARISTA10T0 + + + + 65200 + ARISTA10T2 + + + + 64011 + ARISTA11T0 + + + + 65200 + ARISTA11T2 + + + + 64012 + ARISTA12T0 + + + + 65200 + ARISTA12T2 + + + + 64013 + ARISTA13T0 + + + + 65200 + ARISTA13T2 + + + + 64014 + ARISTA14T0 + + + + 65200 + ARISTA14T2 + + + + 64015 + ARISTA15T0 + + + + 65200 + ARISTA15T2 + + + + 64016 + ARISTA16T0 + + + + 65200 + ARISTA16T2 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + + + + + + switch1 + + + + + + Ethernet0 + 10.0.0.0/31 + + + + Ethernet4 + 10.0.0.2/31 + + + + Ethernet8 + 10.0.0.4/31 + + + + Ethernet12 + 10.0.0.6/31 + + + + Ethernet16 + 10.0.0.8/31 + + + + Ethernet20 + 10.0.0.10/31 + + + + Ethernet24 + 10.0.0.12/31 + + + + Ethernet28 + 10.0.0.14/31 + + + + Ethernet32 + 10.0.0.16/31 + + + + Ethernet36 + 10.0.0.18/31 + + + + Ethernet40 + 10.0.0.20/31 + + + + Ethernet44 + 10.0.0.22/31 + + + + Ethernet48 + 10.0.0.24/31 + + + + Ethernet52 + 10.0.0.26/31 + + + + Ethernet56 + 10.0.0.28/31 + + + + Ethernet60 + 10.0.0.30/31 + + + + Ethernet64 + 10.0.0.32/31 + + + + Ethernet68 + 10.0.0.34/31 + + + + Ethernet72 + 10.0.0.36/31 + + + + Ethernet76 + 10.0.0.38/31 + + + + Ethernet80 + 10.0.0.40/31 + + + + Ethernet84 + 10.0.0.42/31 + + + + Ethernet88 + 10.0.0.44/31 + + + + Ethernet92 + 10.0.0.46/31 + + + + Ethernet96 + 10.0.0.48/31 + + + + Ethernet100 + 10.0.0.50/31 + + + + Ethernet104 + 10.0.0.52/31 + + + + Ethernet108 + 10.0.0.54/31 + + + + Ethernet112 + 10.0.0.56/31 + + + + Ethernet116 + 10.0.0.58/31 + + + + Ethernet120 + 10.0.0.60/31 + + + + Ethernet124 + 10.0.0.62/31 + + + + + + + + + + + + DeviceInterfaceLink + switch1 + Ethernet0 + ARISTA01T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet4 + ARISTA02T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet8 + ARISTA03T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet12 + ARISTA04T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet16 + ARISTA05T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet20 + ARISTA06T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet24 + ARISTA07T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet28 + ARISTA08T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet32 + ARISTA09T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet36 + ARISTA10T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet40 + ARISTA11T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet44 + ARISTA12T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet48 + ARISTA13T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet52 + ARISTA14T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet56 + ARISTA15T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet60 + ARISTA16T2 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet64 + ARISTA01T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet68 + ARISTA02T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet72 + ARISTA03T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet76 + ARISTA04T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet80 + ARISTA05T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet84 + ARISTA06T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet88 + ARISTA07T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet92 + ARISTA08T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet96 + ARISTA09T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet100 + ARISTA10T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet104 + ARISTA11T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet108 + ARISTA12T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet112 + ARISTA13T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet116 + ARISTA14T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet120 + ARISTA15T0 + Ethernet1 + + + DeviceInterfaceLink + switch1 + Ethernet124 + ARISTA16T0 + Ethernet1 + + + + + switch1 + Accton-AS7712-32X + + + + + + + switch1 + + + DhcpResources + + + + + NtpResources + + 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org + + + SyslogResources + + + + + + + + + switch1 + Accton-AS7712-32X +
diff --git a/device/accton/x86_64-accton_as7816_64x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7816_64x-r0/plugins/eeprom.py new file mode 100644 index 00000000000..1e7d1046d93 --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/plugins/eeprom.py @@ -0,0 +1,21 @@ +#!/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 + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py new file mode 100644 index 00000000000..7c82583c26b --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/plugins/sfputil.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python + +try: + import time + from sonic_sfp.sfputilbase import SfpUtilBase +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + + +class SfpUtil(SfpUtilBase): + """Platform specific SfpUtill class""" + + _port_start = 0 + _port_end = 63 + ports_in_block = 64 + + _port_to_eeprom_mapping = {} + port_to_i2c_mapping = { + 61 : 25, + 62 : 26, + 63 : 27, + 64 : 28, + 55 : 29, + 56 : 30, + 53 : 31, + 54 : 32, + 9 : 33, + 10 : 34, + 11 : 35, + 12 : 36, + 1 : 37, + 2 : 38, + 3 : 39, + 4 : 40, + 6 : 41, + 5 : 42, + 8 : 43, + 7 : 44, + 13 : 45, + 14 : 46, + 15 : 47, + 16 : 48, + 17 : 49, + 18 : 50, + 19 : 51, + 20 : 52, + 25 : 53, + 26 : 54, + 27 : 55, + 28 : 56, + 29 : 57, + 30 : 58, + 31 : 59, + 32 : 60, + 21 : 61, + 22 : 62, + 23 : 63, + 24 : 64, + 41 : 65, + 42 : 66, + 43 : 67, + 44 : 68, + 33 : 69, + 34 : 70, + 35 : 71, + 36 : 72, + 45 : 73, + 46 : 74, + 47 : 75, + 48 : 76, + 37 : 77, + 38 : 78, + 39 : 79, + 40 : 80, + 57 : 81, + 58 : 82, + 59 : 83, + 60 : 84, + 49 : 85, + 50 : 86, + 51 : 87, + 52 : 88,} + + _qsfp_ports = range(0, ports_in_block + 1) + + def __init__(self): + eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' + for x in range(0, self._port_end + 1): + port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) + self._port_to_eeprom_mapping[x] = port_eeprom_path + SfpUtilBase.__init__(self) + + def reset(self, port_num): + # Check for invalid port_num + if port_num < self._port_start or port_num > self._port_end: + return False + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_port_reset" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + try: + reg_file = open(port_ps, 'w') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + #toggle reset + reg_file.seek(0) + reg_file.write('1') + time.sleep(1) + reg_file.seek(0) + reg_file.write('0') + reg_file.close() + return True + + def set_low_power_mode(self, port_nuM, lpmode): + raise NotImplementedErro + + def get_low_power_mode(self, port_num): + raise NotImplementedErro + + 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 + + path = "/sys/bus/i2c/devices/{0}-0050/sfp_is_present" + port_ps = path.format(self.port_to_i2c_mapping[port_num+1]) + + + try: + reg_file = open(port_ps) + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = reg_file.readline().rstrip() + if reg_value == '1': + return True + + return False + + @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 + + diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk index 5b2afedee7d..a29d32abd1c 100755 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -14,6 +14,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ $(INGRASYS_S9200_64X_PLATFORM_MODULE) \ $(ACCTON_AS7712_32X_PLATFORM_MODULE) \ $(ACCTON_AS5712_54X_PLATFORM_MODULE) \ + $(ACCTON_AS7816_64X_PLATFORM_MODULE) \ $(INVENTEC_D7032Q28B_PLATFORM_MODULE) \ $(INVENTEC_D7054Q28B_PLATFORM_MODULE) \ $(CEL_DX010_PLATFORM_MODULE) \ diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk index 7030ecb441f..c03ca594424 100755 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -2,9 +2,11 @@ ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION = 1.1 +ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION = 1.1 export ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION export ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION +export ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton @@ -16,3 +18,8 @@ ACCTON_AS5712_54X_PLATFORM_MODULE = sonic-platform-accton-as5712-54x_$(ACCTON_AS $(ACCTON_AS5712_54X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as5712_54x-r0 $(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS5712_54X_PLATFORM_MODULE))) SONIC_DPKG_DEBS += $(ACCTON_AS5712_54X_PLATFORM_MODULE) + +ACCTON_AS7816_64X_PLATFORM_MODULE = sonic-platform-accton-as7816-64x_$(ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION)_amd64.deb +$(ACCTON_AS7816_64X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7816_64x-r0 + +$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7816_64X_PLATFORM_MODULE))) diff --git a/platform/broadcom/sonic-platform-modules-accton b/platform/broadcom/sonic-platform-modules-accton index 7c39d916d2b..e66b74fcf7a 160000 --- a/platform/broadcom/sonic-platform-modules-accton +++ b/platform/broadcom/sonic-platform-modules-accton @@ -1 +1 @@ -Subproject commit 7c39d916d2b5d248c8067669e72b75ed7240b348 +Subproject commit e66b74fcf7a943d8c7c8f241a8221eca65171ced From 15d433d975d403bbb490c12b71aec5e6f5b810ab Mon Sep 17 00:00:00 2001 From: lguohan Date: Sat, 23 Dec 2017 23:34:15 -0800 Subject: [PATCH 014/254] [build]: allow to use http(s) proxy in the build (#1265) * allow to use http(s) proxy in the build To enable this, use following command http_proxy=[your_proxy] https_proxy=[your_proxy] make --- Makefile | 8 ++++++- README.md | 7 ++++-- build_debian.sh | 12 +++++++--- .../build_templates/sonic_debian_extension.j2 | 8 +++---- slave.mk | 22 ++++++++++++++++--- 5 files changed, 44 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 8d864e914aa..aa3492561cb 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,14 @@ SLAVE_IMAGE = sonic-slave-$(USER) DOCKER_RUN := docker run --rm=true --privileged \ -v $(PWD):/sonic \ -w /sonic \ + -e "http_proxy=$(http_proxy)" \ + -e "https_proxy=$(https_proxy)" \ -i$(if $(TERM),t,) DOCKER_BASE_BUILD = docker build --no-cache \ -t $(SLAVE_BASE_IMAGE) \ + --build-arg http_proxy=$(http_proxy) \ + --build-arg https_proxy=$(https_proxy) \ sonic-slave && \ docker tag $(SLAVE_BASE_IMAGE):latest $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) @@ -61,7 +65,9 @@ SONIC_BUILD_INSTRUCTION := make \ ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \ PASSWORD=$(PASSWORD) \ USERNAME=$(USERNAME) \ - SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) + SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \ + HTTP_PROXY=$(http_proxy) \ + HTTPS_PROXY=$(https_proxy) .PHONY: sonic-slave-build sonic-slave-bash init reset diff --git a/README.md b/README.md index 0a361e38abe..ea721a48e9e 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,11 @@ To build SONiC installer image and docker images, run the following commands: make - **NOTE**: We recommend reserving 50G free space to build one platform. - + **NOTE**: + +- We recommend reserving 50G free space to build one platform. +- Use ```http_proxy=[your_proxy] https_proxy=[your_proxy] make``` to enable http(s) proxy in the build process. + The SONiC installer contains all docker images needed. SONiC uses one image for all devices of a same ASIC vendor. The supported ASIC vendors are: - PLATFORM=broadcom diff --git a/build_debian.sh b/build_debian.sh index 15bde44c112..1aaa660eefd 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -68,7 +68,7 @@ touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime ## Build a basic Debian system by debootstrap echo '[INFO] Debootstrap...' -sudo debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://ftp.us.debian.org/debian +sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://ftp.us.debian.org/debian ## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...' sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname" @@ -79,6 +79,9 @@ sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '127.0.0.1 localhos sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'echo "proc /proc proc defaults 0 0" >> /etc/fstab' sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'echo "sysfs /sys sysfs defaults 0 0" >> /etc/fstab' +## Setup proxy +[ -n "$http_proxy" ] && sudo /bin/bash -c "echo 'Acquire::http::Proxy \"$http_proxy\";' > $FILESYSTEM_ROOT/etc/apt/apt.conf.d/01proxy" + ## Note: mounting is necessary to makedev and install linux image echo '[INFO] Mount all' ## Output all the mounted device for troubleshooting @@ -290,8 +293,8 @@ set /files/etc/sysctl.conf/net.core.rmem_max 2097152 " -r $FILESYSTEM_ROOT ## docker-py is needed by Ansible docker module -sudo LANG=C chroot $FILESYSTEM_ROOT easy_install pip -sudo LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0' +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0' ## Note: keep pip installed for maintainance purpose ## Create /var/run/redis folder for docker-database to mount @@ -342,6 +345,9 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean sudo LANG=C chroot $FILESYSTEM_ROOT apt-get clean sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'rm -rf /usr/share/doc/* /usr/share/locale/* /var/lib/apt/lists/* /tmp/*' +## Clean up proxy +[ -n "$http_proxy" ] && sudo rm -f $FILESYSTEM_ROOT/etc/apt/apt.conf.d/01proxy + ## Umount all echo '[INFO] Umount all' ## Display all process details access /proc diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 7de8f859791..bf603d249d9 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -64,17 +64,17 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in # Install SONiC config engine Python package CONFIG_ENGINE_WHEEL_NAME=$(basename {{config_engine_wheel_path}}) sudo cp {{config_engine_wheel_path}} $FILESYSTEM_ROOT/$CONFIG_ENGINE_WHEEL_NAME -sudo LANG=C chroot $FILESYSTEM_ROOT pip install $CONFIG_ENGINE_WHEEL_NAME +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $CONFIG_ENGINE_WHEEL_NAME sudo rm -rf $FILESYSTEM_ROOT/$CONFIG_ENGINE_WHEEL_NAME # Install Python client for Redis -sudo LANG=C chroot $FILESYSTEM_ROOT pip install redis -sudo LANG=C chroot $FILESYSTEM_ROOT pip install redis-dump-load +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install redis +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install redis-dump-load # Install SwSS SDK Python 2 package SWSSSDK_PY2_WHEEL_NAME=$(basename {{swsssdk_py2_wheel_path}}) sudo cp {{swsssdk_py2_wheel_path}} $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME -sudo LANG=C chroot $FILESYSTEM_ROOT pip install $SWSSSDK_PY2_WHEEL_NAME +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $SWSSSDK_PY2_WHEEL_NAME sudo rm -rf $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME # Install SONiC Utilities (and its dependencies via 'apt-get -y install -f') diff --git a/slave.mk b/slave.mk index 18d870d5056..425ba4c41d8 100644 --- a/slave.mk +++ b/slave.mk @@ -100,6 +100,8 @@ $(info "SONIC_CONFIG_DEBUG" : "$(SONIC_CONFIG_DEBUG)") $(info "ROUTING_STACK" : "$(SONIC_ROUTING_STACK)") $(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)") $(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)") +$(info "HTTP_PROXY" : "$(HTTP_PROXY)") +$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)") $(info ) ############################################################################### @@ -329,7 +331,7 @@ $(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuff # put a lock here to avoid race conditions while true; do if mkdir $(PYTHON_WHEELS_PATH)/pip_lock &> /dev/null; then - { sudo pip$($*_PYTHON_VERSION) install $(PYTHON_WHEELS_PATH)/$* $(LOG) && rm -d $(PYTHON_WHEELS_PATH)/pip_lock && break; } || { rm -d $(PYTHON_WHEELS_PATH)/pip_lock && exit 1 ; } + { sudo -E pip$($*_PYTHON_VERSION) install $(PYTHON_WHEELS_PATH)/$* $(LOG) && rm -d $(PYTHON_WHEELS_PATH)/pip_lock && break; } || { rm -d $(PYTHON_WHEELS_PATH)/pip_lock && exit 1 ; } fi done $(FOOTER) @@ -340,12 +342,20 @@ $(SONIC_INSTALL_WHEELS) : $(PYTHON_WHEELS_PATH)/%-install : .platform $$(addsuff # start docker daemon docker-start : + @sudo sed -i '/http_proxy/d' /etc/default/docker + @sudo bash -c "echo \"export http_proxy=$$http_proxy\" >> /etc/default/docker" @sudo service docker status &> /dev/null || ( sudo service docker start &> /dev/null && sleep 1 ) # targets for building simple docker images that do not depend on any debian packages $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform docker-start $$(addsuffix -load,$$(addprefix $(TARGET_PATH)/,$$($$*.gz_LOAD_DOCKERS))) $(HEADER) - docker build --squash --no-cache --build-arg user=$(USER) --build-arg uid=$(UID) --build-arg guid=$(GUID) -t $* $($*.gz_PATH) $(LOG) + docker build --squash --no-cache \ + --build-arg http_proxy=$(HTTP_PROXY) \ + --build-arg https_proxy=$(HTTPS_PROXY) \ + --build-arg user=$(USER) \ + --build-arg uid=$(UID) \ + --build-arg guid=$(GUID) \ + -t $* $($*.gz_PATH) $(LOG) docker save $* | gzip -c > $@ $(FOOTER) @@ -365,7 +375,13 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .pl $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_whls=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_WHEELS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile - docker build --squash --no-cache --build-arg user=$(USER) --build-arg uid=$(UID) --build-arg guid=$(GUID) -t $* $($*.gz_PATH) $(LOG) + docker build --squash --no-cache \ + --build-arg http_proxy=$(HTTP_PROXY) \ + --build-arg https_proxy=$(HTTPS_PROXY) \ + --build-arg user=$(USER) \ + --build-arg uid=$(UID) \ + --build-arg guid=$(GUID) \ + -t $* $($*.gz_PATH) $(LOG) docker save $* | gzip -c > $@ $(FOOTER) From 5c40aa52ac60517b4da37b6eac10d82059c35efd Mon Sep 17 00:00:00 2001 From: lguohan Date: Mon, 25 Dec 2017 18:42:51 -0800 Subject: [PATCH 015/254] [build]: add build badge for nephos platform (#1267) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea721a48e9e..db4ac55d5fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ *master*: Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all) Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all) +Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all) P4: [![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all) VS: [![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all) @@ -7,7 +8,7 @@ VS: [![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimag Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/) Cavium: [![Cavium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/) Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/) -Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/) +Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/) Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/) Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/) From 5eb5e2162ba9697384c82712d2bba3f05d012a42 Mon Sep 17 00:00:00 2001 From: chenyuqiang Date: Thu, 28 Dec 2017 03:25:53 +0800 Subject: [PATCH 016/254] [centec]: support sai1.0 (#1268) --- platform/centec/sai.mk | 2 +- platform/centec/sdk.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/centec/sai.mk b/platform/centec/sai.mk index de8615ac132..299b36a69eb 100644 --- a/platform/centec/sai.mk +++ b/platform/centec/sai.mk @@ -1,5 +1,5 @@ # Centec SAI CENTEC_SAI = libsai_1.0.0_amd64.deb -$(CENTEC_SAI)_URL = https://github.com/CentecNetworks/goldengate-sai/raw/master/lib/SONiC_0.9.4/libsai_1.0.0_amd64.deb +$(CENTEC_SAI)_URL = https://github.com/CentecNetworks/goldengate-sai/raw/master/lib/SONiC_1.0/libsai_1.0.0_amd64.deb SONIC_ONLINE_DEBS += $(CENTEC_SAI) diff --git a/platform/centec/sdk.mk b/platform/centec/sdk.mk index ac1939122f4..e3ce05f6b74 100644 --- a/platform/centec/sdk.mk +++ b/platform/centec/sdk.mk @@ -1,4 +1,4 @@ CENTEC_SDK_KERNEL = centec-gg-sdk3.5-modules-3.16.0-4-amd64.deb -$(CENTEC_SDK_KERNEL)_URL = "https://github.com/CentecNetworks/goldengate-sai/raw/master/lib/centec-gg-sdk3.5-modules-3.16.0-4-amd64.deb" +$(CENTEC_SDK_KERNEL)_URL = "https://github.com/CentecNetworks/goldengate-sai/raw/master/lib/SONiC_1.0/centec-gg-sdk3.5-modules-3.16.0-4-amd64.deb" SONIC_ONLINE_DEBS += $(CENTEC_SDK_KERNEL) From 22eea55c9b348e539e867b6cabdd3b1df30289f7 Mon Sep 17 00:00:00 2001 From: wadelnn Date: Sat, 30 Dec 2017 02:41:43 +0800 Subject: [PATCH 017/254] [Platform] Add psuutil and update submodule for Ingrasys S9100-32X, S8810-32Q, S9200-64X on master branch (#1271) * [platform] Add Psuutil and fixed voltage alarm for S9100 * Add I2C CPLD kernel module for psuutil. * Support psuutil script. * Add voltage min and max threshold. Signed-off-by: Wade He * [Platform] Add Psuutil and update sensors.conf for S8810-32Q and S9200-64X * Support psuutil script. * Update sensors.conf for tmp75. Signed-off-by: Wade He --- .../plugins/psuutil.py | 92 +++++++++++++++++++ .../plugins/psuutil.py | 92 +++++++++++++++++++ .../x86_64-ingrasys_s9100-r0/sensors.conf | 10 ++ .../plugins/psuutil.py | 92 +++++++++++++++++++ .../x86_64-ingrasys_s9200_64x-r0/sensors.conf | 16 +++- .../broadcom/sonic-platform-modules-ingrasys | 2 +- 6 files changed, 300 insertions(+), 4 deletions(-) create mode 100644 device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py create mode 100644 device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py diff --git a/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py new file mode 100644 index 00000000000..7e69360b040 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s8810_32q-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# 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""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-3/3-0051", + "/sys/bus/i2c/devices/i2c-4/4-0051"] + + 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 + :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 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # 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 + :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 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4f226c69fff --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9100-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# 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""" + + PSU_CPLD_DIR = "/sys/bus/i2c/devices/0-0033" + + 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 + :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 + mask = [ 0x08, 0x10 ] + attr_file = 'cpld_pw_good' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU status + if (attr_value & mask[index-1]): + status = 1 + + return status + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by 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 + mask = [ 0x01, 0x02 ] + attr_file ='cpld_pw_abs' + attr_path = self.PSU_CPLD_DIR +'/'+ attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (~attr_value & mask[index-1]): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf index c55f5c764e6..5535db7e7eb 100644 --- a/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf +++ b/device/ingrasys/x86_64-ingrasys_s9100-r0/sensors.conf @@ -9,14 +9,24 @@ chip "jc42-*" chip "w83795adg-*" label in0 "1.0V" + set in0_min 1.00 * 0.97 + set in0_max 1.00 * 1.03 label in1 "1.0V_ROV" + set in1_min 1.00 * 0.98 + set in1_max 1.00 * 1.02 label in2 "1.25V" + set in2_min 1.25 * 0.97 + set in2_max 1.25 * 1.03 label in3 "1.8V" + set in3_min 1.80 * 0.97 + set in3_max 1.80 * 1.03 ignore in4 ignore in5 ignore in6 ignore in7 label in12 "+3.3V" + set in12_min 3.30 * 0.97 + set in12_max 3.30 * 1.03 ignore in14 ignore in15 ignore in16 diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..cc996057e09 --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# 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""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-18/18-0050", + "/sys/bus/i2c/devices/i2c-17/17-0050"] + + 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 + :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 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # 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 + :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 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf index ef694e96a05..065c1ebddf3 100644 --- a/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf +++ b/device/ingrasys/x86_64-ingrasys_s9200_64x-r0/sensors.conf @@ -49,20 +49,30 @@ chip "w83795adg-*" ignore temp3 ignore temp4 ignore intrusion0 + +chip "tmp75-i2c-*-4A" + label temp1 "BMC Board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + +chip "tmp75-i2c-*-4F" + label temp1 "x86 CPU Board Temp" + set temp1_max 50 + set temp1_max_hyst 45 + bus "i2c-6" "i2c-0-mux (chan_id 5)" chip "lm75-i2c-6-4E" label temp1 "MAC Temp" set temp1_max 50 set temp1_max_hyst 45 -bus "i2c-6" "i2c-0-mux (chan_id 5)" chip "lm75-i2c-6-4D" - label temp1 "REAR Temp" + label temp1 "REAR MAC Temp" set temp1_max 50 set temp1_max_hyst 45 bus "i2c-7" "i2c-0-mux (chan_id 6)" chip "lm75-i2c-7-4D" - label temp1 "Front Temp" + label temp1 "Front MAC Temp" set temp1_max 50 set temp1_max_hyst 45 diff --git a/platform/broadcom/sonic-platform-modules-ingrasys b/platform/broadcom/sonic-platform-modules-ingrasys index 1d9ccb21aaf..f2dc0aa6b96 160000 --- a/platform/broadcom/sonic-platform-modules-ingrasys +++ b/platform/broadcom/sonic-platform-modules-ingrasys @@ -1 +1 @@ -Subproject commit 1d9ccb21aaf868a788fd593ff1c03fdaf150eaf0 +Subproject commit f2dc0aa6b96ab293b4ae6ebf3a942851dd9324b7 From 08b81f310a8c985e7db7c4ce39431a9798a8f7a8 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Wed, 3 Jan 2018 01:21:27 -0800 Subject: [PATCH 018/254] [submodules]: Update swss and utilitiles modules (#1276) --- src/sonic-swss | 2 +- src/sonic-utilities | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-swss b/src/sonic-swss index fab3cea5b07..fbe781de821 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit fab3cea5b075ccdd26eb6d56cc68d6325bfb8b16 +Subproject commit fbe781de82197304d6622736271649d4ac10de67 diff --git a/src/sonic-utilities b/src/sonic-utilities index 8677d5f457c..5ad84866491 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 8677d5f457c9a20f0fac2a4fdde569a8338c77e3 +Subproject commit 5ad84866491e7d4cf4cebcb96e469423c9c91961 From 41f14fcfef42d0e8d5995690902b95895bf51009 Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Thu, 4 Jan 2018 03:26:27 +0800 Subject: [PATCH 019/254] [Platform] Add psuutil support for Ingrasys S9130-32X (#1273) Update psuutil and psu kernel module on S9230 --- .../plugins/psuutil.py | 92 +++++++++++++++++++ .../plugins/psuutil.py | 4 +- .../nephos/sonic-platform-modules-ingrasys | 2 +- 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4a029c15b1a --- /dev/null +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/plugins/psuutil.py @@ -0,0 +1,92 @@ +# +# 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""" + + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-10/10-0050", + "/sys/bus/i2c/devices/i2c-9/9-0050"] + + 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 + :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 + attr_file = 'psu_pg' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # 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 + :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 + psu_absent = 0 + attr_file ='psu_abs' + attr_path = self.SYSFS_PSU_DIR[index-1] +'/' + attr_file + + attr_value = self.get_attr_value(attr_path) + + if (attr_value != 'ERR'): + attr_value = int(attr_value, 16) + # Check for PSU presence + if (attr_value == 0): + status = 1 + + return status + diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py index 91d7de05dc8..cc996057e09 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/plugins/psuutil.py @@ -15,8 +15,8 @@ class PsuUtil(PsuBase): """Platform-specific PSUutil class""" - SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-17/17-0050", - "/sys/bus/i2c/devices/i2c-18/18-0050"] + SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-18/18-0050", + "/sys/bus/i2c/devices/i2c-17/17-0050"] def __init__(self): PsuBase.__init__(self) diff --git a/platform/nephos/sonic-platform-modules-ingrasys b/platform/nephos/sonic-platform-modules-ingrasys index e8fd460120b..b03499ed1d7 160000 --- a/platform/nephos/sonic-platform-modules-ingrasys +++ b/platform/nephos/sonic-platform-modules-ingrasys @@ -1 +1 @@ -Subproject commit e8fd460120b73cc175b509a344345f30a70e3126 +Subproject commit b03499ed1d72a239ed386e40370b146c9a479eaa From f8d32aa9f10849b915b17abc0e39cc5e06bab71d Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Thu, 4 Jan 2018 03:42:49 +0800 Subject: [PATCH 020/254] [platform]: As7712 32x add fancontrol (#1270) * Update sonic-platform-modules-accton to lastest Signed-off-by: roylee123 * [AS7712-32X] Add fancontrol. Signed-off-by: roylee123 * [AS7712-32X] add psuutil.py and sensors.conf Signed-off-by: roylee123 * Remove 1 reduntant line. Signed-off-by: roylee123 * [AS7712-32X] Change fan driver to support fancontrol. Signed-off-by: roylee123 --- .../x86_64-accton_as7712_32x-r0/fancontrol | 9 +++ .../plugins/psuutil.py | 61 +++++++++++++++++++ .../x86_64-accton_as7712_32x-r0/sensors.conf | 22 +++++++ platform/broadcom/platform-modules-accton.mk | 3 +- .../broadcom/sonic-platform-modules-accton | 2 +- 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 device/accton/x86_64-accton_as7712_32x-r0/fancontrol create mode 100644 device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py create mode 100644 device/accton/x86_64-accton_as7712_32x-r0/sensors.conf diff --git a/device/accton/x86_64-accton_as7712_32x-r0/fancontrol b/device/accton/x86_64-accton_as7712_32x-r0/fancontrol new file mode 100644 index 00000000000..9d057024f94 --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/fancontrol @@ -0,0 +1,9 @@ +INTERVAL=10 +FCTEMPS=/sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/sys_temp +FCFANS=/sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan1_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan2_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan3_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan4_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan5_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan6_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan11_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan12_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan13_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan14_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan15_input /sys/bus/i2c/devices/2-0066/pwm1=/sys/bus/i2c/devices/2-0066/fan16_input +MINTEMP=/sys/bus/i2c/devices/2-0066/pwm1=135 +MAXTEMP=/sys/bus/i2c/devices/2-0066/pwm1=160 +MINSTART=/sys/bus/i2c/devices/2-0066/pwm1=100 +MINSTOP=/sys/bus/i2c/devices/2-0066/pwm1=32 +MINPWM=/sys/bus/i2c/devices/2-0066/pwm1=32 +MAXPWM=/sys/bus/i2c/devices/2-0066/pwm1=69 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py new file mode 100644 index 00000000000..d7600a2af4b --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +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) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "11-0053", + 2: "10-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf new file mode 100644 index 00000000000..21e1817916f --- /dev/null +++ b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf @@ -0,0 +1,22 @@ +# libsensors configuration file for AS7712-32X +# ------------------------------------------------ +# + +chip "ym2651-*" + label power1 "PSU Output Power" + label temp1 "Power Supply Temp" + label fan1 "Fan Speed" + +chip "as7712_32x_fan-*" + label fan1 "Fan tray 1 front" + label fan2 "Fan tray 2 front" + label fan3 "Fan tray 3 front" + label fan4 "Fan tray 4 front" + label fan5 "Fan tray 5 front" + label fan6 "Fan tray 6 front" + label fan11 "Fan tray 1 rear" + label fan12 "Fan tray 2 rear" + label fan13 "Fan tray 3 rear" + label fan14 "Fan tray 4 rear" + label fan15 "Fan tray 5 rear" + label fan16 "Fan tray 6 rear" diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk index c03ca594424..7dcfb937de6 100755 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -17,9 +17,8 @@ SONIC_DPKG_DEBS += $(ACCTON_AS7712_32X_PLATFORM_MODULE) ACCTON_AS5712_54X_PLATFORM_MODULE = sonic-platform-accton-as5712-54x_$(ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS5712_54X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as5712_54x-r0 $(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS5712_54X_PLATFORM_MODULE))) -SONIC_DPKG_DEBS += $(ACCTON_AS5712_54X_PLATFORM_MODULE) ACCTON_AS7816_64X_PLATFORM_MODULE = sonic-platform-accton-as7816-64x_$(ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS7816_64X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7816_64x-r0 - $(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7816_64X_PLATFORM_MODULE))) + diff --git a/platform/broadcom/sonic-platform-modules-accton b/platform/broadcom/sonic-platform-modules-accton index e66b74fcf7a..dfff9a88cd9 160000 --- a/platform/broadcom/sonic-platform-modules-accton +++ b/platform/broadcom/sonic-platform-modules-accton @@ -1 +1 @@ -Subproject commit e66b74fcf7a943d8c7c8f241a8221eca65171ced +Subproject commit dfff9a88cd94da081e80222872c33859e4132365 From b2109b0cec9c5ce3a52dde7639d9657459850aa8 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Wed, 3 Jan 2018 12:20:19 -0800 Subject: [PATCH 021/254] Disable autosuspend for USB devices, preventing usb drives to be stopped and then renamed (#1275) --- installer/x86_64/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 2a62132be05..c7f184bf024 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -551,7 +551,7 @@ menuentry '$demo_grub_entry' { insmod ext2 linux /$image_dir/boot/vmlinuz-3.16.0-4-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \ loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs \ - apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX + apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE usbcore.autosuspend=-1 $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX echo 'Loading $demo_volume_label $demo_type initial ramdisk ...' initrd /$image_dir/boot/initrd.img-3.16.0-4-amd64 } From 39a99e1a07fa04a4fe2ac7f038d2d58fe293c5f1 Mon Sep 17 00:00:00 2001 From: Taoyu Li Date: Wed, 3 Jan 2018 21:43:06 -0800 Subject: [PATCH 022/254] [image]: Explicitly specify kernel_version as string (#1280) --- build_debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_debian.sh b/build_debian.sh index 1aaa660eefd..89fd1c77daa 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -318,7 +318,7 @@ sudo cp files/dhcp/dhclient.conf $FILESYSTEM_ROOT/etc/dhcp/ sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic sudo tee $FILESYSTEM_ROOT/etc/sonic/sonic_version.yml > /dev/null < Date: Wed, 3 Jan 2018 21:45:08 -0800 Subject: [PATCH 023/254] [doc]: update sonic-buildimage clone instructions (#1278) * [doc]: update sonic-buildimage clone instructions --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db4ac55d5fe..e368b60291b 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,17 @@ Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadma ## Clone or fetch the code repository with all git submodules To clone the code repository recursively, assuming git version 1.9 or newer: - git clone --recursive https://github.com/Azure/sonic-buildimage.git + git clone https://github.com/Azure/sonic-buildimage.git ## Usage To build SONiC installer image and docker images, run the following commands: + cd sonic-buildimage + + # (Optional) Checkout a specific branch. By default, it uses master branch + git checkout [branch_name] + # Execute make init once after cloning the repo, or fetched remote repo with submodule updates make init From f077f41ce940723c501c5b4b1f068fc56b12bdda Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Wed, 3 Jan 2018 22:22:58 -0800 Subject: [PATCH 024/254] Let debootstrap uses the same sources link as apt (#1279) --- build_debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_debian.sh b/build_debian.sh index 89fd1c77daa..01dca9a03ac 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -68,7 +68,7 @@ touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime ## Build a basic Debian system by debootstrap echo '[INFO] Debootstrap...' -sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://ftp.us.debian.org/debian +sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://debian-archive.trafficmanager.net/debian ## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...' sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname" From a27b3d54e72c218b42af504d66b0e5d253979651 Mon Sep 17 00:00:00 2001 From: lguohan Date: Thu, 4 Jan 2018 12:45:36 -0800 Subject: [PATCH 025/254] [platform]: chmod a+x for debian/rules for platform-modules-delta (#1282) --- platform/broadcom/sonic-platform-modules-delta/debian/rules | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 platform/broadcom/sonic-platform-modules-delta/debian/rules diff --git a/platform/broadcom/sonic-platform-modules-delta/debian/rules b/platform/broadcom/sonic-platform-modules-delta/debian/rules old mode 100644 new mode 100755 From ffc19d3e9d0fdf3570f8149a824207a0be2ded54 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Fri, 5 Jan 2018 11:51:59 -0700 Subject: [PATCH 026/254] [arista]: Update Arista platform modules and mount libraries to snmp docker (#1283) Signed-off-by: Shu0T1an ChenG --- platform/broadcom/sonic-platform-modules-arista | 2 +- rules/docker-snmp-sv2.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index 62b5b7da50f..e657481807d 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit 62b5b7da50f29d4299aaca69bdb40bf9172bb4e6 +Subproject commit e657481807db53dd4b87fa346b157153e201a37d diff --git a/rules/docker-snmp-sv2.mk b/rules/docker-snmp-sv2.mk index 95fdcc25775..1a5f68c9c03 100644 --- a/rules/docker-snmp-sv2.mk +++ b/rules/docker-snmp-sv2.mk @@ -12,3 +12,5 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP_SV2) $(DOCKER_SNMP_SV2)_CONTAINER_NAME = snmp $(DOCKER_SNMP_SV2)_RUN_OPT += --net=host --privileged -t $(DOCKER_SNMP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +# mount Arista platform python libraries to support corresponding platforms SNMP power status query +$(DOCKER_SNMP_SV2)_RUN_OPT += -v /usr/lib/python3/dist-packages/arista:/usr/lib/python3/dist-packages/arista:ro From 32559d4fce1685818341560947eee32d9651faaf Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Mon, 8 Jan 2018 07:49:42 -0800 Subject: [PATCH 027/254] [platform]: chmod 0644 for *.mk files (#1284) --- platform/broadcom/one-image.mk | 0 platform/broadcom/platform-modules-accton.mk | 0 platform/broadcom/platform-modules-inventec.mk | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 platform/broadcom/one-image.mk mode change 100755 => 100644 platform/broadcom/platform-modules-accton.mk mode change 100755 => 100644 platform/broadcom/platform-modules-inventec.mk diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk old mode 100755 new mode 100644 diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk old mode 100755 new mode 100644 diff --git a/platform/broadcom/platform-modules-inventec.mk b/platform/broadcom/platform-modules-inventec.mk old mode 100755 new mode 100644 From 16763dcc77ba11880aad8ea75f6ba8d9cd15238b Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Tue, 9 Jan 2018 04:10:40 +0200 Subject: [PATCH 028/254] [mellanox]: Update Mellanox buffers configuration (#1263) Signed-off-by: Andriy Moroz --- .../msn27xx.32ports.buffers.json.j2 | 89 ++++++++++--------- .../tests/sample_output/msn27.32ports.json | 34 +++---- 2 files changed, 64 insertions(+), 59 deletions(-) diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 index 0a60f4584a1..579832ecda1 100644 --- a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 +++ b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 @@ -4,9 +4,29 @@ {%- if port_names_list.append(port) %}{% endif %} {% endfor %} {% set port_names = port_names_list | join(',') %} +{% set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, { "BUFFER_POOL_TABLE:ingress_lossy_pool": { - "size": "6422528", + "size": "{{ ingress_lossy_pool_size }}", "type": "ingress", "mode": "dynamic" }, @@ -14,7 +34,7 @@ }, { "BUFFER_POOL_TABLE:egress_lossless_pool": { - "size": "7291456", + "size": "{{ egress_lossless_pool_size }}", "type": "egress", "mode": "dynamic" }, @@ -22,7 +42,7 @@ }, { "BUFFER_POOL_TABLE:egress_lossy_pool": { - "size": "8254464", + "size": "{{ egress_lossy_pool_size }}", "type": "egress", "mode": "dynamic" }, @@ -32,7 +52,7 @@ "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", "size":"0", - "dynamic_th":"1" + "dynamic_th":"0" }, "OP": "SET" }, @@ -40,7 +60,7 @@ "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -56,7 +76,7 @@ "BUFFER_PROFILE_TABLE:egress_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"4096", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -64,7 +84,7 @@ "BUFFER_PROFILE_TABLE:pg_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -80,7 +100,7 @@ "BUFFER_PROFILE_TABLE:q_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -98,7 +118,6 @@ }, {# The following template part is for variable PG profile configuration #} -{% set non_pg_lossless_pool_size = 866726 %} {% set pg_range = '3-4' %} {# Lists of supported speed and cable length #} {% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} @@ -129,23 +148,23 @@ {# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} {# Only those which were actually used will be created in SAI #} {%- set pg_profiles = { - 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 1 }, - 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, + 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, - 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 1 }, - 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 1 }, - 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, - 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 1 }, - 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 1 }, + 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, + 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 0 }, + 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, + 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, + 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 0 }, - 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 1 }, - 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 1 }, - 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, - 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 1 }, - 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 1 }, + 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 0 }, + 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 0 }, + 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, + 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, + 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 0 }, } -%} @@ -159,13 +178,11 @@ } %} -{% set switch_role = DEVICE_METADATA['localhost']['type'] %} - -{%- macro cable_length(port_name) -%} +{% macro cable_length(port_name) -%} {%- set cable_len = [] -%} {%- for local_port in DEVICE_NEIGHBOR -%} {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} {%- set neighbor_role = neighbor.type -%} {%- set roles1 = switch_role + '_' + neighbor_role %} @@ -201,7 +218,6 @@ {{ new_speed.0 }}_{{ new_cable.0 }} {%- endmacro -%} -{% set ingress_lossless_pg_pool_size = [] %} {% set used_pg_profiles = [] %} {% for port in PORT %} {%- if PORT[port].speed -%} @@ -215,9 +231,8 @@ {% set port_config = find_closest_greater_config(speed, cable) -%} {%- endif -%} {% set profile = portconfig2profile[port_config] -%} - {% if ingress_lossless_pg_pool_size.append(pg_profiles[profile]['size']) %}{% endif %} {# add to list profiles which were actually used #} - {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif -%} + {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif %} { "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" @@ -240,17 +255,7 @@ }, "OP": "SET" }, -{% endfor -%} - - {# Lossless pool declaration #} - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { - "size": "{{ ingress_lossless_pg_pool_size | sum + non_pg_lossless_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, +{% endfor %} { "BUFFER_PG_TABLE:{{ port_names }}:0-1": { "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json index a3cff0f0f0d..a1e8e1486d6 100644 --- a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json +++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json @@ -1,7 +1,15 @@ [ + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { + "size": "2097152", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, { "BUFFER_POOL_TABLE:ingress_lossy_pool": { - "size": "6422528", + "size": "5242880", "type": "ingress", "mode": "dynamic" }, @@ -9,7 +17,7 @@ }, { "BUFFER_POOL_TABLE:egress_lossless_pool": { - "size": "7291456", + "size": "16777152", "type": "egress", "mode": "dynamic" }, @@ -17,7 +25,7 @@ }, { "BUFFER_POOL_TABLE:egress_lossy_pool": { - "size": "8254464", + "size": "5242880", "type": "egress", "mode": "dynamic" }, @@ -27,7 +35,7 @@ "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", "size":"0", - "dynamic_th":"1" + "dynamic_th":"0" }, "OP": "SET" }, @@ -35,7 +43,7 @@ "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -51,7 +59,7 @@ "BUFFER_PROFILE_TABLE:egress_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"4096", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -59,7 +67,7 @@ "BUFFER_PROFILE_TABLE:pg_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -75,7 +83,7 @@ "BUFFER_PROFILE_TABLE:q_lossy_profile": { "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"0", - "dynamic_th":"7" + "dynamic_th":"3" }, "OP": "SET" }, @@ -293,15 +301,7 @@ "xon":"18432", "xoff":"75776", "size":"94208", - "dynamic_th":"1" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { - "size": "3881382", - "type": "ingress", - "mode": "dynamic" + "dynamic_th":"0" }, "OP": "SET" }, From 0fffa6c63b90b2af68f653b929f6e98b5b38bc75 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 9 Jan 2018 17:55:10 -0800 Subject: [PATCH 029/254] Add caclmgrd and related files to translate and install control plane ACL rules (#1240) --- build_debian.sh | 2 + .../build_templates/sonic_debian_extension.j2 | 6 + files/docker/docker.service.conf | 2 +- files/image_config/caclmgrd/caclmgrd | 251 ++++++++++++++++++ files/image_config/caclmgrd/caclmgrd-start.sh | 10 + files/image_config/caclmgrd/caclmgrd.service | 11 + src/sonic-config-engine/minigraph.py | 12 +- src/sonic-config-engine/tests/test_cfggen.py | 2 +- src/sonic-utilities | 2 +- 9 files changed, 294 insertions(+), 4 deletions(-) create mode 100755 files/image_config/caclmgrd/caclmgrd create mode 100755 files/image_config/caclmgrd/caclmgrd-start.sh create mode 100644 files/image_config/caclmgrd/caclmgrd.service diff --git a/build_debian.sh b/build_debian.sh index 01dca9a03ac..ab24d269bb8 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -232,6 +232,8 @@ sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/ sudo cp -f files/sshd/sshd.service $FILESYSTEM_ROOT/lib/systemd/system/ssh.service ## Config sshd sudo augtool --autosave "set /files/etc/ssh/sshd_config/UseDNS no" -r $FILESYSTEM_ROOT +sudo sed -i 's/^ListenAddress ::/#ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/sshd_config +sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config ## Config monit sudo sed -i ' diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index bf603d249d9..f861543e98c 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -162,6 +162,12 @@ sudo cp $IMAGE_CONFIGS/asn/deployment_id_asn_map.yml $FILESYSTEM_ROOT/etc/sonic/ # Copy sudoers configuration file sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/ +# Copy control plane ACL management daemon files +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd.service $FILESYSTEM_ROOT/etc/systemd/system/ +sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable caclmgrd.service +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd-start.sh $FILESYSTEM_ROOT/usr/bin/ +sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd $FILESYSTEM_ROOT/usr/bin/ + ## Install package without starting service ## ref: https://wiki.debian.org/chroot sudo tee -a $FILESYSTEM_ROOT/usr/sbin/policy-rc.d > /dev/null < 0: + rule_cmd += " --tcp-flags " + + if tcp_flags & 0x01: + rule_cmd += "FIN," + if tcp_flags & 0x02: + rule_cmd += "SYN," + if tcp_flags & 0x04: + rule_cmd += "RST," + if tcp_flags & 0x08: + rule_cmd += "PSH," + if tcp_flags & 0x10: + rule_cmd += "ACK," + if tcp_flags & 0x20: + rule_cmd += "URG," + if tcp_flags & 0x40: + rule_cmd += "ECE," + if tcp_flags & 0x80: + rule_cmd += "CWR," + + # Delete the trailing comma + rule_cmd = rule_cmd[:-1] + + # Append the packet action as the jump target + rule_cmd += " -j {}".format(rule_props["PACKET_ACTION"]) + + iptables_cmds.append(rule_cmd) + + return iptables_cmds + + def update_control_plane_acls(self): + """ + Convenience wrapper which retrieves current ACL tables and rules from + Config DB, translates control plane ACLs into a list of iptables + commands and runs them. + """ + iptables_cmds = self.get_acl_rules_and_translate_to_iptables_commands() + + log_info("Issuing the following iptables commands:") + for cmd in iptables_cmds: + log_info(" " + cmd) + + self.run_commands(iptables_cmds) + + def notification_handler(self, key, data): + log_info("ACL configuration changed. Updating iptables rules for control plane ACLs...") + self.update_control_plane_acls() + + def run(self): + # Unconditionally update control plane ACLs once at start + self.update_control_plane_acls() + + # Subscribe to notifications when ACL tables or rules change + self.config_db.subscribe(self.ACL_TABLE, + lambda table, key, data: self.notification_handler(key, data)) + self.config_db.subscribe(self.ACL_RULE, + lambda table, key, data: self.notification_handler(key, data)) + + # Indefinitely listen for Config DB notifications + self.config_db.listen() + + +# ============================= Functions ============================= + +def main(): + log_info("Starting up...") + + if not os.geteuid() == 0: + log_error("Must be root to run this daemon") + print "Error: Must be root to run this daemon" + sys.exit(1) + + # Instantiate a ControlPlaneAclManager object + caclmgr = ControlPlaneAclManager() + caclmgr.run() + + +if __name__ == "__main__": + main() diff --git a/files/image_config/caclmgrd/caclmgrd-start.sh b/files/image_config/caclmgrd/caclmgrd-start.sh new file mode 100755 index 00000000000..3c7a2afbdf8 --- /dev/null +++ b/files/image_config/caclmgrd/caclmgrd-start.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Only start control plance ACL manager daemon if not an Arista platform. +# Arista devices will use their own service ACL manager daemon(s) instead. +if [ "$(sonic-cfggen -v "platform" | grep -c "arista")" -gt 0 ]; then + echo "Not starting caclmgrd - unsupported platform" + exit 0 +fi + +exec /usr/bin/caclmgrd diff --git a/files/image_config/caclmgrd/caclmgrd.service b/files/image_config/caclmgrd/caclmgrd.service new file mode 100644 index 00000000000..8e6cbb0c8e6 --- /dev/null +++ b/files/image_config/caclmgrd/caclmgrd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Control Plane ACL configuration daemon +Requires=database.service +After=database.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/caclmgrd-start.sh + +[Install] +WantedBy=multi-user.target diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index a7297913eb4..0dc3085e129 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -200,7 +200,17 @@ def parse_dpg(dpg, hname): acl_intfs = port_alias_map.values() break; if acl_intfs: - acls[aclname] = { 'policy_desc': aclname, 'ports': acl_intfs, 'type': 'MIRROR' if is_mirror else 'L3'} + acls[aclname] = {'policy_desc': aclname, + 'ports': acl_intfs, + 'type': 'MIRROR' if is_mirror else 'L3', + 'service': 'N/A'} + else: + # This ACL has no interfaces to attach to -- consider this a control plane ACL + aclservice = aclintf.find(str(QName(ns, "Type"))).text + acls[aclname] = {'policy_desc': aclname, + 'ports': acl_intfs, + 'type': 'CTRLPLANE', + 'service': aclservice if aclservice is not None else ''} return intfs, lo_intfs, mgmt_intf, vlans, vlan_members, pcs, acls return None, None, None, None, None, None, None diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 2eee6fe331c..768052a1d7e 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -73,7 +73,7 @@ def test_render_template(self): def test_minigraph_acl(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v ACL_TABLE' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") + self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'service': 'N/A', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") def test_minigraph_everflow(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v MIRROR_SESSION' diff --git a/src/sonic-utilities b/src/sonic-utilities index 5ad84866491..6823ce2f3e4 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 5ad84866491e7d4cf4cebcb96e469423c9c91961 +Subproject commit 6823ce2f3e46d9bbf5fcfa6b371705a7368929cb From 9e2facbdc97dbba2b0e7416120e846079a00fa78 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Wed, 10 Jan 2018 03:04:32 -0800 Subject: [PATCH 030/254] [baseimage]: Install sysfsutils package into SONiC host system (#1290) --- build_debian.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_debian.sh b/build_debian.sh index ab24d269bb8..6a27bd5d237 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -216,6 +216,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in less \ unzip \ gdisk \ + sysfsutils \ grub2-common sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \ From 6d39e3a0f0d8d9d1c08716ac5c3b3059b27dc89d Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Wed, 10 Jan 2018 03:05:08 -0800 Subject: [PATCH 031/254] [[submodule]: Update swss-common (#1289) --- src/sonic-swss-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 283162b62d1..aa55f69a9b5 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 283162b62d1dda594a5962e9ad8b4f9b65bf65c3 +Subproject commit aa55f69a9b53588d1de872f2d6f15384659f1a36 From 50f060e8bdc48bae72767be9af8caa531382eaf5 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 10 Jan 2018 03:06:47 -0800 Subject: [PATCH 032/254] Revert "[DHCP relay]: Add patch to always undef VLAN_TCI_PRESENT so as not to treat VLAN-tagged packets differently (#1254)" (#1291) This reverts commit 64602ad5b2294f2e1de6b0f1f1761fb7697b21a7. Reverting this commit because the root cause of the issue was due to a Broadcom SDK bug which caused VLAN-tagged packets to be tagged twice. When packets were double-tagged, only one tag was getting stripped before the packet was trapped to the CPU. However, the second tag was left behind, which would cause the DHCP relay agent to ignore the packet. The bug has since been fixed, so now all VLAN-tagged packets should properly have their tag removed before being trapped to the CPU. Therefore the DHCP relay agent should never encounter a VLAN-tagged packet. --- ...N_TCI_PRESENT-so-as-not-to-treat-VLA.patch | 30 ------------------- ...on-82-circuit-ID-and-remote-ID-fiel.patch} | 4 +-- ...ning-name-of-physical-interface-tha.patch} | 4 +-- ...ng-port-alias-map-file-to-replace-p.patch} | 4 +-- src/isc-dhcp/patch/series | 7 ++--- 5 files changed, 9 insertions(+), 40 deletions(-) delete mode 100644 src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch rename src/isc-dhcp/patch/{0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch => 0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch} (98%) rename src/isc-dhcp/patch/{0003-Support-for-obtaining-name-of-physical-interface-tha.patch => 0002-Support-for-obtaining-name-of-physical-interface-tha.patch} (96%) rename src/isc-dhcp/patch/{0004-Support-for-loading-port-alias-map-file-to-replace-p.patch => 0003-Support-for-loading-port-alias-map-file-to-replace-p.patch} (98%) diff --git a/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch b/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch deleted file mode 100644 index f5afc5692a5..00000000000 --- a/src/isc-dhcp/patch/0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7fe46584c3d9cb6b1ecdee47ff5ac2b777f96ec6 Mon Sep 17 00:00:00 2001 -From: Joe LeVeque -Date: Wed, 20 Dec 2017 02:18:10 +0000 -Subject: [PATCH 1/4] Always undef VLAN_TCI_PRESENT so as not to treat - VLAN-tagged packets differently - ---- - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3f1415b..fcfeba0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -600,9 +600,9 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,, - #include - ]) - --AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, -- [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] -- ,, [#include ]) -+#AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, -+# [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] -+# ,, [#include ]) - - libbind= - AC_ARG_WITH(libbind, --- -2.1.4 - diff --git a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch b/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch similarity index 98% rename from src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch rename to src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch index 33197a80b0e..22a8f7faedd 100644 --- a/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +++ b/src/isc-dhcp/patch/0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch @@ -1,7 +1,7 @@ -From c2361e2bf24408cc21a4691c3897cc64c95372f1 Mon Sep 17 00:00:00 2001 +From 284c87ff4b3873d0215904273fe3c86b07b4ba94 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:21:08 +0000 -Subject: [PATCH 2/4] Customizable Option 82 circuit ID and remote ID fields +Subject: [PATCH 1/3] Customizable Option 82 circuit ID and remote ID fields --- relay/dhcrelay.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++--------- diff --git a/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch b/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch similarity index 96% rename from src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch rename to src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch index 7d9169dc67a..ee85a773628 100644 --- a/src/isc-dhcp/patch/0003-Support-for-obtaining-name-of-physical-interface-tha.patch +++ b/src/isc-dhcp/patch/0002-Support-for-obtaining-name-of-physical-interface-tha.patch @@ -1,7 +1,7 @@ -From 236d4f1cb0afa2bee22f47a48b725427bfcb5a9c Mon Sep 17 00:00:00 2001 +From caad3e05c31c9fad8cda378ce95a1969def771a2 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 11 Dec 2017 23:39:10 +0000 -Subject: [PATCH 3/4] Support for obtaining name of physical interface that is +Subject: [PATCH 2/3] Support for obtaining name of physical interface that is a member of a bridge interface --- diff --git a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch b/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch similarity index 98% rename from src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch rename to src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch index 1d42e9838f9..7411e1c4ff3 100644 --- a/src/isc-dhcp/patch/0004-Support-for-loading-port-alias-map-file-to-replace-p.patch +++ b/src/isc-dhcp/patch/0003-Support-for-loading-port-alias-map-file-to-replace-p.patch @@ -1,7 +1,7 @@ -From 1092578a8415b9d49182c2b9825753e96481246a Mon Sep 17 00:00:00 2001 +From 3a42b497716375c9347b51c3a28c5e91e7cd4cf4 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 12 Dec 2017 00:49:09 +0000 -Subject: [PATCH 4/4] Support for loading port alias map file to replace port +Subject: [PATCH 3/3] Support for loading port alias map file to replace port name with alias in circuit id --- diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index 980b9b97e34..a896563077c 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -1,5 +1,4 @@ # This series applies on GIT commit ee3dffdda38a8cfc6ad2005d8d64a165d2a709ba -0001-Always-undef-VLAN_TCI_PRESENT-so-as-not-to-treat-VLA.patch -0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch -0003-Support-for-obtaining-name-of-physical-interface-tha.patch -0004-Support-for-loading-port-alias-map-file-to-replace-p.patch +0001-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch +0002-Support-for-obtaining-name-of-physical-interface-tha.patch +0003-Support-for-loading-port-alias-map-file-to-replace-p.patch From 8ae3c6c88a22c509d098983a8e3a09e977807a43 Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Wed, 10 Jan 2018 19:08:05 +0800 Subject: [PATCH 033/254] [Platform]As7712-32x update for sensors test (#1292) * Update sonic-platform-modules-accton to lastest Signed-off-by: roylee123 * [platform]AS7712. 1. update device driver. - move 7712 modules to common dir, and linked to them. - add new lm75 node at I2C address 0x4B. - add optoe module for QSFP eeprom access. - add accton_pmbus_3y.c module for pmbus access. 2. masked sensor.conf for matching of sku-sensors-data.yml. Signed-off-by: roylee123 --- .../x86_64-accton_as7712_32x-r0/sensors.conf | 37 ++++++++++--------- .../broadcom/sonic-platform-modules-accton | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf index 21e1817916f..33d75d59812 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf +++ b/device/accton/x86_64-accton_as7712_32x-r0/sensors.conf @@ -2,21 +2,22 @@ # ------------------------------------------------ # -chip "ym2651-*" - label power1 "PSU Output Power" - label temp1 "Power Supply Temp" - label fan1 "Fan Speed" - -chip "as7712_32x_fan-*" - label fan1 "Fan tray 1 front" - label fan2 "Fan tray 2 front" - label fan3 "Fan tray 3 front" - label fan4 "Fan tray 4 front" - label fan5 "Fan tray 5 front" - label fan6 "Fan tray 6 front" - label fan11 "Fan tray 1 rear" - label fan12 "Fan tray 2 rear" - label fan13 "Fan tray 3 rear" - label fan14 "Fan tray 4 rear" - label fan15 "Fan tray 5 rear" - label fan16 "Fan tray 6 rear" +#Comment out the following for sku-sensors-data.yml +#chip "ym2651-*" +# label power1 "PSU Output Power" +# label temp1 "Power Supply Temp" +# label fan1 "Fan Speed" +# +#chip "as7712_32x_fan-*" +# label fan1 "Fan tray 1 front" +# label fan2 "Fan tray 2 front" +# label fan3 "Fan tray 3 front" +# label fan4 "Fan tray 4 front" +# label fan5 "Fan tray 5 front" +# label fan6 "Fan tray 6 front" +# label fan11 "Fan tray 1 rear" +# label fan12 "Fan tray 2 rear" +# label fan13 "Fan tray 3 rear" +# label fan14 "Fan tray 4 rear" +# label fan15 "Fan tray 5 rear" +# label fan16 "Fan tray 6 rear" diff --git a/platform/broadcom/sonic-platform-modules-accton b/platform/broadcom/sonic-platform-modules-accton index dfff9a88cd9..a7149adb425 160000 --- a/platform/broadcom/sonic-platform-modules-accton +++ b/platform/broadcom/sonic-platform-modules-accton @@ -1 +1 @@ -Subproject commit dfff9a88cd94da081e80222872c33859e4132365 +Subproject commit a7149adb425bdd42520780f009f764b985ee0ebc From 1ceb07a2c5d43e24a1e201884b0eb0833c0b996f Mon Sep 17 00:00:00 2001 From: paavaanan Date: Thu, 11 Jan 2018 01:23:50 +0530 Subject: [PATCH 034/254] [Dell S6100, Z9100] psusutil sysfs attribute changes for hwmon (#1264) --- device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py | 7 ++++--- device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py index 83452f69aaa..b753cd711da 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_s6100_lpc" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + print mb_reg_file, 'not found !' return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py index 2ad6ae7d149..2e07ee81881 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_mailbox" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + print mb_reg_file, 'not found !' return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence From 9669b3477ed45d0ba0bcd09ee6a8aa2044dcab27 Mon Sep 17 00:00:00 2001 From: lguohan Date: Wed, 10 Jan 2018 18:42:45 -0800 Subject: [PATCH 035/254] Revert "[Dell S6100, Z9100] psusutil sysfs attribute changes for hwmon (#1264)" (#1297) This reverts commit 1ceb07a2c5d43e24a1e201884b0eb0833c0b996f. --- device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py | 7 +++---- device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py index b753cd711da..83452f69aaa 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py @@ -20,11 +20,10 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" + mailbox_dir = "/sys/devices/platform/dell_s6100_lpc" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): - print mb_reg_file, 'not found !' return retval try: @@ -53,7 +52,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu'+str(index)+'_presence') + psu_status = self.get_pmc_register('psu_'+str(index)+'_status') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -70,7 +69,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') + psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py index 2e07ee81881..2ad6ae7d149 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py @@ -20,11 +20,10 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" + mailbox_dir = "/sys/devices/platform/dell_mailbox" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): - print mb_reg_file, 'not found !' return retval try: @@ -53,7 +52,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu'+str(index)+'_presence') + psu_status = self.get_pmc_register('psu_'+str(index)+'_status') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -70,7 +69,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') + psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence From 41cdb8971f2f3f90c20fa8446b112300980135a6 Mon Sep 17 00:00:00 2001 From: nealtai <33504193+nealtai@users.noreply.github.com> Date: Fri, 12 Jan 2018 07:17:55 +0800 Subject: [PATCH 036/254] [Delta]: Add psuutil support for ag9032v1 (#1298) Fix the bug of psu module for ag9032v1 Signed-off-by: neal --- .../plugins/psuutil.py | 57 +++++++++++++++++++ .../ag9032v1/modules/dni_ag9032v1_psu.c | 38 +++++++------ 2 files changed, 78 insertions(+), 17 deletions(-) create mode 100644 device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py diff --git a/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py b/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py new file mode 100644 index 00000000000..4b370d9a744 --- /dev/null +++ b/device/delta/x86_64-delta_ag9032v1-r0/plugins/psuutil.py @@ -0,0 +1,57 @@ +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) + + self.psu_path = "/sys/bus/i2c/devices/{}-0058/" + self.psu_oper_status = "in1_input" + self.psu_presence = "i2cget -y {} 0x50 0x00" + + + 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 + """ + return 2 + + def get_psu_status(self, index): + if index is None: + return False + Base_bus_number = 39 + status = 0 + #index from 1, psu attribute bus from 40 + try: + with open(self.psu_path.format(index + Base_bus_number) + self.psu_oper_status, 'r') as power_status: + if int(power_status.read()) == 0 : + return False + else: + status = 1 + except IOError: + return False + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + Base_bus_number = 39 + status = 0 + try: + p = os.popen(self.psu_presence.format(index + Base_bus_number)+ "> /dev/null 2>&1") + if p.readline() != None: + status = 1 + p.close() + except IOError: + return False + return status == 1 + + diff --git a/platform/broadcom/sonic-platform-modules-delta/ag9032v1/modules/dni_ag9032v1_psu.c b/platform/broadcom/sonic-platform-modules-delta/ag9032v1/modules/dni_ag9032v1_psu.c index b9ddb979a29..e47813af3e0 100644 --- a/platform/broadcom/sonic-platform-modules-delta/ag9032v1/modules/dni_ag9032v1_psu.c +++ b/platform/broadcom/sonic-platform-modules-delta/ag9032v1/modules/dni_ag9032v1_psu.c @@ -2,9 +2,9 @@ * An hwmon driver for delta AG9032v1 PSU * dps_800ab_16_d.c - Support for DPS-800AB-16 D Power Supply Module * - * Copyright (C) 2017 Delta Networks, Inc. + * Copyright (C) 2016 Delta Network Technology Corporation * - * Aries Lin + * DNI * * Based on ym2651y.c * Based on ad7414.c @@ -361,6 +361,7 @@ static struct dps_800ab_16_d_data *dps_800ab_16_d_update_device( \ if (status < 0) { dev_dbg(&client->dev, "reg %d, err %d\n", regs_byte[i].reg, status); + *(regs_byte[i].value) = 0; } else { *(regs_byte[i].value) = status; } @@ -372,28 +373,31 @@ static struct dps_800ab_16_d_data *dps_800ab_16_d_update_device( \ if (status < 0) { dev_dbg(&client->dev, "reg %d, err %d\n", regs_word[i].reg, status); + *(regs_word[i].value) = 0; } else { *(regs_word[i].value) = status; } } command = 0x9a; /* PSU mfr_model */ + //data->mfr_model[1] = '\0'; status = dps_800ab_16_d_read_block(client, command, - data->mfr_model, ARRAY_SIZE(data->mfr_model) - 1); - data->mfr_model[ARRAY_SIZE(data->mfr_model) - 1] = '\0'; - if (status < 0) { - dev_dbg(&client->dev, "reg %d, err %d\n", command, - status); - } - - command = 0x9e; /* PSU mfr_serial */ - status = dps_800ab_16_d_read_block(client, command, - data->mfr_serial, ARRAY_SIZE(data->mfr_serial) - 1); - data->mfr_serial[ARRAY_SIZE(data->mfr_serial) - 1] = '\0'; - if (status < 0) { - dev_dbg(&client->dev, "reg %d, err %d\n", command, - status); - } + data->mfr_model, ARRAY_SIZE(data->mfr_model) - 1); + data->mfr_model[ARRAY_SIZE(data->mfr_model) - 1] = '\0'; + if (status < 0) { + dev_dbg(&client->dev, "reg %d, err %d\n", command,status); + data->mfr_model[1] = '\0'; + } + + command = 0x9e; /* PSU mfr_serial */ + //data->mfr_serial[1] = '\0'; + status = dps_800ab_16_d_read_block(client, command, + data->mfr_serial, ARRAY_SIZE(data->mfr_serial) - 1); + data->mfr_serial[ARRAY_SIZE(data->mfr_serial) - 1] = '\0'; + if (status < 0) { + dev_dbg(&client->dev, "reg %d, err %d\n", command,status); + data->mfr_serial[1] = '\0'; + } data->valid = 1; } From ac0de13705f31951ff7fd4df5cb7458f87ca7084 Mon Sep 17 00:00:00 2001 From: kaiyu22 Date: Fri, 12 Jan 2018 07:18:50 +0800 Subject: [PATCH 037/254] [Platform] Update switch configuration files and download link for Ingrasys S9130-32X/S9230-64X (#1295) - What I did Updating switch configuration files and download link - How I did it Updating related switch configuration files in device/ingrasys Updating related mk files in platform/nephos - How to verify it Check system and network feature is worked as well - Description for the changelog Update switch configuration files and download link for Ingrasys S9130-32X/S9230-64X - A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Sam Yang --- .../INGRASYS-S9130-32X/port_config.nps | 318 +++++++ .../led_proc_init.nps | 29 +- .../INGRASYS-S9230-64X/port_config.nps | 864 ++++++++++++++++++ .../led_proc_init.nps | 29 +- platform/nephos/rules.mk | 2 +- platform/nephos/sai.mk | 8 +- platform/nephos/sdk.mk | 4 +- 7 files changed, 1207 insertions(+), 47 deletions(-) diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps index e69de29bb2d..ac626871617 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps @@ -0,0 +1,318 @@ +init start stage low-level +init set port-map port=0 eth-macro=0 lane=0 max-speed=100g active=true +init set port-map port=1 eth-macro=1 lane=0 max-speed=100g active=true +init set port-map port=2 eth-macro=2 lane=0 max-speed=100g active=true +init set port-map port=3 eth-macro=3 lane=0 max-speed=100g active=true +init set port-map port=4 eth-macro=4 lane=0 max-speed=100g active=true +init set port-map port=5 eth-macro=5 lane=0 max-speed=100g active=true +init set port-map port=6 eth-macro=6 lane=0 max-speed=100g active=true +init set port-map port=7 eth-macro=7 lane=0 max-speed=100g active=true +init set port-map port=8 eth-macro=8 lane=0 max-speed=100g active=true +init set port-map port=9 eth-macro=9 lane=0 max-speed=100g active=true +init set port-map port=10 eth-macro=10 lane=0 max-speed=100g active=true +init set port-map port=11 eth-macro=11 lane=0 max-speed=100g active=true +init set port-map port=12 eth-macro=12 lane=0 max-speed=100g active=true +init set port-map port=13 eth-macro=13 lane=0 max-speed=100g active=true +init set port-map port=14 eth-macro=14 lane=0 max-speed=100g active=true +init set port-map port=15 eth-macro=15 lane=0 max-speed=100g active=true +init set port-map port=16 eth-macro=16 lane=0 max-speed=100g active=true +init set port-map port=17 eth-macro=17 lane=0 max-speed=100g active=true +init set port-map port=18 eth-macro=18 lane=0 max-speed=100g active=true +init set port-map port=19 eth-macro=19 lane=0 max-speed=100g active=true +init set port-map port=20 eth-macro=20 lane=0 max-speed=100g active=true +init set port-map port=21 eth-macro=21 lane=0 max-speed=100g active=true +init set port-map port=22 eth-macro=22 lane=0 max-speed=100g active=true +init set port-map port=23 eth-macro=23 lane=0 max-speed=100g active=true +init set port-map port=24 eth-macro=24 lane=0 max-speed=100g active=true +init set port-map port=25 eth-macro=25 lane=0 max-speed=100g active=true +init set port-map port=26 eth-macro=26 lane=0 max-speed=100g active=true +init set port-map port=27 eth-macro=27 lane=0 max-speed=100g active=true +init set port-map port=28 eth-macro=28 lane=0 max-speed=100g active=true +init set port-map port=29 eth-macro=29 lane=0 max-speed=100g active=true +init set port-map port=30 eth-macro=30 lane=0 max-speed=100g active=true +init set port-map port=31 eth-macro=31 lane=0 max-speed=100g active=true +init set port-map port=129 eth-macro=0 lane=1 max-speed=10g active=true guarantee=true cpi=true +init set port-map port=130 eth-macro=0 lane=0 max-speed=10g active=true guarantee=true cpi=true init-done=true +init start stage task-rsrc +init start stage module +init start stage task +phy set lane-swap portlist=0 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=1 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=2 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=3 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=4 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=5 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=6 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=7 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=8 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=9 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=10 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=11 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=12 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=13 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=14 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=15 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=16 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=17 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=18 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=19 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=20 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=21 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=22 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=23 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=24 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=25 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=26 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=27 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=28 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=29 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=30 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=31 lane-num=4 property=tx data=0x03.02.01.00 +phy set lane-swap portlist=129 lane-num=1 property=tx data=0x1 +phy set lane-swap portlist=130 lane-num=1 property=tx data=0x0 +phy set lane-swap portlist=0 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=1 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=2 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=3 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=4 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=5 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=6 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=7 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=8 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=9 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=10 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=11 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=12 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=13 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=14 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=15 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=16 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=17 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=18 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=19 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=20 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=21 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=22 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=23 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=24 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=25 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=26 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=27 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=28 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=29 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=30 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=31 lane-num=4 property=rx data=0x03.02.01.00 +phy set lane-swap portlist=129 lane-num=1 property=rx data=0x1 +phy set lane-swap portlist=130 lane-num=1 property=rx data=0x0 +phy set polarity-rev portlist=0 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=1 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=2 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=3 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=4 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=5 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=6 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=7 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=8 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=9 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=10 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=11 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=12 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=13 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=14 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=15 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=16 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=17 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=18 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=19 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=20 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=21 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=22 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=23 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=24 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=25 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=26 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=27 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=28 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=29 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=30 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=31 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev portlist=129 lane-num=1 property=tx data=0x0 +phy set polarity-rev portlist=130 lane-num=1 property=tx data=0x0 +phy set polarity-rev portlist=0 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=1 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=2 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=3 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=4 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=5 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=6 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=7 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=8 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=9 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=10 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=11 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=12 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=13 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=14 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=15 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=16 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=17 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=18 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=19 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=20 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=21 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=22 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=23 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=24 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=25 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=26 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=27 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=28 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=29 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=30 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=31 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev portlist=129 lane-num=1 property=rx data=0x0 +phy set polarity-rev portlist=130 lane-num=1 property=rx data=0x0 +phy set pre-emphasis portlist=0 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=0 lane-num=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis portlist=0 lane-num=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis portlist=0 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=1 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=1 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=1 lane-num=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis portlist=1 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=2 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=2 lane-num=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis portlist=2 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=2 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=3 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=3 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=3 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=3 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=4 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=4 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=4 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=4 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=5 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=5 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=5 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=5 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=6 lane-num=4 property=c2 data=0x03.03.03.03 +phy set pre-emphasis portlist=6 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=6 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=6 lane-num=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis portlist=7 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=7 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=7 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=7 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=8 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=8 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=8 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=8 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=9 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=9 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=9 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=9 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=10 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=10 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=10 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=10 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=11 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=11 lane-num=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis portlist=11 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=11 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=12 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=12 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=12 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=12 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=13 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=13 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=13 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=13 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=14 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=14 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=14 lane-num=4 property=c0 data=0x1D.1D.1D.1D +phy set pre-emphasis portlist=14 lane-num=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis portlist=15 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=15 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=15 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=15 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=16 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=16 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=16 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=16 lane-num=4 property=c1 data=0x05.05.05.05 +phy set pre-emphasis portlist=17 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=17 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=17 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=17 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=18 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=18 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=18 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=18 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=19 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=19 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=19 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=19 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=20 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=20 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=20 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=20 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=21 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=21 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=21 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=21 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=22 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=22 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=22 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=22 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=23 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=23 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=23 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=23 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=24 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=24 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=24 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=24 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=25 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=25 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=25 lane-num=4 property=c0 data=0x1C.1C.1C.1C +phy set pre-emphasis portlist=25 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=26 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=26 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=26 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=26 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=27 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=27 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=27 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=27 lane-num=4 property=c1 data=0x06.06.06.06 +phy set pre-emphasis portlist=28 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=28 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=28 lane-num=4 property=c0 data=0x1B.1B.1B.1B +phy set pre-emphasis portlist=28 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=29 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=29 lane-num=4 property=cn1 data=0x00.00.00.00 +phy set pre-emphasis portlist=29 lane-num=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis portlist=29 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=30 lane-num=4 property=c2 data=0x02.02.02.02 +phy set pre-emphasis portlist=30 lane-num=4 property=cn1 data=0x01.01.01.01 +phy set pre-emphasis portlist=30 lane-num=4 property=c0 data=0x1A.1A.1A.1A +phy set pre-emphasis portlist=30 lane-num=4 property=c1 data=0x07.07.07.07 +phy set pre-emphasis portlist=31 lane-num=4 property=c2 data=0x01.01.01.01 +phy set pre-emphasis portlist=31 lane-num=4 property=cn1 data=0x03.03.03.03 +phy set pre-emphasis portlist=31 lane-num=4 property=c0 data=0x17.17.17.17 +phy set pre-emphasis portlist=31 lane-num=4 property=c1 data=0x09.09.09.09 +phy set pre-emphasis portlist=129 lane-num=1 property=c2 data=0x01 +phy set pre-emphasis portlist=129 lane-num=1 property=cn1 data=0x01 +phy set pre-emphasis portlist=129 lane-num=1 property=c0 data=0x02 +phy set pre-emphasis portlist=129 lane-num=1 property=c1 data=0x03 +phy set pre-emphasis portlist=130 lane-num=1 property=c2 data=0x01 +phy set pre-emphasis portlist=130 lane-num=1 property=cn1 data=0x01 +phy set pre-emphasis portlist=130 lane-num=1 property=c0 data=0x02 +phy set pre-emphasis portlist=130 lane-num=1 property=c1 data=0x03 +port set portlist=0-31 speed=100g +port set portlist=129-130 speed=10g +port set portlist=0-31 medium-type=sr4 +port set portlist=129-130 medium-type=kr +port set portlist=0-31 fec=rs +port advertise portlist=129-130 speed-10g-kr +port set portlist=129-130 an=enable +port set portlist=0-31,129-130 admin=enable diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps index b482a7a0b97..d1695e36b59 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/led_proc_init.nps @@ -1,20 +1,9 @@ -#This configuration file is for customer init value feature. Please refer to mtk_cfg.h/mtk_cfg.c for detail. -#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. -#2. There are five parameters which can be set. -# 1) the first is unit. -# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. -# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. -# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. -# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. -#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); -#4. Usage under the linux shell: -# 1) ./image-path/image-name -c cfg-path/NPS_Ari_EVB_24.cfg : mamually specify directory path if they are not in current work dirctory. -# 2) ./image-name -c NPS_Ari_EVB_24.cfg : the image and the NPS_Ari_EVB_24.cfg are in the current work directory. - -#unit NPS_CFG_TYPE_XXX param0 param1 value -#---- ---------------- ------ ------ ----- -0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 -0 NPS_CFG_TYPE_LED_CFG 0 0 1 -0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 -0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 -0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 1 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +0 NPS_CFG_TYPE_HASH_L2_FDB_REGION_ENTRY_NUM 0 0 49152 +0 NPS_CFG_TYPE_HASH_L3_WITH_IPV6_PREFIX_64_REGION_ENTRY_NUM 0 0 32768 diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps index e69de29bb2d..2b013f7641e 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps @@ -0,0 +1,864 @@ +init start stage unit=0 low-level +init set port-map unit=0 port=0 eth-macro=1 lane=0 max-speed=100g active=true +init set port-map unit=0 port=1 eth-macro=0 lane=0 max-speed=100g active=true +init set port-map unit=0 port=2 eth-macro=5 lane=0 max-speed=100g active=true +init set port-map unit=0 port=3 eth-macro=4 lane=0 max-speed=100g active=true +init set port-map unit=0 port=4 eth-macro=9 lane=0 max-speed=100g active=true +init set port-map unit=0 port=5 eth-macro=8 lane=0 max-speed=100g active=true +init set port-map unit=0 port=6 eth-macro=13 lane=0 max-speed=100g active=true +init set port-map unit=0 port=7 eth-macro=12 lane=0 max-speed=100g active=true +init set port-map unit=0 port=8 eth-macro=17 lane=0 max-speed=100g active=true +init set port-map unit=0 port=9 eth-macro=16 lane=0 max-speed=100g active=true +init set port-map unit=0 port=10 eth-macro=21 lane=0 max-speed=100g active=true +init set port-map unit=0 port=11 eth-macro=20 lane=0 max-speed=100g active=true +init set port-map unit=0 port=12 eth-macro=25 lane=0 max-speed=100g active=true +init set port-map unit=0 port=13 eth-macro=24 lane=0 max-speed=100g active=true +init set port-map unit=0 port=14 eth-macro=29 lane=0 max-speed=100g active=true +init set port-map unit=0 port=15 eth-macro=28 lane=0 max-speed=100g active=true +init set port-map unit=0 port=16 eth-macro=33 lane=0 max-speed=100g active=true +init set port-map unit=0 port=17 eth-macro=32 lane=0 max-speed=100g active=true +init set port-map unit=0 port=18 eth-macro=37 lane=0 max-speed=100g active=true +init set port-map unit=0 port=19 eth-macro=36 lane=0 max-speed=100g active=true +init set port-map unit=0 port=20 eth-macro=41 lane=0 max-speed=100g active=true +init set port-map unit=0 port=21 eth-macro=40 lane=0 max-speed=100g active=true +init set port-map unit=0 port=22 eth-macro=45 lane=0 max-speed=100g active=true +init set port-map unit=0 port=23 eth-macro=44 lane=0 max-speed=100g active=true +init set port-map unit=0 port=24 eth-macro=49 lane=0 max-speed=100g active=true +init set port-map unit=0 port=25 eth-macro=48 lane=0 max-speed=100g active=true +init set port-map unit=0 port=26 eth-macro=53 lane=0 max-speed=100g active=true +init set port-map unit=0 port=27 eth-macro=52 lane=0 max-speed=100g active=true +init set port-map unit=0 port=28 eth-macro=57 lane=0 max-speed=100g active=true +init set port-map unit=0 port=29 eth-macro=56 lane=0 max-speed=100g active=true +init set port-map unit=0 port=30 eth-macro=61 lane=0 max-speed=100g active=true +init set port-map unit=0 port=31 eth-macro=60 lane=0 max-speed=100g active=true +init set port-map unit=0 port=32 eth-macro=3 lane=0 max-speed=100g active=true +init set port-map unit=0 port=33 eth-macro=2 lane=0 max-speed=100g active=true +init set port-map unit=0 port=34 eth-macro=7 lane=0 max-speed=100g active=true +init set port-map unit=0 port=35 eth-macro=6 lane=0 max-speed=100g active=true +init set port-map unit=0 port=36 eth-macro=11 lane=0 max-speed=100g active=true +init set port-map unit=0 port=37 eth-macro=10 lane=0 max-speed=100g active=true +init set port-map unit=0 port=38 eth-macro=15 lane=0 max-speed=100g active=true +init set port-map unit=0 port=39 eth-macro=14 lane=0 max-speed=100g active=true +init set port-map unit=0 port=40 eth-macro=19 lane=0 max-speed=100g active=true +init set port-map unit=0 port=41 eth-macro=18 lane=0 max-speed=100g active=true +init set port-map unit=0 port=42 eth-macro=23 lane=0 max-speed=100g active=true +init set port-map unit=0 port=43 eth-macro=22 lane=0 max-speed=100g active=true +init set port-map unit=0 port=44 eth-macro=27 lane=0 max-speed=100g active=true +init set port-map unit=0 port=45 eth-macro=26 lane=0 max-speed=100g active=true +init set port-map unit=0 port=46 eth-macro=31 lane=0 max-speed=100g active=true +init set port-map unit=0 port=47 eth-macro=30 lane=0 max-speed=100g active=true +init set port-map unit=0 port=48 eth-macro=35 lane=0 max-speed=100g active=true +init set port-map unit=0 port=49 eth-macro=34 lane=0 max-speed=100g active=true +init set port-map unit=0 port=50 eth-macro=39 lane=0 max-speed=100g active=true +init set port-map unit=0 port=51 eth-macro=38 lane=0 max-speed=100g active=true +init set port-map unit=0 port=52 eth-macro=43 lane=0 max-speed=100g active=true +init set port-map unit=0 port=53 eth-macro=42 lane=0 max-speed=100g active=true +init set port-map unit=0 port=54 eth-macro=47 lane=0 max-speed=100g active=true +init set port-map unit=0 port=55 eth-macro=46 lane=0 max-speed=100g active=true +init set port-map unit=0 port=56 eth-macro=51 lane=0 max-speed=100g active=true +init set port-map unit=0 port=57 eth-macro=50 lane=0 max-speed=100g active=true +init set port-map unit=0 port=58 eth-macro=55 lane=0 max-speed=100g active=true +init set port-map unit=0 port=59 eth-macro=54 lane=0 max-speed=100g active=true +init set port-map unit=0 port=60 eth-macro=59 lane=0 max-speed=100g active=true +init set port-map unit=0 port=61 eth-macro=58 lane=0 max-speed=100g active=true +init set port-map unit=0 port=62 eth-macro=63 lane=0 max-speed=100g active=true +init set port-map unit=0 port=63 eth-macro=62 lane=0 max-speed=100g active=true +init set port-map unit=0 port=129 eth-macro=0 lane=1 max-speed=10g active=true guarantee=true cpi=true +init set port-map unit=0 port=130 eth-macro=0 lane=0 max-speed=10g active=true guarantee=true cpi=true init-done=true +init start stage unit=0 task-rsrc +init start stage unit=0 module +init start stage unit=0 task +phy set lane-swap unit=0 portlist=0 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=1 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=2 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=3 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=4 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=5 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=6 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=7 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=8 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=9 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=10 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=11 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=12 lane-num=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=13 lane-num=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=14 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=15 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=16 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=17 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=18 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=19 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=20 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=21 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=22 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=23 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=24 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=25 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=26 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=27 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=28 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=29 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=30 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=31 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=32 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=33 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=34 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=35 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=36 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=37 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=38 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=39 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=40 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=41 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=42 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=43 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=44 lane-num=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=45 lane-num=4 property=tx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=46 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=47 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=48 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=49 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=50 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=51 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=52 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=53 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=54 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=55 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=56 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=57 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=58 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=59 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=60 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=61 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=62 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=63 lane-num=4 property=tx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=129 lane-num=1 property=tx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-num=1 property=tx data=0x0 +phy set lane-swap unit=0 portlist=0 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=1 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=2 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=3 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=4 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=5 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=6 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=7 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=8 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=9 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=10 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=11 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=12 lane-num=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=13 lane-num=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=14 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=15 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=16 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=17 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=18 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=19 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=20 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=21 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=22 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=23 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=24 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=25 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=26 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=27 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=28 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=29 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=30 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=31 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=32 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=33 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=34 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=35 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=36 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=37 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=38 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=39 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=40 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=41 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=42 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=43 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=44 lane-num=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=45 lane-num=4 property=rx data=0x3.2.1.0 +phy set lane-swap unit=0 portlist=46 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=47 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=48 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=49 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=50 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=51 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=52 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=53 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=54 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=55 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=56 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=57 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=58 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=59 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=60 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=61 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=62 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=63 lane-num=4 property=rx data=0x0.1.2.3 +phy set lane-swap unit=0 portlist=129 lane-num=1 property=rx data=0x1 +phy set lane-swap unit=0 portlist=130 lane-num=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=32 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=33 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=34 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=35 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=36 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=37 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=38 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=39 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=40 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=41 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=42 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=43 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=44 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=45 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=46 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=47 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=48 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=49 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=50 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=51 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=52 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=53 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=54 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=55 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=56 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=57 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=58 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=59 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=60 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=61 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=62 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=63 lane-num=4 property=tx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-num=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-num=1 property=tx data=0x0 +phy set polarity-rev unit=0 portlist=0 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=1 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=2 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=3 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=4 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=5 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=6 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=7 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=8 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=9 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=10 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=11 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=12 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=13 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=14 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=15 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=16 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=17 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=18 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=19 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=20 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=21 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=22 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=23 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=24 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=25 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=26 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=27 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=28 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=29 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=30 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=31 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=32 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=33 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=34 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=35 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=36 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=37 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=38 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=39 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=40 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=41 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=42 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=43 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=44 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=45 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=46 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=47 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=48 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=49 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=50 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=51 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=52 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=53 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=54 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=55 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=56 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=57 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=58 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=59 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=60 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=61 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=62 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=63 lane-num=4 property=rx data=0x0.0.0.0 +phy set polarity-rev unit=0 portlist=129 lane-num=1 property=rx data=0x0 +phy set polarity-rev unit=0 portlist=130 lane-num=1 property=rx data=0x0 +phy set pre-emphasis unit=0 portlist=0 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=0 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=0 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=0 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=1 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=1 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=1 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=1 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=2 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=2 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=2 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=2 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=3 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=3 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=3 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=3 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=4 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=4 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=4 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=4 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=5 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=5 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=5 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=5 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=6 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=6 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=6 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=6 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=7 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=7 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=7 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=7 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=8 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=8 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=8 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=8 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=9 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=9 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=9 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=9 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=10 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=10 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=10 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=10 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=11 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=11 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=11 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=11 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=12 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=12 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=12 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=12 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=13 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=13 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=13 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=13 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=14 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=14 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=14 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=14 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=15 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=15 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=15 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=15 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=16 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=16 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=16 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=16 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=17 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=17 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=17 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=17 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=18 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=18 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=18 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=18 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=19 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=19 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=19 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=19 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=20 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=20 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=20 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=20 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=21 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=21 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=21 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=21 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=22 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=22 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=22 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=22 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=23 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=23 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=23 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=23 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=24 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=24 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=24 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=24 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=25 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=25 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=25 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=25 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=26 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=26 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=26 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=26 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=27 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=27 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=27 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=27 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=28 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=28 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=28 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=28 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=29 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=29 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=29 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=29 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=30 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=30 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=30 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=30 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=31 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=31 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=31 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=31 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=32 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=32 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=32 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=32 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=33 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=33 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=33 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=33 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=34 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=34 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=34 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=34 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=35 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=35 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=35 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=35 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=36 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=36 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=36 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=36 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=37 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=37 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=37 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=37 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=38 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=38 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=38 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=38 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=39 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=39 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=39 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=39 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=40 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=40 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=40 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=40 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=41 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=41 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=41 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=41 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=42 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=42 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=42 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=42 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=43 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=43 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=43 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=43 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=44 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=44 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=44 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=44 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=45 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=45 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=45 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=45 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=46 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=46 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=46 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=46 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=47 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=47 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=47 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=47 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=48 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=48 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=48 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=48 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=49 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=49 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=49 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=49 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=50 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=50 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=50 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=50 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=51 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=51 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=51 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=51 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=52 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=52 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=52 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=52 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=53 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=53 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=53 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=53 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=54 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=54 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=54 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=54 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=55 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=55 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=55 lane-num=4 property=c0 data=0x1c.1c.1c.1c +phy set pre-emphasis unit=0 portlist=55 lane-num=4 property=c1 data=0x4.4.4.4 +phy set pre-emphasis unit=0 portlist=56 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=56 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=56 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=56 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=57 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=57 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=57 lane-num=4 property=c0 data=0x1b.1b.1b.1b +phy set pre-emphasis unit=0 portlist=57 lane-num=4 property=c1 data=0x5.5.5.5 +phy set pre-emphasis unit=0 portlist=58 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=58 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=58 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=58 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=59 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=59 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=59 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=59 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=60 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=60 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=60 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=60 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=61 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=61 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=61 lane-num=4 property=c0 data=0x19.19.19.19 +phy set pre-emphasis unit=0 portlist=61 lane-num=4 property=c1 data=0x7.7.7.7 +phy set pre-emphasis unit=0 portlist=62 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=62 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=62 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=62 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=63 lane-num=4 property=c2 data=0x1.1.1.1 +phy set pre-emphasis unit=0 portlist=63 lane-num=4 property=cn1 data=0x3.3.3.3 +phy set pre-emphasis unit=0 portlist=63 lane-num=4 property=c0 data=0x1a.1a.1a.1a +phy set pre-emphasis unit=0 portlist=63 lane-num=4 property=c1 data=0x6.6.6.6 +phy set pre-emphasis unit=0 portlist=129 lane-num=1 property=c2 data=0x1 +phy set pre-emphasis unit=0 portlist=129 lane-num=1 property=cn1 data=0x1 +phy set pre-emphasis unit=0 portlist=129 lane-num=1 property=c0 data=0x2 +phy set pre-emphasis unit=0 portlist=129 lane-num=1 property=c1 data=0x3 +phy set pre-emphasis unit=0 portlist=130 lane-num=1 property=c2 data=0x1 +phy set pre-emphasis unit=0 portlist=130 lane-num=1 property=cn1 data=0x1 +phy set pre-emphasis unit=0 portlist=130 lane-num=1 property=c0 data=0x2 +phy set pre-emphasis unit=0 portlist=130 lane-num=1 property=c1 data=0x3 +port set unit=0 portlist=0 speed=100g +port set unit=0 portlist=1 speed=100g +port set unit=0 portlist=2 speed=100g +port set unit=0 portlist=3 speed=100g +port set unit=0 portlist=4 speed=100g +port set unit=0 portlist=5 speed=100g +port set unit=0 portlist=6 speed=100g +port set unit=0 portlist=7 speed=100g +port set unit=0 portlist=8 speed=100g +port set unit=0 portlist=9 speed=100g +port set unit=0 portlist=10 speed=100g +port set unit=0 portlist=11 speed=100g +port set unit=0 portlist=12 speed=100g +port set unit=0 portlist=13 speed=100g +port set unit=0 portlist=14 speed=100g +port set unit=0 portlist=15 speed=100g +port set unit=0 portlist=16 speed=100g +port set unit=0 portlist=17 speed=100g +port set unit=0 portlist=18 speed=100g +port set unit=0 portlist=19 speed=100g +port set unit=0 portlist=20 speed=100g +port set unit=0 portlist=21 speed=100g +port set unit=0 portlist=22 speed=100g +port set unit=0 portlist=23 speed=100g +port set unit=0 portlist=24 speed=100g +port set unit=0 portlist=25 speed=100g +port set unit=0 portlist=26 speed=100g +port set unit=0 portlist=27 speed=100g +port set unit=0 portlist=28 speed=100g +port set unit=0 portlist=29 speed=100g +port set unit=0 portlist=30 speed=100g +port set unit=0 portlist=31 speed=100g +port set unit=0 portlist=32 speed=100g +port set unit=0 portlist=33 speed=100g +port set unit=0 portlist=34 speed=100g +port set unit=0 portlist=35 speed=100g +port set unit=0 portlist=36 speed=100g +port set unit=0 portlist=37 speed=100g +port set unit=0 portlist=38 speed=100g +port set unit=0 portlist=39 speed=100g +port set unit=0 portlist=40 speed=100g +port set unit=0 portlist=41 speed=100g +port set unit=0 portlist=42 speed=100g +port set unit=0 portlist=43 speed=100g +port set unit=0 portlist=44 speed=100g +port set unit=0 portlist=45 speed=100g +port set unit=0 portlist=46 speed=100g +port set unit=0 portlist=47 speed=100g +port set unit=0 portlist=48 speed=100g +port set unit=0 portlist=49 speed=100g +port set unit=0 portlist=50 speed=100g +port set unit=0 portlist=51 speed=100g +port set unit=0 portlist=52 speed=100g +port set unit=0 portlist=53 speed=100g +port set unit=0 portlist=54 speed=100g +port set unit=0 portlist=55 speed=100g +port set unit=0 portlist=56 speed=100g +port set unit=0 portlist=57 speed=100g +port set unit=0 portlist=58 speed=100g +port set unit=0 portlist=59 speed=100g +port set unit=0 portlist=60 speed=100g +port set unit=0 portlist=61 speed=100g +port set unit=0 portlist=62 speed=100g +port set unit=0 portlist=63 speed=100g +port set unit=0 portlist=129 speed=10g +port set unit=0 portlist=130 speed=10g +port set unit=0 portlist=0 medium-type=sr4 +port set unit=0 portlist=1 medium-type=sr4 +port set unit=0 portlist=2 medium-type=sr4 +port set unit=0 portlist=3 medium-type=sr4 +port set unit=0 portlist=4 medium-type=sr4 +port set unit=0 portlist=5 medium-type=sr4 +port set unit=0 portlist=6 medium-type=sr4 +port set unit=0 portlist=7 medium-type=sr4 +port set unit=0 portlist=8 medium-type=sr4 +port set unit=0 portlist=9 medium-type=sr4 +port set unit=0 portlist=10 medium-type=sr4 +port set unit=0 portlist=11 medium-type=sr4 +port set unit=0 portlist=12 medium-type=sr4 +port set unit=0 portlist=13 medium-type=sr4 +port set unit=0 portlist=14 medium-type=sr4 +port set unit=0 portlist=15 medium-type=sr4 +port set unit=0 portlist=16 medium-type=sr4 +port set unit=0 portlist=17 medium-type=sr4 +port set unit=0 portlist=18 medium-type=sr4 +port set unit=0 portlist=19 medium-type=sr4 +port set unit=0 portlist=20 medium-type=sr4 +port set unit=0 portlist=21 medium-type=sr4 +port set unit=0 portlist=22 medium-type=sr4 +port set unit=0 portlist=23 medium-type=sr4 +port set unit=0 portlist=24 medium-type=sr4 +port set unit=0 portlist=25 medium-type=sr4 +port set unit=0 portlist=26 medium-type=sr4 +port set unit=0 portlist=27 medium-type=sr4 +port set unit=0 portlist=28 medium-type=sr4 +port set unit=0 portlist=29 medium-type=sr4 +port set unit=0 portlist=30 medium-type=sr4 +port set unit=0 portlist=31 medium-type=sr4 +port set unit=0 portlist=32 medium-type=sr4 +port set unit=0 portlist=33 medium-type=sr4 +port set unit=0 portlist=34 medium-type=sr4 +port set unit=0 portlist=35 medium-type=sr4 +port set unit=0 portlist=36 medium-type=sr4 +port set unit=0 portlist=37 medium-type=sr4 +port set unit=0 portlist=38 medium-type=sr4 +port set unit=0 portlist=39 medium-type=sr4 +port set unit=0 portlist=40 medium-type=sr4 +port set unit=0 portlist=41 medium-type=sr4 +port set unit=0 portlist=42 medium-type=sr4 +port set unit=0 portlist=43 medium-type=sr4 +port set unit=0 portlist=44 medium-type=sr4 +port set unit=0 portlist=45 medium-type=sr4 +port set unit=0 portlist=46 medium-type=sr4 +port set unit=0 portlist=47 medium-type=sr4 +port set unit=0 portlist=48 medium-type=sr4 +port set unit=0 portlist=49 medium-type=sr4 +port set unit=0 portlist=50 medium-type=sr4 +port set unit=0 portlist=51 medium-type=sr4 +port set unit=0 portlist=52 medium-type=sr4 +port set unit=0 portlist=53 medium-type=sr4 +port set unit=0 portlist=54 medium-type=sr4 +port set unit=0 portlist=55 medium-type=sr4 +port set unit=0 portlist=56 medium-type=sr4 +port set unit=0 portlist=57 medium-type=sr4 +port set unit=0 portlist=58 medium-type=sr4 +port set unit=0 portlist=59 medium-type=sr4 +port set unit=0 portlist=60 medium-type=sr4 +port set unit=0 portlist=61 medium-type=sr4 +port set unit=0 portlist=62 medium-type=sr4 +port set unit=0 portlist=63 medium-type=sr4 +port set unit=0 portlist=129 medium-type=kr +port set unit=0 portlist=130 medium-type=kr +port set unit=0 portlist=0 fec=rs +port set unit=0 portlist=1 fec=rs +port set unit=0 portlist=2 fec=rs +port set unit=0 portlist=3 fec=rs +port set unit=0 portlist=4 fec=rs +port set unit=0 portlist=5 fec=rs +port set unit=0 portlist=6 fec=rs +port set unit=0 portlist=7 fec=rs +port set unit=0 portlist=8 fec=rs +port set unit=0 portlist=9 fec=rs +port set unit=0 portlist=10 fec=rs +port set unit=0 portlist=11 fec=rs +port set unit=0 portlist=12 fec=rs +port set unit=0 portlist=13 fec=rs +port set unit=0 portlist=14 fec=rs +port set unit=0 portlist=15 fec=rs +port set unit=0 portlist=16 fec=rs +port set unit=0 portlist=17 fec=rs +port set unit=0 portlist=18 fec=rs +port set unit=0 portlist=19 fec=rs +port set unit=0 portlist=20 fec=rs +port set unit=0 portlist=21 fec=rs +port set unit=0 portlist=22 fec=rs +port set unit=0 portlist=23 fec=rs +port set unit=0 portlist=24 fec=rs +port set unit=0 portlist=25 fec=rs +port set unit=0 portlist=26 fec=rs +port set unit=0 portlist=27 fec=rs +port set unit=0 portlist=28 fec=rs +port set unit=0 portlist=29 fec=rs +port set unit=0 portlist=30 fec=rs +port set unit=0 portlist=31 fec=rs +port set unit=0 portlist=32 fec=rs +port set unit=0 portlist=33 fec=rs +port set unit=0 portlist=34 fec=rs +port set unit=0 portlist=35 fec=rs +port set unit=0 portlist=36 fec=rs +port set unit=0 portlist=37 fec=rs +port set unit=0 portlist=38 fec=rs +port set unit=0 portlist=39 fec=rs +port set unit=0 portlist=40 fec=rs +port set unit=0 portlist=41 fec=rs +port set unit=0 portlist=42 fec=rs +port set unit=0 portlist=43 fec=rs +port set unit=0 portlist=44 fec=rs +port set unit=0 portlist=45 fec=rs +port set unit=0 portlist=46 fec=rs +port set unit=0 portlist=47 fec=rs +port set unit=0 portlist=48 fec=rs +port set unit=0 portlist=49 fec=rs +port set unit=0 portlist=50 fec=rs +port set unit=0 portlist=51 fec=rs +port set unit=0 portlist=52 fec=rs +port set unit=0 portlist=53 fec=rs +port set unit=0 portlist=54 fec=rs +port set unit=0 portlist=55 fec=rs +port set unit=0 portlist=56 fec=rs +port set unit=0 portlist=57 fec=rs +port set unit=0 portlist=58 fec=rs +port set unit=0 portlist=59 fec=rs +port set unit=0 portlist=60 fec=rs +port set unit=0 portlist=61 fec=rs +port set unit=0 portlist=62 fec=rs +port set unit=0 portlist=63 fec=rs +port advertise unit=0 portlist=129 speed-10g-kr +port advertise unit=0 portlist=130 speed-10g-kr +port set unit=0 portlist=129 an=enable +port set unit=0 portlist=130 an=enable +port set unit=0 portlist=0 admin=enable +port set unit=0 portlist=1 admin=enable +port set unit=0 portlist=2 admin=enable +port set unit=0 portlist=3 admin=enable +port set unit=0 portlist=4 admin=enable +port set unit=0 portlist=5 admin=enable +port set unit=0 portlist=6 admin=enable +port set unit=0 portlist=7 admin=enable +port set unit=0 portlist=8 admin=enable +port set unit=0 portlist=9 admin=enable +port set unit=0 portlist=10 admin=enable +port set unit=0 portlist=11 admin=enable +port set unit=0 portlist=12 admin=enable +port set unit=0 portlist=13 admin=enable +port set unit=0 portlist=14 admin=enable +port set unit=0 portlist=15 admin=enable +port set unit=0 portlist=16 admin=enable +port set unit=0 portlist=17 admin=enable +port set unit=0 portlist=18 admin=enable +port set unit=0 portlist=19 admin=enable +port set unit=0 portlist=20 admin=enable +port set unit=0 portlist=21 admin=enable +port set unit=0 portlist=22 admin=enable +port set unit=0 portlist=23 admin=enable +port set unit=0 portlist=24 admin=enable +port set unit=0 portlist=25 admin=enable +port set unit=0 portlist=26 admin=enable +port set unit=0 portlist=27 admin=enable +port set unit=0 portlist=28 admin=enable +port set unit=0 portlist=29 admin=enable +port set unit=0 portlist=30 admin=enable +port set unit=0 portlist=31 admin=enable +port set unit=0 portlist=32 admin=enable +port set unit=0 portlist=33 admin=enable +port set unit=0 portlist=34 admin=enable +port set unit=0 portlist=35 admin=enable +port set unit=0 portlist=36 admin=enable +port set unit=0 portlist=37 admin=enable +port set unit=0 portlist=38 admin=enable +port set unit=0 portlist=39 admin=enable +port set unit=0 portlist=40 admin=enable +port set unit=0 portlist=41 admin=enable +port set unit=0 portlist=42 admin=enable +port set unit=0 portlist=43 admin=enable +port set unit=0 portlist=44 admin=enable +port set unit=0 portlist=45 admin=enable +port set unit=0 portlist=46 admin=enable +port set unit=0 portlist=47 admin=enable +port set unit=0 portlist=48 admin=enable +port set unit=0 portlist=49 admin=enable +port set unit=0 portlist=50 admin=enable +port set unit=0 portlist=51 admin=enable +port set unit=0 portlist=52 admin=enable +port set unit=0 portlist=53 admin=enable +port set unit=0 portlist=54 admin=enable +port set unit=0 portlist=55 admin=enable +port set unit=0 portlist=56 admin=enable +port set unit=0 portlist=57 admin=enable +port set unit=0 portlist=58 admin=enable +port set unit=0 portlist=59 admin=enable +port set unit=0 portlist=60 admin=enable +port set unit=0 portlist=61 admin=enable +port set unit=0 portlist=62 admin=enable +port set unit=0 portlist=63 admin=enable +port set unit=0 portlist=129 admin=enable +port set unit=0 portlist=130 admin=enable diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps index e6fe6721350..fc640e0d78f 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/led_proc_init.nps @@ -1,20 +1,9 @@ -#This configuration file is for customer init value feature. Please refer to nps_cfg.h/nps_cfg.c for detail. -#1. The lines beginning with # are comment lines. The lines beginning with number are the setting lines. -#2. There are five parameters which can be set. -# 1) the first is unit. -# 2) the second is NPS_CFG_TYPE_XXX. Refer to NPS_CFG_TYPE_T. -# 3) the 3-5 are {param0, param1, value} pairs. Refer to NPS_CFG_VALUE_T. Support HEX format. -# 4) the (unit, NPS_CFG_TYPE_XXX, param0, param1) group is the key to get the correspingding value. -# There should be no same (unit, NPS_CFG_TYPE_XXX, param0, param1) group. -#3. User must follow correct format to apply the setting. Please refer to below commentted example(#0 NPS_CFG_TYPE_L2_ADDR_MODE 0 0 1); -#4. Usage under the linux shell: -# 1) ./image-path/image-name -c cfg-path/NPS_TAU_EVB_6T4_64.cfg : mamually specify directory path if they are not in current work dirctory. -# 2) ./image-name -c NPS_TAU_EVB_6T4_64.cfg : the image and the NPS_TAU_EVB_3T2_32.cfg are in the current work directory. - -#unit NPS_CFG_TYPE_XXX param0 param1 value -#---- ---------------- ------ ------ ----- -0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 -0 NPS_CFG_TYPE_LED_CFG 0 0 2 -0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 0 -0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 0 -0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +#unit NPS_CFG_TYPE_XXX param0 param1 value +#---- ---------------- ------ ------ ----- +0 NPS_CFG_TYPE_USE_UNIT_PORT 0 0 1 +0 NPS_CFG_TYPE_LED_CFG 0 0 2 +0 NPS_CFG_TYPE_CPI_PORT_MODE 129 0 1 +0 NPS_CFG_TYPE_CPI_PORT_MODE 130 0 1 +0 NPS_CFG_TYPE_USER_BUF_CTRL 0 0 1 +0 NPS_CFG_TYPE_HASH_L2_FDB_REGION_ENTRY_NUM 0 0 49152 +0 NPS_CFG_TYPE_HASH_L3_WITH_IPV6_PREFIX_64_REGION_ENTRY_NUM 0 0 32768 diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk index fc6200005db..3ce0287470d 100644 --- a/platform/nephos/rules.mk +++ b/platform/nephos/rules.mk @@ -10,7 +10,7 @@ include $(PLATFORM_PATH)/python-saithrift.mk #include $(PLATFORM_PATH)/docker-ptf-nephos.mk NPX_DIAG = npx_diag -$(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag_2.0.1-20171020" +$(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag" DSSERVE = dsserve $(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/dsserve?sv=2015-04-05&sr=b&sig=gyNbgSL%2FvpMXDdpboVkIJcTKMRdGgEaOR9OukHhEsu8%3D&se=2030-03-31T23%3A06%3A35Z&sp=r" diff --git a/platform/nephos/sai.mk b/platform/nephos/sai.mk index 90ee027518e..2da9e1f2c4f 100644 --- a/platform/nephos/sai.mk +++ b/platform/nephos/sai.mk @@ -1,9 +1,9 @@ -NEPHOS_SAI = libsainps_2.0.2-20171204_amd64.deb -$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.2-20171204_amd64.deb" +NEPHOS_SAI = libsainps_2.0.3a63-20180110_amd64.deb +$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.3a63-20180110_amd64.deb" -NEPHOS_SAI_DEV = libsainps-dev_2.0.2-20171124_amd64.deb +NEPHOS_SAI_DEV = libsainps-dev_2.0.3a63-20180110_amd64.deb $(eval $(call add_derived_package,$(NEPHOS_SAI),$(NEPHOS_SAI_DEV))) -$(NEPHOS_SAI_DEV)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_2.0.2-20171124_amd64.deb" +$(NEPHOS_SAI_DEV)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_2.0.3a63-20180110_amd64.deb" SONIC_ONLINE_DEBS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(NEPHOS_SAI_DEV)_DEPENDS += $(NEPHOS_SAI) diff --git a/platform/nephos/sdk.mk b/platform/nephos/sdk.mk index 392ae459cc5..1bc7fe35c0d 100644 --- a/platform/nephos/sdk.mk +++ b/platform/nephos/sdk.mk @@ -1,4 +1,4 @@ -NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.2-20171204_amd64.deb -$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.2-20171204_amd64.deb" +NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb +$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb" SONIC_ONLINE_DEBS += $(NEPHOS_NPS_KERNEL) From 47aba6f76d364452517cedf2f1b3d2f66ccdf61b Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Thu, 11 Jan 2018 20:32:14 -0800 Subject: [PATCH 038/254] [libsaithrift-dev]: Enable building libsaithrift-dev and pythonthrift libraries (#1296) * Fix build of libsaithrift for broadcom * Restore libsaithrift-dev building * Comment out libsaithrift library on cavium and marvell. Both of them have old SAI drivers * Revert back unintentional acton changes * Don't run the package checks when building sairedis package --- platform/broadcom/libsaithrift-dev.mk | 6 +++--- platform/broadcom/python-saithrift.mk | 6 +++--- platform/broadcom/rules.mk | 2 +- platform/cavium/libsaithrift-dev.mk | 4 ++-- platform/cavium/python-saithrift.mk | 4 ++-- platform/cavium/rules.mk | 2 +- platform/centec/libsaithrift-dev.mk | 4 ++-- platform/centec/python-saithrift.mk | 4 ++-- platform/marvell/libsaithrift-dev.mk | 4 ++-- platform/marvell/python-saithrift.mk | 4 ++-- platform/marvell/rules.mk | 2 +- platform/mellanox/libsaithrift-dev.mk | 6 +++--- platform/mellanox/python-saithrift.mk | 6 +++--- platform/nephos/libsaithrift-dev.mk | 6 +++--- platform/nephos/python-saithrift.mk | 6 +++--- platform/nephos/rules.mk | 2 +- rules/sairedis.mk | 1 + slave.mk | 4 ++-- src/sonic-sairedis | 2 +- 19 files changed, 38 insertions(+), 37 deletions(-) diff --git a/platform/broadcom/libsaithrift-dev.mk b/platform/broadcom/libsaithrift-dev.mk index 6e422db6e79..772f98339cb 100644 --- a/platform/broadcom/libsaithrift-dev.mk +++ b/platform/broadcom/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_BRCM = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_BRCM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAITHRIFT_DEV_BRCM)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BRCM) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BRCM) diff --git a/platform/broadcom/python-saithrift.mk b/platform/broadcom/python-saithrift.mk index 18bf77c3d00..11efddc3684 100644 --- a/platform/broadcom/python-saithrift.mk +++ b/platform/broadcom/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_BRCM = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_BRCM = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_BRCM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_BRCM)_DEPENDS += $(BRCM_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BRCM) diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index e9436198796..0437758917c 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -16,7 +16,7 @@ include $(PLATFORM_PATH)/raw-image.mk include $(PLATFORM_PATH)/one-aboot.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk -#include $(PLATFORM_PATH)/docker-ptf-brcm.mk +include $(PLATFORM_PATH)/docker-ptf-brcm.mk BCMCMD = bcmcmd $(BCMCMD)_URL = "https://sonicstorage.blob.core.windows.net/packages/20170518/bcmcmd?sv=2015-04-05&sr=b&sig=OCW4mfmbQ6D0BH8nllpAWrS8XL9uczrw32w3XgL4jws%3D&se=2030-03-31T23%3A06%3A15Z&sp=r" diff --git a/platform/cavium/libsaithrift-dev.mk b/platform/cavium/libsaithrift-dev.mk index 4a19fabffaf..b7203d8d107 100644 --- a/platform/cavium/libsaithrift-dev.mk +++ b/platform/cavium/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_CAVM = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CAVM)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CAVM_LIBSAI) $(CAVM_SAI) $(LIBSAITHRIFT_DEV_CAVM)_RDEPENDS += $(LIBTHRIFT) $(CAVM_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_CAVM) diff --git a/platform/cavium/python-saithrift.mk b/platform/cavium/python-saithrift.mk index 91d00ebaebc..22c38503a6b 100644 --- a/platform/cavium/python-saithrift.mk +++ b/platform/cavium/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_CAVM = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_CAVM = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_CAVM)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CAVM)_DEPENDS += $(CAVM_LIBSAI) $(CAVM_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CAVM) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index 37a9bd7c994..81053227e29 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -15,7 +15,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_CAVM_RPC) # Inject cavium sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) $(LIBSAITHRIFT_DEV_CAVM) +$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) #$(LIBSAITHRIFT_DEV_CAVM) # Runtime dependency on cavium sai is set only for syncd $(SYNCD)_RDEPENDS += $(CAVM_SAI) diff --git a/platform/centec/libsaithrift-dev.mk b/platform/centec/libsaithrift-dev.mk index b8fddbdf773..7e148d9df00 100644 --- a/platform/centec/libsaithrift-dev.mk +++ b/platform/centec/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_CENTEC = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_CENTEC)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(CENTEC_SAI) $(LIBSAITHRIFT_DEV_CENTEC)_RDEPENDS += $(LIBTHRIFT) $(CENTEC_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_CENTEC) diff --git a/platform/centec/python-saithrift.mk b/platform/centec/python-saithrift.mk index 37d1e935c04..0d320cba561 100644 --- a/platform/centec/python-saithrift.mk +++ b/platform/centec/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_CENTEC = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_CENTEC = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_CENTEC)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_CENTEC)_DEPENDS += $(CENTEC_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_CENTEC) diff --git a/platform/marvell/libsaithrift-dev.mk b/platform/marvell/libsaithrift-dev.mk index 443406e9c2f..e5b30f412bf 100644 --- a/platform/marvell/libsaithrift-dev.mk +++ b/platform/marvell/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_MRVL = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MRVL)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL)_RDEPENDS += $(LIBTHRIFT) $(MRVL_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MRVL) diff --git a/platform/marvell/python-saithrift.mk b/platform/marvell/python-saithrift.mk index f7a63b19edb..5830c982da9 100644 --- a/platform/marvell/python-saithrift.mk +++ b/platform/marvell/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_MRVL = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_MRVL = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_MRVL)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MRVL)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MRVL) diff --git a/platform/marvell/rules.mk b/platform/marvell/rules.mk index c5df6bab194..185b7b5fd7a 100644 --- a/platform/marvell/rules.mk +++ b/platform/marvell/rules.mk @@ -12,7 +12,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_MRVL_RPC) # Inject mrvl sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL) +$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) #$(LIBSAITHRIFT_DEV_MRVL) # Runtime dependency on mrvl sai is set only for syncd $(SYNCD)_RDEPENDS += $(MRVL_SAI) diff --git a/platform/mellanox/libsaithrift-dev.mk b/platform/mellanox/libsaithrift-dev.mk index 39222be39ca..77c27aa7ab0 100644 --- a/platform/mellanox/libsaithrift-dev.mk +++ b/platform/mellanox/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_MLNX = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_MLNX)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(MLNX_SAI) $(MLNX_SAI_DEV) $(LIBSAITHRIFT_DEV_MLNX)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MLNX) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_MLNX) diff --git a/platform/mellanox/python-saithrift.mk b/platform/mellanox/python-saithrift.mk index 59685121e02..a4485da0ca9 100644 --- a/platform/mellanox/python-saithrift.mk +++ b/platform/mellanox/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_MLNX = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_MLNX = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_MLNX)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_MLNX)_DEPENDS += $(MLNX_SAI_DEV) $(MLNX_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_MLNX) diff --git a/platform/nephos/libsaithrift-dev.mk b/platform/nephos/libsaithrift-dev.mk index 4103d5c0c7b..44d92ef6db7 100644 --- a/platform/nephos/libsaithrift-dev.mk +++ b/platform/nephos/libsaithrift-dev.mk @@ -1,7 +1,7 @@ # libsaithrift-dev package -LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_0.9.4_amd64.deb -$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +LIBSAITHRIFT_DEV_NEPHOS = libsaithrift-dev_1.0.4_amd64.deb +$(LIBSAITHRIFT_DEV_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(LIBSAITHRIFT_DEV_NEPHOS)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(LIBSAITHRIFT_DEV_NEPHOS)_RDEPENDS += $(LIBTHRIFT) $(NEPHOS_SAI) -#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS) +SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_NEPHOS) diff --git a/platform/nephos/python-saithrift.mk b/platform/nephos/python-saithrift.mk index bc4a57b64cd..e0c56f4053e 100644 --- a/platform/nephos/python-saithrift.mk +++ b/platform/nephos/python-saithrift.mk @@ -1,6 +1,6 @@ # python-saithrift package -PYTHON_SAITHRIFT_NEPHOS = python-saithrift_0.9.4_amd64.deb -$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/SAI +PYTHON_SAITHRIFT_NEPHOS = python-saithrift_1.0.4_amd64.deb +$(PYTHON_SAITHRIFT_NEPHOS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI $(PYTHON_SAITHRIFT_NEPHOS)_DEPENDS += $(NEPHOS_SAI_DEV) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV) -#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) +SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_NEPHOS) diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk index 3ce0287470d..a7fe1d1d118 100644 --- a/platform/nephos/rules.mk +++ b/platform/nephos/rules.mk @@ -7,7 +7,7 @@ include $(PLATFORM_PATH)/docker-syncd-nephos-rpc.mk include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/libsaithrift-dev.mk include $(PLATFORM_PATH)/python-saithrift.mk -#include $(PLATFORM_PATH)/docker-ptf-nephos.mk +include $(PLATFORM_PATH)/docker-ptf-nephos.mk NPX_DIAG = npx_diag $(NPX_DIAG)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/npx_diag" diff --git a/rules/sairedis.mk b/rules/sairedis.mk index 760d75c5a61..fc481e620cd 100644 --- a/rules/sairedis.mk +++ b/rules/sairedis.mk @@ -4,6 +4,7 @@ LIBSAIREDIS = libsairedis_1.0.0_amd64.deb $(LIBSAIREDIS)_SRC_PATH = $(SRC_PATH)/sonic-sairedis $(LIBSAIREDIS)_DEPENDS += $(LIBSWSSCOMMON_DEV) $(LIBTHRIFT_DEV) $(LIBSAIREDIS)_RDEPENDS += $(LIBSWSSCOMMON) +$(LIBSAIREDIS)_DEB_BUILD_OPTIONS = nocheck SONIC_DPKG_DEBS += $(LIBSAIREDIS) LIBSAIREDIS_DEV = libsairedis-dev_1.0.0_amd64.deb diff --git a/slave.mk b/slave.mk index 425ba4c41d8..2103c79046a 100644 --- a/slave.mk +++ b/slave.mk @@ -210,8 +210,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a pushd $($*_SRC_PATH) $(LOG) [ ! -f ./autogen.sh ] || ./autogen.sh $(LOG) $(if $($*_DPKG_TARGET), - dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) $(LOG), - dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) $(LOG) + DEB_BUILD_OPTIONS=$($*_DEB_BUILD_OPTIONS) dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) $(LOG), + DEB_BUILD_OPTIONS=$($*_DEB_BUILD_OPTIONS) dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) $(LOG) ) popd $(LOG) # Clean up diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 3b817bbe14f..f04e13e9d5e 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 3b817bbe14f1e5177e6200c7a80ab74db4768eaa +Subproject commit f04e13e9d5ea49c6fbcf884734043ebfdd8b998e From fac28cf63f0fa79fc87799fd80158281960f18b6 Mon Sep 17 00:00:00 2001 From: lguohan Date: Fri, 12 Jan 2018 09:34:51 -0800 Subject: [PATCH 039/254] [build]: build libsaithrift-dev and docker-ptf-[platform] (#1300) --- platform/broadcom/docker-ptf-brcm.mk | 2 +- platform/broadcom/rules.mk | 2 +- platform/cavium/rules.mk | 2 +- platform/marvell/rules.mk | 2 +- platform/mellanox/docker-ptf-mlnx.mk | 2 +- platform/mellanox/rules.mk | 2 +- platform/nephos/docker-ptf-nephos.mk | 2 +- platform/nephos/rules.mk | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/broadcom/docker-ptf-brcm.mk b/platform/broadcom/docker-ptf-brcm.mk index c57ce43dc90..7b78aa9ec31 100644 --- a/platform/broadcom/docker-ptf-brcm.mk +++ b/platform/broadcom/docker-ptf-brcm.mk @@ -4,4 +4,4 @@ DOCKER_PTF_BRCM = docker-ptf-brcm.gz $(DOCKER_PTF_BRCM)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift $(DOCKER_PTF_BRCM)_DEPENDS += $(PYTHON_SAITHRIFT_BRCM) $(DOCKER_PTF_BRCM)_LOAD_DOCKERS += $(DOCKER_PTF) -#SONIC_DOCKER_IMAGES += $(DOCKER_PTF_BRCM) +SONIC_DOCKER_IMAGES += $(DOCKER_PTF_BRCM) diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk index 0437758917c..8147aa31c20 100755 --- a/platform/broadcom/rules.mk +++ b/platform/broadcom/rules.mk @@ -30,7 +30,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \ $(DOCKER_FPM) # Inject brcm sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV) #$(LIBSAITHRIFT_DEV_BRCM) +$(LIBSAIREDIS)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAITHRIFT_DEV_BRCM) # Runtime dependency on brcm sai is set only for syncd $(SYNCD)_RDEPENDS += $(BRCM_SAI) diff --git a/platform/cavium/rules.mk b/platform/cavium/rules.mk index 81053227e29..37a9bd7c994 100644 --- a/platform/cavium/rules.mk +++ b/platform/cavium/rules.mk @@ -15,7 +15,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_CAVM_RPC) # Inject cavium sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) #$(LIBSAITHRIFT_DEV_CAVM) +$(LIBSAIREDIS)_DEPENDS += $(CAVM_SAI) $(CAVM_LIBSAI) $(LIBSAITHRIFT_DEV_CAVM) # Runtime dependency on cavium sai is set only for syncd $(SYNCD)_RDEPENDS += $(CAVM_SAI) diff --git a/platform/marvell/rules.mk b/platform/marvell/rules.mk index 185b7b5fd7a..c5df6bab194 100644 --- a/platform/marvell/rules.mk +++ b/platform/marvell/rules.mk @@ -12,7 +12,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_SYNCD_MRVL_RPC) # Inject mrvl sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) #$(LIBSAITHRIFT_DEV_MRVL) +$(LIBSAIREDIS)_DEPENDS += $(MRVL_FPA) $(MRVL_SAI) $(LIBSAITHRIFT_DEV_MRVL) # Runtime dependency on mrvl sai is set only for syncd $(SYNCD)_RDEPENDS += $(MRVL_SAI) diff --git a/platform/mellanox/docker-ptf-mlnx.mk b/platform/mellanox/docker-ptf-mlnx.mk index 9f994f62de6..7f23dc715e3 100644 --- a/platform/mellanox/docker-ptf-mlnx.mk +++ b/platform/mellanox/docker-ptf-mlnx.mk @@ -4,4 +4,4 @@ DOCKER_PTF_MLNX = docker-ptf-mlnx.gz $(DOCKER_PTF_MLNX)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift $(DOCKER_PTF_MLNX)_DEPENDS += $(PYTHON_SAITHRIFT_MLNX) $(DOCKER_PTF_MLNX)_LOAD_DOCKERS += $(DOCKER_PTF) -#SONIC_DOCKER_IMAGES += $(DOCKER_PTF_MLNX) +SONIC_DOCKER_IMAGES += $(DOCKER_PTF_MLNX) diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index d67401df245..1651f4a6680 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -15,7 +15,7 @@ SONIC_ALL += $(SONIC_ONE_IMAGE) \ $(DOCKER_FPM) # Inject mlnx sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) #$(LIBSAITHRIFT_DEV_MLNX) +$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) $(LIBSAITHRIFT_DEV_MLNX) # Runtime dependency on mlnx sai is set only for syncd $(SYNCD)_RDEPENDS += $(MLNX_SAI) diff --git a/platform/nephos/docker-ptf-nephos.mk b/platform/nephos/docker-ptf-nephos.mk index 6d7950f7516..7fbbd271cf6 100644 --- a/platform/nephos/docker-ptf-nephos.mk +++ b/platform/nephos/docker-ptf-nephos.mk @@ -4,4 +4,4 @@ DOCKER_PTF_NEPHOS = docker-ptf-nephos.gz $(DOCKER_PTF_NEPHOS)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift $(DOCKER_PTF_NEPHOS)_DEPENDS += $(PYTHON_SAITHRIFT_NEPHOS) $(DOCKER_PTF_NEPHOS)_LOAD_DOCKERS += $(DOCKER_PTF) -#SONIC_DOCKER_IMAGES += $(DOCKER_PTF_NEPHOS) +SONIC_DOCKER_IMAGES += $(DOCKER_PTF_NEPHOS) diff --git a/platform/nephos/rules.mk b/platform/nephos/rules.mk index a7fe1d1d118..96f39ef8aad 100644 --- a/platform/nephos/rules.mk +++ b/platform/nephos/rules.mk @@ -20,7 +20,7 @@ SONIC_ONLINE_FILES += $(NPX_DIAG) $(DSSERVE) SONIC_ALL += $(SONIC_ONE_IMAGE) $(DOCKER_FPM) # Inject nephos sai into sairedis -$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) #$(LIBSAITHRIFT_DEV_NEPHOS) +$(LIBSAIREDIS)_DEPENDS += $(NEPHOS_SAI) $(NEPHOS_SAI_DEV) $(LIBSAITHRIFT_DEV_NEPHOS) # Runtime dependency on nephos sai is set only for syncd $(SYNCD)_RDEPENDS += $(NEPHOS_SAI) From 5c83be5d2867f497569745203eecb4fc7fcae4fc Mon Sep 17 00:00:00 2001 From: jostar-yang Date: Sat, 13 Jan 2018 11:34:51 +0800 Subject: [PATCH 040/254] Add support for Accton AS7712-32X platform (#1299) * Add support as7716_32x sfp/psu/portled/eeprom * Add as7716_32x drv code(not inlcude .*.o) * Update platform-modules-accton.mk * Update platform-modules-accton.mk 1.Modify platform-modules-accton.mk to use new style code add_extra_package 2. fix error code * Add as7716_32x build to debian control,rule * Add as7716_32x export --- .../led_proc_init.soc | 41 ++++++ .../plugins/eeprom.py | 24 ++++ .../plugins/psuutil.py | 61 ++++++++ .../plugins/sfputil.py | 134 ++++++++++++++++++ platform/broadcom/one-image.mk | 1 + platform/broadcom/platform-modules-accton.mk | 6 + .../broadcom/sonic-platform-modules-accton | 2 +- 7 files changed, 268 insertions(+), 1 deletion(-) create mode 100755 device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc create mode 100755 device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py create mode 100755 device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py create mode 100755 device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py mode change 100644 => 100755 platform/broadcom/one-image.mk mode change 100644 => 100755 platform/broadcom/platform-modules-accton.mk diff --git a/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc new file mode 100755 index 00000000000..719cb777719 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/led_proc_init.soc @@ -0,0 +1,41 @@ +m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28 +m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24 +m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20 +m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16 +m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60 +m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56 +m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52 +m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48 +m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44 +m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40 +m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36 +m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32 +m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12 +m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8 +m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4 +m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0 + +m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32 +m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36 +m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40 +m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44 +m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0 +m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4 +m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8 +m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12 +m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16 +m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20 +m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24 +m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28 +m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48 +m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52 +m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56 +m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60 + +led 0 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 0 start + +led 1 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +led 1 start + +led auto on \ No newline at end of file diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py new file mode 100755 index 00000000000..c0122e65844 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/eeprom.py @@ -0,0 +1,24 @@ +#!/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 + import subprocess +except ImportError, e: + raise ImportError (str(e) + "- required module not found") + +class board(eeprom_tlvinfo.TlvInfoDecoder): + _TLV_INFO_MAX_LEN = 256 + def __init__(self, name, path, cpld_root, ro): + self.eeprom_path = "/sys/bus/i2c/devices/1-0056/eeprom" + #Two i2c buses might get flipped order, check them both. + if not os.path.exists(self.eeprom_path): + self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom" + super(board, self).__init__(self.eeprom_path, 0, '', True) diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py new file mode 100755 index 00000000000..d8fddc23550 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/psuutil.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +############################################################################# +# Accton +# +# Module contains an implementation of SONiC PSU Base API and +# provides the PSUs status which are available in the platform +# +############################################################################# + +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) + + self.psu_path = "/sys/bus/i2c/devices/" + self.psu_presence = "/psu_present" + self.psu_oper_status = "/psu_power_good" + self.psu_mapping = { + 1: "18-0053", + 2: "17-0050", + } + + def get_num_psus(self): + return len(self.psu_mapping) + + def get_psu_status(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status + try: + with open(node, 'r') as power_status: + status = int(power_status.read()) + except IOError: + return False + + return status == 1 + + def get_psu_presence(self, index): + if index is None: + return False + + status = 0 + node = self.psu_path + self.psu_mapping[index] + self.psu_presence + try: + with open(node, 'r') as presence_status: + status = int(presence_status.read()) + except IOError: + return False + + return status == 1 diff --git a/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py new file mode 100755 index 00000000000..7a36db7cf45 --- /dev/null +++ b/device/accton/x86_64-accton_as7716_32x-r0/plugins/sfputil.py @@ -0,0 +1,134 @@ +# 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 = 31 + PORTS_IN_BLOCK = 32 + + BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/" + BASE_CPLD_PATH = "/sys/bus/i2c/devices/11-0060/" + + _port_to_is_present = {} + _port_to_lp_mode = {} + + _port_to_eeprom_mapping = {} + _port_to_i2c_mapping = { + 0: [1, 29], + 1: [2, 30], + 2: [3, 31], + 3: [4, 32], + 4: [5, 34], + 5: [6, 33], + 6: [7, 36], + 7: [8, 35], + 8: [9, 25], + 9: [10, 26], + 10: [11, 27], + 11: [12, 28], + 12: [14, 37], + 13: [15, 38], + 14: [16, 39], + 15: [17, 40], + 16: [18, 41], + 17: [19, 42], + 18: [20, 43], + 19: [21, 44], + 20: [22, 53], + 21: [23, 54], + 22: [24, 55], + 23: [25, 56], + 24: [26, 45], + 25: [27, 46], + 26: [28, 47], + 27: [29, 48], + 28: [30, 49], + 29: [31, 50], + 30: [32, 51], + 31: [33, 52], + } + + @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, self.PORTS_IN_BLOCK + 1) + + @property + def port_to_eeprom_mapping(self): + return self._port_to_eeprom_mapping + + def __init__(self): + eeprom_path = self.BASE_OOM_PATH + "eeprom" + + for x in range(0, self.port_end+1): + self.port_to_eeprom_mapping[x] = eeprom_path.format( + self._port_to_i2c_mapping[x][1] + ) + + 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 + + present_path = self.BASE_CPLD_PATH + "module_present_" + str(port_num+1) + self.__port_to_is_present = present_path + + try: + val_file = open(self.__port_to_is_present) + 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): + raise NotImplementedError + + def set_low_power_mode(self, port_num, lpmode): + raise NotImplementedError + + def reset(self, port_num): + if port_num < self.port_start or port_num > self.port_end: + return False + + mod_rst_path = self.BASE_CPLD_PATH + "module_reset_" + str(port_num+1) + self.__port_to_mod_rst = mod_rst_path + try: + reg_file = open(self.__port_to_mod_rst, 'r+') + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + reg_value = '1' + + reg_file.write(reg_value) + reg_file.close() + + return True \ No newline at end of file diff --git a/platform/broadcom/one-image.mk b/platform/broadcom/one-image.mk old mode 100644 new mode 100755 index a29d32abd1c..2e54972dce3 --- a/platform/broadcom/one-image.mk +++ b/platform/broadcom/one-image.mk @@ -15,6 +15,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(DELL_S6000_PLATFORM_MODULE) \ $(ACCTON_AS7712_32X_PLATFORM_MODULE) \ $(ACCTON_AS5712_54X_PLATFORM_MODULE) \ $(ACCTON_AS7816_64X_PLATFORM_MODULE) \ + $(ACCTON_AS7716_32X_PLATFORM_MODULE) \ $(INVENTEC_D7032Q28B_PLATFORM_MODULE) \ $(INVENTEC_D7054Q28B_PLATFORM_MODULE) \ $(CEL_DX010_PLATFORM_MODULE) \ diff --git a/platform/broadcom/platform-modules-accton.mk b/platform/broadcom/platform-modules-accton.mk old mode 100644 new mode 100755 index 7dcfb937de6..08820e9a270 --- a/platform/broadcom/platform-modules-accton.mk +++ b/platform/broadcom/platform-modules-accton.mk @@ -3,10 +3,12 @@ ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION = 1.1 ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION = 1.1 +ACCTON_AS7716_32X_PLATFORM_MODULE_VERSION = 1.1 export ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION export ACCTON_AS5712_54X_PLATFORM_MODULE_VERSION export ACCTON_AS7816_64X_PLATFORM_MODULE_VERSION +export ACCTON_AS7716_32X_PLATFORM_MODULE_VERSION ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb $(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton @@ -22,3 +24,7 @@ ACCTON_AS7816_64X_PLATFORM_MODULE = sonic-platform-accton-as7816-64x_$(ACCTON_AS $(ACCTON_AS7816_64X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7816_64x-r0 $(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7816_64X_PLATFORM_MODULE))) +ACCTON_AS7716_32X_PLATFORM_MODULE = sonic-platform-accton-as7716-32x_$(ACCTON_AS7716_32X_PLATFORM_MODULE_VERSION)_amd64.deb +$(ACCTON_AS7716_32X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7716_32x-r0 +$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE),$(ACCTON_AS7716_32X_PLATFORM_MODULE))) + diff --git a/platform/broadcom/sonic-platform-modules-accton b/platform/broadcom/sonic-platform-modules-accton index a7149adb425..3f06d9f5864 160000 --- a/platform/broadcom/sonic-platform-modules-accton +++ b/platform/broadcom/sonic-platform-modules-accton @@ -1 +1 @@ -Subproject commit a7149adb425bdd42520780f009f764b985ee0ebc +Subproject commit 3f06d9f5864c9daae4b582d60307ccb6d21c6ceb From a836fc42ac0ebc17c641d46305869be5d937d264 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Sat, 13 Jan 2018 03:43:14 -0800 Subject: [PATCH 041/254] [device]: Fix Mellanox sku check (#1303) Signed-off-by: Qi Luo --- dockers/docker-orchagent/swssconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index c8ee8759333..959b6714d27 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -37,7 +37,7 @@ elif [ "$HWSKU" == "Force10-S6100" ]; then SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json " elif [ "$HWSKU" == "Arista-7050-QX32" ]; then SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [[ "$HWSKU" == "ACS-MSN27"* ]]; then +elif [[ "$HWSKU" == "ACS-MSN27"* ]] || [[ "$HWSKU" == "Mellanox-SN2700" ]]; then sonic-cfggen -d -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json SWSSCONFIG_ARGS+="msn27xx.32ports.buffers.json " fi From 292de7dcdacce55a140d0f3a3ad8b8b41d341d20 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sat, 13 Jan 2018 09:33:56 -0800 Subject: [PATCH 042/254] [submodule]: update sonic-sairedis to enable syncd-rpc (#1304) --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index f04e13e9d5e..9364b7e95a9 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit f04e13e9d5ea49c6fbcf884734043ebfdd8b998e +Subproject commit 9364b7e95a9d581ea91833aac39c8d44c65235bf From b8a0a10e8d9c66d7f9adc1aa4aadd10675205c0c Mon Sep 17 00:00:00 2001 From: lguohan Date: Tue, 16 Jan 2018 10:50:43 -0800 Subject: [PATCH 043/254] [baseimage]: add mkfs.ext3 and fsck.ext3 in initrd to support ext3 partition (#1306) --- files/initramfs-tools/mke2fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/initramfs-tools/mke2fs b/files/initramfs-tools/mke2fs index de529eb5705..a67162199cf 100644 --- a/files/initramfs-tools/mke2fs +++ b/files/initramfs-tools/mke2fs @@ -21,7 +21,7 @@ copy_exec /sbin/mke2fs copy_exec /sbin/sfdisk copy_exec /sbin/fdisk -fstypes="ext4" +fstypes="ext4 ext3" for type in $fstypes; do prog="/sbin/mkfs.${type}" From 8eb4241f0e3aabcdb91de7e94a490e4df3555103 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Tue, 16 Jan 2018 14:24:27 -0800 Subject: [PATCH 044/254] [snmpagent]: Update sonic-snmpagent submodule (#1308) Signed-off-by: Qi Luo --- src/sonic-snmpagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index bedc2ec1d01..375363c1398 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit bedc2ec1d018333fefe67390fba5b5f65c62ba6f +Subproject commit 375363c13989ca3339689da106b66cfb38ef5eee From 6a8062da2c6f095b5780a36b6b063986b6376181 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Tue, 16 Jan 2018 16:37:38 -0800 Subject: [PATCH 045/254] [submodule]: Update sairedis (#1310) --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 9364b7e95a9..36752e19ae8 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 9364b7e95a9d581ea91833aac39c8d44c65235bf +Subproject commit 36752e19ae8f2709bd5d510d6e66ece73c16b71b From c568e8fd274c7fb892c33a8ac9358d5e7f90f224 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Tue, 16 Jan 2018 19:16:34 -0800 Subject: [PATCH 046/254] [Broadcom]: Update Boradcom SAI package to 3.0.3.3-3 (#1312) - update Arista 7050-QX32S config.bcm file - update Accton th-as771*-32x100G.config.bcm files --- platform/broadcom/sai.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk index 4f806ebd97f..46bde157cf1 100644 --- a/platform/broadcom/sai.mk +++ b/platform/broadcom/sai.mk @@ -1,9 +1,9 @@ -BRCM_SAI = libsaibcm_3.0.3.3-1_amd64.deb -$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm_3.0.3.3-1_amd64.deb?sv=2015-04-05&sr=b&sig=hoUotiQsgVMo6%2BzH87aaIeTsqPsRYWQT5oRdSc1uEm8%3D&se=2154-11-09T08%3A09%3A33Z&sp=r" +BRCM_SAI = libsaibcm_3.0.3.3-3_amd64.deb +$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm_3.0.3.3-3_amd64.deb?sv=2015-04-05&sr=b&sig=A%2Bcq%2B8XL%2BZfhOV6zqwRWm1jQ31PN0t54H9abZSRwTVw%3D&se=2031-09-25T22%3A41%3A43Z&sp=r" -BRCM_SAI_DEV = libsaibcm-dev_3.0.3.3-1_amd64.deb +BRCM_SAI_DEV = libsaibcm-dev_3.0.3.3-3_amd64.deb $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) -$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm-dev_3.0.3.3-1_amd64.deb?sv=2015-04-05&sr=b&sig=LfvM2LkGj3dPnSCyVEgPA35jvjKOgq%2FNSvj2UiPeGm4%3D&se=2154-11-09T08%3A11%3A03Z&sp=r" +$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/libsaibcm-dev_3.0.3.3-3_amd64.deb?sv=2015-04-05&sr=b&sig=XT0v%2B25LZ5whTwH%2FE%2FykQLV8Kzn%2FoDyLNXjmqNuiFPo%3D&se=2031-09-25T22%3A41%3A21Z&sp=r" SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) From 22a3e4817a88051515e4bf005e811edd782e7a7e Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Tue, 16 Jan 2018 23:20:13 -0800 Subject: [PATCH 047/254] Run docker containers with /tmp and /var/tmp mounted to tmpfs (#1313) --- files/build_templates/docker_image_ctl.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 628964ec7b6..a2bfb7d1250 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -63,6 +63,8 @@ start() { {%- if docker_container_name != "database" %} -v /usr/share/sonic/device/$PLATFORM/$HWSKU:/usr/share/sonic/hwsku:ro \ {%- endif %} + --tmpfs /tmp \ + --tmpfs /var/tmp \ --name={{docker_container_name}} {{docker_image_name}}:latest postStartAction From 9d62fbfb66cde80a92504a1b84e18da85156929a Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Wed, 17 Jan 2018 17:03:44 -0800 Subject: [PATCH 048/254] [snmpagent]: Update sonic-snmpagent submodule (#1314) Signed-off-by: Qi Luo --- src/sonic-snmpagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index 375363c1398..d60afe1810e 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit 375363c13989ca3339689da106b66cfb38ef5eee +Subproject commit d60afe1810e1bd6ed7b68718b905f8bfe4ac39c4 From 6cd307920f8bfe5a364b734a7f6c80588bdde799 Mon Sep 17 00:00:00 2001 From: "Wenda Ni, Ph.D" Date: Wed, 17 Jan 2018 17:08:49 -0800 Subject: [PATCH 049/254] [baseimage]: Add missing dependency of igb & ixgbe (#1316) --- rules/igb.mk | 1 + rules/ixgbe.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/rules/igb.mk b/rules/igb.mk index 654c4bd7703..9857c0517a0 100644 --- a/rules/igb.mk +++ b/rules/igb.mk @@ -4,5 +4,6 @@ IGB_DRIVER_VERSION = 5.3.5.4 export IGB_DRIVER_VERSION IGB_DRIVER = igb.ko +$(IGB_DRIVER)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) $(IGB_DRIVER)_SRC_PATH = $(SRC_PATH)/igb SONIC_MAKE_DEBS += $(IGB_DRIVER) diff --git a/rules/ixgbe.mk b/rules/ixgbe.mk index bdd175eac86..8819cd0018a 100644 --- a/rules/ixgbe.mk +++ b/rules/ixgbe.mk @@ -5,4 +5,5 @@ export IXGBE_DRIVER_VERSION IXGBE_DRIVER = ixgbe.ko $(IXGBE_DRIVER)_SRC_PATH = $(SRC_PATH)/ixgbe +$(IXGBE_DRIVER)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(IXGBE_DRIVER) From 134707f8221c82bb9bfb2c124e5db819badcfd5b Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 17 Jan 2018 17:11:31 -0800 Subject: [PATCH 050/254] Move platform-specific hardware plugin base packages to sonic-platform-common submodule (#1301) --- .gitmodules | 3 +++ dockers/docker-snmp-sv2/Dockerfile.j2 | 2 +- .../build_templates/sonic_debian_extension.j2 | 6 ++++++ platform/p4/docker-sonic-p4.mk | 10 +++++----- rules/asyncsnmp-py3.mk | 4 ++-- rules/sonic-ledd.mk | 2 +- rules/sonic-platform-common.mk | 13 ++++++++++++ rules/sonic-utilities.mk | 20 ++++++++++--------- slave.mk | 4 +++- src/sonic-platform-common | 1 + src/sonic-platform-daemons | 2 +- src/sonic-utilities | 2 +- 12 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 rules/sonic-platform-common.mk create mode 160000 src/sonic-platform-common diff --git a/.gitmodules b/.gitmodules index 1c7a6da0281..bcc9a8f3038 100644 --- a/.gitmodules +++ b/.gitmodules @@ -50,6 +50,9 @@ [submodule "platform/broadcom/sonic-platform-modules-ingrasys"] path = platform/broadcom/sonic-platform-modules-ingrasys url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys +[submodule "src/sonic-platform-common"] + path = src/sonic-platform-common + url = https://github.com/Azure/sonic-platform-common [submodule "src/sonic-platform-daemons"] path = src/sonic-platform-daemons url = https://github.com/Azure/sonic-platform-daemons diff --git a/dockers/docker-snmp-sv2/Dockerfile.j2 b/dockers/docker-snmp-sv2/Dockerfile.j2 index 3c547395111..0e83b230746 100644 --- a/dockers/docker-snmp-sv2/Dockerfile.j2 +++ b/dockers/docker-snmp-sv2/Dockerfile.j2 @@ -7,7 +7,7 @@ COPY [ \ "/debs/"] # Install Python SwSSSDK (SNMP subagent dependency) -COPY python-wheels/sonic_utilities-*-py3-*.whl /python-wheels/ +COPY python-wheels/sonic_platform_common-*-py3-*.whl /python-wheels/ COPY python-wheels/swsssdk-*-py3-*.whl /python-wheels/ COPY python-wheels/asyncsnmp-*-py3-*.whl /python-wheels/ diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index f861543e98c..a2bea7a6baa 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -77,6 +77,12 @@ sudo cp {{swsssdk_py2_wheel_path}} $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $SWSSSDK_PY2_WHEEL_NAME sudo rm -rf $FILESYSTEM_ROOT/$SWSSSDK_PY2_WHEEL_NAME +# Install sonic-platform-common Python 2 package +PLATFORM_COMMON_PY2_WHEEL_NAME=$(basename {{platform_common_py2_wheel_path}}) +sudo cp {{platform_common_py2_wheel_path}} $FILESYSTEM_ROOT/$PLATFORM_COMMON_PY2_WHEEL_NAME +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install $PLATFORM_COMMON_PY2_WHEEL_NAME +sudo rm -rf $FILESYSTEM_ROOT/$PLATFORM_COMMON_PY2_WHEEL_NAME + # Install SONiC Utilities (and its dependencies via 'apt-get -y install -f') sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/python-sonic-utilities_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f diff --git a/platform/p4/docker-sonic-p4.mk b/platform/p4/docker-sonic-p4.mk index ebe7ceb080a..1cd15439fb7 100644 --- a/platform/p4/docker-sonic-p4.mk +++ b/platform/p4/docker-sonic-p4.mk @@ -3,11 +3,11 @@ DOCKER_SONIC_P4 = docker-sonic-p4.gz $(DOCKER_SONIC_P4)_PATH = $(PLATFORM_PATH)/docker-sonic-p4 $(DOCKER_SONIC_P4)_DEPENDS += $(SWSS) \ - $(SYNCD) \ - $(P4_SWITCH) \ - $(REDIS_SERVER) \ - $(REDIS_TOOLS) \ - $(PYTHON_SWSSCOMMON) \ + $(SYNCD) \ + $(P4_SWITCH) \ + $(REDIS_SERVER) \ + $(REDIS_TOOLS) \ + $(PYTHON_SWSSCOMMON) \ $(LIBTEAMDCT) \ $(LIBTEAM_UTILS) \ $(SONIC_DEVICE_DATA) \ diff --git a/rules/asyncsnmp-py3.mk b/rules/asyncsnmp-py3.mk index f44d7f33653..cc0af244d85 100644 --- a/rules/asyncsnmp-py3.mk +++ b/rules/asyncsnmp-py3.mk @@ -3,6 +3,6 @@ ASYNCSNMP_PY3 = asyncsnmp-2.1.0-py3-none-any.whl $(ASYNCSNMP_PY3)_SRC_PATH = $(SRC_PATH)/sonic-snmpagent $(ASYNCSNMP_PY3)_PYTHON_VERSION = 3 -# Depends on sonic-utilities so it is possible to import sonic_psu -$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_UTILS_PY3) +# Depends on sonic-platform-common so it is possible to import sonic_psu +$(ASYNCSNMP_PY3)_DEPENDS += $(SWSSSDK_PY3) $(SONIC_PLATFORM_COMMON_PY3) SONIC_PYTHON_WHEELS += $(ASYNCSNMP_PY3) diff --git a/rules/sonic-ledd.mk b/rules/sonic-ledd.mk index aa95b46cf47..056f0f6c9bd 100644 --- a/rules/sonic-ledd.mk +++ b/rules/sonic-ledd.mk @@ -1,5 +1,5 @@ # sonic-ledd (SONiC Front-panel LED control daemon) Debian package -SONIC_LEDD = python-sonic-ledd_1.0-1_all.deb +SONIC_LEDD = python-sonic-ledd_1.1-1_all.deb $(SONIC_LEDD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd SONIC_PYTHON_STDEB_DEBS += $(SONIC_LEDD) diff --git a/rules/sonic-platform-common.mk b/rules/sonic-platform-common.mk new file mode 100644 index 00000000000..95789354a4d --- /dev/null +++ b/rules/sonic-platform-common.mk @@ -0,0 +1,13 @@ +# sonic-platform-common package + +SONIC_PLATFORM_COMMON_PY2 = sonic_platform_common-1.0-py2-none-any.whl +$(SONIC_PLATFORM_COMMON_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-common +$(SONIC_PLATFORM_COMMON_PY2)_PYTHON_VERSION = 2 +SONIC_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2) + +# Als build sonic-platform-common into python3 wheel, so we can use PSU code in SNMP docker +# Note: _DEPENDS macro is not defined +SONIC_PLATFORM_COMMON_PY3 = sonic_platform_common-1.0-py3-none-any.whl +$(SONIC_PLATFORM_COMMON_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-common +$(SONIC_PLATFORM_COMMON_PY3)_PYTHON_VERSION = 3 +SONIC_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) diff --git a/rules/sonic-utilities.mk b/rules/sonic-utilities.mk index 0dae94d8aa7..eba618d051d 100644 --- a/rules/sonic-utilities.mk +++ b/rules/sonic-utilities.mk @@ -1,14 +1,16 @@ # sonic utilities package +# +# NOTE: sonic-config-engine is a build-time dependency of sonic-utilities +# due to unit tests which are run during the build. However, +# sonic-platform-common and swsssdk are runtime dependencies, and should be +# added here also. However, the current build system assumes all runtime +# dependencies are .deb packages. +# +# TODO: Create a way to specify both .deb and .whl runtime dependencies +# then add the aforementioned runtime dependencies here. +# -SONIC_UTILS = python-sonic-utilities_1.1-1_all.deb +SONIC_UTILS = python-sonic-utilities_1.2-1_all.deb $(SONIC_UTILS)_SRC_PATH = $(SRC_PATH)/sonic-utilities $(SONIC_UTILS)_WHEEL_DEPENDS = $(SONIC_CONFIG_ENGINE) SONIC_PYTHON_STDEB_DEBS += $(SONIC_UTILS) - -# Build sonic-utilities into python3 wheel, so we can use PSU code -# Note: _DEPENDS macro is not defined -SONIC_UTILS_PY3 = sonic_utilities-1.1-py3-none-any.whl -$(SONIC_UTILS_PY3)_SRC_PATH = $(SRC_PATH)/sonic-utilities -$(SONIC_UTILS_PY3)_PYTHON_VERSION = 3 -$(SONIC_UTILS_PY3)_TEST = n -SONIC_PYTHON_WHEELS += $(SONIC_UTILS_PY3) diff --git a/slave.mk b/slave.mk index 2103c79046a..4309d882a5d 100644 --- a/slave.mk +++ b/slave.mk @@ -416,7 +416,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(LIBPAM_TACPLUS) \ $(LIBNSS_TACPLUS)) \ $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \ - $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) + $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \ + $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2)) $(HEADER) # Pass initramfs and linux kernel explicitly. They are used for all platforms export initramfs_tools="$(DEBS_PATH)/$(INITRAMFS_TOOLS)" @@ -433,6 +434,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))" export config_engine_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE))" export swsssdk_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SWSSSDK_PY2))" + export platform_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))" $(foreach docker, $($*_DOCKERS),\ export docker_image="$(docker)" diff --git a/src/sonic-platform-common b/src/sonic-platform-common new file mode 160000 index 00000000000..0581611b7be --- /dev/null +++ b/src/sonic-platform-common @@ -0,0 +1 @@ +Subproject commit 0581611b7be5cc52aea2877199785fe72f759a58 diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index d1df4717627..920f29b3918 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit d1df4717627acf9421861545b71e411acf3c5f32 +Subproject commit 920f29b3918635cce14a1e03749ffb1e76bf9abd diff --git a/src/sonic-utilities b/src/sonic-utilities index 6823ce2f3e4..495584bd2f2 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 6823ce2f3e46d9bbf5fcfa6b371705a7368929cb +Subproject commit 495584bd2f228af81934b23e4cf19648ab387fab From 0fa64cc618e50bff92dea20204a5923ea7b1b923 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Thu, 18 Jan 2018 11:43:57 -0800 Subject: [PATCH 051/254] [supervisor] Add patch to prevent 'supervisorctl start' command from hanging if system time has rolled backward (#1311) * Add patch to prevent 'supervisorctl start' command from hanging if system time has rolled backward * Also add unit tests for clock rollback scenarios --- .gitignore | 1 + rules/supervisor.mk | 6 +- src/supervisor/Makefile | 12 +- ...e-hanging-delays-in-process-state-tr.patch | 83 ++++++++ ...ses-to-ensure-state-transitions-work.patch | 184 ++++++++++++++++++ src/supervisor/patch/series | 2 + 6 files changed, 285 insertions(+), 3 deletions(-) create mode 100644 src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch create mode 100644 src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch create mode 100644 src/supervisor/patch/series diff --git a/.gitignore b/.gitignore index 069e663c196..98ef4909954 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ src/sonic-device-data/src/device/ src/sonic-device-data/src/debian/ src/supervisor/* !src/supervisor/Makefile +!src/supervisor/patch/ src/thrift/* !src/thrift/Makefile diff --git a/rules/supervisor.mk b/rules/supervisor.mk index cedacd96373..7e7466bbad8 100644 --- a/rules/supervisor.mk +++ b/rules/supervisor.mk @@ -1,5 +1,9 @@ # supervisor package -SUPERVISOR = python-supervisor_3.3.2-1_all.deb +SUPERVISOR_VERSION = 3.3.2 + +export SUPERVISOR_VERSION + +SUPERVISOR = python-supervisor_$(SUPERVISOR_VERSION)-1_all.deb $(SUPERVISOR)_SRC_PATH = $(SRC_PATH)/supervisor SONIC_MAKE_DEBS += $(SUPERVISOR) diff --git a/src/supervisor/Makefile b/src/supervisor/Makefile index 778903194ff..3f989c3d017 100644 --- a/src/supervisor/Makefile +++ b/src/supervisor/Makefile @@ -2,7 +2,7 @@ SHELL = /bin/bash .SHELLFLAGS += -e -MAIN_TARGET = python-supervisor_3.3.2-1_all.deb +MAIN_TARGET = python-supervisor_$(SUPERVISOR_VERSION)-1_all.deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Remove any stale files @@ -11,7 +11,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Clone supervisor repo git clone https://github.com/Supervisor/supervisor.git pushd ./supervisor - git checkout -f 3.3.2 + + # Reset HEAD to the commit of the proper tag + # NOTE: Using "git checkout " here detaches our HEAD, + # which stg doesn't like, so we use this method instead + git reset --hard $(SUPERVISOR_VERSION) + + # Apply patches + stg init + stg import -s ../patch/series # Build Python and Debian package python setup.py --command-packages=stdeb.command bdist_deb diff --git a/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch b/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch new file mode 100644 index 00000000000..c0263e9baf1 --- /dev/null +++ b/src/supervisor/patch/0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch @@ -0,0 +1,83 @@ +From bac496af4c2051b3c15038e06533f9094b1c3604 Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Tue, 16 Jan 2018 20:42:13 +0000 +Subject: [PATCH 1/2] Prevent excessive hanging/delays in process state + transitions if the system time rolls backward + +--- + supervisor/process.py | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/supervisor/process.py b/supervisor/process.py +index f9ddcd9..216372f 100644 +--- a/supervisor/process.py ++++ b/supervisor/process.py +@@ -357,6 +357,12 @@ class Subprocess: + """ Log a 'waiting for x to stop' message with throttling. """ + if self.state == ProcessStates.STOPPING: + now = time.time() ++ ++ # If the system clock has moved backward, reset ++ # self.laststopreport to current system time ++ if now < self.laststopreport: ++ self.laststopreport = now; ++ + if now > (self.laststopreport + 2): # every 2 seconds + self.config.options.logger.info( + 'waiting for %s to stop' % self.config.name) +@@ -604,12 +610,27 @@ class Subprocess: + # STOPPED -> STARTING + self.spawn() + elif state == ProcessStates.BACKOFF: ++ if self.delay > 0 and now < self.delay - self.backoff: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.backoff ++ + if self.backoff <= self.config.startretries: + if now > self.delay: + # BACKOFF -> STARTING + self.spawn() + + if state == ProcessStates.STARTING: ++ if now < self.laststart: ++ # The system clock appears to have moved backward ++ # Reset self.laststart to current system time ++ self.laststart = now; ++ ++ if self.delay > 0 and now < self.delay - self.config.startsecs: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.config.startsecs ++ + if now - self.laststart > self.config.startsecs: + # STARTING -> RUNNING if the proc has started + # successfully and it has stayed up for at least +@@ -633,6 +654,11 @@ class Subprocess: + logger.info('gave up: %s %s' % (self.config.name, msg)) + + elif state == ProcessStates.STOPPING: ++ if self.delay > 0 and now < self.delay - self.config.stopwaitsecs: ++ # The system clock appears to have moved backward ++ # Reset self.delay accordingly ++ self.delay = now + self.config.stopwaitsecs ++ + time_left = self.delay - now + if time_left <= 0: + # kill processes which are taking too long to stop with a final +@@ -805,6 +831,12 @@ class EventListenerPool(ProcessGroupBase): + if dispatch_capable: + if self.dispatch_throttle: + now = time.time() ++ ++ # If the system clock has moved backward, reset ++ # self.last_dispatch to current system time ++ if now < self.last_dispatch: ++ self.last_dispatch = now; ++ + if now - self.last_dispatch < self.dispatch_throttle: + return + self.dispatch() +-- +2.1.4 + diff --git a/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch b/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch new file mode 100644 index 00000000000..cb01665ba80 --- /dev/null +++ b/src/supervisor/patch/0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch @@ -0,0 +1,184 @@ +From 43b6f3ee93593f666af2c6a7af897bf3b5ee762d Mon Sep 17 00:00:00 2001 +From: Joe LeVeque +Date: Wed, 17 Jan 2018 22:27:56 +0000 +Subject: [PATCH 2/2] Add unit test cases to ensure state transitions work if + system time has rolled backward + +--- + supervisor/tests/test_process.py | 146 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 146 insertions(+) + +diff --git a/supervisor/tests/test_process.py b/supervisor/tests/test_process.py +index 7f9bab2..ea16315 100644 +--- a/supervisor/tests/test_process.py ++++ b/supervisor/tests/test_process.py +@@ -736,6 +736,40 @@ class SubprocessTests(unittest.TestCase): + instance.stop_report() + self.assertEqual(len(options.logger.data), 1) # throttled + ++ def test_stop_report_laststopreport_in_future(self): ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ config = DummyPConfig(options, 'test', '/test') ++ instance = self._makeOne(config) ++ instance.pid = 11 ++ dispatcher = DummyDispatcher(writable=True) ++ instance.dispatchers = {'foo':dispatcher} ++ from supervisor.states import ProcessStates ++ instance.state = ProcessStates.STOPPING ++ instance.laststopreport = future_time ++ ++ # This iteration of stop_report() should reset instance.laststopreport ++ # to the current time ++ instance.stop_report() ++ ++ # No logging should have taken place ++ self.assertEqual(len(options.logger.data), 0) ++ ++ # Ensure instance.laststopreport has rolled backward ++ self.assertTrue(instance.laststopreport < future_time) ++ ++ # Sleep for 2 seconds ++ time.sleep(2) ++ ++ # This iteration of stop_report() should actaully trigger the report ++ instance.stop_report() ++ ++ self.assertEqual(len(options.logger.data), 1) ++ self.assertEqual(options.logger.data[0], 'waiting for test to stop') ++ self.assertNotEqual(instance.laststopreport, 0) ++ instance.stop_report() ++ self.assertEqual(len(options.logger.data), 1) # throttled ++ + def test_give_up(self): + options = DummyOptions() + config = DummyPConfig(options, 'test', '/test') +@@ -1402,6 +1436,92 @@ class SubprocessTests(unittest.TestCase): + event = L[0] + self.assertEqual(event.__class__, events.ProcessStateRunningEvent) + ++ def test_transition_starting_to_running_laststart_in_future(self): ++ from supervisor import events ++ L = [] ++ events.subscribe(events.ProcessStateEvent, lambda x: L.append(x)) ++ from supervisor.states import ProcessStates ++ ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ test_startsecs = 2 ++ ++ # this should go from STARTING to RUNNING via transition() ++ pconfig = DummyPConfig(options, 'process', 'process','/bin/process', ++ startsecs=test_startsecs) ++ process = self._makeOne(pconfig) ++ process.backoff = 1 ++ process.delay = 1 ++ process.system_stop = False ++ process.laststart = future_time ++ process.pid = 1 ++ process.stdout_buffer = 'abc' ++ process.stderr_buffer = 'def' ++ process.state = ProcessStates.STARTING ++ ++ # This iteration of transition() should reset process.laststart ++ # to the current time ++ process.transition() ++ ++ # Process state should still be STARTING ++ self.assertEqual(process.state, ProcessStates.STARTING) ++ ++ # Ensure process.laststart has rolled backward ++ self.assertTrue(process.laststart < future_time) ++ ++ # Sleep for (startsecs + 1) ++ time.sleep(test_startsecs + 1) ++ ++ # This iteration of transition() should actaully trigger the state ++ # transition to RUNNING ++ process.transition() ++ ++ # this implies RUNNING ++ self.assertEqual(process.backoff, 0) ++ self.assertEqual(process.delay, 0) ++ self.assertFalse(process.system_stop) ++ self.assertEqual(process.state, ProcessStates.RUNNING) ++ self.assertEqual(options.logger.data[0], ++ 'success: process entered RUNNING state, process has ' ++ 'stayed up for > than {} seconds (startsecs)'.format(test_startsecs)) ++ self.assertEqual(len(L), 1) ++ event = L[0] ++ self.assertEqual(event.__class__, events.ProcessStateRunningEvent) ++ ++ def test_transition_backoff_to_starting_delay_in_future(self): ++ from supervisor import events ++ L = [] ++ events.subscribe(events.ProcessStateEvent, lambda x: L.append(x)) ++ from supervisor.states import ProcessStates, SupervisorStates ++ ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ ++ pconfig = DummyPConfig(options, 'process', 'process','/bin/process') ++ process = self._makeOne(pconfig) ++ process.laststart = 1 ++ process.delay = future_time ++ process.backoff = 0 ++ process.state = ProcessStates.BACKOFF ++ ++ # This iteration of transition() should reset process.delay ++ # to the current time ++ process.transition() ++ ++ # Process state should still be BACKOFF ++ self.assertEqual(process.state, ProcessStates.BACKOFF) ++ ++ # Ensure process.delay has rolled backward ++ self.assertTrue(process.delay < future_time) ++ ++ # This iteration of transition() should actaully trigger the state ++ # transition to STARTING ++ process.transition() ++ ++ self.assertEqual(process.state, ProcessStates.STARTING) ++ self.assertEqual(len(L), 1) ++ self.assertEqual(L[0].__class__, events.ProcessStateStartingEvent) ++ + def test_transition_backoff_to_fatal(self): + from supervisor import events + L = [] +@@ -2033,6 +2153,32 @@ class EventListenerPoolTests(ProcessGroupBaseTests): + self.assertEqual(process1.listener_state, EventListenerStates.BUSY) + self.assertEqual(process1.event, event) + ++ def test_transition_event_proc_running_with_dispatch_throttle_last_dispatch_in_future(self): ++ future_time = time.time() + 3600 # 1 hour into the future ++ options = DummyOptions() ++ from supervisor.states import ProcessStates ++ pconfig1 = DummyPConfig(options, 'process1', 'process1','/bin/process1') ++ process1 = DummyProcess(pconfig1, state=ProcessStates.RUNNING) ++ gconfig = DummyPGroupConfig(options, pconfigs=[pconfig1]) ++ pool = self._makeOne(gconfig) ++ pool.dispatch_throttle = 5 ++ pool.last_dispatch = future_time ++ pool.processes = {'process1': process1} ++ event = DummyEvent() ++ from supervisor.states import EventListenerStates ++ process1.listener_state = EventListenerStates.READY ++ class DummyGroup: ++ config = gconfig ++ process1.group = DummyGroup ++ pool._acceptEvent(event) ++ pool.transition() ++ ++ self.assertEqual(process1.transitioned, True) ++ self.assertEqual(pool.event_buffer, [event]) # not popped ++ ++ # Ensure pool.last_dispatch has been rolled backward ++ self.assertTrue(pool.last_dispatch < future_time) ++ + def test__dispatchEvent_notready(self): + options = DummyOptions() + from supervisor.states import ProcessStates +-- +2.1.4 + diff --git a/src/supervisor/patch/series b/src/supervisor/patch/series new file mode 100644 index 00000000000..d141fddf330 --- /dev/null +++ b/src/supervisor/patch/series @@ -0,0 +1,2 @@ +0001-Prevent-excessive-hanging-delays-in-process-state-tr.patch +0002-Add-unit-test-cases-to-ensure-state-transitions-work.patch From 8db959d2a3ae2a7c9aa5820b0dd784ba65636d6c Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 18 Jan 2018 14:08:27 -0800 Subject: [PATCH 052/254] [sonic-py-swsssdk]: Update submodule pointer (#1319) Signed-off-by: Qi Luo --- src/sonic-py-swsssdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index a0418a15a46..cd4cb2784a9 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit a0418a15a46e20c3d8fcd7c8cf2bb6ab0a4aafaf +Subproject commit cd4cb2784a9ccbb77d60575e2e2befa7a9cbe925 From 33157dc2adb7bd4874451bc33053bef0c0006d5e Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 18 Jan 2018 15:35:38 -0800 Subject: [PATCH 053/254] Install azure cli into docker-sonic-mgmt (#1322) Signed-off-by: Qi Luo --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 6cfe2860389..be2f1b6518b 100644 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -18,7 +18,9 @@ RUN apt-get install -y \ sshpass \ libxml2 \ libxslt1-dev \ - python-setuptools + python-setuptools \ + build-essential \ + curl # For JNLP launcher RUN apt-get install -y default-jre @@ -87,4 +89,10 @@ RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers USER $user -RUN cd /var/$user && git clone https://github.com/Azure/sonic-mgmt +# Install Azure CLI +WORKDIR /var/$user +RUN curl -L https://aka.ms/InstallAzureCliBundled -o azure-cli_bundle.tar.gz +RUN tar -xvzf azure-cli_bundle.tar.gz +RUN azure-cli_bundle_*/installer + +RUN git clone https://github.com/Azure/sonic-mgmt From 163a0e216594d8da19807ad69d68e633b0e6c247 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 18 Jan 2018 17:28:36 -0800 Subject: [PATCH 054/254] [Arista7260cx3] Add platform specific reboot tool (#1318) * [Arista7260cx3] Add platform specific reboot tool * [utilities] update sonic-utilities submodule --- .../x86_64-arista_7260cx3_64/platform_reboot | 87 +++++++++++++++++++ src/sonic-utilities | 2 +- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100755 device/arista/x86_64-arista_7260cx3_64/platform_reboot diff --git a/device/arista/x86_64-arista_7260cx3_64/platform_reboot b/device/arista/x86_64-arista_7260cx3_64/platform_reboot new file mode 100755 index 00000000000..8a372246115 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/platform_reboot @@ -0,0 +1,87 @@ +#!/usr/bin/env python +# Copyright (c) 2018 Arista Networks, Inc. All rights reserved. +# Arista Networks, Inc. Confidential and Proprietary. + +# Reboot script for 7260CX3 + +from __future__ import print_function +import sys +import mmap, os +import subprocess +from struct import pack, unpack + +class MmapResource( object ): + """Resource implementation for a directly-mapped memory region.""" + + def __init__( self, path ): + try: + fd = os.open( path, os.O_RDWR ) + except EnvironmentError: + print( "FAIL can not open scd memory-map resource file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + try: + size = os.fstat( fd ).st_size + except EnvironmentError: + print( "FAIL can not fstat scd memory-map resource file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + try: + self.mmap_ = mmap.mmap( fd, size, mmap.MAP_SHARED, + mmap.PROT_READ | mmap.PROT_WRITE ) + except EnvironmentError: + print( "FAIL can not map scd memory-map file" ) + print( "FAIL are you running on the proper platform?" ) + sys.exit( 1 ) + finally: + try: + # Note that closing the file descriptor has no effect on the memory map + os.close( fd ) + except EnvironmentError: + print( "FAIL failed to close scd memory-map file" ) + sys.exit( 1 ) + + def read32( self, addr ): + return unpack( ' Date: Thu, 18 Jan 2018 19:55:11 -0800 Subject: [PATCH 055/254] [scripts]: Fix issues with checking status of the DB. Use one approach everywhere. (#1323) --- files/build_templates/docker_image_ctl.j2 | 7 ++----- files/build_templates/swss.service.j2 | 2 +- files/scripts/configdb-load.sh | 7 ++----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index a2bfb7d1250..240a7514d65 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -10,11 +10,8 @@ function postStartAction() {%- if docker_container_name != "database" %} : {%- else %} - while true; do - if [[ "$(docker exec -i database redis-cli ping)" =~ PONG.* ]]; then - break - fi - sleep 1 + until [[ $(/usr/bin/docker exec database redis-cli ping | grep -c PONG) -gt 0 ]]; do + sleep 1; done {%- endif %} {%- if docker_container_name == "snmp" %} diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index b18321676b7..ebfb5027b29 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -17,7 +17,7 @@ After=nps-modules-3.16.0-4-amd64.service [Service] User=root # Wait for redis server start before database clean -ExecStartPre=/bin/bash -c "while true; do if [ \"$(/usr/bin/docker exec database redis-cli ping)\" == \"PONG\" ]; then break; fi; sleep 1; done" +ExecStartPre=/bin/bash -c 'until [[ $(/usr/bin/docker exec database redis-cli ping | grep -c PONG) -gt 0 ]]; do sleep 1; done' ExecStartPre=/usr/bin/docker exec database redis-cli -n 0 FLUSHDB ExecStartPre=/usr/bin/docker exec database redis-cli -n 1 FLUSHDB ExecStartPre=/usr/bin/docker exec database redis-cli -n 2 FLUSHDB diff --git a/files/scripts/configdb-load.sh b/files/scripts/configdb-load.sh index 2175e37d5a7..42bb9959bca 100755 --- a/files/scripts/configdb-load.sh +++ b/files/scripts/configdb-load.sh @@ -1,11 +1,8 @@ #!/usr/bin/env bash # Wait until redis starts -while true; do - if [ `redis-cli ping` == "PONG" ]; then - break - fi - sleep 1 +until [[ $(redis-cli ping | grep -c PONG) -gt 0 ]]; do + sleep 1; done # If there is a config db dump file, load it From 5e01fb366ec4bbe9218e701cf48aefb1465fc65b Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Thu, 18 Jan 2018 21:52:24 -0800 Subject: [PATCH 056/254] Prevent supervisor from restarting configdb-load.sh (#1324) --- dockers/docker-database/supervisord.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/dockers/docker-database/supervisord.conf b/dockers/docker-database/supervisord.conf index 9ad7ff32bcf..8237ea87679 100644 --- a/dockers/docker-database/supervisord.conf +++ b/dockers/docker-database/supervisord.conf @@ -24,5 +24,6 @@ command=/usr/bin/configdb-load.sh priority=3 autostart=true autorestart=false +startsecs=0 stdout_logfile=syslog stderr_logfile=syslog From ab26a5c589cf3bf3d4810638dc0726cd4f5a6c09 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 22 Jan 2018 10:52:52 -0800 Subject: [PATCH 057/254] Install sonic-platform-common package in platform-monitor docker for ledd (#1330) * Install sonic-platform-common package in platform-monitor docker for ledd * Specify Python wheel dependencies in docker-platform-monitor.mk; Remove explicit specifications from Dockerfile.j2 --- dockers/docker-platform-monitor/Dockerfile.j2 | 48 +++++++------------ rules/docker-platform-monitor.mk | 2 + 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index b6406b3e3a6..4dd8acaf0e2 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -9,44 +9,30 @@ RUN apt-get update # Install required packages RUN apt-get install -y python-pip sensord fancontrol -{% if docker_platform_monitor_debs.strip() %} -# Copy built Debian packages -COPY \ -{% for deb in docker_platform_monitor_debs.split(' ') -%} +{% if docker_platform_monitor_debs.strip() -%} +# Copy all locally-built Debian package dependencies +COPY{{' '}} +{%- for deb in docker_platform_monitor_debs.split(' ') -%} debs/{{ deb }}{{' '}} {%- endfor -%} -debs/ -{%- endif %} +/debs/ -{% if docker_platform_monitor_debs.strip() %} -# Install built Debian packages -RUN dpkg -i \ -{% for deb in docker_platform_monitor_debs.split(' ') -%} -debs/{{ deb }}{{' '}} -{%- endfor %} -{%- endif %} +# Install all locally-built Debian package dependencies +# and implicitly install their dependencies +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/*.deb +{% endif %} -{% if docker_platform_monitor_whls.strip() %} -# Copy built Python wheels -COPY \ -{% for whl in docker_platform_monitor_whls.split(' ') -%} +{% if docker_platform_monitor_whls.strip() -%} +# Copy all locally-built Python wheel dependencies +COPY{{' '}} +{%- for whl in docker_platform_monitor_whls.split(' ') -%} python-wheels/{{ whl }}{{' '}} {%- endfor -%} -python-wheels/ -{%- endif %} - -{% if docker_platform_monitor_whls.strip() %} -# Install built Python wheels -RUN pip install \ -{% for whl in docker_platform_monitor_whls.split(' ') -%} -python-wheels/{{ whl }}{{' '}} -{%- endfor %} -{%- endif %} - -COPY python-wheels /python-wheels +/python-wheels/ -# Install Python SwSS SDK (dependency of sonic-ledd) -RUN pip install /python-wheels/swsssdk-2.0.1-py2-none-any.whl +# Install all locally-built Python wheel dependencies +RUN pip install /python-wheels/*.whl +{% endif %} # Clean up RUN apt-get remove -y python-pip diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index 76e7dac4ab6..345e82f7b86 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -3,6 +3,8 @@ DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz $(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/docker-platform-monitor $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(SONIC_LEDD) +$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2) +$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2) $(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE) SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) From 6f12ff286dea0afd5f68dd8c4bffd65a6922a294 Mon Sep 17 00:00:00 2001 From: Taoyu Li Date: Tue, 23 Jan 2018 18:16:15 -0800 Subject: [PATCH 058/254] [minigraph]: Set hostname in all default minigraphs to 'sonic' (#1333) --- .../x86_64-accton_as5712_54x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-accton_as7312_54x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-accton_as7512_32x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-accton_as7712_32x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-accton_as7716_32x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-accton_as7816_64x-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-arista_7050_qx32/minigraph.xml | 138 +++++++++--------- .../x86_64-arista_7050_qx32s/minigraph.xml | 138 +++++++++--------- .../x86_64-arista_7060_cx32s/minigraph.xml | 138 +++++++++--------- .../Seastone-DX010-10-50/minigraph.xml | 138 +++++++++--------- .../Seastone-DX010-50/minigraph.xml | 138 +++++++++--------- .../Seastone-DX010/minigraph.xml | 138 +++++++++--------- .../x86_64-cel_seastone-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-centec_e582_48x6q-r0/minigraph.xml | 136 ++++++++--------- .../x86_64-ew_es6220_x48q2h4-r0/minigraph.xml | 136 ++++++++--------- .../x86_64-dell_s6000_s1220-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-dell_s6100_c2538-r0/minigraph.xml | 114 +++++++-------- .../x86_64-dell_z9100_c2538-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-delta_ag9032v1-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-mlnx_msn2100-r0/minigraph.xml | 74 +++++----- .../x86_64-mlnx_msn2410-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-mlnx_msn2700-r0/minigraph.xml | 138 +++++++++--------- .../x86_64-mlnx_msn2740-r0/minigraph.xml | 138 +++++++++--------- 23 files changed, 1541 insertions(+), 1541 deletions(-) diff --git a/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml index 78c3876d838..065105bf183 100755 --- a/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -1014,224 +1014,224 @@ DeviceInterfaceLink - switch1 + sonic tenGigE0 ARISTA01T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE1 ARISTA02T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE2 ARISTA03T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE3 ARISTA04T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE4 ARISTA05T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE5 ARISTA06T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE6 ARISTA07T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE7 ARISTA08T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE8 ARISTA09T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE9 ARISTA10T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE10 ARISTA11T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE11 ARISTA12T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE12 ARISTA13T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE13 ARISTA14T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE14 ARISTA15T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE15 ARISTA16T2 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE16 ARISTA01T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE17 ARISTA02T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE18 ARISTA03T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE19 ARISTA04T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE20 ARISTA05T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE21 ARISTA06T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE22 ARISTA07T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE23 ARISTA08T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE24 ARISTA09T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE25 ARISTA10T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE26 ARISTA11T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE27 ARISTA12T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE28 ARISTA13T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE29 ARISTA14T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE30 ARISTA15T0 tenGigE1 DeviceInterfaceLink - switch1 + sonic tenGigE31 ARISTA16T0 tenGigE1 @@ -1239,7 +1239,7 @@ - switch1 + sonic Accton-AS5712-54X @@ -1247,7 +1247,7 @@ - switch1 + sonic DhcpResources @@ -1269,6 +1269,6 @@ - switch1 + sonic Accton-AS5712-54X diff --git a/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml index 8547ceacbc5..a967047b237 100644 --- a/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7312_54x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -924,224 +924,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA16T0 Ethernet1 @@ -1149,7 +1149,7 @@ - switch1 + sonic Accton-AS7312-54X @@ -1157,7 +1157,7 @@ - switch1 + sonic DhcpResources @@ -1179,6 +1179,6 @@ - switch1 + sonic Accton-AS7312-54X diff --git a/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml index 758aca3551d..ac05be93960 100644 --- a/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7512_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic AS7512 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic AS7512 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml index 025985c8367..d252de01ca8 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7712_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Accton-AS7712-32X @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1069,6 +1069,6 @@ - switch1 + sonic Accton-AS7712-32X diff --git a/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml b/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml index e197d4cd717..148a1776912 100644 --- a/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7716_32x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Accton-AS7716-32X @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1069,6 +1069,6 @@ - switch1 + sonic Accton-AS7716-32X diff --git a/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml index 025985c8367..d252de01ca8 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml +++ b/device/accton/x86_64-accton_as7816_64x-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Accton-AS7712-32X @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1069,6 +1069,6 @@ - switch1 + sonic Accton-AS7712-32X diff --git a/device/arista/x86_64-arista_7050_qx32/minigraph.xml b/device/arista/x86_64-arista_7050_qx32/minigraph.xml index bbf2508ce4c..538a0ca61a0 100644 --- a/device/arista/x86_64-arista_7050_qx32/minigraph.xml +++ b/device/arista/x86_64-arista_7050_qx32/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7050-QX32 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7050-QX32 diff --git a/device/arista/x86_64-arista_7050_qx32s/minigraph.xml b/device/arista/x86_64-arista_7050_qx32s/minigraph.xml index efd30582947..f28c9a9ae6c 100644 --- a/device/arista/x86_64-arista_7050_qx32s/minigraph.xml +++ b/device/arista/x86_64-arista_7050_qx32s/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7050-QX-32S @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7050-QX-32S diff --git a/device/arista/x86_64-arista_7060_cx32s/minigraph.xml b/device/arista/x86_64-arista_7060_cx32s/minigraph.xml index 23282de17af..772325080e7 100644 --- a/device/arista/x86_64-arista_7060_cx32s/minigraph.xml +++ b/device/arista/x86_64-arista_7060_cx32s/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet2/1 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet3/1 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4/1 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet5/1 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet6/1 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet7/1 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8/1 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet9/1 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet10/1 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet11/1 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12/1 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet13/1 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet14/1 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet15/1 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16/1 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet17/1 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet18/1 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet19/1 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20/1 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet21/1 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet22/1 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet23/1 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24/1 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet25/1 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet26/1 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet27/1 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28/1 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet29/1 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet30/1 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet31/1 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32/1 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Arista-7060CX-32S-C32 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Arista-7060CX-32S-C32 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/minigraph.xml index 7b918a5414c..624403c913b 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-10-50/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -1214,224 +1214,224 @@ DeviceInterfaceLink - switch1 + sonic tenGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic tenGigE1/32 ARISTA16T0 Ethernet1 @@ -1439,7 +1439,7 @@ - switch1 + sonic Seastone-DX010-10-50 @@ -1447,7 +1447,7 @@ - switch1 + sonic DhcpResources @@ -1474,6 +1474,6 @@ - switch1 + sonic Seastone-DX010-10-50 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml index 47dc749df6f..d2259d4b206 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010-50/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -974,224 +974,224 @@ DeviceInterfaceLink - switch1 + sonic fiftyGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fiftyGigE1/32 ARISTA16T0 Ethernet1 @@ -1199,7 +1199,7 @@ - switch1 + sonic Seastone-DX010-50 @@ -1207,7 +1207,7 @@ - switch1 + sonic DhcpResources @@ -1234,6 +1234,6 @@ - switch1 + sonic Seastone-DX010-50 diff --git a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml index 921839b0d72..c32f9e47513 100644 --- a/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/Seastone-DX010/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Seastone-DX010 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Seastone-DX010 diff --git a/device/celestica/x86_64-cel_seastone-r0/minigraph.xml b/device/celestica/x86_64-cel_seastone-r0/minigraph.xml index 921839b0d72..c32f9e47513 100644 --- a/device/celestica/x86_64-cel_seastone-r0/minigraph.xml +++ b/device/celestica/x86_64-cel_seastone-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Seastone-DX010 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Seastone-DX010 diff --git a/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml b/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml index fd35742353c..950c52a6413 100644 --- a/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml +++ b/device/centec/x86_64-centec_e582_48x6q-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,11 +1039,11 @@ - switch1 + sonic E582-48x6q - switch1 + sonic E582-48x6q diff --git a/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml b/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml index 03be9a51b7c..cb0e9d4e2b0 100644 --- a/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml +++ b/device/centec/x86_64-ew_es6220_x48q2h4-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,11 +1039,11 @@ - switch1 + sonic ES6428A-X48Q2H4 - switch1 + sonic ES6428A-X48Q2H4 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml b/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml index 871a91c7fd0..d5b453c4308 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml +++ b/device/dell/x86_64-dell_s6000_s1220-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic fortyGigE0/0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic fortyGigE0/124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Force10-S6000 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Force10-S6000 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml b/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml index 37fba6c291b..224cf4a9a6b 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml +++ b/device/dell/x86_64-dell_s6100_c2538-r0/minigraph.xml @@ -5,7 +5,7 @@ ARISTA01T1 10.0.0.1 - switch1 + sonic 10.0.0.0 1 180 @@ -14,7 +14,7 @@ ARISTA02T1 10.0.0.5 - switch1 + sonic 10.0.0.4 1 180 @@ -23,7 +23,7 @@ ARISTA03T1 10.0.0.9 - switch1 + sonic 10.0.0.8 1 180 @@ -32,7 +32,7 @@ ARISTA04T1 10.0.0.13 - switch1 + sonic 10.0.0.12 1 180 @@ -41,7 +41,7 @@ ARISTA01T1 FC00::2 - switch1 + sonic FC00::1 1 180 @@ -50,7 +50,7 @@ ARISTA02T1 FC00::A - switch1 + sonic FC00::9 1 180 @@ -59,7 +59,7 @@ ARISTA03T1 FC00::12 - switch1 + sonic FC00::11 1 180 @@ -68,7 +68,7 @@ ARISTA04T1 FC00::1A - switch1 + sonic FC00::19 1 180 @@ -78,7 +78,7 @@ 64601 - switch1 + sonic BGPPeer @@ -187,7 +187,7 @@ - switch1 + sonic PortChannelInterface @@ -298,7 +298,7 @@ ARISTA01T1 Ethernet1 true - switch1 + sonic fortyGigE1/1/1 @@ -308,7 +308,7 @@ ARISTA01T1 Ethernet2 true - switch1 + sonic fortyGigE1/1/2 @@ -318,7 +318,7 @@ ARISTA02T1 Ethernet1 true - switch1 + sonic fortyGigE1/1/5 @@ -328,7 +328,7 @@ ARISTA02T1 Ethernet2 true - switch1 + sonic fortyGigE1/1/6 @@ -338,7 +338,7 @@ ARISTA03T1 Ethernet1 true - switch1 + sonic fortyGigE1/2/1 @@ -348,7 +348,7 @@ ARISTA03T1 Ethernet2 true - switch1 + sonic fortyGigE1/2/2 @@ -358,7 +358,7 @@ ARISTA04T1 Ethernet1 true - switch1 + sonic fortyGigE1/2/5 @@ -368,14 +368,14 @@ ARISTA04T1 Ethernet2 true - switch1 + sonic fortyGigE1/2/6 DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/7 true server-01 @@ -385,7 +385,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/8 true server-02 @@ -395,7 +395,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/9 true server-03 @@ -405,7 +405,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/10 true server-04 @@ -415,7 +415,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/11 true server-05 @@ -425,7 +425,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/12 true server-06 @@ -435,7 +435,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/13 true server-07 @@ -445,7 +445,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/14 true server-08 @@ -455,7 +455,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/15 true server-09 @@ -465,7 +465,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/1/16 true server-10 @@ -475,7 +475,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/1 true server-11 @@ -485,7 +485,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/5 true server-12 @@ -495,7 +495,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/6 true server-13 @@ -505,7 +505,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/7 true server-14 @@ -515,7 +515,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/8 true server-15 @@ -525,7 +525,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/9 true server-16 @@ -535,7 +535,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/10 true server-17 @@ -545,7 +545,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/3/11 true server-18 @@ -555,7 +555,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/7 true server-19 @@ -565,7 +565,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/8 true server-20 @@ -575,7 +575,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/9 true server-21 @@ -585,7 +585,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/10 true server-22 @@ -595,7 +595,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/11 true server-23 @@ -605,7 +605,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/12 true server-24 @@ -615,7 +615,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/13 true server-25 @@ -625,7 +625,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/14 true server-26 @@ -635,7 +635,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/15 true server-27 @@ -645,7 +645,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/2/16 true server-28 @@ -655,7 +655,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/1 true server-29 @@ -665,7 +665,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/5 true server-30 @@ -675,7 +675,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/6 true server-31 @@ -685,7 +685,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/7 true server-32 @@ -695,7 +695,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/8 true server-33 @@ -705,7 +705,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/9 true server-34 @@ -715,7 +715,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/10 true server-35 @@ -725,7 +725,7 @@ DeviceInterfaceLink true 40000 - switch1 + sonic fortyGigE1/4/11 true server-36 @@ -734,7 +734,7 @@ - switch1 + sonic Force10-S6100 @@ -742,7 +742,7 @@ - switch1 + sonic DhcpResources @@ -769,6 +769,6 @@ - switch1 + sonic Force10-S6100 diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml b/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml index b45892801ed..e1d42d180fe 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml +++ b/device/dell/x86_64-dell_z9100_c2538-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Force10-Z9100 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Force10-Z9100 diff --git a/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml b/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml index db8d6244053..129103ce6bf 100644 --- a/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml +++ b/device/delta/x86_64-delta_ag9032v1-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch1 + sonic 10.0.0.32 1 180 60 - switch1 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch1 + sonic 10.0.0.34 1 180 60 - switch1 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch1 + sonic 10.0.0.36 1 180 60 - switch1 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch1 + sonic 10.0.0.38 1 180 60 - switch1 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch1 + sonic 10.0.0.40 1 180 60 - switch1 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch1 + sonic 10.0.0.42 1 180 60 - switch1 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch1 + sonic 10.0.0.44 1 180 60 - switch1 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch1 + sonic 10.0.0.46 1 180 60 - switch1 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch1 + sonic 10.0.0.48 1 180 60 - switch1 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch1 + sonic 10.0.0.50 1 180 60 - switch1 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch1 + sonic 10.0.0.52 1 180 60 - switch1 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch1 + sonic 10.0.0.54 1 180 60 - switch1 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch1 + sonic 10.0.0.56 1 180 60 - switch1 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch1 + sonic 10.0.0.58 1 180 60 - switch1 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch1 + sonic 10.0.0.60 1 180 60 - switch1 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch1 + sonic 10.0.0.62 1 180 60 - switch1 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch1 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch1 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch1 + sonic hundredGigE1/1 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/2 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/3 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/4 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/5 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/6 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/7 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/8 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/9 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/10 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/11 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/12 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/13 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/14 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/15 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/16 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/17 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/18 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/19 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/20 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/21 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/22 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/23 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/24 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/25 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/26 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/27 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/28 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/29 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/30 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/31 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch1 + sonic hundredGigE1/32 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch1 + sonic Delta-ag9032v1 @@ -1047,7 +1047,7 @@ - switch1 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch1 + sonic Delta-ag9032v1 diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml index 859c22a7dac..d902d6eac4d 100644 --- a/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2100-r0/minigraph.xml @@ -3,7 +3,7 @@ - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -12,7 +12,7 @@ 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -21,7 +21,7 @@ 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -30,7 +30,7 @@ 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -39,7 +39,7 @@ 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -48,7 +48,7 @@ 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -57,7 +57,7 @@ 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -66,7 +66,7 @@ 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -75,7 +75,7 @@ 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -84,7 +84,7 @@ 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -93,7 +93,7 @@ 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -102,7 +102,7 @@ 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -111,7 +111,7 @@ 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -120,7 +120,7 @@ 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -129,7 +129,7 @@ 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -138,7 +138,7 @@ 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -150,7 +150,7 @@ 65100 - switch2 + sonic
10.0.0.1
@@ -335,7 +335,7 @@ - switch2 + sonic @@ -430,112 +430,112 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 @@ -543,7 +543,7 @@ - switch2 + sonic ACS-MSN2700 ` @@ -551,7 +551,7 @@ - switch2 + sonic DhcpResources @@ -573,6 +573,6 @@ - switch2 + sonic ACS-MSN2100 diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml index ea765fab814..8b417c35353 100644 --- a/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2410-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -934,224 +934,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1159,7 +1159,7 @@ - switch2 + sonic ACS-MSN2410 @@ -1167,7 +1167,7 @@ - switch2 + sonic DhcpResources @@ -1194,6 +1194,6 @@ - switch2 + sonic ACS-MSN2410 diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml index 50f49f63878..19ea4a9670b 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch2 + sonic ACS-MSN2700 @@ -1047,7 +1047,7 @@ - switch2 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch2 + sonic ACS-MSN2700 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml b/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml index 81deffca3ae..f25aa94384e 100644 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/minigraph.xml @@ -5,14 +5,14 @@ ARISTA01T0 10.0.0.33 - switch2 + sonic 10.0.0.32 1 180 60 - switch2 + sonic 10.0.0.0 ARISTA01T2 10.0.0.1 @@ -23,14 +23,14 @@ ARISTA02T0 10.0.0.35 - switch2 + sonic 10.0.0.34 1 180 60 - switch2 + sonic 10.0.0.2 ARISTA02T2 10.0.0.3 @@ -41,14 +41,14 @@ ARISTA03T0 10.0.0.37 - switch2 + sonic 10.0.0.36 1 180 60 - switch2 + sonic 10.0.0.4 ARISTA03T2 10.0.0.5 @@ -59,14 +59,14 @@ ARISTA04T0 10.0.0.39 - switch2 + sonic 10.0.0.38 1 180 60 - switch2 + sonic 10.0.0.6 ARISTA04T2 10.0.0.7 @@ -77,14 +77,14 @@ ARISTA05T0 10.0.0.41 - switch2 + sonic 10.0.0.40 1 180 60 - switch2 + sonic 10.0.0.8 ARISTA05T2 10.0.0.9 @@ -95,14 +95,14 @@ ARISTA06T0 10.0.0.43 - switch2 + sonic 10.0.0.42 1 180 60 - switch2 + sonic 10.0.0.10 ARISTA06T2 10.0.0.11 @@ -113,14 +113,14 @@ ARISTA07T0 10.0.0.45 - switch2 + sonic 10.0.0.44 1 180 60 - switch2 + sonic 10.0.0.12 ARISTA07T2 10.0.0.13 @@ -131,14 +131,14 @@ ARISTA08T0 10.0.0.47 - switch2 + sonic 10.0.0.46 1 180 60 - switch2 + sonic 10.0.0.14 ARISTA08T2 10.0.0.15 @@ -149,14 +149,14 @@ ARISTA09T0 10.0.0.49 - switch2 + sonic 10.0.0.48 1 180 60 - switch2 + sonic 10.0.0.16 ARISTA09T2 10.0.0.17 @@ -167,14 +167,14 @@ ARISTA10T0 10.0.0.51 - switch2 + sonic 10.0.0.50 1 180 60 - switch2 + sonic 10.0.0.18 ARISTA10T2 10.0.0.19 @@ -185,14 +185,14 @@ ARISTA11T0 10.0.0.53 - switch2 + sonic 10.0.0.52 1 180 60 - switch2 + sonic 10.0.0.20 ARISTA11T2 10.0.0.21 @@ -203,14 +203,14 @@ ARISTA12T0 10.0.0.55 - switch2 + sonic 10.0.0.54 1 180 60 - switch2 + sonic 10.0.0.22 ARISTA12T2 10.0.0.23 @@ -221,14 +221,14 @@ ARISTA13T0 10.0.0.57 - switch2 + sonic 10.0.0.56 1 180 60 - switch2 + sonic 10.0.0.24 ARISTA13T2 10.0.0.25 @@ -239,14 +239,14 @@ ARISTA14T0 10.0.0.59 - switch2 + sonic 10.0.0.58 1 180 60 - switch2 + sonic 10.0.0.26 ARISTA14T2 10.0.0.27 @@ -257,14 +257,14 @@ ARISTA15T0 10.0.0.61 - switch2 + sonic 10.0.0.60 1 180 60 - switch2 + sonic 10.0.0.28 ARISTA15T2 10.0.0.29 @@ -275,14 +275,14 @@ ARISTA16T0 10.0.0.63 - switch2 + sonic 10.0.0.62 1 180 60 - switch2 + sonic 10.0.0.30 ARISTA16T2 10.0.0.31 @@ -294,7 +294,7 @@ 65100 - switch2 + sonic
10.0.0.33
@@ -639,7 +639,7 @@ - switch2 + sonic @@ -814,224 +814,224 @@ DeviceInterfaceLink - switch2 + sonic Ethernet0 ARISTA01T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet4 ARISTA02T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet8 ARISTA03T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet12 ARISTA04T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet16 ARISTA05T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet20 ARISTA06T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet24 ARISTA07T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet28 ARISTA08T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet32 ARISTA09T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet36 ARISTA10T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet40 ARISTA11T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet44 ARISTA12T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet48 ARISTA13T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet52 ARISTA14T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet56 ARISTA15T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet60 ARISTA16T2 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet64 ARISTA01T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet68 ARISTA02T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet72 ARISTA03T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet76 ARISTA04T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet80 ARISTA05T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet84 ARISTA06T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet88 ARISTA07T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet92 ARISTA08T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet96 ARISTA09T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet100 ARISTA10T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet104 ARISTA11T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet108 ARISTA12T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet112 ARISTA13T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet116 ARISTA14T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet120 ARISTA15T0 Ethernet1 DeviceInterfaceLink - switch2 + sonic Ethernet124 ARISTA16T0 Ethernet1 @@ -1039,7 +1039,7 @@ - switch2 + sonic ACS-MSN2740 ` @@ -1047,7 +1047,7 @@ - switch2 + sonic DhcpResources @@ -1074,6 +1074,6 @@ - switch2 + sonic ACS-MSN2740 From 814e50fd5e4d001fbd729fa95aaabe0d395a45fd Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Fri, 26 Jan 2018 18:09:31 +0200 Subject: [PATCH 059/254] Buffers configuration update on port speed change (#1250) * Move buffer configuration to ConfigDB Signed-off-by: Andriy Moroz * Converted Dell and Arista configs Signed-off-by: Andriy Moroz * Add buffer configs for ACS-MSN2740 Signed-off-by: Andriy Moroz * Updated buffers template Signed-off-by: Andriy Moroz * Fixed j2 unit test Signed-off-by: Andriy Moroz * Update buffers config for Force10-S6100 Signed-off-by: Andriy Moroz * Update VS docker to support speed and buffers test Signed-off-by: Andriy Moroz * Update buffers config generation - fixed support of sonic-to-sonic install Signed-off-by: Andriy Moroz --- .../Arista-7050-QX32/buffers.json.j2 | 135 ++++++ .../Arista-7050-QX32/pg_profile_lookup.ini | 17 + .../Force10-S6000/buffers.json.j2 | 135 ++++++ .../Force10-S6000/pg_profile_lookup.ini | 17 + .../Force10-S6100/buffers.json.j2 | 126 ++++++ .../ACS-MSN2700/buffers.json.j2 | 162 ++++++++ .../ACS-MSN2700/pg_profile_lookup.ini | 17 + .../ACS-MSN2740/buffers.json.j2 | 162 ++++++++ .../ACS-MSN2740/pg_profile_lookup.ini | 17 + .../msn27xx.32ports.buffers.json.j2 | 292 ------------- dockers/docker-orchagent/ports.json.j2 | 6 +- dockers/docker-orchagent/start.sh | 2 + dockers/docker-orchagent/supervisord.conf | 8 + dockers/docker-orchagent/swssconfig.sh | 3 - files/image_config/platform/rc.local | 20 +- platform/vs/docker-sonic-vs/Dockerfile.j2 | 2 + platform/vs/docker-sonic-vs/buffers.json.j2 | 162 ++++++++ .../vs/docker-sonic-vs/pg_profile_lookup.ini | 17 + platform/vs/docker-sonic-vs/start.sh | 6 +- platform/vs/docker-sonic-vs/supervisord.conf | 8 + .../tests/sample_output/msn27.32ports.json | 387 ++++-------------- .../tests/sample_output/ports.json | 2 +- src/sonic-config-engine/tests/test_j2files.py | 3 +- 23 files changed, 1096 insertions(+), 610 deletions(-) create mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 create mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini create mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini create mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini delete mode 100644 dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 create mode 100644 platform/vs/docker-sonic-vs/buffers.json.j2 create mode 100644 platform/vs/docker-sonic-vs/pg_profile_lookup.ini diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 new file mode 100644 index 00000000000..560cae5dd1b --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 @@ -0,0 +1,135 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "7274496", + "type": "ingress", + "mode": "static" + }, + "ingress_lossy_pool": { + "size": "5491712", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool0": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossless_pool1": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "5491712", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + }, + "egress_lossless_profile0": { + "pool":"[BUFFER_POOL|egress_lossless_pool0]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossless_profile1": { + "pool":"[BUFFER_POOL|egress_lossless_pool1]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" + }, + "{{ port_names }}|4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini new file mode 100644 index 00000000000..f3a0840558a --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 113664 18432 76800 0 + 25000 5m 113664 18432 76800 0 + 40000 5m 113664 18432 76800 0 + 50000 5m 113664 18432 76800 0 + 100000 5m 113664 18432 76800 0 + 10000 40m 113664 18432 76800 0 + 25000 40m 113664 18432 76800 0 + 40000 40m 113664 18432 76800 0 + 50000 40m 113664 18432 76800 0 + 100000 40m 113664 18432 76800 0 + 10000 300m 113664 18432 76800 0 + 25000 300m 113664 18432 76800 0 + 40000 300m 113664 18432 76800 0 + 50000 300m 113664 18432 76800 0 + 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 new file mode 100644 index 00000000000..560cae5dd1b --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 @@ -0,0 +1,135 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "7274496", + "type": "ingress", + "mode": "static" + }, + "ingress_lossy_pool": { + "size": "5491712", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool0": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossless_pool1": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "5491712", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + }, + "egress_lossless_profile0": { + "pool":"[BUFFER_POOL|egress_lossless_pool0]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossless_profile1": { + "pool":"[BUFFER_POOL|egress_lossless_pool1]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" + }, + "{{ port_names }}|4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini new file mode 100644 index 00000000000..f3a0840558a --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 113664 18432 76800 0 + 25000 5m 113664 18432 76800 0 + 40000 5m 113664 18432 76800 0 + 50000 5m 113664 18432 76800 0 + 100000 5m 113664 18432 76800 0 + 10000 40m 113664 18432 76800 0 + 25000 40m 113664 18432 76800 0 + 40000 40m 113664 18432 76800 0 + 50000 40m 113664 18432 76800 0 + 100000 40m 113664 18432 76800 0 + 10000 300m 113664 18432 76800 0 + 25000 300m 113664 18432 76800 0 + 40000 300m 113664 18432 76800 0 + 50000 300m 113664 18432 76800 0 + 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 new file mode 100644 index 00000000000..b12fc385117 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 @@ -0,0 +1,126 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 64 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % port_idx) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_lossy_pool": { + "size": "10443264", + "type": "ingress", + "mode": "dynamic", + "xoff": "4625920" + }, + "egress_lossy_pool": { + "size": "8877440", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982592", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool": "[BUFFER_POOL|ingress_lossless_lossy_pool]", + "xon": "4096", + "xoff": "58448", + "size": "1248", + "dynamic_th": "-4" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995648" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" + }, + "{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + }, + "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" + }, + "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini @@ -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 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini @@ -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 diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 deleted file mode 100644 index 579832ecda1..00000000000 --- a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 +++ /dev/null @@ -1,292 +0,0 @@ -[ -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') %} -{% set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%if switch_role == 'ToRRouter' %} -{% set ingress_lossless_pool_size = '4194304' %} -{% set ingress_lossy_pool_size = '7340032' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '7340032' %} -{% else %} -{% set ingress_lossless_pool_size = '2097152' %} -{% set ingress_lossy_pool_size = '5242880' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '5242880' %} -{%endif %} - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { - "size": "{{ ingress_lossless_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:ingress_lossy_pool": { - "size": "{{ ingress_lossy_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossless_pool": { - "size": "{{ egress_lossless_pool_size }}", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossy_pool": { - "size": "{{ egress_lossy_pool_size }}", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "size":"0", - "dynamic_th":"0" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"4096", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:pg_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_INGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_EGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" - }, - "OP": "SET" - }, - -{# The following template part is for variable PG profile configuration #} -{% set pg_range = '3-4' %} -{# Lists of supported speed and cable length #} -{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} -{% set supported_cable = [5, 40, 300] %} - -{# The key in this lictionary consist of two parts: (port speed)_(cable length) #} -{%- set portconfig2profile = { - '10000_5' : 'pg_lossless_10G_5m_profile', - '25000_5' : 'pg_lossless_25G_5m_profile', - '40000_5' : 'pg_lossless_40G_5m_profile', - '50000_5' : 'pg_lossless_50G_5m_profile', - '100000_5' : 'pg_lossless_100G_5m_profile', - - '10000_40' : 'pg_lossless_10G_40m_profile', - '25000_40' : 'pg_lossless_25G_40m_profile', - '40000_40' : 'pg_lossless_40G_40m_profile', - '50000_40' : 'pg_lossless_50G_40m_profile', - '100000_40' : 'pg_lossless_100G_40m_profile', - - '10000_300' : 'pg_lossless_10G_300m_profile', - '25000_300' : 'pg_lossless_25G_300m_profile', - '40000_300' : 'pg_lossless_40G_300m_profile', - '50000_300' : 'pg_lossless_50G_300m_profile', - '100000_300': 'pg_lossless_100G_300m_profile' - } --%} - -{# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} -{# Only those which were actually used will be created in SAI #} -{%- set pg_profiles = { - 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, - - 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, - 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 0 }, - 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, - 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, - 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 0 }, - - 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 0 }, - 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 0 }, - 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, - 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, - 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 0 }, - } --%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'ToRRouter_Server' : '5', - 'LeafRouter_ToRRouter' : '40', - 'SpineRouter_LeafRouter' : '300' - } -%} - -{% macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {% endif %} - {% endif %} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ supported_cable | last }} - {%- endif -%} -{% endmacro %} - -{%- macro find_closest_greater_config(speed, cable) -%} -{%- set new_speed = [] -%} -{%- for std_speed in supported_speed -%} - {%- if std_speed | int >= speed | int -%} - {%- if new_speed.append(std_speed) -%}{%- endif -%} - {% endif -%} -{%- endfor -%} -{%- set new_cable = [] -%} -{%- for std_cable in supported_cable -%} - {% if std_cable | int >= cable | int -%} - {%- if new_cable.append(std_cable) -%}{%- endif -%} - {% endif %} -{%- endfor -%} -{{ new_speed.0 }}_{{ new_cable.0 }} -{%- endmacro -%} - -{% set used_pg_profiles = [] %} -{% for port in PORT %} - {%- if PORT[port].speed -%} - {%- set speed = PORT[port]['speed'] -%} - {% else %} - {%- set speed = supported_speed|last -%} - {%- endif -%} - {%- set cable = cable_length(port) -%} - {%- set port_config = speed|string + '_' + cable -%} - {%- if not port_config in portconfig2profile -%} - {% set port_config = find_closest_greater_config(speed, cable) -%} - {%- endif -%} - {% set profile = portconfig2profile[port_config] -%} - {# add to list profiles which were actually used #} - {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif %} - { - "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { - "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" - }, - "OP": "SET" - }, -{% endfor -%} - -{# PG profiles declaration #} - -{% for profile_name in used_pg_profiles %} - {%- set profile_config = pg_profiles[profile_name] %} - { - "BUFFER_PROFILE_TABLE:{{ profile_name }}": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "xon":"{{ profile_config['xon'] }}", - "xoff":"{{ profile_config['xoff'] }}", - "size":"{{ profile_config['size'] }}", - "dynamic_th":"{{ profile_config['dynamic_th'] }}" - }, - "OP": "SET" - }, -{% endfor %} - { - "BUFFER_PG_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" - }, - "OP": "SET" - }, - { - "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { - "0": "0", - "1": "1", - "3": "3", - "4": "4" - }, - "OP": "SET" - }, - { - "PORT_QOS_MAP_TABLE:{{ port_names }}": { - "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" - }, - "OP": "SET" - } -] diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2 index e0438998114..b10d4d58a43 100644 --- a/dockers/docker-orchagent/ports.json.j2 +++ b/dockers/docker-orchagent/ports.json.j2 @@ -1,7 +1,12 @@ [ +{% set ports_with_speed_set=[] %} {% if PORT %} {% for port in PORT %} {% if PORT[port].has_key('speed') %} + {%- if ports_with_speed_set.append(port) -%}{%- endif -%} +{%- endif -%} +{% endfor %} +{% for port in ports_with_speed_set %} { "PORT_TABLE:{{ port }}": { "speed": "{{ PORT[port]['speed'] }}", @@ -10,7 +15,6 @@ "OP": "SET" }{% if not loop.last %},{% endif %} -{% endif %} {% endfor %} {% endif %} ] diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index dfdb5b897bb..80ccac913ff 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -26,6 +26,8 @@ supervisorctl start vlanmgrd supervisorctl start intfmgrd +supervisorctl start buffermgrd + # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index 95e92be622b..84beaed440a 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -83,3 +83,11 @@ autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog + +[program:buffermgrd] +command=/usr/bin/buffermgrd -l /usr/share/sonic/hwsku/pg_profile_lookup.ini +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 959b6714d27..6dd3486ee3b 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -37,9 +37,6 @@ elif [ "$HWSKU" == "Force10-S6100" ]; then SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json " elif [ "$HWSKU" == "Arista-7050-QX32" ]; then SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [[ "$HWSKU" == "ACS-MSN27"* ]] || [[ "$HWSKU" == "Mellanox-SN2700" ]]; then - sonic-cfggen -d -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json - SWSSCONFIG_ARGS+="msn27xx.32ports.buffers.json " fi for file in $SWSSCONFIG_ARGS; do diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 436a7de9071..a78c07d93b4 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -112,15 +112,23 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then else # Use default minigraph.xml cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/ - HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` - if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then - # merge qos configuration into init config file - sonic-cfggen -j /etc/sonic/init_cfg.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/init_cfg.json - mv /tmp/init_cfg.json /etc/sonic/init_cfg.json - fi sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json fi + HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` + if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then + # merge qos configuration into init config file + sonic-cfggen -j /etc/sonic/config_db.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/config_db.json + mv /tmp/config_db.json /etc/sonic/config_db.json + fi + + if [ -f /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 ]; then + # generate and merge buffers configuration into config file + sonic-cfggen -m -t /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 > /tmp/buffers.json + sonic-cfggen -j /etc/sonic/config_db.json -j /tmp/buffers.json --print-data > /tmp/config_db.json + mv /tmp/config_db.json /etc/sonic/config_db.json + fi + if [ -d /host/image-$sonic_version/platform/$platform ]; then dpkg -i /host/image-$sonic_version/platform/$platform/*.deb fi diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index a26c3f475fa..7599059164c 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -70,6 +70,8 @@ RUN sed -ri 's/^(save .*$)/# \1/g; COPY ["50-default.conf", "/etc/rsyslog.d/"] COPY ["start.sh", "orchagent.sh", "/usr/bin/"] COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"] +COPY ["buffers.json.j2", "/usr/share/sonic/device/vswitch/"] +COPY ["pg_profile_lookup.ini", "/usr/share/sonic/device/vswitch/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"] COPY ["files/arp_update", "/usr/bin"] diff --git a/platform/vs/docker-sonic-vs/buffers.json.j2 b/platform/vs/docker-sonic-vs/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/platform/vs/docker-sonic-vs/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/platform/vs/docker-sonic-vs/pg_profile_lookup.ini b/platform/vs/docker-sonic-vs/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/platform/vs/docker-sonic-vs/pg_profile_lookup.ini @@ -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 diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 876bfd83572..9df6f9f5ad3 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -11,7 +11,9 @@ if [ -f /etc/sonic/config_db.json ]; then sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --print-data > /tmp/config_db.json mv /tmp/config_db.json /etc/sonic/config_db.json else - sonic-cfggen -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json + # generate and merge buffers configuration into config file + sonic-cfggen -t /usr/share/sonic/device/vswitch/buffers.json.j2 > /tmp/buffers.json + sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json --print-data > /etc/sonic/config_db.json fi mkdir -p /etc/swss/config.d/ @@ -52,6 +54,8 @@ supervisorctl start vlanmgrd supervisorctl start zebra +supervisorctl start buffermgrd + # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf index 2526aefe3a8..fc425142db7 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf +++ b/platform/vs/docker-sonic-vs/supervisord.conf @@ -122,3 +122,11 @@ autostart=false autorestart=true stdout_logfile=syslog stderr_logfile=syslog + +[program:buffermgrd] +command=/usr/bin/buffermgrd -l /usr/share/sonic/device/vswitch/pg_profile_lookup.ini +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json index a1e8e1486d6..2a878c95f2c 100644 --- a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json +++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json @@ -1,341 +1,120 @@ -[ - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { +{ + "CABLE_LENGTH": { + "AZURE": { + "Ethernet8": "300m", + "Ethernet0": "300m", + "Ethernet4": "300m", + "Ethernet108": "300m", + "Ethernet100": "300m", + "Ethernet104": "300m", + "Ethernet68": "300m", + "Ethernet96": "300m", + "Ethernet124": "300m", + "Ethernet92": "300m", + "Ethernet120": "300m", + "Ethernet52": "300m", + "Ethernet56": "300m", + "Ethernet76": "300m", + "Ethernet72": "300m", + "Ethernet64": "300m", + "Ethernet32": "300m", + "Ethernet16": "300m", + "Ethernet36": "300m", + "Ethernet12": "300m", + "Ethernet88": "300m", + "Ethernet116": "300m", + "Ethernet80": "300m", + "Ethernet112": "300m", + "Ethernet84": "300m", + "Ethernet48": "300m", + "Ethernet44": "300m", + "Ethernet40": "300m", + "Ethernet28": "300m", + "Ethernet60": "300m", + "Ethernet20": "300m", + "Ethernet24": "300m" + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { "size": "2097152", "type": "ingress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:ingress_lossy_pool": { + "ingress_lossy_pool": { "size": "5242880", "type": "ingress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossless_pool": { + "egress_lossless_pool": { "size": "16777152", "type": "egress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossy_pool": { + "egress_lossy_pool": { "size": "5242880", "type": "egress", "mode": "dynamic" - }, - "OP": "SET" + } }, - { - "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"0", "dynamic_th":"0" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", "size":"4096", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:pg_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", "size":"0", "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_INGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_EGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" - }, - "OP": "SET" - }, - - - - { - "BUFFER_PG_TABLE:Ethernet8:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet0:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet4:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet108:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet100:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet104:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet68:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet96:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet124:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet92:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet120:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet52:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet56:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet76:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet72:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet64:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet32:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet16:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet36:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet12:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet88:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet116:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet80:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet112:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet84:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet48:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet44:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet40:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet28:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet60:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet20:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet24:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - - { - "BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "xon":"18432", - "xoff":"75776", - "size":"94208", - "dynamic_th":"0" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" - }, - "OP": "SET" - }, - { - "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { - "0": "0", - "1": "1", - "3": "3", - "4": "4" - }, - "OP": "SET" - }, - { - "PORT_QOS_MAP_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" - }, - "OP": "SET" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } } -] +} diff --git a/src/sonic-config-engine/tests/sample_output/ports.json b/src/sonic-config-engine/tests/sample_output/ports.json index 216627ef34c..6536c620f8c 100644 --- a/src/sonic-config-engine/tests/sample_output/ports.json +++ b/src/sonic-config-engine/tests/sample_output/ports.json @@ -26,5 +26,5 @@ "description": "Interface description" }, "OP": "SET" - }, + } ] diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index ce96ab425c8..5afd1149979 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -85,7 +85,7 @@ def test_ipinip(self): assert filecmp.cmp(sample_output_file, self.output_file) def test_msn27xx_32ports_buffers(self): - buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'msn27xx.32ports.buffers.json.j2') + buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2700-r0', 'ACS-MSN2700', 'buffers.json.j2') argument = '-m ' + self.t1_mlnx_minigraph + ' -p ' + self.mlnx_port_config + ' -t ' + buffer_file + ' > ' + self.output_file self.run_script(argument) @@ -93,7 +93,6 @@ def test_msn27xx_32ports_buffers(self): self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) - def tearDown(self): try: os.remove(self.output_file) From 2b91c9681d1022de70d96b1f88d8d7faf34c1fe1 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Fri, 26 Jan 2018 10:13:43 -0800 Subject: [PATCH 060/254] Revert "Buffers configuration update on port speed change (#1250)" (#1340) This reverts commit 814e50fd5e4d001fbd729fa95aaabe0d395a45fd. --- .../Arista-7050-QX32/buffers.json.j2 | 135 ------ .../Arista-7050-QX32/pg_profile_lookup.ini | 17 - .../Force10-S6000/buffers.json.j2 | 135 ------ .../Force10-S6000/pg_profile_lookup.ini | 17 - .../Force10-S6100/buffers.json.j2 | 126 ------ .../ACS-MSN2700/buffers.json.j2 | 162 -------- .../ACS-MSN2700/pg_profile_lookup.ini | 17 - .../ACS-MSN2740/buffers.json.j2 | 162 -------- .../ACS-MSN2740/pg_profile_lookup.ini | 17 - .../msn27xx.32ports.buffers.json.j2 | 292 +++++++++++++ dockers/docker-orchagent/ports.json.j2 | 6 +- dockers/docker-orchagent/start.sh | 2 - dockers/docker-orchagent/supervisord.conf | 8 - dockers/docker-orchagent/swssconfig.sh | 3 + files/image_config/platform/rc.local | 20 +- platform/vs/docker-sonic-vs/Dockerfile.j2 | 2 - platform/vs/docker-sonic-vs/buffers.json.j2 | 162 -------- .../vs/docker-sonic-vs/pg_profile_lookup.ini | 17 - platform/vs/docker-sonic-vs/start.sh | 6 +- platform/vs/docker-sonic-vs/supervisord.conf | 8 - .../tests/sample_output/msn27.32ports.json | 387 ++++++++++++++---- .../tests/sample_output/ports.json | 2 +- src/sonic-config-engine/tests/test_j2files.py | 3 +- 23 files changed, 610 insertions(+), 1096 deletions(-) delete mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 delete mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini delete mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 delete mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini delete mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 delete mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 delete mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini delete mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 delete mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini create mode 100644 dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 delete mode 100644 platform/vs/docker-sonic-vs/buffers.json.j2 delete mode 100644 platform/vs/docker-sonic-vs/pg_profile_lookup.ini diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 deleted file mode 100644 index 560cae5dd1b..00000000000 --- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 +++ /dev/null @@ -1,135 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_speed = '100G' %} -{% set default_ports_num = 32 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, - "BUFFER_POOL": { - "ingress_lossless_pool": { - "size": "7274496", - "type": "ingress", - "mode": "static" - }, - "ingress_lossy_pool": { - "size": "5491712", - "type": "ingress", - "mode": "dynamic" - }, - "egress_lossless_pool0": { - "size": "3637248", - "type": "egress", - "mode": "static" - }, - "egress_lossless_pool1": { - "size": "3637248", - "type": "egress", - "mode": "static" - }, - "egress_lossy_pool": { - "size": "5491712", - "type": "egress", - "mode": "dynamic" - } - }, - "BUFFER_PROFILE": { - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"1518", - "dynamic_th":"3" - }, - "egress_lossless_profile0": { - "pool":"[BUFFER_POOL|egress_lossless_pool0]", - "size":"1518", - "static_th":"3637248" - }, - "egress_lossless_profile1": { - "pool":"[BUFFER_POOL|egress_lossless_pool1]", - "size":"1518", - "static_th":"3637248" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"1518", - "dynamic_th":"3" - } - }, - "BUFFER_PG": { - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "{{ port_names }}|3": { - "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" - }, - "{{ port_names }}|4": { - "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" - }, - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" - } - } -} diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini deleted file mode 100644 index f3a0840558a..00000000000 --- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini +++ /dev/null @@ -1,17 +0,0 @@ -# PG lossless profiles. -# speed cable size xon xoff threshold - 10000 5m 113664 18432 76800 0 - 25000 5m 113664 18432 76800 0 - 40000 5m 113664 18432 76800 0 - 50000 5m 113664 18432 76800 0 - 100000 5m 113664 18432 76800 0 - 10000 40m 113664 18432 76800 0 - 25000 40m 113664 18432 76800 0 - 40000 40m 113664 18432 76800 0 - 50000 40m 113664 18432 76800 0 - 100000 40m 113664 18432 76800 0 - 10000 300m 113664 18432 76800 0 - 25000 300m 113664 18432 76800 0 - 40000 300m 113664 18432 76800 0 - 50000 300m 113664 18432 76800 0 - 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 deleted file mode 100644 index 560cae5dd1b..00000000000 --- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 +++ /dev/null @@ -1,135 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_speed = '100G' %} -{% set default_ports_num = 32 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, - "BUFFER_POOL": { - "ingress_lossless_pool": { - "size": "7274496", - "type": "ingress", - "mode": "static" - }, - "ingress_lossy_pool": { - "size": "5491712", - "type": "ingress", - "mode": "dynamic" - }, - "egress_lossless_pool0": { - "size": "3637248", - "type": "egress", - "mode": "static" - }, - "egress_lossless_pool1": { - "size": "3637248", - "type": "egress", - "mode": "static" - }, - "egress_lossy_pool": { - "size": "5491712", - "type": "egress", - "mode": "dynamic" - } - }, - "BUFFER_PROFILE": { - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"1518", - "dynamic_th":"3" - }, - "egress_lossless_profile0": { - "pool":"[BUFFER_POOL|egress_lossless_pool0]", - "size":"1518", - "static_th":"3637248" - }, - "egress_lossless_profile1": { - "pool":"[BUFFER_POOL|egress_lossless_pool1]", - "size":"1518", - "static_th":"3637248" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"1518", - "dynamic_th":"3" - } - }, - "BUFFER_PG": { - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "{{ port_names }}|3": { - "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" - }, - "{{ port_names }}|4": { - "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" - }, - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" - } - } -} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini deleted file mode 100644 index f3a0840558a..00000000000 --- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini +++ /dev/null @@ -1,17 +0,0 @@ -# PG lossless profiles. -# speed cable size xon xoff threshold - 10000 5m 113664 18432 76800 0 - 25000 5m 113664 18432 76800 0 - 40000 5m 113664 18432 76800 0 - 50000 5m 113664 18432 76800 0 - 100000 5m 113664 18432 76800 0 - 10000 40m 113664 18432 76800 0 - 25000 40m 113664 18432 76800 0 - 40000 40m 113664 18432 76800 0 - 50000 40m 113664 18432 76800 0 - 100000 40m 113664 18432 76800 0 - 10000 300m 113664 18432 76800 0 - 25000 300m 113664 18432 76800 0 - 40000 300m 113664 18432 76800 0 - 50000 300m 113664 18432 76800 0 - 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 deleted file mode 100644 index b12fc385117..00000000000 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 +++ /dev/null @@ -1,126 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_speed = '100G' %} -{% set default_ports_num = 64 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % port_idx) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, - "BUFFER_POOL": { - "ingress_lossless_lossy_pool": { - "size": "10443264", - "type": "ingress", - "mode": "dynamic", - "xoff": "4625920" - }, - "egress_lossy_pool": { - "size": "8877440", - "type": "egress", - "mode": "dynamic" - }, - "egress_lossless_pool": { - "size": "15982592", - "type": "egress", - "mode": "static" - } - }, - "BUFFER_PROFILE": { - "ingress_lossless_profile": { - "pool": "[BUFFER_POOL|ingress_lossless_lossy_pool]", - "xon": "4096", - "xoff": "58448", - "size": "1248", - "dynamic_th": "-4" - }, - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossless_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "egress_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"1518", - "static_th":"3995648" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"1518", - "dynamic_th":"3" - } - }, - "BUFFER_PG": { - "{{ port_names }}:3-4": { - "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" - }, - "{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { - "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" - }, - "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" - } - } -} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 deleted file mode 100644 index da9c764db92..00000000000 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 +++ /dev/null @@ -1,162 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_ports_num = 32 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, -{%if switch_role == 'ToRRouter' %} -{% set ingress_lossless_pool_size = '4194304' %} -{% set ingress_lossy_pool_size = '7340032' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '7340032' %} -{% else %} -{% set ingress_lossless_pool_size = '2097152' %} -{% set ingress_lossy_pool_size = '5242880' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '5242880' %} -{%endif %} - "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":"0", - "dynamic_th":"0" - }, - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "egress_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"4096", - "dynamic_th":"3" - }, - "pg_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "q_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "q_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - } - }, - "BUFFER_PORT_INGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_PORT_EGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" - } - }, - "BUFFER_PG": { - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "[BUFFER_PROFILE|q_lossless_profile]" - }, - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|q_lossy_profile]" - } - } -} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini deleted file mode 100644 index b66b129fe43..00000000000 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini +++ /dev/null @@ -1,17 +0,0 @@ -# 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 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 deleted file mode 100644 index da9c764db92..00000000000 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 +++ /dev/null @@ -1,162 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_ports_num = 32 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, -{%if switch_role == 'ToRRouter' %} -{% set ingress_lossless_pool_size = '4194304' %} -{% set ingress_lossy_pool_size = '7340032' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '7340032' %} -{% else %} -{% set ingress_lossless_pool_size = '2097152' %} -{% set ingress_lossy_pool_size = '5242880' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '5242880' %} -{%endif %} - "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":"0", - "dynamic_th":"0" - }, - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "egress_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"4096", - "dynamic_th":"3" - }, - "pg_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "q_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "q_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - } - }, - "BUFFER_PORT_INGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_PORT_EGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" - } - }, - "BUFFER_PG": { - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "[BUFFER_PROFILE|q_lossless_profile]" - }, - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|q_lossy_profile]" - } - } -} diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini deleted file mode 100644 index b66b129fe43..00000000000 --- a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini +++ /dev/null @@ -1,17 +0,0 @@ -# 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 diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 new file mode 100644 index 00000000000..579832ecda1 --- /dev/null +++ b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 @@ -0,0 +1,292 @@ +[ +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') %} +{% set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "size":"0", + "dynamic_th":"0" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:pg_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_INGRESS_PROFILE_LIST:{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_EGRESS_PROFILE_LIST:{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" + }, + "OP": "SET" + }, + +{# The following template part is for variable PG profile configuration #} +{% set pg_range = '3-4' %} +{# Lists of supported speed and cable length #} +{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} +{% set supported_cable = [5, 40, 300] %} + +{# The key in this lictionary consist of two parts: (port speed)_(cable length) #} +{%- set portconfig2profile = { + '10000_5' : 'pg_lossless_10G_5m_profile', + '25000_5' : 'pg_lossless_25G_5m_profile', + '40000_5' : 'pg_lossless_40G_5m_profile', + '50000_5' : 'pg_lossless_50G_5m_profile', + '100000_5' : 'pg_lossless_100G_5m_profile', + + '10000_40' : 'pg_lossless_10G_40m_profile', + '25000_40' : 'pg_lossless_25G_40m_profile', + '40000_40' : 'pg_lossless_40G_40m_profile', + '50000_40' : 'pg_lossless_50G_40m_profile', + '100000_40' : 'pg_lossless_100G_40m_profile', + + '10000_300' : 'pg_lossless_10G_300m_profile', + '25000_300' : 'pg_lossless_25G_300m_profile', + '40000_300' : 'pg_lossless_40G_300m_profile', + '50000_300' : 'pg_lossless_50G_300m_profile', + '100000_300': 'pg_lossless_100G_300m_profile' + } +-%} + +{# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} +{# Only those which were actually used will be created in SAI #} +{%- set pg_profiles = { + 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, + 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, + + 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, + 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 0 }, + 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, + 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, + 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 0 }, + + 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 0 }, + 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 0 }, + 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, + 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, + 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 0 }, + } +-%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'ToRRouter_Server' : '5', + 'LeafRouter_ToRRouter' : '40', + 'SpineRouter_LeafRouter' : '300' + } +%} + +{% macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {% endif %} + {% endif %} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ supported_cable | last }} + {%- endif -%} +{% endmacro %} + +{%- macro find_closest_greater_config(speed, cable) -%} +{%- set new_speed = [] -%} +{%- for std_speed in supported_speed -%} + {%- if std_speed | int >= speed | int -%} + {%- if new_speed.append(std_speed) -%}{%- endif -%} + {% endif -%} +{%- endfor -%} +{%- set new_cable = [] -%} +{%- for std_cable in supported_cable -%} + {% if std_cable | int >= cable | int -%} + {%- if new_cable.append(std_cable) -%}{%- endif -%} + {% endif %} +{%- endfor -%} +{{ new_speed.0 }}_{{ new_cable.0 }} +{%- endmacro -%} + +{% set used_pg_profiles = [] %} +{% for port in PORT %} + {%- if PORT[port].speed -%} + {%- set speed = PORT[port]['speed'] -%} + {% else %} + {%- set speed = supported_speed|last -%} + {%- endif -%} + {%- set cable = cable_length(port) -%} + {%- set port_config = speed|string + '_' + cable -%} + {%- if not port_config in portconfig2profile -%} + {% set port_config = find_closest_greater_config(speed, cable) -%} + {%- endif -%} + {% set profile = portconfig2profile[port_config] -%} + {# add to list profiles which were actually used #} + {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif %} + { + "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { + "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" + }, + "OP": "SET" + }, +{% endfor -%} + +{# PG profiles declaration #} + +{% for profile_name in used_pg_profiles %} + {%- set profile_config = pg_profiles[profile_name] %} + { + "BUFFER_PROFILE_TABLE:{{ profile_name }}": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "xon":"{{ profile_config['xon'] }}", + "xoff":"{{ profile_config['xoff'] }}", + "size":"{{ profile_config['size'] }}", + "dynamic_th":"{{ profile_config['dynamic_th'] }}" + }, + "OP": "SET" + }, +{% endfor %} + { + "BUFFER_PG_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" + }, + "OP": "SET" + }, + { + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + }, + "OP": "SET" + }, + { + "PORT_QOS_MAP_TABLE:{{ port_names }}": { + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" + }, + "OP": "SET" + } +] diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2 index b10d4d58a43..e0438998114 100644 --- a/dockers/docker-orchagent/ports.json.j2 +++ b/dockers/docker-orchagent/ports.json.j2 @@ -1,12 +1,7 @@ [ -{% set ports_with_speed_set=[] %} {% if PORT %} {% for port in PORT %} {% if PORT[port].has_key('speed') %} - {%- if ports_with_speed_set.append(port) -%}{%- endif -%} -{%- endif -%} -{% endfor %} -{% for port in ports_with_speed_set %} { "PORT_TABLE:{{ port }}": { "speed": "{{ PORT[port]['speed'] }}", @@ -15,6 +10,7 @@ "OP": "SET" }{% if not loop.last %},{% endif %} +{% endif %} {% endfor %} {% endif %} ] diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index 80ccac913ff..dfdb5b897bb 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -26,8 +26,6 @@ supervisorctl start vlanmgrd supervisorctl start intfmgrd -supervisorctl start buffermgrd - # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index 84beaed440a..95e92be622b 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -83,11 +83,3 @@ autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog - -[program:buffermgrd] -command=/usr/bin/buffermgrd -l /usr/share/sonic/hwsku/pg_profile_lookup.ini -priority=10 -autostart=false -autorestart=false -stdout_logfile=syslog -stderr_logfile=syslog diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 6dd3486ee3b..959b6714d27 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -37,6 +37,9 @@ elif [ "$HWSKU" == "Force10-S6100" ]; then SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json " elif [ "$HWSKU" == "Arista-7050-QX32" ]; then SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " +elif [[ "$HWSKU" == "ACS-MSN27"* ]] || [[ "$HWSKU" == "Mellanox-SN2700" ]]; then + sonic-cfggen -d -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json + SWSSCONFIG_ARGS+="msn27xx.32ports.buffers.json " fi for file in $SWSSCONFIG_ARGS; do diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index a78c07d93b4..436a7de9071 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -112,23 +112,15 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then else # Use default minigraph.xml cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/ + HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` + if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then + # merge qos configuration into init config file + sonic-cfggen -j /etc/sonic/init_cfg.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/init_cfg.json + mv /tmp/init_cfg.json /etc/sonic/init_cfg.json + fi sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json fi - HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` - if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then - # merge qos configuration into init config file - sonic-cfggen -j /etc/sonic/config_db.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/config_db.json - mv /tmp/config_db.json /etc/sonic/config_db.json - fi - - if [ -f /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 ]; then - # generate and merge buffers configuration into config file - sonic-cfggen -m -t /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 > /tmp/buffers.json - sonic-cfggen -j /etc/sonic/config_db.json -j /tmp/buffers.json --print-data > /tmp/config_db.json - mv /tmp/config_db.json /etc/sonic/config_db.json - fi - if [ -d /host/image-$sonic_version/platform/$platform ]; then dpkg -i /host/image-$sonic_version/platform/$platform/*.deb fi diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index 7599059164c..a26c3f475fa 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -70,8 +70,6 @@ RUN sed -ri 's/^(save .*$)/# \1/g; COPY ["50-default.conf", "/etc/rsyslog.d/"] COPY ["start.sh", "orchagent.sh", "/usr/bin/"] COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"] -COPY ["buffers.json.j2", "/usr/share/sonic/device/vswitch/"] -COPY ["pg_profile_lookup.ini", "/usr/share/sonic/device/vswitch/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"] COPY ["files/arp_update", "/usr/bin"] diff --git a/platform/vs/docker-sonic-vs/buffers.json.j2 b/platform/vs/docker-sonic-vs/buffers.json.j2 deleted file mode 100644 index da9c764db92..00000000000 --- a/platform/vs/docker-sonic-vs/buffers.json.j2 +++ /dev/null @@ -1,162 +0,0 @@ -{# Default values which will be used if no actual configura available #} -{% set default_cable = '300m' %} -{% set default_ports_num = 32 -%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'torrouter_server' : '5m', - 'leafrouter_torrouter' : '40m', - 'spinerouter_leafrouter' : '300m' - } -%} - -{%- macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- set roles1 = roles1 | lower -%} - {%- set roles2 = roles2 | lower -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endif -%} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ default_cable }} - {%- endif -%} -{% endmacro %} - -{%- if DEVICE_METADATA is defined %} -{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%- endif -%} - -{# Generate list of ports if not defined #} -{% if PORT is not defined %} - {% set PORT = [] %} - {% for port_idx in range(0,default_ports_num) %} - {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} - {% endfor %} -{% endif -%} - -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') -%} - -{ - "CABLE_LENGTH": { - "AZURE": { - {% for port in PORT %} - {% set cable = cable_length(port) -%} - "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} - - {% endfor %} - } - }, -{%if switch_role == 'ToRRouter' %} -{% set ingress_lossless_pool_size = '4194304' %} -{% set ingress_lossy_pool_size = '7340032' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '7340032' %} -{% else %} -{% set ingress_lossless_pool_size = '2097152' %} -{% set ingress_lossy_pool_size = '5242880' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '5242880' %} -{%endif %} - "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":"0", - "dynamic_th":"0" - }, - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "egress_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"4096", - "dynamic_th":"3" - }, - "pg_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "q_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "q_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - } - }, - "BUFFER_PORT_INGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_PORT_EGRESS_PROFILE_LIST": { - "{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" - } - }, - "BUFFER_PG": { - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "[BUFFER_PROFILE|q_lossless_profile]" - }, - "{{ port_names }}|0-1": { - "profile" : "[BUFFER_PROFILE|q_lossy_profile]" - } - } -} diff --git a/platform/vs/docker-sonic-vs/pg_profile_lookup.ini b/platform/vs/docker-sonic-vs/pg_profile_lookup.ini deleted file mode 100644 index b66b129fe43..00000000000 --- a/platform/vs/docker-sonic-vs/pg_profile_lookup.ini +++ /dev/null @@ -1,17 +0,0 @@ -# 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 diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 9df6f9f5ad3..876bfd83572 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -11,9 +11,7 @@ if [ -f /etc/sonic/config_db.json ]; then sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --print-data > /tmp/config_db.json mv /tmp/config_db.json /etc/sonic/config_db.json else - # generate and merge buffers configuration into config file - sonic-cfggen -t /usr/share/sonic/device/vswitch/buffers.json.j2 > /tmp/buffers.json - sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json --print-data > /etc/sonic/config_db.json + sonic-cfggen -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json fi mkdir -p /etc/swss/config.d/ @@ -54,8 +52,6 @@ supervisorctl start vlanmgrd supervisorctl start zebra -supervisorctl start buffermgrd - # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf index fc425142db7..2526aefe3a8 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf +++ b/platform/vs/docker-sonic-vs/supervisord.conf @@ -122,11 +122,3 @@ autostart=false autorestart=true stdout_logfile=syslog stderr_logfile=syslog - -[program:buffermgrd] -command=/usr/bin/buffermgrd -l /usr/share/sonic/device/vswitch/pg_profile_lookup.ini -priority=10 -autostart=false -autorestart=false -stdout_logfile=syslog -stderr_logfile=syslog diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json index 2a878c95f2c..a1e8e1486d6 100644 --- a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json +++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json @@ -1,120 +1,341 @@ -{ - "CABLE_LENGTH": { - "AZURE": { - "Ethernet8": "300m", - "Ethernet0": "300m", - "Ethernet4": "300m", - "Ethernet108": "300m", - "Ethernet100": "300m", - "Ethernet104": "300m", - "Ethernet68": "300m", - "Ethernet96": "300m", - "Ethernet124": "300m", - "Ethernet92": "300m", - "Ethernet120": "300m", - "Ethernet52": "300m", - "Ethernet56": "300m", - "Ethernet76": "300m", - "Ethernet72": "300m", - "Ethernet64": "300m", - "Ethernet32": "300m", - "Ethernet16": "300m", - "Ethernet36": "300m", - "Ethernet12": "300m", - "Ethernet88": "300m", - "Ethernet116": "300m", - "Ethernet80": "300m", - "Ethernet112": "300m", - "Ethernet84": "300m", - "Ethernet48": "300m", - "Ethernet44": "300m", - "Ethernet40": "300m", - "Ethernet28": "300m", - "Ethernet60": "300m", - "Ethernet20": "300m", - "Ethernet24": "300m" - } - }, - "BUFFER_POOL": { - "ingress_lossless_pool": { +[ + { + "BUFFER_POOL_TABLE:ingress_lossless_pool": { "size": "2097152", "type": "ingress", "mode": "dynamic" }, - "ingress_lossy_pool": { + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:ingress_lossy_pool": { "size": "5242880", "type": "ingress", "mode": "dynamic" }, - "egress_lossless_pool": { + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossless_pool": { "size": "16777152", "type": "egress", "mode": "dynamic" }, - "egress_lossy_pool": { + "OP": "SET" + }, + { + "BUFFER_POOL_TABLE:egress_lossy_pool": { "size": "5242880", "type": "egress", "mode": "dynamic" - } + }, + "OP": "SET" }, - "BUFFER_PROFILE": { - "ingress_lossless_profile": { - "pool":"[BUFFER_POOL|ingress_lossless_pool]", + { + "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", "size":"0", "dynamic_th":"0" }, - "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "egress_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "egress_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:egress_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"4096", "dynamic_th":"3" }, - "pg_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:pg_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "q_lossless_profile": { - "pool":"[BUFFER_POOL|egress_lossless_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossless_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "q_lossy_profile": { - "pool":"[BUFFER_POOL|egress_lossy_pool]", + "OP": "SET" + }, + { + "BUFFER_PROFILE_TABLE:q_lossy_profile": { + "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", "size":"0", "dynamic_th":"3" - } - }, - "BUFFER_PORT_INGRESS_PROFILE_LIST": { - "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" - } - }, - "BUFFER_PORT_EGRESS_PROFILE_LIST": { - "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" - } - }, - "BUFFER_PG": { - "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { - "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" - } - }, - "BUFFER_QUEUE": { - "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|3-4": { - "profile" : "[BUFFER_PROFILE|q_lossless_profile]" - }, - "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { - "profile" : "[BUFFER_PROFILE|q_lossy_profile]" - } + }, + "OP": "SET" + }, + { + "BUFFER_PORT_INGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PORT_EGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" + }, + "OP": "SET" + }, + + + + { + "BUFFER_PG_TABLE:Ethernet8:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet0:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet4:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet108:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet100:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet104:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet68:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet96:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet124:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet92:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet120:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet52:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet56:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet76:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet72:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet64:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet32:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet16:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet36:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet12:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet88:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet116:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet80:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet112:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet84:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet48:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet44:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet40:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet28:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet60:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet20:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet24:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" + }, + "OP": "SET" + }, + + { + "BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": { + "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "xon":"18432", + "xoff":"75776", + "size":"94208", + "dynamic_th":"0" + }, + "OP": "SET" + }, + { + "BUFFER_PG_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:3-4": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" + }, + "OP": "SET" + }, + { + "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { + "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" + }, + "OP": "SET" + }, + { + "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { + "0": "0", + "1": "1", + "3": "3", + "4": "4" + }, + "OP": "SET" + }, + { + "PORT_QOS_MAP_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" + }, + "OP": "SET" } -} +] diff --git a/src/sonic-config-engine/tests/sample_output/ports.json b/src/sonic-config-engine/tests/sample_output/ports.json index 6536c620f8c..216627ef34c 100644 --- a/src/sonic-config-engine/tests/sample_output/ports.json +++ b/src/sonic-config-engine/tests/sample_output/ports.json @@ -26,5 +26,5 @@ "description": "Interface description" }, "OP": "SET" - } + }, ] diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 5afd1149979..ce96ab425c8 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -85,7 +85,7 @@ def test_ipinip(self): assert filecmp.cmp(sample_output_file, self.output_file) def test_msn27xx_32ports_buffers(self): - buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2700-r0', 'ACS-MSN2700', 'buffers.json.j2') + buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'msn27xx.32ports.buffers.json.j2') argument = '-m ' + self.t1_mlnx_minigraph + ' -p ' + self.mlnx_port_config + ' -t ' + buffer_file + ' > ' + self.output_file self.run_script(argument) @@ -93,6 +93,7 @@ def test_msn27xx_32ports_buffers(self): self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) + def tearDown(self): try: os.remove(self.output_file) From da10ff5aa9c8369d8e705b35c6b0501c91d37fc7 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Fri, 26 Jan 2018 20:29:20 -0800 Subject: [PATCH 061/254] [minigraph.py] Only add 'service' field to control plane ACLs, not dataplane ACLs (#1341) * [minigraph.py] Only add 'service' field to control plane ACLs, not dataplane ACLs * Modify unit test accordingly --- src/sonic-config-engine/minigraph.py | 5 ++--- src/sonic-config-engine/tests/test_cfggen.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 0dc3085e129..23d02a363e4 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -202,15 +202,14 @@ def parse_dpg(dpg, hname): if acl_intfs: acls[aclname] = {'policy_desc': aclname, 'ports': acl_intfs, - 'type': 'MIRROR' if is_mirror else 'L3', - 'service': 'N/A'} + 'type': 'MIRROR' if is_mirror else 'L3'} else: # This ACL has no interfaces to attach to -- consider this a control plane ACL aclservice = aclintf.find(str(QName(ns, "Type"))).text acls[aclname] = {'policy_desc': aclname, 'ports': acl_intfs, 'type': 'CTRLPLANE', - 'service': aclservice if aclservice is not None else ''} + 'service': aclservice if aclservice is not None else 'UNKNOWN'} return intfs, lo_intfs, mgmt_intf, vlans, vlan_members, pcs, acls return None, None, None, None, None, None, None diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 768052a1d7e..2eee6fe331c 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -73,7 +73,7 @@ def test_render_template(self): def test_minigraph_acl(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v ACL_TABLE' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'service': 'N/A', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") + self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") def test_minigraph_everflow(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v MIRROR_SESSION' From 58d8302b53a51aec22ed4152ccf27262134bd068 Mon Sep 17 00:00:00 2001 From: Andriy Moroz Date: Mon, 29 Jan 2018 18:11:05 +0200 Subject: [PATCH 062/254] Buffers configuration update on port speed change (#1345) * Move buffer configuration to ConfigDB Signed-off-by: Andriy Moroz * Converted Dell and Arista configs Signed-off-by: Andriy Moroz * Add buffer configs for ACS-MSN2740 Signed-off-by: Andriy Moroz * Updated buffers template Signed-off-by: Andriy Moroz * Fixed j2 unit test Signed-off-by: Andriy Moroz * Update buffers config for Force10-S6100 Signed-off-by: Andriy Moroz * Update VS docker to support speed and buffers test Signed-off-by: Andriy Moroz * Update buffers config generation - fixed support of sonic-to-sonic install Signed-off-by: Andriy Moroz * Update submodules pointers for buffers config Signed-off-by: Andriy Moroz --- .../Arista-7050-QX32/buffers.json.j2 | 135 ++++++ .../Arista-7050-QX32/pg_profile_lookup.ini | 17 + .../Force10-S6000/buffers.json.j2 | 135 ++++++ .../Force10-S6000/pg_profile_lookup.ini | 17 + .../Force10-S6100/buffers.json.j2 | 126 ++++++ .../ACS-MSN2700/buffers.json.j2 | 162 ++++++++ .../ACS-MSN2700/pg_profile_lookup.ini | 17 + .../ACS-MSN2740/buffers.json.j2 | 162 ++++++++ .../ACS-MSN2740/pg_profile_lookup.ini | 17 + .../msn27xx.32ports.buffers.json.j2 | 292 ------------- dockers/docker-orchagent/ports.json.j2 | 6 +- dockers/docker-orchagent/start.sh | 2 + dockers/docker-orchagent/supervisord.conf | 8 + dockers/docker-orchagent/swssconfig.sh | 3 - files/image_config/platform/rc.local | 20 +- platform/vs/docker-sonic-vs/Dockerfile.j2 | 2 + platform/vs/docker-sonic-vs/buffers.json.j2 | 162 ++++++++ .../vs/docker-sonic-vs/pg_profile_lookup.ini | 17 + platform/vs/docker-sonic-vs/start.sh | 6 +- platform/vs/docker-sonic-vs/supervisord.conf | 8 + .../tests/sample_output/msn27.32ports.json | 387 ++++-------------- .../tests/sample_output/ports.json | 2 +- src/sonic-config-engine/tests/test_j2files.py | 3 +- src/sonic-swss | 2 +- src/sonic-swss-common | 2 +- src/sonic-utilities | 2 +- 26 files changed, 1099 insertions(+), 613 deletions(-) create mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 create mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini create mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini create mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini delete mode 100644 dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 create mode 100644 platform/vs/docker-sonic-vs/buffers.json.j2 create mode 100644 platform/vs/docker-sonic-vs/pg_profile_lookup.ini diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 new file mode 100644 index 00000000000..560cae5dd1b --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/buffers.json.j2 @@ -0,0 +1,135 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "7274496", + "type": "ingress", + "mode": "static" + }, + "ingress_lossy_pool": { + "size": "5491712", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool0": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossless_pool1": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "5491712", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + }, + "egress_lossless_profile0": { + "pool":"[BUFFER_POOL|egress_lossless_pool0]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossless_profile1": { + "pool":"[BUFFER_POOL|egress_lossless_pool1]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" + }, + "{{ port_names }}|4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini new file mode 100644 index 00000000000..f3a0840558a --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 113664 18432 76800 0 + 25000 5m 113664 18432 76800 0 + 40000 5m 113664 18432 76800 0 + 50000 5m 113664 18432 76800 0 + 100000 5m 113664 18432 76800 0 + 10000 40m 113664 18432 76800 0 + 25000 40m 113664 18432 76800 0 + 40000 40m 113664 18432 76800 0 + 50000 40m 113664 18432 76800 0 + 100000 40m 113664 18432 76800 0 + 10000 300m 113664 18432 76800 0 + 25000 300m 113664 18432 76800 0 + 40000 300m 113664 18432 76800 0 + 50000 300m 113664 18432 76800 0 + 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 new file mode 100644 index 00000000000..560cae5dd1b --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/buffers.json.j2 @@ -0,0 +1,135 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "7274496", + "type": "ingress", + "mode": "static" + }, + "ingress_lossy_pool": { + "size": "5491712", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool0": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossless_pool1": { + "size": "3637248", + "type": "egress", + "mode": "static" + }, + "egress_lossy_pool": { + "size": "5491712", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + }, + "egress_lossless_profile0": { + "pool":"[BUFFER_POOL|egress_lossless_pool0]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossless_profile1": { + "pool":"[BUFFER_POOL|egress_lossless_pool1]", + "size":"1518", + "static_th":"3637248" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile0]" + }, + "{{ port_names }}|4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile1]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini new file mode 100644 index 00000000000..f3a0840558a --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 113664 18432 76800 0 + 25000 5m 113664 18432 76800 0 + 40000 5m 113664 18432 76800 0 + 50000 5m 113664 18432 76800 0 + 100000 5m 113664 18432 76800 0 + 10000 40m 113664 18432 76800 0 + 25000 40m 113664 18432 76800 0 + 40000 40m 113664 18432 76800 0 + 50000 40m 113664 18432 76800 0 + 100000 40m 113664 18432 76800 0 + 10000 300m 113664 18432 76800 0 + 25000 300m 113664 18432 76800 0 + 40000 300m 113664 18432 76800 0 + 50000 300m 113664 18432 76800 0 + 100000 300m 113664 18432 76800 0 diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 new file mode 100644 index 00000000000..b12fc385117 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 @@ -0,0 +1,126 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_speed = '100G' %} +{% set default_ports_num = 64 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % port_idx) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, + "BUFFER_POOL": { + "ingress_lossless_lossy_pool": { + "size": "10443264", + "type": "ingress", + "mode": "dynamic", + "xoff": "4625920" + }, + "egress_lossy_pool": { + "size": "8877440", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "15982592", + "type": "egress", + "mode": "static" + } + }, + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool": "[BUFFER_POOL|ingress_lossless_lossy_pool]", + "xon": "4096", + "xoff": "58448", + "size": "1248", + "dynamic_th": "-4" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"1518", + "static_th":"3995648" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"1518", + "dynamic_th":"3" + } + }, + "BUFFER_PG": { + "{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" + }, + "{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" + }, + "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { + "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" + }, + "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { + "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/pg_profile_lookup.ini @@ -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 diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2740-r0/ACS-MSN2740/pg_profile_lookup.ini @@ -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 diff --git a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 b/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 deleted file mode 100644 index 579832ecda1..00000000000 --- a/dockers/docker-orchagent/msn27xx.32ports.buffers.json.j2 +++ /dev/null @@ -1,292 +0,0 @@ -[ -{% set port_names_list = [] %} -{% for port in PORT %} - {%- if port_names_list.append(port) %}{% endif %} -{% endfor %} -{% set port_names = port_names_list | join(',') %} -{% set switch_role = DEVICE_METADATA['localhost']['type'] %} -{%if switch_role == 'ToRRouter' %} -{% set ingress_lossless_pool_size = '4194304' %} -{% set ingress_lossy_pool_size = '7340032' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '7340032' %} -{% else %} -{% set ingress_lossless_pool_size = '2097152' %} -{% set ingress_lossy_pool_size = '5242880' %} -{% set egress_lossless_pool_size = '16777152' %} -{% set egress_lossy_pool_size = '5242880' %} -{%endif %} - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { - "size": "{{ ingress_lossless_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:ingress_lossy_pool": { - "size": "{{ ingress_lossy_pool_size }}", - "type": "ingress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossless_pool": { - "size": "{{ egress_lossless_pool_size }}", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossy_pool": { - "size": "{{ egress_lossy_pool_size }}", - "type": "egress", - "mode": "dynamic" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "size":"0", - "dynamic_th":"0" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"4096", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:pg_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", - "size":"0", - "dynamic_th":"7" - }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", - "size":"0", - "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_INGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_EGRESS_PROFILE_LIST:{{ port_names }}": { - "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" - }, - "OP": "SET" - }, - -{# The following template part is for variable PG profile configuration #} -{% set pg_range = '3-4' %} -{# Lists of supported speed and cable length #} -{% set supported_speed = [10000, 25000, 40000, 50000, 100000] %} -{% set supported_cable = [5, 40, 300] %} - -{# The key in this lictionary consist of two parts: (port speed)_(cable length) #} -{%- set portconfig2profile = { - '10000_5' : 'pg_lossless_10G_5m_profile', - '25000_5' : 'pg_lossless_25G_5m_profile', - '40000_5' : 'pg_lossless_40G_5m_profile', - '50000_5' : 'pg_lossless_50G_5m_profile', - '100000_5' : 'pg_lossless_100G_5m_profile', - - '10000_40' : 'pg_lossless_10G_40m_profile', - '25000_40' : 'pg_lossless_25G_40m_profile', - '40000_40' : 'pg_lossless_40G_40m_profile', - '50000_40' : 'pg_lossless_50G_40m_profile', - '100000_40' : 'pg_lossless_100G_40m_profile', - - '10000_300' : 'pg_lossless_10G_300m_profile', - '25000_300' : 'pg_lossless_25G_300m_profile', - '40000_300' : 'pg_lossless_40G_300m_profile', - '50000_300' : 'pg_lossless_50G_300m_profile', - '100000_300': 'pg_lossless_100G_300m_profile' - } --%} - -{# PG profiles. All profiles reffered in portconfig2profile dictionary should be declared here #} -{# Only those which were actually used will be created in SAI #} -{%- set pg_profiles = { - 'pg_lossless_10G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_25G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_40G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_50G_5m_profile': { 'xon': 18432, 'xoff': 16384, 'size': 34816, 'dynamic_th': 0 }, - 'pg_lossless_100G_5m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, - - 'pg_lossless_10G_40m_profile': { 'xon': 18432, 'xoff': 18432, 'size': 36864, 'dynamic_th': 0 }, - 'pg_lossless_25G_40m_profile': { 'xon': 18432, 'xoff': 21504, 'size': 39936, 'dynamic_th': 0 }, - 'pg_lossless_40G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, - 'pg_lossless_50G_40m_profile': { 'xon': 18432, 'xoff': 23552, 'size': 41984, 'dynamic_th': 0 }, - 'pg_lossless_100G_40m_profile': { 'xon': 18432, 'xoff': 35840, 'size': 54272, 'dynamic_th': 0 }, - - 'pg_lossless_10G_300m_profile': { 'xon': 18432, 'xoff': 30720, 'size': 49152, 'dynamic_th': 0 }, - 'pg_lossless_25G_300m_profile': { 'xon': 18432, 'xoff': 53248, 'size': 71680, 'dynamic_th': 0 }, - 'pg_lossless_40G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, - 'pg_lossless_50G_300m_profile': { 'xon': 18432, 'xoff': 75776, 'size': 94208, 'dynamic_th': 0 }, - 'pg_lossless_100G_300m_profile':{ 'xon': 18432, 'xoff': 165888,'size': 184320,'dynamic_th': 0 }, - } --%} - -{# Port configuration to cable length look-up table #} -{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} -{# Roles described in the minigraph #} -{% set ports2cable = { - 'ToRRouter_Server' : '5', - 'LeafRouter_ToRRouter' : '40', - 'SpineRouter_LeafRouter' : '300' - } -%} - -{% macro cable_length(port_name) -%} - {%- set cable_len = [] -%} - {%- for local_port in DEVICE_NEIGHBOR -%} - {%- if local_port == port_name -%} - {%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} - {%- set neighbor_role = neighbor.type -%} - {%- set roles1 = switch_role + '_' + neighbor_role %} - {%- set roles2 = neighbor_role + '_' + switch_role -%} - {%- if roles1 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} - {%- elif roles2 in ports2cable -%} - {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} - {%- endif -%} - {% endif %} - {% endif %} - {%- endfor -%} - {%- if cable_len -%} - {{ cable_len.0 }} - {%- else -%} - {{ supported_cable | last }} - {%- endif -%} -{% endmacro %} - -{%- macro find_closest_greater_config(speed, cable) -%} -{%- set new_speed = [] -%} -{%- for std_speed in supported_speed -%} - {%- if std_speed | int >= speed | int -%} - {%- if new_speed.append(std_speed) -%}{%- endif -%} - {% endif -%} -{%- endfor -%} -{%- set new_cable = [] -%} -{%- for std_cable in supported_cable -%} - {% if std_cable | int >= cable | int -%} - {%- if new_cable.append(std_cable) -%}{%- endif -%} - {% endif %} -{%- endfor -%} -{{ new_speed.0 }}_{{ new_cable.0 }} -{%- endmacro -%} - -{% set used_pg_profiles = [] %} -{% for port in PORT %} - {%- if PORT[port].speed -%} - {%- set speed = PORT[port]['speed'] -%} - {% else %} - {%- set speed = supported_speed|last -%} - {%- endif -%} - {%- set cable = cable_length(port) -%} - {%- set port_config = speed|string + '_' + cable -%} - {%- if not port_config in portconfig2profile -%} - {% set port_config = find_closest_greater_config(speed, cable) -%} - {%- endif -%} - {% set profile = portconfig2profile[port_config] -%} - {# add to list profiles which were actually used #} - {%- if profile not in used_pg_profiles and used_pg_profiles.append(profile) %}{% endif %} - { - "BUFFER_PG_TABLE:{{ port }}:{{ pg_range }}": { - "profile" : "[BUFFER_PROFILE_TABLE:{{ profile }}]" - }, - "OP": "SET" - }, -{% endfor -%} - -{# PG profiles declaration #} - -{% for profile_name in used_pg_profiles %} - {%- set profile_config = pg_profiles[profile_name] %} - { - "BUFFER_PROFILE_TABLE:{{ profile_name }}": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "xon":"{{ profile_config['xon'] }}", - "xoff":"{{ profile_config['xoff'] }}", - "size":"{{ profile_config['size'] }}", - "dynamic_th":"{{ profile_config['dynamic_th'] }}" - }, - "OP": "SET" - }, -{% endfor %} - { - "BUFFER_PG_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" - }, - "OP": "SET" - }, - { - "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { - "0": "0", - "1": "1", - "3": "3", - "4": "4" - }, - "OP": "SET" - }, - { - "PORT_QOS_MAP_TABLE:{{ port_names }}": { - "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" - }, - "OP": "SET" - } -] diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2 index e0438998114..b10d4d58a43 100644 --- a/dockers/docker-orchagent/ports.json.j2 +++ b/dockers/docker-orchagent/ports.json.j2 @@ -1,7 +1,12 @@ [ +{% set ports_with_speed_set=[] %} {% if PORT %} {% for port in PORT %} {% if PORT[port].has_key('speed') %} + {%- if ports_with_speed_set.append(port) -%}{%- endif -%} +{%- endif -%} +{% endfor %} +{% for port in ports_with_speed_set %} { "PORT_TABLE:{{ port }}": { "speed": "{{ PORT[port]['speed'] }}", @@ -10,7 +15,6 @@ "OP": "SET" }{% if not loop.last %},{% endif %} -{% endif %} {% endfor %} {% endif %} ] diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh index dfdb5b897bb..80ccac913ff 100755 --- a/dockers/docker-orchagent/start.sh +++ b/dockers/docker-orchagent/start.sh @@ -26,6 +26,8 @@ supervisorctl start vlanmgrd supervisorctl start intfmgrd +supervisorctl start buffermgrd + # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index 95e92be622b..84beaed440a 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -83,3 +83,11 @@ autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog + +[program:buffermgrd] +command=/usr/bin/buffermgrd -l /usr/share/sonic/hwsku/pg_profile_lookup.ini +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh index 959b6714d27..6dd3486ee3b 100755 --- a/dockers/docker-orchagent/swssconfig.sh +++ b/dockers/docker-orchagent/swssconfig.sh @@ -37,9 +37,6 @@ elif [ "$HWSKU" == "Force10-S6100" ]; then SWSSCONFIG_ARGS+="th.64ports.buffers.json th.64ports.qos.json " elif [ "$HWSKU" == "Arista-7050-QX32" ]; then SWSSCONFIG_ARGS+="td2.32ports.buffers.json td2.32ports.qos.json " -elif [[ "$HWSKU" == "ACS-MSN27"* ]] || [[ "$HWSKU" == "Mellanox-SN2700" ]]; then - sonic-cfggen -d -t /usr/share/sonic/templates/msn27xx.32ports.buffers.json.j2 > /etc/swss/config.d/msn27xx.32ports.buffers.json - SWSSCONFIG_ARGS+="msn27xx.32ports.buffers.json " fi for file in $SWSSCONFIG_ARGS; do diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 436a7de9071..a78c07d93b4 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -112,15 +112,23 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then else # Use default minigraph.xml cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/ - HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` - if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then - # merge qos configuration into init config file - sonic-cfggen -j /etc/sonic/init_cfg.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/init_cfg.json - mv /tmp/init_cfg.json /etc/sonic/init_cfg.json - fi sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json fi + HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` + if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then + # merge qos configuration into init config file + sonic-cfggen -j /etc/sonic/config_db.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/config_db.json + mv /tmp/config_db.json /etc/sonic/config_db.json + fi + + if [ -f /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 ]; then + # generate and merge buffers configuration into config file + sonic-cfggen -m -t /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 > /tmp/buffers.json + sonic-cfggen -j /etc/sonic/config_db.json -j /tmp/buffers.json --print-data > /tmp/config_db.json + mv /tmp/config_db.json /etc/sonic/config_db.json + fi + if [ -d /host/image-$sonic_version/platform/$platform ]; then dpkg -i /host/image-$sonic_version/platform/$platform/*.deb fi diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index a26c3f475fa..7599059164c 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -70,6 +70,8 @@ RUN sed -ri 's/^(save .*$)/# \1/g; COPY ["50-default.conf", "/etc/rsyslog.d/"] COPY ["start.sh", "orchagent.sh", "/usr/bin/"] COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"] +COPY ["buffers.json.j2", "/usr/share/sonic/device/vswitch/"] +COPY ["pg_profile_lookup.ini", "/usr/share/sonic/device/vswitch/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"] COPY ["files/arp_update", "/usr/bin"] diff --git a/platform/vs/docker-sonic-vs/buffers.json.j2 b/platform/vs/docker-sonic-vs/buffers.json.j2 new file mode 100644 index 00000000000..da9c764db92 --- /dev/null +++ b/platform/vs/docker-sonic-vs/buffers.json.j2 @@ -0,0 +1,162 @@ +{# Default values which will be used if no actual configura available #} +{% set default_cable = '300m' %} +{% set default_ports_num = 32 -%} + +{# Port configuration to cable length look-up table #} +{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #} +{# Roles described in the minigraph #} +{% set ports2cable = { + 'torrouter_server' : '5m', + 'leafrouter_torrouter' : '40m', + 'spinerouter_leafrouter' : '300m' + } +%} + +{%- macro cable_length(port_name) -%} + {%- set cable_len = [] -%} + {%- for local_port in DEVICE_NEIGHBOR -%} + {%- if local_port == port_name -%} + {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] -%} + {%- set neighbor_role = neighbor.type -%} + {%- set roles1 = switch_role + '_' + neighbor_role %} + {%- set roles2 = neighbor_role + '_' + switch_role -%} + {%- set roles1 = roles1 | lower -%} + {%- set roles2 = roles2 | lower -%} + {%- if roles1 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles1]) -%}{%- endif -%} + {%- elif roles2 in ports2cable -%} + {%- if cable_len.append(ports2cable[roles2]) -%}{%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endif -%} + {%- endfor -%} + {%- if cable_len -%} + {{ cable_len.0 }} + {%- else -%} + {{ default_cable }} + {%- endif -%} +{% endmacro %} + +{%- if DEVICE_METADATA is defined %} +{%- set switch_role = DEVICE_METADATA['localhost']['type'] %} +{%- endif -%} + +{# Generate list of ports if not defined #} +{% if PORT is not defined %} + {% set PORT = [] %} + {% for port_idx in range(0,default_ports_num) %} + {% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %} + {% endfor %} +{% endif -%} + +{% set port_names_list = [] %} +{% for port in PORT %} + {%- if port_names_list.append(port) %}{% endif %} +{% endfor %} +{% set port_names = port_names_list | join(',') -%} + +{ + "CABLE_LENGTH": { + "AZURE": { + {% for port in PORT %} + {% set cable = cable_length(port) -%} + "{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %} + + {% endfor %} + } + }, +{%if switch_role == 'ToRRouter' %} +{% set ingress_lossless_pool_size = '4194304' %} +{% set ingress_lossy_pool_size = '7340032' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '7340032' %} +{% else %} +{% set ingress_lossless_pool_size = '2097152' %} +{% set ingress_lossy_pool_size = '5242880' %} +{% set egress_lossless_pool_size = '16777152' %} +{% set egress_lossy_pool_size = '5242880' %} +{%endif %} + "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":"0", + "dynamic_th":"0" + }, + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"4096", + "dynamic_th":"3" + }, + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + }, + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", + "size":"0", + "dynamic_th":"7" + }, + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", + "size":"0", + "dynamic_th":"3" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "{{ port_names }}": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "{{ port_names }}|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } + } +} diff --git a/platform/vs/docker-sonic-vs/pg_profile_lookup.ini b/platform/vs/docker-sonic-vs/pg_profile_lookup.ini new file mode 100644 index 00000000000..b66b129fe43 --- /dev/null +++ b/platform/vs/docker-sonic-vs/pg_profile_lookup.ini @@ -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 diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 876bfd83572..9df6f9f5ad3 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -11,7 +11,9 @@ if [ -f /etc/sonic/config_db.json ]; then sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --print-data > /tmp/config_db.json mv /tmp/config_db.json /etc/sonic/config_db.json else - sonic-cfggen -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json + # generate and merge buffers configuration into config file + sonic-cfggen -t /usr/share/sonic/device/vswitch/buffers.json.j2 > /tmp/buffers.json + sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json --print-data > /etc/sonic/config_db.json fi mkdir -p /etc/swss/config.d/ @@ -52,6 +54,8 @@ supervisorctl start vlanmgrd supervisorctl start zebra +supervisorctl start buffermgrd + # Start arp_update when VLAN exists VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` if [ "$VLAN" != "" ]; then diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf index 2526aefe3a8..fc425142db7 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf +++ b/platform/vs/docker-sonic-vs/supervisord.conf @@ -122,3 +122,11 @@ autostart=false autorestart=true stdout_logfile=syslog stderr_logfile=syslog + +[program:buffermgrd] +command=/usr/bin/buffermgrd -l /usr/share/sonic/device/vswitch/pg_profile_lookup.ini +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json index a1e8e1486d6..2a878c95f2c 100644 --- a/src/sonic-config-engine/tests/sample_output/msn27.32ports.json +++ b/src/sonic-config-engine/tests/sample_output/msn27.32ports.json @@ -1,341 +1,120 @@ -[ - { - "BUFFER_POOL_TABLE:ingress_lossless_pool": { +{ + "CABLE_LENGTH": { + "AZURE": { + "Ethernet8": "300m", + "Ethernet0": "300m", + "Ethernet4": "300m", + "Ethernet108": "300m", + "Ethernet100": "300m", + "Ethernet104": "300m", + "Ethernet68": "300m", + "Ethernet96": "300m", + "Ethernet124": "300m", + "Ethernet92": "300m", + "Ethernet120": "300m", + "Ethernet52": "300m", + "Ethernet56": "300m", + "Ethernet76": "300m", + "Ethernet72": "300m", + "Ethernet64": "300m", + "Ethernet32": "300m", + "Ethernet16": "300m", + "Ethernet36": "300m", + "Ethernet12": "300m", + "Ethernet88": "300m", + "Ethernet116": "300m", + "Ethernet80": "300m", + "Ethernet112": "300m", + "Ethernet84": "300m", + "Ethernet48": "300m", + "Ethernet44": "300m", + "Ethernet40": "300m", + "Ethernet28": "300m", + "Ethernet60": "300m", + "Ethernet20": "300m", + "Ethernet24": "300m" + } + }, + "BUFFER_POOL": { + "ingress_lossless_pool": { "size": "2097152", "type": "ingress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:ingress_lossy_pool": { + "ingress_lossy_pool": { "size": "5242880", "type": "ingress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossless_pool": { + "egress_lossless_pool": { "size": "16777152", "type": "egress", "mode": "dynamic" }, - "OP": "SET" - }, - { - "BUFFER_POOL_TABLE:egress_lossy_pool": { + "egress_lossy_pool": { "size": "5242880", "type": "egress", "mode": "dynamic" - }, - "OP": "SET" + } }, - { - "BUFFER_PROFILE_TABLE:ingress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", + "BUFFER_PROFILE": { + "ingress_lossless_profile": { + "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"0", "dynamic_th":"0" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:ingress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "ingress_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "egress_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:egress_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "egress_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", "size":"4096", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:pg_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossy_pool]", + "pg_lossy_profile": { + "pool":"[BUFFER_POOL|ingress_lossy_pool]", "size":"0", "dynamic_th":"3" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossless_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossless_pool]", + "q_lossless_profile": { + "pool":"[BUFFER_POOL|egress_lossless_pool]", "size":"0", "dynamic_th":"7" }, - "OP": "SET" - }, - { - "BUFFER_PROFILE_TABLE:q_lossy_profile": { - "pool":"[BUFFER_POOL_TABLE:egress_lossy_pool]", + "q_lossy_profile": { + "pool":"[BUFFER_POOL|egress_lossy_pool]", "size":"0", "dynamic_th":"3" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_INGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE_TABLE:ingress_lossless_profile],[BUFFER_PROFILE_TABLE:ingress_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PORT_EGRESS_PROFILE_LIST:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "profile_list" : "[BUFFER_PROFILE_TABLE:egress_lossless_profile],[BUFFER_PROFILE_TABLE:egress_lossy_profile]" - }, - "OP": "SET" - }, - - - - { - "BUFFER_PG_TABLE:Ethernet8:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet0:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet4:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet108:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet100:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet104:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet68:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet96:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet124:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet92:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet120:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet52:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet56:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet76:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet72:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet64:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet32:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet16:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet36:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet12:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet88:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet116:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet80:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet112:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet84:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet48:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet44:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet40:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet28:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet60:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet20:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet24:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile]" - }, - "OP": "SET" - }, - - { - "BUFFER_PROFILE_TABLE:pg_lossless_40G_300m_profile": { - "pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]", - "xon":"18432", - "xoff":"75776", - "size":"94208", - "dynamic_th":"0" - }, - "OP": "SET" - }, - { - "BUFFER_PG_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:pg_lossy_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:3-4": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossless_profile]" - }, - "OP": "SET" - }, - { - "BUFFER_QUEUE_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24:0-1": { - "profile" : "[BUFFER_PROFILE_TABLE:q_lossy_profile]" - }, - "OP": "SET" - }, - { - "PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE": { - "0": "0", - "1": "1", - "3": "3", - "4": "4" - }, - "OP": "SET" - }, - { - "PORT_QOS_MAP_TABLE:Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { - "pfc_to_pg_map" : "[PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE:AZURE]" - }, - "OP": "SET" + } + }, + "BUFFER_PORT_INGRESS_PROFILE_LIST": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE|ingress_lossless_profile],[BUFFER_PROFILE|ingress_lossy_profile]" + } + }, + "BUFFER_PORT_EGRESS_PROFILE_LIST": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24": { + "profile_list" : "[BUFFER_PROFILE|egress_lossless_profile],[BUFFER_PROFILE|egress_lossy_profile]" + } + }, + "BUFFER_PG": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { + "profile" : "[BUFFER_PROFILE|pg_lossy_profile]" + } + }, + "BUFFER_QUEUE": { + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|3-4": { + "profile" : "[BUFFER_PROFILE|q_lossless_profile]" + }, + "Ethernet8,Ethernet0,Ethernet4,Ethernet108,Ethernet100,Ethernet104,Ethernet68,Ethernet96,Ethernet124,Ethernet92,Ethernet120,Ethernet52,Ethernet56,Ethernet76,Ethernet72,Ethernet64,Ethernet32,Ethernet16,Ethernet36,Ethernet12,Ethernet88,Ethernet116,Ethernet80,Ethernet112,Ethernet84,Ethernet48,Ethernet44,Ethernet40,Ethernet28,Ethernet60,Ethernet20,Ethernet24|0-1": { + "profile" : "[BUFFER_PROFILE|q_lossy_profile]" + } } -] +} diff --git a/src/sonic-config-engine/tests/sample_output/ports.json b/src/sonic-config-engine/tests/sample_output/ports.json index 216627ef34c..6536c620f8c 100644 --- a/src/sonic-config-engine/tests/sample_output/ports.json +++ b/src/sonic-config-engine/tests/sample_output/ports.json @@ -26,5 +26,5 @@ "description": "Interface description" }, "OP": "SET" - }, + } ] diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index ce96ab425c8..5afd1149979 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -85,7 +85,7 @@ def test_ipinip(self): assert filecmp.cmp(sample_output_file, self.output_file) def test_msn27xx_32ports_buffers(self): - buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-orchagent', 'msn27xx.32ports.buffers.json.j2') + buffer_file = os.path.join(self.test_dir, '..', '..', '..', 'device', 'mellanox', 'x86_64-mlnx_msn2700-r0', 'ACS-MSN2700', 'buffers.json.j2') argument = '-m ' + self.t1_mlnx_minigraph + ' -p ' + self.mlnx_port_config + ' -t ' + buffer_file + ' > ' + self.output_file self.run_script(argument) @@ -93,7 +93,6 @@ def test_msn27xx_32ports_buffers(self): self.assertTrue(filecmp.cmp(sample_output_file, self.output_file)) - def tearDown(self): try: os.remove(self.output_file) diff --git a/src/sonic-swss b/src/sonic-swss index fbe781de821..60a90d76287 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit fbe781de82197304d6622736271649d4ac10de67 +Subproject commit 60a90d762876955116f6f4a0ec47b2ca2c6f57ed diff --git a/src/sonic-swss-common b/src/sonic-swss-common index aa55f69a9b5..04b8b84ab6d 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit aa55f69a9b53588d1de872f2d6f15384659f1a36 +Subproject commit 04b8b84ab6d66c97d7d727ac80a431b7ba85cf57 diff --git a/src/sonic-utilities b/src/sonic-utilities index 26c3709786a..17e0bf9be5f 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 26c3709786a4072625d7f3ebb9f2e52d798a3ba0 +Subproject commit 17e0bf9be5f16ba301f30d3354e7554b49fd61e5 From 43554c8b1a98f8c5747a823d4ac30e258a87d224 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Mon, 29 Jan 2018 18:14:01 +0200 Subject: [PATCH 063/254] [slave.mk]: Clear deb_dist directory (#1344) Python packages, having their version changed, will fail to build because deb_dist directory contains both build directories for old and new version, and (for some uncleaer reason) debian utilities don't know which one to choose. Signed-off-by: marian-pritsak --- slave.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/slave.mk b/slave.mk index 4309d882a5d..477fd253161 100644 --- a/slave.mk +++ b/slave.mk @@ -235,6 +235,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_PYTHON_STDEB_DEBS)) : $(DEBS_PATH)/% : .platf if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi # Build project pushd $($*_SRC_PATH) $(LOG) + rm -rf deb_dist/* $(LOG) python setup.py --command-packages=stdeb.command bdist_deb $(LOG) popd $(LOG) # Clean up From a8a4c7b9aef5cdaf26ce89b678ae12ddc5862a34 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Mon, 29 Jan 2018 10:08:10 -0800 Subject: [PATCH 064/254] [device]: Remove unused qos.json files (#1315) --- .../Arista-7050-QX32/qos.json | 156 ------------------ .../Force10-S6000/qos.json | 156 ------------------ .../Force10-S6100/qos.json | 156 ------------------ 3 files changed, 468 deletions(-) delete mode 100644 device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json delete mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json delete mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json deleted file mode 100644 index 2539513d8e1..00000000000 --- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "TC_TO_PRIORITY_GROUP_MAP": { - "AZURE": { - "0": "0", - "1": "1", - "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" - } - }, - "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_enable": "3,4" - } - }, - "WRED_PROFILE": { - "AZURE_LOSSY": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - }, - "AZURE_LOSSLESS": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "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-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]" - }, - "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]" - } - } -} diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json b/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json deleted file mode 100644 index 2539513d8e1..00000000000 --- a/device/dell/x86_64-dell_s6000_s1220-r0/Force10-S6000/qos.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "TC_TO_PRIORITY_GROUP_MAP": { - "AZURE": { - "0": "0", - "1": "1", - "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" - } - }, - "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_enable": "3,4" - } - }, - "WRED_PROFILE": { - "AZURE_LOSSY": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - }, - "AZURE_LOSSLESS": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "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-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]" - }, - "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]" - } - } -} diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json deleted file mode 100644 index 32f337770c0..00000000000 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/qos.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "TC_TO_PRIORITY_GROUP_MAP": { - "AZURE": { - "0": "0", - "1": "1", - "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" - } - }, - "PORT_QOS_MAP": { - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63": { - "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_enable": "3,4" - } - }, - "WRED_PROFILE": { - "AZURE_LOSSY": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - }, - "AZURE_LOSSLESS": { - "wred_green_enable":"true", - "wred_yellow_enable":"true", - "ecn":"ecn_all", - "red_max_threshold":"512000", - "red_min_threshold":"512000", - "yellow_max_threshold":"512000", - "yellow_min_threshold":"512000", - "green_max_threshold": "184320", - "green_min_threshold": "184320" - } - }, - "QUEUE": { - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:0-1" : { - "wred_profile" : "[WRED_PROFILE:AZURE]" - }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:3-4" : { - "scheduler" : "[SCHEDULER:scheduler.0]", - "wred_profile" : "[WRED_PROFILE|AZURE_LOSSLESS]" - }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:0" : { - "scheduler" : "[SCHEDULER:scheduler.1]" - }, - "Ethernet0,Ethernet1,Ethernet2,Ethernet3,Ethernet4,Ethernet5,Ethernet6,Ethernet7,Ethernet8,Ethernet9,Ethernet10,Ethernet11,Ethernet12,Ethernet13,Ethernet14,Ethernet15,Ethernet16,Ethernet17,Ethernet18,Ethernet19,Ethernet20,Ethernet21,Ethernet22,Ethernet23,Ethernet24,Ethernet25,Ethernet26,Ethernet27,Ethernet28,Ethernet29,Ethernet30,Ethernet31,Ethernet32,Ethernet33,Ethernet34,Ethernet35,Ethernet36,Ethernet37,Ethernet38,Ethernet39,Ethernet40,Ethernet41,Ethernet42,Ethernet43,Ethernet44,Ethernet45,Ethernet46,Ethernet47,Ethernet48,Ethernet49,Ethernet50,Ethernet51,Ethernet52,Ethernet53,Ethernet54,Ethernet55,Ethernet56,Ethernet57,Ethernet58,Ethernet59,Ethernet60,Ethernet61,Ethernet62,Ethernet63:1" : { - "scheduler" : "[SCHEDULER:scheduler.2]" - } - } -} From bdbf956dec9acb6612a8e856b21e7aaca76e018d Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Mon, 29 Jan 2018 11:08:32 -0800 Subject: [PATCH 065/254] [sonic-utilities] Update submodule (#1346) --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 17e0bf9be5f..71c696eaf7d 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 17e0bf9be5f16ba301f30d3354e7554b49fd61e5 +Subproject commit 71c696eaf7dd0f974f64b69463dac4653db74cb8 From 1d0a57a465e70c36162a10ccfc642741b7dfadc2 Mon Sep 17 00:00:00 2001 From: lguohan Date: Mon, 29 Jan 2018 11:21:30 -0800 Subject: [PATCH 066/254] [dell]: add psuutil support for s6000 (#1342) also remove w83627dhg as it raises false alarm. --- .../plugins/psuutil.py | 74 +++++++++++++++++++ .../x86_64-dell_s6000_s1220-r0/sensors.conf | 21 ------ .../broadcom/sonic-platform-modules-s6000 | 2 +- 3 files changed, 75 insertions(+), 22 deletions(-) create mode 100644 device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py new file mode 100644 index 00000000000..537605f3975 --- /dev/null +++ b/device/dell/x86_64-dell_s6000_s1220-r0/plugins/psuutil.py @@ -0,0 +1,74 @@ +# +# 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_cpld_register(self, reg_name): + cpld_dir = "/sys/devices/platform/dell-s6000-cpld.0" + retval = 'ERR' + reg_file = cpld_dir +'/' + reg_name + if (not os.path.isfile(reg_file)): + return retval + + try: + with open(reg_file, 'r') as fd: + retval = fd.read() + except Exception as error: + logging.error("Unable to open ", reg_file, "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 + """ + S6000_MAX_PSUS = 2 + return S6000_MAX_PSUS + + def get_psu_status(self, index): + """ + Retrieves the oprational status of power supply unit (PSU) defined + by 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 + psu_status = self.get_cpld_register('psu'+str(index - 1)+'_status') + if (psu_status != 'ERR'): + status = int(psu_status, 10) + + presence = self.get_psu_presence(index) + + return (status & presence) + + def get_psu_presence(self, index): + """ + Retrieves the presence status of power supply unit (PSU) defined + by 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 + psu_presence = self.get_cpld_register('psu'+str(index - 1)+'_prs') + if (psu_presence != 'ERR'): + status = int(psu_presence, 10) + + return status diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf b/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf index 2208bb6340d..c87af11afac 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf +++ b/device/dell/x86_64-dell_s6000_s1220-r0/sensors.conf @@ -27,27 +27,6 @@ chip "max6620-i2c-*-2a" ignore fan3 ignore fan4 -chip "w83627dhg-*" - label in0 "VCore 1" - label in1 "VCore 2" - set in0_min 0 - set in0_max 1.74 - set in1_min 0 - set in1_max 1.74 - ignore fan1 - ignore fan2 - ignore fan3 - ignore fan4 - ignore fan5 - ignore in4 - ignore in5 - ignore in6 - ignore temp1 - ignore temp2 - ignore temp3 - ignore cpu0_vid - ignore intrusion0 - chip "jc42-*" set temp1_max 50 set temp1_crit 85 diff --git a/platform/broadcom/sonic-platform-modules-s6000 b/platform/broadcom/sonic-platform-modules-s6000 index 1f6c70e7db8..952208ce52d 160000 --- a/platform/broadcom/sonic-platform-modules-s6000 +++ b/platform/broadcom/sonic-platform-modules-s6000 @@ -1 +1 @@ -Subproject commit 1f6c70e7db890851510a36892b602c534e4f41a7 +Subproject commit 952208ce52d88095da9591cc548d1e013f363476 From 474b3f08e7bd20efdb5d4a7fe3fc47d45c25b37a Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Mon, 29 Jan 2018 16:26:54 -0800 Subject: [PATCH 067/254] [dhcp_relay] make dhcp_relay service depends on teamd as well (#1348) When teamd service restarted, the port channels will be recreated. Dhcp relay service needs to be restarted after that to listen on the right port channels. --- files/build_templates/dhcp_relay.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/dhcp_relay.service.j2 b/files/build_templates/dhcp_relay.service.j2 index c1499c8f879..ff43a3c2d02 100644 --- a/files/build_templates/dhcp_relay.service.j2 +++ b/files/build_templates/dhcp_relay.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=DHCP relay container -Requires=docker.service +Requires=docker.service teamd.service After=swss.service [Service] From 26efb653fc884c4bb79de8e811c354e19280f0d0 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Mon, 29 Jan 2018 18:08:10 -0800 Subject: [PATCH 068/254] [snmpagent]: update sonic-snmpagent submodule (#1350) Signed-off-by: Qi Luo --- src/sonic-snmpagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index d60afe1810e..9a7a70ca2a5 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit d60afe1810e1bd6ed7b68718b905f8bfe4ac39c4 +Subproject commit 9a7a70ca2a50907f30181209f666fc685973d592 From 91effa249c5d4b1ce048bdf9c129efb5dafb3d5a Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Tue, 30 Jan 2018 09:13:23 -0800 Subject: [PATCH 069/254] Submodule update (#1351) --- src/sonic-py-swsssdk | 2 +- src/sonic-snmpagent | 2 +- src/sonic-utilities | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index cd4cb2784a9..93010e14c89 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit cd4cb2784a9ccbb77d60575e2e2befa7a9cbe925 +Subproject commit 93010e14c89e62b35553f1b5cf59af0c564d3055 diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index 9a7a70ca2a5..12bc0e0c984 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit 9a7a70ca2a50907f30181209f666fc685973d592 +Subproject commit 12bc0e0c98432eb21add3b547e13bcf10e77ab51 diff --git a/src/sonic-utilities b/src/sonic-utilities index 71c696eaf7d..ce9a36e7d45 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 71c696eaf7dd0f974f64b69463dac4653db74cb8 +Subproject commit ce9a36e7d459025bc0d39d744c078f60989f3556 From 8cf03b0b2846d63c1fcd30cc04ea93c446695a61 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 30 Jan 2018 11:19:03 -0800 Subject: [PATCH 070/254] [sonic-cfggen] Enhance ACL unit test to also test control plane (service) ACLs (#1349) --- .../tests/pc-test-graph.xml | 10 +++- .../tests/simple-sample-graph.xml | 10 +++- .../tests/t0-sample-acl.json | 57 +++++++++++++++++++ .../tests/t0-sample-bgp-speaker.xml | 10 +++- .../tests/t0-sample-graph.xml | 10 +++- src/sonic-config-engine/tests/test_cfggen.py | 3 +- 6 files changed, 87 insertions(+), 13 deletions(-) diff --git a/src/sonic-config-engine/tests/pc-test-graph.xml b/src/sonic-config-engine/tests/pc-test-graph.xml index 2cb281b879c..6709d65c496 100644 --- a/src/sonic-config-engine/tests/pc-test-graph.xml +++ b/src/sonic-config-engine/tests/pc-test-graph.xml @@ -134,10 +134,14 @@ - - PortChannel01;PortChannel02;PortChannel03;PortChannel04 - + PortChannel01;PortChannel02;PortChannel03;PortChannel04 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index d3bc2527228..4062cd7ae0c 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -166,10 +166,14 @@ - - PortChannel01 - + PortChannel01 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP diff --git a/src/sonic-config-engine/tests/t0-sample-acl.json b/src/sonic-config-engine/tests/t0-sample-acl.json index 4157a1701b6..1caf2ff0295 100644 --- a/src/sonic-config-engine/tests/t0-sample-acl.json +++ b/src/sonic-config-engine/tests/t0-sample-acl.json @@ -112,6 +112,63 @@ "config": { "name": "everflow" } + }, + "SNMP-ACL": { + "acl-entries": { + "acl-entry": { + "1": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 1 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "10.0.0.0/8" + } + } + }, + "2": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 2 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "100.64.0.0/10" + } + } + }, + "3": { + "actions": { + "config": { + "forwarding-action": "ACCEPT" + } + }, + "config": { + "sequence-id": 3 + }, + "ip": { + "config": { + "protocol": "IP_UDP", + "source-ip-address": "25.0.0.0/8" + } + } + } + } + }, + "config": { + "name": "SNMP-ACL" + } } } } diff --git a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml index 18a8baccdae..f2690985d9f 100644 --- a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml +++ b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml @@ -259,10 +259,14 @@ - - PortChannel01;PortChannel02;PortChannel03;PortChannel04 - + PortChannel01;PortChannel02;PortChannel03;PortChannel04 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index fe0b1a1e250..f3d05cbc22c 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -262,10 +262,14 @@ - - PortChannel01;PortChannel02;PortChannel03;PortChannel04 - + PortChannel01;PortChannel02;PortChannel03;PortChannel04 DataAcl + DataPlane + + + SNMP + SNMP_ACL + SNMP diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 2eee6fe331c..9c9b31abf20 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -73,7 +73,8 @@ def test_render_template(self): def test_minigraph_acl(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v ACL_TABLE' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") + self.assertEqual(output.strip(), "{'SNMP_ACL': {'type': 'CTRLPLANE', 'policy_desc': 'SNMP_ACL', 'service': 'SNMP', 'ports': []}," + " 'DATAACL': {'type': 'L3', 'policy_desc': 'DATAACL', 'ports': ['Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124']}}") def test_minigraph_everflow(self): argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v MIRROR_SESSION' From 175bae84b9e733796c0a2a5849fbd689548f7226 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Tue, 30 Jan 2018 11:54:58 -0800 Subject: [PATCH 071/254] Remove /var/run/rsyslogd.pid otherwise rsyslogd will not start in database container (#1355) --- dockers/docker-database/supervisord.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-database/supervisord.conf b/dockers/docker-database/supervisord.conf index 8237ea87679..f095e78bc14 100644 --- a/dockers/docker-database/supervisord.conf +++ b/dockers/docker-database/supervisord.conf @@ -4,7 +4,7 @@ logfile_backups=2 nodaemon=true [program:rsyslogd] -command=/usr/sbin/rsyslogd -n +command=/bin/bash -c "rm -f /var/run/rsyslogd.pid && /usr/sbin/rsyslogd -n" priority=1 autostart=true autorestart=false From a36527a6a57d6f72207a19962208812adc4e9864 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Tue, 30 Jan 2018 15:04:52 -0800 Subject: [PATCH 072/254] Store ConfigDB init indicator boolean value as 1/0 in Redis to be language-agnostic (#1352) --- files/scripts/configdb-load.sh | 3 +-- src/sonic-utilities | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/files/scripts/configdb-load.sh b/files/scripts/configdb-load.sh index 42bb9959bca..5ba2e0e0bc7 100755 --- a/files/scripts/configdb-load.sh +++ b/files/scripts/configdb-load.sh @@ -10,5 +10,4 @@ if [ -r /etc/sonic/config_db.json ]; then sonic-cfggen -j /etc/sonic/config_db.json --write-to-db fi -echo -en "SELECT 4\nSET CONFIG_DB_INITIALIZED true" | redis-cli - +redis-cli -n 4 SET "CONFIG_DB_INITIALIZED" "1" diff --git a/src/sonic-utilities b/src/sonic-utilities index ce9a36e7d45..fe6d04328e5 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit ce9a36e7d459025bc0d39d744c078f60989f3556 +Subproject commit fe6d04328e5a1c4fdba4b35821f2d66475a9f3b0 From 673c82f9a361fbf49d129c2069c1a75c7f30a36c Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Tue, 30 Jan 2018 17:30:38 -0800 Subject: [PATCH 073/254] [dhcp_relay] complete the dhcp_relay service dependency towards teamd (#1356) This change makes sure that the dhcp_relay service will be started after teamd service is started from a stopped state. --- files/build_templates/dhcp_relay.service.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build_templates/dhcp_relay.service.j2 b/files/build_templates/dhcp_relay.service.j2 index ff43a3c2d02..966e2782abe 100644 --- a/files/build_templates/dhcp_relay.service.j2 +++ b/files/build_templates/dhcp_relay.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=DHCP relay container Requires=docker.service teamd.service -After=swss.service +After=swss.service teamd.service [Service] User={{ sonicadmin_user }} @@ -10,4 +10,4 @@ ExecStart=/usr/bin/{{ docker_container_name }}.sh attach ExecStop=/usr/bin/{{ docker_container_name }}.sh stop [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target teamd.service From 653f572f9c3580870dad237c0a80387138c89c3f Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Thu, 1 Feb 2018 00:58:02 +0800 Subject: [PATCH 074/254] [submodules]: update the pointers to pick up clear fdb cli support (#1354) --- src/sonic-sairedis | 2 +- src/sonic-swss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 36752e19ae8..a6b5be886bb 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 36752e19ae8f2709bd5d510d6e66ece73c16b71b +Subproject commit a6b5be886bb470d8ff1baf2978bbdf1a9e8cf5e0 diff --git a/src/sonic-swss b/src/sonic-swss index 60a90d76287..918cf5ad6ae 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 60a90d762876955116f6f4a0ec47b2ca2c6f57ed +Subproject commit 918cf5ad6aec6b8f7ee863386de5b0dbcc035f60 From a4a91cbd4ab897b8ef33db382f02e55fead1400f Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 31 Jan 2018 11:07:00 -0800 Subject: [PATCH 075/254] [sonic-cfggen] Add unit test for DHCP relay Jinja2 templates (#1357) --- .../docker-dhcp-relay.supervisord.conf | 33 ++++++++++++++ .../tests/sample_output/wait_for_intf.sh | 43 +++++++++++++++++++ src/sonic-config-engine/tests/test_j2files.py | 13 ++++++ 3 files changed, 89 insertions(+) create mode 100644 src/sonic-config-engine/tests/sample_output/docker-dhcp-relay.supervisord.conf create mode 100644 src/sonic-config-engine/tests/sample_output/wait_for_intf.sh diff --git a/src/sonic-config-engine/tests/sample_output/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/docker-dhcp-relay.supervisord.conf new file mode 100644 index 00000000000..f955546cdc0 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/docker-dhcp-relay.supervisord.conf @@ -0,0 +1,33 @@ +[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 + +[group:isc-dhcp-relay] +programs=isc-dhcp-relay-Vlan1000 + +[program:isc-dhcp-relay-Vlan1000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -i Vlan1000 -i PortChannel02 -i PortChannel03 -i PortChannel04 -i PortChannel01 192.0.0.1 192.0.0.2 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + + diff --git a/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh b/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh new file mode 100644 index 00000000000..3cbde972fe1 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/wait_for_intf.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +function wait_until_iface_ready +{ + IFACE=$1 + + echo "Waiting until interface $IFACE is up..." + + # Wait for the interface to come up (i.e., 'ip link show' returns 0) + until ip link show dev $IFACE up > /dev/null 2>&1; do + sleep 1 + done + + echo "Interface $IFACE is up" + + echo "Waiting until interface $IFACE has an IPv4 address..." + + # Wait until the interface gets assigned an IPv4 address + while true; do + IP=$(ip -4 addr show dev $IFACE | grep "inet " | awk '{ print $2 }' | cut -d '/' -f1) + + if [ -n "$IP" ]; then + break + fi + + sleep 1 + done + + echo "Interface $IFACE is configured with IP $IP" +} + + +# Wait for all interfaces to come up and have IPv4 addresses assigned +wait_until_iface_ready Vlan1000 +wait_until_iface_ready PortChannel04 +wait_until_iface_ready PortChannel02 +wait_until_iface_ready PortChannel03 +wait_until_iface_ready PortChannel03 +wait_until_iface_ready PortChannel01 +wait_until_iface_ready PortChannel02 +wait_until_iface_ready PortChannel04 +wait_until_iface_ready PortChannel01 + diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 5afd1149979..129c3973d7b 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -40,6 +40,19 @@ def test_ports_json(self): self.run_script(argument) self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'ports.json'), self.output_file)) + def test_dhcp_relay(self): + # Test generation of wait_for_intf.sh + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'wait_for_intf.sh.j2') + argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'wait_for_intf.sh'), self.output_file)) + + # Test generation of docker-dhcp-relay.supervisord.conf + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'docker-dhcp-relay.supervisord.conf.j2') + argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(filecmp.cmp(os.path.join(self.test_dir, 'sample_output', 'docker-dhcp-relay.supervisord.conf'), self.output_file)) + def test_lldp(self): lldpd_conf_template = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-lldp-sv2', 'lldpd.conf.j2') argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -t ' + lldpd_conf_template + ' > ' + self.output_file From 358949b4e5d245e5fc50942bb177c5fa96a7fbce Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Wed, 31 Jan 2018 11:39:48 -0800 Subject: [PATCH 076/254] Upgrade linux-image version (#1294) * Upgrade linux-image version * Add missing dependency of igb * Fix mft build rule * Add missing dependency of ixgbe * [Broadcom]: Update OpenNSL modules to be compatible with kernel 3.16.0-5 (#3) * [Nephos] Update SDK version to support new kernel module 3.16.0-5 (#4) * [mellanox]: Update URL for SDK (#5) --- build_debian.sh | 6 +++--- files/Aboot/boot0.j2 | 4 ++-- files/build_templates/swss.service.j2 | 4 ++-- installer/x86_64/install.sh | 4 ++-- platform/broadcom/sdk.mk | 4 ++-- platform/mellanox/mft.mk | 2 +- platform/mellanox/mft/Makefile | 5 ++--- platform/mellanox/sdk.mk | 2 +- platform/nephos/sdk.mk | 4 ++-- rules/linux-kernel.mk | 8 ++++---- src/igb/Makefile | 2 +- src/ixgbe/Makefile | 2 +- src/sonic-linux-kernel | 2 +- 13 files changed, 24 insertions(+), 25 deletions(-) diff --git a/build_debian.sh b/build_debian.sh index 6a27bd5d237..2e0f7f152b5 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -114,7 +114,7 @@ echo '[INFO] Install SONiC linux kernel image' ## Note: duplicate apt-get command to ensure every line return zero sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/initramfs-tools_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f -sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-4-amd64_*.deb || \ +sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/linux-image-3.16.0-5-amd64_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f ## Update initramfs for booting with squashfs+aufs @@ -145,10 +145,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck sudo chroot $FILESYSTEM_ROOT update-initramfs -u ## Install latest intel igb driver -sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko +sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko ## Install latest intel ixgbe driver -sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko +sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-5-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko ## Install docker echo '[INFO] Install docker' diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index a2c683b20c9..3f2d2cdecc3 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -18,8 +18,8 @@ set -x -kernel=boot/vmlinuz-3.16.0-4-amd64 -initrd=boot/initrd.img-3.16.0-4-amd64 +kernel=boot/vmlinuz-3.16.0-5-amd64 +initrd=boot/initrd.img-3.16.0-5-amd64 kernel_params=kernel-params aboot_machine="arista_unknown" diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index ebfb5027b29..bf847dba77c 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -2,14 +2,14 @@ Description=switch state service Requires=database.service {% if sonic_asic_platform == 'broadcom' %} -Requires=opennsl-modules-3.16.0-4-amd64.service +Requires=opennsl-modules-3.16.0-5-amd64.service {% elif sonic_asic_platform == 'nephos' %} Requires=nps-modules-3.16.0-4-amd64.service {% endif %} After=database.service After=interfaces-config.service {% if sonic_asic_platform == 'broadcom' %} -After=opennsl-modules-3.16.0-4-amd64.service +After=opennsl-modules-3.16.0-5-amd64.service {% elif sonic_asic_platform == 'nephos' %} After=nps-modules-3.16.0-4-amd64.service {% endif %} diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index c7f184bf024..517485ba03e 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -549,11 +549,11 @@ menuentry '$demo_grub_entry' { if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_msdos insmod ext2 - linux /$image_dir/boot/vmlinuz-3.16.0-4-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \ + linux /$image_dir/boot/vmlinuz-3.16.0-5-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \ loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs \ apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE usbcore.autosuspend=-1 $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX echo 'Loading $demo_volume_label $demo_type initial ramdisk ...' - initrd /$image_dir/boot/initrd.img-3.16.0-4-amd64 + initrd /$image_dir/boot/initrd.img-3.16.0-5-amd64 } EOF diff --git a/platform/broadcom/sdk.mk b/platform/broadcom/sdk.mk index dbabf8aaba1..0b64033b93d 100644 --- a/platform/broadcom/sdk.mk +++ b/platform/broadcom/sdk.mk @@ -1,4 +1,4 @@ -BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-4-amd64_3.2.3.7-1_amd64.deb -$(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-4-amd64_3.2.3.7-1_amd64.deb?sv=2015-04-05&sr=b&sig=BJEFXfq2mgvSTIYZF8qF1Jj2ePkJaxBmA0HqhhAFPmQ%3D&se=2031-08-11T03%3A27%3A43Z&sp=r" +BRCM_OPENNSL_KERNEL = opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb +$(BRCM_OPENNSL_KERNEL)_URL = "https://sonicstorage.blob.core.windows.net/packages/opennsl-modules-3.16.0-5-amd64_3.2.3.7-1_amd64.deb?sv=2015-04-05&sr=b&sig=R%2BQp4mHlNi489Q6HP7vFUdBDmDazbiL02hQFdxYkCI0%3D&se=2031-09-27T20%3A17%3A41Z&sp=r" SONIC_ONLINE_DEBS += $(BRCM_OPENNSL_KERNEL) diff --git a/platform/mellanox/mft.mk b/platform/mellanox/mft.mk index 966cb48c013..2fb3af338d7 100644 --- a/platform/mellanox/mft.mk +++ b/platform/mellanox/mft.mk @@ -5,5 +5,5 @@ $(MFT)_SRC_PATH = $(PLATFORM_PATH)/mft $(MFT)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) SONIC_MAKE_DEBS += $(MFT) -KERNEL_MFT = kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb +KERNEL_MFT = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb $(eval $(call add_derived_package,$(MFT),$(KERNEL_MFT))) diff --git a/platform/mellanox/mft/Makefile b/platform/mellanox/mft/Makefile index a5b1e8609b7..eea78cd7603 100644 --- a/platform/mellanox/mft/Makefile +++ b/platform/mellanox/mft/Makefile @@ -3,11 +3,10 @@ SHELL = /bin/bash MFT_NAME = mft-4.5.0-31-x86_64-deb MFT_TGZ = $(MFT_NAME).tgz -KERNELVER = 3.16.0-4-amd64 SRC_DEB = kernel-mft-dkms_4.5.0-31_all.deb MAIN_TARGET = mft-4.5.0-31.amd64.deb -DERIVED_TARGETS = kernel-mft-dkms_4.5.0-3.16.0-4-amd64_all.deb +DERIVED_TARGETS = kernel-mft-dkms_4.5.0-$(KVERSION)_all.deb $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : rm -rf $(MFT_NAME) @@ -22,7 +21,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : fi done - tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k $(KERNELVER) --media tar | grep "Disk image location" | cut -d':' -f2` + tar xvf `sudo dkms mkdriverdisk kernel-mft-dkms/4.5.0 -a all -d ubuntu -k $(KVERSION) --media tar | grep "Disk image location" | cut -d':' -f2` popd # fix timestamp because we do not actually build tools, only kernel diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index 5aaee09fdb1..9dd8ff7703f 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,4 +1,4 @@ -MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/564703412781016766b248b98266bd6f2c161431/sdk +MLNX_SDK_BASE_URL = https://github.com/Mellanox/SAI-Implementation/raw/645052b0a285b190082beb858ba43a8b33bb667a/sdk MLNX_SDK_VERSION = 4.2.6011 MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_ACL_RM) $(SX_COMPLIB) \ $(SX_EXAMPLES) $(SX_GEN_UTILS) $(SX_SCEW) $(SX_SDN_HAL) \ diff --git a/platform/nephos/sdk.mk b/platform/nephos/sdk.mk index 1bc7fe35c0d..743512366db 100644 --- a/platform/nephos/sdk.mk +++ b/platform/nephos/sdk.mk @@ -1,4 +1,4 @@ -NEPHOS_NPS_KERNEL = nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb -$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-4-amd64_2.0.3a63-20180110_amd64.deb" +NEPHOS_NPS_KERNEL = nps-modules-3.16.0-5-amd64_2.0.3_amd64.deb +$(NEPHOS_NPS_KERNEL)_URL = "https://github.com/NephosInc/SONiC/raw/master/sdk/nps-modules-3.16.0-5-amd64_2.0.3_amd64.deb" SONIC_ONLINE_DEBS += $(NEPHOS_NPS_KERNEL) diff --git a/rules/linux-kernel.mk b/rules/linux-kernel.mk index 1e7fad0fd84..b7c1263990f 100644 --- a/rules/linux-kernel.mk +++ b/rules/linux-kernel.mk @@ -1,9 +1,9 @@ # linux kernel package -KVERSION_SHORT = 3.16.0-4 -KVERSION = $(KVERSION_SHORT)-amd64 -KERNEL_VERSION = 3.16.43 -KERNEL_SUBVERSION = 2+deb8u5 +KVERSION_SHORT = 3.16.0-5 +KVERSION ?= $(KVERSION_SHORT)-amd64 +KERNEL_VERSION = 3.16.51 +KERNEL_SUBVERSION = 3+deb8u1 export KVERSION_SHORT KVERSION KERNEL_VERSION KERNEL_SUBVERSION diff --git a/src/igb/Makefile b/src/igb/Makefile index e814ce0a7db..cafa96aba77 100644 --- a/src/igb/Makefile +++ b/src/igb/Makefile @@ -15,7 +15,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Build the package pushd src - export BUILD_KERNEL=3.16.0-4-amd64 + export BUILD_KERNEL=$(KVERSION) make popd diff --git a/src/ixgbe/Makefile b/src/ixgbe/Makefile index 133fc7db057..90d20e606ef 100644 --- a/src/ixgbe/Makefile +++ b/src/ixgbe/Makefile @@ -14,7 +14,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Build the package pushd src - export BUILD_KERNEL=3.16.0-4-amd64 + export BUILD_KERNEL=$(KVERSION) make popd diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index ff5a3b588cc..02b5c0b08f5 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit ff5a3b588cc7dbd763fb13c1125710134c8cdd12 +Subproject commit 02b5c0b08f5812d1d7af98f77dfdb2bb11ad1991 From 1ae86ca539a016bf62a95505f774630547218403 Mon Sep 17 00:00:00 2001 From: pavel-shirshov Date: Wed, 31 Jan 2018 23:01:24 -0800 Subject: [PATCH 077/254] Update swss and swss-common submodules (#1359) --- src/sonic-swss | 2 +- src/sonic-swss-common | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-swss b/src/sonic-swss index 918cf5ad6ae..4227beef783 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 918cf5ad6aec6b8f7ee863386de5b0dbcc035f60 +Subproject commit 4227beef783ff16c3454ffc4f46fcfc5a8ce0c07 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 04b8b84ab6d..4b29d77aa02 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 04b8b84ab6d66c97d7d727ac80a431b7ba85cf57 +Subproject commit 4b29d77aa02e570732348458822815550a8c6b0c From 23bbf809990b361e5720bfcaae70dd0ead1e984c Mon Sep 17 00:00:00 2001 From: nikos-li <31227248+nikos-li@users.noreply.github.com> Date: Thu, 1 Feb 2018 08:49:24 -0800 Subject: [PATCH 078/254] [device]: Fix celestica's seastone sfputil for lpmode and transceiver presence (#1358) --- .../x86_64-cel_seastone-r0/plugins/sfputil.py | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py b/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py index 7ff632e152b..f1e6b1daa3e 100755 --- a/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py +++ b/device/celestica/x86_64-cel_seastone-r0/plugins/sfputil.py @@ -45,10 +45,54 @@ def __init__(self): SfpUtilBase.__init__(self) def get_presence(self, port_num): - raise NotImplementedError + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/dx010_cpld/qsfp_modprs", "r") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # ModPrsL is active low + if reg_value & mask == 0: + return True + + return False def get_low_power_mode(self, port_num): - raise NotImplementedError + # Check for invalid port_num + if port_num < self.port_start or port_num > self.port_end: + return False + + try: + reg_file = open("/sys/devices/platform/dx010_cpld/qsfp_lpmode", "r") + except IOError as e: + print "Error: unable to open file: %s" % str(e) + return False + + content = reg_file.readline().rstrip() + + # content is a string containing the hex representation of the register + reg_value = int(content, 16) + + # Mask off the bit corresponding to our port + mask = (1 << port_num) + + # LPMode is active high + if reg_value & mask == 0: + return False + + return True def set_low_power_mode(self, port_num, lpmode): raise NotImplementedError From 162089dd9ed24ca3bbd501558efd30d32eaaecc0 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Thu, 1 Feb 2018 15:15:39 -0800 Subject: [PATCH 079/254] [caclmgrd] Prevent service from blocking system boot indefinitely (#1362) --- files/image_config/caclmgrd/caclmgrd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/caclmgrd/caclmgrd.service b/files/image_config/caclmgrd/caclmgrd.service index 8e6cbb0c8e6..1acc23458c9 100644 --- a/files/image_config/caclmgrd/caclmgrd.service +++ b/files/image_config/caclmgrd/caclmgrd.service @@ -4,7 +4,7 @@ Requires=database.service After=database.service [Service] -Type=oneshot +Type=simple ExecStart=/usr/bin/caclmgrd-start.sh [Install] From b34bd1f978d0ba7d6e97b5c8025332c56efe453e Mon Sep 17 00:00:00 2001 From: Harish Venkatraman Date: Fri, 2 Feb 2018 14:02:57 -0800 Subject: [PATCH 080/254] [device/dell] Add dynamic buffer pg lookup tbl (#1366) This commit adds new support for dynamic buffer configuation. Adding pg_profile lookup table for supporting the buffer profile using cable length and port speed. Lookup table entries are calculated based on formula for different cable length and speed. The 50G entries needs to be updated once again as we are waiting for the interface sublayer MAC delay values. Additionally fixed some issues in the buffers.json.j2 file. Signed-off-by: Harish Venkatraman --- .../Force10-S6100/buffers.json.j2 | 18 ++++++++++-------- .../Force10-S6100/pg_profile_lookup.ini | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 index b12fc385117..153e487f2f0 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/buffers.json.j2 @@ -68,7 +68,7 @@ } }, "BUFFER_POOL": { - "ingress_lossless_lossy_pool": { + "ingress_lossless_pool": { "size": "10443264", "type": "ingress", "mode": "dynamic", @@ -87,14 +87,14 @@ }, "BUFFER_PROFILE": { "ingress_lossless_profile": { - "pool": "[BUFFER_POOL|ingress_lossless_lossy_pool]", + "pool": "[BUFFER_POOL|ingress_lossless_pool]", "xon": "4096", "xoff": "58448", "size": "1248", "dynamic_th": "-4" }, "ingress_lossy_profile": { - "pool":"[BUFFER_POOL|ingress_lossless_lossy_pool]", + "pool":"[BUFFER_POOL|ingress_lossless_pool]", "size":"0", "dynamic_th":"3" }, @@ -110,16 +110,18 @@ } }, "BUFFER_PG": { - "{{ port_names }}:3-4": { + "{{ port_names }}|3-4": { "profile" : "[BUFFER_PROFILE|ingress_lossless_profile]" }, - "{{ port_names }}:0-1": { + "{{ port_names }}|0-1": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "BUFFER_QUEUE_TABLE:{{ port_names }}:3-4": { + } + }, + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { "profile" : "[BUFFER_PROFILE|egress_lossless_profile]" }, - "BUFFER_QUEUE_TABLE:{{ port_names }}:0-1": { + "{{ port_names }}|0-1": { "profile" : "[BUFFER_PROFILE|egress_lossy_profile]" } } diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini new file mode 100644 index 00000000000..c2375046870 --- /dev/null +++ b/device/dell/x86_64-dell_s6100_c2538-r0/Force10-S6100/pg_profile_lookup.ini @@ -0,0 +1,17 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 1248 2288 35776 -4 + 25000 5m 1248 2288 53248 -4 + 40000 5m 1248 2288 66560 -4 + 50000 5m 1248 2288 90272 -4 + 100000 5m 1248 2288 165568 -4 + 10000 40m 1248 2288 37024 -4 + 25000 40m 1248 2288 53248 -4 + 40000 40m 1248 2288 71552 -4 + 50000 40m 1248 2288 96096 -4 + 100000 40m 1248 2288 177632 -4 + 10000 300m 1248 2288 46176 -4 + 25000 300m 1248 2288 79040 -4 + 40000 300m 1248 2288 108160 -4 + 50000 300m 1248 2288 141856 -4 + 100000 300m 1248 2288 268736 -4 From 628ad3da03488d03600bae63b1885310c3e254d1 Mon Sep 17 00:00:00 2001 From: kaiyu22 Date: Sat, 3 Feb 2018 17:46:00 +0800 Subject: [PATCH 081/254] [Platform] Update FEC value and SAI download link for Ingrasys S9130-32X/S9230-64X (#1365) - What I did Updating FEC value and SAI download link - How I did it Updating related switch configuration files in device/ingrasys Updating sai.mk files in platform/nephos - How to verify it Checking system and network feature is worked as well - Description for the changelog Updating FEC value and SAI download link for Ingrasys S9130-32X/S9230-64X - A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Sam Yang --- .../INGRASYS-S9130-32X/port_config.nps | 2 +- .../INGRASYS-S9230-64X/port_config.nps | 128 +++++++++--------- platform/nephos/sai.mk | 4 +- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps index ac626871617..dbc9a010a22 100644 --- a/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9130_32x-r0/INGRASYS-S9130-32X/port_config.nps @@ -312,7 +312,7 @@ port set portlist=0-31 speed=100g port set portlist=129-130 speed=10g port set portlist=0-31 medium-type=sr4 port set portlist=129-130 medium-type=kr -port set portlist=0-31 fec=rs +port set portlist=0-31 fec=disable port advertise portlist=129-130 speed-10g-kr port set portlist=129-130 an=enable port set portlist=0-31,129-130 admin=enable diff --git a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps index 2b013f7641e..4e5e8e998d7 100644 --- a/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps +++ b/device/ingrasys/x86_64-ingrasys_s9230_64x-r0/INGRASYS-S9230-64X/port_config.nps @@ -728,70 +728,70 @@ port set unit=0 portlist=62 medium-type=sr4 port set unit=0 portlist=63 medium-type=sr4 port set unit=0 portlist=129 medium-type=kr port set unit=0 portlist=130 medium-type=kr -port set unit=0 portlist=0 fec=rs -port set unit=0 portlist=1 fec=rs -port set unit=0 portlist=2 fec=rs -port set unit=0 portlist=3 fec=rs -port set unit=0 portlist=4 fec=rs -port set unit=0 portlist=5 fec=rs -port set unit=0 portlist=6 fec=rs -port set unit=0 portlist=7 fec=rs -port set unit=0 portlist=8 fec=rs -port set unit=0 portlist=9 fec=rs -port set unit=0 portlist=10 fec=rs -port set unit=0 portlist=11 fec=rs -port set unit=0 portlist=12 fec=rs -port set unit=0 portlist=13 fec=rs -port set unit=0 portlist=14 fec=rs -port set unit=0 portlist=15 fec=rs -port set unit=0 portlist=16 fec=rs -port set unit=0 portlist=17 fec=rs -port set unit=0 portlist=18 fec=rs -port set unit=0 portlist=19 fec=rs -port set unit=0 portlist=20 fec=rs -port set unit=0 portlist=21 fec=rs -port set unit=0 portlist=22 fec=rs -port set unit=0 portlist=23 fec=rs -port set unit=0 portlist=24 fec=rs -port set unit=0 portlist=25 fec=rs -port set unit=0 portlist=26 fec=rs -port set unit=0 portlist=27 fec=rs -port set unit=0 portlist=28 fec=rs -port set unit=0 portlist=29 fec=rs -port set unit=0 portlist=30 fec=rs -port set unit=0 portlist=31 fec=rs -port set unit=0 portlist=32 fec=rs -port set unit=0 portlist=33 fec=rs -port set unit=0 portlist=34 fec=rs -port set unit=0 portlist=35 fec=rs -port set unit=0 portlist=36 fec=rs -port set unit=0 portlist=37 fec=rs -port set unit=0 portlist=38 fec=rs -port set unit=0 portlist=39 fec=rs -port set unit=0 portlist=40 fec=rs -port set unit=0 portlist=41 fec=rs -port set unit=0 portlist=42 fec=rs -port set unit=0 portlist=43 fec=rs -port set unit=0 portlist=44 fec=rs -port set unit=0 portlist=45 fec=rs -port set unit=0 portlist=46 fec=rs -port set unit=0 portlist=47 fec=rs -port set unit=0 portlist=48 fec=rs -port set unit=0 portlist=49 fec=rs -port set unit=0 portlist=50 fec=rs -port set unit=0 portlist=51 fec=rs -port set unit=0 portlist=52 fec=rs -port set unit=0 portlist=53 fec=rs -port set unit=0 portlist=54 fec=rs -port set unit=0 portlist=55 fec=rs -port set unit=0 portlist=56 fec=rs -port set unit=0 portlist=57 fec=rs -port set unit=0 portlist=58 fec=rs -port set unit=0 portlist=59 fec=rs -port set unit=0 portlist=60 fec=rs -port set unit=0 portlist=61 fec=rs -port set unit=0 portlist=62 fec=rs -port set unit=0 portlist=63 fec=rs +port set unit=0 portlist=0 fec=disable +port set unit=0 portlist=1 fec=disable +port set unit=0 portlist=2 fec=disable +port set unit=0 portlist=3 fec=disable +port set unit=0 portlist=4 fec=disable +port set unit=0 portlist=5 fec=disable +port set unit=0 portlist=6 fec=disable +port set unit=0 portlist=7 fec=disable +port set unit=0 portlist=8 fec=disable +port set unit=0 portlist=9 fec=disable +port set unit=0 portlist=10 fec=disable +port set unit=0 portlist=11 fec=disable +port set unit=0 portlist=12 fec=disable +port set unit=0 portlist=13 fec=disable +port set unit=0 portlist=14 fec=disable +port set unit=0 portlist=15 fec=disable +port set unit=0 portlist=16 fec=disable +port set unit=0 portlist=17 fec=disable +port set unit=0 portlist=18 fec=disable +port set unit=0 portlist=19 fec=disable +port set unit=0 portlist=20 fec=disable +port set unit=0 portlist=21 fec=disable +port set unit=0 portlist=22 fec=disable +port set unit=0 portlist=23 fec=disable +port set unit=0 portlist=24 fec=disable +port set unit=0 portlist=25 fec=disable +port set unit=0 portlist=26 fec=disable +port set unit=0 portlist=27 fec=disable +port set unit=0 portlist=28 fec=disable +port set unit=0 portlist=29 fec=disable +port set unit=0 portlist=30 fec=disable +port set unit=0 portlist=31 fec=disable +port set unit=0 portlist=32 fec=disable +port set unit=0 portlist=33 fec=disable +port set unit=0 portlist=34 fec=disable +port set unit=0 portlist=35 fec=disable +port set unit=0 portlist=36 fec=disable +port set unit=0 portlist=37 fec=disable +port set unit=0 portlist=38 fec=disable +port set unit=0 portlist=39 fec=disable +port set unit=0 portlist=40 fec=disable +port set unit=0 portlist=41 fec=disable +port set unit=0 portlist=42 fec=disable +port set unit=0 portlist=43 fec=disable +port set unit=0 portlist=44 fec=disable +port set unit=0 portlist=45 fec=disable +port set unit=0 portlist=46 fec=disable +port set unit=0 portlist=47 fec=disable +port set unit=0 portlist=48 fec=disable +port set unit=0 portlist=49 fec=disable +port set unit=0 portlist=50 fec=disable +port set unit=0 portlist=51 fec=disable +port set unit=0 portlist=52 fec=disable +port set unit=0 portlist=53 fec=disable +port set unit=0 portlist=54 fec=disable +port set unit=0 portlist=55 fec=disable +port set unit=0 portlist=56 fec=disable +port set unit=0 portlist=57 fec=disable +port set unit=0 portlist=58 fec=disable +port set unit=0 portlist=59 fec=disable +port set unit=0 portlist=60 fec=disable +port set unit=0 portlist=61 fec=disable +port set unit=0 portlist=62 fec=disable +port set unit=0 portlist=63 fec=disable port advertise unit=0 portlist=129 speed-10g-kr port advertise unit=0 portlist=130 speed-10g-kr port set unit=0 portlist=129 an=enable diff --git a/platform/nephos/sai.mk b/platform/nephos/sai.mk index 2da9e1f2c4f..30fb458e638 100644 --- a/platform/nephos/sai.mk +++ b/platform/nephos/sai.mk @@ -1,5 +1,5 @@ -NEPHOS_SAI = libsainps_2.0.3a63-20180110_amd64.deb -$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.3a63-20180110_amd64.deb" +NEPHOS_SAI = libsainps_2.0.3_amd64.deb +$(NEPHOS_SAI)_URL = "https://github.com/NephosInc/SONiC/raw/master/sai/libsainps_2.0.3_amd64.deb" NEPHOS_SAI_DEV = libsainps-dev_2.0.3a63-20180110_amd64.deb $(eval $(call add_derived_package,$(NEPHOS_SAI),$(NEPHOS_SAI_DEV))) From a4bcccc9db552bb63699528d0e3af3d677cd0ef6 Mon Sep 17 00:00:00 2001 From: paavaanan Date: Sun, 4 Feb 2018 06:19:24 +0530 Subject: [PATCH 082/254] [dell-hwmon] Changed variables in psuutil scripts for both Z9100/S6100 platforms (#1305) * [dell-hwmon] Changes psuutil scripts for Z9100/S6100 platform to use hwmon variables * Updated sumbodule 23c5383780790234da3774155bd521db14d8daa4 - hwmon changes --- device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py | 7 ++++--- device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py | 7 ++++--- platform/broadcom/sonic-platform-modules-dell | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py index 83452f69aaa..b753cd711da 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_s6100_lpc" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + print mb_reg_file, 'not found !' return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py index 2ad6ae7d149..2e07ee81881 100644 --- a/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py +++ b/device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py @@ -20,10 +20,11 @@ def __init__(self): # Get a mailbox register def get_pmc_register(self, reg_name): - mailbox_dir = "/sys/devices/platform/dell_mailbox" + mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1" retval = 'ERR' mb_reg_file = mailbox_dir+'/' + reg_name if (not os.path.isfile(mb_reg_file)): + print mb_reg_file, 'not found !' return retval try: @@ -52,7 +53,7 @@ def get_psu_status(self, index): faulty """ status = 0 - psu_status = self.get_pmc_register('psu_'+str(index)+'_status') + psu_status = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_status != 'ERR'): psu_status = int(psu_status, 16) # Check for PSU statuse @@ -69,7 +70,7 @@ def get_psu_presence(self, index): :return: Boolean, True if PSU is plugged, False if not """ status = 0 - psu_presence = self.get_pmc_register('psu_'+str(index)+'_status') + psu_presence = self.get_pmc_register('psu'+str(index)+'_presence') if (psu_presence != 'ERR'): psu_presence = int(psu_presence, 16) # Check for PSU presence diff --git a/platform/broadcom/sonic-platform-modules-dell b/platform/broadcom/sonic-platform-modules-dell index f0e808fe518..23c53837807 160000 --- a/platform/broadcom/sonic-platform-modules-dell +++ b/platform/broadcom/sonic-platform-modules-dell @@ -1 +1 @@ -Subproject commit f0e808fe518f336e4cb97fdaf25e35a752c24d89 +Subproject commit 23c5383780790234da3774155bd521db14d8daa4 From 60452351ea2a24a8f4fe05e20bc28fc9aa10ef16 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sun, 4 Feb 2018 12:48:48 +0800 Subject: [PATCH 083/254] [devices]: change platform modules to depend on 3.16.0-5-amdn64 kernel (#1368) * [devices]: change platform modules to depend on 3.16.0-5-amdn64 kernel * update kernel to 3.16.0-5-amd64 for dell s6100 and z9100 --- platform/broadcom/sonic-platform-modules-dell | 2 +- platform/broadcom/sonic-platform-modules-delta/debian/control | 2 +- .../broadcom/sonic-platform-modules-inventec/debian/control | 4 ++-- platform/broadcom/sonic-platform-modules-s6000 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-dell b/platform/broadcom/sonic-platform-modules-dell index 23c53837807..d2f58195831 160000 --- a/platform/broadcom/sonic-platform-modules-dell +++ b/platform/broadcom/sonic-platform-modules-dell @@ -1 +1 @@ -Subproject commit 23c5383780790234da3774155bd521db14d8daa4 +Subproject commit d2f58195831e6e7016992ef449778f3474e60e95 diff --git a/platform/broadcom/sonic-platform-modules-delta/debian/control b/platform/broadcom/sonic-platform-modules-delta/debian/control index 7ad1550415b..1928e9a767e 100644 --- a/platform/broadcom/sonic-platform-modules-delta/debian/control +++ b/platform/broadcom/sonic-platform-modules-delta/debian/control @@ -7,5 +7,5 @@ Standards-Version: 3.9.3 Package: platform-modules-ag9032v1 Architecture: amd64 -Depends: linux-image-3.16.0-4-amd64 +Depends: linux-image-3.16.0-5-amd64 Description: kernel modules for platform devices such as fan, led, sfp diff --git a/platform/broadcom/sonic-platform-modules-inventec/debian/control b/platform/broadcom/sonic-platform-modules-inventec/debian/control index d570e777de9..27258c9226c 100644 --- a/platform/broadcom/sonic-platform-modules-inventec/debian/control +++ b/platform/broadcom/sonic-platform-modules-inventec/debian/control @@ -7,11 +7,11 @@ Standards-Version: 3.9.3 Package: platform-modules-d7032q28b Architecture: amd64 -Depends: linux-image-3.16.0-4-amd64 +Depends: linux-image-3.16.0-5-amd64 Description: kernel modules for platform devices such as fan, led Package: platform-modules-d7054q28b Architecture: amd64 -Depends: linux-image-3.16.0-4-amd64 +Depends: linux-image-3.16.0-5-amd64 Description: kernel modules for platform devices such as fan, led diff --git a/platform/broadcom/sonic-platform-modules-s6000 b/platform/broadcom/sonic-platform-modules-s6000 index 952208ce52d..ed9ea067b5c 160000 --- a/platform/broadcom/sonic-platform-modules-s6000 +++ b/platform/broadcom/sonic-platform-modules-s6000 @@ -1 +1 @@ -Subproject commit 952208ce52d88095da9591cc548d1e013f363476 +Subproject commit ed9ea067b5cbfd7d1c835a903729f9dc28d3b035 From e880c78f2a5058a2330e4104f24f8c4166fe43d4 Mon Sep 17 00:00:00 2001 From: StanleyCi <34563271+StanleyCi@users.noreply.github.com> Date: Tue, 6 Feb 2018 21:23:20 +0800 Subject: [PATCH 084/254] [Delta]: Updated port_config.ini & fix the bug of fancontrol.service for ag9032v1. (#1371) * [Delta]: Updated port_config.ini & fix the bug of fancontrol.service for ag9032v1. Signed-off-by: Stanley Chi * [Delta]: Updated port_config.ini & fix the bug of fancontrol.service for ag9032v1. Signed-off-by: Stanley Chi --- .../Delta-ag9032v1/port_config.ini | 48 ++++---- .../fancontrol.service | 109 +++++++++++++----- 2 files changed, 101 insertions(+), 56 deletions(-) diff --git a/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini b/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini index e000f29bef3..4fb783847b0 100644 --- a/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini +++ b/device/delta/x86_64-delta_ag9032v1-r0/Delta-ag9032v1/port_config.ini @@ -1,16 +1,16 @@ # name lanes alias -Ethernet0 49,50,51,52 hundredGigE1/1 -Ethernet4 53,54,55,56 hundredGigE1/2 -Ethernet8 57,58,59,60 hundredGigE1/3 -Ethernet12 61,62,63,64 hundredGigE1/4 -Ethernet16 65,66,67,68 hundredGigE1/5 -Ethernet20 69,70,71,72 hundredGigE1/6 -Ethernet24 73,74,75,76 hundredGigE1/7 -Ethernet28 77,78,79,80 hundredGigE1/8 -Ethernet32 37,38,39,40 hundredGigE1/9 -Ethernet36 33,34,35,36 hundredGigE1/10 -Ethernet40 45,46,47,48 hundredGigE1/11 -Ethernet44 41,42,43,44 hundredGigE1/12 +Ethernet0 41,42,43,44 hundredGigE1/1 +Ethernet4 45,46,47,48 hundredGigE1/2 +Ethernet8 49,50,51,52 hundredGigE1/3 +Ethernet12 37,38,39,40 hundredGigE1/4 +Ethernet16 33,34,35,36 hundredGigE1/5 +Ethernet20 53,54,55,56 hundredGigE1/6 +Ethernet24 57,58,59,60 hundredGigE1/7 +Ethernet28 61,62,63,64 hundredGigE1/8 +Ethernet32 65,66,67,68 hundredGigE1/9 +Ethernet36 69,70,71,72 hundredGigE1/10 +Ethernet40 73,74,75,76 hundredGigE1/11 +Ethernet44 77,78,79,80 hundredGigE1/12 Ethernet48 81,82,83,84 hundredGigE1/13 Ethernet52 85,86,87,88 hundredGigE1/14 Ethernet56 89,90,91,92 hundredGigE1/15 @@ -19,15 +19,15 @@ Ethernet64 97,98,99,100 hundredGigE1/17 Ethernet68 101,102,103,104 hundredGigE1/18 Ethernet72 105,106,107,108 hundredGigE1/19 Ethernet76 109,110,111,112 hundredGigE1/20 -Ethernet80 21,22,23,24 hundredGigE1/21 -Ethernet84 17,18,19,20 hundredGigE1/22 -Ethernet88 29,30,31,32 hundredGigE1/23 -Ethernet92 25,26,27,28 hundredGigE1/24 -Ethernet96 117,118,119,120 hundredGigE1/25 -Ethernet100 113,114,115,116 hundredGigE1/26 -Ethernet104 125,126,127,128 hundredGigE1/27 -Ethernet108 121,122,123,124 hundredGigE1/28 -Ethernet112 5,6,7,8 hundredGigE1/29 -Ethernet116 1,2,3,4 hundredGigE1/30 -Ethernet120 13,14,15,16 hundredGigE1/31 -Ethernet124 9,10,11,12 hundredGigE1/32 +Ethernet80 121,122,123,124 hundredGigE1/21 +Ethernet84 113,114,115,116 hundredGigE1/22 +Ethernet88 1,2,3,4 hundredGigE1/23 +Ethernet92 117,118,119,120 hundredGigE1/24 +Ethernet96 5,6,7,8 hundredGigE1/25 +Ethernet100 125,126,127,128 hundredGigE1/26 +Ethernet104 29,30,31,32 hundredGigE1/27 +Ethernet108 9,10,11,12 hundredGigE1/28 +Ethernet112 13,14,15,16 hundredGigE1/29 +Ethernet116 25,26,27,28 hundredGigE1/30 +Ethernet120 17,18,19,20 hundredGigE1/31 +Ethernet124 21,22,23,24 hundredGigE1/32 diff --git a/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service b/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service index 17f647effb5..83f14245d1b 100755 --- a/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service +++ b/device/delta/x86_64-delta_ag9032v1-r0/fancontrol.service @@ -69,6 +69,17 @@ function LoadConfig FCMAXTEMP=$MAXTEMP FCMINSTART=$MINSTART FCMINSTOP=$MINSTOP + AFCTEMP_1_LOWER=(00 39 36 41 46 55) + AFCTEMP_1_UPPER=(39 39 44 49 54 150) + AFCTEMP_2_LOWER=(00 61 65 69 73 82) + AFCTEMP_2_UPPER=(63 67 71 75 79 150) + AFCTEMP_3_LOWER=(00 51 55 59 63 71) + AFCTEMP_3_UPPER=(53 57 61 65 69 150) + AFCTEMP_4_LOWER=(00 46 50 54 58 65) + AFCTEMP_4_UPPER=(45 52 56 60 64 150) + AFCTEMP_5_LOWER=(00 46 50 54 58 65) + AFCTEMP_5_UPPER=(45 52 56 60 64 150) + FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS=//g'` @@ -98,7 +109,6 @@ function LoadConfig AFCTEMP[$fcvcount]=$( echo "$temp_string" | cut -d" " -f $fcvcount ) AFCTEMP[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/hwmon1/\/sys\/bus\/i2c\/devices/g' ) AFCTEMP_PATH[$fcvcount]=$( echo "${AFCTEMP[$fcvcount]}" | sed 's/hwmon1/\/sys\/bus\/i2c\/devices/g' ) - AFCTEMP[$fcvcount]=$( cat ${AFCTEMP[$fcvcount]} ) AFCTEMP[$fcvcount]=$(( AFCTEMP[$fcvcount]/1000 )) done @@ -165,39 +175,79 @@ then fi echo $$ > "$PIDFILE" - # main function function UpdateThermalSensors { - echo "" - TEMP_HIGHEST=0 - FAN_PERCENTAGE=0 - - for i in ${AFCTEMP_PATH[@]}; do - if (( $(cat $i) > $TEMP_HIGHEST )); then - TEMP_HIGHEST=$(cat $i); - fi; + fcvcount=0 + for fcv in $FCTEMPS + do + fcvcount=$((fcvcount+1)) + AFCTEMP[$fcvcount]=$( cat ${AFCTEMP_PATH[$fcvcount]} ) + AFCTEMP[$fcvcount]=$(( AFCTEMP[$fcvcount]/1000 )) done - TEMP_HIGHEST=$((TEMP_HIGHEST/1000)) - echo "The highest temperature of thermal sensors: $TEMP_HIGHEST °C" +} + +function UpdateThermalLevel +{ + AFCTEMP_NUM=$((6-${AFCTEMP_LEVEL[$i]})) + AFCTEMP_UPPER_BUF=AFCTEMP_"$i"_UPPER["$AFCTEMP_NUM"] + AFCTEMP_LOWER_BUF=AFCTEMP_"$i"_LOWER["$AFCTEMP_NUM"] + + AFCTEMP_UPPER=${!AFCTEMP_UPPER_BUF} + AFCTEMP_LOWER=${!AFCTEMP_LOWER_BUF} + + + if (( ("${AFCTEMP[$i]}" <= "$AFCTEMP_UPPER") && ("${AFCTEMP[$i]}" >= "$AFCTEMP_LOWER") )) ; then + FLAG=2 + elif (( "${AFCTEMP[$i]}" > "$AFCTEMP_UPPER" )); then + AFCTEMP_LEVEL[$i]=$((${AFCTEMP_LEVEL[$i]} - 1)) + FLAG=1 + elif (( "${AFCTEMP[$i]}" < "$AFCTEMP_LOWER" )); then + AFCTEMP_LEVEL[$i]=$((${AFCTEMP_LEVEL[$i]} + 1)) + FLAG=1 + else + AFCTEMP_LEVEL[$i]=1 + FLAG=2 + fi } function UpdateFanSpeeds { - if [ $TEMP_HIGHEST -lt 51 ]; then #TEMP<=50 - FAN_PERCENTAGE=40 - elif [ $TEMP_HIGHEST -lt 56 -a $TEMP_HIGHEST -gt 50 ]; then #50 '/sys/bus/i2c/devices/4-0058/psu_select_member' echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/40-0058/fan1_set_percentage' echo "PSU fan1 =$( cat '/sys/bus/i2c/devices/40-0058/fan1_input' ) (rpm)" #Set speed to PSU_FAN2 - #echo "0x20" > '/sys/bus/i2c/devices/4-0058/psu_select_member' echo "$FAN_ON_PSU_PERCENTAGE" > '/sys/bus/i2c/devices/41-0058/fan1_set_percentage' echo "PSU fan2 =$( cat '/sys/bus/i2c/devices/41-0058/fan1_input' ) (rpm)" rm -f "$PIDFILE" } + # main loop calling the main function at specified intervals +AFCTEMP_LEVEL=(9 4 4 4 4 4) #inttial level while true do UpdateThermalSensors UpdateFanSpeeds echo "Sleep $INTERVAL seconds ..." + echo # Sleep while still handling signals sleep $INTERVAL & wait $! From 58c479d3af89e372c7039f386e77e2275176298a Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Tue, 6 Feb 2018 14:59:15 -0800 Subject: [PATCH 085/254] [boot] log rc.local execution in syslog (#1375) --- files/image_config/platform/rc.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index a78c07d93b4..145ef06e355 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -x # # rc.local # From e223610f4eb785537c08778f7f5e2480a78d6d59 Mon Sep 17 00:00:00 2001 From: lguohan Date: Wed, 7 Feb 2018 10:08:13 +0800 Subject: [PATCH 086/254] [devices]: change celestica platform modules to depend on 3.16.0-5-amd64 kernel (#1374) --- platform/broadcom/sonic-platform-modules-cel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/broadcom/sonic-platform-modules-cel b/platform/broadcom/sonic-platform-modules-cel index be37af0179d..190d0b71ac1 160000 --- a/platform/broadcom/sonic-platform-modules-cel +++ b/platform/broadcom/sonic-platform-modules-cel @@ -1 +1 @@ -Subproject commit be37af0179d97f1855fdec1f81c566ea69f5bb87 +Subproject commit 190d0b71ac1902679e2d720368e100d78eb09f3e From d0dd80c6d37f91eb5a6e39bf0f261661985411c8 Mon Sep 17 00:00:00 2001 From: kaiyu22 Date: Wed, 7 Feb 2018 20:09:14 +0800 Subject: [PATCH 087/254] [Nephos] Update SDK version to 3.16.0-5 in swss.service.j2 (#1377) - What I did Updating SDK version from 3.16.0-4 to 3.16.0-5 - How I did it Updating SDK version in files/build_templates/swss.service.j2 - How to verify it Checking command "config load_minigraph" without errors - Description for the changelog Updating SDK version from 3.16.0-4 to 3.16.0-5 in swss.service.j2 - A picture of a cute animal (not mandatory but encouraged) Signed-off-by: Sam Yang --- files/build_templates/swss.service.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build_templates/swss.service.j2 b/files/build_templates/swss.service.j2 index bf847dba77c..bcda050e3ce 100644 --- a/files/build_templates/swss.service.j2 +++ b/files/build_templates/swss.service.j2 @@ -4,14 +4,14 @@ Requires=database.service {% if sonic_asic_platform == 'broadcom' %} Requires=opennsl-modules-3.16.0-5-amd64.service {% elif sonic_asic_platform == 'nephos' %} -Requires=nps-modules-3.16.0-4-amd64.service +Requires=nps-modules-3.16.0-5-amd64.service {% endif %} After=database.service After=interfaces-config.service {% if sonic_asic_platform == 'broadcom' %} After=opennsl-modules-3.16.0-5-amd64.service {% elif sonic_asic_platform == 'nephos' %} -After=nps-modules-3.16.0-4-amd64.service +After=nps-modules-3.16.0-5-amd64.service {% endif %} [Service] From 4925d48b1ae2e3dddcdbb43c16653023cc5a98e2 Mon Sep 17 00:00:00 2001 From: Taoyu Li Date: Wed, 7 Feb 2018 06:06:41 -0800 Subject: [PATCH 088/254] Fix VLAN_INTERFACE attach issue upon vlan id-name mismatch (#1367) --- src/sonic-config-engine/minigraph.py | 6 ++++++ src/sonic-config-engine/tests/simple-sample-graph.xml | 4 ++-- src/sonic-config-engine/tests/test_cfggen.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 23d02a363e4..025fecb35e2 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -177,6 +177,8 @@ def parse_dpg(dpg, hname): vlan_attributes['dhcp_servers'] = vdhcpserver_list sonic_vlan_name = "Vlan%s" % vlanid + if sonic_vlan_name != vintfname: + vlan_attributes['alias'] = vintfname vlans[sonic_vlan_name] = vlan_attributes aclintfs = child.find(str(QName(ns, "AclInterfaces"))) @@ -398,9 +400,13 @@ def parse_xml(filename, platform=None, port_config_file=None): phyport_intfs = {} vlan_intfs = {} pc_intfs = {} + vlan_invert_mapping = { v['alias']:k for k,v in vlans.items() if v.has_key('alias') } + for intf in intfs: if intf[0][0:4] == 'Vlan': vlan_intfs[intf] = {} + elif vlan_invert_mapping.has_key(intf[0]): + vlan_intfs[(vlan_invert_mapping[intf[0]], intf[1])] = {} elif intf[0][0:11] == 'PortChannel': pc_intfs[intf] = {} else: diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index 4062cd7ae0c..0201aefd3b4 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -128,7 +128,7 @@ - Vlan1000 + ab1 fortyGigE0/8 192.0.0.1;192.0.0.2 1000 @@ -159,7 +159,7 @@ - Vlan1000 + ab1 192.168.0.1/27
diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index 9c9b31abf20..7d0c7b516cf 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -89,7 +89,7 @@ def test_minigraph_interfaces(self): def test_minigraph_vlans(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v VLAN' output = self.run_script(argument) - self.assertEqual(output.strip(), "{'Vlan1000': {'dhcp_servers': ['192.0.0.1', '192.0.0.2'], 'vlanid': '1000'}}") + self.assertEqual(output.strip(), "{'Vlan1000': {'alias': 'ab1', 'dhcp_servers': ['192.0.0.1', '192.0.0.2'], 'vlanid': '1000'}}") def test_minigraph_vlan_members(self): argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v VLAN_MEMBER' From 0d0752e09980cbf105be7642ad9c39dc63f2c8f5 Mon Sep 17 00:00:00 2001 From: padmanarayana Date: Wed, 7 Feb 2018 19:37:01 +0530 Subject: [PATCH 089/254] Reduce SONiC migration partition from 8G to 1G. (#1343) * Reduce SONiC migration partition from 8G to 1G. * Changes to create 1G partition with ability to resize post migration. * Remove redundant changes in varlog * Use findfs to interpret root. Move resize in case cmdline params are reordered --- build_debian.sh | 4 +++ build_image.sh | 2 +- files/initramfs-tools/mke2fs | 2 ++ files/initramfs-tools/resize-rootfs | 39 +++++++++++++++++++++++++++++ onie-image.conf | 2 +- 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 files/initramfs-tools/resize-rootfs diff --git a/build_debian.sh b/build_debian.sh index 2e0f7f152b5..2edb356d3d3 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -133,6 +133,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/setfacl sudo cp files/initramfs-tools/arista-net $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net +# Hook into initramfs: resize root partition after migration from another NOS to SONiC on Dell switches +sudo cp files/initramfs-tools/resize-rootfs $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs +sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs + ## Hook into initramfs: after partition mount and loop file mount ## 1. Prepare layered file system ## 2. Bind-mount docker working directory (docker aufs cannot work over aufs rootfs) diff --git a/build_image.sh b/build_image.sh index ee7fb8a7582..757ea026f16 100755 --- a/build_image.sh +++ b/build_image.sh @@ -56,7 +56,7 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then echo "Creating SONiC raw partition : $OUTPUT_RAW_IMAGE of size $RAW_IMAGE_DISK_SIZE MB" fallocate -l "$RAW_IMAGE_DISK_SIZE"M $OUTPUT_RAW_IMAGE - ## Generate a compressed 8GB partition dump that can be used to 'dd' in-lieu of using the onie-nos-installer + ## Generate a partition dump that can be used to 'dd' in-lieu of using the onie-nos-installer ## Run the installer ## The 'build' install mode of the installer is used to generate this dump. sudo chmod a+x $OUTPUT_ONIE_IMAGE diff --git a/files/initramfs-tools/mke2fs b/files/initramfs-tools/mke2fs index a67162199cf..52933d644a8 100644 --- a/files/initramfs-tools/mke2fs +++ b/files/initramfs-tools/mke2fs @@ -20,6 +20,8 @@ esac copy_exec /sbin/mke2fs copy_exec /sbin/sfdisk copy_exec /sbin/fdisk +copy_exec /sbin/resize2fs +copy_exec /sbin/findfs fstypes="ext4 ext3" diff --git a/files/initramfs-tools/resize-rootfs b/files/initramfs-tools/resize-rootfs new file mode 100644 index 00000000000..17ffcb94e69 --- /dev/null +++ b/files/initramfs-tools/resize-rootfs @@ -0,0 +1,39 @@ +#!/bin/sh + +case $1 in + prereqs) + exit 0 + ;; +esac + +# Extract kernel parameters +set -- $(cat /proc/cmdline) +for x in "$@"; do + case "$x" in + root=*) + root_val="${x#root=}" + ;; + resize-rootfs) + need_resize=1 + ;; + esac +done + +if [ -n "$need_resize" ]; then + if [ -z "$root_val" ]; then + echo "ERROR: resize required but unable to get root location from command line" + exit 1 + fi + + root_dev=$(findfs $root_val) + if [ $? != 0 ]; then + echo "ERROR: resize required but findfs failed" + exit 1 + fi + + resize2fs -f $root_dev + if [ $? != 0 ]; then + echo "ERROR: Unable to resize the root file system. Manual intervention needed to fix the issue." + exit 1 + fi +fi diff --git a/onie-image.conf b/onie-image.conf index b6564feb1a4..0ffc9914c73 100644 --- a/onie-image.conf +++ b/onie-image.conf @@ -31,7 +31,7 @@ OUTPUT_ONIE_IMAGE=target/sonic-$TARGET_MACHINE.bin OUTPUT_RAW_IMAGE=target/sonic-$TARGET_MACHINE.raw ### Raw image size in MB -RAW_IMAGE_DISK_SIZE=8192 +RAW_IMAGE_DISK_SIZE=1024 ## Output file name for aboot installer OUTPUT_ABOOT_IMAGE=target/sonic-aboot-$TARGET_MACHINE.swi From 7b98238de689da1261170f002e64fb7ba37b9818 Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Wed, 7 Feb 2018 08:12:30 -0800 Subject: [PATCH 090/254] [device/arista] Update Arista drivers submodule (#1376) - The driver package was split into bins, drivers, python2, python3 - Introduce some tracing regarding the switch chip reset - Add watchdog during boot for DCS-7260CX3-64 --- platform/broadcom/one-aboot.mk | 2 +- platform/broadcom/platform-modules-arista.mk | 14 +++++++++++++- platform/broadcom/sonic-platform-modules-arista | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/platform/broadcom/one-aboot.mk b/platform/broadcom/one-aboot.mk index d13ce392b42..71829fca401 100644 --- a/platform/broadcom/one-aboot.mk +++ b/platform/broadcom/one-aboot.mk @@ -3,6 +3,6 @@ SONIC_ONE_ABOOT_IMAGE = sonic-aboot-broadcom.swi $(SONIC_ONE_ABOOT_IMAGE)_MACHINE = broadcom $(SONIC_ONE_ABOOT_IMAGE)_IMAGE_TYPE = aboot -$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) $(ARISTA_PLATFORM_MODULE) +$(SONIC_ONE_ABOOT_IMAGE)_INSTALLS += $(BRCM_OPENNSL_KERNEL) $(ARISTA_PLATFORM_MODULE_DRIVERS) $(ARISTA_PLATFORM_MODULE_PYTHON2) $(ARISTA_PLATFORM_MODULE_PYTHON3) $(ARISTA_PLATFORM_MODULE) $(SONIC_ONE_ABOOT_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES) SONIC_INSTALLERS += $(SONIC_ONE_ABOOT_IMAGE) diff --git a/platform/broadcom/platform-modules-arista.mk b/platform/broadcom/platform-modules-arista.mk index 46f8709f53e..ec7566318c8 100644 --- a/platform/broadcom/platform-modules-arista.mk +++ b/platform/broadcom/platform-modules-arista.mk @@ -7,4 +7,16 @@ export ARISTA_PLATFORM_MODULE_VERSION ARISTA_PLATFORM_MODULE = sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_amd64.deb $(ARISTA_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-arista $(ARISTA_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) -SONIC_DPKG_DEBS += $(ARISTA_PLATFORM_MODULE) +SONIC_MAKE_DEBS += $(ARISTA_PLATFORM_MODULE) + +ARISTA_PLATFORM_MODULE_PYTHON2 = python-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_all.deb +$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_PYTHON2))) + +ARISTA_PLATFORM_MODULE_PYTHON3 = python3-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_all.deb +$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_PYTHON3))) + +ARISTA_PLATFORM_MODULE_DRIVERS = drivers-sonic-platform-arista_$(ARISTA_PLATFORM_MODULE_VERSION)_amd64.deb +$(eval $(call add_extra_package,$(ARISTA_PLATFORM_MODULE),$(ARISTA_PLATFORM_MODULE_DRIVERS))) + +export ARISTA_PLATFORM_MODULE ARISTA_PLATFORM_MODULE_PYTHON2 ARISTA_PLATFORM_MODULE_PYTHON3 ARISTA_PLATFORM_MODULE_DRIVERS + diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index e657481807d..3e8345b5d2e 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit e657481807db53dd4b87fa346b157153e201a37d +Subproject commit 3e8345b5d2ec2a2127c201c7749b9283b8daa618 From 2b48886eec2aa1bd9fa00db2a616aa9ab6601432 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 7 Feb 2018 13:38:09 -0800 Subject: [PATCH 091/254] [config] activate qos configuration only when buffers configuration exists (#1378) --- files/image_config/platform/rc.local | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 145ef06e355..563ba4cee7c 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -116,17 +116,18 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then fi HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "DEVICE_METADATA['localhost']['hwsku']"` - if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then - # merge qos configuration into init config file - sonic-cfggen -j /etc/sonic/config_db.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/config_db.json - mv /tmp/config_db.json /etc/sonic/config_db.json - fi - if [ -f /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 ]; then # generate and merge buffers configuration into config file sonic-cfggen -m -t /usr/share/sonic/device/$platform/$HWSKU/buffers.json.j2 > /tmp/buffers.json sonic-cfggen -j /etc/sonic/config_db.json -j /tmp/buffers.json --print-data > /tmp/config_db.json mv /tmp/config_db.json /etc/sonic/config_db.json + + # Only apply qos.json when buffer configuration is available. + if [ -f /usr/share/sonic/device/$platform/$HWSKU/qos.json ]; then + # merge qos configuration into init config file + sonic-cfggen -j /etc/sonic/config_db.json -j /usr/share/sonic/device/$platform/$HWSKU/qos.json --print-data > /tmp/config_db.json + mv /tmp/config_db.json /etc/sonic/config_db.json + fi fi if [ -d /host/image-$sonic_version/platform/$platform ]; then From 01362847d07f232fda3eff77eac1d0248e3e2c4f Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 7 Feb 2018 17:43:33 -0800 Subject: [PATCH 092/254] [sonic-dbsyncd] Update submodule (#1379) --- src/sonic-dbsyncd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-dbsyncd b/src/sonic-dbsyncd index 812f2cd50f8..1be79be4513 160000 --- a/src/sonic-dbsyncd +++ b/src/sonic-dbsyncd @@ -1 +1 @@ -Subproject commit 812f2cd50f83c1b83fbfc2688752e969cd5cd6f9 +Subproject commit 1be79be45131e85b2a15af6c8188e8443996835e From e9dd064f826eb30e0d0fb78a2f5ba4b2de0be4e5 Mon Sep 17 00:00:00 2001 From: sihuihan88 Date: Thu, 8 Feb 2018 17:23:28 -0800 Subject: [PATCH 093/254] [swss/sairedis]: update submodules (#1382) Signed-off-by: Sihui Han --- src/sonic-sairedis | 2 +- src/sonic-swss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index a6b5be886bb..c9e25ec8bf0 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit a6b5be886bb470d8ff1baf2978bbdf1a9e8cf5e0 +Subproject commit c9e25ec8bf0aea73f45d6e46dfd5919760f450d0 diff --git a/src/sonic-swss b/src/sonic-swss index 4227beef783..9a037b8ed32 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 4227beef783ff16c3454ffc4f46fcfc5a8ce0c07 +Subproject commit 9a037b8ed328070ee09d04e08c90ffdc0405e022 From ecf5c8d3116665807e755e6ad3f1dc2fb52d88d7 Mon Sep 17 00:00:00 2001 From: byu343 Date: Thu, 8 Feb 2018 17:43:52 -0800 Subject: [PATCH 094/254] ssh and snmp allow list (#1363) - Service ACL framework for Arista platforms --- build_debian.sh | 3 + dockers/docker-snmp-sv2/Dockerfile.j2 | 2 + dockers/docker-snmp-sv2/snmpd-config-updater | 132 ++++++++ dockers/docker-snmp-sv2/supervisord.conf | 9 + .../build_templates/sonic_debian_extension.j2 | 12 + .../ssh/sshd-clear-denied-sessions | 82 +++++ files/image_config/ssh/sshd-config-updater | 133 ++++++++ .../ssh/sshd-config-updater.service | 14 + rules/docker-base.mk | 1 + rules/libwrap.mk | 10 + slave.mk | 1 + src/libwrap/Makefile | 23 ++ src/libwrap/tcp_wrappers-7.6-allowlist.patch | 306 ++++++++++++++++++ 13 files changed, 728 insertions(+) create mode 100755 dockers/docker-snmp-sv2/snmpd-config-updater create mode 100755 files/image_config/ssh/sshd-clear-denied-sessions create mode 100755 files/image_config/ssh/sshd-config-updater create mode 100644 files/image_config/ssh/sshd-config-updater.service create mode 100644 rules/libwrap.mk create mode 100644 src/libwrap/Makefile create mode 100644 src/libwrap/tcp_wrappers-7.6-allowlist.patch diff --git a/build_debian.sh b/build_debian.sh index 2edb356d3d3..033ac6ff270 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -228,6 +228,9 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y do sudo mv $FILESYSTEM_ROOT/grub-pc-bin*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-grub +sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/libwrap0_*.deb || \ + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f + ## Disable kexec supported reboot which was installed by default sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec diff --git a/dockers/docker-snmp-sv2/Dockerfile.j2 b/dockers/docker-snmp-sv2/Dockerfile.j2 index 0e83b230746..da46cb9b1cf 100644 --- a/dockers/docker-snmp-sv2/Dockerfile.j2 +++ b/dockers/docker-snmp-sv2/Dockerfile.j2 @@ -43,6 +43,8 @@ RUN apt-get update && apt-get install -y libperl5.20 libpci3 libwrap0 \ COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["*.j2", "/usr/share/sonic/templates/"] +COPY ["snmpd-config-updater", "/usr/bin/snmpd-config-updater"] +RUN chmod +x /usr/bin/snmpd-config-updater ## Although exposing ports is not needed for host net mode, keep it for possible bridge mode EXPOSE 161/udp 162/udp diff --git a/dockers/docker-snmp-sv2/snmpd-config-updater b/dockers/docker-snmp-sv2/snmpd-config-updater new file mode 100755 index 00000000000..9f3e858bdb0 --- /dev/null +++ b/dockers/docker-snmp-sv2/snmpd-config-updater @@ -0,0 +1,132 @@ +#!/usr/bin/env python + +# Daemon that listens to updates about the source IP prefixes from which snmp access +# is allowed. In case of change, it will update the snmp configuration file accordingly. +# Also, after a change, it will notify snmpd to re-read its config file (service reload). + +import os +import re +import sys +import time +import redis + +service="snmpd" +config_file_path="/etc/snmp" +redis_key="SNMP_ALLOW_LIST" # the redis list we listen to +subscription='__keyspace@0__:%s' % redis_key +temporization_duration = 3 # how long we wait for changes to settle (ride out a bursts of changes in redis_key) +fake_infinite = 9999 # How often we wake up when nothing is going on --get_message()'s timeout has no 'infinite' value +# after these operations we may need to revisit existing ssh connections because they removed or modified existing entries +delete_operations = ["lrem", "lpop", "rpop", "blpop", "brpop", "brpoplpush", "rpoplpush", "ltrim", "del", "lset"] + +r = redis.StrictRedis(host='localhost') +p = r.pubsub() + +# If redis is not up yet, this can fail, so wait for redis to be available +while True: + try: + p.subscribe(subscription) + break + except redis.exceptions.ConnectionError: + time.sleep(3) + +# We could loose contact with redis at a later stage, in which case we will exit with +# return code -2 and supervisor will restart us, at which point we are back in the +# while loop above waiting for redis to be ready. +try: + + # By default redis does enable events, so enable them + r.config_set("notify-keyspace-events", "KAE") + + + # To update the configuration file + # + # Example config file for reference: + # root@sonic:/# cat /etc/snmp/snmpd.conf + # <...some snmp config, like udp port to use etc...> + # rocommunity public 172.20.61.0/24 + # rocommunity public 172.20.60.0/24 + # rocommunity public 127.00.00.0/8 + # <...some more snmp config...> + # root@sonic:/# + # + # snmpd.conf supports include file, like so: + # includeFile /etc/snmp/community.conf + # includeDir /etc/snmp/config.d + # which could make file massaging simpler, but even then we still deal with lines + # that have shared "masters", since some other entity controls the community strings + # part of that line. + # If other database attributes need to be written to the snmp config file, then + # it should be done by this daemon as well (sure, we could inotify on the file + # and correct it back, but that's glitchy). + + def write_configuration_file(v): + filename="%s/%s.conf" % (config_file_path, service) + filename_tmp = filename + ".tmp" + f=open(filename, "r") + snmpd_config = f.read() + f.close() + f=open(filename_tmp, "w") + this_community = "not_a_community" + for l in snmpd_config.split('\n'): + m = re.match("^(..)community (\S+)", l) + if not m: + f.write(l) + f.write("\n") + else: + if not l.startswith(this_community): # already handled community (each community is duplicated per allow entry) + this_community="%scommunity %s" % (m.group(1), m.group(2)) + if len(v): + for value in v: + f.write("%s %s\n" % (this_community, value)) + else: + f.write("%s\n" % this_community) + f.close() + os.rename(filename_tmp, filename) + os.system("kill -HUP $(pgrep snmpd) > /dev/null 2> /dev/null || :") + + # write initial configuration + write_configuration_file(r.lrange(redis_key, 0, -1)) + + # listen for changes and rewrite configuration file if needed, after some temporization + # + # How those subscribed to messages look like, for reference: + # {'pattern': None, 'type': 'subscribe', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 1L} + # {'pattern': None, 'type': 'message', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 'rpush'} + # {'pattern': None, 'type': 'message', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 'lpush'} + # {'pattern': None, 'type': 'message', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 'lrem'} + # {'pattern': None, 'type': 'message', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 'lset'} + # {'pattern': None, 'type': 'message', 'channel': '__keyspace@0__:SNMP_PERMIT_LIST', 'data': 'del'} + + select_timeout = fake_infinite + config_changed = False + while True: + try: + m = p.get_message(timeout=select_timeout) + except Exception: + sys.exit(-2) + # temporization: no change after 'timeout' seconds -> commit any accumulated changes + if not m and config_changed: + write_configuration_file(r.lrange(redis_key, 0, -1)) + config_changed = False + select_timeout = fake_infinite + if m and m['type'] == "message": + if m['channel'] != subscription: + print "WTF: unexpected case" + continue + config_changed = True + select_timeout = temporization_duration + # some debugs for now + print "-------------------- config change: ", + if m["data"] in delete_operations: + print "DELETE" + else: + print "" + v = r.lrange(redis_key, 0, -1) + for value in v: + print value + +except redis.exceptions.ConnectionError as e: + sys.exit(-2) + + diff --git a/dockers/docker-snmp-sv2/supervisord.conf b/dockers/docker-snmp-sv2/supervisord.conf index d8057950610..b760d5c0453 100644 --- a/dockers/docker-snmp-sv2/supervisord.conf +++ b/dockers/docker-snmp-sv2/supervisord.conf @@ -11,6 +11,15 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog +[program:snmpd-config-updater] +command=/usr/bin/snmpd-config-updater +priority=1 +autostart=true +autorestart=unexpected +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog + [program:rsyslogd] command=/usr/sbin/rsyslogd -n priority=2 diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index a2bea7a6baa..218386baa1a 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -224,6 +224,18 @@ if [ "$image_type" = "aboot" ]; then sudo sed -i 's/udevadm settle/udevadm settle -E \/sys\/class\/net\/eth0/' $FILESYSTEM_ROOT/etc/init.d/networking fi +# Service to update the sshd config file based on database changes +sudo cp $IMAGE_CONFIGS/ssh/sshd-config-updater.service $FILESYSTEM_ROOT/etc/systemd/system +sudo mkdir -p $FILESYSTEM_ROOT/etc/systemd/system/multi-user.target.wants +cd $FILESYSTEM_ROOT/etc/systemd/system/multi-user.target.wants/ +sudo ln -s ../sshd-config-updater.service sshd-config-updater.service +cd - +sudo cp $IMAGE_CONFIGS/ssh/sshd-config-updater $FILESYSTEM_ROOT/usr/bin/ +sudo chmod +x $FILESYSTEM_ROOT/usr/bin/sshd-config-updater +sudo cp $IMAGE_CONFIGS/ssh/sshd-clear-denied-sessions $FILESYSTEM_ROOT/usr/bin +sudo chmod +x $FILESYSTEM_ROOT/usr/bin/sshd-clear-denied-sessions +sudo cp src/libwrap/tcp-wrappers-7.6.q/tcpdmatch $FILESYSTEM_ROOT/usr/bin + ## copy platform rc.local sudo cp $IMAGE_CONFIGS/platform/rc.local $FILESYSTEM_ROOT/etc/ diff --git a/files/image_config/ssh/sshd-clear-denied-sessions b/files/image_config/ssh/sshd-clear-denied-sessions new file mode 100755 index 00000000000..76226e7fc69 --- /dev/null +++ b/files/image_config/ssh/sshd-clear-denied-sessions @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +""" +This utility will find the ip addresses of all hosts that have connected to +this device via ssh, then validate they are still in the list of allowed prefixes, +and if not kill the ssh session with a SIGHUP. +""" + +import os +import re +import subprocess + +# Run utmpdump, capture and return its output +def run_utmpdump(_utmpFilename): + devnull = file("/dev/null", "w" ) + p = subprocess.Popen(args=["utmpdump", _utmpFilename], stdout=subprocess.PIPE, stderr=devnull) + (stdout, stderr) = p.communicate() + rc = p.returncode + assert rc is not None # because p.communicate() should wait. + out = (stdout or '') + (stderr or '') + if rc: + e = SystemCommandError("%r: error code %d" % (" ".join(argv), rc)) + e.error = rc + e.output = out + raise e + return stdout + +# Run utmpdump and parse its output into a list of dicts and return that +def get_utmp_data(utmpFileName=None): + """Reads the specified utmp file. + Returns a list of dictionaries, one for each utmp entry. + All dictionary keys and values are strings + Values are right padded with spaces and may contain all + spaces if that utmp field is empty. + Dictionary keys: + "type": See UTMP_TYPE_* above + "pid": Process ID as a string + "tty": TTY (line) name - device name of tty w/o "/dev/" + "tty4": 4 char abbreivated TTY (line) name + "user": User ID + "host": Hostname for remote login, + kernel release for Run Level and Boot Time + "ipAddr": IP Address + "time": Time and date entry was made + See linux docs on utmp and utmpdemp for more info. + Example output from utmpdump: + pid tty4 user tty host ipAddr time + [7] [22953] [/238] [myname ] [pts/238 ] [example.com] [253.122.98.159 ] [Mon Dec 18 21:08:09 2017 PST] + """ + if not utmpFileName: + utmpFileName = os.environ.get( "DEFAULT_UTMP_FILE", "/var/run/utmp" ) + if not os.path.exists(utmpFileName): + return [] + output = run_utmpdump(utmpFileName) + lines = re.split("\n", output) + regExp = re.compile( + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P" r"[^\]]*?)\s*\] " \ + r"\[(?P" r"[^\]]*?)\s*\] \[(?P