[posix-netif] lower transmit log level for OT_ERROR_DROP (#7275)

This commit helps reduce posix-netif WARN logs when transmitting
messages to Thread.

There are certain ICMPv6 messages (e.g. MLDv2) that OpenThread will
filter when transmitting, so the error `OT_ERROR_DROP` is expected.

This commit also assumes that OpenThread knows what it's doing when it
choose to drop a message, thus using lower log level for
`OT_ERROR_DROP`.
This commit is contained in:
Simon Lin
2022-01-04 09:55:13 -08:00
committed by GitHub
parent e736d2488d
commit cbd8512f47
+8 -1
View File
@@ -847,7 +847,14 @@ exit:
if (error != OT_ERROR_NONE)
{
otLogWarnPlat("[netif] Failed to transmit, error:%s", otThreadErrorToString(error));
if (error == OT_ERROR_DROP)
{
otLogNotePlat("[netif] Message dropped by Thread", otThreadErrorToString(error));
}
else
{
otLogWarnPlat("[netif] Failed to transmit, error:%s", otThreadErrorToString(error));
}
}
}