Commit 3f42941b authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

sky2: propogate rx hash when packet is copied

When a small packet is received, the driver copies it to a new skb to allow
reusing the full size Rx buffer. The copy was propogating the checksum offload
but not the receive hash information. The bug is impact was mostly harmless
and therefore not observed until reviewing this area of code.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9619496
...@@ -2494,8 +2494,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, ...@@ -2494,8 +2494,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,
skb_copy_from_linear_data(re->skb, skb->data, length); skb_copy_from_linear_data(re->skb, skb->data, length);
skb->ip_summed = re->skb->ip_summed; skb->ip_summed = re->skb->ip_summed;
skb->csum = re->skb->csum; skb->csum = re->skb->csum;
skb->rxhash = re->skb->rxhash;
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE); length, PCI_DMA_FROMDEVICE);
re->skb->rxhash = 0;
re->skb->ip_summed = CHECKSUM_NONE; re->skb->ip_summed = CHECKSUM_NONE;
skb_put(skb, length); skb_put(skb, length);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment