Re: vlan patch

From: Andrew Thompson (thompsa_at_freebsd.org)
Date: 10/20/05

  • Next message: Robert Watson: "Re: Network performance 6.0 with netperf"
    Date: Thu, 20 Oct 2005 22:19:34 +1300
    To: Gleb Smirnoff <glebius@FreeBSD.org>, yar@FreeBSD.org, ru@FreeBSD.org, freebsd-net@freebsd.org
    
    

    On Thu, Oct 20, 2005 at 11:00:54AM +0400, Gleb Smirnoff wrote:
    > Andrew,
    >
    > On Wed, Oct 19, 2005 at 11:25:59PM +1300, Andrew Thompson wrote:
    > A> It has always bugged me how the vlan code traverses the linked-list for
    > A> each incoming packet to find the right ifvlan, I have this patch which
    > A> attempts to fix this.
    > A>
    > A> What it does is replace the linear search for the vlan with a constant
    > A> time lookup. It does this by allocating an array for each vlan enabled
    > A> parent interface so the tag can be directly indexed.
    > A>
    > A> This has an overhead of ~16kb on 32bit, this is not too bad as there is
    > A> usually only one physical interface when using a large number of vlans.
    > A>
    > A> I have measured a 1.6% pps increase with 100 vlans, and 8% with 500, and
    > A> yes, some people use this many in production.
    > A>
    > A> It also has the benefit of enforcing unique vlan tags per parent which
    > A> the current code doesn't do.
    >
    > Although the memory overhead is not noticable on modern i386 and amd64
    > PCs I don't think that we should waste so much memory. We should keep
    > in mind the existence of embedded architectures with little memory.
    >

    I agree. Did you see the revised patch that sets a threshold before
    allocating the memory? do you think thats sufficient?

    Andrew
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Robert Watson: "Re: Network performance 6.0 with netperf"

    Relevant Pages

    • Re: [was] addition to ipfw (read vlans from bridge)..
      ... I have redone this patch in a different manner. ... Basically if it is a vlan packet, take off the whole vlan header instead ... fiddling with the mbuf contents in favour of teaching ipfw (or the ... to handle vlan tags as well. ...
      (freebsd-net)
    • Re: [was] addition to ipfw (read vlans from bridge)..
      ... I have redone this patch in a different manner. ... Basically if it is a vlan packet, take off the whole vlan header instead of just the ether header, but pass to ipfw, an ether header with ... fiddling with the mbuf contents in favour of teaching ipfw (or the ...
      (freebsd-net)
    • Re: VLAN support in rcNG [PATCH]
      ... Using the patch it's possible, ... Each vlan interface is created at runtime using interface cloning. ... with the functionality I want ...
      (freebsd-current)
    • [PATCH] Updated 802.1p/q patch
      ... I have tested my 802.1p input patch with vlans configured. ... M_VLANTAG to be passed up and down the stack for 802.1p priority. ... a layer 3 address configured on a vlan interface, ...
      (freebsd-net)
    • Re: [was] addition to ipfw (read vlans from bridge)..
      ... I have redone this patch in a different manner. ... Basically if it is a vlan packet, take off the whole vlan header ... instead of just the ether header, but pass to ipfw, an ether header ...
      (freebsd-net)