You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/10/05 13:09:48 UTC

[trafficserver] branch quic-latest updated: Add connection id to debug logs from QUICPacketHandler

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 239ffee  Add connection id to debug logs from QUICPacketHandler
239ffee is described below

commit 239ffeee50c3514dbc6f957100f6601e6c7db592
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Thu Oct 5 06:09:05 2017 -0700

    Add connection id to debug logs from QUICPacketHandler
---
 iocore/net/QUICPacketHandler.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/iocore/net/QUICPacketHandler.cc b/iocore/net/QUICPacketHandler.cc
index 2c8dfb9..e2e0c22 100644
--- a/iocore/net/QUICPacketHandler.cc
+++ b/iocore/net/QUICPacketHandler.cc
@@ -66,10 +66,7 @@ QUICPacketHandler::acceptEvent(int event, void *data)
   } else if (event == NET_EVENT_DATAGRAM_READ_READY) {
     Queue<UDPPacket> *queue = (Queue<UDPPacket> *)data;
     UDPPacket *packet_r;
-    ip_port_text_buffer ipb;
     while ((packet_r = queue->dequeue())) {
-      Debug("quic_sec", "received packet from %s, size=%" PRId64, ats_ip_nptop(&packet_r->from.sa, ipb, sizeof(ipb)),
-            packet_r->getPktLength());
       this->_recv_packet(event, packet_r);
     }
     return EVENT_CONT;
@@ -121,6 +118,10 @@ QUICPacketHandler::_recv_packet(int event, UDPPacket *udpPacket)
   QUICConnectionId cid;
   bool res = this->_read_connection_id(cid, block);
 
+  ip_port_text_buffer ipb;
+  Debug("quic_sec", "[%" PRIx64 "] received packet from %s, size=%" PRId64, static_cast<uint64_t>(cid),
+        ats_ip_nptop(&udpPacket->from.sa, ipb, sizeof(ipb)), udpPacket->getPktLength());
+
   QUICNetVConnection *vc = nullptr;
   if (res) {
     vc = this->_connections.get(cid);
@@ -198,8 +199,8 @@ QUICPacketHandler::send_packet(const QUICPacket &packet, UDPConnection *udp_con,
 
   // NOTE: p will be enqueued to udpOutQueue of UDPNetHandler
   ip_port_text_buffer ipb;
-  Debug("quic_sec", "send %s packet to %s, size=%" PRId64, QUICDebugNames::packet_type(packet.type()),
-        ats_ip_nptop(&udpPkt->to.sa, ipb, sizeof(ipb)), udpPkt->getPktLength());
+  Debug("quic_sec", "[%" PRIx64 "] send %s packet to %s, size=%" PRId64, static_cast<uint64_t>(packet.connection_id()),
+        QUICDebugNames::packet_type(packet.type()), ats_ip_nptop(&udpPkt->to.sa, ipb, sizeof(ipb)), udpPkt->getPktLength());
 
   udp_con->send(this, udpPkt);
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].