From d8fe334d5b92ef50e44c75ac19d8dced53efc476 Mon Sep 17 00:00:00 2001
From: David Garcia Quintas <dgq@google.com>
Date: Sat, 15 Oct 2016 15:25:51 -0700
Subject: [PATCH] s/lb-cost/lb-cost-bin

---
 src/core/ext/load_reporting/load_reporting.h | 2 +-
 src/core/lib/transport/static_metadata.c     | 2 +-
 src/core/lib/transport/static_metadata.h     | 8 ++++----
 test/core/end2end/fuzzers/hpack.dictionary   | 4 ++--
 tools/codegen/core/gen_static_metadata.py    | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h
index e13097654d..a157844734 100644
--- a/src/core/ext/load_reporting/load_reporting.h
+++ b/src/core/ext/load_reporting/load_reporting.h
@@ -51,7 +51,7 @@
  * The value corresponding to this key is an opaque binary blob reported by the
  * backend as part of its trailing metadata containing cost information for the
  * call. */
-#define GRPC_LB_COST_MD_KEY "lb-cost"
+#define GRPC_LB_COST_MD_KEY "lb-cost-bin"
 
 /** Identifiers for the invocation point of the users LR callback */
 typedef enum grpc_load_reporting_source {
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c
index f019ef156a..8b22592b45 100644
--- a/src/core/lib/transport/static_metadata.c
+++ b/src/core/lib/transport/static_metadata.c
@@ -126,7 +126,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
     "if-range",
     "if-unmodified-since",
     "last-modified",
-    "lb-cost",
+    "lb-cost-bin",
     "lb-token",
     "link",
     "location",
diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h
index e0a8196419..28ad6f2961 100644
--- a/src/core/lib/transport/static_metadata.h
+++ b/src/core/lib/transport/static_metadata.h
@@ -175,8 +175,8 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
 #define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[62])
 /* "last-modified" */
 #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[63])
-/* "lb-cost" */
-#define GRPC_MDSTR_LB_COST (&grpc_static_mdstr_table[64])
+/* "lb-cost-bin" */
+#define GRPC_MDSTR_LB_COST_BIN (&grpc_static_mdstr_table[64])
 /* "lb-token" */
 #define GRPC_MDSTR_LB_TOKEN (&grpc_static_mdstr_table[65])
 /* "link" */
@@ -337,8 +337,8 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];
 #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY (&grpc_static_mdelem_table[44])
 /* "last-modified": "" */
 #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45])
-/* "lb-cost": "" */
-#define GRPC_MDELEM_LB_COST_EMPTY (&grpc_static_mdelem_table[46])
+/* "lb-cost-bin": "" */
+#define GRPC_MDELEM_LB_COST_BIN_EMPTY (&grpc_static_mdelem_table[46])
 /* "lb-token": "" */
 #define GRPC_MDELEM_LB_TOKEN_EMPTY (&grpc_static_mdelem_table[47])
 /* "link": "" */
diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary
index 181bbe845e..12db0ff024 100644
--- a/test/core/end2end/fuzzers/hpack.dictionary
+++ b/test/core/end2end/fuzzers/hpack.dictionary
@@ -63,7 +63,7 @@
 "\x08if-range"
 "\x13if-unmodified-since"
 "\x0Dlast-modified"
-"\x07lb-cost"
+"\x0Blb-cost-bin"
 "\x08lb-token"
 "\x04link"
 "\x08location"
@@ -138,7 +138,7 @@
 "\x00\x08if-range\x00"
 "\x00\x13if-unmodified-since\x00"
 "\x00\x0Dlast-modified\x00"
-"\x00\x07lb-cost\x00"
+"\x00\x0Blb-cost-bin\x00"
 "\x00\x08lb-token\x00"
 "\x00\x04link\x00"
 "\x00\x08location\x00"
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index 6f8cad279c..cf3762dbb8 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -110,7 +110,7 @@ CONFIG = [
     ('if-unmodified-since', ''),
     ('last-modified', ''),
     ('lb-token', ''),
-    ('lb-cost', ''),
+    ('lb-cost-bin', ''),
     ('link', ''),
     ('location', ''),
     ('max-forwards', ''),
-- 
GitLab