summaryrefslogtreecommitdiff
path: root/src/dev/net/dist_etherlink.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-03-06 17:29:43 -0800
committerGabe Black <gabeblack@google.com>2019-03-15 18:12:58 +0000
commitf5ba0d66459c1c035d4613376d1d39af08e483de (patch)
tree2deb1b27c75279df5467d6035d27a0007380d01f /src/dev/net/dist_etherlink.hh
parent94a00fb6d9270990cd04ae293556297a3c2f2563 (diff)
downloadgem5-f5ba0d66459c1c035d4613376d1d39af08e483de.tar.xz
dev: Turn EtherObject into an interface class.
This class used to drive from SimObject so that it could be derived from to get both the interface and SimObject while still using single inheritance. With this change, EtherObject is now just an interface class with only one pure virtual function which can be inherited alongside SimObject. This makes it more flexible so that it can be used in places where you might want a different inheritance hierarchy, for instance to inherit from MemObject. Change-Id: I0f07664d104eed012cf4ce6e30c416ada19505a7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17028 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/net/dist_etherlink.hh')
-rw-r--r--src/dev/net/dist_etherlink.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dev/net/dist_etherlink.hh b/src/dev/net/dist_etherlink.hh
index 83f28f2b2..51852a519 100644
--- a/src/dev/net/dist_etherlink.hh
+++ b/src/dev/net/dist_etherlink.hh
@@ -53,6 +53,7 @@
#include <iostream>
#include "dev/net/etherlink.hh"
+#include "dev/net/etherobject.hh"
#include "params/DistEtherLink.hh"
class DistIface;
@@ -61,7 +62,7 @@ class EthPacketData;
/**
* Model for a fixed bandwidth full duplex ethernet link.
*/
-class DistEtherLink : public EtherObject
+class DistEtherLink : public SimObject, public EtherObject
{
protected:
class LocalIface;
@@ -223,8 +224,7 @@ class DistEtherLink : public EtherObject
return dynamic_cast<const Params *>(_params);
}
- virtual EtherInt *getEthPort(const std::string &if_name,
- int idx) override;
+ EtherInt *getEthPort(const std::string &if_name, int idx) override;
virtual void init() override;
virtual void startup() override;