Skip to content

Commit

Permalink
net: mlx4 calls skb_set_hash
Browse files Browse the repository at this point in the history
Drivers should call skb_set_hash to set the hash and its type
in an skbuff.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Herbert authored and David S. Miller committed Dec 18, 2013
1 parent b408f94 commit 6917441
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/mellanox/mlx4/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
}

if (dev->features & NETIF_F_RXHASH)
gro_skb->rxhash = be32_to_cpu(cqe->immed_rss_invalid);
skb_set_hash(gro_skb,
be32_to_cpu(cqe->immed_rss_invalid),
PKT_HASH_TYPE_L3);

skb_record_rx_queue(gro_skb, cq->ring);

Expand Down Expand Up @@ -789,7 +791,9 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
skb_record_rx_queue(skb, cq->ring);

if (dev->features & NETIF_F_RXHASH)
skb->rxhash = be32_to_cpu(cqe->immed_rss_invalid);
skb_set_hash(skb,
be32_to_cpu(cqe->immed_rss_invalid),
PKT_HASH_TYPE_L3);

if ((be32_to_cpu(cqe->vlan_my_qpn) &
MLX4_CQE_VLAN_PRESENT_MASK) &&
Expand Down

0 comments on commit 6917441

Please sign in to comment.