[ovs-dev] [PATCH 03/12] odp-util: Bump up maximum number of ODP actions.

Jesse Gross jesse at nicira.com
Tue Dec 7 19:34:38 UTC 2010


On Tue, Dec 7, 2010 at 11:00 AM, Ben Pfaff <blp at nicira.com> wrote:
> The kernel supports more than a single page of actions now, so userspace
> should be able to take advantage of this.
>
> Upcoming commits will completely replace this data structure but this
> commit makes the bug fix clear and is suitable for cherry-picking to
> long-term support branches.

MAX_ODP_ACTIONS isn't just a theoretical maximum - it's an array size
in "struct odp_actions".  So every time that we use it, we end up
putting 16 pages on the stack.  That doesn't seem like a great idea to
me.  It's also overkill: the kernel only allows a maximum of 2 * the
maximum number of ports.  At 1024 ports and 8 bytes per action, that's
a maximum of 16k that we could usefully use.

I know that we had to bump up the number of actions in the kernel to
handle flooding on large numbers of ports.  So in reality, it looks
like it was just wrapping around the array and overwriting some of the
earlier ports?




More information about the dev mailing list