Subject: Re: [RFD] First draft of RDNSS-in-RA support for IPv6 DNS autoconfiguration

From: Michael Buesch <[email-masked]>
Date: Sat, 23 Jun 2007 01:42:41 +0200

On Saturday 23 June 2007 01:26:19 C. Scott Ananian wrote:
> +struct rdns6_info {
> +       rwlock_t                lock;
> +       struct timer_list       expiry_timer;
> +       struct rdns6_entry *    rdnss_list;
> +       struct inet6_dev *      in6_dev; /* back pointer for netlink notify */
> +       int                     expire_all : 1, /* remove entries on ifdown */
> +                               free_me : 1; /* safely free this struct */
> +};

Sparse will complain about that.
I suggest you do:

+struct rdns6_info {
+       rwlock_t                lock;
+       struct timer_list       expiry_timer;
+       struct rdns6_entry *    rdnss_list;
+       struct inet6_dev *      in6_dev; /* back pointer for netlink notify */
+       u8                     expire_all; /* remove entries on ifdown */
+       u8                     free_me; /* safely free this struct */
+};

Will generate better code and
struct size shouldn't increase. So it's a net win.

-- 
Greetings Michael.