From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net] ipv6: introduce tcp_v6_iif() Date: Fri, 17 Oct 2014 17:00:31 -0700 Message-ID: References: <1413562640.24953.26.camel@edumazet-glaptop2.roam.corp.google.com> <1413569996.25949.6.camel@edumazet-glaptop2.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: David Miller , netdev To: Eric Dumazet Return-path: Received: from mail-qc0-f175.google.com ([209.85.216.175]:45421 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbaJRAAb (ORCPT ); Fri, 17 Oct 2014 20:00:31 -0400 Received: by mail-qc0-f175.google.com with SMTP id b13so1549714qcw.20 for ; Fri, 17 Oct 2014 17:00:31 -0700 (PDT) In-Reply-To: <1413569996.25949.6.camel@edumazet-glaptop2.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Oct 17, 2014 at 11:19 AM, Eric Dumazet wrote: > On Fri, 2014-10-17 at 09:58 -0700, Cong Wang wrote: > >> I doubt we still need to store iif in IP6CB() since we have skb->skb_iif, >> we can probably just make inet6_iif() be like inet_iif() so that IP6CB()->iif >> can be just removed? Does this make any sense to you? >> > > This makes sense and would gain 4 bytes in skb->cb[], so definitely > worth it. > Hmm, after testing my patch, I found that some IPv6 code (scope_id) calls inet6_iif() at socket layer too, where skb dst is already dropped. So we can't simply use skb_dst() for all inet6_iif(). This is also why IPv4 is different. Therefore, I think your patch is fine at least for net.