* Pull request: sfc 2013-03-12
@ 2013-03-12 17:47 Ben Hutchings
2013-03-12 17:48 ` [PATCH net] sfc: Only use TX push if a single descriptor is to be written Ben Hutchings
2013-03-13 9:17 ` Pull request: sfc 2013-03-12 David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ben Hutchings @ 2013-03-12 17:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers, scrum-linux
The following changes since commit c80a8512ee3a8e1f7c3704140ea55f21dc6bd651:
net/core: move vlan_depth out of while loop in skb_network_protocol() (2013-03-12 11:47:40 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc.git sfc-3.9
(commit fae8563b25f73dc584a07bcda7a82750ff4f7672)
Just the one bug fix I mentioned before, but it's a pretty important one
as it can cause silent data corruption or IOMMU page faults.
This would be suitable for stable and should apply cleanly to all the
3.x.y branches. I'm still working through testing of larger sets of
fixes.
Ben.
Ben Hutchings (1):
sfc: Only use TX push if a single descriptor is to be written
drivers/net/ethernet/sfc/nic.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH net] sfc: Only use TX push if a single descriptor is to be written
2013-03-12 17:47 Pull request: sfc 2013-03-12 Ben Hutchings
@ 2013-03-12 17:48 ` Ben Hutchings
2013-03-13 9:17 ` Pull request: sfc 2013-03-12 David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2013-03-12 17:48 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers, scrum-linux
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@solarflare.com>
---
drivers/net/ethernet/sfc/nic.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c
index 0ad790c..eaa8e87 100644
--- a/drivers/net/ethernet/sfc/nic.c
+++ b/drivers/net/ethernet/sfc/nic.c
@@ -376,7 +376,8 @@ efx_may_push_tx_desc(struct efx_tx_queue *tx_queue, unsigned int write_count)
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
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Pull request: sfc 2013-03-12
2013-03-12 17:47 Pull request: sfc 2013-03-12 Ben Hutchings
2013-03-12 17:48 ` [PATCH net] sfc: Only use TX push if a single descriptor is to be written Ben Hutchings
@ 2013-03-13 9:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-13 9:17 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers, scrum-linux
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Tue, 12 Mar 2013 17:47:25 +0000
> The following changes since commit c80a8512ee3a8e1f7c3704140ea55f21dc6bd651:
>
> net/core: move vlan_depth out of while loop in skb_network_protocol() (2013-03-12 11:47:40 -0400)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc.git sfc-3.9
>
> (commit fae8563b25f73dc584a07bcda7a82750ff4f7672)
>
> Just the one bug fix I mentioned before, but it's a pretty important one
> as it can cause silent data corruption or IOMMU page faults.
>
> This would be suitable for stable and should apply cleanly to all the
> 3.x.y branches. I'm still working through testing of larger sets of
> fixes.
Pulled, thanks Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-13 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 17:47 Pull request: sfc 2013-03-12 Ben Hutchings
2013-03-12 17:48 ` [PATCH net] sfc: Only use TX push if a single descriptor is to be written Ben Hutchings
2013-03-13 9:17 ` Pull request: sfc 2013-03-12 David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox