diff options
author | Shannon Nelson <snelson@pensando.io> | 2019-10-24 03:48:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-26 06:52:36 +0300 |
commit | 08f2e4b2b2008ce461dd6958caa616a2e3a30ac8 (patch) | |
tree | c89bad68a89b49fc24ad0fcf5a13664b7848abad /drivers/net/ethernet/pensando/ionic/ionic_dev.h | |
parent | 089406bc5ad639e4fcc9419f70f4d3d91d7370cb (diff) | |
download | linux-08f2e4b2b2008ce461dd6958caa616a2e3a30ac8.tar.xz |
ionic: implement support for rx sgl
Even out Rx performance across MTU sizes by changing from full
skb allocations to page-based frag allocations. The device
supports a form of scatter-gather in the Rx path, so we can
set up a number of pages for each descriptor, all of which are
easier to alloc and pass around than the standard kzalloc'd
buffer. An skb is wrapped around the pages while processing
the received packets, and pages are recycled as needed, or
left alone if they weren't used in the Rx.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_dev.h')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_dev.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h index 78691c1ba20b..4665c5dc5324 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h @@ -155,12 +155,19 @@ typedef void (*ionic_desc_cb)(struct ionic_queue *q, struct ionic_desc_info *desc_info, struct ionic_cq_info *cq_info, void *cb_arg); +struct ionic_page_info { + struct page *page; + dma_addr_t dma_addr; +}; + struct ionic_desc_info { void *desc; void *sg_desc; struct ionic_desc_info *next; unsigned int index; unsigned int left; + unsigned int npages; + struct ionic_page_info pages[IONIC_RX_MAX_SG_ELEMS + 1]; ionic_desc_cb cb; void *cb_arg; }; |