lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Mar 2024 16:15:51 +0100
From: Ivan Vecera <ivecera@...hat.com>
To: Michal Schmidt <mschmidt@...hat.com>
Cc: netdev@...r.kernel.org, pawel.chmielewski@...el.com,
 aleksandr.loktionov@...el.com, Hugo Ferreira <hferreir@...hat.com>,
 Jesse Brandeburg <jesse.brandeburg@...el.com>,
 Tony Nguyen <anthony.l.nguyen@...el.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 "moderated list:INTEL ETHERNET DRIVERS" <intel-wired-lan@...ts.osuosl.org>,
 open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] i40e: Enforce software interrupt during busy-poll
 exit



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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