[ovs-dev] why the max action length is 32K in kernel?
Greg Rose
gvrose8192 at gmail.com
Mon Sep 18 17:58:28 UTC 2017
On 09/12/2017 08:37 PM, ychen wrote:
> in function nla_alloc_flow_actions(), there is a check if action length is greater than MAX_ACTIONS_BUFSIZE(32k), then kernel datapath flow will not be installed, and packets will droppped.
> but in function xlate_actions(), there is such clause:
> if (nl_attr_oversized(ctx.odp_actions->size)) {
> /* These datapath actions are too big for a Netlink attribute, so we
> * can't hand them to the kernel directly. dpif_execute() can execute
> * them one by one with help, so just mark the result as SLOW_ACTION to
> * prevent the flow from being installed. */
> COVERAGE_INC(xlate_actions_oversize);
> ctx.xout->slow |= SLOW_ACTION;
> }
> and in function nl_attr_oversized(), the clause is like this:
> return payload_size > UINT16_MAX - NLA_HDRLEN;
>
>
> so we can see that in user space, max action length is almost 64K, but in kernel space, max action length is only 32K.
> my question is: why the max action length is different? packet will drop when its action length exceeds 32K, but packet can excute in slow path when its action length exceeds 64K?
It's a kernel limitation.
http://www.spinics.net/lists/netdev/msg431592.html
- Greg
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list