X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Fmessenger%2Fxio_dispatcher.cc;fp=src%2Fceph%2Fsrc%2Ftest%2Fmessenger%2Fxio_dispatcher.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=b682609fb0f78089bca87e0225dfef7d9f9652f1;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/test/messenger/xio_dispatcher.cc b/src/ceph/src/test/messenger/xio_dispatcher.cc deleted file mode 100644 index b682609..0000000 --- a/src/ceph/src/test/messenger/xio_dispatcher.cc +++ /dev/null @@ -1,76 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2013 CohortFS, LLC - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#include "xio_dispatcher.h" -#include "messages/MPing.h" -#include "messages/MDataPing.h" - -XioDispatcher::XioDispatcher(Messenger *msgr) : - Dispatcher(msgr->cct), - active(false), - messenger(msgr), - dcount(0) -{ - // nothing -} - -XioDispatcher::~XioDispatcher() { - // nothing -} - -bool XioDispatcher::ms_dispatch(Message *m) -{ - ConnectionRef conn; - uint64_t dc = 0; - - dc = dcount++; - - switch (m->get_type()) { - case CEPH_MSG_PING: - break; - case MSG_DATA_PING: - { - MDataPing* mdp __attribute__((unused)) = static_cast(m); - //cout << "MDataPing " << mdp->tag << " " << mdp->counter << std::endl; - //mdp->get_data().hexdump(cout); - } - break; - default: - abort(); - } - - if (unlikely(m->get_magic() & MSG_MAGIC_TRACE_CTR)) { - if (unlikely(dc % 65536) == 0) { - struct timespec ts; - clock_gettime(CLOCK_REALTIME_COARSE, &ts); - std::cout << "ping " << dc << " nanos: " << - ts.tv_nsec + (ts.tv_sec * 1000000000) << std::endl; - } - } /* trace ctr */ - - m->put(); - - return true; -} - -bool XioDispatcher::ms_handle_reset(Connection *con) -{ - return true; -} - -void XioDispatcher::ms_handle_remote_reset(Connection *con) -{ - // nothing -} -