]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/msg_types: add TYPE_MSGR2
authorSage Weil <sage@redhat.com>
Sat, 18 Jun 2016 16:45:14 +0000 (12:45 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 20:40:11 +0000 (16:40 -0400)
Unused so far.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/msg_types.cc
src/msg/msg_types.h

index f8e6a562fe496717d0fe7f0ea90ca7e83cc79853..6a9ffa285d102715444f7f5e352d5e3a7f9f7dd7 100644 (file)
@@ -70,6 +70,9 @@ bool entity_addr_t::parse(const char *s, const char **end)
   if (strncmp("legacy:", s, 7) == 0) {
     start += 7;
     newtype = TYPE_LEGACY;
+  } else if (strncmp("msgr2:", s, 6) == 0) {
+    start += 6;
+    newtype = TYPE_MSGR2;
   } else if (*s == '-') {
     *this = entity_addr_t();
     *end = s + 1;
index df1499b5704b6eb8ed34a7cefd541ba0e33dd3ec..c36fc978bf1e7924ef491ab193421f15af1f793a 100644 (file)
@@ -208,12 +208,14 @@ struct entity_addr_t {
   typedef enum {
     TYPE_NONE = 0,
     TYPE_LEGACY = 1,  ///< legacy msgr1 protocol (ceph jewel and older)
+    TYPE_MSGR2 = 2,   ///< msgr2 protocol (new in ceph kraken)
   } type_t;
   static const type_t TYPE_DEFAULT = TYPE_LEGACY;
   static const char *get_type_name(int t) {
     switch (t) {
     case TYPE_NONE: return "none";
     case TYPE_LEGACY: return "legacy";
+    case TYPE_MSGR2: return "msgr2";
     default: return "???";
     }
   };