[ovs-dev] [PATCH v4 05/14] Support userdata in NXT_PACKET_IN2.

Ben Pfaff blp at ovn.org
Fri Feb 19 23:40:43 UTC 2016


On Fri, Feb 19, 2016 at 02:35:40PM -0800, Jarno Rajahalme wrote:
> With the comments below:
> 
> Acked-by: Jarno Rajahalme <jarno at ovn.org>

Thanks for the review.

> > +/* Properties for NXAST_CONTROLLER2. */
> > +enum nx_action_controller2_prop_type {
> > +    NXAC2PT_MAX_LEN,            /* ovs_be16 max length to send controller. */
> > +    NXAC2PT_CONTROLLER_ID,      /* ovs_be16 controller ID of destination. */
> > +    NXAC2PT_REASON,             /* uint8_t reason (OFPR_*). */
> > +    NXAC2PT_USERDATA,           /* Data to copy into NXPINT_USERDATA. */
> > +};
> 
> Should document the default values here.

OK, I somehow managed to fit them in now.

> > diff --git a/lib/ofp-print.c b/lib/ofp-print.c
> > index 74f0de6..39e1c8b 100644
> > --- a/lib/ofp-print.c
> > +++ b/lib/ofp-print.c
> > @@ -141,6 +141,17 @@ ofp_print_packet_in(struct ds *string, const struct ofp_header *oh,
> >     }
> >     ds_put_char(string, '\n');
> > 
> > +    if (pin.userdata_len) {
> > +        ds_put_cstr(string, " userdata=");
> > +        for (size_t i = 0; i < pin.userdata_len; i++) {
> > +            if (i) {
> > +                ds_put_char(string, '.');
> > +            }
> > +            ds_put_format(string, "%02x", pin.userdata[i]);
> > +        }
> 
> Could use format_hex_arg() here?

OK, done.

Thanks,

Ben.



More information about the dev mailing list