Gleb Natapov wrote:
>
> Hello Ben,
>
> On Sun, Oct 08, 2000 at 02:10:24PM -0700, Ben Greear wrote:
> >
> > 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.
>
> Right.
>
> >
> > 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...)
>
> Here I don't agree with you completely. It is possible to know when to delete
> or add MC address
> from/to ethernet device.
>
> Here how we do it in our implementation:
> set_multicast_list is called whenever MC address is added or deleted from
> device's mc_list.
> I store previous mc_list in vlan private structure. When set_multicast_list
> is called I check for
> addresses that are not on saved mc_list and add them to the ethernet device.
> After that I check for
> addresses that are on the saved mc_list but not on vlan mc_list and delete
> them from the device.
> Than I save new device's mc_list in vlan private structure.
Yes, after re-reading your code about 20 more times I finally realized that is
what
you were doing. (Actually, I started doing the same thing..then realized you
had
already figured it out..so I just used yours... :))
You mentioned that there was a race condition when using SMP, could you explain
that one a bit more? We could probably put a lock around it if we need to, in
order to make it safe.
>
> Unfortunately current multicast address management API isn't convenient for
> use with virtual devices.
> Perhaps now is a good time to change it. I personally want to see two
> functions:
> dev->add_multicast_address(), dev->del_multicast_address(). This way it will
> be much easier for virtual
> devices to manage underlying devices' MC list.
Probably a good 2.5 thing...
>
> --
> Gleb.
--
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
|