[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B74A3@saturn3.aculab.com>
Date: Wed, 18 Dec 2013 11:00:29 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Tom Herbert" <therbert@...gle.com>, <davem@...emloft.net>,
<netdev@...r.kernel.org>
Subject: RE: [PATCH 02/15] net: bnx2x calls skb_set_hash
> From: Tom Herbert
> Drivers should call skb_set_hash to set the hash and its type
> in an skbuff.
...
> /* Set Toeplitz hash for a none-LRO skb */
> - skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp, &l4_rxhash);
> - skb->l4_rxhash = l4_rxhash;
> + rxhash = bnx2x_get_rxhash(bp, cqe_fp, &l4_rxhash);
> + skb_set_hash(skb, rxhash,
> + l4_rxhash ? PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
This is all silly, skb_set_rxhash() just undoes that conditional.
The compiler might be smart enough to undo it all.
IMHO skb->l4_rxhash should be skb->rx_hash_type and set to one
of the PKT_HASH_TYPE_xxx constants.
(with 0 => no hash assigned)
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists