[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ddf3fb95-6068-cef0-f8c4-d39c7c202826@gmail.com>
Date:   Sun, 30 Sep 2018 09:29:35 -0600
From:   David Ahern <dsahern@...il.com>
To:     Li RongQing <roy.qing.li@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Cc:     Li RongQing <lirongqing@...du.com>, netdev@...r.kernel.org
Subject: Re: [PATCH][net-next] ipv6: drop container_of when convert dst to
 rt6_info
On 9/30/18 3:38 AM, Li RongQing wrote:
>>
>> I don't understand why you are doing this? It is not going to be
>> faster (or safer) than container_of. container_of provides the
>> same functionality and is safe against position of the member
>> in the structure.
>>
> 
> In fact, most places are converting dst to rt6_info directly, and only
> few place uses container_of
> 
> 
> net/ipv6/ip6_output.c:  struct rt6_info *rt = (struct rt6_info *)skb_dst(skb);
> net/ipv6/route.c:       const struct rt6_info *rt = (struct rt6_info *)dst;
> 
I am trying to convert all places to container_of rather than a
typecast. Please do not undo that
Powered by blists - more mailing lists
 
