On Fri, Jun 09, 2017 at 04:39:06PM +0200, Nicolas Dichtel wrote: > Le 09/06/2017 à 16:23, Andrew Lunn a écrit : > > On Fri, Jun 09, 2017 at 03:34:43PM +0200, Nicolas Dichtel wrote: > >> Make it explicit in the log. > >> > >> Suggested-by: Andrew Lunn <and...@lunn.ch> > >> Signed-off-by: Nicolas Dichtel <nicolas.dich...@6wind.com> > > > > Hi Nicolas > Hi Andrew, > > > > > How often is this called? It seems like it is used by > Good question! ;-) > > > ad_port_selection_logic, which has the comment: > > > > is called in the inititalization (after all the handshkes), > > and after every lacpdu receive (if selected is off) > > > > I just wonder if this should be rate limited? > So using net_warn_ratelimited()?
Why not just use pr_warn_once()? It may go unnoticed at first, but that seems like a decent option compared to spamming log files. > Displaying this message continuously in the log, even at a low rate, seems not > the best things to do. The first time seems enough, but it would require more > code for that. Is it not over-engineering? > The ideal solution would be a BUILD_BUG_ON(), but I don't see how to make > that. >