* [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb)
@ 2022-11-30 19:42 Tony Nguyen
2022-11-30 19:42 ` [PATCH net 1/2] e1000e: Fix TX dispatch condition Tony Nguyen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-11-30 19:42 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev
This series contains updates to e1000e and igb drivers.
Akihiko Odaki fixes calculation for checking whether space for next
frame exists for e1000e and properly sets MSI-X vector to fix failing
ethtool interrupt test for igb.
The following are changes since commit 01f856ae6d0ca5ad0505b79bf2d22d7ca439b2a1:
Merge tag 'net-6.1-rc8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE
Akihiko Odaki (2):
e1000e: Fix TX dispatch condition
igb: Allocate MSI-X vector when testing
drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++--
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] e1000e: Fix TX dispatch condition
2022-11-30 19:42 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) Tony Nguyen
@ 2022-11-30 19:42 ` Tony Nguyen
2022-11-30 19:42 ` [PATCH net 2/2] igb: Allocate MSI-X vector when testing Tony Nguyen
2022-12-02 4:20 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-11-30 19:42 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Akihiko Odaki, netdev, anthony.l.nguyen, sasha.neftin,
Gurucharan G, Naama Meir
From: Akihiko Odaki <akihiko.odaki@daynix.com>
e1000_xmit_frame is expected to stop the queue and dispatch frames to
hardware if there is not sufficient space for the next frame in the
buffer, but sometimes it failed to do so because the estimated maximum
size of frame was wrong. As the consequence, the later invocation of
e1000_xmit_frame failed with NETDEV_TX_BUSY, and the frame in the buffer
remained forever, resulting in a watchdog failure.
This change fixes the estimated size by making it match with the
condition for NETDEV_TX_BUSY. Apparently, the old estimation failed to
account for the following lines which determines the space requirement
for not causing NETDEV_TX_BUSY:
```
/* reserve a descriptor for the offload context */
if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
count++;
count++;
count += DIV_ROUND_UP(len, adapter->tx_fifo_limit);
```
This issue was found when running http-stress02 test included in Linux
Test Project 20220930 on QEMU with the following commandline:
```
qemu-system-x86_64 -M q35,accel=kvm -m 8G -smp 8
-drive if=virtio,format=raw,file=root.img,file.locking=on
-device e1000e,netdev=netdev
-netdev tap,script=ifup,downscript=no,id=netdev
```
Fixes: bc7f75fa9788 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 49e926959ad3..55cf2f62bb30 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5936,9 +5936,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
e1000_tx_queue(tx_ring, tx_flags, count);
/* Make sure there is space in the ring for the next send. */
e1000_maybe_stop_tx(tx_ring,
- (MAX_SKB_FRAGS *
+ ((MAX_SKB_FRAGS + 1) *
DIV_ROUND_UP(PAGE_SIZE,
- adapter->tx_fifo_limit) + 2));
+ adapter->tx_fifo_limit) + 4));
if (!netdev_xmit_more() ||
netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) {
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] igb: Allocate MSI-X vector when testing
2022-11-30 19:42 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) Tony Nguyen
2022-11-30 19:42 ` [PATCH net 1/2] e1000e: Fix TX dispatch condition Tony Nguyen
@ 2022-11-30 19:42 ` Tony Nguyen
2022-12-02 4:20 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-11-30 19:42 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Akihiko Odaki, netdev, anthony.l.nguyen, Maciej Fijalkowski,
Gurucharan G
From: Akihiko Odaki <akihiko.odaki@daynix.com>
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:
$ 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
Fixes: 4eefa8f01314 ("igb: add single vector msi-x testing to interrupt test")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb)
2022-11-30 19:42 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) Tony Nguyen
2022-11-30 19:42 ` [PATCH net 1/2] e1000e: Fix TX dispatch condition Tony Nguyen
2022-11-30 19:42 ` [PATCH net 2/2] igb: Allocate MSI-X vector when testing Tony Nguyen
@ 2022-12-02 4:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-02 4:20 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev
Hello:
This series was applied to netdev/net.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
On Wed, 30 Nov 2022 11:42:26 -0800 you wrote:
> This series contains updates to e1000e and igb drivers.
>
> Akihiko Odaki fixes calculation for checking whether space for next
> frame exists for e1000e and properly sets MSI-X vector to fix failing
> ethtool interrupt test for igb.
>
> The following are changes since commit 01f856ae6d0ca5ad0505b79bf2d22d7ca439b2a1:
> Merge tag 'net-6.1-rc8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE
>
> [...]
Here is the summary with links:
- [net,1/2] e1000e: Fix TX dispatch condition
https://git.kernel.org/netdev/net/c/eed913f6919e
- [net,2/2] igb: Allocate MSI-X vector when testing
https://git.kernel.org/netdev/net/c/28e96556baca
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-02 4:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 19:42 [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) Tony Nguyen
2022-11-30 19:42 ` [PATCH net 1/2] e1000e: Fix TX dispatch condition Tony Nguyen
2022-11-30 19:42 ` [PATCH net 2/2] igb: Allocate MSI-X vector when testing Tony Nguyen
2022-12-02 4:20 ` [PATCH net 0/2][pull request] Intel Wired LAN Driver Updates 2022-11-30 (e1000e, igb) patchwork-bot+netdevbpf
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.