George Shuklin <george.shuklin@xxxxxxxxx> wrote: > On 03/07/2023 18:25, Florian Westphal wrote: > > Serg <seentr@xxxxxxxxxxxx> wrote: > > > I know that there is iifname as a safe alternative, but as far as I know it > > > has huge performance drawback and thus its' usage is discouraged in my case. > > Not really. Its copy and compare 4 bytes vs. copy and compare 16 bytes. > > Is iface name lookup o(1)? Yes, its just dev->name vs. dev->ifindex.