Date: Sat, 6 Oct 2012 19:28:34 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: current@freebsd.org Subject: sysctl-controlled key-value store ? Message-ID: <20121006172834.GB63649@onelab2.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121006172834.GB63649>