2009-06-16 23:10:22

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Tue, 2009-06-16 at 14:38 +0200, Jiri Pirko wrote:

> >> Yes, I've already converted unicast lists to use list_head there. I'm sending
> >> the patch doing the same for multicast lists soon.
> >
> >Very nice! After that maybe I'll take a look again at moving things into
> >a common structure -- I ultimately want to use a multicast list without
> >a netdev to sync multiple netdevs onto a common multicast list that is
> >not part of a netdev.
>
> I see, hmm, I think I can do this change with my conversion... I was thinking
> about similar thing as you suggest before...

I don't think the patch for converting the multicast lists will hit .31,
I take it?

I'd like to get this patch into the .32 tree once it opens
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch

but I don't know how to handle that wrt. your patch, which will clearly
conflict with mein. Will you be sending that soon?

I guess we could stick this one into wireless-testing, and then take it
out again once your patch hits the tree and offers me similar API for
list_head based multicast lists?

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-06-17 07:21:25

by Jiri Pirko

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

Wed, Jun 17, 2009 at 01:09:48AM CEST, [email protected] wrote:
>On Tue, 2009-06-16 at 14:38 +0200, Jiri Pirko wrote:
>
>> >> Yes, I've already converted unicast lists to use list_head there. I'm sending
>> >> the patch doing the same for multicast lists soon.
>> >
>> >Very nice! After that maybe I'll take a look again at moving things into
>> >a common structure -- I ultimately want to use a multicast list without
>> >a netdev to sync multiple netdevs onto a common multicast list that is
>> >not part of a netdev.
>>
>> I see, hmm, I think I can do this change with my conversion... I was thinking
>> about similar thing as you suggest before...
>
>I don't think the patch for converting the multicast lists will hit .31,
>I take it?

I'm preparing the patch right now. It's most likely it will hit .32.

>
>I'd like to get this patch into the .32 tree once it opens
>http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch
>
>but I don't know how to handle that wrt. your patch, which will clearly
>conflict with mein. Will you be sending that soon?

I see your need. I'll think about it and try to prepare the lists for this use.
>
>I guess we could stick this one into wireless-testing, and then take it
>out again once your patch hits the tree and offers me similar API for
>list_head based multicast lists?

Or wait, I hope the patch will be ready in week tops.

Jirka
>
>johannes



2009-06-17 12:58:52

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Wed, 2009-06-17 at 08:26 -0400, John W. Linville wrote:
> On Wed, Jun 17, 2009 at 11:30:24AM +0200, Johannes Berg wrote:
> > On Wed, 2009-06-17 at 09:21 +0200, Jiri Pirko wrote:
> >
> > > >I guess we could stick this one into wireless-testing, and then take it
> > > >out again once your patch hits the tree and offers me similar API for
> > > >list_head based multicast lists?
> > >
> > > Or wait, I hope the patch will be ready in week tops.
> >
> > Yeah, that's fine, I'll ask people to throw in the simple export patch
> > for testing. Thanks for considering! Please disregard my work on
> > mac80211, I'll rebase over your work.
>
> If you need Jiri's patch in wireless-testing I can make arrangements
> to cherry-pick it.

Not the one he just sent, that one's concerned with unicast address
lists. We'll see. The mdev removal still had a bunch of issues anyway.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-06-17 09:30:59

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Wed, 2009-06-17 at 09:21 +0200, Jiri Pirko wrote:

> >I guess we could stick this one into wireless-testing, and then take it
> >out again once your patch hits the tree and offers me similar API for
> >list_head based multicast lists?
>
> Or wait, I hope the patch will be ready in week tops.

Yeah, that's fine, I'll ask people to throw in the simple export patch
for testing. Thanks for considering! Please disregard my work on
mac80211, I'll rebase over your work.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2009-06-17 12:30:31

by John W. Linville

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Wed, Jun 17, 2009 at 11:30:24AM +0200, Johannes Berg wrote:
> On Wed, 2009-06-17 at 09:21 +0200, Jiri Pirko wrote:
>
> > >I guess we could stick this one into wireless-testing, and then take it
> > >out again once your patch hits the tree and offers me similar API for
> > >list_head based multicast lists?
> >
> > Or wait, I hope the patch will be ready in week tops.
>
> Yeah, that's fine, I'll ask people to throw in the simple export patch
> for testing. Thanks for considering! Please disregard my work on
> mac80211, I'll rebase over your work.

If you need Jiri's patch in wireless-testing I can make arrangements
to cherry-pick it.

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2009-06-16 23:20:28

by Johannes Berg

[permalink] [raw]
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Wed, 2009-06-17 at 01:10 +0200, Johannes Berg wrote:

> I'd like to get this patch into the .32 tree once it opens
> http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch

+/**
+ * mc_unsync_from_dev - Remove synchronized addresses from the destination list
+ * @to: destination list
+ * @to_count: destination list count
+ * @from: source device
+ *
+ * Remove all addresses that were added to the destination list by
+ * mc_sync_from_dev(). This function is intended to be called from
+ * the * dev->stop function of layered software devices. The
+ * destination list must be locked in whatever way the caller
+ * manages it.
+ */
+void mc_unsync_from_dev(struct dev_addr_list **to, int *to_count,
+ struct net_device *from)
+{
+ netif_addr_lock_bh(from);
+ __dev_addr_unsync(to, to_count,
+ &from->mc_list, &from->mc_count);
+ netif_addr_unlock_bh(from);
+}
+EXPORT_SYMBOL(mc_unsync_from_dev);

That can't work, of course, because the "to" list needs to be locked
_after_ "from" is locked, due mc_sync_from_dev() begin used in
ndo_set_multicast_list(). I guess I have to push out all the locking, by
just exporting __dev_addr_sync/__dev_addr_unsync.

Objections? Better ideas?

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part