]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: add keepalive timestamps to connection
authorYingxin Cheng <yingxincheng@gmail.com>
Tue, 19 Mar 2019 14:06:34 +0000 (22:06 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 5 Apr 2019 03:21:19 +0000 (11:21 +0800)
Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
src/crimson/net/Connection.h

index e644447297c2922090c7e18df648b512d2438092..bc5e3f295c385bbcc88df5f9d072aa776b55c156 100644 (file)
@@ -29,6 +29,7 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
   entity_addr_t peer_addr;
   peer_type_t peer_type = -1;
   int64_t peer_id = -1;
+  utime_t last_keepalive, last_keepalive_ack;
 
  public:
   uint64_t peer_global_id = 0;
@@ -58,6 +59,9 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
   virtual seastar::shard_id shard_id() const = 0;
 
   virtual void print(ostream& out) const = 0;
+
+  utime_t get_last_keepalive() const { return last_keepalive; }
+  utime_t get_last_keepalive_ack() const { return last_keepalive_ack; }
 };
 
 inline ostream& operator<<(ostream& out, const Connection& conn) {