HomeFreeBSD

ifnet: make if_alloc_domain() never fail

Description

ifnet: make if_alloc_domain() never fail

The last consumer of if_com_alloc() is firewire. It never fails
to allocate. Most likely the if_com_alloc() KPI will go away
together with if_fwip(), less likely new consumers of if_com_alloc()
will be added, but they would need to follow the no fail KPI.

MFC note: As for stable/13, there is one additional consumer sppp,
which also never fails to allocate. This MFCing is mainly to keep
behavioral compatibility of if_alloc_domain() and its wrappers
if_alloc(), if_alloc_dev(), and if_gethandle() with stable/14 and
onward branches. 3rd party drivers should be ready for this for years
as this behavioral change was done in stable/14 at November 22 2021.
As a good effect new drivers to be MFCed to stable/13 do not have to
conditionally check failure from if_alloc() for stable/13.

(cherry picked from commit 4787572d0580c6fdf818fd64efa3089de88720f0)

Details

Provenance
glebiusAuthored on Nov 23 2021, 3:49 AM
zleiCommitted on Oct 8 2024, 4:00 AM
Parents
rG6cb1995a66ae: bhyve: improve bounds checks in hda_codec
Branches
Unknown
Tags
Unknown