Bug 255043 - ena device is not getting enabled post addition in kernel
Summary: ena device is not getting enabled post addition in kernel
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2021-04-14 04:58 UTC by shamsher
Modified: 2021-04-28 15:54 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description shamsher 2021-04-14 04:58:25 UTC
added ena device in kernel as done in .configure file as shown below:

device          ena

kldstate also shows the ena modules as :

kldstat -v | grep -i ena
		47 pci/ata_cenatek
		73 pci/ena

but the same is not able to see either in dmesg or using ifconfig.
Any help here please how to enable ena device support in FreeBSD.
Comment 1 Andriy Gapon freebsd_committer 2021-04-14 08:43:50 UTC
The report is somewhat thing on details.
You did not demonstrate that you have any "hardware" that should be supported by ena.
Comment 2 Andriy Gapon freebsd_committer 2021-04-14 08:44:29 UTC
(In reply to Andriy Gapon from comment #1)
Comment 3 shamsher 2021-04-14 12:46:25 UTC
Hi Andriy,
Using Intel NIC of model 82599EB 10-Gigabit X520-SR2 for n/w interface.
In Amazon, want to enable C5 for VM, but it need ENA module to be enabled. So, before loading it to Amazon using AMI image, locally checking in target with same configuration with Intel Xeon processor and above NIC. But not able to see ENA modules as enabled.

Post config change and build, only it shows as ENA is integrated as part of kernel.
Also tried with [if_ena_load="YES"] in loader.conf file (which may not be needed as I haven't made it as loadable module) but still no help.

Comment 4 shamsher 2021-04-15 04:53:16 UTC
Tried in AWS with same AMI image of same kernel with ENA integration but not help, the C5 instance is not getting enabled as it seems ENA module didn't get enabled.
Comment 5 Andriy Gapon freebsd_committer 2021-04-15 10:25:07 UTC
ENA "hardware" will be present only in Amazon virtual machine, it will not be present on physical hardware.
You can check the instance's console output to see what kind of problem it actually has.
Also, as I understand, there are different flavours of C5.
C5n has ENA, other types have other networking solutions: https://aws.amazon.com/ec2/instance-types/c5/
Comment 6 shamsher 2021-04-15 17:13:48 UTC
Hi Andriy,
Sure thanks. Yes there are different flavours of C5, which we are aware of. But in normal cases (with/without ENA module integration in kernel) with AMI image upto C4 getting enabled. But with ENA modules the C5 (at least basic part) should get enabled. But with this ena integration in kernel also seeing C5 as disabled and C5 need ENA modules to be enabled to work.

Comment 7 shamsher 2021-04-15 17:31:53 UTC
Getting warning in this AMI image with ENA integrated kernel as below:

"The currently selected instance type (c5.large) is not supported for your chosen AMI. You can either change the AMI to one that supports this instance type on the previous step or select a supported instance type for your current AMI on this step.

    This instance type requires ENA support. To enable this instance type, return to the previous step and select an AMI that is enabled for ENA."

Note: if i select C4 instance then using console can able to see ENA using kldstat, as shown in above first comment.

Comment 8 shamsher 2021-04-23 10:47:12 UTC
now made loadable ena-module.
with that also C5 is not getting enabled.
it shows issues as 'This instance type requires ENA support. To enable this instance type, return to the previous step and select an AMI that is enabled for ENA."

Then loaded C4 instance to check module and it shows properly the if_ena.ko got loaded successfully.

Id Refs Address            Size     Name
 1    5 0xffffffff80200000 107a4b0  kernel
 2    1 0xffffffff8127b000 16b60    if_ena.ko

Is there any command need to use to enable it? I hope once loaded then it will get auto enabled.
Comment 9 shamsher 2021-04-26 13:05:04 UTC
it seems during PCI enumeration not able to recognize Amazon vendor, tried with if_ena.ko unload and load also.
pciconf -l
hostb0@pci0:0:0:0:	class=0x060000 card=0x11001af4 chip=0x12378086 rev=0x02 hdr=0x00
isab0@pci0:0:1:0:	class=0x060100 card=0x11001af4 chip=0x70008086 rev=0x00 hdr=0x00
atapci0@pci0:0:1:1:	class=0x010180 card=0x00015853 chip=0x70108086 rev=0x00 hdr=0x00
none0@pci0:0:1:3:	class=0x068000 card=0x11001af4 chip=0x71138086 rev=0x01 hdr=0x00
vgapci0@pci0:0:2:0:	class=0x030000 card=0x00015853 chip=0x00b81013 rev=0x00 hdr=0x00
xenpci0@pci0:0:3:0:	class=0xff8000 card=0x00015853 chip=0x00015853 rev=0x01 hdr=0x00

Any suggession on this. Trying in AWS-EC2 with EBS storage.
Comment 10 shamsher 2021-04-28 15:54:50 UTC
Now getting below issues in C5 instance:

"Instance reachability check failed"