sysctl-controlled key-value store ?

看板FB_current作者時間13年前 (2012/10/07 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
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"
文章代碼(AID): #1GS77Vgs (FB_current)
文章代碼(AID): #1GS77Vgs (FB_current)