Maximum number of NICs for Linux.

Gilboa Davara gilboad at gmail.com
Sat Sep 25 01:22:05 UTC 2010


On Fri, 2010-09-24 at 15:02 -0700, byrdca at gmail.com wrote:
> Today I was asked about the maximum number of NICs supported by the
> Linux kernel.  My initial response was "probably more than you need".
> Its been bothering me that I didn't know where to find the answer.  I
> looked in include/linux/limits.h, I didn't expect to find it but that
> was my first thought.  I then started digging through drivers/net but
> I soon got lost.  I'm after the hard data for the maximum number of
> ethernet cards a modern Linux system supports, anyone have any ideas
> on where I find this data?

Looking at the code (especially, register_net_dev) it seems that there
are two possible limits:
1. Ethernet device name must not exceed 16 bytes.
2. Total number of network devices must not exceed 32768. 
(const int max_netdevices = 8*PAGE_SIZE in __dev_alloc_name)

- Gilboa




More information about the users mailing list