From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH net] netfilter: ipv6: nf_defrag: reduce struct net memory waste Date: Mon, 18 Jun 2018 14:14:11 +0200 Message-ID: <20180618121411.mrbrmhntymfvteb2@salvia> References: <20180613171156.240889-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jozsef Kadlecsik , Florian Westphal , netfilter-devel@vger.kernel.org, netdev , Eric Dumazet To: Eric Dumazet Return-path: Received: from mail.us.es ([193.147.175.20]:37814 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933501AbeFRMOQ (ORCPT ); Mon, 18 Jun 2018 08:14:16 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 1CDC4FB450 for ; Mon, 18 Jun 2018 14:12:49 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 0A107DA817 for ; Mon, 18 Jun 2018 14:12:49 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180613171156.240889-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Jun 13, 2018 at 10:11:56AM -0700, Eric Dumazet wrote: > It is a waste of memory to use a full "struct netns_sysctl_ipv6" > while only one pointer is really used, considering netns_sysctl_ipv6 > keeps growing. > > Also, since "struct netns_frags" has cache line alignment, > it is better to move the frags_hdr pointer outside, otherwise > we spend a full cache line for this pointer. > > This saves 192 bytes of memory per netns. Also applied, thanks.