You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/09/23 01:43:07 UTC

svn commit: r1000274 - in /trafficserver/traffic/trunk: doc/dot/ iocore/eventsystem/ iocore/hostdb/ proxy/ proxy/http2/ proxy/mgmt2/

Author: zwoop
Date: Wed Sep 22 23:43:06 2010
New Revision: 1000274

URL: http://svn.apache.org/viewvc?rev=1000274&view=rev
Log:
TS-455 Remove remants of NCA.

Removed:
    trafficserver/traffic/trunk/doc/dot/nca.dot
    trafficserver/traffic/trunk/proxy/http2/HttpNcaClient.cc
    trafficserver/traffic/trunk/proxy/http2/HttpNcaClient.h
Modified:
    trafficserver/traffic/trunk/iocore/eventsystem/I_VConnection.h
    trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc
    trafficserver/traffic/trunk/proxy/DynamicStats.h
    trafficserver/traffic/trunk/proxy/Main.cc
    trafficserver/traffic/trunk/proxy/Main.h
    trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc
    trafficserver/traffic/trunk/proxy/http2/HttpClientSession.h
    trafficserver/traffic/trunk/proxy/http2/HttpDebugNames.cc
    trafficserver/traffic/trunk/proxy/http2/HttpProxyServerMain.cc
    trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
    trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
    trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
    trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc

Modified: trafficserver/traffic/trunk/iocore/eventsystem/I_VConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/I_VConnection.h?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/I_VConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/I_VConnection.h Wed Sep 22 23:43:06 2010
@@ -38,7 +38,6 @@
 #define VCONNECTION_CACHE_DATA_BASE     0
 #define VCONNECTION_NET_DATA_BASE       100
 #define VCONNECTION_API_DATA_BASE       200
-#define VCONNECTION_NCA_DATA_BASE       300
 
 //
 // Event signals

Modified: trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc (original)
+++ trafficserver/traffic/trunk/iocore/hostdb/HostDB.cc Wed Sep 22 23:43:06 2010
@@ -749,10 +749,6 @@ Lretry:
   c->force_dns = aforce_dns;
   SET_CONTINUATION_HANDLER(c, (HostDBContHandler) & HostDBContinuation::probeEvent);
 
-  // If we're doing transaction on a thread, schedule ourselves
-  //   on the same thread.  Otherwise, use the dns thread since
-  //   we could be on an NCA thread which isn't schedulable
-  //
   // Since ProxyMutexPtr has a cast operator, gcc-3.x get upset
   // about ambiguity when doing this comparison, so by reversing
   // the operands, I force it to pick the cast operation /leif.
@@ -936,22 +932,7 @@ HostDBProcessor::getbyname_imm(Continuat
   c->force_dns = force_dns;
   SET_CONTINUATION_HANDLER(c, (HostDBContHandler) & HostDBContinuation::probeEvent);
 
-  // If we're doing transaction on a thread, schedule ourselves
-  //   on the same thread.  Otherwise, use the dns thread since
-  //   we could be on an NCA thread which isn't schedulable
-  //
-  // Since ProxyMutexPtr has a cast operator, gcc-3.x get upset
-  // about ambiguity when doing this comparison, so by reversing
-  // the operands, I force it to pick the cast operation /leif.
-#ifdef USE_NCA
-  if (thread->mutex == cont->mutex) {
-    thread->schedule_in(c, MUTEX_RETRY_DELAY);
-  } else {
-    dnsProcessor.thread->schedule_imm(c);
-  }
-#else
   thread->schedule_in(c, MUTEX_RETRY_DELAY);
-#endif
 
   return &c->action;
 }

Modified: trafficserver/traffic/trunk/proxy/DynamicStats.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/DynamicStats.h?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/DynamicStats.h (original)
+++ trafficserver/traffic/trunk/proxy/DynamicStats.h Wed Sep 22 23:43:06 2010
@@ -93,13 +93,6 @@ _D(cluster_vc_cache_purges_stat)
 _D(cluster_write_lock_misses_stat)
 
 
