/* Returns a suitable unique value for a new device interface number. The caller must hold the rtnl semaphore or the dev_base_lock to be sure it remains unique.  */
static int dev_new_index(struct net *net)
/* Returns a suitable unique value for a new device interface number. The caller must hold the rtnl semaphore or the dev_base_lock to be sure it remains unique.  */
static int dev_new_index(struct net *net)
{
	static int ifindex;
	for (;;) {
		if (++ifindex <= 0)
			ifindex = 1;
		if (!__dev_get_by_index(net, ifindex))
			return ifindex;
	}
}