From f4fcdcdb4d87054c207998fc71e9a799b4c16b1d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 17:37:21 -0600 Subject: [PATCH] net/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- net/arp/arp_arpin.c | 2 +- net/devif/devif_callback.c | 2 +- net/devif/ipv4_input.c | 15 ++++++++------- net/devif/ipv6_input.c | 2 +- net/icmp/icmp_input.c | 2 +- net/icmp/icmp_ping.c | 6 +++--- net/icmpv6/icmpv6_input.c | 2 +- net/icmpv6/icmpv6_ping.c | 6 +++--- net/igmp/igmp_group.c | 26 +++++++++++++------------- net/igmp/igmp_input.c | 12 ++++++------ net/igmp/igmp_leave.c | 4 ++-- net/igmp/igmp_timer.c | 6 +++--- net/iob/iob_clone.c | 2 +- net/iob/iob_trimtail.c | 2 +- net/local/local_netpoll.c | 2 +- net/netdev/netdev_register.c | 12 ++++++------ net/netdev/netdev_unregister.c | 12 ++++++------ net/pkt/pkt_input.c | 2 +- net/pkt/pkt_poll.c | 2 +- net/socket/net_clone.c | 2 +- net/socket/net_close.c | 2 +- net/socket/net_sendfile.c | 18 +++++++++--------- net/tcp/tcp_backlog.c | 6 +++--- net/tcp/tcp_conn.c | 14 +++++++------- net/tcp/tcp_input.c | 6 +++--- net/tcp/tcp_send_buffered.c | 6 ++++-- net/tcp/tcp_send_unbuffered.c | 2 +- net/udp/udp_input.c | 4 ++-- 28 files changed, 91 insertions(+), 88 deletions(-) diff --git a/net/arp/arp_arpin.c b/net/arp/arp_arpin.c index 438125f7bd..fcd84b4b85 100644 --- a/net/arp/arp_arpin.c +++ b/net/arp/arp_arpin.c @@ -96,7 +96,7 @@ void arp_arpin(FAR struct net_driver_s *dev) if (dev->d_len < (sizeof(struct arp_hdr_s) + ETH_HDRLEN)) { - nllerr("Too small\n"); + nllerr("ERROR: Packet Too small\n"); dev->d_len = 0; return; } diff --git a/net/devif/devif_callback.c b/net/devif/devif_callback.c index 2508f2d0f0..f5d794ad0b 100644 --- a/net/devif/devif_callback.c +++ b/net/devif/devif_callback.c @@ -260,7 +260,7 @@ FAR struct devif_callback_s * #ifdef CONFIG_DEBUG_FEATURES else { - nllerr("Failed to allocate callback\n"); + nllerr("ERROR: Failed to allocate callback\n"); } #endif diff --git a/net/devif/ipv4_input.c b/net/devif/ipv4_input.c index 9b02f2ac3f..778ff18b74 100644 --- a/net/devif/ipv4_input.c +++ b/net/devif/ipv4_input.c @@ -339,7 +339,8 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.vhlerr++; #endif - nllerr("Invalid IP version or header length: %02x\n", pbuf->vhl); + nllerr("ERROR: Invalid IP version or header length: %02x\n", + pbuf->vhl); goto drop; } @@ -348,7 +349,7 @@ int ipv4_input(FAR struct net_driver_s *dev) hdrlen = NET_LL_HDRLEN(dev); if ((hdrlen + IPv4_HDRLEN) > dev->d_len) { - nllerr("Packet shorter than IPv4 header\n"); + nllerr("ERROR: Packet shorter than IPv4 header\n"); goto drop; } @@ -368,7 +369,7 @@ int ipv4_input(FAR struct net_driver_s *dev) } else { - nllerr("IP packet shorter than length in IP header\n"); + nllerr("ERROR: IP packet shorter than length in IP header\n"); goto drop; } @@ -387,7 +388,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.fragerr++; #endif - nllerr("IP fragment dropped\n"); + nllerr("ERROR: IP fragment dropped\n"); goto drop; #endif /* CONFIG_NET_TCP_REASSEMBLY */ } @@ -413,7 +414,7 @@ int ipv4_input(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_ICMP if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY)) { - nllerr("No IP address assigned\n"); + nllerr("ERROR: No IP address assigned\n"); goto drop; } @@ -446,7 +447,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.chkerr++; #endif - nllerr("Bad IP checksum\n"); + nllerr("ERROR: Bad IP checksum\n"); goto drop; } @@ -494,7 +495,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.protoerr++; #endif - nllerr("Unrecognized IP protocol\n"); + nllerr("ERROR: Unrecognized IP protocol\n"); goto drop; } diff --git a/net/devif/ipv6_input.c b/net/devif/ipv6_input.c index 0378b2c270..547193825d 100644 --- a/net/devif/ipv6_input.c +++ b/net/devif/ipv6_input.c @@ -160,7 +160,7 @@ int ipv6_input(FAR struct net_driver_s *dev) hdrlen = NET_LL_HDRLEN(dev); if ((hdrlen + IPv6_HDRLEN) > dev->d_len) { - nllerr("Packet shorter than IPv6 header\n"); + nllerr("ERROR: Packet shorter than IPv6 header\n"); goto drop; } diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c index befda6bf04..368795e1ef 100644 --- a/net/icmp/icmp_input.c +++ b/net/icmp/icmp_input.c @@ -164,7 +164,7 @@ void icmp_input(FAR struct net_driver_s *dev) else { - nllerr("Unknown ICMP cmd: %d\n", picmp->type); + nllerr("ERROR: Unknown ICMP cmd: %d\n", picmp->type); goto typeerr; } diff --git a/net/icmp/icmp_ping.c b/net/icmp/icmp_ping.c index 075e6aae0d..73f29ff0da 100644 --- a/net/icmp/icmp_ping.c +++ b/net/icmp/icmp_ping.c @@ -262,12 +262,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, * that the destination address is not reachable. */ - nllerr("Not reachable\n"); + nllerr("ERROR:Not reachable\n"); failcode = -ENETUNREACH; } else { - nllerr("Ping timeout\n"); + nllerr("ERROR:Ping timeout\n"); failcode = -ETIMEDOUT; } @@ -416,7 +416,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, } else { - nllerr("Return error=%d\n", -state.png_result); + nllerr("ERROR: Return error=%d\n", -state.png_result); return state.png_result; } } diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index a0ef963589..cf65480a12 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -307,7 +307,7 @@ void icmpv6_input(FAR struct net_driver_s *dev) default: { - nllerr("Unknown ICMPv6 type: %d\n", icmp->type); + nllerr("ERROR: Unknown ICMPv6 type: %d\n", icmp->type); goto icmpv6_type_error; } } diff --git a/net/icmpv6/icmpv6_ping.c b/net/icmpv6/icmpv6_ping.c index da5b1701b9..7f3e7c8e4e 100644 --- a/net/icmpv6/icmpv6_ping.c +++ b/net/icmpv6/icmpv6_ping.c @@ -336,12 +336,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, * reason is that the destination address is not reachable. */ - nllerr("Not reachable\n"); + nllerr("ERROR: Not reachable\n"); failcode = -ENETUNREACH; } else { - nllerr("Ping timeout\n"); + nllerr("ERROR: Ping timeout\n"); failcode = -ETIMEDOUT; } @@ -490,7 +490,7 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno, } else { - nllerr("Return error=%d\n", -state.png_result); + nllerr("ERROR: Return error=%d\n", -state.png_result); return state.png_result; } } diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c index b8e673ccea..dc1a3e3612 100644 --- a/net/igmp/igmp_group.c +++ b/net/igmp/igmp_group.c @@ -194,7 +194,7 @@ void igmp_grpinit(void) FAR struct igmp_group_s *group; int i; - grpllerr("Initializing\n"); + grpllinfo("Initializing\n"); #if CONFIG_PREALLOC_IGMPGROUPS > 0 for (i = 0; i < CONFIG_PREALLOC_IGMPGROUPS; i++) @@ -226,20 +226,20 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, if (up_interrupt_context()) { #if CONFIG_PREALLOC_IGMPGROUPS > 0 - grpllerr("Use a pre-allocated group entry\n"); + grpllinfo("Use a pre-allocated group entry\n"); group = igmp_grpprealloc(); #else - grpllerr("Cannot allocate from interrupt handler\n"); + grpllerr("ERROR: Cannot allocate from interrupt handler\n"); group = NULL; #endif } else { - grpllerr("Allocate from the heap\n"); + grpllinfo("Allocate from the heap\n"); group = igmp_grpheapalloc(); } - grpllerr("group: %p\n", group); + grpllinfo("group: %p\n", group); /* Check if we successfully allocated a group structure */ @@ -285,7 +285,7 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group; net_lock_t flags; - grpllerr("Searching for addr %08x\n", (int)*addr); + grpllinfo("Searching for addr %08x\n", (int)*addr); /* We must disable interrupts because we don't which context we were * called from. @@ -296,10 +296,10 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, group; group = group->next) { - grpllerr("Compare: %08x vs. %08x\n", group->grpaddr, *addr); + grpllinfo("Compare: %08x vs. %08x\n", group->grpaddr, *addr); if (net_ipv4addr_cmp(group->grpaddr, *addr)) { - grpllerr("Match!\n"); + grpllinfo("Match!\n"); break; } } @@ -325,13 +325,13 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, { FAR struct igmp_group_s *group = igmp_grpfind(dev, addr); - grpllerr("group: %p addr: %08x\n", group, (int)*addr); + grpllinfo("group: %p addr: %08x\n", group, (int)*addr); if (!group) { group = igmp_grpalloc(dev, addr); } - grpllerr("group: %p\n", group); + grpllinfo("group: %p\n", group); return group; } @@ -350,7 +350,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { net_lock_t flags; - grpllerr("Free: %p flags: %02x\n", group, group->flags); + grpllinfo("Free: %p flags: %02x\n", group, group->flags); /* Cancel the wdog */ @@ -376,7 +376,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) #if CONFIG_PREALLOC_IGMPGROUPS > 0 if (IS_PREALLOCATED(group->flags)) { - grpllerr("Put back on free list\n"); + grpllinfo("Put back on free list\n"); sq_addlast((FAR sq_entry_t *)group, &g_freelist); net_unlock(flags); } @@ -388,7 +388,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) */ net_unlock(flags); - grpllerr("Call sched_kfree()\n"); + grpllinfo("Call sched_kfree()\n"); sched_kfree(group); } } diff --git a/net/igmp/igmp_input.c b/net/igmp/igmp_input.c index d8bba1d153..7d3daa14f4 100644 --- a/net/igmp/igmp_input.c +++ b/net/igmp/igmp_input.c @@ -124,7 +124,7 @@ void igmp_input(struct net_driver_s *dev) if (dev->d_len < NET_LL_HDRLEN(dev) + IPIGMP_HDRLEN) { IGMP_STATINCR(g_netstats.igmp.length_errors); - nllerr("Length error\n"); + nllerr("ERROR: Length error\n"); return; } @@ -133,7 +133,7 @@ void igmp_input(struct net_driver_s *dev) if (net_chksum((FAR uint16_t *)&IGMPBUF->type, IGMP_HDRLEN) != 0) { IGMP_STATINCR(g_netstats.igmp.chksum_errors); - nllerr("Checksum error\n"); + nllerr("ERROR: Checksum error\n"); return; } @@ -143,7 +143,7 @@ void igmp_input(struct net_driver_s *dev) group = igmp_grpallocfind(dev, &destipaddr); if (!group) { - nllerr("Failed to allocate/find group: %08x\n", destipaddr); + nllerr("ERROR: Failed to allocate/find group: %08x\n", destipaddr); return; } @@ -192,7 +192,7 @@ void igmp_input(struct net_driver_s *dev) IGMP_STATINCR(g_netstats.igmp.v1_received); IGMPBUF->maxresp = 10; - nllerr("V1 not implemented\n"); + nllerr("ERROR: V1 not implemented\n"); } IGMP_STATINCR(g_netstats.igmp.query_received); @@ -241,7 +241,7 @@ void igmp_input(struct net_driver_s *dev) nllinfo("Unicast query\n"); IGMP_STATINCR(g_netstats.igmp.ucast_query); - nllerr("Query to a specific group with the group address as destination\n"); + nllinfo("Query to a specific group with the group address as destination\n"); ticks = net_dsec2tick((int)IGMPBUF->maxresp); if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks)) @@ -270,7 +270,7 @@ void igmp_input(struct net_driver_s *dev) default: { - nllerr("Unexpected msg %02x\n", IGMPBUF->type); + nllerr("ERROR: Unexpected msg %02x\n", IGMPBUF->type); } break; } diff --git a/net/igmp/igmp_leave.c b/net/igmp/igmp_leave.c index eb970ae127..8e40451101 100644 --- a/net/igmp/igmp_leave.c +++ b/net/igmp/igmp_leave.c @@ -134,7 +134,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) /* Find the entry corresponding to the address leaving the group */ group = igmp_grpfind(dev, &grpaddr->s_addr); - nerr("Leaving group: %p\n", group); + ninfo("Leaving group: %p\n", group); if (group) { /* Cancel the timer and discard any queued Membership Reports. Canceling @@ -155,7 +155,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) if (IS_LASTREPORT(group->flags)) { - nerr("Schedule Leave Group message\n"); + ninfo("Schedule Leave Group message\n"); IGMP_STATINCR(g_netstats.igmp.leave_sched); igmp_waitmsg(group, IGMP_LEAVE_GROUP); } diff --git a/net/igmp/igmp_timer.c b/net/igmp/igmp_timer.c index bd26598991..0725d1805e 100644 --- a/net/igmp/igmp_timer.c +++ b/net/igmp/igmp_timer.c @@ -170,7 +170,7 @@ void igmp_startticks(FAR struct igmp_group_s *group, unsigned int ticks) /* Start the timer */ - gtmrllerr("ticks: %d\n", ticks); + gtmrllinfo("ticks: %d\n", ticks); ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group); @@ -184,7 +184,7 @@ void igmp_starttimer(FAR struct igmp_group_s *group, uint8_t decisecs) * Important!! this should be a random timer from 0 to decisecs */ - gtmrerr("decisecs: %d\n", decisecs); + gtmrinfo("decisecs: %d\n", decisecs); igmp_startticks(group, net_dsec2tick(decisecs)); } @@ -224,7 +224,7 @@ bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks) * test as well. */ - gtmrerr("maxticks: %d remaining: %d\n", maxticks, remaining); + gtmrinfo("maxticks: %d remaining: %d\n", maxticks, remaining); if (maxticks > remaining) { /* Cancel the watchdog timer and return true */ diff --git a/net/iob/iob_clone.c b/net/iob/iob_clone.c index a0a5bd5c50..eb55a496bc 100644 --- a/net/iob/iob_clone.c +++ b/net/iob/iob_clone.c @@ -168,7 +168,7 @@ int iob_clone(FAR struct iob_s *iob1, FAR struct iob_s *iob2, bool throttled) next = iob_alloc(throttled); if (!next) { - nerr("Failed to allocate an I/O buffer/n"); + nerr("ERROR: Failed to allocate an I/O buffer/n"); return -ENOMEM; } diff --git a/net/iob/iob_trimtail.c b/net/iob/iob_trimtail.c index 6ab2add71e..cfcfd68b26 100644 --- a/net/iob/iob_trimtail.c +++ b/net/iob/iob_trimtail.c @@ -72,7 +72,7 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) FAR struct iob_s *last; int len; - nllerr("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); + nllinfo("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); if (iob && trimlen > 0) { diff --git a/net/local/local_netpoll.c b/net/local/local_netpoll.c index 03ef0bc6d6..4b100d67d0 100644 --- a/net/local/local_netpoll.c +++ b/net/local/local_netpoll.c @@ -152,7 +152,7 @@ void local_accept_pollnotify(FAR struct local_conn_s *conn, fds->revents |= (fds->events & eventset); if (fds->revents != 0) { - nerr("Report events: %02x\n", fds->revents); + ninfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } diff --git a/net/netdev/netdev_register.c b/net/netdev/netdev_register.c index dfa0b6710d..bdd9a812fb 100644 --- a/net/netdev/netdev_register.c +++ b/net/netdev/netdev_register.c @@ -319,13 +319,13 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype) net_unlock(save); #ifdef CONFIG_NET_ETHERNET - nllerr("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], - dev->d_ifname); + nllinfo("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], + dev->d_ifname); #else - nllerr("Registered dev: %s\n", dev->d_ifname); + nllinfo("Registered dev: %s\n", dev->d_ifname); #endif return OK; } diff --git a/net/netdev/netdev_unregister.c b/net/netdev/netdev_unregister.c index f8861c7fad..8509a5733c 100644 --- a/net/netdev/netdev_unregister.c +++ b/net/netdev/netdev_unregister.c @@ -128,13 +128,13 @@ int netdev_unregister(FAR struct net_driver_s *dev) net_unlock(save); #ifdef CONFIG_NET_ETHERNET - nllerr("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], - dev->d_ifname); + nllinfo("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], + dev->d_ifname); #else - nllerr("Registered dev: %s\n", dev->d_ifname); + nllinfo("Registered dev: %s\n", dev->d_ifname); #endif return OK; } diff --git a/net/pkt/pkt_input.c b/net/pkt/pkt_input.c index 102ef81ae3..e7969cd8f0 100644 --- a/net/pkt/pkt_input.c +++ b/net/pkt/pkt_input.c @@ -118,7 +118,7 @@ int pkt_input(struct net_driver_s *dev) } else { - nllerr("No listener\n"); + nllerr("ERROR: No listener\n"); } return ret; diff --git a/net/pkt/pkt_poll.c b/net/pkt/pkt_poll.c index 697377d401..0b1f12f873 100644 --- a/net/pkt/pkt_poll.c +++ b/net/pkt/pkt_poll.c @@ -78,7 +78,7 @@ void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn) { - nllerr("IN\n"); + nllinfo("IN\n"); /* Verify that the packet connection is valid */ diff --git a/net/socket/net_clone.c b/net/socket/net_clone.c index c819b6ebe4..e76f4ed2ce 100644 --- a/net/socket/net_clone.c +++ b/net/socket/net_clone.c @@ -116,7 +116,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2) else #endif { - nerr("Unsupported type: %d\n", psock2->s_type); + nerr("ERROR: Unsupported type: %d\n", psock2->s_type); ret = -EBADF; } diff --git a/net/socket/net_close.c b/net/socket/net_close.c index f994cf6609..c4f2e5ca3a 100644 --- a/net/socket/net_close.c +++ b/net/socket/net_close.c @@ -209,7 +209,7 @@ static uint16_t netclose_interrupt(FAR struct net_driver_s *dev, { /* Yes.. Wake up the waiting thread and report the timeout */ - nllerr("CLOSE timeout\n"); + nllerr("ERROR: CLOSE timeout\n"); pstate->cl_result = -ETIMEDOUT; goto end_wait; } diff --git a/net/socket/net_sendfile.c b/net/socket/net_sendfile.c index b380258c2b..c1c42b4b31 100644 --- a/net/socket/net_sendfile.c +++ b/net/socket/net_sendfile.c @@ -206,7 +206,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, } else if ((flags & TCP_REXMIT) != 0) { - nllerr("REXMIT\n"); + nllwarn("WARNING: TCP_REXMIT\n"); /* Yes.. in this case, reset the number of bytes that have been sent * to the number of bytes that have been ACKed. @@ -221,7 +221,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, { /* Report not connected */ - nllerr("Lost connection\n"); + nllwarn("WARNING: Lost connection\n"); net_lostconnection(pstate->snd_sock, flags); pstate->snd_sent = -ENOTCONN; @@ -345,7 +345,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon { /* Report not connected */ - nllerr("Lost connection\n"); + nllwarn("WARNING: Lost connection\n"); net_lostconnection(pstate->snd_sock, flags); pstate->snd_sent = -ENOTCONN; @@ -386,7 +386,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon if (ret < 0) { int errcode = get_errno(); - nllerr("failed to lseek: %d\n", errcode); + nllerr("ERROR: Failed to lseek: %d\n", errcode); pstate->snd_sent = -errcode; goto end_wait; } @@ -395,7 +395,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon if (ret < 0) { int errcode = get_errno(); - nllerr("failed to read from input file: %d\n", errcode); + nllerr("ERROR: Failed to read from input file: %d\n", errcode); pstate->snd_sent = -errcode; goto end_wait; } @@ -430,7 +430,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon } else { - nllerr("Window full, wait for ack\n"); + nllwarn("WARNING: Window full, wait for ack\n"); goto wait; } } @@ -444,7 +444,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon { /* Yes.. report the timeout */ - nllerr("SEND timeout\n"); + nllwarn("WARNING: SEND timeout\n"); pstate->snd_sent = -ETIMEDOUT; goto end_wait; } @@ -687,7 +687,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (state.snd_datacb == NULL) { - nllerr("Failed to allocate data callback\n"); + nllerr("ERROR: Failed to allocate data callback\n"); errcode = ENOMEM; goto errout_locked; } @@ -696,7 +696,7 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (state.snd_ackcb == NULL) { - nllerr("Failed to allocate ack callback\n"); + nllerr("ERROR: Failed to allocate ack callback\n"); errcode = ENOMEM; goto errout_datacb; } diff --git a/net/tcp/tcp_backlog.c b/net/tcp/tcp_backlog.c index 0e85141c58..ad5e689323 100644 --- a/net/tcp/tcp_backlog.c +++ b/net/tcp/tcp_backlog.c @@ -109,7 +109,7 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg) bls = (FAR struct tcp_backlog_s *)kmm_zalloc(size); if (!bls) { - nllerr("Failed to allocate backlog\n"); + nllerr("ERROR: Failed to allocate backlog\n"); return -ENOMEM; } @@ -239,7 +239,7 @@ int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn) blc = (FAR struct tcp_blcontainer_s *)sq_remfirst(&bls->bl_free); if (!blc) { - nllerr("Failed to allocate container\n"); + nllerr("ERROR: Failed to allocate container\n"); ret = -ENOMEM; } else @@ -390,7 +390,7 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn, } } - nllerr("Failed to find pending connection\n"); + nllerr("ERROR: Failed to find pending connection\n"); return -EINVAL; } diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index 6501a80ecf..fa11c42c4a 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -532,7 +532,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, if (port < 0) { - nerr("tcp_selectport failed: %d\n", port); + nerr("ERROR: tcp_selectport failed: %d\n", port); return port; } @@ -552,7 +552,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, { /* If no device is found, then the address is not reachable */ - nerr("tcp_local_ipv4_device failed: %d\n", ret); + nerr("ERROR: tcp_local_ipv4_device failed: %d\n", ret); /* Back out the local address setting */ @@ -613,7 +613,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, if (port < 0) { - nerr("tcp_selectport failed: %d\n", port); + nerr("ERROR: tcp_selectport failed: %d\n", port); return port; } @@ -633,7 +633,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, { /* If no device is found, then the address is not reachable */ - nerr("tcp_local_ipv6_device failed: %d\n", ret); + nerr("ERROR: tcp_local_ipv6_device failed: %d\n", ret); /* Back out the local address setting */ @@ -760,7 +760,7 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain) if (conn != NULL) { - nllerr("Closing unestablished connection: %p\n", conn); + nllwarn("WARNING: Closing unestablished connection: %p\n", conn); /* Yes... free it. This will remove the connection from the list * of active connections and release all resources held by the @@ -1066,7 +1066,7 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev, * probably really just assert here. */ - nerr("Failed to find network device: %d\n", ret); + nerr("ERROR: Failed to find network device: %d\n", ret); tcp_free(conn); return NULL; } @@ -1320,7 +1320,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) * just assert here. */ - nerr("Failed to find network device: %d\n", ret); + nerr("ERROR: Failed to find network device: %d\n", ret); goto errout_with_lock; } diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index 3a4cc55674..757efe9cfc 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -126,7 +126,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen) g_netstats.tcp.drop++; g_netstats.tcp.chkerr++; #endif - nllerr("Bad TCP checksum\n"); + nllerr("ERROR: Bad TCP checksum\n"); goto drop; } @@ -206,7 +206,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen) #ifdef CONFIG_NET_STATISTICS g_netstats.tcp.syndrop++; #endif - nllerr("No free TCP connections\n"); + nllerr("ERROR: No free TCP connections\n"); goto drop; } @@ -308,7 +308,7 @@ found: if ((tcp->flags & TCP_RST) != 0) { conn->tcpstateflags = TCP_CLOSED; - nllerr("RESET - TCP state: TCP_CLOSED\n"); + nllwarn("WARNING: RESET - TCP state: TCP_CLOSED\n"); (void)tcp_callback(dev, conn, TCP_ABORT); goto drop; diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index 2ae4d36daa..fb67556ae6 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -566,7 +566,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, if (++WRB_NRTX(wrb) >= TCP_MAXRTX) { - nllerr("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); + nllerr("ERROR: Expiring wrb=%p nrtx=%u\n", + wrb, WRB_NRTX(wrb)); /* The maximum retry count as been exhausted. Remove the write * buffer at the head of the queue. @@ -631,7 +632,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, if (++WRB_NRTX(wrb) >= TCP_MAXRTX) { - nllerr("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); + nllerr("ERROR: Expiring wrb=%p nrtx=%u\n", + wrb, WRB_NRTX(wrb)); /* Return the write buffer to the free list */ diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c index 73dbd0691d..5e6ebec474 100644 --- a/net/tcp/tcp_send_unbuffered.c +++ b/net/tcp/tcp_send_unbuffered.c @@ -570,7 +570,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, { /* Yes.. report the timeout */ - nllerr("SEND timeout\n"); + nllerr("ERROR: SEND timeout\n"); pstate->snd_sent = -ETIMEDOUT; goto end_wait; } diff --git a/net/udp/udp_input.c b/net/udp/udp_input.c index e1f1b19c5c..2c380a4028 100644 --- a/net/udp/udp_input.c +++ b/net/udp/udp_input.c @@ -149,7 +149,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen) g_netstats.udp.drop++; g_netstats.udp.chkerr++; #endif - nllerr("Bad UDP checksum\n"); + nllerr("ERROR: Bad UDP checksum\n"); dev->d_len = 0; } else @@ -207,7 +207,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen) } else { - nllerr("No listener on UDP port\n"); + nllerr("ERROR: No listener on UDP port\n"); dev->d_len = 0; } }