On Fri, Nov 03, 2017 at 04:24 PM GMT, Mark Michelson wrote: > Thanks for the reviews Jakub. I've added an in-line comment below. > Otherwise consider that there is an implicit "Will do!" on all of your > other suggestions. > > On Fri, Nov 3, 2017 at 11:04 AM Jakub Sitnicki <j...@redhat.com> wrote:
[...] >> > diff --git a/lib/packets.h b/lib/packets.h >> > index 057935cbf..9d69b93d0 100644 >> > --- a/lib/packets.h >> > +++ b/lib/packets.h >> > @@ -976,6 +976,7 @@ BUILD_ASSERT_DECL(ND_PREFIX_OPT_LEN == sizeof(struct >> ovs_nd_prefix_opt)); >> > >> > /* Neighbor Discovery option: MTU. */ >> > #define ND_MTU_OPT_LEN 8 >> > +#define ND_MTU_DEFAULT 0 >> > struct ovs_nd_mtu_opt { >> > uint8_t type; /* ND_OPT_MTU */ >> > uint8_t len; /* Always 1. */ >> > @@ -1015,6 +1016,9 @@ BUILD_ASSERT_DECL(RA_MSG_LEN == sizeof(struct >> ovs_ra_msg)); >> > #define ND_RA_MANAGED_ADDRESS 0x80 >> > #define ND_RA_OTHER_CONFIG 0x40 >> > >> > +#define ND_RA_MAX_INTERVAL_DEFAULT 600 >> > +#define ND_RA_MIN_INTERVAL_DEFAULT(max) (max) >= 9 ? (max) / 3 : (max) >> * 3 / 4 >> > + >> >> I don't understand the formula. It generates a sequence that is not >> always increasing but takes a dip when max == 9. What is the reasoning >> behind it? >> > > It's based on RFC 4861 section 6.2.1. > > MinRtrAdvInterval > The minimum time allowed between sending > unsolicited multicast Router Advertisements from > the interface, in seconds. MUST be no less than 3 > seconds and no greater than .75 * > MaxRtrAdvInterval. > > Default: 0.33 * MaxRtrAdvInterval If > MaxRtrAdvInterval >= 9 seconds; otherwise, the > Default is 0.75 * MaxRtrAdvInterval. > > Note that this is not the exact quote from the RFC. I have altered the > default text to include the suggested change from Errata 3154. Does that > explain the formula better? > > I can add the citation to the code so that it makes more sense for someone > skimming the code. OK, I see now where it came from. Thanks for explaining it. Maybe a short reference will do? /* RFC 4861 MinRtrAdvInterval, MaxRtrAdvInterval */ ... so the reader has a hint where to look it up. -Jakub _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev