From 7e1dac846322255cb5007a1dfdf92a9007e5dfff Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Thu, 21 Feb 2019 03:16:48 +0000 Subject: get rid of atomic_foo ops in the tx start and completion paths. atomics were used to coordinate updates to the number of available slots on the tx ring. start would use what was available, and txeof (completion) would add back freed slots. start and completion update a producer and consumer index respectively, so we can use those with the size of the ring to calculate space instead. while here i simplified what txeof does a fair bit, which combined with the removal of the atomics gives us a bit of a speed improvement. hrvoje popovski reports up to a 20% improvement in one environment, but 5 to 10 is probably more realistic. ive had this in a tree since 2017, but mpi's "Faster vlan(4) forwarding?" post made me dig it out and clean it up. ok jmatthew@ --- sys/dev/pci/if_ix.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/pci/if_ix.h') diff --git a/sys/dev/pci/if_ix.h b/sys/dev/pci/if_ix.h index 2c2a6be5693..fff1967133b 100644 --- a/sys/dev/pci/if_ix.h +++ b/sys/dev/pci/if_ix.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.h,v 1.32 2016/11/21 17:21:33 mikeb Exp $ */ +/* $OpenBSD: if_ix.h,v 1.33 2019/02/21 03:16:47 dlg Exp $ */ /****************************************************************************** @@ -169,7 +169,6 @@ struct tx_ring { union ixgbe_adv_tx_desc *tx_base; struct ixgbe_tx_buf *tx_buffers; struct ixgbe_dma_alloc txdma; - volatile uint32_t tx_avail; uint32_t next_avail_desc; uint32_t next_to_clean; enum { -- cgit v1.2.3