tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
MCLGETI in if_msk.c
Hi all!
I am working to adapt the OpenBSD if_msk.c driver to NetBSD. If needed,
these are my previous messages as a recap:
http://mail-index.netbsd.org/tech-kern/2017/10/11/msg022430.html
http://mail-index.netbsd.org/tech-kern/2017/10/11/msg022431.html
OpenBSD made a huge modification to the `msk_newbuf' function with
rev. 1.72:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_msk.c?rev=1.72&content-type=text/x-cvsweb-markup
(see the commit comments for the details). They use the MCLGETI macro
defined here:
http://bxr.su/OpenBSD/sys/sys/mbuf.h#315
In NetBSD this is a function, not a macro, and it is used only internally
by these two drivers:
src/sys/dev/ic/arn5008.c
src/sys/dev/ic/arn9003.c
Moreover,
src/sys/dev/pci/if_iwn.c
uses an improved version (maybe useful for the above files too in the
future) of the same function.
The OpenBSD macro refers instead to the function `m_clget' defined here:
http://bxr.su/OpenBSD/sys/kern/uipc_mbuf.c#348
It is different, as regards the use of the pointer `struct pool *pp',
the variable `caddr_t buf' and the flow itself of the code.
Is there a way to adapt it to NetBSD even so? Or can NetBSD use a new
function which could do the same?
Bye!
Rocky
P. S.
Member `arpcom.ac_if' in OpenBSD is `sk_ethercom.ec_if' for NetBSD in the
header of the function.
Home |
Main Index |
Thread Index |
Old Index