> On Sep 2, 2016, at 10:08 PM, Zongkai LI <zealo...@gmail.com> wrote:
> 
> Since ovs_nd_mtu_opt and ovs_nd_prefix_opt is introducted, rename
> ovs_nd_opt to ovs_nd_lla_opt to specify it's Source/Target Link-layer
> Address Option.
> 
> v1 -> v2
> rebased, separete ovs_nd_opt rename to this patch.

Same comment about the "signed-off-by:" and not including version information 
in the commit comment.

> ---
> lib/flow.c        | 26 ++++++++++-----------
> lib/odp-execute.c | 20 ++++++++--------
> lib/packets.c     | 68 +++++++++++++++++++++++++++----------------------------
> lib/packets.h     | 17 +++++++-------
> 4 files changed, 65 insertions(+), 66 deletions(-)
> 
> diff --git a/lib/flow.c b/lib/flow.c
> index ba4f8c7..b442965 100644
> --- a/lib/flow.c
> +++ b/lib/flow.c
> @@ -400,8 +400,8 @@ parse_icmpv6(const void **datap, size_t *sizep, const 
> struct icmp6_hdr *icmp,
>         while (*sizep >= 8) {
>             /* The minimum size of an option is 8 bytes, which also is
>              * the size of Ethernet link-layer options. */
> -            const struct ovs_nd_opt *nd_opt = *datap;
> -            int opt_len = nd_opt->nd_opt_len * ND_OPT_LEN;
> +            const struct ovs_nd_lla_opt *nd_opt = *datap;
> +            int opt_len = nd_opt->len * ND_LLA_OPT_LEN;


I'd go through the patch and replace any "nd_opt" with "lla_opt" to be more 
consistent with naming from the previous patch.

...

> --- a/lib/packets.h
> +++ b/lib/packets.h
> @@ -831,15 +831,14 @@ BUILD_ASSERT_DECL(ICMP6_HEADER_LEN == sizeof(struct 
> icmp6_header));
> 
> uint32_t packet_csum_pseudoheader6(const struct ovs_16aligned_ip6_hdr *);
> 
> -/* Neighbor Discovery option field.
> - * ND options are always a multiple of 8 bytes in size. */
> -#define ND_OPT_LEN 8
> -struct ovs_nd_opt {
> -    uint8_t  nd_opt_type;      /* Values defined in icmp6.h */
> -    uint8_t  nd_opt_len;       /* in units of 8 octets (the size of this 
> struct) */
> -    struct eth_addr nd_opt_mac;   /* Ethernet address in the case of SLL or 
> TLL options */
> +/* Neighbor Discovery option: Source/Target Link-layer Address. */
> +#define ND_LLA_OPT_LEN 8
> +struct ovs_nd_lla_opt {
> +    uint8_t  type;      /* Values defined in icmp6.h */

I'd indicate that this is either "ND_OPT_SOURCE_LINKADDR" or 
"ND_OPT_TARGET_LINKADDR".

> +    uint8_t  len;       /* in units of 8 octets (the size of this struct) */

Since we only support Ethernet addresses, I'd just indicate that this is 
expected to be 1.

--Justin



_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to