* [PATCH v2] igb: Allocate MSI-X vector when testing
@ 2022-11-22 13:11 ` Akihiko Odaki
0 siblings, 0 replies; 6+ messages in thread
From: Akihiko Odaki @ 2022-11-22 13:11 UTC (permalink / raw)
Cc: linux-kernel, netdev, intel-wired-lan, Maciej Fijalkowski,
Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Yan Vugenfirer, Yuri Benditovich,
Akihiko Odaki
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.
This change routes interrupts correctly to the first MSI-X vector, and
fixes the test:
$ 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@daynix.com>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH v2] igb: Allocate MSI-X vector when testing
@ 2022-11-22 13:11 ` Akihiko Odaki
0 siblings, 0 replies; 6+ messages in thread
From: Akihiko Odaki @ 2022-11-22 13:11 UTC (permalink / raw)
Cc: netdev, linux-kernel, Yuri Benditovich, Eric Dumazet,
Jakub Kicinski, Yan Vugenfirer, intel-wired-lan, Paolo Abeni,
David S. Miller
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.
This change routes interrupts correctly to the first MSI-X vector, and
fixes the test:
$ 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@daynix.com>
---
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
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] igb: Allocate MSI-X vector when testing
2022-11-22 13:11 ` [Intel-wired-lan] " Akihiko Odaki
@ 2022-11-22 16:26 ` Maciej Fijalkowski
-1 siblings, 0 replies; 6+ messages in thread
From: Maciej Fijalkowski @ 2022-11-22 16:26 UTC (permalink / raw)
To: Akihiko Odaki
Cc: linux-kernel, netdev, intel-wired-lan, Jesse Brandeburg,
Tony Nguyen, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Yan Vugenfirer, Yuri Benditovich
On Tue, Nov 22, 2022 at 10:11:45PM +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.
>
> This change routes interrupts correctly to the first MSI-X vector, and
> fixes the test:
Try to use imperative mood - simply stating something like "To fix this,
route IRQs correctly to the first MSI-X vector by xyz"
>
> $ 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
Looks better now, would be also good to explain what is the *actual* fix
by explaining the HW registers setting that you're doing.
Thanks!
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH v2] igb: Allocate MSI-X vector when testing
@ 2022-11-22 16:26 ` Maciej Fijalkowski
0 siblings, 0 replies; 6+ messages in thread
From: Maciej Fijalkowski @ 2022-11-22 16:26 UTC (permalink / raw)
To: Akihiko Odaki
Cc: netdev, linux-kernel, Yuri Benditovich, Eric Dumazet,
Jakub Kicinski, Yan Vugenfirer, intel-wired-lan, Paolo Abeni,
David S. Miller
On Tue, Nov 22, 2022 at 10:11:45PM +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.
>
> This change routes interrupts correctly to the first MSI-X vector, and
> fixes the test:
Try to use imperative mood - simply stating something like "To fix this,
route IRQs correctly to the first MSI-X vector by xyz"
>
> $ 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
Looks better now, would be also good to explain what is the *actual* fix
by explaining the HW registers setting that you're doing.
Thanks!
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> 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
>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] igb: Allocate MSI-X vector when testing
2022-11-22 13:11 ` [Intel-wired-lan] " Akihiko Odaki
@ 2022-11-23 15:33 ` Maciej Fijalkowski
-1 siblings, 0 replies; 6+ messages in thread
From: Maciej Fijalkowski @ 2022-11-23 15:33 UTC (permalink / raw)
To: Akihiko Odaki
Cc: linux-kernel, netdev, intel-wired-lan, Jesse Brandeburg,
Tony Nguyen, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Yan Vugenfirer, Yuri Benditovich
On Tue, Nov 22, 2022 at 10:11:45PM +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.
>
> This change routes interrupts correctly to the first MSI-X vector, and
> fixes the test:
Imperative mood, please - "To fix this, route interrupts correctly..."
>
> $ 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
>
You still didn't specify the tree. If it's 'net' and you're not sure about
fixes tag, then please provide some explanation to maintainers why you're
not adding this.
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-wired-lan] [PATCH v2] igb: Allocate MSI-X vector when testing
@ 2022-11-23 15:33 ` Maciej Fijalkowski
0 siblings, 0 replies; 6+ messages in thread
From: Maciej Fijalkowski @ 2022-11-23 15:33 UTC (permalink / raw)
To: Akihiko Odaki
Cc: netdev, linux-kernel, Yuri Benditovich, Eric Dumazet,
Jakub Kicinski, Yan Vugenfirer, intel-wired-lan, Paolo Abeni,
David S. Miller
On Tue, Nov 22, 2022 at 10:11:45PM +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.
>
> This change routes interrupts correctly to the first MSI-X vector, and
> fixes the test:
Imperative mood, please - "To fix this, route interrupts correctly..."
>
> $ 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
>
You still didn't specify the tree. If it's 'net' and you're not sure about
fixes tag, then please provide some explanation to maintainers why you're
not adding this.
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> 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
>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-23 15:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 13:11 [PATCH v2] igb: Allocate MSI-X vector when testing Akihiko Odaki
2022-11-22 13:11 ` [Intel-wired-lan] " Akihiko Odaki
2022-11-22 16:26 ` Maciej Fijalkowski
2022-11-22 16:26 ` [Intel-wired-lan] " Maciej Fijalkowski
2022-11-23 15:33 ` Maciej Fijalkowski
2022-11-23 15:33 ` [Intel-wired-lan] " Maciej Fijalkowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.