Discussion:
opaque ifnet progress
Gleb Smirnoff
2015-03-19 15:43:09 UTC
Permalink
Hi!

It is already several years as the "opaque ifnet" has been discussed,
and almost a year since it was announced to be worked on.

For now I've got a branch in svn, where some proof of concept is done:

http://svn.freebsd.org/base/projects/ifnet

I've described what's going on in wiki:

https://wiki.freebsd.org/projects/ifnet

If you are writing/maintaining a NIC driver, you must look there
and share your opinion with me. You should also look at already
converted drivers and again share your opinion.
At current stage I need feeling of approvement and agreement
from people who write drivers, since being on my own I don't
feel confident that I am doing things right. So, please look
at wiki and code!

P.S. Of course job of converting all drivers to new KPI is extremely
heavy lifting, so any help with the project if very much appreciated.
--
Totus tuus, Glebius.
Anuranjan Shukla
2015-04-03 01:42:49 UTC
Permalink
Hello Gleb,
Thanks for sharing the details.
From looking at the wiki page it's not exactly clear what your plan is
regarding the accessor functions as they stand today (if_get*/if_set*
after drvapi change was made). I briefly glanced through some of the code
changes but that takes time so it'd be good to know sort of the overall
plan in that area if you foresee major rework.

Thanks
Anu
Post by Gleb Smirnoff
Hi!
It is already several years as the "opaque ifnet" has been discussed,
and almost a year since it was announced to be worked on.
http://svn.freebsd.org/base/projects/ifnet
https://wiki.freebsd.org/projects/ifnet
If you are writing/maintaining a NIC driver, you must look there
and share your opinion with me. You should also look at already
converted drivers and again share your opinion.
At current stage I need feeling of approvement and agreement
from people who write drivers, since being on my own I don't
feel confident that I am doing things right. So, please look
at wiki and code!
P.S. Of course job of converting all drivers to new KPI is extremely
heavy lifting, so any help with the project if very much appreciated.
--
Totus tuus, Glebius.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
Gleb Smirnoff
2015-04-03 11:03:45 UTC
Permalink
Anuranjan,

On Fri, Apr 03, 2015 at 01:42:49AM +0000, Anuranjan Shukla wrote:
A> Hello Gleb,
A> Thanks for sharing the details.
A> From looking at the wiki page it's not exactly clear what your plan is
A> regarding the accessor functions as they stand today (if_get*/if_set*
A> after drvapi change was made). I briefly glanced through some of the code
A> changes but that takes time so it'd be good to know sort of the overall
A> plan in that area if you foresee major rework.

The plan is that they go away. They were a quick solution, that allow
to avoid recompilation of a driver when struct ifnet change, but they
still dictate the layout of the structure and don't give enough flexibility
for the stacj to change in future.

Also, new world order dictates that all change to flags/capenable/etc
go directly through if_ioctl, so that we have one place to catch all
events. Field accessor functions violate this rule.
--
Totus tuus, Glebius.
Loading...