diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-07 23:52:06 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-07 23:52:06 +0000 |
commit | 0f4ead03387d03bdbd839dc3b3f1a656db8dd6aa (patch) | |
tree | fc16540594cb3d4f2d0fff72fa0b9931394fbcf4 /sys/dev/pci/if_ix.h | |
parent | bed34a1487feb78240e5ea91d055772fb23bef38 (diff) |
build on mpi's work toward ix multiq support.
this calls if_attach_queues and if_attach_iqueues to allocate an
ifq and ifiq per tx ring and rx ring respectivly, and then tie them
together. ix rx rings deliver packets into ifiqs, and ifqs push
packets onto ix tx rings. the return value from ifiq_input is also
used to tell the if_rxr stuff to back off.
this also makes the rx refill timeout per rx ring instead of per
interface, and makes it only schedule the timeout when the ring is
completely empty to avoid races with normal rx ring operation.
tested by hrvoje popovski
ok jmatthew@
Diffstat (limited to 'sys/dev/pci/if_ix.h')
-rw-r--r-- | sys/dev/pci/if_ix.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ix.h b/sys/dev/pci/if_ix.h index c8089740c19..5c7ccf04a39 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.40 2020/04/06 08:31:04 mpi Exp $ */ +/* $OpenBSD: if_ix.h,v 1.41 2020/06/07 23:52:05 dlg Exp $ */ /****************************************************************************** @@ -167,6 +167,7 @@ struct ix_queue { */ struct tx_ring { struct ix_softc *sc; + struct ifqueue *ifq; uint32_t me; uint32_t watchdog_timer; union ixgbe_adv_tx_desc *tx_base; @@ -193,6 +194,7 @@ struct tx_ring { */ struct rx_ring { struct ix_softc *sc; + struct ifiqueue *ifiq; uint32_t me; union ixgbe_adv_rx_desc *rx_base; struct ixgbe_dma_alloc rxdma; @@ -205,6 +207,7 @@ struct rx_ring { uint next_to_refresh; uint next_to_check; uint last_desc_filled; + struct timeout rx_refill; struct if_rxring rx_ring; struct ixgbe_rx_buf *rx_buffers; @@ -231,7 +234,6 @@ struct ix_softc { struct ifmedia media; struct timeout timer; - struct timeout rx_refill; int msix; int if_flags; |