1. 14 Oct, 2020 20 commits
  2. 13 Oct, 2020 4 commits
    • Jakub Kicinski's avatar
      Merge branch 'macb-support-the-2-deep-Tx-queue-on-at91' · c93c5482
      Jakub Kicinski authored
      Willy Tarreau says:
      
      ====================
      macb: support the 2-deep Tx queue on at91
      
      while running some tests on my Breadbee board, I noticed poor network
      Tx performance. I had a look at the driver (macb, at91ether variant)
      and noticed that at91ether_start_xmit() immediately stops the queue
      after sending a frame and waits for the interrupt to restart the queue,
      causing a dead time after each packet is sent.
      
      The AT91RM9200 datasheet states that the controller supports two frames,
      one being sent and the other one being queued, so I performed minimal
      changes to support this. The transmit performance on my board has
      increased by 50% on medium-sized packets (HTTP traffic), and with large
      packets I can now reach line rate.
      
      Since this driver is shared by various platforms, I tried my best to
      isolate and limit the changes as much as possible and I think it's pretty
      reasonable as-is. I've run extensive tests and couldn't meet any
      unexpected situation (no stall, overflow nor lockup).
      
      There are 3 patches in this series. The first one adds the missing
      interrupt flag for RM9200 (TBRE, indicating the tx buffer is willing
      to take a new packet). The second one replaces the single skb with a
      2-array and uses only index 0. It does no other change, this is just
      to prepare the code for the third one. The third one implements the
      queue. Packets are added at the tail of the queue, the queue is
      stopped at 2 packets and the interrupt releases 0, 1 or 2 depending
      on what the transmit status register reports.
      ====================
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c93c5482
    • Willy Tarreau's avatar
      macb: support the two tx descriptors on at91rm9200 · 0a4e9ce1
      Willy Tarreau authored
      The at91rm9200 variant used by a few chips including the MSC313 supports
      two Tx descriptors (one frame being serialized and another one queued).
      However the driver only implemented a single one, which adds a dead time
      after each transfer to receive and process the interrupt and wake the
      queue up, preventing from reaching line rate.
      
      This patch implements a very basic 2-deep queue to address this limitation.
      The tests run on a Breadbee board equipped with an MSC313E show that at
      1 GHz, HTTP traffic on medium-sized objects (45kB) was limited to exactly
      50 Mbps before this patch, and jumped to 76 Mbps with this patch. And tests
      on a single TCP stream with an MTU of 576 jump from 10kpps to 15kpps. With
      1500 byte packets it's now possible to reach line rate versus 75 Mbps
      before.
      
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Daniel Palmer <daniel@0x0f.com>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Link: https://lore.kernel.org/r/20201011090944.10607-4-w@1wt.euSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0a4e9ce1
    • Willy Tarreau's avatar
      macb: prepare at91 to use a 2-frame TX queue · 73d74228
      Willy Tarreau authored
      The RM9200 supports one frame being sent while another one is waiting in
      queue. This avoids the dead time that follows the emission of a frame
      and which prevents one from reaching line speed.
      
      Right now the driver supports only a single skb, so we'll first replace
      the rm9200-specific skb info with an array of two macb_tx_skb (already
      used by other drivers). This patch only moves the skb_length to
      txq[0].size and skb_physaddr to skb[0].mapping but doesn't perform any
      other change. It already uses [desc] in order to minimize future changes.
      
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Daniel Palmer <daniel@0x0f.com>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Link: https://lore.kernel.org/r/20201011090944.10607-3-w@1wt.euSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      73d74228
    • Willy Tarreau's avatar
      macb: add RM9200's interrupt flag TBRE · fa6031df
      Willy Tarreau authored
      Transmit Buffer Register Empty replaces TXERR on RM9200 and signals the
      sender may try to send again becase the last queued frame is no longer
      in queue (being transmitted or already transmitted).
      
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
      Cc: Daniel Palmer <daniel@0x0f.com>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Link: https://lore.kernel.org/r/20201011090944.10607-2-w@1wt.euSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      fa6031df
  3. 12 Oct, 2020 16 commits