Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13348beee529cd1200deeac161e1b2de0705b495
Commit:     13348beee529cd1200deeac161e1b2de0705b495
Parent:     de3c4507047f2457359551c49b093669acb4f190
Author:     Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 11 11:27:19 2006 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Dec 11 09:54:06 2006 -0500

    [PATCH] myri10ge: fix big_bytes in case of vlan frames
    
    Fix sizing of big_bytes in the case of vlan frames. The 4
    VLAN_HLEN bytes were omitted, leading to sizing the big buffer
    4 bytes smaller than it should be.  Due to how rx buffers are
    carved from pages, this was harmless for the common (9000, 1500)
    byte MTUs, but could lead to data corruption for some MTUs.
    
    Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index d38217a..a0d1dae 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1696,11 +1696,11 @@ static int myri10ge_open(struct net_device *dev)
         * tell him the buffer is larger, because we only use 1
         * buffer/pkt, and the mtu will prevent overruns.
         */
-       big_pow2 = dev->mtu + ETH_HLEN + MXGEFW_PAD;
+       big_pow2 = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
        if (big_pow2 < MYRI10GE_ALLOC_SIZE / 2) {
                while ((big_pow2 & (big_pow2 - 1)) != 0)
                        big_pow2++;
-               mgp->big_bytes = dev->mtu + ETH_HLEN + MXGEFW_PAD;
+               mgp->big_bytes = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
        } else {
                big_pow2 = MYRI10GE_ALLOC_SIZE;
                mgp->big_bytes = big_pow2;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to