On Fri, Apr 19, 2019 at 3:31 AM Ben Pfaff <b...@ovn.org> wrote:

> On Tue, Apr 16, 2019 at 01:24:07PM +0530, nusid...@redhat.com wrote:
> > From: Numan Siddique <nusid...@redhat.com>
> >
> > Previous commit added a new OVS action 'check_pkt_larger'. This
> > patch supports that action in OVN. The syntax to use this would be
> >
> > reg0[0] = check_pkt_larger(LEN)
> >
> > Upcoming commit will make use of this action in ovn-northd and
> > will generate an ICMPv4 packet if the packet length is greater than
> > the specified length.
> >
> > Signed-off-by: Numan Siddique <nusid...@redhat.com>
> > Acked-by: Mark Michelson <mmich...@redhat.com>
>
> In parse_check_pkt_larger(), I think it would be a good idea to
> type-check the destination before parsing the rest of the syntax.  This
> is because of a principle that it makes sense to report the first error
> that occurs in the syntax, rather than ones that occur later.
>
> The tests bear this out.  One test reports the problem in the
> destination:
>
>     +reg0 = check_pkt_larger(1500);
>     +    Cannot use 32-bit field reg0[0..31] where 1-bit field is required.
>
> But a later test reports an error in the argument even though the
> destination is still wrong, which I personally would find a surprising
> error to get in the circumstances:
>
>     +reg0 = check_pkt_larger(foo);
>     +    Syntax error at `foo' expecting `;'.
>
> Thanks,
>

Ack. Done in v4.

Thanks
Numan


>
> Ben.
>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to