netdev
[Top] [All Lists]

Some more questions on multicast & VLAN.

To: VLAN Mailing List <vlan@xxxxxxxxxxxxxxxx>, "vlan-devel (other)" <vlan-devel@xxxxxxxxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
Subject: Some more questions on multicast & VLAN.
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Sun, 08 Oct 2000 14:10:24 -0700
Organization: Candela Technologies
Sender: owner-netdev@xxxxxxxxxxx
I'm having some fun trying to figure out how to make MultiCast work with
VLANs.

First, the MC list on the VLAN will not necessarily be equal to that of
the real Ethernet device, because there could be several VLAN devices,
each with a non-overlapping subset of MC addresses, on a single Ethernet
device.

Also, using VLANs does not mean that you cannot use the real Ethernet
device at the same time, so it becomes almost impossible to know when
to delete an MC address based on what is told to the VLAN device.
(Maybe it was added on the real ethernet device, as well as the VLAN
device, so removing it from the VLAN device SHOULD NOT remove it from
the ethernet device...)

Unless reference counting on the MC entries is put into place (or
already exists??)...then I should be able to delete from the
underlying device smartly...

Can somone comment on what these variables mean?:  (from net_device.h)

/*
 *      We tag multicasts with these structures.
 */
 
struct dev_mc_list
{       
        struct dev_mc_list      *next;
        __u8                    dmi_addr[MAX_ADDR_LEN];
        unsigned char           dmi_addrlen;
        int                     dmi_users;
        int                     dmi_gusers;
};


**********************************************************************
So, here is my plan: (w/out ref-counting)

Upon an addition of an MC address to a VLAN:
  1) Update the VLAN's MC list accordingly.
  2) Add it to the underlying Ethernet device if it does not already exist.

Upon Deletion of an MC address from a VLAN device:
  1) Remove it from the VLAN device, but DO NOT remove it from the
     underlying device.  If you want it removed from the underlying
     device, then you'll have to remove it from the Ethernet device
     yourself.

NOTE:  Might have to hack up the Ethernet MC delete code too, or
    VLANs may be thinking they are accepting MC pkts that the
    underlying device IS NOT accepting.

NOTE:  If you have a large number of VLAN interfaces, keeping the
    MC list sane could be pretty time consuming (linear on number of
    VLAN interfaces + MC list for each VLAN interface...at least).
    
    How often are the MC lists expected to change??

Upon ingress of a packet to a VLAN device:
  1) Do software multicast filtering.  Anyone point me to some code
     that does multicast filtering, or an algorithm to do it? (I'm
     a little fuzzy on how MC works...)


Thanks,
Ben

-- 
Ben Greear (greearb@xxxxxxxxxxxxxxx)  http://www.candelatech.com
Author of ScryMUD:  scry.wanfear.com 4444        (Released under GPL)
http://scry.wanfear.com               http://scry.wanfear.com/~greear

<Prev in Thread] Current Thread [Next in Thread>