diff options
author | Eric Dumazet <edumazet@google.com> | 2017-03-08 08:17:09 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-09 09:54:46 -0800 |
commit | d85f6c14e967b0bddfa9712daa17d79e297d18b8 (patch) | |
tree | 15d8028fa8ae29e97983761509e6f159ffea40d3 /drivers/net/ethernet/mellanox/mlx4/en_rx.c | |
parent | aaca121dd6cfedc9afb9d0ee23ded9d84e217e20 (diff) | |
download | blackbird-obmc-linux-d85f6c14e967b0bddfa9712daa17d79e297d18b8.tar.gz blackbird-obmc-linux-d85f6c14e967b0bddfa9712daa17d79e297d18b8.zip |
mlx4: rx_headroom is a per port attribute
No need to duplicate it per RX queue / frags.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 118ea83cff08..bb33032a280f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -115,7 +115,7 @@ static int mlx4_en_alloc_frags(struct mlx4_en_priv *priv, for (i = 0; i < priv->num_frags; i++) { frags[i] = ring_alloc[i]; - frags[i].page_offset += priv->frag_info[i].rx_headroom; + frags[i].page_offset += priv->rx_headroom; rx_desc->data[i].addr = cpu_to_be64(frags[i].dma + frags[i].page_offset); ring_alloc[i] = page_alloc[i]; @@ -1202,7 +1202,7 @@ void mlx4_en_calc_rx_buf(struct net_device *dev) */ priv->frag_info[0].frag_stride = PAGE_SIZE; priv->dma_dir = PCI_DMA_BIDIRECTIONAL; - priv->frag_info[0].rx_headroom = XDP_PACKET_HEADROOM; + priv->rx_headroom = XDP_PACKET_HEADROOM; i = 1; } else { int buf_size = 0; @@ -1214,12 +1214,12 @@ void mlx4_en_calc_rx_buf(struct net_device *dev) priv->frag_info[i].frag_stride = ALIGN(priv->frag_info[i].frag_size, SMP_CACHE_BYTES); - priv->frag_info[i].rx_headroom = 0; buf_size += priv->frag_info[i].frag_size; i++; } priv->rx_page_order = MLX4_EN_ALLOC_PREFER_ORDER; priv->dma_dir = PCI_DMA_FROMDEVICE; + priv->rx_headroom = 0; } priv->num_frags = i; |