trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jplev...@apache.org
Subject svn commit: r899410 - in /incubator/trafficserver/traffic/branches/dev/iocore/net: Connection.cc P_Net.h P_UnixNet.h UnixConnection.cc UnixNet.cc UnixNetAccept.cc UnixNetProcessor.cc UnixNetVConnection.cc
Date Thu, 14 Jan 2010 21:04:16 GMT
Author: jplevyak
Date: Thu Jan 14 21:04:16 2010
New Revision: 899410

URL: http://svn.apache.org/viewvc?rev=899410&view=rev
Log:
Fix a bug when not using USE_EDGE_TRIGGER with epoll() where an error could
cause spinning.

Modified:
    incubator/trafficserver/traffic/branches/dev/iocore/net/Connection.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/P_Net.h
    incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixConnection.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetProcessor.cc
    incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/Connection.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/Connection.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/Connection.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/Connection.cc Thu Jan 14 21:04:16
2010
@@ -145,7 +145,7 @@
 
   // cannot do this after connection on non-blocking connect
 #ifdef SET_TCP_NO_DELAY
-  Debug("socket", "setting TCP_NODELAY in fast_connect");
+  NetDebug("socket", "setting TCP_NODELAY in fast_connect");
   if ((res = safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, ON, sizeof(int))) < 0)
     goto Lerror;
 #endif
@@ -181,11 +181,11 @@
     }
     if (opt->sockopt_flags & 1) {
       safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, ON, sizeof(int));
-      Debug("socket", "::fast_connect: setsockopt() TCP_NODELAY on socket");
+      NetDebug("socket", "::fast_connect: setsockopt() TCP_NODELAY on socket");
     }
     if (opt->sockopt_flags & 2) {
       safe_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, ON, sizeof(int));
-      Debug("socket", "::fast_connect: setsockopt() SO_KEEPALIVE on socket");
+      NetDebug("socket", "::fast_connect: setsockopt() SO_KEEPALIVE on socket");
     }
   }
   res = ::connect(fd, (struct sockaddr *) &sa, sizeof(struct sockaddr_in));
@@ -234,7 +234,7 @@
       int p = time(NULL) + offset;
       p = (p % (LAST_RANDOM_PORT - FIRST_RANDOM_PORT)) + FIRST_RANDOM_PORT;
       bind_sa.sin_port = htons(p);
-      Debug("dns", "random port = %d\n", p);
+      NetDebug("dns", "random port = %d\n", p);
       if ((res = socketManager.ink_bind(fd, (struct sockaddr *) &bind_sa, sizeof(bind_sa),
Proto)) < 0) {
         offset += 101;
         continue;

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/P_Net.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/P_Net.h?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/P_Net.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/P_Net.h Thu Jan 14 21:04:16 2010
@@ -89,6 +89,12 @@
 #define NET_DECREMENT_THREAD_DYN_STAT(_s, _t) \
   RecIncrRawStatSum(net_rsb, _t, (int) _s, -1);
 
+#ifndef DEBUG
+#define NetDebug if (0) dummy_debug
+#else
+#define NetDebug Debug
+#endif
+
 #include "inktomi++.h"
 #include "P_EventSystem.h"
 #include "I_Net.h"

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/P_UnixNet.h Thu Jan 14 21:04:16
2010
@@ -69,7 +69,7 @@
 #else
   int fd;
 #endif
-#if defined(USE_KQUEUE) || (defined(USE_EPOLL) && !defined(USE_EDGE_TRIGGERED_EPOLL))
+#if defined(USE_KQUEUE) || (defined(USE_EPOLL) && !defined(USE_EDGE_TRIGGER))
   int events;
 #endif
   EventLoop event_loop;
@@ -549,7 +549,7 @@
   memset(&ev, 0, sizeof(ev));
   ev.events = e;
   ev.data.ptr = this;
-#ifndef USE_EDGE_TRIGGERED
+#ifndef USE_EDGE_TRIGGER
   events = e;
 #endif
   return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_ADD, fd, &ev);
