diff options
author | stephen hemminger <shemminger@vyatta.com> | 2012-04-30 01:49:45 -0400 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2012-05-25 12:24:44 -0400 |
commit | 334f10f50800f92e721d5a5a80dfcaec862204b1 (patch) | |
tree | 4e9f27fd1364923e4df3e02c34641880c3786c84 | |
parent | 274ef2decaddccdca3174fcdfdcb991d4b37cfdb (diff) |
sky2: propogate rx hash when packet is copied
BugLink: http://bugs.launchpad.net/bugs/1002880
[ Upstream commit 3f42941b5d1d13542b1a755a9e4f633aa72e4d3e ]
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: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-rw-r--r-- | drivers/net/sky2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 80df3a833e5..88e287fd072 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2344,8 +2344,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, | |||
2344 | skb_copy_from_linear_data(re->skb, skb->data, length); | 2344 | skb_copy_from_linear_data(re->skb, skb->data, length); |
2345 | skb->ip_summed = re->skb->ip_summed; | 2345 | skb->ip_summed = re->skb->ip_summed; |
2346 | skb->csum = re->skb->csum; | 2346 | skb->csum = re->skb->csum; |
2347 | skb->rxhash = re->skb->rxhash; | ||
2348 | |||
2347 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, | 2349 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, |
2348 | length, PCI_DMA_FROMDEVICE); | 2350 | length, PCI_DMA_FROMDEVICE); |
2351 | re->skb->rxhash = 0; | ||
2349 | re->skb->ip_summed = CHECKSUM_NONE; | 2352 | re->skb->ip_summed = CHECKSUM_NONE; |
2350 | skb_put(skb, length); | 2353 | skb_put(skb, length); |
2351 | } | 2354 | } |