net/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network events are not errors.

This commit is contained in:
Gregory Nutt 2016-06-12 07:08:40 -06:00
parent a0c1eab513
commit 7d0950bb22
12 changed files with 29 additions and 33 deletions

View file

@ -127,10 +127,6 @@ CCASSERT(sizeof(cc3000_buffer_desc) <= CONFIG_MQ_MAXMSGSIZE);
#define waitllerr(x,...) // llerr
#define waitllinfo(x,...) // llinfo
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Function Prototypes
****************************************************************************/

View file

@ -339,8 +339,8 @@ int ipv4_input(FAR struct net_driver_s *dev)
g_netstats.ipv4.drop++;
g_netstats.ipv4.vhlerr++;
#endif
nllerr("ERROR: Invalid IP version or header length: %02x\n",
pbuf->vhl);
nllwarn("WARNING: Invalid IP version or header length: %02x\n",
pbuf->vhl);
goto drop;
}
@ -349,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("ERROR: Packet shorter than IPv4 header\n");
nllwarn("WARNING: Packet shorter than IPv4 header\n");
goto drop;
}
@ -369,7 +369,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
}
else
{
nllerr("ERROR: IP packet shorter than length in IP header\n");
nllwarn("WARNING: IP packet shorter than length in IP header\n");
goto drop;
}
@ -388,7 +388,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
g_netstats.ipv4.drop++;
g_netstats.ipv4.fragerr++;
#endif
nllerr("ERROR: IP fragment dropped\n");
nllwarn("WARNING: IP fragment dropped\n");
goto drop;
#endif /* CONFIG_NET_TCP_REASSEMBLY */
}
@ -414,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("ERROR: No IP address assigned\n");
nllwarn("WARNING: No IP address assigned\n");
goto drop;
}
@ -447,7 +447,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
g_netstats.ipv4.drop++;
g_netstats.ipv4.chkerr++;
#endif
nllerr("ERROR: Bad IP checksum\n");
nllwarn("WARNING: Bad IP checksum\n");
goto drop;
}
@ -495,7 +495,7 @@ int ipv4_input(FAR struct net_driver_s *dev)
g_netstats.ipv4.protoerr++;
#endif
nllerr("ERROR: Unrecognized IP protocol\n");
nllwarn("WARNING: Unrecognized IP protocol\n");
goto drop;
}

View file

@ -151,7 +151,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
g_netstats.ipv6.vhlerr++;
#endif
nllerr("ERROR: Invalid IPv6 version: %d\n", ipv6->vtc >> 4);
nllwarn("WARNING: Invalid IPv6 version: %d\n", ipv6->vtc >> 4);
goto drop;
}
@ -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("ERROR: Packet shorter than IPv6 header\n");
nllwarn("WARNING: Packet shorter than IPv6 header\n");
goto drop;
}
@ -187,7 +187,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
}
else
{
nllerr("ERROR: IP packet shorter than length in IP header\n");
nllwarn("WARNING: IP packet shorter than length in IP header\n");
goto drop;
}
@ -216,7 +216,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
* packets.
*/
nllerr("ERROR: No IP address assigned\n");
nllwarn("WARNING: No IP address assigned\n");
goto drop;
}
@ -279,7 +279,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
g_netstats.ipv6.protoerr++;
#endif
nllerr("ERROR: Unrecognized IP protocol: %04x\n", ipv6->proto);
nllwarn("WARNING: Unrecognized IP protocol: %04x\n", ipv6->proto);
goto drop;
}

View file

@ -164,7 +164,7 @@ void icmp_input(FAR struct net_driver_s *dev)
else
{
nllerr("ERROR: Unknown ICMP cmd: %d\n", picmp->type);
nllwarn("WARNING: Unknown ICMP cmd: %d\n", picmp->type);
goto typeerr;
}

View file

@ -307,7 +307,7 @@ void icmpv6_input(FAR struct net_driver_s *dev)
default:
{
nllerr("ERROR: Unknown ICMPv6 type: %d\n", icmp->type);
nllwarn("WARNING: Unknown ICMPv6 type: %d\n", icmp->type);
goto icmpv6_type_error;
}
}

View file

@ -298,7 +298,7 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
state.snd_cb = icmpv6_callback_alloc(dev);
if (!state.snd_cb)
{
nerr("ERROR: Failed to allocate a cllback\n");
nerr("ERROR: Failed to allocate a callback\n");
ret = -ENOMEM;
goto errout_with_lock;
}

View file

@ -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("ERROR: Length error\n");
nllwarn("WARNING: 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("ERROR: Checksum error\n");
nllwarn("WARNING: Checksum error\n");
return;
}
@ -192,7 +192,7 @@ void igmp_input(struct net_driver_s *dev)
IGMP_STATINCR(g_netstats.igmp.v1_received);
IGMPBUF->maxresp = 10;
nllerr("ERROR: V1 not implemented\n");
nllwarn("WARNING: V1 not implemented\n");
}
IGMP_STATINCR(g_netstats.igmp.query_received);
@ -270,7 +270,7 @@ void igmp_input(struct net_driver_s *dev)
default:
{
nllerr("ERROR: Unexpected msg %02x\n", IGMPBUF->type);
nllwarn("WARNING: Unexpected msg %02x\n", IGMPBUF->type);
}
break;
}

View file

@ -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("ERROR: Bad TCP checksum\n");
nllwarn("WARNING: Bad TCP checksum\n");
goto drop;
}
@ -398,7 +398,7 @@ found:
if ((conn->tcpstateflags & TCP_STATE_MASK) == TCP_ESTABLISHED)
{
nllerr("ERROR: conn->sndseq %d, conn->unacked %d\n",
nllwarn("WARNING: conn->sndseq %d, conn->unacked %d\n",
tcp_getsequence(conn->sndseq), conn->unacked);
goto reset;
}

View file

@ -566,7 +566,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
if (++WRB_NRTX(wrb) >= TCP_MAXRTX)
{
nllerr("ERROR: Expiring wrb=%p nrtx=%u\n",
nllwarn("WARNING: Expiring wrb=%p nrtx=%u\n",
wrb, WRB_NRTX(wrb));
/* The maximum retry count as been exhausted. Remove the write
@ -632,7 +632,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
if (++WRB_NRTX(wrb) >= TCP_MAXRTX)
{
nllerr("ERROR: Expiring wrb=%p nrtx=%u\n",
nllwarn("WARNING: Expiring wrb=%p nrtx=%u\n",
wrb, WRB_NRTX(wrb));
/* Return the write buffer to the free list */

View file

@ -570,7 +570,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
{
/* Yes.. report the timeout */
nllerr("ERROR: SEND timeout\n");
nllwarn("WARNING: SEND timeout\n");
pstate->snd_sent = -ETIMEDOUT;
goto end_wait;
}

View file

@ -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("ERROR: Bad UDP checksum\n");
nllwarn("WARNING: 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("ERROR: No listener on UDP port\n");
nllwarn("WARNING: No listener on UDP port\n");
dev->d_len = 0;
}
}

View file

@ -235,7 +235,7 @@ static uint16_t sendto_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
{
/* Terminate the transfer with an error. */
nllerr("ERROR: Network is down\n");
nllwarn("WARNING: Network is down\n");
pstate->st_sndlen = -ENETUNREACH;
}
@ -257,7 +257,7 @@ static uint16_t sendto_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
{
/* Yes.. report the timeout */
nllerr("ERROR: SEND timeout\n");
nllwarn("WARNING: SEND timeout\n");
pstate->st_sndlen = -ETIMEDOUT;
}
else