easynic icon indicating copy to clipboard operation
easynic copied to clipboard

[Mildy interesting] NIC speed vs. driver lines of code

Open emmericp opened this issue 6 years ago • 7 comments

drivers-loc-scatterplot

The plot shows Ethernet drivers in Linux 4.19 and DPDK (forgot the exact version) by the maximum speed they support vs. the lines of code. There is a linear correlation (R^2 = 0.37) between network speed and driver complexity, so it's only going to get worse for now.

emmericp avatar Feb 05 '19 00:02 emmericp

I'm just wondering why the 0.3624x + 5781 is curvy! Shouldn't it be just straight?

sarsanaee avatar Feb 05 '19 01:02 sarsanaee

@sarsanaee log scale?

lukego avatar Feb 05 '19 06:02 lukego

This is a cool slide :). So we can state the EasyNIC goal as being to have y=500 instead of y=0.3624x+5781. That's our marketing message taken care of! ;-)

lukego avatar Feb 05 '19 06:02 lukego

@emmericp Have you looked at total lines of code per vendor? (Are there any vendors who support 10G-100G with a small amount of driver code covering all their current models for both Linux and DPDK?)

lukego avatar Feb 05 '19 07:02 lukego

The Amazon ena drivers are relatively simple with ~7k lines of code for both the DPDK and Linux drivers: https://github.com/amzn/amzn-drivers

$ cloc linux/drivers/net/ethernet/amazon/
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                4           1489            537           5693
C/C++ Header                     8            631           1191           1474
make                             2              3              6              3
-------------------------------------------------------------------------------
SUM:                            14           2123           1734           7170
-------------------------------------------------------------------------------

$ cloc dpdk/drivers/net/ena/
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                3           1087            328           4205
C/C++ Header                    13            836           1320           2414
make                             1              7             39             17
NAnt script                      1              3              0              8
-------------------------------------------------------------------------------
SUM:                            18           1933           1687           6644
-------------------------------------------------------------------------------

emmericp avatar Feb 05 '19 17:02 emmericp

And ENA started off supporting 10 Gbps, then 25, now up to 100 Gbps - without driver changes.

mswilson avatar Feb 05 '19 18:02 mswilson

Do you have a source for 100G support on EC2 VMs? I haven't classified ENA as 100G in the graph above because I couldn't find such hardware. Sure, it claims to support up to 400G but if there's no hardware then that doesn't really count ;)

emmericp avatar Feb 05 '19 20:02 emmericp