aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando/ionic/ionic_dev.h
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2019-10-23 17:48:59 -0700
committerDavid S. Miller <davem@davemloft.net>2019-10-25 20:52:36 -0700
commit08f2e4b2b2008ce461dd6958caa616a2e3a30ac8 (patch)
treec89bad68a89b49fc24ad0fcf5a13664b7848abad /drivers/net/ethernet/pensando/ionic/ionic_dev.h
parentionic: add a watchdog timer to monitor heartbeat (diff)
downloadlinux-dev-08f2e4b2b2008ce461dd6958caa616a2e3a30ac8.tar.xz
linux-dev-08f2e4b2b2008ce461dd6958caa616a2e3a30ac8.zip
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.h7
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;
};