Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1286240ybi; Thu, 30 May 2019 14:57:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqytzZxP5b9X3Frykc0INuLNGkxCrpNOwiZNEvQkeIQUh3FLkQzwrDq7/VwC7WMQ1J3PIKcq X-Received: by 2002:a65:5206:: with SMTP id o6mr5777846pgp.248.1559253450700; Thu, 30 May 2019 14:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559253450; cv=none; d=google.com; s=arc-20160816; b=cUa4STjlWFNtXuuA9ojt81O94Q3a/s/umSZBwGkm+vVw1Ll2EPC/8iSgLmakS422KK rlcDY77C270teAnrdOBzmo6tIpAj5YuVFXXluubRh8ZLHUlL9vQar/1wJoLb2f59Q0HU HVqYoAtwEbOAA7s06sNWDN0VnRdpBCou+m5c6f+UDwm9egxQ5RkJbUQWEaJRrYltj/5s V991lsgGB5TbsZiebAjBxTVLrd7ptcTCqJAAVMcCfEvC2/BVQmmiffIhYDOmxb+jmSDv sT+Ll7JPfcNXbOmWq+EZiWiY3WI+W+kXwuUBR3jGsJzSBFDtv+xrGvcy2jnPHJ6GgNhv O9jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=WcTdDEzv7GyD2l/qZ2vOaN1UI6qipiirsixbhb5+JtI=; b=vwr0JSqgaOP/2QHVizJtGxyUHqxQi6K5wVQCluWLqc4oeYVfohP87+UQZBfcvBVP6q XVii7k5MsKEfcxyH6KosYg4Du6d3mj59jP0iqBu0Q/upRoikhF+kh36r2xbMOrCnGpLZ sShqs0uXAUMUCJfGRDQFtmVwh0PkOpgGTTh4McKs+/ClTszudqZOoAx7j4uu3ALZKkeA TuLZAdaXQecXMQ3gPHNhVD2rbutZo68bYVwWSormNpJVYnQmFAgaWQoTPSklag5Iwuho hOsoI8dI1jXdKW3TAGGwinkWgS0p2brJfCVgS+6DB46gYiqwpH9MJxjp5jzOEvotlFZS BPsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si4320337pje.37.2019.05.30.14.56.48; Thu, 30 May 2019 14:57:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfE3Vxw (ORCPT + 99 others); Thu, 30 May 2019 17:53:52 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:60832 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfE3Vxu (ORCPT ); Thu, 30 May 2019 17:53:50 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 257FC14DB1D91; Thu, 30 May 2019 14:36:05 -0700 (PDT) Date: Thu, 30 May 2019 14:36:04 -0700 (PDT) Message-Id: <20190530.143604.925231544360388287.davem@davemloft.net> To: mcroce@redhat.com Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org, vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] sctp: deduplicate identical skb_checksum_ops From: David Miller In-Reply-To: <20190529153941.12166-1-mcroce@redhat.com> References: <20190529153941.12166-1-mcroce@redhat.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 30 May 2019 14:36:05 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matteo Croce Date: Wed, 29 May 2019 17:39:41 +0200 > The same skb_checksum_ops struct is defined twice in two different places, > leading to code duplication. Declare it as a global variable into a common > header instead of allocating it on the stack on each function call. > bloat-o-meter reports a slight code shrink. > > add/remove: 1/1 grow/shrink: 0/10 up/down: 128/-1282 (-1154) > Function old new delta > sctp_csum_ops - 128 +128 > crc32c_csum_ops 16 - -16 > sctp_rcv 6616 6583 -33 > sctp_packet_pack 4542 4504 -38 > nf_conntrack_sctp_packet 4980 4926 -54 > execute_masked_set_action 6453 6389 -64 > tcf_csum_sctp 575 428 -147 > sctp_gso_segment 1292 1126 -166 > sctp_csum_check 579 412 -167 > sctp_snat_handler 957 772 -185 > sctp_dnat_handler 1321 1132 -189 > l4proto_manip_pkt 2536 2313 -223 > Total: Before=359297613, After=359296459, chg -0.00% > > Reviewed-by: Xin Long > Signed-off-by: Matteo Croce Applied.