@@ -571,15 +571,20 @@
 #if defined(USE_EPOLL) && !defined(USE_EDGE_TRIGGER)
   struct epoll_event ev;
   memset(&ev, 0, sizeof(ev));
-  int ee = events;
+  int new_events = events, old_events = events;
   if (e < 0)
-    ee &= ~(-e);
+    new_events &= ~(-e);
   else
-    ee |= e;
-  events = ee;
-  ev.events = ee;
+    new_events |= e;
+  events = new_events;
+  ev.events = new_events;
   ev.data.ptr = this;
-  return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_MOD, fd, &ev);
+  if (!new_events)
+    return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_DEL, fd, &ev);
+  else if (!old_events)
+    return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_ADD, fd, &ev);
+  else
+    return epoll_ctl(event_loop->epoll_fd, EPOLL_CTL_MOD, fd, &ev);
 #elif defined(USE_KQUEUE) && !defined(USE_EDGE_TRIGGER)
   int n = 0;
   struct kevent ev[2];

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixConnection.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixConnection.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixConnection.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixConnection.cc Thu Jan 14 21:04:16
2010
@@ -191,7 +191,7 @@
     if ((res = socketManager.ink_bind(fd, (struct sockaddr *) &bind_sa, sizeof(bind_sa)))
< 0)
       goto Lerror;
 
-    Debug("arm_spoofing", "Passed in options opt=%x client_ip=%x and client_port=%d",
+    NetDebug("arm_spoofing", "Passed in options opt=%x client_ip=%x and client_port=%d",
           opt, opt ? opt->spoof_ip : 0, opt ? opt->spoof_port : 0);
   }
 
@@ -246,11 +246,11 @@
     if (use_tcp) {
       if (opt->sockopt_flags & 1) {
         safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, ON, sizeof(int));
-        Debug("socket", "::bind_connect: setsockopt() TCP_NODELAY on socket");
+        NetDebug("socket", "::bind_connect: setsockopt() TCP_NODELAY on socket");
       }
       if (opt->sockopt_flags & 2) {
         safe_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, ON, sizeof(int));
