Ilias asked to make more clear results to compare the original stack and LWIP stack. So the difference between the current U-boot stack and the LWIP stack with 3 network commands is:
a) 18Kb - ls -lh size
b) 15Kb - bloat-o-meter script total line report.
BOM=linux/scripts/bloat-o-meter (script)
1. 893K - U-boot CMD_NET=n
2. 928K - U-boot CMD_NET=y TFTP=y PING=y WGET=y
BOM 1-2: Total: Before=692286, After=722283, chg +4.33%
3. 940K - U-boot CMD_NET=n, LWIP_TFTP=y LWIP_PING=y LWIP_PING=y
BOM 1-3: Total: Before=692286, After=738425, chg +6.66%
BOM 2-3:
add/remove: 287/203 grow/shrink: 3/11 up/down: 43459/-27317 (16142)
Function old new delta
tcp_input - 3588 +3588
tcp_receive - 2884 +2884
ip4_reass - 1760 +1760
tcp_output - 1400 +1400
tcp_write - 1300 +1300
tcp_slowtmr - 1172 +1172
httpc_tcp_recv - 1044 +1044
tftp_recv - 888 +888
ip4_input - 700 +700
ip4_frag - 632 +632
icmp_input - 604 +604
udp_input - 596 +596
etharp_input - 512 +512
tcp_split_unsent_seg - 500 +500
ip4addr_aton - 492 +492
tcp_alloc - 484 +484
ip4_output_if_src - 476 +476
tcp_close_shutdown - 448 +448
etharp_query - 436 +436
httpc_init_connection_common.constprop - 416 +416
udp_sendto_if_src - 408 +408
etharp_output - 404 +404
arp_table - 400 +400
tcp_connect - 396 +396
pbuf_alloc - 376 +376
etharp_find_entry - 372 +372
tcp_abandon - 368 +368
tcp_zero_window_probe - 356 +356
raw_sendto_if_src - 328 +328
pbuf_copy_partial_pbuf - 328 +328
ip_reass_free_complete_datagram - 328 +328
tcp_create_segment - 300 +300
raw_input - 292 +292
uboot_lwip_init - 284 +284
ethernet_input - 284 +284
etharp_raw - 284 +284
tcp_output_alloc_header_common.constprop - 280 +280
cmds - 280 +280
udp_bind - 276 +276
tcp_oos_insert_segment - 276 +276
ip_reass_remove_oldest_datagram - 272 +272
icmp_send_response - 268 +268
netif_add - 260 +260
ping_send - 244 +244
tcp_rexmit - 232 +232
tcp_parseopt - 220 +220
tcp_free_acked_segments.constprop - 220 +220
send_request - 220 +220
inet_chksum_pseudo - 216 +216
ip4addr_ntoa_r - 212 +212
do_lwip_ping - 212 +212
tcp_enqueue_flags - 208 +208
etharp_output_to_arp_index - 208 +208
netif_set_addr - 204 +204
tcp_fasttmr - 200 +200
tcp_rexmit_rto_prepare - 196 +196
tcp_process_refused_data - 196 +196
send_data - 196 +196
lwip_wget - 192 +192
ethernet_output - 192 +192
ping_recv - 188 +188
pbuf_memcmp - 184 +184
pbuf_copy_partial - 184 +184
httpc_free_state - 180 +180
tcp_send_fin - 172 +172
httpc_recv - 168 +168
tcp_output_control_segment_netif - 164 +164
send_error.isra - 164 +164
do_ops - 164 +164
raw_sendto - 160 +160
pbuf_realloc - 160 +160
pbuf_free - 160 +160
do_lwip_wget - 160 +160
do_lwip_tftp - 160 +160
tftp_init_common - 156 +156
tcp_rst_netif - 152 +152
udp_sendto - 144 +144
tftp_tmr - 144 +144
tcp_rst - 144 +144
uboot_lwip_if_init - 140 +140
tcp_pcb_remove - 140 +140
tcp_pbuf_prealloc - 140 +140
sys_timeout_abs - 140 +140
lwip_tftp - 140 +140
netif_do_set_ipaddr.isra - 136 +136
ip4_route - 136 +136
tcp_netif_ip_addr_changed - 132 +132
resend_data.isra - 132 +132
inet_chksum_pbuf - 132 +132
tcp_output_control_segment - 128 +128
pbuf_memfind - 128 +128
lwip_standard_chksum - 128 +128
tcp_rexmit_fast - 124 +124
tcp_new_port - 124 +124
tcp_close_shutdown_fin - 124 +124
pbuf_add_header_impl - 124 +124
tcp_send_empty_ack - 120 +120
httpc_create_request_string.constprop.isra - 120 +120
tftp_get - 116 +116
tcp_recved - 116 +116
tcp_pcb_purge - 116 +116
tftp_write - 112 +112
pbuf_free_header - 112 +112
httpc_tcp_connected - 112 +112
tftp_error - 108 +108
send_ack.isra - 108 +108
low_level_input.constprop - 108 +108
tcp_input_delayed_close - 104 +104
close_handle - 100 +100
sys_untimeout - 96 +96
memp_pools - 96 +96
tcp_keepalive - 92 +92
ip4_addr_isbroadcast_u32 - 92 +92
init_packet - 92 +92
tcp_kill_state - 88 +88
raw_new - 88 +88
ping_raw_init - 88 +88
lwip_ping_init - 88 +88
udp_sendto_if - 84 +84
tcp_update_rcv_ann_wnd - 84 +84
tcp_recv_null - 84 +84
pbuf_remove_header - 84 +84
pbuf_alloc_reference - 84 +84
udp_remove - 80 +80
tcp_get_next_optbyte - 80 +80
pbuf_alloced_custom - 80 +80
ip4_input_accept - 80 +80
httpc_close - 80 +80
etharp_free_entry - 80 +80
uboot_lwip_poll - 76 +76
tcpip_tcp_timer - 76 +76
udp_netif_ip_addr_changed - 72 +72
uboot_netif - 72 +72
tcp_output_alloc_header.constprop - 72 +72
raw_netif_ip_addr_changed - 72 +72
tcpip_try_callback - 68 +68
tcp_timer_needed - 68 +68
tcp_seg_copy - 68 +68
tcp_netif_ip_addr_changed_pcblist - 68 +68
ping_timeout - 68 +68
ethernetif_input - 68 +68
udp_new - 64 +64
pbuf_try_get_at - 64 +64
sys_timeout - 60 +60
pbuf_clone - 60 +60
tcp_seg_free - 56 +56
pbuf_cat - 56 +56
netif_get_by_index - 56 +56
low_level_output - 56 +56
_u_boot_list_2_cmd_2_lwipinfo - 56 +56
_u_boot_list_2_cmd_2_lwip - 56 +56
tftp_state 4 56 +52
tcp_tmr - 52 +52
tcp_rexmit_rto - 52 +52
tcp_segs_free - 48 +48
tcp_eff_send_mss_netif - 48 +48
pbuf_skip_const - 48 +48
ipfrag_free_pbuf_custom - 48 +48
httpc_tcp_poll - 48 +48
tcp_free_ooseq - 44 +44
tcp_close - 44 +44
pbuf_free_ooseq_callback - 44 +44
netif_issue_reports - 44 +44
ip_reass_dequeue_datagram - 44 +44
httpc_get_internal_addr - 44 +44
tftp_read - 40 +40
tftp - 40 +40
ip_data - 40 +40
etharp_request - 40 +40
do_lwip_info - 40 +40
ulwip_timeout_handler - 36 +36
raw_bind - 36 +36
memp_malloc - 36 +36
ip4_output_if - 36 +36
tcp_pcb_lists - 32 +32
pbuf_header_force - 32 +32
pbuf_clen - 32 +32
netif_set_up - 32 +32
netif_set_link_up - 32 +32
inseg - 32 +32
inet_chksum - 32 +32
tcp_next_iss - 28 +28
pbuf_get_at - 28 +28
httpc_tcp_err - 28 +28
do_lwip_init - 28 +28
tcp_rexmit_rto_commit - 24 +24
sys_now - 24 +24
settings - 24 +24
pbuf_copy - 24 +24
pbuf_chain - 24 +24
memp_free - 24 +24
__func__ 1243 1266 +23
ulwip_exit - 20 +20
tcp_trigger_input_pcb_close - 20 +20
tcp_poll - 20 +20
ping_send_now - 20 +20
pbuf_ref - 20 +20
str - 16 +16
ip4addr_ntoa - 16 +16
daddr - 16 +16
tcp_backoff - 13 +13
ulwip_loop_set - 12 +12
ulwip_in_loop - 12 +12
ulwip_enabled - 12 +12
ulwip_app_get_err - 12 +12
udp_recv - 12 +12
tftp_init_client - 12 +12
tcp_sent - 12 +12
tcp_recv - 12 +12
tcp_free - 12 +12
tcp_err - 12 +12
tcp_arg - 12 +12
net_process_received_packet 800 812 +12
icmp_time_exceeded - 12 +12
icmp_dest_unreach - 12 +12
udp_pcbs - 8 +8
tftp_open - 8 +8
tftp_close - 8 +8
tcphdr_opt2 - 8 +8
tcphdr - 8 +8
tcp_tw_pcbs - 8 +8
tcp_new - 8 +8
tcp_listen_pcbs - 8 +8
tcp_input_pcb - 8 +8
tcp_bound_pcbs - 8 +8
tcp_active_pcbs - 8 +8
tcp_abort - 8 +8
recv_data - 8 +8
reassdatagrams - 8 +8
raw_recv - 8 +8
raw_pcbs - 8 +8
ping_target - 8 +8
ping_pcb - 8 +8
pbuf_add_header - 8 +8
next_timeout - 8 +8
netif_null_output_ip4 - 8 +8
netif_list - 8 +8
netif_default - 8 +8
lwip_htons - 8 +8
lwip_htonl - 8 +8
httpc_tcp_sent - 8 +8
tcp_persist_backoff - 7 +7
ethzero - 6 +6
ethbroadcast - 6 +6
ulwip_app_err - 4 +4
udp_new_ip_type - 4 +4
uboot_net_use_lwip - 4 +4
tcpip_tcp_timer_active - 4 +4
tcp_ticks - 4 +4
seqno - 4 +4
mem_trim - 4 +4
mem_malloc - 4 +4
mem_free - 4 +4
loop_lwip - 4 +4
iss - 4 +4
ip_target - 4 +4
ip_chksum_pseudo - 4 +4
ip_addr_any - 4 +4
httpc_init_connection - 4 +4
ackno - 4 +4
udp_port - 2 +2
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
memp_UDP_PCB - 2 +2
memp_TCP_SEG - 2 +2
memp_TCP_PCB_LISTEN - 2 +2
memp_TCP_PCB - 2 +2
memp_TCPIP_MSG_INPKT - 2 +2
memp_TCPIP_MSG_API - 2 +2
memp_SYS_TIMEOUT - 2 +2
memp_REASSDATA - 2 +2
memp_RAW_PCB - 2 +2
memp_PBUF_POOL - 2 +2
memp_PBUF - 2 +2
memp_FRAG_PBUF - 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
supported_nfs_versions 1 - -1
retry_action 1 - -1
net_boot_file_name_explicit 1 - -1
dhcp_option_overload 1 - -1
tftp_windowsize 2 - -2
tftp_window_size_option 2 - -2
tftp_next_ack 2 - -2
tftp_last_nack 2 - -2
tftp_block_size_option 2 - -2
tftp_block_size 2 - -2
ping_seq_number 2 - -2
last_op 2 - -2
env_flags_vartype_rep 7 5 -2
linefeed 3 - -3
wget_timeout_count 4 - -4
wget_loop_state 4 - -4
web_server_ip 4 - -4
timeout_count_max 4 - -4
timeout_count 4 - -4
tftp_timeout_count_max 4 - -4
tftp_remote_port 4 - -4
tftp_remote_ip 4 - -4
tftp_our_port 4 - -4
saved_tftp_block_size_option 4 - -4
retry_tcp_seq_num 4 - -4
retry_tcp_ack_num 4 - -4
retry_len 4 - -4
pkt_q_idx 4 - -4
packets 4 - -4
our_port 4 - -4
nfs_timeout_count 4 - -4
nfs_state 4 - -4
nfs_server_port 4 - -4
nfs_server_mount_port 4 - -4
nfs_server_ip 4 - -4
nfs_our_port 4 - -4
nfs_offset 4 - -4
nfs_len 4 - -4
nfs_download_state 4 - -4
net_ping_ip 4 - -4
net_dns_server 4 - -4
net_boot_file_expected_size_in_blocks 4 - -4
last_reg_lo 4 - -4
last_reg_hi 4 - -4
last_mask 4 - -4
last_data 4 - -4
last_addr_lo 4 - -4
last_addr_hi 4 - -4
initial_data_seq_num 4 - -4
http_ok 4 - -4
fs_mounted 4 - -4
filefh3_length 4 - -4
eth_common_init 4 - -4
dummy_handler 8 4 -4
dhcp_state 4 - -4
dhcp_server_ip 4 - -4
dhcp_leasetime 4 - -4
current_wget_state 4 - -4
bootp_try 4 - -4
bootp_num_ids 4 - -4
http_eom 5 - -5
bootfile1 5 - -5
timeout_ms 8 - -8
time_taken_max 8 - -8
time_start 16 8 -8
tftp_prev_block 8 - -8
tftp_load_size 8 - -8
tftp_load_addr 8 - -8
tftp_cur_block 8 - -8
tftp_block_wrap_offset 8 - -8
tftp_block_wrap 8 - -8
rpc_id 8 - -8
nfs_path 8 - -8
nfs_filename 8 - -8
miiphy_is_1000base_x 8 - -8
init_sequence_r 264 256 -8
image_url 8 - -8
distro_pxe_check 8 - -8
current_mii 8 - -8
content_length 8 - -8
bootp_timeout 8 - -8
bootp_start 8 - -8
tcp_get_tcp_state 12 - -12
do_wget 12 - -12
do_tftpb 12 - -12
do_nfs 12 - -12
do_dhcp 12 - -12
do_bootp 12 - -12
default_filename 13 - -13
bootfile3 14 - -14
content_len 15 - -15
reg_2_desc_tbl 16 - -16
pkt_q 16 - -16
mii_devs 16 - -16
bootp_ids 16 - -16
miiphy_get_current_dev 20 - -20
tcp_set_tcp_handler 24 - -24
pxe_default_paths 24 - -24
net_set_udp_handler 24 - -24
net_check_prereq 256 232 -24
miiphy_init 28 - -28
ping_timeout_handler 32 - -32
net_nis_domain 32 - -32
net_hostname 32 - -32
distro_bootmeth_pxe_ids 32 - -32
dirfh 32 - -32
initr_net 36 - -36
distro_bootmeth_pxe_bind 36 - -36
ip_to_string 40 - -40
distro_bootmeth_pxe_ops 40 - -40
net_send_udp_packet 44 - -44
label_boot 1944 1900 -44
env_flags_validate 632 588 -44
reg_3_desc_tbl 48 - -48
do_get_tftp 56 - -56
cmd_net 56 - -56
_u_boot_list_2_cmd_2_wget 56 - -56
_u_boot_list_2_cmd_2_tftpboot 56 - -56
_u_boot_list_2_cmd_2_pxe 56 - -56
_u_boot_list_2_cmd_2_ping 56 - -56
_u_boot_list_2_cmd_2_nfs 56 - -56
_u_boot_list_2_cmd_2_net 56 - -56
_u_boot_list_2_cmd_2_mii 56 - -56
_u_boot_list_2_cmd_2_dhcp 56 - -56
_u_boot_list_2_cmd_2_bootp 56 - -56
net_loop 652 592 -60
net_eth_hdr_size 60 - -60
bootp_reset 60 - -60
net_root_path 64 - -64
filefh 64 - -64
do_bootvx 816 748 -68
miiphy_set_current_dev 72 - -72
basename 72 - -72
pxe_get_file_size 76 - -76
copy_filename 76 - -76
distro_pxe_getfile 80 - -80
tftp_init_load_addr 92 - -92
miiphy_read 92 - -92
extract_range 92 - -92
miiphy_write 96 - -96
miiphy_get_active_dev 96 - -96
distro_pxe_read_file 96 - -96
wget_fail 104 - -104
skip_num 104 - -104
miiphy_get_dev_by_name 104 - -104
dump_field 104 - -104
do_bdinfo 432 328 -104
bootp_timeout_handler 104 - -104
nfs_timeout_handler 108 - -108
cmd_pxe_sub 112 - -112
nfs_umountall_req 120 - -120
_u_boot_list_2_driver_2_bootmeth_pxe 120 - -120
do_ping 124 - -124
tftp_filename 128 - -128
reg_9_desc_tbl 128 - -128
reg_10_desc_tbl 128 - -128
distro_pxe_boot 128 - -128
tftp_timeout_handler 132 - -132
do_pxe 132 - -132
nfs_umountall_reply 136 - -136
lmb_get_free_size 136 - -136
format_mac_pxe 136 - -136
miiphy_listdev 144 - -144
efi_net_set_dhcp_ack 144 - -144
wget_timeout_handler 148 - -148
nfs_mount_reply 148 - -148
dhcp_packet_process_options 148 - -148
eth_validate_ethaddr_str 152 - -152
do_pxe_get 156 - -156
reg_0_desc_tbl 160 - -160
net_parse_bootfile 160 - -160
miiphy_info 160 - -160
get_pxelinux_path 160 - -160
do_net 164 - -164
net_auto_load 172 - -172
do_net_list 176 - -176
rpc_lookup_reply 180 - -180
nfs_readlink_req 184 - -184
nfs_mount_req 188 - -188
reg_5_desc_tbl 192 - -192
reg_4_desc_tbl 192 - -192
miiphy_speed 200 - -200
miiphy_duplex 200 - -200
nfs_read_req 224 - -224
do_pxe_boot 248 - -248
reg_1_desc_tbl 256 - -256
mii_reg_desc_tbl 256 - -256
nfs_send 260 - -260
wget_start 268 - -268
ping_start 276 - -276
nfs_lookup_reply 280 - -280
rpc_req 300 - -300
eth_initialize 300 - -300
distro_pxe_read_bootflow 300 - -300
nfs_readlink_reply 328 - -328
nfs_lookup_req 328 - -328
ping_receive 332 - -332
pxe_get 376 - -376
nfs_read_reply 396 - -396
wget_send_stored 444 - -444
nfs_start 468 - -468
dhcp_process_options 508 - -508
tftp_send 560 - -560
nfs_handler 580 - -580
bootp_request 612 - -612
dhcp_extended 616 - -616
netboot_common 632 - -632
default_environment 4444 3800 -644
tftp_start 912 - -912
dhcp_handler 1000 - -1000
wget_handler 1092 - -1092
tftp_handler 1304 - -1304
nfs_path_buff 2048 - -2048
do_mii 2124 - -2124
Total: Before=722283, After=738425, chg +2.23%