Skip to content

Commit

Permalink
net: cisco-enic 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 8264989 commit 3739acd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,11 +1036,12 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,
skb->protocol = eth_type_trans(skb, netdev);
skb_record_rx_queue(skb, q_number);
if (netdev->features & NETIF_F_RXHASH) {
skb->rxhash = rss_hash;
if (rss_type & (NIC_CFG_RSS_HASH_TYPE_TCP_IPV6_EX |
NIC_CFG_RSS_HASH_TYPE_TCP_IPV6 |
NIC_CFG_RSS_HASH_TYPE_TCP_IPV4))
skb->l4_rxhash = true;
skb_set_hash(skb, rss_hash,
(rss_type &
(NIC_CFG_RSS_HASH_TYPE_TCP_IPV6_EX |
NIC_CFG_RSS_HASH_TYPE_TCP_IPV6 |
NIC_CFG_RSS_HASH_TYPE_TCP_IPV4)) ?
PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
}

if ((netdev->features & NETIF_F_RXCSUM) && !csum_not_calc) {
Expand Down

0 comments on commit 3739acd

Please sign in to comment.