Page MenuHomeFreeBSD

net: add if_allocdescr() to permit updating interface description from the kernel
ClosedPublic

Authored by melifaro on Nov 30 2022, 1:50 PM.
Tags
None
Referenced Files
F165374151: D37566.diff
Fri, Aug 7, 9:31 PM
F165351539: D37566.id113742.diff
Fri, Aug 7, 7:11 PM
Unknown Object (File)
Thu, Aug 6, 9:11 AM
Unknown Object (File)
Thu, Aug 6, 5:35 AM
Unknown Object (File)
Mon, Jul 27, 2:48 PM
Unknown Object (File)
Sun, Jul 26, 2:54 PM
Unknown Object (File)
Thu, Jul 23, 12:07 AM
Unknown Object (File)
Wed, Jul 22, 1:37 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48568
Build 45454: arc lint + arc unit

Event Timeline

melifaro added a reviewer: network.
melifaro retitled this revision from net: add if_allocdescr() to permit updating description from the kernel to net: add if_allocdescr() to permit updating interface description from the kernel.

Does this abstract enough to be worth it? Where is it intended to be used?

sys/net/if.c
4276

I think our usual pattern for this sort of thing is to pass int flags, and do malloc(size, type, M_ZERO | flags).

4278

Also, I'm sure you meant (waitok ? M_WAITOK : 0) here.

In D37566#853879, @kp wrote:

Does this abstract enough to be worth it? Where is it intended to be used?

I have a larger diff that allows netlink to update interface properties, such as description. Given we already have if_freedescr(), I moved towards the if_allocdescr() instead of exposing M_IFDESCR.

This revision is now accepted and ready to land.Nov 30 2022, 3:42 PM
zlei added a subscriber: zlei.

Looks good to me.