From: Jeff Garzik <jeff@garzik.org>
To: Andy Fleming <afleming@freescale.com>
Cc: netdev@vger.kernel.org, Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Subject: Re: [PATCH] ucc_geth: Add 8 bytes to max TX frame for VLANs
Date: Sun, 02 Nov 2008 08:18:45 -0500 [thread overview]
Message-ID: <490DA8B5.2020303@garzik.org> (raw)
In-Reply-To: <1221524685-25968-1-git-send-email-afleming@freescale.com>
Andy Fleming wrote:
> From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
>
> Creating a VLAN interface on top of ucc_geth adds 4 bytes
> to the frame and the HW controller is not prepared to
> TX a frame bigger than 1518 bytes which is 4 bytes too
> small for a full VLAN frame. Also add 4 extra bytes for future
> expansion.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
> drivers/net/ucc_geth.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index 8f944e5..8fed4bb 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -113,10 +113,10 @@ static struct ucc_geth_info ugeth_primary_info = {
> .maxGroupAddrInHash = 4,
> .maxIndAddrInHash = 4,
> .prel = 7,
> - .maxFrameLength = 1518,
> + .maxFrameLength = 1518+8, /* Add 4 bytes for VLAN tags and 4 extra bytes */
> .minFrameLength = 64,
> - .maxD1Length = 1520,
> - .maxD2Length = 1520,
> + .maxD1Length = 1520+8,
> + .maxD2Length = 1520+8,
> .vlantype = 0x8100,
Is this still needed?
I found this buried in my inbox.
If so, please resend with the "+8" converted into a named constant.
Hardcoding lengths like this without named constants (or comments, on
the other lines) tends to be an error-prone practice.
Jeff
next prev parent reply other threads:[~2008-11-02 13:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 0:24 [PATCH] ucc_geth: Add 8 bytes to max TX frame for VLANs Andy Fleming
2008-11-02 13:18 ` Jeff Garzik [this message]
2008-11-07 10:18 ` Joakim Tjernlund
2008-11-11 21:40 ` Andy Fleming
-- strict thread matches above, loose matches on Subject: below --
2008-03-18 15:11 Joakim Tjernlund
2008-03-19 21:56 ` Benny Amorsen
2008-03-21 12:20 ` Li Yang
2008-03-21 12:20 ` Li Yang
2008-03-22 11:51 ` Joakim Tjernlund
2008-03-22 11:51 ` Joakim Tjernlund
2008-03-25 9:17 ` Joakim Tjernlund
2008-03-26 12:43 ` Li Yang
2008-03-26 12:43 ` Li Yang
2008-03-27 12:43 ` Joakim Tjernlund
2008-03-28 2:54 ` Li Yang
2008-03-28 2:54 ` Li Yang
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=490DA8B5.2020303@garzik.org \
--to=jeff@garzik.org \
--cc=Joakim.Tjernlund@transmode.se \
--cc=afleming@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.