-        Debug("socket", "::bind_connect: setsockopt() SO_KEEPALIVE on socket");
+        NetDebug("socket", "::bind_connect: setsockopt() SO_KEEPALIVE on socket");
       }
     }
   }

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNet.cc Thu Jan 14 21:04:16
2010
@@ -100,7 +100,7 @@
     if (likely
         (!net_handler->read_ready_list.empty() || !net_handler->read_ready_list.empty()
||
          !net_handler->read_enable_list.empty() || !net_handler->write_enable_list.empty()))
{
-      Debug("epoll", "rrq: %d, wrq: %d, rel: %d, wel: %d", net_handler->read_ready_list.empty(),
+      NetDebug("epoll", "rrq: %d, wrq: %d, rel: %d, wel: %d", net_handler->read_ready_list.empty(),
             net_handler->write_ready_list.empty(), net_handler->read_enable_list.empty(),
             net_handler->write_enable_list.empty());
       poll_timeout = 0;         //poll immediately returns -- we have triggered stuff to
process right now
@@ -117,9 +117,9 @@
 #elif defined(USE_EPOLL)
   pollDescriptor->result = epoll_wait(pollDescriptor->epoll_fd,
                                       pollDescriptor->ePoll_Triggered_Events, POLL_DESCRIPTOR_SIZE,
poll_timeout);
-  Debug("epoll", "[PollCont::pollEvent] epoll_fd: %d, timeout: %d, results: %d", pollDescriptor->epoll_fd,
poll_timeout,
+  NetDebug("epoll", "[PollCont::pollEvent] epoll_fd: %d, timeout: %d, results: %d", pollDescriptor->epoll_fd,
poll_timeout,
         pollDescriptor->result);
-  Debug("iocore_net", "pollEvent : Epoll fd %d active\n", pollDescriptor->epoll_fd);
+  NetDebug("iocore_net", "pollEvent : Epoll fd %d active\n", pollDescriptor->epoll_fd);
 #elif defined(USE_KQUEUE)
   struct timespec tv;
   tv.tv_sec = poll_timeout / 1000;
@@ -128,9 +128,9 @@
                                   pollDescriptor->kq_Triggered_Events,
                                   POLL_DESCRIPTOR_SIZE,
                                   &tv);
-  Debug("kqueue", "[PollCont::pollEvent] kueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd,
poll_timeout,
+  NetDebug("kqueue", "[PollCont::pollEvent] kueue_fd: %d, timeout: %d, results: %d", pollDescriptor->kqueue_fd,
poll_timeout,
         pollDescriptor->result);
-  Debug("iocore_net", "pollEvent : KQueue fd %d active\n", pollDescriptor->kqueue_fd);
+  NetDebug("iocore_net", "pollEvent : KQueue fd %d active\n", pollDescriptor->kqueue_fd);
 #else
 #error port me
 #endif
@@ -297,31 +297,31 @@
     epd = (EventIO*) get_ev_data(pd,x);
     if (epd->type == EVENTIO_READWRITE_VC) {
       vc = epd->data.vc;
-      if (get_ev_events(pd,x) & (EVENTIO_READ)) {
+      if (get_ev_events(pd,x) & (EVENTIO_READ|EVENTIO_ERROR)) {
         vc->read.triggered = 1;
         vc->addLogMessage("read triggered");
         if (!read_ready_list.in(vc))
           read_ready_list.enqueue(vc);
         else if (get_ev_events(pd,x) & EVENTIO_ERROR) {
           // check for unhandled epoll events that should be handled
-          Debug("epoll_miss", "Unhandled epoll event on read: 0x%04x read.enabled=%d closed=%d
read.netready_queue=%d",
+          NetDebug("epoll_miss", "Unhandled epoll event on read: 0x%04x read.enabled=%d closed=%d
read.netready_queue=%d",
                 get_ev_events(pd,x), vc->read.enabled, vc->closed, read_ready_list.in(vc));
         }
       }
       vc = epd->data.vc;
-      if (get_ev_events(pd,x) & EVENTIO_WRITE) {
+      if (get_ev_events(pd,x) & (EVENTIO_WRITE|EVENTIO_ERROR)) {
         vc->write.triggered = 1;
         vc->addLogMessage("write triggered");
         if (!write_ready_list.in(vc))
           write_ready_list.enqueue(vc);
         else if (get_ev_events(pd,x) & EVENTIO_ERROR) {
           // check for unhandled epoll events that should be handled
-          Debug("epoll_miss",
+          NetDebug("epoll_miss",
                 "Unhandled epoll event on write: 0x%04x write.enabled=%d closed=%d write.netready_queue=%d",
                 get_ev_events(pd,x), vc->write.enabled, vc->closed, write_ready_list.in(vc));
         }
-      } else if (!(get_ev_events(pd,x) & EVENTIO_READ) && get_ev_events(pd,x)
& EVENTIO_ERROR) {
-        Debug("epoll_miss", "Unhandled epoll event: 0x%04x", get_ev_events(pd,x));
+      } else if (!get_ev_events(pd,x) & EVENTIO_ERROR) {
+        NetDebug("epoll_miss", "Unhandled epoll event: 0x%04x", get_ev_events(pd,x));
       }
     } else if (epd->type == EVENTIO_DNS_CONNECTION) {
       if (epd->data.dnscon != NULL)
@@ -333,7 +333,7 @@
 
   pd->result = 0;
 
-#if !defined(USE_LIBEV) && defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
   UnixNetVConnection *next_vc = NULL;
   vc = read_ready_list.head;
   while (vc) {
@@ -346,19 +346,19 @@
     else if (vc->read.enabled && vc->read.triggered)
       vc->net_read_io(this, trigger_event->ethread);
     else if (!vc->read.enabled)
-#if !defined(USE_LIBEV) && defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
       read_ready_list.remove(vc);
 #else
       vc->ep.modify(-EVENTIO_READ);
 #endif
-#if defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
     vc = next_vc;
   }
 #else
   }
 #endif
 
-#if !defined(USE_LIBEV) && defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
   next_vc = NULL;
   vc = write_ready_list.head;
   while (vc) {
@@ -371,12 +371,12 @@
     else if (vc->write.enabled && vc->write.triggered)
       write_to_net(this, vc, pd, trigger_event->ethread);
     else if (!vc->write.enabled)
-#if !defined(USE_LIBEV) && defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
       write_ready_list.remove(vc);
 #else
       vc->ep.modify(-EVENTIO_WRITE);
 #endif
-#if defined(USE_EPOLL) && defined(USE_EDGE_TRIGGER_EPOLL)
+#if defined(USE_EDGE_TRIGGER)
     vc = next_vc;
   }
 #else

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetAccept.cc Thu Jan 14 21:04:16
2010
@@ -248,7 +248,7 @@
     EThread *t = eventProcessor.eventthread[ET_NET][i];
     PollDescriptor *pd = get_PollDescriptor(t);
     if (a->ep.start(pd, a, EVENTIO_READ) < 0)
-      Debug("iocore_net", "error starting EventIO");
+      NetDebug("iocore_net", "error starting EventIO");
     a->mutex = get_NetHandler(t)->mutex;
     t->schedule_every(a, period, etype);
   }
@@ -411,7 +411,7 @@
     if (likely(fd >= 0)) {
       vc->addLogMessage("accepting the connection");
 
-      Debug("epoll", "accepted a new socket: %d", fd);
+      NetDebug("epoll", "accepted a new socket: %d", fd);
       if (send_bufsize > 0) {
         if (unlikely(socketManager.set_sndbuf_size(fd, send_bufsize))) {
           bufsz = ROUNDUP(send_bufsize, 1024);
@@ -434,11 +434,11 @@
       }
       if (sockopt_flags & 1) {  // we have to disable Nagle
         safe_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, ON, sizeof(int));
-        Debug("socket", "::acceptFastEvent: setsockopt() TCP_NODELAY on socket");
+        NetDebug("socket", "::acceptFastEvent: setsockopt() TCP_NODELAY on socket");
       }
       if (sockopt_flags & 2) {
         safe_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, ON, sizeof(int));
-        Debug("socket", "::acceptFastEvent: setsockopt() SO_KEEPALIVE on socket");
+        NetDebug("socket", "::acceptFastEvent: setsockopt() SO_KEEPALIVE on socket");
       }
       do {
         res = safe_nonblocking(fd);
@@ -483,7 +483,7 @@
     SET_CONTINUATION_HANDLER(vc, (NetVConnHandler) & UnixNetVConnection::mainEvent);
 
     if (vc->ep.start(pd, vc, EVENTIO_READ|EVENTIO_WRITE) < 0) {
-      Debug("iocore_net", "acceptFastEvent : Error in inserting fd[%d] in kevent\n", vc->con.fd);
+      NetDebug("iocore_net", "acceptFastEvent : Error in inserting fd[%d] in kevent\n", vc->con.fd);
       close_UnixNetVConnection(vc, e->ethread);
       return EVENT_DONE;
     }
@@ -493,7 +493,7 @@
     // Set the vc as triggered and place it in the read ready queue in case there is already
data on the socket.
     // The request will  timeout on the connection if the client has already sent data and
it is on the socket
     // ready to be read.  This can occur under heavy load.
-    Debug("iocore_net", "acceptEvent : Setting triggered and adding to the read ready queue");
+    NetDebug("iocore_net", "acceptEvent : Setting triggered and adding to the read ready
queue");
     vc->read.triggered = 1;
     vc->nh->read_ready_list.enqueue(vc);
 

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetProcessor.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetProcessor.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetProcessor.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetProcessor.cc Thu Jan 14
21:04:16 2010
@@ -62,7 +62,7 @@
   (void) accept_only;           // NT only
   (void) bound_sockaddr;        // NT only
   (void) bound_sockaddr_size;   // NT only
-  Debug("net_processor", "NetProcessor::accept - port %d,recv_bufsize %d, send_bufsize %d,
sockopt 0x%0lX",
+  NetDebug("net_processor", "NetProcessor::accept - port %d,recv_bufsize %d, send_bufsize
%d, sockopt 0x%0lX",
         port, recv_bufsize, send_bufsize, sockopt_flags);
   return ((UnixNetProcessor *) this)->accept_internal(cont, NO_FD, port,
                                                       bound_sockaddr,
@@ -81,7 +81,7 @@
                           EventType etype, bool callback_on_open)
 {
   (void) accept_only;           // NT only
-  Debug("net_processor", "NetProcessor::main_accept - port %d,recv_bufsize %d, send_bufsize
%d, sockopt 0x%0lX",
+  NetDebug("net_processor", "NetProcessor::main_accept - port %d,recv_bufsize %d, send_bufsize
%d, sockopt 0x%0lX",
         port, recv_bufsize, send_bufsize, sockopt_flags);
   return ((UnixNetProcessor *) this)->accept_internal(cont, fd, port,
                                                       bound_sockaddr,
@@ -213,7 +213,7 @@
     Action *result = &vc->action_;
 #ifndef INK_NO_SOCKS
     if (using_socks) {
-      Debug("Socks", "Using Socks ip: %u.%u.%u.%u:%d\n", PRINT_IP(ip), port);
+      NetDebug("Socks", "Using Socks ip: %u.%u.%u.%u:%d\n", PRINT_IP(ip), port);
       socksEntry = socksAllocator.alloc();
       socksEntry->init(cont->mutex, vc, opt->socks_support, opt->socks_version);
       /*XXXX remove last two args */
       socksEntry->action_ = cont;
@@ -228,7 +228,7 @@
       result = &socksEntry->action_;
       vc->action_ = socksEntry;
     } else {
-      Debug("Socks", "Not Using Socks %d \n", socks_conf_stuff->socks_needed);
+      NetDebug("Socks", "Not Using Socks %d \n", socks_conf_stuff->socks_needed);
       vc->action_ = cont;
     }
 #else
@@ -316,7 +316,7 @@
   PollDescriptor *pd = get_PollDescriptor(t);
 
   if (vc->ep.start(pd, vc, EVENTIO_READ|EVENTIO_WRITE) < 0) {
-    Debug("iocore_net", "connect : Error in adding to epoll list\n");
+    NetDebug("iocore_net", "connect : Error in adding to epoll list\n");
     close_UnixNetVConnection(vc, vc->thread);
     return ACTION_RESULT_DONE;
   }
@@ -346,7 +346,7 @@
     switch (event) {
     case NET_EVENT_OPEN:
       vc = (UnixNetVConnection *) e;
-      Debug("connect", "connect Net open");
+      NetDebug("connect", "connect Net open");
       vc->do_io_write(this, 10, /* some non-zero number just to get the poll going */
                       reader);
       /* dont wait for more than timeout secs */
@@ -354,7 +354,7 @@
       return EVENT_CONT;
       break;
 
-      case NET_EVENT_OPEN_FAILED:Debug("connect", "connect Net open failed");
+      case NET_EVENT_OPEN_FAILED:NetDebug("connect", "connect Net open failed");
       if (!action_.cancelled)
         action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) e);
       break;
@@ -367,7 +367,7 @@
           ret = getsockopt(vc->con.fd, SOL_SOCKET, SO_ERROR, (char *) &sl, &sz);
         if (!ret && sl == 0)
         {
-          Debug("connect", "connection established");
+          NetDebug("connect", "connection established");
           /* disable write on vc */
           vc->write.enabled = 0;
           vc->cancel_inactivity_timeout();
@@ -388,7 +388,7 @@
         action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) -ENET_CONNECT_FAILED);
       break;
     case VC_EVENT_INACTIVITY_TIMEOUT:
-      Debug("connect", "connect timed out");
+      NetDebug("connect", "connect timed out");
       vc->do_io_close();
       if (!action_.cancelled)
         action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) -ENET_CONNECT_TIMEOUT);
@@ -437,7 +437,7 @@
 NetProcessor::connect_s(Continuation * cont, unsigned int ip,
                         int port, unsigned int _interface, int timeout, NetVCOptions * opt)
 {
-  Debug("connect", "NetProcessor::connect_s called");
+  NetDebug("connect", "NetProcessor::connect_s called");
   CheckConnect *c = NEW(new CheckConnect(cont->mutex));
   return c->connect_s(cont, ip, port, _interface, timeout, opt);
 }

Modified: incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc?rev=899410&r1=899409&r2=899410&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/net/UnixNetVConnection.cc Thu Jan
14 21:04:16 2010
@@ -320,7 +320,7 @@
     buf.writer()->fill(r);
 #ifdef DEBUG
     if (buf.writer()->write_avail() <= 0)
-      Debug("ssl", "read_from_net, read buffer full");
+      NetDebug("ssl", "read_from_net, read buffer full");
 #endif
     s->vio.ndone += r;
     net_activity(vc, thread);
@@ -333,7 +333,7 @@
     ink_assert(ntodo >= 0);
     if (s->vio.ntodo() <= 0) {
       read_signal_done(VC_EVENT_READ_COMPLETE, nh, vc);
-      Debug("ssl", "read_from_net, read finished - signal done");
+      NetDebug("ssl", "read_from_net, read finished - signal done");
       return;
     } else {
       if (read_signal_and_update(VC_EVENT_READ_READY, vc) != EVENT_CONT)
@@ -956,7 +956,7 @@
   nh = get_NetHandler(thread);
   PollDescriptor *pd = get_PollDescriptor(thread);
   if (ep.start(pd, this, EVENTIO_READ|EVENTIO_WRITE) < 0) {
-    Debug("iocore_net", "acceptEvent : failed EventIO::start\n");
+    NetDebug("iocore_net", "acceptEvent : failed EventIO::start\n");
     close_UnixNetVConnection(this, e->ethread);
     return EVENT_DONE;
   }
@@ -1069,7 +1069,7 @@
   // Initialize this UnixNetVConnection
   //
   int res = 0;
-  Debug("arm_spoofing", "connectUp:: interface=%x and options.spoofip=%x\n", _interface,
options.spoof_ip);
+  NetDebug("arm_spoofing", "connectUp:: interface=%x and options.spoofip=%x\n", _interface,
options.spoof_ip);
   nh = get_NetHandler(t);
 #ifndef USE_EDGE_TRIGGER
   if (_interface || options.local_port || options.spoof_ip)
@@ -1084,7 +1084,7 @@
 #endif
   if (ep.start(get_PollDescriptor(t), this, EVENTIO_READ|EVENTIO_WRITE) < 0) {
     lerrno = errno;
-    Debug("iocore_net", "connectUp : Failed to add to epoll list\n");
+    NetDebug("iocore_net", "connectUp : Failed to add to epoll list\n");
     action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *) res);
     free(t);
     return CONNECT_FAILURE;
@@ -1119,7 +1119,7 @@
     nh = get_NetHandler(t);
     PollDescriptor *pd = get_PollDescriptor(t);
     if (ep.start(pd, this, EVENTIO_READ|EVENTIO_WRITE) < 0) {
-      Debug("iocore_net", "connectUp : Failed to add to epoll list\n");
+      NetDebug("iocore_net", "connectUp : Failed to add to epoll list\n");
       lerrno = errno;
       action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)(intptr_t)res);
       free(t);



Mime
View raw message