sfc: Allow shared pages to be recycled
[deliverable/linux.git] / drivers / net / sfc / net_driver.h
index 59c8ecc39aee713211757597b59a4314404b2113..40c0d931b1824b36c81a030f1f3ada13c3664fc5 100644 (file)
@@ -231,6 +231,24 @@ struct efx_rx_buffer {
        unsigned int len;
 };
 
+/**
+ * struct efx_rx_page_state - Page-based rx buffer state
+ *
+ * Inserted at the start of every page allocated for receive buffers.
+ * Used to facilitate sharing dma mappings between recycled rx buffers
+ * and those passed up to the kernel.
+ *
+ * @refcnt: Number of struct efx_rx_buffer's referencing this page.
+ *     When refcnt falls to zero, the page is unmapped for dma
+ * @dma_addr: The dma address of this page.
+ */
+struct efx_rx_page_state {
+       unsigned refcnt;
+       dma_addr_t dma_addr;
+
+       unsigned int __pad[0] ____cacheline_aligned;
+};
+
 /**
  * struct efx_rx_queue - An Efx RX queue
  * @efx: The associated Efx NIC
This page took 0.034462 seconds and 5 git commands to generate.