Re: git: fe33e0ab83d1 - main - ifnet/API: Move the IfAPI from if_var.h to if.h

From: Gleb Smirnoff <glebius_at_freebsd.org>
Date: Fri, 13 Jan 2023 00:55:43 UTC
  Justin,

On Thu, Jan 12, 2023 at 07:01:14PM -0500, Justin Hibbits wrote:
J> > 1) Leave it in if_var.h and start a new header where we will move
J> > stuff that should stay private from drivers. Drivers keep using
J> > if_var.h. 2) Create a new header with DrvAPI. Drivers to stop useing
J> > if_var.h and switch to new header file.
J> > 
J> > I personally prefer 1), as it follows what we have started to do long
J> > time ago, see c29e1ad9304, c3322cb91ca, 76039bc84fa, eedc7fd9e87.
J> > 
J> > [1]
J> > https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html
J> > 
J> 
J> I'll revert this, but I think we should discuss further how to approach
J> this, since on our call last week I got the impression that the DrvAPI
J> does belong in if.h, with if_var.h being exclusively used by netstack.

My fail to properly articulate that. :( Sorry

Do you agree with this plan:

1) DrvAPI stays in if_var.h. Today all drivers already include it.
2) struct ifnet (and possibly later more stuff) goes to if_private.h.
   Alternative names: if_priv.h, if_kern.h, anything else? This file
   is not supposed to be used by drivers.
3) if_var.h _temporarily_ includes if_private.h.
   Removing this include and trying to compile we can very quickly
   check how close are we to final removal.
4) Eventually if_var.h stops including if_private.h.

-- 
Gleb Smirnoff