public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Andreas Ferber <aferber@techfak.uni-bielefeld.de>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@transmeta.com>,
	VLAN Mailing List <vlan@Scry.WANfear.com>
Subject: Re: [PATCH] 802.1q-support for 3c59x.c
Date: Wed, 07 Nov 2001 11:03:58 -0500	[thread overview]
Message-ID: <3BE95B6E.E4EB1B86@mandrakesoft.com> (raw)
In-Reply-To: <20011107165318.A15577@devcon.net>

Andreas Ferber wrote:
> 
> Hi,
> 
> I was very pleased that 802.1q VLAN tagging support has been included
> into the kernel recently :-)
> 
> Though this is only part of the work needed.
> 
> Let me start from the beginning, for those not familiar with 802.1q
> tagging. The tag adds an additional header field (4 Bytes) to the
> ethernet header, so that the maximum frame size is 1518 Octets instead
> of 1514 (with a standard MTU of 1500).
> 
> The problem is that most network cards by default will flag those
> frames as oversized and drop them (though /sending/ tagged frames is
> not a problem with any card I know of). There are several
> possibilities to resolve this problem:
> 
> - reduce the MTU on all servers connected to the VLAN (not always
>   possible)
> - patch the NIC driver so that it doesn't drop oversized frames
> - set the MTU on the physical interface to 1504, which is a) not
>   possible with every driver, and b) untagged frames sent via the
>   interface will be oversized now.
> 
> Below my signature you will find a patch that adds the necessary bits
> to the 3c59x.c driver. It sets up the NIC to receive VLAN tagged
> frames and (if supported by the NIC) correctly checksum them.
> 
> Newer cards (those with HW checksumming support) have a register to
> configure the maximum frame size. Older cards don't have this
> register, but they have a flag that lets the NIC receive FDDI sized
> frames (4500 Octets IIRC).
> 
> It was discussed on the VLAN mailinglist if (at least in the case of
> hardware like the old 3Com NICs where you can basically only disable
> checking the frame size) it is feasible to only enable the large
> frame receipt if VLAN tags are really used on the NIC. We have come to
> the conclusion that uncoditionally enabling it should not pose any
> performance penalties with any sane hardware implementation, so we
> decided to not introduce a VLAN enable callback into NIC drivers.
> 
> Just to be sure, the 3c59x patch only enables the new parts if 802.1q
> support has been enabled in the kernel configuration. Testing proved
> the patch quite stable (no problem reports so far).
> 
> There is no maintainer mentioned for the 3c59x driver in the
> MAINTAINERS file, so I send this directly to the list. Please consider
> the patch for kernel inclusion.
> 
> Andreas
> --
>        Andreas Ferber - dev/consulting GmbH - Bielefeld, FRG
>      ---------------------------------------------------------
>          +49 521 1365800 - af@devcon.net - www.devcon.net
> 
> --- linux.orig/drivers/net/3c59x.c      Sun Sep 30 21:26:06 2001
> +++ linux/drivers/net/3c59x.c   Wed Oct 24 21:52:10 2001
> @@ -308,6 +308,9 @@
>     code size of a per-interface flag is not worthwhile. */
>  static char mii_preamble_required;
> 
> +/* The Ethernet Type used for 802.1q tagged frames */
> +#define VLAN_ETHER_TYPE 0x8100

This needs to be ETH_P_8021Q from if_ether.h.

Have you tested this?  I should think you would need a dev->change_mtu
also.

-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno


  reply	other threads:[~2001-11-07 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-07 15:53 [PATCH] 802.1q-support for 3c59x.c Andreas Ferber
2001-11-07 16:03 ` Jeff Garzik [this message]
2001-11-07 18:15   ` Paul P Komkoff Jr
2001-11-07 18:26     ` Jeff Garzik
2001-11-08 20:53   ` Andreas Ferber

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=3BE95B6E.E4EB1B86@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=aferber@techfak.uni-bielefeld.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=vlan@Scry.WANfear.com \
    /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