[ovs-dev] [PATCH] datapath: Increase maximum number of actions per flow.

Ben Pfaff blp at nicira.com
Thu Sep 16 00:18:21 UTC 2010


On Wed, Sep 15, 2010 at 11:49:19PM +0000, Jesse Gross wrote:
> This only fixes half the problem.  There's a much more serious issue
> as well: do_execute() checks that the return value of
> flow_actions_alloc() is not NULL when it should be IS_ERR().  Since
> allocation errors will not be NULL we get oopses when we hit this
> condition.  I'll send out a patch for this shortly.

Ouch.  Thank you.

> We do need to find a better solution than this though.  On a 64 bit
> machine, this would require up to 10 contiguous pages of memory with
> the current number of ports and we're going to have to bump that
> number up in the future.  If we expect a mixture of output ports and
> vlan tags (and maybe other actions) we'll need to do something along
> the lines of the OpenFlow 1.1 action buckets.

Outputting to 1024 ports is going to be slow and expensive no matter
what we do.  Despite that, I have a few ideas to make a bad situation a
little bit better:

* Hash action sets and merge duplicates, to reduce duplication.  (This
  is a good idea in userspace too.)

* Allow multiple pages of actions to be chained together in a linked
  list or array, so that we don't require contiguous pages.

* Introduce actions that output to more than one port, e.g. all the
  ports in a range, or using some kind of bitmap scheme.

* Really start using port groups.

* Make vswitchd/bridge.c smarter, so that it doesn't have to flush the
  MAC learning table in so many situations, so that we don't actually
  end up flooding packets so often.

Any of these sound particularly good/bad to you?




More information about the dev mailing list