netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/17] net: cisco-enic calls skb_get_rxhash
@ 2013-11-26  5:51 Tom Herbert
  2013-11-26 11:56 ` Govindarajulu Varadarajan
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Herbert @ 2013-11-26  5:51 UTC (permalink / raw)
  To: davem, netdev

Drivers should call skb_get_rxhash to set the rxhash and its type
in an skbuff.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/ethernet/cisco/enic/enic_main.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index ff78dfa..ea30551 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -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_rxhash(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)) ?
+			     RXHASH_TYPE_L4 : RXHASH_TYPE_L3);
+
 		}
 
 		if ((netdev->features & NETIF_F_RXCSUM) && !csum_not_calc) {
-- 
1.8.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 06/17] net: cisco-enic calls skb_get_rxhash
  2013-11-26  5:51 [PATCH 06/17] net: cisco-enic calls skb_get_rxhash Tom Herbert
@ 2013-11-26 11:56 ` Govindarajulu Varadarajan
  0 siblings, 0 replies; 2+ messages in thread
From: Govindarajulu Varadarajan @ 2013-11-26 11:56 UTC (permalink / raw)
  To: Christian Benvenuti (benve), Sujith Sankar (ssujith), Tom Herbert,
	jeffrey.t.kirsher
  Cc: David Miller, netdev



On Mon, 25 Nov 2013, Tom Herbert wrote:

> Drivers should call skb_get_rxhash to set the rxhash and its type in an skbuff.
                           ^^^
It should be skb_set_rxhash right? I would like to have 'git log' show
correct information.

Otherwise this patch looks fine for me.

Acked-by: Govindarajulu Varadarajan <govindarajulu90@gmail.com>

>
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
> drivers/net/ethernet/cisco/enic/enic_main.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
> index ff78dfa..ea30551 100644
> --- a/drivers/net/ethernet/cisco/enic/enic_main.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_main.c
> @@ -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_rxhash(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)) ?
> +			     RXHASH_TYPE_L4 : RXHASH_TYPE_L3);
> +
> 		}
>
> 		if ((netdev->features & NETIF_F_RXCSUM) && !csum_not_calc) {
> -- 
> 1.8.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-26 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-26  5:51 [PATCH 06/17] net: cisco-enic calls skb_get_rxhash Tom Herbert
2013-11-26 11:56 ` Govindarajulu Varadarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).