From: Stephen Hemminger <shemminger@vyatta.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Mirko Lindner <mlindner@marvell.com>
Subject: [PATCH 1/2] sky2: propogate rx hash when packet is copied
Date: Mon, 30 Apr 2012 08:49:45 -0700 [thread overview]
Message-ID: <20120430155027.152144873@vyatta.com> (raw)
In-Reply-To: 20120430154944.890709139@vyatta.com
[-- Attachment #1: sky2-rxhash.patch --]
[-- Type: text/plain, Size: 935 bytes --]
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>
--- a/drivers/net/ethernet/marvell/sky2.c 2012-04-30 08:19:56.225976395 -0700
+++ b/drivers/net/ethernet/marvell/sky2.c 2012-04-30 08:21:05.395136397 -0700
@@ -2494,8 +2494,11 @@ static struct sk_buff *receive_copy(stru
skb_copy_from_linear_data(re->skb, skb->data, length);
skb->ip_summed = re->skb->ip_summed;
skb->csum = re->skb->csum;
+ skb->rxhash = re->skb->rxhash;
+
pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr,
length, PCI_DMA_FROMDEVICE);
+ re->skb->rxhash = 0;
re->skb->ip_summed = CHECKSUM_NONE;
skb_put(skb, length);
}
next prev parent reply other threads:[~2012-04-30 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 15:49 [PATCH 0/2] sky2 patches Stephen Hemminger
2012-04-30 15:49 ` Stephen Hemminger [this message]
2012-04-30 16:47 ` [PATCH 2/2] [PATCH] sky2: fix receive length error in mixed non-VLAN/VLAN traffic Stephen Hemminger
2012-05-01 17:39 ` [PATCH 0/2] sky2 patches David Miller
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=20120430155027.152144873@vyatta.com \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=mlindner@marvell.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;
as well as URLs for NNTP newsgroup(s).