-
-  //
-  // Dynamic NCA Stats
-  //
-_D(nca_upcall_count_stat)
-_D(nca_downcall_count_stat)
-_D(nca_defer_downcall_count_stat)
   //
   // Dynamic Load Shedding Stats
   //

Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Wed Sep 22 23:43:06 2010
@@ -99,10 +99,6 @@ extern "C" int plock(int);
 #include "Update.h"
 #include "congest/Congestion.h"
 
-#ifdef USE_NCA
-#include "NcaProcessor.h"
-#endif
-
 #include "RemapProcessor.h"
 
 #include "XmlUtils.h"
@@ -288,18 +284,6 @@ ArgumentDescription argument_description
    &core_file, NULL, NULL},
 #endif
 
-#ifdef USE_NCA
-  {"NCA_Handlers", 'N', "NCA Handlers", "I", &NCA_handlers, NULL, NULL},
-  {"NCA_pwait", 'q', "Nca Preempt Wait", "I", &NCA_preempt_wait, NULL, NULL},
-  {"NCA_nocache", 'm', "Set Nca no cache", "T", &NCA_nocache, NULL, NULL},
-  {"NCA_advise", 'w', "Set Nca advise", "T", &NCA_advise, NULL, NULL},
-  {"NCA_use_ctag", 'x', "Set Nca use ctag", "T", &NCA_use_ctag, NULL, NULL},
-  {"NCA_data_return", 'y', "Set Nca data return", "T", &NCA_data_return,
-   NULL, NULL},
-  {"NCA_internal_stats", 's', "Nca internal stats", "T", &NCA_internal_stats,
-   NULL, NULL},
-#endif
-
   {"accept_mss", ' ', "MSS for client connections", "I", &accept_mss,
    NULL, NULL},
   {"poll_timeout", 't', "poll timeout in milliseconds", "I", &net_config_poll_timeout,
@@ -1711,10 +1695,6 @@ main(int argc, char **argv)
   mcheck_pedantic(NULL);
 #endif
 
-#ifdef USE_NCA
-  NCA_handlers = ink_number_of_processors();
-#endif
-
   // Verify system dependent 'constants'
   check_system_constants();
 
@@ -1977,10 +1957,6 @@ main(int argc, char **argv)
 
     sslNetProcessor.start(getNumSSLThreads());
 
-#ifdef USE_NCA
-    ncaProcessor.start();
-#endif
-
 #ifndef INK_NO_LOG
     // initialize logging (after event and net processor)
     Log::init(remote_management_flag ? 0 : Log::NO_REMOTE_MANAGEMENT);

Modified: trafficserver/traffic/trunk/proxy/Main.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.h?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.h (original)
+++ trafficserver/traffic/trunk/proxy/Main.h Wed Sep 22 23:43:06 2010
@@ -106,7 +106,6 @@ enum HttpPortTypes
   SERVER_PORT_DEFAULT = 0,
   SERVER_PORT_COMPRESSED,
   SERVER_PORT_BLIND_TUNNEL,
-  SERVER_PORT_NCA,
   SERVER_PORT_SSL
 };
 

Modified: trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpClientSession.cc Wed Sep 22 23:43:06 2010
@@ -604,15 +604,6 @@ HttpClientSession::release(IOBufferReade
   }
 }
 
-HTTPHdr *
-HttpClientSession::get_request()
-{
-
-  // Call should only be executed on an NCA type session
-  ink_release_assert(0);
-  return NULL;
-}
-
 HttpServerSession *
 HttpClientSession::get_bound_ss()
 {

Modified: trafficserver/traffic/trunk/proxy/http2/HttpClientSession.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpClientSession.h?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpClientSession.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpClientSession.h Wed Sep 22 23:43:06 2010
@@ -82,9 +82,6 @@ public:
     return bound_ss;
   };
 
-  // Used to retreive a request from NCA
-  virtual HTTPHdr *get_request();
-
   // Used for the cache authenticated HTTP content feature
   HttpServerSession *get_bound_ss();
 

