On Sat, 25 Apr 2020 12:24:07 +0900 Toshiaki Makita <toshiaki.makita1@xxxxxxxxx> wrote: > > +/* Avoids inlining WARN macro in fast-path */ > > +void xdp_warn(const char* msg, const char* func, const int line); > > +#define XDP_WARN(msg) xdp_warn(msg, __func__, __LINE__) > > Shouldn't this have WARN_ONCE()-like mechanism? > A buggy driver may generate massive amount of dump messages... Well, in this use-case I think I want it be loud. I usually miss those WARN_ONCE messages, and I while extending and testing drivers, it was an advantage that is was loud, as it caught some of my own bugs. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer