Thread (19 messages) 19 messages, 6 authors, 2017-08-09

Re: [PATCH v3 net-next 0/5] ulp: Generalize ULP infrastructure

flat view

From: Tom Herbert <hidden>
Date: 2017-08-08 21:08:37

On Tue, Aug 8, 2017 at 1:23 PM, Edward Cree [off-list ref] wrote:
On 08/08/17 20:50, Tom Herbert wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help