Page MenuHomeFreeBSD

rtnetlink: Add FreeBSD-specific IFLAF_GROUP support
Needs ReviewPublic

Authored by pouria on Tue, Aug 4, 2:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 22, 1:14 AM
Unknown Object (File)
Mon, Aug 17, 6:13 PM
Unknown Object (File)
Mon, Aug 17, 3:13 PM
Unknown Object (File)
Fri, Aug 14, 1:04 AM
Unknown Object (File)
Thu, Aug 13, 4:52 PM
Unknown Object (File)
Thu, Aug 13, 4:49 PM
Unknown Object (File)
Thu, Aug 13, 8:26 AM
Unknown Object (File)
Thu, Aug 13, 12:32 AM
Subscribers

Details

Reviewers
glebius
melifaro
markj
Group Reviewers
network
Summary

Netlink IFLA_GROUP works with a single group id, in our
implementation an interface can be joined to multiple groups
and it works with group name.
Store interface groups in IFLAF_GROUP attribute.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75586
Build 72469: arc lint + arc unit

Event Timeline

pouria requested review of this revision.Tue, Aug 4, 2:53 PM

Note: the ifnet iterators were created to hide struct ifnet from drivers. For the core parts of the network stack (and netlink is one of) it is alright to dereference struct ifnet. The provided KPI if_foreach_group() while hides struct ifnet it actually assumes that KPI user knows struct ifgroup, which is as also pretty internal to the stack. Other than that the patch is good as is. I won't request you to remove the new KPI and use CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) straight in the netlink code. Maybe makes sense to add an XXX comment above if_foreach_group() mentioning that KPI is questionable and may change later.

This revision is now accepted and ready to land.Wed, Aug 5, 11:17 PM

How about only passing the group name? @glebius

This revision now requires review to proceed.Thu, Aug 6, 7:19 AM
sys/netlink/route/iface.c
213

Variable declarations should be at the beginning of the function/scope.

236

Why is it ok to ignore the error value?

240

Extra newline.

This revision is now accepted and ready to land.Thu, Aug 13, 10:07 PM
pouria marked 3 inline comments as done.

Address @markj comments.

This revision now requires review to proceed.Fri, Aug 14, 11:10 AM

Rebase on top of D58775 and replace struct iflaf_group with snl_parray