Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2023 21:35:03 +0000
From:      =?utf-8?Q?Mina_Gali=C4=87?= <freebsd@igalic.co>
To:        Zhenlei Huang <zlei@FreeBSD.org>
Cc:        Kyle Evans <kevans@FreeBSD.org>, freebsd-net@freebsd.org, "mike@karels.net" <mike@karels.net>
Subject:   Re: How to tell if a network interface was renamed (and from what)
Message-ID:  <rvRLOlpJc9xIf67ZwmZ4Si6TN2VtmIuyuguoQgEk5NTOeqsqkAwB_9KvlMbW6y-npSjCC2lmLVXbD4oIqyKJdDboThcWiehF_hU0L9D6GZc=@igalic.co>
In-Reply-To: <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org>
References:  <pdHC0ObBkAbx2HfFIhWYaB5-dmQDEUzNTWvVVJAuJV7FWdWWeSwybVFD-uyBUxPlqDRpAW7D1aAZsbrTxEj9kqsq7ESgO41srPmS-PcXGqw=@igalic.co> <E5F5F61E-3827-404A-A46F-BBCF45A29A82@FreeBSD.org> <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <ptnVEMJ_x48tdYePN4iYRiEW2vWqwulbEOUJ4dQ1cKGkxNXZPPfdEVHdJKNHFfs2onxNipVZKPwDZZKlDv1peS1Xttim1VitMFsdUiTkAKE=@igalic.co> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Zhenlei,


> Since it is just for physical devices, may I propose to have the driver n=
ame in their groups ?
>=20
> So an if_ure interface ue0 will look like:
>=20
> ```
> ue0: flags=3D1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> met=
ric 0 mtu 1500
>=20
> options=3D60009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM=
_IPV6,TXCSUM_IPV6>
>=20
> ether 00:e0:4c:xx:xx:xx
> media: Ethernet autoselect (1000baseT <full-duplex>)
>=20
> status: active
> +++ groups: ure
> nd6 options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
>=20
> ```
>=20
> That does not include the unit number. But could be useful to quickly get=
 the driver name of physical devices.
>

Given that currently on FreeBSD the easiest way to tell if something
is a physical device is by checking the *absence* of groups, this
would only really be acceptable if we add an "egress" group like
OpenBSD does, in addition to the driver name.

If we can't do that, then I think Mike's solution with having the
driver (and unit) as a separate category would be preferable.

Unrelatedly, I don't see anything in ure(4) mentioning that if_ure
devices will be named "ue".
Don't we usually  document such deviation from the norm?


Kind regards,

Mina



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?rvRLOlpJc9xIf67ZwmZ4Si6TN2VtmIuyuguoQgEk5NTOeqsqkAwB_9KvlMbW6y-npSjCC2lmLVXbD4oIqyKJdDboThcWiehF_hU0L9D6GZc=>