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 2019/11/18 13:12:50 UTC

[trafficserver] branch 9.0.x updated (eaa23ac -> d490b5a)

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

zwoop pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from eaa23ac  Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189)
     new 2359296  Remove unimplement UDP function
     new d490b5a  Removes the ssn_close hook, it can never work (#6175)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/admin-guide/plugins/tcpinfo.en.rst             |  1 -
 .../LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po  |  4 --
 iocore/net/P_UDPPacket.h                           | 69 ----------------------
 plugins/tcpinfo/tcpinfo.cc                         | 17 ++----
 4 files changed, 5 insertions(+), 86 deletions(-)


[trafficserver] 02/02: Removes the ssn_close hook, it can never work (#6175)

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit d490b5a68ff9e9ee190cf93dde0b200c53b013ca
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sun Nov 17 13:49:03 2019 +0800

    Removes the ssn_close hook, it can never work (#6175)
    
    (cherry picked from commit a711c465c68243da290952512be704b715575d60)
---
 doc/admin-guide/plugins/tcpinfo.en.rst                  |  1 -
 .../ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po    |  4 ----
 plugins/tcpinfo/tcpinfo.cc                              | 17 +++++------------
 3 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/doc/admin-guide/plugins/tcpinfo.en.rst b/doc/admin-guide/plugins/tcpinfo.en.rst
index 28ca987..6c806e8 100644
--- a/doc/admin-guide/plugins/tcpinfo.en.rst
+++ b/doc/admin-guide/plugins/tcpinfo.en.rst
@@ -45,7 +45,6 @@ The following options may be specified in :file:`plugin.config`:
    Event Name     Triggered when
   ==============  ===============================================
   send_resp_hdr   The server begins sending an HTTP response.
-  ssn_close       The TCP connection closes.
   ssn_start       A new TCP connection is accepted.
   txn_close       A HTTP transaction is completed.
   txn_start       A HTTP transaction is initiated.
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po
index 0b18003..88ae2c5 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po
@@ -232,10 +232,6 @@ msgstr ""
 msgid "snd_ssthresh"
 msgstr ""
 
-#: ../../admin-guide/plugins/tcpinfo.en.rst:48
-msgid "ssn_close"
-msgstr ""
-
 #: ../../admin-guide/plugins/tcpinfo.en.rst:69
 #: ../../admin-guide/plugins/tcpinfo.en.rst:81
 msgid "timestamp"
diff --git a/plugins/tcpinfo/tcpinfo.cc b/plugins/tcpinfo/tcpinfo.cc
index cb8a820..0c9d07f 100644
--- a/plugins/tcpinfo/tcpinfo.cc
+++ b/plugins/tcpinfo/tcpinfo.cc
@@ -54,7 +54,6 @@
 #define TCPI_HOOK_SSN_START 0x01u
 #define TCPI_HOOK_TXN_START 0x02u
 #define TCPI_HOOK_SEND_RESPONSE 0x04u
-#define TCPI_HOOK_SSN_CLOSE 0x08u
 #define TCPI_HOOK_TXN_CLOSE 0x10u
 
 // Log format headers. These are emitted once at the start of a log file. Note that we
@@ -215,10 +214,6 @@ tcp_info_hook(TSCont contp, TSEvent event, void *edata)
     ssnp       = TSHttpTxnSsnGet(txnp);
     event_name = "send_resp_hdr";
     break;
-  case TS_EVENT_HTTP_SSN_CLOSE:
-    ssnp       = static_cast<TSHttpSsn>(edata);
-    event_name = "ssn_close";
-    break;
   default:
     return 0;
   }
@@ -291,8 +286,11 @@ parse_hook_list(const char *hook_list)
   const struct hookmask {
     const char *name;
     unsigned mask;
-  } hooks[] = {{"ssn_start", TCPI_HOOK_SSN_START}, {"txn_start", TCPI_HOOK_TXN_START}, {"send_resp_hdr", TCPI_HOOK_SEND_RESPONSE},
-               {"ssn_close", TCPI_HOOK_SSN_CLOSE}, {"txn_close", TCPI_HOOK_TXN_CLOSE}, {nullptr, 0u}};
+  } hooks[] = {{"ssn_start", TCPI_HOOK_SSN_START},
+               {"txn_start", TCPI_HOOK_TXN_START},
+               {"send_resp_hdr", TCPI_HOOK_SEND_RESPONSE},
+               {"txn_close", TCPI_HOOK_TXN_CLOSE},
+               {nullptr, 0u}};
 
   str = TSstrdup(hook_list);
 
@@ -461,11 +459,6 @@ init:
     TSDebug("tcpinfo", "added hook to the sending of the headers");
   }
 
-  if (hooks & TCPI_HOOK_SSN_CLOSE) {
-    TSHttpHookAdd(TS_HTTP_SSN_CLOSE_HOOK, cont);
-    TSDebug("tcpinfo", "added hook to the close of the TCP connection");
-  }
-
   if (hooks & TCPI_HOOK_TXN_CLOSE) {
     TSHttpHookAdd(TS_HTTP_TXN_CLOSE_HOOK, cont);
     TSDebug("tcpinfo", "added hook to the close of the transaction");


[trafficserver] 01/02: Remove unimplement UDP function

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 23592961db957861dfc91496753cedaef4ed5713
Author: scw00 <sc...@apache.org>
AuthorDate: Fri Nov 15 14:46:51 2019 +0800

    Remove unimplement UDP function
    
    (cherry picked from commit e93da34cb76c4a4c6b826ea9c257e6ca0eba094a)
---
 iocore/net/P_UDPPacket.h | 69 ------------------------------------------------
 1 file changed, 69 deletions(-)

diff --git a/iocore/net/P_UDPPacket.h b/iocore/net/P_UDPPacket.h
index d6473aa..a9f015b 100644
--- a/iocore/net/P_UDPPacket.h
+++ b/iocore/net/P_UDPPacket.h
@@ -38,8 +38,6 @@ public:
   UDPPacketInternal();
   ~UDPPacketInternal() override;
 
-  void append_block_internal(IOBufferBlock *block);
-
   void free() override;
 
   SLINK(UDPPacketInternal, alink); // atomic link
@@ -164,47 +162,6 @@ UDPPacket::getConnection()
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, char *buf, int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = when;
-  ats_ip_copy(&p->to, to);
-
-  if (buf) {
-    IOBufferBlock *body = new_IOBufferBlock();
-    body->alloc(iobuffer_size_to_index(len));
-    memcpy(body->end(), buf, len);
-    body->fill(len);
-    p->append_block(body);
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, IOBufferBlock *buf, int len)
-{
-  (void)len;
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = when;
-  ats_ip_copy(&p->to, to);
-
-  while (buf) {
-    IOBufferBlock *body = buf->clone();
-    p->append_block(body);
-    buf = buf->next.get();
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr<IOBufferBlock> &buf)
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();
@@ -219,32 +176,6 @@ new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr<IOBufferBlock> &bu
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(ink_hrtime when, Ptr<IOBufferBlock> buf)
-{
-  return new_UDPPacket(nullptr, when, buf);
-}
-
-TS_INLINE UDPPacket *
-new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, char *buf, int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = 0;
-  ats_ip_copy(&p->from, from);
-  ats_ip_copy(&p->to, to);
-
-  IOBufferBlock *body = new_IOBufferBlock();
-  body->alloc(iobuffer_size_to_index(len));
-  memcpy(body->end(), buf, len);
-  body->fill(len);
-  p->append_block(body);
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, Ptr<IOBufferBlock> &block)
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();