vmxnet3: better RSS support
The VMXNET3 device provides RSS hash value for received packets, but it is not being used. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
66d3591036
commit
7db11f7596
1 changed files with 7 additions and 0 deletions
|
@ -1226,6 +1226,11 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
|
||||||
pci_unmap_single(adapter->pdev, rbi->dma_addr, rbi->len,
|
pci_unmap_single(adapter->pdev, rbi->dma_addr, rbi->len,
|
||||||
PCI_DMA_FROMDEVICE);
|
PCI_DMA_FROMDEVICE);
|
||||||
|
|
||||||
|
#ifdef VMXNET3_RSS
|
||||||
|
if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE &&
|
||||||
|
(adapter->netdev->features & NETIF_F_RXHASH))
|
||||||
|
ctx->skb->rxhash = le32_to_cpu(rcd->rssHash);
|
||||||
|
#endif
|
||||||
skb_put(ctx->skb, rcd->len);
|
skb_put(ctx->skb, rcd->len);
|
||||||
|
|
||||||
/* Immediate refill */
|
/* Immediate refill */
|
||||||
|
@ -3022,6 +3027,8 @@ vmxnet3_probe_device(struct pci_dev *pdev,
|
||||||
if (adapter->num_rx_queues > 1 &&
|
if (adapter->num_rx_queues > 1 &&
|
||||||
adapter->intr.type == VMXNET3_IT_MSIX) {
|
adapter->intr.type == VMXNET3_IT_MSIX) {
|
||||||
adapter->rss = true;
|
adapter->rss = true;
|
||||||
|
netdev->hw_features |= NETIF_F_RXHASH;
|
||||||
|
netdev->features |= NETIF_F_RXHASH;
|
||||||
dev_dbg(&pdev->dev, "RSS is enabled.\n");
|
dev_dbg(&pdev->dev, "RSS is enabled.\n");
|
||||||
} else {
|
} else {
|
||||||
adapter->rss = false;
|
adapter->rss = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue