1. 30 Nov, 2022 2 commits
    • Akihiko Odaki's avatar
      igb: Allocate MSI-X vector when testing · 28e96556
      Akihiko Odaki authored
      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: 4eefa8f0 ("igb: add single vector msi-x testing to interrupt test")
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
      Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      28e96556
    • Akihiko Odaki's avatar
      e1000e: Fix TX dispatch condition · eed913f6
      Akihiko Odaki authored
      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: bc7f75fa ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@daynix.com>
      Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      eed913f6
  2. 29 Nov, 2022 21 commits
  3. 28 Nov, 2022 15 commits
  4. 27 Nov, 2022 2 commits