Subject: Re: [PATCH net-next 07/33] xdp: xdp_frame add member frame_sz and handle in convert_to_xdp_frame

From: Jesper Dangaard Brouer <[email-masked]>
Date: Mon, 27 Apr 2020 17:20:50 +0200

On Sat, 25 Apr 2020 12:24:07 +0900
Toshiaki Makita <[email-masked]> 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