[RFC PATCH 4/5] add doc/README.lwip.size

Maxim Uvarov maxim.uvarov at linaro.org
Fri May 5 12:25:28 CEST 2023


Add doc with size calculation accoding to original u-boot.

Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
---
 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%
+
-- 
2.30.2



More information about the U-Boot mailing list