Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign EFA network interface device index 1 to additional network cards #7643

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading