Author: adrian.chadd
Date: Thu Jul  9 03:21:46 2009
New Revision: 14164

Modified:
    branches/LUSCA_HEAD/src/cf.data.pre
    branches/LUSCA_HEAD/src/client_side.c

Log:
Issue 40 - Modify the zph logic slightly to allow the hit and cache peer  
zph codes to override zph_local.

The existing zph code would always use zph_local regardless of whether it  
was a hit or miss.

Include some documentation to better explain how the ZPH logic works



Modified: branches/LUSCA_HEAD/src/cf.data.pre
==============================================================================
--- branches/LUSCA_HEAD/src/cf.data.pre (original)
+++ branches/LUSCA_HEAD/src/cf.data.pre Thu Jul  9 03:21:46 2009
@@ -1421,7 +1421,18 @@
            option      Embed the mark in an IP option field. See also
                        zph_option.

-       See also tcp_outgoing_tos for details/requirements about TOS usage.
+       * See also tcp_outgoing_tos for details/requirements about TOS usage.
+
+       The ZPH tos values can be uniquely defined dependant on the type of HIT
+       registered by the cache.
+
+       If a HIT is registered from a sibling or parent and the respective  
zph_sibling
+       or zph_parent marks are set those tos/priority marks will be used. If  
those
+       marks are NOT set the marking for zph_local will be used.
+
+       Using this approach ZPH can be used for simply marking ANY hit with a  
fixed
+       TOS/Priority (using only zph_local) or marking with a TOS/Priority 
based  
on
+       the type of hit.
  DOC_END

  NAME: zph_local

Modified: branches/LUSCA_HEAD/src/client_side.c
==============================================================================
--- branches/LUSCA_HEAD/src/client_side.c       (original)
+++ branches/LUSCA_HEAD/src/client_side.c       Thu Jul  9 03:21:46 2009
@@ -2899,12 +2899,12 @@

        if (!isTcpHit(http->log_type))
            tos = 0;
-       else if (Config.zph_local)
-           tos = Config.zph_local;
        else if (Config.zph_sibling && http->request->hier.code == SIBLING_HIT) 
         
/* sibling hit */
            tos = Config.zph_sibling;
        else if (Config.zph_parent && http->request->hier.code == PARENT_HIT)   
/*  
parent hit */
            tos = Config.zph_parent;
+       else if (Config.zph_local)
+           tos = Config.zph_local;
        if (conn->tos_priority != tos) {
            conn->tos_priority = tos;
            switch (Config.zph_mode) {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to