Patch "sfc: Only use TX push if a single descriptor is to be written" has been added to the 3.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    sfc: Only use TX push if a single descriptor is to be written

to the 3.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From fde2b4efe81bc60bfe85638284817fb4e9a0ad59 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Date: Wed, 27 Feb 2013 16:50:38 +0000
Subject: sfc: Only use TX push if a single descriptor is to be written


From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>

[ Upstream commit fae8563b25f73dc584a07bcda7a82750ff4f7672 ]

Using TX push when notifying the NIC of multiple new descriptors in
the ring will very occasionally cause the TX DMA engine to re-use an
old descriptor.  This can result in a duplicated or partly duplicated
packet (new headers with old data), or an IOMMU page fault.  This does
not happen when the pushed descriptor is the only one written.

TX push also provides little latency benefit when a packet requires
more than one descriptor.

Signed-off-by: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/sfc/nic.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/sfc/nic.c
+++ b/drivers/net/sfc/nic.c
@@ -370,7 +370,8 @@ efx_may_push_tx_desc(struct efx_tx_queue
 		return false;
 
 	tx_queue->empty_read_count = 0;
-	return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0;
+	return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0
+		&& tx_queue->write_count - write_count == 1;
 }
 
 /* For each entry inserted into the software descriptor ring, create a


Patches currently in stable-queue which might be from bhutchings@xxxxxxxxxxxxxx are

queue-3.0/sfc-fix-siena-mac-statistics-on-big-endian-platforms.patch
queue-3.0/sfc-do-not-attempt-to-flush-queues-if-dma-is-disabled.patch
queue-3.0/sfc-fix-two-causes-of-flush-failure.patch
queue-3.0/sfc-properly-sync-rx-dma-buffer-when-it-is-not-the-last-in-the-page.patch
queue-3.0/sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch
queue-3.0/sfc-fix-efx_rx_buf_offset-in-the-presence-of-swiotlb.patch
queue-3.0/sfc-lock-tx-queues-when-calling-netif_device_detach.patch
queue-3.0/sfc-convert-firmware-subtypes-to-native-byte-order-in-efx_mcdi_get_board_cfg.patch
queue-3.0/sfc-fix-timekeeping-in-efx_mcdi_poll.patch
queue-3.0/sfc-disable-soft-interrupt-handling-during-efx_device_detach_sync.patch
queue-3.0/sfc-fix-loop-condition-for-efx_filter_search-when-for_insert.patch
queue-3.0/sfc-detach-net-device-when-stopping-queues-for-reconfiguration.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]