[ovs-dev] [PATCH 5/7] datapath: Change listing flows to use an iterator concept.

Jesse Gross jesse at nicira.com
Tue Dec 28 22:13:35 UTC 2010


On Tue, Dec 28, 2010 at 2:09 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, Dec 28, 2010 at 01:10:09PM -0500, Jesse Gross wrote:
>> On Tue, Dec 28, 2010 at 12:49 PM, Ben Pfaff <blp at nicira.com> wrote:
>> > For what it's worth, batching using Netlink will not make the races go
>> > away.  Given a sufficient number of flows (enough to overflow
>> > NLMSG_GOODSIZE bytes), the kernel "dump" function will still be called
>> > repeatedly with locks being released between calls.
>>
>> Hmm, I suppose that is true.  Hopefully, it should be somewhat more
>> rare with batching.  Though NLMSG_GOODSIZE is a single page - we're
>> going to hit that pretty quickly and not just here but with actions as
>> well.
>
> Yeah, I don't think there's any reason we can't expand the skbs, and
> we'll have to do that in the case of large numbers of actions.  Maybe we
> can even stuff actions into frags if necessary.

I think the only reason for keeping it small is to avoid large
allocations, both in userspace and kernel.  For actions, it's probably
a good idea to use frags if necessary.

For dumping, we'll probably want to allow more NLMSG_GOODSIZE sized
packets.  There's also multipart messages, which actually seem like
the right solution to this.




More information about the dev mailing list