lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net] i40e: Enforce software interrupt during busy-poll exit
From


On 13. 03. 24 14:47, Michal Schmidt wrote:
>> -/* a small macro to shorten up some long lines */
>> -#define INTREG I40E_PFINT_DYN_CTLN
>> +static inline u32 i40e_buildreg_swint(int type)
>> +{
>> + u32 val;
>> +
>> + /* 1. Enable the interrupt
>> + * 2. Do not modify any ITR interval
>> + * 3. Trigger a SW interrupt specified by type
>> + */
>> + val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
>> + I40E_PFINT_DYN_CTLN_ITR_INDX_MASK | /* set noitr */
>> + I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK |
>> + I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK |
>> + FIELD_PREP(I40E_PFINT_DYN_CTLN_SW_ITR_INDX_MASK, type);
>> +
>> + return val;
>> +}
> This function is called only from one place and with a constant
> argument. Does it really need to be a function, as opposed to a
> constant? Or are you going to add more callers soon?

This can be reused also from i40e_force_wb() but I didn't want to make
such refactors in this fix. Lets do it later in -next.

Ivan


\
 
 \ /
  Last update: 2024-03-13 16:16    [W:0.038 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site