Modified: trafficserver/traffic/trunk/proxy/http2/HttpDebugNames.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpDebugNames.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpDebugNames.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpDebugNames.cc Wed Sep 22 23:43:06 2010
@@ -372,9 +372,6 @@ HttpDebugNames::get_action_name(HttpTran
   case HttpTransact::TRANSFORM_READ:
     return ("TRANSFORM_READ");
 
-  case HttpTransact::NCA_IMMEDIATE:
-    return ("NCA_IMMEDIATE");
-
 #ifdef PROXY_DRAIN
   case HttpTransact::PROXY_DRAIN_REQUEST_BODY:
     return ("PROXY_DRAIN_REQUEST_BODY");

Modified: trafficserver/traffic/trunk/proxy/http2/HttpProxyServerMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpProxyServerMain.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpProxyServerMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpProxyServerMain.cc Wed Sep 22 23:43:06 2010
@@ -35,14 +35,9 @@
 #include "HttpTunnel.h"
 #include "Tokenizer.h"
 
-#ifdef USE_NCA
-#include "HttpNcaClient.h"
-#endif
-
 HttpPortEntry *http_port_attr_array = NULL;
 HttpOtherPortEntry *http_other_port_array = NULL;
 
-
 #ifdef DEBUG
 extern "C"
 {
@@ -356,10 +351,6 @@ start_HttpProxyServer(int fd, int port, 
 
   sslTerminationConfig.release(sslParam);
 
-#ifdef USE_NCA
-  start_NcaServer();
-#endif
-
 #ifdef DEBUG
   if (diags->on("http_dump")) {
 //      HttpStateMachine::dump_state_machines();

Modified: trafficserver/traffic/trunk/proxy/http2/HttpSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpSM.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpSM.cc Wed Sep 22 23:43:06 2010
@@ -42,10 +42,6 @@
 #include "StatSystemV2.h"
 #endif
 
-#ifdef USE_NCA
-#include "NcaProcessor.h"
-#endif
-
 #include "HttpPages.h"
 
 //#include "I_Auth.h"
@@ -660,47 +656,23 @@ HttpSM::attach_client_session(HttpClient
   // Record api hook set state
   hooks_set = http_global_hooks->hooks_set | client_vc->hooks_set;
 
-#ifdef USE_NCA
-  if (t_state.client_info.port_attribute == SERVER_PORT_NCA) {
-    bool data_found = netvc->get_data(NCA_DATA_CACHE_UPCALL,
-				      &t_state.nca_info.request_info);
-    ink_assert(data_found);
-  } else {
-#else
-  {
-#endif
-    // Setup for parsing the header
-    ua_buffer_reader = buffer_reader;
-    ua_entry->vc_handler = &HttpSM::state_read_client_request_header;
-    t_state.hdr_info.client_request.destroy();
-    t_state.hdr_info.client_request.create(HTTP_TYPE_REQUEST);
-    http_parser_init(&http_parser);
-
-
-    // We first need to run the transaction start hook.  Since
-    //  this hook maybe asyncronous, we need to disable IO on
-    //  client but set the continuation to be the state machine
-    //  so if we get an timeout events the sm handles them
-    ua_entry->read_vio = client_vc->do_io_read(this, 0, buffer_reader->mbuf);
-  }
+  // Setup for parsing the header
+  ua_buffer_reader = buffer_reader;
+  ua_entry->vc_handler = &HttpSM::state_read_client_request_header;
+  t_state.hdr_info.client_request.destroy();
+  t_state.hdr_info.client_request.create(HTTP_TYPE_REQUEST);
+  http_parser_init(&http_parser);
 
+  // We first need to run the transaction start hook.  Since
+  //  this hook maybe asyncronous, we need to disable IO on
+  //  client but set the continuation to be the state machine
+  //  so if we get an timeout events the sm handles them
+  ua_entry->read_vio = client_vc->do_io_read(this, 0, buffer_reader->mbuf);
 
   // Add our state sm to the sm list
   state_add_to_list(EVENT_NONE, NULL);
 }
 
-void
-HttpSM::setup_client_header_nca()
-{
-#ifdef USE_NCA
-
-  t_state.hdr_info.client_request.copy(ua_session->get_request());
-
-  Debug("http", "[%lld] retreived nca client request header", sm_id);
-
-  call_transact_and_set_next_state(HttpTransact::ModifyRequest);
-#endif
-}
 
 void
 HttpSM::setup_client_read_request_header()
@@ -1619,10 +1591,6 @@ HttpSM::handle_api_return()
   case HttpTransact::HTTP_API_SM_START:
     if (t_state.client_info.port_attribute == SERVER_PORT_BLIND_TUNNEL) {
       setup_blind_tunnel_port();
-#ifdef USE_NCA
-    } else if (t_state.client_info.port_attribute == SERVER_PORT_NCA) {
-      setup_client_header_nca();
-#endif
     } else {
       setup_client_read_request_header();
     }
@@ -1654,11 +1622,6 @@ HttpSM::handle_api_return()
     setup_server_send_request();
     return;
   case HttpTransact::HTTP_API_SEND_REPONSE_HDR:
-#ifdef USE_NCA
-    if (t_state.client_info.port_attribute == SERVER_PORT_NCA) {
-      perform_nca_cache_action();
-    }
-#endif
     // Set back the inactivity timeout
     if (ua_session) {
       ua_session->get_netvc()->
@@ -3205,7 +3168,7 @@ HttpSM::tunnel_handler_ua(int event, Htt
     ua_session->do_io_close();
     ua_session = NULL;
   } else {
-    ink_assert(ua_buffer_reader != NULL || t_state.client_info.port_attribute == SERVER_PORT_NCA);
+    ink_assert(ua_buffer_reader != NULL);
     ua_session->release(ua_buffer_reader);
     ua_buffer_reader = NULL;
     ua_session = NULL;
@@ -3397,15 +3360,10 @@ HttpSM::tunnel_handler_post_ua(int event
         tunnel.local_finish_all(p);
       }
     }
-#ifdef USE_NCA
-    if (t_state.client_info.port_attribute != SERVER_PORT_NCA)
-#endif
-    {
-      // Initiate another read to watch catch aborts and
-      //   timeouts
-      ua_entry->vc_handler = &HttpSM::state_watch_for_client_abort;
-      ua_entry->read_vio = p->vc->do_io_read(this, INT_MAX, ua_buffer_reader->mbuf);
-    }
+    // Initiate another read to watch catch aborts and
+    //   timeouts
+    ua_entry->vc_handler = &HttpSM::state_watch_for_client_abort;
+    ua_entry->read_vio = p->vc->do_io_read(this, INT_MAX, ua_buffer_reader->mbuf);
     break;
   default:
     ink_release_assert(0);
@@ -5073,14 +5031,9 @@ HttpSM::do_setup_post_tunnel(HttpVC_t to
     //  header buffer into new buffer
     //
 
-#ifdef USE_NCA
-    if (t_state.client_info.port_attribute != SERVER_PORT_NCA)
-#endif
-    {
-      client_request_body_bytes =
-        post_buffer->write(ua_buffer_reader, chunked ? ua_buffer_reader->read_avail() : post_bytes);
-      ua_buffer_reader->consume(client_request_body_bytes);
-    }
+    client_request_body_bytes =
+      post_buffer->write(ua_buffer_reader, chunked ? ua_buffer_reader->read_avail() : post_bytes);
+    ua_buffer_reader->consume(client_request_body_bytes);
     p = tunnel.add_producer(ua_entry->vc,
                             post_bytes - transfered_bytes,
                             buf_start, &HttpSM::tunnel_handler_post_ua, HT_HTTP_CLIENT, "user agent post");
@@ -5244,97 +5197,6 @@ HttpSM::perform_cache_write_action()
 }
 
 
-// void HttpSM::perform_nca_cache_action()
-//
-//   Called to set the NCA cache info
-//     (ctag, nca, advise, etc)
-//
-//
-void
-HttpSM::perform_nca_cache_action()
-{
-
-#ifdef USE_NCA
-  // Use the cache action to figure out how to handle
-  //  NCA
-  switch (t_state.cache_info.action) {
-  case HttpTransact::CACHE_DO_DELETE:
-  case HttpTransact::CACHE_DO_SERVE_AND_DELETE:
-    // We need to get rid of any exisitng content in
-    //  nca's cache
-    if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-      t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_FLUSH;
-    }
-    t_state.nca_info.response_info.nocache = 1;
-    break;
-
-  case HttpTransact::CACHE_DO_NO_ACTION:
-    // We are not cacheing content so no cache shouldn't
-    //   either
-    t_state.nca_info.response_info.nocache = 1;
-
-    if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-      t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_FLUSH;
-    }
-    break;
-
-  case HttpTransact::CACHE_DO_SERVE_AND_UPDATE:
-  case HttpTransact::CACHE_DO_UPDATE:
-    // Because we can't update NCA's headers, handle this case
-    //  same as replace
-    //
-    // FALLTHROUGH
-  case HttpTransact::CACHE_DO_REPLACE:
-    // If there is an existing copy in nca's cache get rid of it
-    //  to prevent problems when alternates change on the
-    //  origin server
-    if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-      t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_REPLACE | NCA_IO_ADVISE_FLUSH;
-    }
-    break;
-  case HttpTransact::CACHE_DO_WRITE:
-    // If nca has a document we don't flush it's copy
-    if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-      t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_REPLACE | NCA_IO_ADVISE_FLUSH;
-    }
-    break;
-  case HttpTransact::CACHE_DO_SERVE:
-    // If nca has a different copy than us, (otherwise we would
-    //  we returning nca immediate and not be here
-    if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-      t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_REPLACE | NCA_IO_ADVISE_FLUSH;
-    }
-    break;
-  default:
-    if (t_state.next_action == HttpTransact::PROXY_SEND_ERROR_CACHE_NOOP) {
-      if (t_state.nca_info.request_info->advisory & NCA_IO_ADVISE) {
-        t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE | NCA_IO_ADVISE_TEMP;
-      } else {
-        t_state.nca_info.response_info.nocache = 1;
-      }
-      break;
-    }
-    ink_release_assert(0);
-    break;
-  }
-
-/*
-    if (is_action_tag_set("nca_always_advise")) {
-	t_state.nca_info.response_info.advisory |= NCA_IO_ADVISE;
-    }
-
-    if (is_action_tag_set("nca_always_nocache")) {
-	t_state.nca_info.response_info.nocache = 1;
-    }
-    */
-
-  bool r = ua_session->get_netvc()->set_data(NCA_DATA_CACHE_DOWNCALL,
-                                             &t_state.nca_info.response_info);
-  ink_assert(r);
-#endif
-
-}
-
 void
 HttpSM::issue_cache_update()
 {
@@ -5646,9 +5508,6 @@ HttpSM::setup_cache_read_transfer()
   buf->append_block(HTTP_HEADER_BUFFER_SIZE_INDEX);
 #endif
 
-#ifdef USE_NCA
-  buf->water_mark = write_push_bytes;
-#endif
   buf->water_mark = (int) t_state.http_config_param->default_buffer_water_mark;
 
   IOBufferReader *buf_start = buf->alloc_reader();
@@ -7140,19 +6999,6 @@ HttpSM::set_next_state()
       break;
     }
 
-
-  case HttpTransact::NCA_IMMEDIATE:
-    {
-#ifdef USE_NCA
-      // FIX ME: What do about api hooks here?
-      ua_session->get_netvc()->set_data(NCA_DATA_CACHE_DOWNCALL, &t_state.nca_info);
-      terminate_sm = true;
-#else
-      ink_release_assert(0);
-#endif
-      break;
-    }
-
   case HttpTransact::PREPARE_CACHE_UPDATE:
     {
       ink_assert(t_state.api_update_cached_object == HttpTransact::UPDATE_CACHED_OBJECT_CONTINUE);

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Wed Sep 22 23:43:06 2010
@@ -51,9 +51,6 @@
 //#include "YAddr.h"
 #define REVALIDATE_CONV_FACTOR 1000000  //Revalidation Conversion Factor to msec - YTS Team, yamsat
 #include "I_Machine.h"
-#ifdef USE_NCA
-#include "NcaProcessor.h"
-#endif
 
 static const char *URL_MSG = "Unable to process requested URL.\n";
 
@@ -583,36 +580,6 @@ how_to_open_connection(HttpTransact::Sta
   return s->cdn_saved_next_action;
 }
 
-#ifdef USE_NCA
-static uint64
-extract_ctag_from_response(HTTPHdr * h)
-{
-
-  HTTP_DEBUG_ASSERT(h->type_get() == HTTP_TYPE_RESPONSE);
-  MIMEField *ctag_field = h->field_find("@Ctag", 5);
-
-  uint64 ctag;
-  if (ctag_field != NULL) {
-    int tmp;
-    const char *ctag_str = ctag_field->value_get(&tmp);
-    // strtoull requires NULL terminated string so
-    //  create one
-    if (tmp < 64) {
-      char tmp_str[64];
-      memcpy(tmp_str, ctag_str, tmp);
-      tmp_str[tmp] = '\0';
-      ctag = strtoull(tmp_str, NULL, 10);
-    } else {
-      // Obviously bogus, ignore
-      ctag = 0;
-    }
-  } else {
-    ctag = 0;
-  }
-
-  return ctag;
-}
-#endif
 
 /*****************************************************************************
  *****************************************************************************
@@ -625,19 +592,14 @@ extract_ctag_from_response(HTTPHdr * h)
  **** take as input just the state and set the next_action variable.      ****
  *****************************************************************************
  *****************************************************************************/
-
 void
 HttpTransact::BadRequest(State * s)
 {
-
   Debug("http_trans", "[BadRequest]" "parser marked request bad");
-
   bootstrap_state_variables_from_request(s, &s->hdr_info.client_request);
-
   build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Invalid HTTP Request",
                        "request#syntax_error", "Bad request syntax", "");
   TRANSACT_RETURN(PROXY_SEND_ERROR_CACHE_NOOP, NULL);
-
 }
 
 void
@@ -2811,44 +2773,6 @@ HttpTransact::HandleCacheOpenReadHit(Sta
     SET_VIA_STRING(VIA_CACHE_RESULT, VIA_IN_CACHE_FRESH);
   }
 
-#ifdef USE_NCA
-  if (s->client_info.port_attribute == SERVER_PORT_NCA) {
-
-    uint64 ctag = extract_ctag_from_response(obj->response_get());
-    NcaCacheUp_t *nc = s->nca_info.request_info;
-
-    if (nc->advisory) {
-      if (nc->advise_ctag != 0 && nc->advise_ctag == ctag) {
-
-        // Since the ctags match and the object is
-        //  still fresh in our cache, the advise wasn't
-        //  needed and nca should return the document
-        //  it has
-        s->nca_info.response_info.advisory = NCA_IO_ADVISE_NONE;
-        s->squid_codes.log_code = SQUID_LOG_TCP_HIT;
-        TRANSACT_RETURN(NCA_IMMEDIATE, NULL);
-      }
-    } else if (nc->nocache == 0 && ctag != 0) {
-      // No advise, so see if NCA already has the document
-      //   for a different alternate but matching the
-      //   cached copy's ctag against the set nca has
-
-      for (int i = 0; i < nc->num_ctags; i++) {
-        if (nc->ctag_array[i] == ctag) {
-          s->nca_info.response_info.iodirect_ctag = ctag;
-          s->squid_codes.log_code = SQUID_LOG_TCP_HIT;
-          TRANSACT_RETURN(NCA_IMMEDIATE, NULL);
-        }
-      }
-    }
-    // No immediate NCA response so we will be
-    //  returning the cached cop and thus we
-    //  need to set the ctag on the way down
-    s->nca_info.response_info.ctag = ctag;
-  }
-#endif
-
-
   if (s->cache_lookup_result == CACHE_LOOKUP_HIT_WARNING) {
     build_response_from_cache(s, HTTP_WARNING_CODE_HERUISTIC_EXPIRATION);
   } else if (s->cache_lookup_result == CACHE_LOOKUP_HIT_STALE) {
@@ -5114,21 +5038,6 @@ HttpTransact::set_headers_for_cache_writ
 
   if (!s->cop_test_page)
     DUMP_HEADER("http_hdrs", cache_info->request_get(), s->state_machine_id, "Cached Request Hdr");
-
-#ifdef USE_NCA
-  // With NCA set get a new ctag here since this is a new document
-  if (s->client_info.port_attribute == SERVER_PORT_NCA) {
-    uint64 new_ctag = ncaProcessor.allocate_ctag();
-
-    char ctag_str[21];
-    snprintf(ctag_str, sizeof(ctag_str), "%llu", new_ctag);
-
-    HTTPHdr *ch = cache_info->response_get();
-    ch->value_set("@Ctag", 5, ctag_str, strlen(ctag_str));
-
-    s->nca_info.response_info.ctag = new_ctag;
-  }
-#endif
 }
 
 void
@@ -7415,15 +7324,6 @@ HttpTransact::handle_response_keep_alive
   heads->field_delete(MIME_FIELD_CONNECTION, MIME_LEN_CONNECTION);
   heads->field_delete(MIME_FIELD_PROXY_CONNECTION, MIME_LEN_PROXY_CONNECTION);
 
-#ifdef USE_NCA
-  // Since NCA does all the client side keep alive,
-  //   simply want to delete all the connection headers
-  //   and return so as not interfere with NCA keep-alive
-  if (s->client_info.port_attribute == SERVER_PORT_NCA) {
-    return;
-  }
-#endif
-
   int c_hdr_field_len;
   const char *c_hdr_field_str;
   if (s->client_info.proxy_connect_hdr) {
@@ -7545,21 +7445,6 @@ HttpTransact::delete_all_document_altern
     SET_VIA_STRING(VIA_DETAIL_CACHE_LOOKUP, VIA_DETAIL_MISS_NOT_CACHED);
   }
 
-#ifdef USE_NCA
-  /*  FIX ME: DELETE and NCA
-     if (s->client_info.port_attribute == SERVER_PORT_NCA) {
-     if (s->nca_info.request_info->advisory) {
-     HTTPHdr cached_response = s->cache_info.object_read->response_get();
-     ink_assert(cached_response.valid());
-     uint64 ctag = extract_ctag_from_response(cached_response);
-     s->nca_info.response_info.ctag = ctag;
-     s->nca_info.response_info.advisory |= NCA_IO_ADVISE_FLUSH;
-     s->nca_info.response_info.nocache = 1;
-     }
-     }
-   */
-#endif
-
   if ((s->method != HTTP_WKSIDX_GET) && (s->method == HTTP_WKSIDX_DELETE || s->method == HTTP_WKSIDX_PURGE)) {
     bool valid_max_forwards;
     int max_forwards = -1;

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.h?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.h Wed Sep 22 23:43:06 2010
@@ -43,11 +43,6 @@
 #include "RemapPluginInfo.h"
 #include "UrlMapping.h"
 
-
-#ifdef USE_NCA
-#include "NcaVConnection.h"
-#endif
-
 #include "congest/Congestion.h"
 
 #define MAX_DNS_LOOKUPS 2
@@ -589,8 +584,6 @@ public:
     SSL_TUNNEL,
     EXTENSION_METHOD_TUNNEL,
 
-    NCA_IMMEDIATE,
-
     CONTINUE,
 
     HTTP_API_SM_START,
@@ -911,19 +904,6 @@ public:
   SquidLogInfo;
 
 
-#ifdef USE_NCA
-  typedef struct _NcaInfo
-  {
-    NcaCacheUp_t *request_info;
-    NcaCacheDown_t response_info;
-
-      _NcaInfo():request_info(NULL), response_info()
-    {
-    };
-  }
-  NcaInfo;
-#endif
-
 #define HTTP_TRANSACT_STATE_MAX_USER_ARG         16     /* max number of user arguments inside HttpTransact::State structure */
 #define HTTP_TRANSACT_STATE_MAX_XBUF_SIZE  (1024*2)     /* max size of plugin exchange buffer */
 
@@ -960,9 +940,6 @@ public:
     HeaderInfo hdr_info;
     SquidLogInfo squid_codes;
     HttpApiInfo api_info;
-#ifdef USE_NCA
-    NcaInfo nca_info;
-#endif
     // To handle parent proxy case, we need to be
     //  able to defer some work in building the request
     TransactFunc_t pending_work;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc?rev=1000274&r1=1000273&r2=1000274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc Wed Sep 22 23:43:06 2010
@@ -1785,19 +1785,6 @@ RecordElement RecordsConfig[] = {
   ,
   //##############################################################################
   //#
-  //# Nca Subsystem
-  //#
-  //##############################################################################
-#ifdef USE_NCA
-  {PROCESS, "proxy.process.nca.upcalls", "", INK_INT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
-  ,
-  {PROCESS, "proxy.process.nca.downcalls", "", INK_INT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
-  ,
-  {PROCESS, "proxy.process.nca.defered_downcalls", "", INK_INT, "0", RU_NULL, RR_NULL, RC_NULL, NULL, RA_NULL}
-  ,
-#endif
-  //##############################################################################
-  //#
   //# Cache
   //#
   //##############################################################################