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]
Message-ID: <4a2d4e3e-5b15-2c58-dc49-92908ab80ad0@daynix.com>
Date:   Fri, 25 Nov 2022 18:48:38 +0900
From:   Akihiko Odaki <akihiko.odaki@...nix.com>
To:     Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        intel-wired-lan@...ts.osuosl.org,
        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>,
        Yan Vugenfirer <yan@...nix.com>,
        Yuri Benditovich <yuri.benditovich@...nix.com>
Subject: Re: [PATCH v3] igb: Allocate MSI-X vector when testing



On 2022/11/24 0:41, Maciej Fijalkowski wrote:
> On Wed, Nov 23, 2022 at 10:09:26AM +0900, Akihiko Odaki wrote:
>> Without this change, the interrupt test fail with MSI-X environment:
>>
>> $ sudo ethtool -t enp0s2 offline
>> [   43.921783] igb 0000:00:02.0: offline testing starting
>> [   44.855824] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Down
>> [   44.961249] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
>> [   51.272202] igb 0000:00:02.0: testing shared interrupt
>> [   56.996975] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
>> The test result is FAIL
>> The test extra info:
>> Register test  (offline)	 0
>> Eeprom test    (offline)	 0
>> Interrupt test (offline)	 4
>> Loopback test  (offline)	 0
>> Link test   (on/offline)	 0
>>
>> Here, "4" means an expected interrupt was not delivered.
>>
>> To fix this, route IRQs correctly to the first MSI-X vector by setting
>> IVAR_MISC. Also, set bit 0 of EIMS so that the vector will not be
>> masked. The interrupt test now runs properly with this change:
> 
> Much better!
> 
>>
>> $ sudo ethtool -t enp0s2 offline
>> [   42.762985] igb 0000:00:02.0: offline testing starting
>> [   50.141967] igb 0000:00:02.0: testing shared interrupt
>> [   56.163957] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
>> The test result is PASS
>> The test extra info:
>> Register test  (offline)	 0
>> Eeprom test    (offline)	 0
>> Interrupt test (offline)	 0
>> Loopback test  (offline)	 0
>> Link test   (on/offline)	 0
>>
>> Signed-off-by: Akihiko Odaki <akihiko.odaki@...nix.com>
> 
> Same comment as on other patch - justify why there is no fixes tag and
> specify the tree in subject.

I couldn't identify what commit introduced the problem. Please see:
https://lore.kernel.org/netdev/f2457229-865a-57a0-94a1-c5c63b2f30a5@daynix.com/

Regards,
Akihiko Odaki

> 
>> ---
>>   drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> index e5f3e7680dc6..ff911af16a4b 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> @@ -1413,6 +1413,8 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
>>   			*data = 1;
>>   			return -1;
>>   		}
>> +		wr32(E1000_IVAR_MISC, E1000_IVAR_VALID << 8);
>> +		wr32(E1000_EIMS, BIT(0));
>>   	} else if (adapter->flags & IGB_FLAG_HAS_MSI) {
>>   		shared_int = false;
>>   		if (request_irq(irq,
>> -- 
>> 2.38.1
>>

Powered by blists - more mailing lists