diff --git a/.gitattributes b/.gitattributes index cdd40f8b2ee3244dd3d42ab3d2c9b946ba2ccad8..f7a1db898fda6a623a0568cad752056b933c6f2d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4289,7 +4289,6 @@ RTCP/Cobalt/GPUProc/src/scripts/runObservation.sh eol=lf RTCP/Cobalt/GPUProc/src/scripts/setloglevels.sh eol=lf RTCP/Cobalt/GPUProc/src/scripts/startBGL.sh eol=lf RTCP/Cobalt/GPUProc/src/scripts/startstopkeys.sh eol=lf -RTCP/Cobalt/GPUProc/src/scripts/station_routes.sh eol=lf RTCP/Cobalt/GPUProc/src/scripts/stopBGL.sh eol=lf RTCP/Cobalt/GPUProc/src/scripts/watchlogs.sh eol=lf RTCP/Cobalt/GPUProc/test/Kernels/CsvData.py eol=lf diff --git a/MAC/Deployment/data/StaticMetaData/RSPConnections_Cobalt.dat b/MAC/Deployment/data/StaticMetaData/RSPConnections_Cobalt.dat index 9a94f76e3c54b2f1a128462571e4b2e23accd37e..38dbc036b2de2c5f6d4f460265722ebd9534dacb 100644 --- a/MAC/Deployment/data/StaticMetaData/RSPConnections_Cobalt.dat +++ b/MAC/Deployment/data/StaticMetaData/RSPConnections_Cobalt.dat @@ -175,47 +175,47 @@ RS508 RSP_0 cbt008-10GB03 10.168.103.3 A0:36:9F:1F:7B:68 RS509 RSP_0 cbt007-10GB04 10.168.102.4 A0:36:9F:1F:7B:3E # DE601 -> BG3 -DE601 RSP_0 cbt008-10GB04 10.211.1.50 A0:36:9F:1F:7B:6A -DE601 RSP_0 cbt008-10GB04 10.212.1.50 A0:36:9F:1F:7B:6A -DE601 RSP_0 cbt008-10GB04 10.213.1.50 A0:36:9F:1F:7B:6A -DE601 RSP_0 cbt008-10GB04 10.214.1.50 A0:36:9F:1F:7B:6A +DE601 RSP_0 cbt008-10GB04 10.211.1.108 A0:36:9F:1F:7B:6A +DE601 RSP_0 cbt008-10GB04 10.212.1.108 A0:36:9F:1F:7B:6A +DE601 RSP_0 cbt008-10GB04 10.213.1.108 A0:36:9F:1F:7B:6A +DE601 RSP_0 cbt008-10GB04 10.214.1.108 A0:36:9F:1F:7B:6A # DE602 -> BG1 -DE602 RSP_0 cbt003-10GB04 10.200.41.50 A0:36:9F:1F:7B:42 +DE602 RSP_0 cbt003-10GB04 10.200.41.103 A0:36:9F:1F:7B:42 # DE603 -> BG1 -DE603 RSP_0 cbt004-10GB04 10.211.3.50 A0:36:9F:1F:7A:06 -DE603 RSP_0 cbt004-10GB04 10.212.3.50 A0:36:9F:1F:7A:06 -DE603 RSP_0 cbt004-10GB04 10.213.3.50 A0:36:9F:1F:7A:06 -DE603 RSP_0 cbt004-10GB04 10.214.3.50 A0:36:9F:1F:7A:06 +DE603 RSP_0 cbt004-10GB04 10.211.1.104 A0:36:9F:1F:7A:06 +DE603 RSP_0 cbt004-10GB04 10.212.1.104 A0:36:9F:1F:7A:06 +DE603 RSP_0 cbt004-10GB04 10.213.1.104 A0:36:9F:1F:7A:06 +DE603 RSP_0 cbt004-10GB04 10.214.1.104 A0:36:9F:1F:7A:06 # DE604 -> BG1 -DE604 RSP_0 cbt003-10GB04 10.200.81.50 A0:36:9F:1F:7B:42 +DE604 RSP_0 cbt003-10GB04 10.200.81.103 A0:36:9F:1F:7B:42 # DE605 -> BG3 -DE605 RSP_0 cbt008-10GB04 10.211.5.50 A0:36:9F:1F:7B:6A -DE605 RSP_0 cbt008-10GB04 10.212.5.50 A0:36:9F:1F:7B:6A -DE605 RSP_0 cbt008-10GB04 10.213.5.50 A0:36:9F:1F:7B:6A -DE605 RSP_0 cbt008-10GB04 10.214.5.50 A0:36:9F:1F:7B:6A +DE605 RSP_0 cbt008-10GB04 10.211.1.108 A0:36:9F:1F:7B:6A +DE605 RSP_0 cbt008-10GB04 10.212.1.108 A0:36:9F:1F:7B:6A +DE605 RSP_0 cbt008-10GB04 10.213.1.108 A0:36:9F:1F:7B:6A +DE605 RSP_0 cbt008-10GB04 10.214.1.108 A0:36:9F:1F:7B:6A # FR606 -> BG2 -FR606 RSP_0 cbt005-10GB04 10.211.6.50 A0:36:9F:1F:79:E2 -FR606 RSP_0 cbt005-10GB04 10.212.6.50 A0:36:9F:1F:79:E2 -FR606 RSP_0 cbt005-10GB04 10.213.6.50 A0:36:9F:1F:79:E2 -FR606 RSP_0 cbt005-10GB04 10.214.6.50 A0:36:9F:1F:79:E2 +FR606 RSP_0 cbt005-10GB04 10.211.1.105 A0:36:9F:1F:79:E2 +FR606 RSP_0 cbt005-10GB04 10.212.1.105 A0:36:9F:1F:79:E2 +FR606 RSP_0 cbt005-10GB04 10.213.1.105 A0:36:9F:1F:79:E2 +FR606 RSP_0 cbt005-10GB04 10.214.1.105 A0:36:9F:1F:79:E2 # SE607 -> BG2 -SE607 RSP_0 cbt004-10GB04 10.211.7.50 A0:36:9F:1F:7A:06 -SE607 RSP_0 cbt004-10GB04 10.212.7.50 A0:36:9F:1F:7A:06 -SE607 RSP_0 cbt004-10GB04 10.213.7.50 A0:36:9F:1F:7A:06 -SE607 RSP_0 cbt004-10GB04 10.214.7.50 A0:36:9F:1F:7A:06 +SE607 RSP_0 cbt004-10GB04 10.211.1.104 A0:36:9F:1F:7A:06 +SE607 RSP_0 cbt004-10GB04 10.212.1.104 A0:36:9F:1F:7A:06 +SE607 RSP_0 cbt004-10GB04 10.213.1.104 A0:36:9F:1F:7A:06 +SE607 RSP_0 cbt004-10GB04 10.214.1.104 A0:36:9F:1F:7A:06 # UK608 -> BG2 -UK608 RSP_0 cbt005-10GB04 10.211.8.50 A0:36:9F:1F:79:E2 -UK608 RSP_0 cbt005-10GB04 10.212.8.50 A0:36:9F:1F:79:E2 -UK608 RSP_0 cbt005-10GB04 10.213.8.50 A0:36:9F:1F:79:E2 -UK608 RSP_0 cbt005-10GB04 10.214.8.50 A0:36:9F:1F:79:E2 - -# DE609 -> BG2 (NON-OFFICIAL!!!!) -DE609 RSP_0 cbt008-10GB04 10.200.91.50 A0:36:9F:1F:7B:6A -DE609 RSP_0 cbt008-10GB04 10.200.92.50 A0:36:9F:1F:7B:6A +UK608 RSP_0 cbt005-10GB04 10.211.1.105 A0:36:9F:1F:79:E2 +UK608 RSP_0 cbt005-10GB04 10.212.1.105 A0:36:9F:1F:79:E2 +UK608 RSP_0 cbt005-10GB04 10.213.1.105 A0:36:9F:1F:79:E2 +UK608 RSP_0 cbt005-10GB04 10.214.1.105 A0:36:9F:1F:79:E2 + +# DE609 -> BG2 +DE609 RSP_0 cbt008-10GB04 10.200.91.108 A0:36:9F:1F:7B:6A +DE609 RSP_0 cbt008-10GB04 10.200.92.108 A0:36:9F:1F:7B:6A diff --git a/MAC/Deployment/data/StaticMetaData/createFiles b/MAC/Deployment/data/StaticMetaData/createFiles index e0a71e8a39d83c5ee181331177afa97d59525081..f7b071bcf8bf7f412e83259b2a3ab13e7a84e23c 100755 --- a/MAC/Deployment/data/StaticMetaData/createFiles +++ b/MAC/Deployment/data/StaticMetaData/createFiles @@ -317,12 +317,12 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_MAC@", mac +" # "+ node) RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_IP@", dstip) RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_PORT@", str(basePort + 6 + rspNr)) - RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_BLET@", blet_out) + RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_BLET@", blet_out) for rspNr in range(4): if is_int_station and is_Cobalt: # Cobalt nodes are part of the international station VLANs, - # allowing routing to x.x.x.50 (with x.x.x.x being the RSP board IPs). + # allowing routing to x.x.x.100 to x.x.x.110 (with x.x.x.x being the RSP board IPs). # # intl nodes can have 1, 2, or 4 entries if nrNodes == 1: @@ -342,11 +342,13 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): #print node, ip, mac blet_out = find_Blets(stationName, dataDir)[1+rspNr]; RSPconfig = RSPconfig.replace("@LANE_0"+str(rspNr)+"_MAC@", mac +" # "+node) - # Need to fill this in until RSPDriver is fixed... - RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_BLET@", blet_out) RSPconfig = RSPconfig.replace("@LANE_0"+str(rspNr)+"_IP@", dstip) RSPconfig = RSPconfig.replace("@LANE_0"+str(rspNr)+"_PORT@", str(basePort + rspNr)) RSPconfig = RSPconfig.replace("@LANE_0"+str(rspNr)+"_BLET@", blet_out) + + # Need to fill this in until RSPDriver is fixed... + RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_BLET@", blet_out) + # The following is only necessary for not crashing the # RSPDriver during startup.... It makes no sense as RS/Int # stations have no splitter so there is no LANE_1X @@ -355,31 +357,29 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_IP@", dstip) RSPconfig = RSPconfig.replace("@LANE_1"+str(rspNr)+"_PORT@", str(basePort + 6 + rspNr)) - - # Find IP address for RSP board ethernet. All NL stations have RSP address # like 10.175.x.x, Non-NL station must be looked up if not is_int_station: ip_prefix = "175" # NL stations; FIXED! + # SOURCE IP contains information on which Cobalt iface to send to, to help + # Cobalt route the packet. + for rspNr in range(4): + dstip = IPandMAC[0][1] + dstiface = dstip.split('.')[3] # 1 = 10GB01 ... 4 = 10GB04 + RSPconfig = RSPconfig.replace("@IP_SUBNET_0"+str(rspNr)+"@", dstiface) + # Core stations should have Splitter set to 1; others to 0. - if (stationName[0:2].upper() == "CS"): - RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", "1") - RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", "2") - RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", "3") - RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", "4") - RSPconfig = RSPconfig.replace("@IP_EXTEN_10@", "7") - RSPconfig = RSPconfig.replace("@IP_EXTEN_11@", "8") - RSPconfig = RSPconfig.replace("@IP_EXTEN_12@", "9") - RSPconfig = RSPconfig.replace("@IP_EXTEN_13@", "10") + if is_core_station: RSPconfig = RSPconfig.replace("@LAST_XLET_OUT@", "11") - - else: - RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", "1") - RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", "2") - RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", "3") - RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", "4") - + + # SOURCE IP contains information on which Cobalt iface to send to, to help + # Cobalt route the packet. + for rspNr in range(4): + dstip = IPandMAC[1][1] + dstiface = dstip.split('.')[3] # 1 = 10GB01 ... 4 = 10GB04 + RSPconfig = RSPconfig.replace("@IP_SUBNET_1"+str(rspNr)+"@", dstiface) + RSPconfig = RSPconfig.replace("@IP_EXTEN_1"+str(rspNr)+"@", ip_parts[2]) hexStationID = str("%02x" % int(stationName[3:6])) ringID = '0'+stationName[2] @@ -390,13 +390,14 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): RSPconfig = RSPconfig.replace("@IP_PREFIX_01@", ip_prefix) RSPconfig = RSPconfig.replace("@IP_PREFIX_02@", ip_prefix) RSPconfig = RSPconfig.replace("@IP_PREFIX_03@", ip_prefix) - RSPconfig = RSPconfig.replace("@IP_SUBNET_00@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_01@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_02@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_03@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", ip_parts[2]) RSPconfig = RSPconfig.replace("@FIRST_XLET_OUT@", "5") else: # Non-NL station - hexStationID = str("%02x" % int(stationName[3:6])) + int_station_nr = int(stationName[3:6]) % 100 # DE605 -> 5 + hexStationID = str("%02x" % int_station_nr) ringID = '0'+stationName[2] RSPconfig = RSPconfig.replace("@STATION_NAME@", stationName.upper()) RSPconfig = RSPconfig.replace("@RING_ID@", ringID) @@ -409,6 +410,8 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): IPandMAC = findIPandMAC_local(stationName,dataDir) else: IPandMAC = findIPandMAC_station(stationName, dataDir) + + int_station_nr = int(stationName[3:6]) % 100 # DE605 -> 5 nrNodes = len(IPandMAC) # Number of occurences in file for rspNr in range(4): @@ -424,13 +427,17 @@ def createRSPDriverFile(resultDir, stationName, dataDir,int_local,is_Cobalt): srcip = IPandMAC[rspNr][1] srcip_suffix = 1 - rspip_parts = srcip.split('.') - repl_str = "@IP_EXTEN_0"+str(rspNr)+"@" - RSPconfig = RSPconfig.replace(repl_str, str(srcip_suffix)) + rspip_parts = srcip.split('.') repl_str = "@IP_PREFIX_0"+str(rspNr)+"@" RSPconfig = RSPconfig.replace(repl_str, rspip_parts[1]) repl_str = "@IP_SUBNET_0"+str(rspNr)+"@" - RSPconfig = RSPconfig.replace(repl_str, rspip_parts[2]) + if int(rspip_parts[2]) > 1: + RSPconfig = RSPconfig.replace(repl_str, rspip_parts[2]) + else: + # Some stations share VLANs, and get srcip 10.vlan.1.board, which would be equal for all stations. In those cases we will use srcip 10.vlan.stationnr.board + RSPconfig = RSPconfig.replace(repl_str, str(int_station_nr)) + repl_str = "@IP_EXTEN_0"+str(rspNr)+"@" + RSPconfig = RSPconfig.replace(repl_str, str(srcip_suffix)) outFile = os.open(dataDir+"/RSPDriver.conf.tmp", os.O_RDWR|os.O_CREAT|os.O_TRUNC) os.write(outFile, RSPconfig) @@ -492,22 +499,23 @@ def createRSPDriverFile_Test(resultDir, stationName, dataDir, alias): if not is_int_station: ip_prefix = "175" # NL stations; FIXED! + # SOURCE IP contains information on which Cobalt iface to send to, to help + # Cobalt route the packet. + for rspNr in range(4): + dstip = IPandMAC[0][1] + dstiface = dstip.split('.')[3] # 1 = 10GB01 ... 4 = 10GB04 + RSPconfig = RSPconfig.replace("@IP_SUBNET_0"+str(rspNr)+"@", dstiface) + # Core stations should have Splitter set to 1; others to 0. - if (stationName[0:2].upper() == "CS"): - RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", "1") - RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", "2") - RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", "3") - RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", "4") - RSPconfig = RSPconfig.replace("@IP_EXTEN_10@", "7") - RSPconfig = RSPconfig.replace("@IP_EXTEN_11@", "8") - RSPconfig = RSPconfig.replace("@IP_EXTEN_12@", "9") - RSPconfig = RSPconfig.replace("@IP_EXTEN_13@", "10") + if is_core_station: RSPconfig = RSPconfig.replace("@LAST_XLET_OUT@", "11") - else: - RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", "1") - RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", "2") - RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", "3") - RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", "4") + + # SOURCE IP contains information on which Cobalt iface to send to, to help + # Cobalt route the packet. + for rspNr in range(4): + dstip = IPandMAC[1][1] + dstiface = dstip.split('.')[3] # 1 = 10GB01 ... 4 = 10GB04 + RSPconfig = RSPconfig.replace("@IP_SUBNET_1"+str(rspNr)+"@", dstiface) hexStationID = str("%02x" % int(stationName[3:6])) ringID = '0'+stationName[2] @@ -518,14 +526,15 @@ def createRSPDriverFile_Test(resultDir, stationName, dataDir, alias): RSPconfig = RSPconfig.replace("@IP_PREFIX_01@", ip_prefix) RSPconfig = RSPconfig.replace("@IP_PREFIX_02@", ip_prefix) RSPconfig = RSPconfig.replace("@IP_PREFIX_03@", ip_prefix) - RSPconfig = RSPconfig.replace("@IP_SUBNET_00@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_01@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_02@", ip_parts[2]) - RSPconfig = RSPconfig.replace("@IP_SUBNET_03@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_00@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_01@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_02@", ip_parts[2]) + RSPconfig = RSPconfig.replace("@IP_EXTEN_03@", ip_parts[2]) RSPconfig = RSPconfig.replace("@FIRST_XLET_OUT@", "5") else: # Non-NL station - hexStationID = str("%02x" % int(stationName[3:6])) + int_station_nr = int(stationName[3:6]) % 100 # DE605 -> 5 + hexStationID = str("%02x" % int_station_nr) ringID = '0'+stationName[2] RSPconfig = RSPconfig.replace("@STATION_NAME@", stationName.upper()) RSPconfig = RSPconfig.replace("@RING_ID@", ringID) @@ -548,12 +557,16 @@ def createRSPDriverFile_Test(resultDir, stationName, dataDir, alias): srcip_suffix = 1 rspip_parts = srcip.split('.') - repl_str = "@IP_EXTEN_0"+str(rspNr)+"@" - RSPconfig = RSPconfig.replace(repl_str, str(srcip_suffix)) repl_str = "@IP_PREFIX_0"+str(rspNr)+"@" RSPconfig = RSPconfig.replace(repl_str, rspip_parts[1]) repl_str = "@IP_SUBNET_0"+str(rspNr)+"@" - RSPconfig = RSPconfig.replace(repl_str, rspip_parts[2]) + if int(rspip_parts[2]) > 1: + RSPconfig = RSPconfig.replace(repl_str, rspip_parts[2]) + else: + # Some stations share VLANs, and get srcip 10.vlan.1.board, which would be equal for all stations. In those cases we will use srcip 10.vlan.stationnr.board + RSPconfig = RSPconfig.replace(repl_str, str(int_station_nr)) + repl_str = "@IP_EXTEN_0"+str(rspNr)+"@" + RSPconfig = RSPconfig.replace(repl_str, str(srcip_suffix)) outFile = os.open(dataDir+"/RSPDriver.conf.tmp", os.O_RDWR|os.O_CREAT|os.O_TRUNC) os.write(outFile, RSPconfig) diff --git a/RTCP/Cobalt/GPUProc/etc/parset-additions.d/default/StationStreams.parset b/RTCP/Cobalt/GPUProc/etc/parset-additions.d/default/StationStreams.parset index f0db9a41fa82b54d7639b905782ca5cbc5084f39..e1f86d069fc8cca339bb9df01f4a225534a28468 100644 --- a/RTCP/Cobalt/GPUProc/etc/parset-additions.d/default/StationStreams.parset +++ b/RTCP/Cobalt/GPUProc/etc/parset-additions.d/default/StationStreams.parset @@ -191,33 +191,33 @@ PIC.Core.CS501HBA1.RSP.ports = [udp:cbt006-10GB03:15016, udp:cbt006-10GB03:15 PIC.Core.CS501HBA1.RSP.receiver = cbt006_1 PIC.Core.CS501LBA.RSP.ports = [udp:cbt006-10GB03:15010, udp:cbt006-10GB03:15011, udp:cbt006-10GB03:15012, udp:cbt006-10GB03:15013] PIC.Core.CS501LBA.RSP.receiver = cbt006_1 -PIC.Core.DE601HBA.RSP.ports = [udp:10.211.1.50:16010, udp:10.212.1.50:16011, udp:10.213.1.50:16012, udp:10.214.1.50:16013] +PIC.Core.DE601HBA.RSP.ports = [udp:10.211.1.108:16010, udp:10.212.1.108:16011, udp:10.213.1.108:16012, udp:10.214.1.108:16013] PIC.Core.DE601HBA.RSP.receiver = cbt008_1 -PIC.Core.DE601LBA.RSP.ports = [udp:10.211.1.50:16010, udp:10.212.1.50:16011, udp:10.213.1.50:16012, udp:10.214.1.50:16013] +PIC.Core.DE601LBA.RSP.ports = [udp:10.211.1.108:16010, udp:10.212.1.108:16011, udp:10.213.1.108:16012, udp:10.214.1.108:16013] PIC.Core.DE601LBA.RSP.receiver = cbt008_1 -PIC.Core.DE602HBA.RSP.ports = [udp:10.200.41.50:16020, udp:10.200.41.50:16021, udp:10.200.41.50:16022, udp:10.200.41.50:16023] +PIC.Core.DE602HBA.RSP.ports = [udp:10.200.41.103:16020, udp:10.200.41.103:16021, udp:10.200.41.103:16022, udp:10.200.41.103:16023] PIC.Core.DE602HBA.RSP.receiver = cbt003_1 -PIC.Core.DE602LBA.RSP.ports = [udp:10.200.41.50:16020, udp:10.200.41.50:16021, udp:10.200.41.50:16022, udp:10.200.41.50:16023] +PIC.Core.DE602LBA.RSP.ports = [udp:10.200.41.103:16020, udp:10.200.41.103:16021, udp:10.200.41.103:16022, udp:10.200.41.103:16023] PIC.Core.DE602LBA.RSP.receiver = cbt003_1 -PIC.Core.DE603HBA.RSP.ports = [udp:10.211.3.50:16030, udp:10.212.3.50:16031, udp:10.213.3.50:16032, udp:10.214.3.50:16033] +PIC.Core.DE603HBA.RSP.ports = [udp:10.211.1.104:16030, udp:10.212.1.104:16031, udp:10.213.1.104:16032, udp:10.214.1.104:16033] PIC.Core.DE603HBA.RSP.receiver = cbt004_1 -PIC.Core.DE603LBA.RSP.ports = [udp:10.211.3.50:16030, udp:10.212.3.50:16031, udp:10.213.3.50:16032, udp:10.214.3.50:16033] +PIC.Core.DE603LBA.RSP.ports = [udp:10.211.1.104:16030, udp:10.212.1.104:16031, udp:10.213.1.104:16032, udp:10.214.1.104:16033] PIC.Core.DE603LBA.RSP.receiver = cbt004_1 -PIC.Core.DE604HBA.RSP.ports = [udp:10.200.81.50:16040, udp:10.200.81.50:16041, udp:10.200.81.50:16042, udp:10.200.81.50:16043] +PIC.Core.DE604HBA.RSP.ports = [udp:10.200.81.103:16040, udp:10.200.81.103:16041, udp:10.200.81.103:16042, udp:10.200.81.103:16043] PIC.Core.DE604HBA.RSP.receiver = cbt003_1 -PIC.Core.DE604LBA.RSP.ports = [udp:10.200.81.50:16040, udp:10.200.81.50:16041, udp:10.200.81.50:16042, udp:10.200.81.50:16043] +PIC.Core.DE604LBA.RSP.ports = [udp:10.200.81.103:16040, udp:10.200.81.103:16041, udp:10.200.81.103:16042, udp:10.200.81.103:16043] PIC.Core.DE604LBA.RSP.receiver = cbt003_1 -PIC.Core.DE605HBA.RSP.ports = [udp:10.211.5.50:16050, udp:10.212.5.50:16051, udp:10.213.5.50:16052, udp:10.214.5.50:16053] +PIC.Core.DE605HBA.RSP.ports = [udp:10.211.1.108:16050, udp:10.212.1.108:16051, udp:10.213.1.108:16052, udp:10.214.1.108:16053] PIC.Core.DE605HBA.RSP.receiver = cbt008_1 -PIC.Core.DE605LBA.RSP.ports = [udp:10.211.5.50:16050, udp:10.212.5.50:16051, udp:10.213.5.50:16052, udp:10.214.5.50:16053] +PIC.Core.DE605LBA.RSP.ports = [udp:10.211.1.108:16050, udp:10.212.1.108:16051, udp:10.213.1.108:16052, udp:10.214.1.108:16053] PIC.Core.DE605LBA.RSP.receiver = cbt008_1 -PIC.Core.DE609HBA.RSP.ports = [udp:10.200.91.50:16090, udp:10.200.91.50:16091, udp:10.200.92.50:16092, udp:10.200.92.50:16093] +PIC.Core.DE609HBA.RSP.ports = [udp:10.200.91.108:16090, udp:10.200.91.108:16091, udp:10.200.92.108:16092, udp:10.200.92.108:16093] PIC.Core.DE609HBA.RSP.receiver = cbt008_1 -PIC.Core.DE609LBA.RSP.ports = [udp:10.200.91.50:16090, udp:10.200.91.50:16091, udp:10.200.92.50:16092, udp:10.200.92.50:16093] +PIC.Core.DE609LBA.RSP.ports = [udp:10.200.91.108:16090, udp:10.200.91.108:16091, udp:10.200.92.108:16092, udp:10.200.92.108:16093] PIC.Core.DE609LBA.RSP.receiver = cbt008_1 -PIC.Core.FR606HBA.RSP.ports = [udp:10.211.6.50:16060, udp:10.212.6.50:16061, udp:10.213.6.50:16062, udp:10.214.6.50:16063] +PIC.Core.FR606HBA.RSP.ports = [udp:10.211.1.105:16060, udp:10.212.1.105:16061, udp:10.213.1.105:16062, udp:10.214.1.105:16063] PIC.Core.FR606HBA.RSP.receiver = cbt005_1 -PIC.Core.FR606LBA.RSP.ports = [udp:10.211.6.50:16060, udp:10.212.6.50:16061, udp:10.213.6.50:16062, udp:10.214.6.50:16063] +PIC.Core.FR606LBA.RSP.ports = [udp:10.211.1.105:16060, udp:10.212.1.105:16061, udp:10.213.1.105:16062, udp:10.214.1.105:16063] PIC.Core.FR606LBA.RSP.receiver = cbt005_1 PIC.Core.RS104HBA.RSP.ports = [udp:cbt002-10GB03:11040, udp:cbt002-10GB03:11041, udp:cbt002-10GB03:11042, udp:cbt002-10GB03:11043] PIC.Core.RS104HBA.RSP.receiver = cbt002_1 @@ -283,11 +283,11 @@ PIC.Core.RS509HBA.RSP.ports = [udp:cbt007-10GB04:15090, udp:cbt007-10GB04:15 PIC.Core.RS509HBA.RSP.receiver = cbt007_1 PIC.Core.RS509LBA.RSP.ports = [udp:cbt007-10GB04:15090, udp:cbt007-10GB04:15091, udp:cbt007-10GB04:15092, udp:cbt007-10GB04:15093] PIC.Core.RS509LBA.RSP.receiver = cbt007_1 -PIC.Core.SE607HBA.RSP.ports = [udp:10.211.7.50:16070, udp:10.212.7.50:16071, udp:10.213.7.50:16072, udp:10.214.7.50:16073] +PIC.Core.SE607HBA.RSP.ports = [udp:10.211.1.104:16070, udp:10.212.1.104:16071, udp:10.213.1.104:16072, udp:10.214.1.104:16073] PIC.Core.SE607HBA.RSP.receiver = cbt004_1 -PIC.Core.SE607LBA.RSP.ports = [udp:10.211.7.50:16070, udp:10.212.7.50:16071, udp:10.213.7.50:16072, udp:10.214.7.50:16073] +PIC.Core.SE607LBA.RSP.ports = [udp:10.211.1.104:16070, udp:10.212.1.104:16071, udp:10.213.1.104:16072, udp:10.214.1.104:16073] PIC.Core.SE607LBA.RSP.receiver = cbt004_1 -PIC.Core.UK608HBA.RSP.ports = [udp:10.211.8.50:16080, udp:10.212.8.50:16081, udp:10.213.8.50:16082, udp:10.214.8.50:16083] +PIC.Core.UK608HBA.RSP.ports = [udp:10.211.1.105:16080, udp:10.212.1.105:16081, udp:10.213.1.105:16082, udp:10.214.1.105:16083] PIC.Core.UK608HBA.RSP.receiver = cbt005_1 -PIC.Core.UK608LBA.RSP.ports = [udp:10.211.8.50:16080, udp:10.212.8.50:16081, udp:10.213.8.50:16082, udp:10.214.8.50:16083] +PIC.Core.UK608LBA.RSP.ports = [udp:10.211.1.105:16080, udp:10.212.1.105:16081, udp:10.213.1.105:16082, udp:10.214.1.105:16083] PIC.Core.UK608LBA.RSP.receiver = cbt005_1 diff --git a/RTCP/Cobalt/GPUProc/src/CMakeLists.txt b/RTCP/Cobalt/GPUProc/src/CMakeLists.txt index 38c412c752b20e57d4d0234e254c3ff85eb9a2dd..77e2bb33caedd7c73f302d8c1f87b035ff23901e 100644 --- a/RTCP/Cobalt/GPUProc/src/CMakeLists.txt +++ b/RTCP/Cobalt/GPUProc/src/CMakeLists.txt @@ -140,7 +140,6 @@ install(PROGRAMS scripts/Cobalt_install.sh scripts/CobaltVersions.sh scripts/setloglevels.sh - scripts/station_routes.sh DESTINATION sbin) # install logprop files diff --git a/RTCP/Cobalt/GPUProc/src/scripts/station_routes.sh b/RTCP/Cobalt/GPUProc/src/scripts/station_routes.sh deleted file mode 100755 index 95ab5c04f849ccc969c635e5c49f29ec8811abe2..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/scripts/station_routes.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/bash - -# Just a note containing all stations -ALLSTATIONS=" - CS001 - CS002 CS003 CS004 CS005 CS006 CS007 - CS011 CS013 CS017 - CS021 CS024 CS026 CS028 - CS030 CS031 CS032 - CS101 CS103 - CS201 - CS301 CS302 - CS401 - CS501 - RS106 - RS205 RS208 RS210 - RS305 RS306 RS307 RS310 - RS406 RS407 RS409 - RS503 RS508 RS509 - - DE601 DE602 DE603 DE604 DE605 - FR606 SE607 UK608 -" - -function error { - echo "$@" >&2 - exit 1 -} - -# Return the control IP of a certain station (CS001) -function station_ip { - STATION="$1" - - host "$STATION"c | cut -d\ -f 4 -} - -# Extract the station name (CS001) from a full field name (CS001HBA1) -function fullfield_to_station { - FULLFIELD="$1" - echo "$FULLFIELD" | cut -c1-5 -} - -# Extract the field name (HBA1) from a full field name (CS001HBA1) -function fullfield_to_field { - FULLFIELD="$1" - echo "$FULLFIELD" | cut -c6- -} - -# Return the list of IP suffices for a certain field (HBA1) -function field_ip_suffices { - FIELD="$1" - - case "$FIELD" in - "HBA1") echo "7 8 9 10"; - ;; - *) echo "1 2 3 4"; - esac -} - -# Return all IPs for a certain full field name (CS001HBA1) -function fullfield_to_ips { - FULLFIELD="$1" - STATION=`fullfield_to_station "$FULLFIELD"` - STATIONIP=`station_ip "$STATION"` - FIELD=`fullfield_to_field "$FULLFIELD"` - FIELDSUFFICES=`field_ip_suffices "$FIELD"` - - for SUFFIX in $FIELDSUFFICES - do - echo "$STATIONIP" | sed "s/151/175/; s/[.][0-9]*$/.$SUFFIX/" - done -} - -function usage { - echo "$0: Configure the routing table on a Cobalt node to receive specific antenna fields." - echo "" - echo "Usage: $0 -a -i IFACE FIELD [FIELD...]" - echo " Adds a FIELD (CS002HBA1, etc) to arrive on interface IFACE (eth2, or cbt009-10GB01, etc). [needs root]" - echo "" - echo "Usage: $0 -d FIELD [FIELD...]" - echo " Delete a FIELD (CS002HBA1, etc) to arrive on this node. [needs root]" - echo "" - echo "Usage: $0 -l" - echo " List the fields that arrive on this node." - echo "" - echo "Note: Only routes for HBA fields have to be considered for correct operation. The LBA configuration" - echo " overlaps with the HBA(0) fields." - exit 1 -} - -IFACE="" -ADD=0 -DELETE=0 -LIST=0 - -while getopts "dahli:" opt; do - case $opt in - h) usage - ;; - i) IFACE="$OPTARG" - ;; - a) ADD=1 - ;; - d) DELETE=1 - ;; - l) LIST=1 - ;; - esac -done -shift $((OPTIND-1)) - -if [ "$LIST" -eq 1 ]; then - ERROR=0 - - # List stations we're receiving - for IFACE in eth2 eth3 eth4 eth5 - do - IPS=`ip route show dev $IFACE | cut -d\ -f 1` - for IP in $IPS - do - # convert to control interface - CONTROLIP=`echo $IP |sed 's/175/151/; s/[.][0-9]*$/.1/'` - - host "$CONTROLIP" >/dev/null || continue - - STATION=`host "$CONTROLIP" | cut -d\ -f 5 | cut -d. -f 1 | cut -c1-5 | tr a-z A-Z` - - SUFFIX=`echo $IP | cut -d. -f 4` - - if [ "${SUFFIX}" -le 4 ]; then - if [ "`echo "$STATION" | cut -c1,2`" == "CS" ]; then - FIELD=HBA0 - else - FIELD=HBA - fi - else - FIELD=HBA1 - fi - - FULLFIELDS="$FULLFIELDS $STATION$FIELD" - done - done - - # Check whether we receive all boards from all stations we receive something from - for FULLFIELD in `echo $FULLFIELDS | tr ' ' '\n' | sort | uniq` - do - echo "Checking routes for field $FULLFIELD..." - LASTIFACE="" - for IP in `fullfield_to_ips "$FULLFIELD"` - do - ROUTE=`ip route show $IP` - if [ -z "$ROUTE" ]; then - echo "ERROR: Missing route for $IP" - ERROR=1 - else - IFACE=`echo "$ROUTE" | awk '{ print $3; }'` - - if [ "$LASTIFACE" == "" ]; then - echo " Arrives on $IFACE" - elif [ "$IFACE" != "$LASTIFACE" ]; then - echo "ERROR: Route to $IP arrives on $IFACE, but previous board(s) arrive on $LASTIFACE" - ERROR=1 - fi - - LASTIFACE="$IFACE" - fi - done - done - - exit $ERROR -fi - -# Add stations to receive - -if [ "$ADD" -eq 1 ]; then - [ -z "$IFACE" ] && usage - - [ "`whoami`" == "root" ] || error "Need to be root." - - HOST=localhost - - # support cbt00X-10GB0Y notation (go to the relevant node) - if `echo "$IFACE" | fgrep -q -- '-'` - then - HOST=`echo "$IFACE" | cut -d- -f 1` - IFACE=`echo "$IFACE" | cut -d- -f 2 | sed 's/10GB01/eth2/i; s/10GB02/eth3/i; s/10GB03/eth4/i; s/10GB04/eth5/i;'` - fi - - for FULLFIELD in "$@" - do - echo "Adding routes for field $FULLFIELD..." - for IP in `fullfield_to_ips "$FULLFIELD"` - do - ssh $HOST ip route add $IP dev $IFACE - done - done - - exit 0 -fi - -if [ "$DELETE" -eq 1 ]; then - [ "`whoami`" == "root" ] || error "Need to be root." - - for FULLFIELD in "$@" - do - echo "Deleting routes for field $FULLFIELD..." - for IP in `fullfield_to_ips "$FULLFIELD"` - do - ip route del $IP - done - done - - exit 0 -fi - -usage