diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-02-21 03:16:48 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-02-21 03:16:48 +0000 |
commit | 7e1dac846322255cb5007a1dfdf92a9007e5dfff (patch) | |
tree | c7838a62c1717a4392141b8c85b0d6fbe32b0589 /sys/dev/pci/if_ix.h | |
parent | 53c70b64595420002601dd02a171ccc567d23abe (diff) |
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@
Diffstat (limited to 'sys/dev/pci/if_ix.h')
-rw-r--r-- | sys/dev/pci/if_ix.h | 3 |
1 files changed, 1 insertions, 2 deletions
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 { |