Skip to content

Commit

Permalink
Network: add AWS Elastic Network Adapter (ENA) driver
Browse files Browse the repository at this point in the history
This adds nework connectivity to AWS Nitro instances (KVM-based).
The code is derived from the Amazon ENA driver for FreeBSD
(https://github.com/amzn/amzn-drivers/blob/master/kernel/fbsd/ena).
Tested on t3, t3a, c4, c5, c5a, c5d and c5n instances.

Closes #1233.
  • Loading branch information
francescolavra committed Jan 1, 2021
1 parent fb2fef5 commit fbb5856
Show file tree
Hide file tree
Showing 19 changed files with 11,467 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/pc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PROGRAMS= kernel.img
SRCS-kernel.img= \
$(CURDIR)/service.c \
$(OBJDIR)/gitversion.c \
$(SRCDIR)/aws/ena/ena.c \
$(SRCDIR)/aws/ena/ena_com/ena_com.c \
$(SRCDIR)/aws/ena/ena_com/ena_eth_com.c \
$(SRCDIR)/aws/ena/ena_datapath.c \
$(SRCDIR)/drivers/ata.c \
$(SRCDIR)/drivers/ata-pci.c \
$(SRCDIR)/drivers/console.c \
Expand Down
2 changes: 2 additions & 0 deletions platform/pc/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <storage.h>
#include <symtab.h>
#include <unix.h>
#include <aws/aws.h>
#include <virtio/virtio.h>
#include <vmware/vmxnet3.h>
#include <drivers/acpi.h>
Expand Down Expand Up @@ -533,6 +534,7 @@ static void __attribute__((noinline)) init_service_new_stack()
/* qemu virtio */
init_virtio_network(kh);
init_vmxnet3_network(kh);
init_aws_ena(kh);
}

init_storage(kh, sa, !xen_detected() && !hyperv_storvsc_attached);
Expand Down
1 change: 1 addition & 0 deletions src/aws/aws.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
void init_aws_ena(kernel_heaps kh);
Loading

0 comments on commit fbb5856

Please sign in to comment.