Skip to contentSkip to conversation

: Warn when discarding packet due to internal errors

PATCH In review Gerrit Renker 2 participants 2 messages Dec 7, 2006 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 3/12 : Warn when discarding packet due to internal errors

[DCCP]: Warn when discarding packet due to internal errors

This adds a (debug) warning message which is triggered whenever a packet is discarded due to send failure.

It also adds a conditional, so that an interruption during dccp_wait_for_ccid is not treated as a `BUG': the rationale is that interruptions are external, whereas bug warnings are concerned with the internals.

---
 net/dccp/output.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
net/dccp/output.c +4 -2
@@ -242,7 +242,7 @@ void dccp_write_xmit(struct sock *sk, in
 				break;
 			} else
 				err = dccp_wait_for_ccid(sk, skb);
-			if (err)
+			if (err && err != -EINTR)
 				DCCP_BUG("err=%d after dccp_wait_for_ccid", err);
 		}
 
@@ -268,8 +268,10 @@ void dccp_write_xmit(struct sock *sk, in
 			if (err)
 				DCCP_BUG("err=%d after ccid_hc_tx_packet_sent",
 					 err);
-		} else
+		} else {
+			dccp_pr_debug("packet discarded\n");
 			kfree(skb);
+		}
 	}
 }
 
Acked-by on v1 3/12
#1 lore raw
Quoted 2 lines · Gerrit Renker

[DCCP]: Warn when discarding packet due to internal errors

Signature · 3 lines
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group