]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/Connection: add get_con_mode()
authorSage Weil <sage@redhat.com>
Sun, 17 Feb 2019 15:41:56 +0000 (09:41 -0600)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 21 Feb 2019 22:31:01 +0000 (23:31 +0100)
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/Connection.h
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncConnection.h
src/msg/async/Protocol.h

index 20148749c8c2004b23aa027bbaff9e2d43f629bb..c245180ceee9b4f4b00906547ee98cedb6ce5e5d 100644 (file)
@@ -209,6 +209,10 @@ public:
   void set_features(uint64_t f) { features = f; }
   void set_feature(uint64_t f) { features |= f; }
 
+  virtual int get_con_mode() const {
+    return CEPH_CON_MODE_CRC;
+  }
+
   void post_rx_buffer(ceph_tid_t tid, bufferlist& bl) {
     Mutex::Locker l(lock);
     ++rx_buffers_version;
index 18a9c00c4d15c69d7e8bae506f10ff40d7c37612..b4763f138c7f01c49911638802b3f69596c5f2b6 100644 (file)
@@ -150,6 +150,10 @@ AsyncConnection::~AsyncConnection()
   ceph_assert(!delay_state);
 }
 
+int AsyncConnection::get_con_mode() const {
+  return protocol->get_con_mode();
+}
+
 void AsyncConnection::maybe_start_delay_thread()
 {
   if (!delay_state) {
index 4b089fa02d5834a12be0ee6ef47a3c011f4056ad..7b5f080bc326c457928cffa7b9acf4f518cd13e9 100644 (file)
@@ -136,6 +136,8 @@ class AsyncConnection : public Connection {
     return target_addr;
   }
 
+  int get_con_mode() const override;
+
  private:
   enum {
     STATE_NONE,
index 981722f6627cd87e7fd4a722afdae14d77cdc70a..e971448532e127947039b82800031ec732d44045 100644 (file)
@@ -104,6 +104,10 @@ public:
   virtual void read_event() = 0;
   virtual void write_event() = 0;
   virtual bool is_queued() = 0;
+
+  int get_con_mode() const {
+    return auth_meta->con_mode;
+  }
 };
 
 #endif /* _MSG_ASYNC_PROTOCOL_ */