Skip to content

Commit

Permalink
[grenoble/wiki/fpga] Replace Ethernet-fpga by Ethernet-FPGA
Browse files Browse the repository at this point in the history
  • Loading branch information
berardbe committed May 20, 2022
1 parent 2643d8b commit 6bc296b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
Expand Up @@ -278,7 +278,7 @@
"device": "fpga0",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"interface": "Ethernet-FPGA",
"ip": "172.16.23.11",
"ip6": "2001:660:4406:100:8:1:0:1",
"kavlan": true,
Expand All @@ -299,7 +299,7 @@
"device": "fpga1",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"interface": "Ethernet-FPGA",
"ip": "172.16.23.21",
"ip6": "2001:660:4406:100:8:2:0:1",
"kavlan": true,
Expand Down
Expand Up @@ -278,7 +278,7 @@
"device": "fpga0",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"interface": "Ethernet-FPGA",
"ip": "172.16.23.12",
"ip6": "2001:660:4406:100:8:1:0:2",
"kavlan": true,
Expand All @@ -299,7 +299,7 @@
"device": "fpga1",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"interface": "Ethernet-FPGA",
"ip": "172.16.23.22",
"ip6": "2001:660:4406:100:8:2:0:2",
"kavlan": true,
Expand Down
4 changes: 2 additions & 2 deletions input/grid5000/sites/grenoble/clusters/servan/servan.yaml
Expand Up @@ -40,7 +40,7 @@ nodes:
mountable: false
mounted: false
fpga0:
interface: Ethernet-fpga
interface: Ethernet-FPGA
enabled: true
management: false
mountable: true
Expand All @@ -50,7 +50,7 @@ nodes:
sriov: false
sriov_totalvfs: 0
fpga1:
interface: Ethernet-fpga
interface: Ethernet-FPGA
management: false
enabled: true
mountable: true
Expand Down
8 changes: 3 additions & 5 deletions lib/refrepo/gen/wiki/generators/hardware.rb
Expand Up @@ -122,10 +122,8 @@ def generate_totals
net_models = interfaces.inject(Hash.new(0)){ |h, v| h[v] += 1; h }
# Sort by interface type (eth or IB) and then by driver
net_models.sort_by { |k, _v| [k.first[:sort], k[1][:sort]] }.each { |k, v|
if k.first[:text] == "Ethernet-fpga"
k.each_with_index { |_v, i|
k[i][:text] = k[i][:text] + "*"
}
if k.first[:text] == "Ethernet-FPGA"
k.first[:text] = k.first[:text] + "*"
end

init(data, 'net_models', k)
Expand Down Expand Up @@ -265,7 +263,7 @@ def generate_totals
generated_content += "\n== Network interface models ==\n"
table_columns = ['Type', 'Driver', 'Model'] + sites + ['Cards total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'net_models'))
generated_content += "\n''*: By default network interface on fpga card is not supported by OS''"
generated_content += "\n''*: By default network interface on FPGA card is not supported by OS''"
generated_content += "\n= Storage ="
generated_content += "\n== SSD models ==\n"
table_columns = ['SSD interface', 'Model', 'Size'] + sites + ['SSDs total']
Expand Down
8 changes: 4 additions & 4 deletions lib/refrepo/input_loader.rb
Expand Up @@ -421,7 +421,7 @@ def add_kavlan_ips(h)
raise "Old kavlan data in input/ for #{node_uid}" if hn.has_key?('kavlan')
node_id = node_uid.split('-')[1].to_i
hn['kavlan'] = {}
hn['network_adapters'].to_a.select { |i| i[1]['mountable'] and (i[1]['kavlan'] or not i[1].has_key?('kavlan')) and i[1]['interface'] =~ /(Ethernet-fpga|Ethernet)/ }.map { |e| e[0] }.each do |iface|
hn['network_adapters'].to_a.select { |i| i[1]['mountable'] and (i[1]['kavlan'] or not i[1].has_key?('kavlan')) and i[1]['interface'] =~ /(Ethernet-FPGA|Ethernet)/ }.map { |e| e[0] }.each do |iface|
hn['kavlan'][iface] = {}
vlan_base.each do |vlan, v|
type = v['type']
Expand Down Expand Up @@ -454,7 +454,7 @@ def add_ipv4(h)
node_id = node_uid.split('-')[1].to_i
hn['network_adapters'].each_pair do |iface, v|
# only allocate mountable ethernet interfaces
next if not (v['mountable'] and ['Ethernet','Ethernet-fpga'].include?(v['interface']))
next if not (v['mountable'] and ['Ethernet','Ethernet-FPGA'].include?(v['interface']))
k = [site_uid, cluster_uid, iface]
if not iface_offsets.has_key?(k)
raise "Missing IPv4 information for #{k}"
Expand All @@ -476,7 +476,7 @@ def add_ipv6(h)
site_prefix = IPAddress hs['ipv6']['prefix']
hs['clusters'].each_pair do |_cluster_uid, hc|
hc['nodes'].each_pair do |node_uid, hn|
ipv6_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and ['Ethernet','Ethernet-fpga'].include?(v['interface']) }
ipv6_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and ['Ethernet','Ethernet-FPGA'].include?(v['interface']) }
if ipv6_adapters.length > 0
if not ipv6_adapters.values[0]['mounted']
raise "#{node_uid}: inconsistency: this code assumes first mountable ethernet adapter should be mounted: #{hn}"
Expand Down Expand Up @@ -542,7 +542,7 @@ def add_kavlan_ipv6s(h)
hs['clusters'].each_pair do |_cluster_uid, hc|
next if !hc['kavlan'] # skip clusters where kavlan is globally set to false (used for initial cluster installation)
hc['nodes'].each_pair do |node_uid, hn|
kvl_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and ['Ethernet','Ethernet-fpga'].include?(v['interface']) }
kvl_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and ['Ethernet','Ethernet-FPGA'].include?(v['interface']) }
if kvl_adapters.length > 0
if kvl_adapters.length != hn['kavlan'].length
raise "#{node_uid}: inconsistency: num kvl_adapters = #{kvl_adapters.length}, num kavlan entries = #{hn['kavlan'].length}"
Expand Down

0 comments on commit 6bc296b

Please sign in to comment.