From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ajit Khaparde <ajit.khaparde@emulex.com>
Cc: netdev@vger.kernel.org
Subject: [RFC] be2net: add rxhash support
Date: Thu, 24 Feb 2011 21:24:44 +0100 [thread overview]
Message-ID: <1298579084.2659.13.camel@edumazet-laptop> (raw)
In-Reply-To: <1298560543.2814.4.camel@edumazet-laptop>
Ajit, it seems be2net provides RSS hash value in rx compl descriptor ?
Could we feed skb->rxhash with it ?
Thanks !
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 0bdccb1..f2db5b2 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1038,6 +1038,9 @@ static void be_rx_compl_process(struct be_adapter *adapter,
skb->truesize = skb->len + sizeof(struct sk_buff);
skb->protocol = eth_type_trans(skb, adapter->netdev);
+ if (adapter->netdev->features & NETIF_F_RXHASH)
+ skb->rxhash = AMAP_GET_BITS(struct amap_eth_rx_compl, rsshash, rxcp);
+
vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
vtm = AMAP_GET_BITS(struct amap_eth_rx_compl, vtm, rxcp);
@@ -1099,6 +1102,9 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
return;
}
+ if (adapter->netdev->features & NETIF_F_RXHASH)
+ skb->rxhash = AMAP_GET_BITS(struct amap_eth_rx_compl, rsshash, rxcp);
+
remaining = pkt_size;
for (i = 0, j = -1; i < num_rcvd; i++) {
page_info = get_rx_page_info(adapter, rxo, rxq_idx);
@@ -2618,6 +2624,7 @@ static void be_netdev_init(struct net_device *netdev)
NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_GRO | NETIF_F_TSO6;
+ netdev->features |= NETIF_F_RXHASH;
netdev->vlan_features |= NETIF_F_SG | NETIF_F_TSO |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
next prev parent reply other threads:[~2011-02-24 20:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110131232755.GA4691@akhaparde-VBox>
2011-02-01 23:42 ` [PATCH net-2.6 2/2] be2net: remove netif_stop_queue being called before register_netdev David Miller
2011-02-24 15:15 ` Eric Dumazet
2011-02-24 20:24 ` Eric Dumazet [this message]
2011-02-28 0:07 ` David Miller
2011-02-25 17:44 [RFC] be2net: add rxhash support Ajit Khaparde
2011-02-25 18:21 ` Eric Dumazet
2011-02-25 19:32 ` Eric Dumazet
-- strict thread matches above, loose matches on Subject: below --
2011-02-25 19:36 Ajit Khaparde
2011-02-25 19:45 ` Eric Dumazet
2011-02-25 21:35 Ajit Khaparde
2011-02-26 10:30 ` Eric Dumazet
2011-02-26 21:11 Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298579084.2659.13.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=ajit.khaparde@emulex.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox