From: Shannon Nelson Date: Tue, 4 Apr 2017 18:41:35 +0000 (-0700) Subject: bnxt: add dma mapping attributes X-Git-Tag: v4.1.12-106.0.20170710_2300~30 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8c2876b86e2ec7d2f6f46a380d64d43f0cd2a74b;p=users%2Fjedix%2Flinux-maple.git bnxt: add dma mapping attributes On the SPARC platform we need to use the DMA_ATTR_WEAK_ORDERING attribute in our dma mapping in order to get the expected performance out of the receive path. Setting this boosts a simple iperf receive session from 2 Gbe to 23.4 Gbe. Orabug: 26366387 Signed-off-by: Shannon Nelson Reviewed-by: Tushar Dave Reviewed-by: Tom Saeger Signed-off-by: Allen Pais Signed-off-by: Brian Maly Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt.c Signed-off-by: Somasundaram Krishnasamy --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 611415daf683..a9ccbebe8128 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -2016,6 +2016,10 @@ static void bnxt_free_rx_skbs(struct bnxt *bp) if (!data) continue; + dma_unmap_single_attrs(&pdev->dev, rx_buf->mapping, + bp->rx_buf_use_size, bp->rx_dir, + &attrs); + rx_buf->data = NULL; if (BNXT_RX_PAGE_MODE(bp)) {