On Wed, 3 Feb 2021 10:00:07 +0000 Kubalewski, Arkadiusz wrote:
> >> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c 
> >> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> index 521ea9df38d5..f35bd9164106 100644
> >> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> >> @@ -12489,11 +12489,14 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi,
> >>    /* Kick start the NAPI context if there is an AF_XDP socket open
> >>     * on that queue id. This so that receiving will start.
> >>     */
> >> -  if (need_reset && prog)
> >> +  if (need_reset && prog) {
> >> +          dev_info(&pf->pdev->dev,
> >> +                   "Loading XDP program, please note: XDP_REDIRECT action 
> >> requires the same number of queues on both interfaces\n");  
> >
> >We try to avoid spamming logs. This message will be helpful to users
> >only the first time, if at all.  
> 
> You are probably right, it would look like a spam to the one who is
> continuously loading and unloading the XDP programs.
> But still, want to remain as much user friendly as possible.
> Will use dev_info_once(...) instead.

Not exactly what I meant, I meant that it's only marginally useful the
first time the user sees it. Not first time since boot.

The two options that I think could be better are:
 - work on improving the interfaces in terms of IRQ/queue config and
   capabilities so the user is not confused in the first place;
 - detect that the configuration is in fact problematic 
   (IOW #Qs < #CPUs) and setting extack. If you set the extact and
   return 0 / success the extact will show as "Warning: " in iproute2
   output.

Reply via email to