On Mon, 12 Nov 2018 15:46:53 -0500 (EST) Mathieu Desnoyers <mathieu.desnoy...@efficios.com> wrote:
> I also notice that in two cases, a "gro_result_t" is implicitly cast > to "int". I usually frown upon this kind of stuff, because it's asking > for trouble if gro_result_t typedef to something else than "int" in the > future. > > I would recommend going for two templates, one which takes a "int" > ret parameter, and the other a "gro_result_t" ret parameter. > > Or am I being too cautious ? That's more of a question for the netdev maintainers. If they think casting gro_result_t to int is fine, then I'm fine. If it breaks in the future, they need to deal with it, I don't ;-) The downside of two templates, is that the templates are the bloated part of the trace event (DEFINE_EVENT()s are light weight). They can add a couple of K to the memory foot print. -- Steve