On Tue, Aug 8, 2017 at 1:23 PM, Edward Cree <ec...@solarflare.com> wrote:
> On 08/08/17 20:50, Tom Herbert wrote:
>> It's a tradeoff. The nice thing about using strings is that we don't
>> need maintain a universal enum.
> Hmm, that makes it sound as though you're intending for random out-of-tree
>  modules to add these things; since if they're in-tree it's easy for them
>  to get enum values assigned when they're added.  Do we really want to
>  encourage sticking random module code into the network stack like this?
>
> In any case, if you go with the enum approach and later it _does_ prove
>  necessary to have more flexibility, you can have enum values dynamically
>  assigned (like genetlink manages to do); and programs using the existing
>  fixed IDs will continue to work.  It's much harder to go the other way...
>
There is history and precedence. The string mechanism for ulp_ops  a
direct port of the original ULP infrastructure done for kTLS. That
code based the mechanism on TCP congestion ops and that was introduced
into the kernel twelve years ago. This method doesn't seem to have
been viewed as a problem before now...

Tom

> -Ed

Reply via email to