* Julius Volz <juliusv@xxxxxxxxxx> 2008-07-11 01:16
> If a single operation just means create _or_ update (NLM_F_EXCL, etc.
> flags don't work with genetlink), then ipvsadm would have to query for
> an entry first, which is racy and ugly. So I'd like to keep ADD/EDIT
> in separate commands. But then I need a different response id (or just
> use the ADD id?) for a GET.
That's fine, both methods a) adding your own NLM_F_ flags to genetlink
and b) using separate commands would be straight forward and easy to
understand.
The key point is that a GET or DUMP request should be answered with
one or more NEW requests. An ADD, SET, or DEL request should be simply
ACKed or aborted with an error message. Optionally it can trigger a
notification message which should be either a NEW or DEL request.
Using SET to explicitely update an object is fine as well. The reason we
are not using it in the context of notifications is that listeners can
appear at any time so the listener may not have been around at the time
the object was created.
Anyways, it's not a requirement, just common patterns we have been
using so far.
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|