Skip to content

Commit

Permalink
Merge pull request #7643 from yuxiang-zhang/fix-efa
Browse files Browse the repository at this point in the history
Assign EFA network interface device index 1 to additional network cards
  • Loading branch information
yuxiang-zhang authored Mar 13, 2024
2 parents 632768e + b6f24ff commit 22195e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/cfn/builder/network_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ func buildNetworkInterfaces(

firstNI.InterfaceType = gfnt.NewString("efa")
nis := []gfnec2.LaunchTemplate_NetworkInterface{firstNI}
// Only one card can be on deviceIndex=0
// Additional cards are on deviceIndex=1
// Due to ASG incompatibilities, we create each network card
// with its own device
// The primary network interface (device index 0) must be assigned to network card index 0
// device index 1 for additional cards
for i := 1; i < int(numEFAs); i++ {
ni := defaultNetworkInterface(securityGroups, i, i)
ni := defaultNetworkInterface(securityGroups, 1, i)
ni.InterfaceType = gfnt.NewString("efa")
nis = append(nis, ni)
}
Expand Down

0 comments on commit 22195e4

Please sign in to comment.