浏览代码

[udp] Move high-frequency debug messages to DBGLVL_EXTRA

This makes it possible to leave UDP debugging enabled in order to see
interesting UDP events, without flooding the console with at least one
message per packet.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 年前
父节点
当前提交
e972057381
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      src/net/udp.c

+ 5
- 5
src/net/udp.c 查看文件

@@ -220,9 +220,9 @@ static int udp_tx ( struct udp_connection *udp, struct io_buffer *iobuf,
220 220
 	udphdr->chksum = tcpip_chksum ( udphdr, len );
221 221
 
222 222
 	/* Dump debugging information */
223
-	DBGC ( udp, "UDP %p TX %d->%d len %d\n", udp,
224
-	       ntohs ( udphdr->src ), ntohs ( udphdr->dest ),
225
-	       ntohs ( udphdr->len ) );
223
+	DBGC2 ( udp, "UDP %p TX %d->%d len %d\n", udp,
224
+		ntohs ( udphdr->src ), ntohs ( udphdr->dest ),
225
+		ntohs ( udphdr->len ) );
226 226
 
227 227
 	/* Send it to the next layer for processing */
228 228
 	if ( ( rc = tcpip_tx ( iobuf, &udp_protocol, src, dest, netdev,
@@ -317,8 +317,8 @@ static int udp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
317 317
 	iob_pull ( iobuf, sizeof ( *udphdr ) );
318 318
 
319 319
 	/* Dump debugging information */
320
-	DBGC ( udp, "UDP %p RX %d<-%d len %zd\n", udp,
321
-	       ntohs ( udphdr->dest ), ntohs ( udphdr->src ), ulen );
320
+	DBGC2 ( udp, "UDP %p RX %d<-%d len %zd\n", udp,
321
+		ntohs ( udphdr->dest ), ntohs ( udphdr->src ), ulen );
322 322
 
323 323
 	/* Ignore if no matching connection found */
324 324
 	if ( ! udp ) {

正在加载...
取消
保存