sysctl-controlled key-value store ?
Hi,
in order to control some netmap feature (namely, which interfaces
are attached to VALE switches), i would considering the use of
a sysctl interface triggering a sysctl-proc, something of the form
dev.netmap.switch.xyz=em0 ix1
dev.netmap.switch.foo=ix2 re0
where "xyz" and "foo" are the names of the netmap switch instances.
Thing is, right now those names are created dynamically when users
configure a netmap port, and I would like to have the same dynamic
behaviour with the sysctl, so that an access to a not-yet-existent
dev.netmap.switch.xyz node should both create the node and add a value.
Is this possible (either now or with a modest modification to the sysctl
infrastructure) ?
Or should I use a workaround, say have a sysctl node that acts
as a 'gate' and the procedure will create (readonly) values e.g.
dev.netmap.switch.config="xyz: em0 ix1" # creates dev.netmap.switch.xyz=em0 ix1
dev.netmap.switch.config="xyz: ix1" # updates dev.netmap.switch.xyz=ix1
dev.netmap.switch.config="xyz:" # deletes dev.netmap.switch.xyz=
cheers
luigi
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 1 之 4 篇):