[ovs-dev] [RFC v3 1/5] datapath: Add a new action check_pkt_len

Ben Pfaff blp at ovn.org
Fri Feb 22 16:55:43 UTC 2019


On Wed, Feb 20, 2019 at 08:14:01PM +0530, Numan Siddique wrote:
> On Tue, Feb 12, 2019 at 7:57 AM Ben Pfaff <blp at ovn.org> wrote:
> > There is a special issue with this action, which is a lot like a special
> > issue with the "sample".  That is that the action has flow control that
> > might change the flow in different ways, and this can make an important
> > difference for actions that follow this one.  If one fork of the action
> > pops off a header, and the other one does not, then that makes
> > validating actions that come after it complicated.  I do not see
> > anything here that takes that into account.  I recommend reading the
> > validation code for the sample action for inspiration.
> >
> >
> From what I see from the sample code, it checks if the actions inside the
> sample
> modify the flow key or not and set the 'sample_arg->exec' accordingly if the
> 'sample' action is not the last action.
> 
> In the ovs-vswitchd patch (patch 2 of this series) when it translates the
> 'check_pkt_len'
> action, 'check_pkt_len' will be the last action of the flow.
> 
> In the datapath implementation I am thinking to mandate 'check_pkt_len' to
> be last
> action. If any actions follow 'check_pkt_len', then entire flow should be
> rejected.
> Any thoughts, comments on this. I really don't see a scenario where another
> action
> would follow 'check_pkt_len'.

That would also solve the problem, and it would not reduce the
generality, since any actions that would otherwise have followed the
check_pkt_len action could be duplicated into both of the branches.

It might have difficult implications for flow translation in userspace,
but I won't be sure until I see the corresponding userspace patches.


More information about the dev mailing list