From patchwork Fri May 5 10:25:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 679300 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp283392wrs; Fri, 5 May 2023 03:51:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5w7TmCsFUuzVkBBn8t7CI43c/C7v7PQv0K2gRvzH6dRAiHg2v2vgZ37Y4OQgSrbpUt9Sf9 X-Received: by 2002:a05:6a20:9401:b0:f0:df6b:d233 with SMTP id hl1-20020a056a20940100b000f0df6bd233mr954993pzb.4.1683283879915; Fri, 05 May 2023 03:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683283879; cv=none; d=google.com; s=arc-20160816; b=mmdcoJ4oBeDEGv739Wa0j4VULV8Mch226wcbS836LaBshGaCldHpT1BsOa8/Ux5DDx J4Jsyj78Wqwp9EJyn4MeG8Tw+p3rXpXRIh3nOifl8e0PwTkQY7fI8BDBW5XLi6zMajJj 0WgdyKrnS959Gf2R/Y1NJf18MNzIKY2HwdITh7qk7j4YFss0Amjq8pE7W9UCTZ3iQfz2 62/HQrUqyUNyq4HWPQ+2NwM41wJH1RisMCa2hf5JRxMykxg2JBNjjhk5sY/B3Ulm5CpA uKcxfsHSx9nyLoct70xdmqvXlrWdbcbzhLiYdRjKZ13bPd0r3MaoPUOk45ybciZ0o/Cb rVJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vaUHOyT1LIyTYWNSTn2cNjIHhQTtmflDxQJya+CBkLg=; b=tulsBxQC5zxfcBSIGsk488+h2tyb/ReUiSkpSG4Ah2/ktd//Ixoq/Uk+h0RoTUg4lF Iuqd4Ylh4CXmQ6waUax3enS7wTrEYO6DCCQyBhogmrzyZZHmrkMfXBcWSYwooQxVa7Ar 8qfxAte2qRkTIfeSxGoraUGwLu1raE0yEpWrZNYtlZ92gDqoCn65rouNopaCklbhOVgQ VQTePc0nAoJiaXiE5qNuPN4NujXfdFKafHxQ92LADyouhVlqh011ndbDabwoPYdKk28x uSHVYRLi9xnN8wC6LY3g3SIIWMDa+6AGruzn0EGHHCtYZ30foXrPbVG21r0zNFSTTe2I xoow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o4FN9Y6q; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id v62-20020a638941000000b0052c7f7bc72csi1782983pgd.634.2023.05.05.03.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 03:51:19 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o4FN9Y6q; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD4A3857AE; Fri, 5 May 2023 12:50:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="o4FN9Y6q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE8588476F; Fri, 5 May 2023 12:25:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 24243846E7 for ; Fri, 5 May 2023 12:25:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=maxim.uvarov@linaro.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6a981550a6fso1188882a34.1 for ; Fri, 05 May 2023 03:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683282337; x=1685874337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vaUHOyT1LIyTYWNSTn2cNjIHhQTtmflDxQJya+CBkLg=; b=o4FN9Y6qe2bHGd5WktDWImgklI/BsLE/2opSKrlVjaQkZgKc2RdfwkHGt3slQPY2KL FcL+2ryaAjknJQIEwsvio7hzYgw2j0PCZy6ug21sUQlC1rSA1C57lu15GXkwtgwoRPSM xS2C0XB8sZwfad+w0x7kagY7B5NZddKKlEqqvYKiMe6XHPeafunvpXm5eZ02XtgKtA02 8QoDZwHa/JbIwXaMysuGCLrN2PyBowRNd33OxERHoDtWuxHDooNOCD+3OgovD0OmscLB nrWTg114oNSeXkNVPcCSd7HYDXHMdbMpiMXFDOFg+RDZPN8UVIn+5uIm1CIKZhi2rc/E lXMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683282337; x=1685874337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vaUHOyT1LIyTYWNSTn2cNjIHhQTtmflDxQJya+CBkLg=; b=CvCMri+mPzf8EktLMXNZcVKJho3cn0o0L/SQwnccGwQLOamkXrS10N5g9+b27/4rkR tQrdiiOqC6hwxOSxmP+V9TtayBLIq/a5As80ty5Tzh0pVQlP3kwthD4NPmhfJTeZw7CE R9lpsdC4X6cmbrATkZdDa3uEVr2CL6jsIFc+N8mluYzFjWa4W+Vre43PmaDVh2tIe9/C RCyy9V7Szr8T8RQZYu9wGGIm3q0Wn4jFN8yMANWBrdsJGacDWZTZluXXRIZ7O/7ChebK bBuhxSZ+7kTzbeNEuuCG8tTsqEgnsGrn8zg4EgcA+6YzuNN8SVfXlFj/s1MIblQm+BaD 3X5A== X-Gm-Message-State: AC+VfDzy8i1QpaHzGKdVqeTW+PZfZIyvhhbfQvvuLhI+c2opuEE4dGyf 5twT+owjrLpXvYSXWlYM6PImd1SuB/u+BilctjCME2iU X-Received: by 2002:a9d:6f97:0:b0:69f:7b9b:473e with SMTP id h23-20020a9d6f97000000b0069f7b9b473emr381802otq.38.1683282337241; Fri, 05 May 2023 03:25:37 -0700 (PDT) Received: from ledge.ozog.com ([2604:1380:4111:b700::1]) by smtp.gmail.com with ESMTPSA id b21-20020a056830105500b006a6169cf6b0sm635068otp.47.2023.05.05.03.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 03:25:36 -0700 (PDT) From: Maxim Uvarov To: u-boot@lists.denx.de Cc: pbrobinson@redhat.com, ilias.apalodimas@linaro.org, joe.hershberger@ni.com, rfried.dev@gmail.com, Maxim Uvarov Subject: [RFC PATCH 4/5] add doc/README.lwip.size Date: Fri, 5 May 2023 10:25:28 +0000 Message-ID: <20230505102529.1254445-5-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.40.1.476.g69c786637d In-Reply-To: <20230505102529.1254445-1-maxim.uvarov@linaro.org> References: <20230505102529.1254445-1-maxim.uvarov@linaro.org> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 05 May 2023 12:50:31 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add doc with size calculation accoding to original u-boot. Signed-off-by: Maxim Uvarov --- doc/README.lwip.size | 291 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 doc/README.lwip.size diff --git a/doc/README.lwip.size b/doc/README.lwip.size new file mode 100644 index 0000000000..7d3ff1e4d6 --- /dev/null +++ b/doc/README.lwip.size @@ -0,0 +1,291 @@ +Size with lwip stack + ping app + http wget app related +to original U-boot is: + +Total: Before=546322, After=594494, chg +8.82% +Total: Before=99215, After=100365, chg +1.16% +Total: Before=77777, After=78227, chg +0.58% + +(gdb) p (594494-546322) + (100365-99215) + (78227-77777) +$1 = 49772 +(gdb) p 49772 / 1024 +$2 = 48 + +Size will be increased on 48Kib. + +Full log: +linux/scripts/bloat-o-meter -c u-boot_orig/u-boot u-boot/u-boot +add/remove: 187/0 grow/shrink: 2/0 up/down: 48172/0 (48172) +Function old new delta +tcp_input - 4364 +4364 +tcp_receive - 3444 +3444 +tcp_write - 2192 +2192 +ip4_reass - 2096 +2096 +tcp_output - 1616 +1616 +tcp_slowtmr - 1572 +1572 +httpc_tcp_recv - 1044 +1044 +udp_input - 812 +812 +ip4_frag - 748 +748 +tcp_close_shutdown - 716 +716 +ip4_input - 688 +688 +icmp_input - 672 +672 +tcp_split_unsent_seg - 660 +660 +ip4_output_if_src - 612 +612 +tcp_connect - 608 +608 +etharp_input - 568 +568 +httpc_init_connection_common.constprop - 556 +556 +etharp_query - 556 +556 +ip_reass_free_complete_datagram - 520 +520 +etharp_output - 512 +512 +pbuf_alloc - 488 +488 +tcp_alloc - 484 +484 +pbuf_copy_partial_pbuf - 484 +484 +etharp_find_entry - 476 +476 +tcp_enqueue_flags - 440 +440 +tcp_create_segment - 424 +424 +tcp_abandon - 420 +420 +netif_add - 412 +412 +etharp_raw - 408 +408 +tcp_zero_window_probe - 400 +400 +raw_sendto_if_src - 360 +360 +tcp_pcb_remove - 356 +356 +raw_input - 352 +352 +pbuf_realloc - 336 +336 +tcp_free_acked_segments.constprop - 328 +328 +pbuf_free - 328 +328 +icmp_send_response - 324 +324 +tcp_output_alloc_header_common.constprop - 316 +316 +tcp_oos_insert_segment - 312 +312 +netif_loop_output - 296 +296 +httpc_create_request_string.constprop.isra - 292 +292 +ethernet_input - 284 +284 +etharp_output_to_arp_index - 280 +280 +tcp_rexmit - 276 +276 +netif_poll - 276 +276 +ip_reass_remove_oldest_datagram - 272 +272 +tcp_rexmit_rto_prepare - 260 +260 +tcp_pbuf_prealloc - 260 +260 +ping_send - 256 +256 +tcp_parseopt - 244 +244 +ping_recv - 244 +244 +ethernet_output - 236 +236 +inet_chksum_pseudo - 216 +216 +ip4addr_ntoa_r - 212 +212 +tcp_send_fin - 208 +208 +tcp_process_refused_data - 208 +208 +pbuf_copy_partial - 208 +208 +netif_set_addr - 204 +204 +tcp_output_control_segment_netif - 200 +200 +tcp_fasttmr - 200 +200 +pbuf_cat - 200 +200 +uboot_lwip_init - 196 +196 +lwip_wget - 192 +192 +tcp_rst_common.isra - 188 +188 +ip4_route - 188 +188 +tcp_update_rcv_ann_wnd - 184 +184 +sys_timeout_abs - 184 +184 +pbuf_memcmp - 184 +184 +tcp_recved - 180 +180 +pbuf_add_header_impl - 176 +176 +lwip_ping_init - 176 +176 +netif_do_set_ipaddr.isra - 172 +172 +httpc_free_state - 172 +172 +tcp_close_shutdown_fin - 168 +168 +httpc_recv - 168 +168 +tcp_send_empty_ack - 164 +164 +tcp_output_control_segment - 164 +164 +do_ops - 164 +164 +tcp_rexmit_fast - 160 +160 +raw_sendto - 160 +160 +do_lwip_ping - 156 +156 +pbuf_remove_header - 144 +144 +uboot_lwip_if_init - 140 +140 +tcp_input_delayed_close - 140 +140 +do_lwip_wget - 140 +140 +tcp_keepalive - 136 +136 +tcp_output_alloc_header.constprop - 132 +132 +tcp_netif_ip_addr_changed - 132 +132 +inet_chksum_pbuf - 132 +132 +pbuf_memfind - 128 +128 +pbuf_alloc_reference - 128 +128 +lwip_standard_chksum - 128 +128 +tcp_pcb_purge - 124 +124 +tcp_new_port - 124 +124 +pbuf_free_header - 120 +120 +tcp_rst_netif - 116 +116 +tcp_netif_ip_addr_changed_pcblist - 116 +116 +netif_issue_reports - 116 +116 +tcpip_try_callback - 112 +112 +tcp_poll - 112 +112 +tcp_eff_send_mss_netif - 112 +112 +ip_reass_dequeue_datagram - 112 +112 +ip4_input_accept - 112 +112 +httpc_tcp_connected - 112 +112 +etharp_free_entry - 112 +112 +tcp_rst - 108 +108 +ping_timeout - 108 +108 +low_level_input.constprop - 108 +108 +tcp_seg_copy - 104 +104 +tcp_next_iss - 104 +104 +sys_timeout - 104 +104 +httpc_get_internal_addr - 104 +104 +tcp_recv_null - 96 +96 +pbuf_clone - 96 +96 +tcp_rexmit_rto - 92 +92 +ip4_addr_isbroadcast_u32 - 92 +92 +tcp_sent - 88 +88 +tcp_rexmit_rto_commit - 88 +88 +tcp_recv - 88 +88 +tcp_kill_state - 88 +88 +tcp_err - 88 +88 +raw_new - 88 +88 +lwip_ping_send_now - 84 +84 +tcp_output_segment_busy - 80 +80 +tcp_get_next_optbyte - 80 +80 +tcp_free - 80 +80 +pbuf_alloced_custom - 80 +80 +ipfrag_free_pbuf_custom - 80 +80 +httpc_close - 80 +80 +uboot_lwip_poll - 76 +76 +tcpip_tcp_timer - 76 +76 +udp_netif_ip_addr_changed - 72 +72 +raw_netif_ip_addr_changed - 72 +72 +ip_frag_free_pbuf_custom_ref - 72 +72 +tcp_timer_needed - 68 +68 +tcp_close - 68 +68 +mem_free - 68 +68 +ethernetif_input - 68 +68 +pbuf_try_get_at - 64 +64 +pbuf_ref - 60 +60 +net_process_received_packet 768 828 +60 +memp_malloc - 60 +60 +tcp_seg_free - 56 +56 +netif_get_by_index - 56 +56 +low_level_output - 56 +56 +tcp_tmr - 52 +52 +tcp_segs_free - 48 +48 +pbuf_skip_const - 48 +48 +pbuf_copy - 48 +48 +httpc_tcp_poll - 48 +48 +tcp_free_ooseq - 44 +44 +pbuf_free_ooseq_callback - 44 +44 +netif_set_up - 44 +44 +netif_set_link_up - 44 +44 +tcp_output_fill_options.constprop - 40 +40 +etharp_request - 40 +40 +do_lwip_info - 40 +40 +raw_bind - 36 +36 +pbuf_chain - 36 +36 +memp_free - 36 +36 +ip4_output_if - 36 +36 +pbuf_header_force - 32 +32 +pbuf_clen - 32 +32 +inet_chksum - 32 +32 +pbuf_get_at - 28 +28 +httpc_tcp_err - 28 +28 +do_lwip_init - 28 +28 +sys_now - 24 +24 +tcp_trigger_input_pcb_close - 20 +20 +eth_send 116 136 +20 +lwip_loop_set - 16 +16 +ip4addr_ntoa - 16 +16 +tcp_arg - 12 +12 +lwip_loop_is_done - 12 +12 +lwip_enabled - 12 +12 +icmp_time_exceeded - 12 +12 +icmp_dest_unreach - 12 +12 +tcp_new - 8 +8 +tcp_abort - 8 +8 +raw_recv - 8 +8 +pbuf_add_header - 8 +8 +netif_null_output_ip4 - 8 +8 +lwip_htons - 8 +8 +lwip_htonl - 8 +8 +httpc_tcp_sent - 8 +8 +mem_trim - 4 +4 +mem_malloc - 4 +4 +ip_chksum_pseudo - 4 +4 +httpc_init_connection - 4 +4 +Total: Before=546322, After=594494, chg +8.82% +add/remove: 53/0 grow/shrink: 0/0 up/down: 1150/0 (1150) +Data old new delta +arp_table - 400 +400 +cmds - 224 +224 +uboot_netif - 96 +96 +_u_boot_list_2_cmd_2_lwipinfo - 56 +56 +_u_boot_list_2_cmd_2_lwip - 56 +56 +ip_data - 40 +40 +inseg - 32 +32 +settings - 24 +24 +str - 16 +16 +udp_pcbs - 8 +8 +tcpip_mbox - 8 +8 +tcphdr_opt2 - 8 +8 +tcphdr - 8 +8 +tcp_tw_pcbs - 8 +8 +tcp_listen_pcbs - 8 +8 +tcp_input_pcb - 8 +8 +tcp_bound_pcbs - 8 +8 +tcp_active_pcbs - 8 +8 +recv_data - 8 +8 +reassdatagrams - 8 +8 +raw_pcbs - 8 +8 +ping_target - 8 +8 +ping_pcb - 8 +8 +next_timeout - 8 +8 +netif_list - 8 +8 +netif_default - 8 +8 +daddr - 8 +8 +uboot_net_use_lwip - 4 +4 +tcpip_tcp_timer_active - 4 +4 +tcp_ticks - 4 +4 +seqno - 4 +4 +ping_time - 4 +4 +loop_lwip - 4 +4 +iss - 4 +4 +ip_target - 4 +4 +ackno - 4 +4 +tcplen - 2 +2 +tcphdr_optlen - 2 +2 +tcphdr_opt1len - 2 +2 +tcp_port - 2 +2 +tcp_optidx - 2 +2 +recv_acked - 2 +2 +ping_seq_num - 2 +2 +ip_reass_pbufcount - 2 +2 +ip_id - 2 +2 +tcp_timer_ctr - 1 +1 +tcp_timer - 1 +1 +tcp_active_pcbs_changed - 1 +1 +recv_flags - 1 +1 +pbuf_free_ooseq_pending - 1 +1 +netif_num - 1 +1 +flags - 1 +1 +etharp_cached_entry - 1 +1 +Total: Before=99215, After=100365, chg +1.16% +add/remove: 21/0 grow/shrink: 2/0 up/down: 450/0 (450) +RO Data old new delta +memp_pools - 112 +112 +tcp_pcb_lists - 32 +32 +version_string 46 70 +24 +__func__ 1317 1339 +22 +memp_UDP_PCB - 16 +16 +memp_TCP_SEG - 16 +16 +memp_TCP_PCB_LISTEN - 16 +16 +memp_TCP_PCB - 16 +16 +memp_TCPIP_MSG_INPKT - 16 +16 +memp_TCPIP_MSG_API - 16 +16 +memp_SYS_TIMEOUT - 16 +16 +memp_REASSDATA - 16 +16 +memp_RAW_PCB - 16 +16 +memp_PBUF_POOL - 16 +16 +memp_PBUF - 16 +16 +memp_NETCONN - 16 +16 +memp_NETBUF - 16 +16 +memp_FRAG_PBUF - 16 +16 +tcp_backoff - 13 +13 +tcp_persist_backoff - 7 +7 +ethzero - 6 +6 +ethbroadcast - 6 +6 +ip_addr_any - 4 +4 +Total: Before=77777, After=78227, chg +0.58% +