On Fri, Jul 14, 2017 at 5:31 AM, Ben Pfaff <b...@ovn.org> wrote:

> On Tue, Jul 11, 2017 at 08:14:45PM +0530, nusid...@redhat.com wrote:
> > From: Numan Siddique <nusid...@redhat.com>
> >
> > This patch adds a new OVN action 'put_nd_ra_opts' to support native
> > IPv6 Router Advertisement in OVN. This action can be used to respond
> > to the IPv6 Router Solicitation requests.
> >
> > ovn-controller parses this action and adds a NXT_PACKET_IN2 OF flow
> > with 'pause' flag set and the RA options stored in 'userdata' field.
> > This action is similar to 'put_dhcp_opts' and 'put_dhcpv6_opts'.
> >
> > When a valid IPv6 RS packet is received by the pinctrl module of
> > ovn-controller, it frames a new RA packet and sets the RA options
> > from the 'userdata' field and resumes the packet storing 1 in the
> > 1-bit result sub-field. If the packet is invalid, it resumes the
> > packet without any modifications storing 0 in the 1-bit result
> > sub-field.
> >
> > Eg. reg0[5] = put_nd_ra_opts(address_mode = "slaac", mtu = 1450,
> >                              slla = 01:02:03:04:05:06, prefix =
> aef0::/64)
> >
> > Co-authored-by: Zongkai LI <zealo...@gmail.com>
> > Signed-off-by: Zongkai LI <zealo...@gmail.com>
> > Signed-off-by: Numan Siddique <nusid...@redhat.com>
>
> Thanks for working on this.
>
> "checkpatch" reports:
>
>     WARNING: Line length is >79-characters long
>     #516 FILE: ovn/ovn-sb.xml:1518:
>               <code><var>R</var> = put_nd_ra_opts(<var>D1</var> =
> <var>V1</var>, <var>D2</var> = <var>V2</var>, ..., <var>Dn</var> =
> <var>Vn</var>);</code>
>

Hi Ben, I tried addressing the checkpatch warning before submitting the
patch. I was not able to address it properly.
I tried to restrict the length to 79 chars, like below

       <dt>
          <code><var>R</var> = put_nd_ra_opts(<var>D1</var> = <var>V1</var>,
          <var>D2</var> = <var>V2</var> ..., <var>Dn</var> = <var>Vn</var>);
          </code>
        </dt>

But when I run "man ovn-sb", it is rendered like below which is kind of not
neat

R = put_nd_ra_opts(D1 = V1,
                   D2 = V2 ..., Dn = Vn); Parameters: The following IPv6 ND
Router Advertisement option/value pairs as defined in RFC 4861.


I will explore more if a new line character can be ignored. Please let me
know if you are aware of to handle it properly.
Or is it fine to relax this warning for the .xml documentation files since
most of the files have >79 characters per line in them.





>     WARNING: Line length is >79-characters long
>     #521 FILE: ovn/ovn-sb.xml:1523:
>                 <b>Parameters</b>: The following IPv6 ND Router
> Advertisement option/value pairs
>
>     WARNING: Line length is >79-characters long
>     #528 FILE: ovn/ovn-sb.xml:1530:
>                       Mandatory parameter which specifies the address mode
> flag to be set in the RA flag
>
>     WARNING: Line length is >79-characters long
>     #529 FILE: ovn/ovn-sb.xml:1531:
>                       options field. The value of this option is a string
> and the following values can be
>
>     WARNING: Line length is >79-characters long
>     #537 FILE: ovn/ovn-sb.xml:1539:
>                       Mandatory parameter which specifies the link-layer
> address of the interface from which
>
>     WARNING: Line length is >79-characters long
>     #552 FILE: ovn/ovn-sb.xml:1554:
>                       Optional parameter which should be specified if the
> addr_mode is "slaac" or "dhcpv6_stateless".
>
>     WARNING: Line length is >79-characters long
>     #553 FILE: ovn/ovn-sb.xml:1555:
>                       The value should be an IPv6 prefix which will be
> used for stateless IPv6 address configuration.
>
>     WARNING: Line length is >79-characters long
>     #569 FILE: ovn/ovn-sb.xml:1571:
>                 When this action is applied to an IPv6 Router Solicitation
> request packet, it changes
>
>     WARNING: Line length is >79-characters long
>     #570 FILE: ovn/ovn-sb.xml:1572:
>                 the packet into an IPv6 Router Advertisement reply and
> adds the options specified
>
>     WARNING: Line length is >79-characters long
>     #575 FILE: ovn/ovn-sb.xml:1577:
>                 When this action is applied to a non-IPv6 Router
> Solicitation packet or an invalid
>
>     WARNING: Line length is >79-characters long
>     #583 FILE: ovn/ovn-sb.xml:1585:
>                   reg0[3] = put_nd_ra_opts(addr_mode = "slaac", slla =
> 00:00:00:00:10:02,
>
> "sparse" reports:
>
>     ../ovn/lib/actions.c:1882:22: warning: bad assignment (+=) to
> restricted ovs_be16
>     ../ovn/controller/pinctrl.c:1925:19: warning: incorrect type in
> argument 8 (different base types)
>     ../ovn/controller/pinctrl.c:1925:19:    expected restricted ovs_be16
> [usertype] router_lt
>     ../ovn/controller/pinctrl.c:1925:19:    got int
>     ../ovn/controller/pinctrl.c:1931:13: warning: incorrect type in
> argument 4 (different base types)
>     ../ovn/controller/pinctrl.c:1931:13:    expected restricted ovs_be32
> [usertype] valid_lifetime
>     ../ovn/controller/pinctrl.c:1931:13:    got unsigned int
>     ../ovn/controller/pinctrl.c:1932:13: warning: incorrect type in
> argument 5 (different base types)
>     ../ovn/controller/pinctrl.c:1932:13:    expected restricted ovs_be32
> [usertype] preferred_lifetime
>     ../ovn/controller/pinctrl.c:1932:13:    got unsigned int
>
>
Oops. I will address them and repost.

Thanks for the review

Numan


> Can you fix all that up, rebase, and repost?
>
> Thanks,
>
> Ben.
>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to