summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2015-12-10 10:35:18 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2015-12-10 10:35:18 +0000
commit23c961a0fd97251ee7c760bc2ff2a011a417ad9b (patch)
tree0481b7552303373cd3722156b1cef92d813de215 /src
parentef097ac4381ad2f14acda640ae198f04d9f7988d (diff)
downloadgem5-23c961a0fd97251ee7c760bc2ff2a011a417ad9b.tar.xz
dev: Move network devices to src/dev/net/
--HG-- rename : src/dev/Ethernet.py => src/dev/net/Ethernet.py rename : src/dev/etherbus.cc => src/dev/net/etherbus.cc rename : src/dev/etherbus.hh => src/dev/net/etherbus.hh rename : src/dev/etherdevice.cc => src/dev/net/etherdevice.cc rename : src/dev/etherdevice.hh => src/dev/net/etherdevice.hh rename : src/dev/etherdump.cc => src/dev/net/etherdump.cc rename : src/dev/etherdump.hh => src/dev/net/etherdump.hh rename : src/dev/etherint.cc => src/dev/net/etherint.cc rename : src/dev/etherint.hh => src/dev/net/etherint.hh rename : src/dev/etherlink.cc => src/dev/net/etherlink.cc rename : src/dev/etherlink.hh => src/dev/net/etherlink.hh rename : src/dev/etherobject.hh => src/dev/net/etherobject.hh rename : src/dev/etherpkt.cc => src/dev/net/etherpkt.cc rename : src/dev/etherpkt.hh => src/dev/net/etherpkt.hh rename : src/dev/ethertap.cc => src/dev/net/ethertap.cc rename : src/dev/ethertap.hh => src/dev/net/ethertap.hh rename : src/dev/i8254xGBe.cc => src/dev/net/i8254xGBe.cc rename : src/dev/i8254xGBe.hh => src/dev/net/i8254xGBe.hh rename : src/dev/i8254xGBe_defs.hh => src/dev/net/i8254xGBe_defs.hh rename : src/dev/multi_etherlink.cc => src/dev/net/multi_etherlink.cc rename : src/dev/multi_etherlink.hh => src/dev/net/multi_etherlink.hh rename : src/dev/multi_iface.cc => src/dev/net/multi_iface.cc rename : src/dev/multi_iface.hh => src/dev/net/multi_iface.hh rename : src/dev/multi_packet.cc => src/dev/net/multi_packet.cc rename : src/dev/multi_packet.hh => src/dev/net/multi_packet.hh rename : src/dev/ns_gige.cc => src/dev/net/ns_gige.cc rename : src/dev/ns_gige.hh => src/dev/net/ns_gige.hh rename : src/dev/ns_gige_reg.h => src/dev/net/ns_gige_reg.h rename : src/dev/pktfifo.cc => src/dev/net/pktfifo.cc rename : src/dev/pktfifo.hh => src/dev/net/pktfifo.hh rename : src/dev/sinic.cc => src/dev/net/sinic.cc rename : src/dev/sinic.hh => src/dev/net/sinic.hh rename : src/dev/sinicreg.hh => src/dev/net/sinicreg.hh rename : src/dev/tcp_iface.cc => src/dev/net/tcp_iface.cc rename : src/dev/tcp_iface.hh => src/dev/net/tcp_iface.hh
Diffstat (limited to 'src')
-rw-r--r--src/base/inet.hh2
-rw-r--r--src/dev/SConscript32
-rw-r--r--src/dev/net/Ethernet.py (renamed from src/dev/Ethernet.py)22
-rw-r--r--src/dev/net/SConscript94
-rw-r--r--src/dev/net/etherbus.cc (renamed from src/dev/etherbus.cc)8
-rw-r--r--src/dev/net/etherbus.hh (renamed from src/dev/etherbus.hh)10
-rw-r--r--src/dev/net/etherdevice.cc (renamed from src/dev/etherdevice.cc)3
-rw-r--r--src/dev/net/etherdevice.hh (renamed from src/dev/etherdevice.hh)9
-rw-r--r--src/dev/net/etherdump.cc (renamed from src/dev/etherdump.cc)2
-rw-r--r--src/dev/net/etherdump.hh (renamed from src/dev/etherdump.hh)8
-rw-r--r--src/dev/net/etherint.cc (renamed from src/dev/etherint.cc)3
-rw-r--r--src/dev/net/etherint.hh (renamed from src/dev/etherint.hh)8
-rw-r--r--src/dev/net/etherlink.cc (renamed from src/dev/etherlink.cc)9
-rw-r--r--src/dev/net/etherlink.hh (renamed from src/dev/etherlink.hh)12
-rw-r--r--src/dev/net/etherobject.hh (renamed from src/dev/etherobject.hh)6
-rw-r--r--src/dev/net/etherpkt.cc (renamed from src/dev/etherpkt.cc)5
-rw-r--r--src/dev/net/etherpkt.hh (renamed from src/dev/etherpkt.hh)6
-rw-r--r--src/dev/net/ethertap.cc (renamed from src/dev/ethertap.cc)10
-rw-r--r--src/dev/net/ethertap.hh (renamed from src/dev/ethertap.hh)12
-rw-r--r--src/dev/net/i8254xGBe.cc (renamed from src/dev/i8254xGBe.cc)2
-rw-r--r--src/dev/net/i8254xGBe.hh (renamed from src/dev/i8254xGBe.hh)16
-rw-r--r--src/dev/net/i8254xGBe_defs.hh (renamed from src/dev/i8254xGBe_defs.hh)0
-rw-r--r--src/dev/net/multi_etherlink.cc (renamed from src/dev/multi_etherlink.cc)16
-rw-r--r--src/dev/net/multi_etherlink.hh (renamed from src/dev/multi_etherlink.hh)8
-rw-r--r--src/dev/net/multi_iface.cc (renamed from src/dev/multi_iface.cc)4
-rw-r--r--src/dev/net/multi_iface.hh (renamed from src/dev/multi_iface.hh)10
-rw-r--r--src/dev/net/multi_packet.cc (renamed from src/dev/multi_packet.cc)2
-rw-r--r--src/dev/net/multi_packet.hh (renamed from src/dev/multi_packet.hh)6
-rw-r--r--src/dev/net/ns_gige.cc (renamed from src/dev/ns_gige.cc)6
-rw-r--r--src/dev/net/ns_gige.hh (renamed from src/dev/ns_gige.hh)16
-rw-r--r--src/dev/net/ns_gige_reg.h (renamed from src/dev/ns_gige_reg.h)0
-rw-r--r--src/dev/net/pktfifo.cc (renamed from src/dev/pktfifo.cc)3
-rw-r--r--src/dev/net/pktfifo.hh (renamed from src/dev/pktfifo.hh)9
-rw-r--r--src/dev/net/sinic.cc (renamed from src/dev/sinic.cc)6
-rw-r--r--src/dev/net/sinic.hh (renamed from src/dev/sinic.hh)16
-rw-r--r--src/dev/net/sinicreg.hh (renamed from src/dev/sinicreg.hh)6
-rw-r--r--src/dev/net/tcp_iface.cc (renamed from src/dev/tcp_iface.cc)2
-rw-r--r--src/dev/net/tcp_iface.hh (renamed from src/dev/tcp_iface.hh)8
-rw-r--r--src/python/swig/pyobject.cc4
-rw-r--r--src/python/swig/pyobject.hh2
40 files changed, 239 insertions, 164 deletions
diff --git a/src/base/inet.hh b/src/base/inet.hh
index 07bbdc3b4..d7e003970 100644
--- a/src/base/inet.hh
+++ b/src/base/inet.hh
@@ -53,7 +53,7 @@
#include <vector>
#include "base/types.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
#include "dnet/os.h"
#include "dnet/eth.h"
#include "dnet/ip.h"
diff --git a/src/dev/SConscript b/src/dev/SConscript
index 4bacb3e3f..85bf839ec 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -41,7 +41,6 @@ if env['TARGET_ISA'] == 'null':
SimObject('BadDevice.py')
SimObject('DiskImage.py')
-SimObject('Ethernet.py')
SimObject('Ide.py')
SimObject('Platform.py')
SimObject('SimpleDisk.py')
@@ -51,29 +50,14 @@ SimObject('Uart.py')
Source('baddev.cc')
Source('disk_image.cc')
Source('dma_device.cc')
-Source('etherbus.cc')
-Source('etherdevice.cc')
-Source('etherdump.cc')
-Source('etherint.cc')
-Source('etherlink.cc')
-Source('multi_packet.cc')
-Source('multi_iface.cc')
-Source('multi_etherlink.cc')
-Source('tcp_iface.cc')
-Source('etherpkt.cc')
-Source('ethertap.cc')
-Source('i8254xGBe.cc')
Source('ide_ctrl.cc')
Source('ide_disk.cc')
Source('intel_8254_timer.cc')
Source('mc146818.cc')
-Source('ns_gige.cc')
Source('pixelpump.cc')
-Source('pktfifo.cc')
Source('platform.cc')
Source('ps2.cc')
Source('simple_disk.cc')
-Source('sinic.cc')
Source('terminal.cc')
Source('uart.cc')
Source('uart8250.cc')
@@ -81,17 +65,6 @@ Source('uart8250.cc')
DebugFlag('DiskImageRead')
DebugFlag('DiskImageWrite')
DebugFlag('DMA')
-DebugFlag('Ethernet')
-DebugFlag('MultiEthernet')
-DebugFlag('MultiEthernetPkt')
-DebugFlag('EthernetCksum')
-DebugFlag('EthernetDMA')
-DebugFlag('EthernetData')
-DebugFlag('EthernetDesc')
-DebugFlag('EthernetEEPROM')
-DebugFlag('EthernetIntr')
-DebugFlag('EthernetPIO')
-DebugFlag('EthernetSM')
DebugFlag('IdeCtrl')
DebugFlag('IdeDisk')
DebugFlag('Intel8254Timer')
@@ -103,9 +76,4 @@ DebugFlag('TerminalVerbose')
DebugFlag('Uart')
CompoundFlag('DiskImageAll', [ 'DiskImageRead', 'DiskImageWrite' ])
-CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
- 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
- 'EthernetCksum', 'EthernetEEPROM' ])
-CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
- 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
CompoundFlag('IdeAll', [ 'IdeCtrl', 'IdeDisk' ])
diff --git a/src/dev/Ethernet.py b/src/dev/net/Ethernet.py
index 89d1bad89..9859857a0 100644
--- a/src/dev/Ethernet.py
+++ b/src/dev/net/Ethernet.py
@@ -46,11 +46,11 @@ from PciDevice import PciDevice
class EtherObject(SimObject):
type = 'EtherObject'
abstract = True
- cxx_header = "dev/etherobject.hh"
+ cxx_header = "dev/net/etherobject.hh"
class EtherLink(EtherObject):
type = 'EtherLink'
- cxx_header = "dev/etherlink.hh"
+ cxx_header = "dev/net/etherlink.hh"
int0 = SlavePort("interface 0")
int1 = SlavePort("interface 1")
delay = Param.Latency('0us', "packet transmit delay")
@@ -60,7 +60,7 @@ class EtherLink(EtherObject):
class MultiEtherLink(EtherObject):
type = 'MultiEtherLink'
- cxx_header = "dev/multi_etherlink.hh"
+ cxx_header = "dev/net/multi_etherlink.hh"
int0 = SlavePort("interface 0")
delay = Param.Latency('0us', "packet transmit delay")
delay_var = Param.Latency('0ns', "packet transmit delay variability")
@@ -74,34 +74,34 @@ class MultiEtherLink(EtherObject):
class EtherBus(EtherObject):
type = 'EtherBus'
- cxx_header = "dev/etherbus.hh"
+ cxx_header = "dev/net/etherbus.hh"
loopback = Param.Bool(True, "send packet back to the sending interface")
dump = Param.EtherDump(NULL, "dump object")
speed = Param.NetworkBandwidth('100Mbps', "bus speed in bits per second")
class EtherTap(EtherObject):
type = 'EtherTap'
- cxx_header = "dev/ethertap.hh"
+ cxx_header = "dev/net/ethertap.hh"
bufsz = Param.Int(10000, "tap buffer size")
dump = Param.EtherDump(NULL, "dump object")
port = Param.UInt16(3500, "tap port")
class EtherDump(SimObject):
type = 'EtherDump'
- cxx_header = "dev/etherdump.hh"
+ cxx_header = "dev/net/etherdump.hh"
file = Param.String("dump file")
maxlen = Param.Int(96, "max portion of packet data to dump")
class EtherDevice(PciDevice):
type = 'EtherDevice'
abstract = True
- cxx_header = "dev/etherdevice.hh"
+ cxx_header = "dev/net/etherdevice.hh"
interface = MasterPort("Ethernet Interface")
class IGbE(EtherDevice):
# Base class for two IGbE adapters listed above
type = 'IGbE'
- cxx_header = "dev/i8254xGBe.hh"
+ cxx_header = "dev/net/i8254xGBe.hh"
hardware_address = Param.EthernetAddr(NextEthernetAddr,
"Ethernet Hardware Address")
rx_fifo_size = Param.MemorySize('384kB', "Size of the rx FIFO")
@@ -154,7 +154,7 @@ class IGbE_igb(IGbE):
class EtherDevBase(EtherDevice):
type = 'EtherDevBase'
abstract = True
- cxx_header = "dev/etherdevice.hh"
+ cxx_header = "dev/net/etherdevice.hh"
hardware_address = Param.EthernetAddr(NextEthernetAddr,
"Ethernet Hardware Address")
@@ -177,7 +177,7 @@ class EtherDevBase(EtherDevice):
class NSGigE(EtherDevBase):
type = 'NSGigE'
- cxx_header = "dev/ns_gige.hh"
+ cxx_header = "dev/net/ns_gige.hh"
dma_data_free = Param.Bool(False, "DMA of Data is free")
dma_desc_free = Param.Bool(False, "DMA of Descriptors is free")
@@ -207,7 +207,7 @@ class NSGigE(EtherDevBase):
class Sinic(EtherDevBase):
type = 'Sinic'
cxx_class = 'Sinic::Device'
- cxx_header = "dev/sinic.hh"
+ cxx_header = "dev/net/sinic.hh"
rx_max_copy = Param.MemorySize('1514B', "rx max copy")
tx_max_copy = Param.MemorySize('16kB', "tx max copy")
diff --git a/src/dev/net/SConscript b/src/dev/net/SConscript
new file mode 100644
index 000000000..f529a1b2a
--- /dev/null
+++ b/src/dev/net/SConscript
@@ -0,0 +1,94 @@
+# -*- mode:python -*-
+
+# Copyright (c) 2015 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder. You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Copyright (c) 2006 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Steve Reinhardt
+# Gabe Black
+# Andreas Sandberg
+
+Import('*')
+
+if env['TARGET_ISA'] == 'null':
+ Return()
+
+SimObject('Ethernet.py')
+
+# Basic Ethernet infrastructure
+Source('etherbus.cc')
+Source('etherdevice.cc')
+Source('etherdump.cc')
+Source('etherint.cc')
+Source('etherlink.cc')
+Source('etherpkt.cc')
+Source('ethertap.cc')
+
+Source('pktfifo.cc')
+
+DebugFlag('Ethernet')
+DebugFlag('EthernetCksum')
+DebugFlag('EthernetDMA')
+DebugFlag('EthernetData')
+DebugFlag('EthernetDesc')
+DebugFlag('EthernetEEPROM')
+DebugFlag('EthernetIntr')
+DebugFlag('EthernetPIO')
+DebugFlag('EthernetSM')
+
+# Multi gem5
+Source('multi_packet.cc')
+Source('multi_iface.cc')
+Source('multi_etherlink.cc')
+Source('tcp_iface.cc')
+
+DebugFlag('MultiEthernet')
+DebugFlag('MultiEthernetPkt')
+
+# Ethernet controllers
+Source('i8254xGBe.cc')
+Source('ns_gige.cc')
+Source('sinic.cc')
+
+
+
+CompoundFlag('EthernetAll', [ 'Ethernet', 'EthernetPIO', 'EthernetDMA',
+ 'EthernetData' , 'EthernetDesc', 'EthernetIntr', 'EthernetSM',
+ 'EthernetCksum', 'EthernetEEPROM' ])
+
+CompoundFlag('EthernetNoData', [ 'Ethernet', 'EthernetPIO', 'EthernetDesc',
+ 'EthernetIntr', 'EthernetSM', 'EthernetCksum' ])
diff --git a/src/dev/etherbus.cc b/src/dev/net/etherbus.cc
index c9e9c93ba..ba5beab01 100644
--- a/src/dev/etherbus.cc
+++ b/src/dev/net/etherbus.cc
@@ -31,6 +31,7 @@
/* @file
* Device module for modelling an ethernet hub
*/
+#include "dev/net/etherbus.hh"
#include <cmath>
#include <deque>
@@ -40,10 +41,9 @@
#include "base/trace.hh"
#include "debug/Ethernet.hh"
#include "debug/EthernetData.hh"
-#include "dev/etherbus.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherBus.hh"
#include "sim/core.hh"
diff --git a/src/dev/etherbus.hh b/src/dev/net/etherbus.hh
index 43978b9c2..7395c28d8 100644
--- a/src/dev/etherbus.hh
+++ b/src/dev/net/etherbus.hh
@@ -32,11 +32,11 @@
* Device module for modelling an ethernet hub
*/
-#ifndef __ETHERBUS_H__
-#define __ETHERBUS_H__
+#ifndef __DEV_NET_ETHERBUS_HH__
+#define __DEV_NET_ETHERBUS_HH__
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherBus.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
@@ -87,4 +87,4 @@ class EtherBus : public EtherObject
virtual EtherInt *getEthPort(const std::string &if_name, int idx);
};
-#endif // __ETHERBUS_H__
+#endif // __DEV_NET_ETHERBUS_HH__
diff --git a/src/dev/etherdevice.cc b/src/dev/net/etherdevice.cc
index 59febcdc5..59849502c 100644
--- a/src/dev/etherdevice.cc
+++ b/src/dev/net/etherdevice.cc
@@ -29,7 +29,8 @@
* Lisa Hsu
*/
-#include "dev/etherdevice.hh"
+#include "dev/net/etherdevice.hh"
+
#include "sim/stats.hh"
void
diff --git a/src/dev/etherdevice.hh b/src/dev/net/etherdevice.hh
index 45df2a2df..d13a1c3c3 100644
--- a/src/dev/etherdevice.hh
+++ b/src/dev/net/etherdevice.hh
@@ -33,13 +33,13 @@
* Base Ethernet Device declaration.
*/
-#ifndef __DEV_ETHERDEVICE_HH__
-#define __DEV_ETHERDEVICE_HH__
+#ifndef __DEV_NET_ETHERDEVICE_HH__
+#define __DEV_NET_ETHERDEVICE_HH__
#include "base/statistics.hh"
#include "dev/pci/device.hh"
-#include "params/EtherDevice.hh"
#include "params/EtherDevBase.hh"
+#include "params/EtherDevice.hh"
#include "sim/sim_object.hh"
class EtherInt;
@@ -148,4 +148,5 @@ class EtherDevBase : public EtherDevice
};
-#endif //__DEV_ETHERDEVICE_HH__
+#endif // __DEV_NET_ETHERDEVICE_HH__
+
diff --git a/src/dev/etherdump.cc b/src/dev/net/etherdump.cc
index 21532bd59..c537fbf57 100644
--- a/src/dev/etherdump.cc
+++ b/src/dev/net/etherdump.cc
@@ -31,6 +31,7 @@
/* @file
* Simple object for creating a simple pcap style packet trace
*/
+#include "dev/net/etherdump.hh"
#include <sys/time.h>
@@ -39,7 +40,6 @@
#include "base/misc.hh"
#include "base/output.hh"
-#include "dev/etherdump.hh"
#include "sim/core.hh"
using std::string;
diff --git a/src/dev/etherdump.hh b/src/dev/net/etherdump.hh
index cc8fa9151..8e651baf3 100644
--- a/src/dev/etherdump.hh
+++ b/src/dev/net/etherdump.hh
@@ -32,12 +32,12 @@
* Simple object for creating a simple pcap style packet trace
*/
-#ifndef __ETHERDUMP_H__
-#define __ETHERDUMP_H__
+#ifndef __DEV_NET_ETHERDUMP_HH__
+#define __DEV_NET_ETHERDUMP_HH__
#include <fstream>
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherDump.hh"
#include "sim/sim_object.hh"
@@ -59,4 +59,4 @@ class EtherDump : public SimObject
inline void dump(EthPacketPtr &pkt) { dumpPacket(pkt); }
};
-#endif // __ETHERDUMP_H__
+#endif // __DEV_NET_ETHERDUMP_HH__
diff --git a/src/dev/etherint.cc b/src/dev/net/etherint.cc
index fce7b28c6..b5990c7a0 100644
--- a/src/dev/etherint.cc
+++ b/src/dev/net/etherint.cc
@@ -28,8 +28,9 @@
* Authors: Nathan Binkert
*/
+#include "dev/net/etherint.hh"
+
#include "base/misc.hh"
-#include "dev/etherint.hh"
#include "sim/sim_object.hh"
void
diff --git a/src/dev/etherint.hh b/src/dev/net/etherint.hh
index 98b820dbf..a11d02681 100644
--- a/src/dev/etherint.hh
+++ b/src/dev/net/etherint.hh
@@ -33,12 +33,12 @@
* components.
*/
-#ifndef __DEV_ETHERINT_HH__
-#define __DEV_ETHERINT_HH__
+#ifndef __DEV_NET_ETHERINT_HH__
+#define __DEV_NET_ETHERINT_HH__
#include <string>
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
/*
* Class representing the actual interface between two ethernet
@@ -73,4 +73,4 @@ class EtherInt
virtual bool isBusy() { return false; }
};
-#endif // __DEV_ETHERINT_HH__
+#endif // __DEV_NET_ETHERINT_HH__
diff --git a/src/dev/etherlink.cc b/src/dev/net/etherlink.cc
index 1c88a31dd..c327a0168 100644
--- a/src/dev/etherlink.cc
+++ b/src/dev/net/etherlink.cc
@@ -45,6 +45,8 @@
* Device module for modelling a fixed bandwidth full duplex ethernet link
*/
+#include "dev/net/etherlink.hh"
+
#include <cmath>
#include <deque>
#include <string>
@@ -54,10 +56,9 @@
#include "base/trace.hh"
#include "debug/Ethernet.hh"
#include "debug/EthernetData.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherlink.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherLink.hh"
#include "sim/core.hh"
#include "sim/serialize.hh"
diff --git a/src/dev/etherlink.hh b/src/dev/net/etherlink.hh
index 9d2a5fdf2..1d02dec3b 100644
--- a/src/dev/etherlink.hh
+++ b/src/dev/net/etherlink.hh
@@ -44,15 +44,15 @@
* Device module for modelling a fixed bandwidth full duplex ethernet link
*/
-#ifndef __DEV_ETHERLINK_HH__
-#define __DEV_ETHERLINK_HH__
+#ifndef __DEV_NET_ETHERLINK_HH__
+#define __DEV_NET_ETHERLINK_HH__
#include <queue>
#include "base/types.hh"
-#include "dev/etherint.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherLink.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
@@ -163,4 +163,4 @@ class EtherLink : public EtherObject
};
-#endif // __ETHERLINK_HH__
+#endif // __DEV_NET_ETHERLINK_HH__
diff --git a/src/dev/etherobject.hh b/src/dev/net/etherobject.hh
index 02a30abac..55cfa97e6 100644
--- a/src/dev/etherobject.hh
+++ b/src/dev/net/etherobject.hh
@@ -33,8 +33,8 @@
* Base Ethernet Object declaration.
*/
-#ifndef __DEV_ETHEROBJECT_HH__
-#define __DEV_ETHEROBJECT_HH__
+#ifndef __DEV_NET_ETHEROBJECT_HH__
+#define __DEV_NET_ETHEROBJECT_HH__
#include "params/EtherObject.hh"
#include "sim/sim_object.hh"
@@ -64,4 +64,4 @@ class EtherObject : public SimObject
};
-#endif //__MEM_MEM_OBJECT_HH__
+#endif // __DEV_NET_ETHEROBJECT_HH__
diff --git a/src/dev/etherpkt.cc b/src/dev/net/etherpkt.cc
index 58b53b5e6..a16f572c5 100644
--- a/src/dev/etherpkt.cc
+++ b/src/dev/net/etherpkt.cc
@@ -28,11 +28,12 @@
* Authors: Nathan Binkert
*/
+#include "dev/net/etherpkt.hh"
+
#include <iostream>
-#include "base/misc.hh"
#include "base/inet.hh"
-#include "dev/etherpkt.hh"
+#include "base/misc.hh"
#include "sim/serialize.hh"
using namespace std;
diff --git a/src/dev/etherpkt.hh b/src/dev/net/etherpkt.hh
index 0d8998b1d..4119578c3 100644
--- a/src/dev/etherpkt.hh
+++ b/src/dev/net/etherpkt.hh
@@ -33,8 +33,8 @@
* Reference counted class containing ethernet packet data
*/
-#ifndef __ETHERPKT_HH__
-#define __ETHERPKT_HH__
+#ifndef __DEV_NET_ETHERPKT_HH__
+#define __DEV_NET_ETHERPKT_HH__
#include <cassert>
#include <iosfwd>
@@ -92,4 +92,4 @@ class EthPacketData
typedef std::shared_ptr<EthPacketData> EthPacketPtr;
-#endif // __ETHERPKT_HH__
+#endif // __DEV_NET_ETHERPKT_HH__
diff --git a/src/dev/ethertap.cc b/src/dev/net/ethertap.cc
index d062b5d8a..e8d6a363c 100644
--- a/src/dev/ethertap.cc
+++ b/src/dev/net/ethertap.cc
@@ -32,8 +32,11 @@
* Interface to connect a simulated ethernet device to the real world
*/
+#include "dev/net/ethertap.hh"
+
#if defined(__OpenBSD__) || defined(__APPLE__)
#include <sys/param.h>
+
#endif
#include <netinet/in.h>
#include <unistd.h>
@@ -47,10 +50,9 @@
#include "base/trace.hh"
#include "debug/Ethernet.hh"
#include "debug/EthernetData.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
-#include "dev/ethertap.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
using namespace std;
diff --git a/src/dev/ethertap.hh b/src/dev/net/ethertap.hh
index 5755032a9..b27b80f84 100644
--- a/src/dev/ethertap.hh
+++ b/src/dev/net/ethertap.hh
@@ -32,16 +32,16 @@
* Interface to connect a simulated ethernet device to the real world
*/
-#ifndef __ETHERTAP_HH__
-#define __ETHERTAP_HH__
+#ifndef __DEV_NET_ETHERTAP_HH__
+#define __DEV_NET_ETHERTAP_HH__
#include <queue>
#include <string>
#include "base/pollevent.hh"
-#include "dev/etherint.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
#include "params/EtherTap.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
@@ -133,4 +133,4 @@ class EtherTapInt : public EtherInt
};
-#endif // __ETHERTAP_HH__
+#endif // __DEV_NET_ETHERTAP_HH__
diff --git a/src/dev/i8254xGBe.cc b/src/dev/net/i8254xGBe.cc
index 50126e62a..cba773f39 100644
--- a/src/dev/i8254xGBe.cc
+++ b/src/dev/net/i8254xGBe.cc
@@ -35,6 +35,7 @@
* other MACs with slight modifications.
*/
+#include "dev/net/i8254xGBe.hh"
/*
* @todo really there are multiple dma engines.. we should implement them.
@@ -47,7 +48,6 @@
#include "base/trace.hh"
#include "debug/Drain.hh"
#include "debug/EthernetAll.hh"
-#include "dev/i8254xGBe.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "params/IGbE.hh"
diff --git a/src/dev/i8254xGBe.hh b/src/dev/net/i8254xGBe.hh
index 700f49fbf..e35744459 100644
--- a/src/dev/i8254xGBe.hh
+++ b/src/dev/net/i8254xGBe.hh
@@ -32,8 +32,8 @@
* Device model for Intel's 8254x line of gigabit ethernet controllers.
*/
-#ifndef __DEV_I8254XGBE_HH__
-#define __DEV_I8254XGBE_HH__
+#ifndef __DEV_NET_I8254XGBE_HH__
+#define __DEV_NET_I8254XGBE_HH__
#include <deque>
#include <string>
@@ -42,12 +42,12 @@
#include "base/inet.hh"
#include "debug/EthernetDesc.hh"
#include "debug/EthernetIntr.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
-#include "dev/i8254xGBe_defs.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/i8254xGBe_defs.hh"
+#include "dev/net/pktfifo.hh"
#include "dev/pci/device.hh"
-#include "dev/pktfifo.hh"
#include "params/IGbE.hh"
#include "sim/eventq.hh"
@@ -557,4 +557,4 @@ class IGbEInt : public EtherInt
virtual void sendDone() { dev->ethTxDone(); }
};
-#endif //__DEV_I8254XGBE_HH__
+#endif //__DEV_NET_I8254XGBE_HH__
diff --git a/src/dev/i8254xGBe_defs.hh b/src/dev/net/i8254xGBe_defs.hh
index 79a9413da..79a9413da 100644
--- a/src/dev/i8254xGBe_defs.hh
+++ b/src/dev/net/i8254xGBe_defs.hh
diff --git a/src/dev/multi_etherlink.cc b/src/dev/net/multi_etherlink.cc
index b7d411ac3..cf4300ddf 100644
--- a/src/dev/multi_etherlink.cc
+++ b/src/dev/net/multi_etherlink.cc
@@ -41,7 +41,7 @@
* Device module for a full duplex ethernet link for multi gem5 simulations.
*/
-#include "dev/multi_etherlink.hh"
+#include "dev/net/multi_etherlink.hh"
#include <arpa/inet.h>
#include <sys/socket.h>
@@ -57,13 +57,13 @@
#include "debug/EthernetData.hh"
#include "debug/MultiEthernet.hh"
#include "debug/MultiEthernetPkt.hh"
-#include "dev/etherdump.hh"
-#include "dev/etherint.hh"
-#include "dev/etherlink.hh"
-#include "dev/etherobject.hh"
-#include "dev/etherpkt.hh"
-#include "dev/multi_iface.hh"
-#include "dev/tcp_iface.hh"
+#include "dev/net/etherdump.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherlink.hh"
+#include "dev/net/etherobject.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/multi_iface.hh"
+#include "dev/net/tcp_iface.hh"
#include "params/EtherLink.hh"
#include "sim/core.hh"
#include "sim/serialize.hh"
diff --git a/src/dev/multi_etherlink.hh b/src/dev/net/multi_etherlink.hh
index 68e96f862..0a3e39bd7 100644
--- a/src/dev/multi_etherlink.hh
+++ b/src/dev/net/multi_etherlink.hh
@@ -47,12 +47,12 @@
* multi gem5 runs.
*
*/
-#ifndef __DEV_MULTIETHERLINK_HH__
-#define __DEV_MULTIETHERLINK_HH__
+#ifndef __DEV_NET_MULTIETHERLINK_HH__
+#define __DEV_NET_MULTIETHERLINK_HH__
#include <iostream>
-#include "dev/etherlink.hh"
+#include "dev/net/etherlink.hh"
#include "params/MultiEtherLink.hh"
class MultiIface;
@@ -232,4 +232,4 @@ class MultiEtherLink : public EtherObject
void unserialize(CheckpointIn &cp) override;
};
-#endif // __DEV_MULTIETHERLINK_HH__
+#endif // __DEV_NET_MULTIETHERLINK_HH__
diff --git a/src/dev/multi_iface.cc b/src/dev/net/multi_iface.cc
index c924c1a17..15f69f2ac 100644
--- a/src/dev/multi_iface.cc
+++ b/src/dev/net/multi_iface.cc
@@ -41,7 +41,7 @@
* The interface class for multi gem5 simulations.
*/
-#include "dev/multi_iface.hh"
+#include "dev/net/multi_iface.hh"
#include <queue>
#include <thread>
@@ -50,7 +50,7 @@
#include "base/trace.hh"
#include "debug/MultiEthernet.hh"
#include "debug/MultiEthernetPkt.hh"
-#include "dev/etherpkt.hh"
+#include "dev/net/etherpkt.hh"
#include "sim/sim_exit.hh"
#include "sim/sim_object.hh"
diff --git a/src/dev/multi_iface.hh b/src/dev/net/multi_iface.hh
index 5c7834d51..f8ce2abf7 100644
--- a/src/dev/multi_iface.hh
+++ b/src/dev/net/multi_iface.hh
@@ -75,8 +75,8 @@
* send/receive service implementations (e.g. TCP/IP, MPI,...). A TCP
* stream socket version is implemented in dev/src/tcp_iface.[hh,cc].
*/
-#ifndef __DEV_MULTI_IFACE_HH__
-#define __DEV_MULTI_IFACE_HH__
+#ifndef __DEV_NET_MULTI_IFACE_HH__
+#define __DEV_NET_MULTI_IFACE_HH__
#include <array>
#include <mutex>
@@ -84,8 +84,8 @@
#include <thread>
#include <utility>
-#include "dev/etherpkt.hh"
-#include "dev/multi_packet.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/multi_packet.hh"
#include "sim/core.hh"
#include "sim/drain.hh"
#include "sim/global_event.hh"
@@ -489,4 +489,4 @@ class MultiIface : public Drainable
};
-#endif
+#endif // __DEV_NET_MULTI_IFACE_HH__
diff --git a/src/dev/multi_packet.cc b/src/dev/net/multi_packet.cc
index 1fd0c0e81..85f76b0c4 100644
--- a/src/dev/multi_packet.cc
+++ b/src/dev/net/multi_packet.cc
@@ -42,7 +42,7 @@
*
*/
-#include "dev/multi_packet.hh"
+#include "dev/net/multi_packet.hh"
#include <cstdint>
#include <cstring>
diff --git a/src/dev/multi_packet.hh b/src/dev/net/multi_packet.hh
index 4b270645d..3d8e85dfa 100644
--- a/src/dev/multi_packet.hh
+++ b/src/dev/net/multi_packet.hh
@@ -50,8 +50,8 @@
* data packet description, the corresponding data packet always follows
* the header packet back-to-back.
*/
-#ifndef __DEV_MULTI_PACKET_HH__
-#define __DEV_MULTI_PACKET_HH__
+#ifndef __DEV_NET_MULTI_PACKET_HH__
+#define __DEV_NET_MULTI_PACKET_HH__
#include <cstring>
@@ -127,4 +127,4 @@ class MultiHeaderPkt
static bool isBroadcastAddress(const AddressType &addr);
};
-#endif
+#endif // __DEV_NET_MULTI_PACKET_HH__
diff --git a/src/dev/ns_gige.cc b/src/dev/net/ns_gige.cc
index eb4f0eb64..a1dc23b50 100644
--- a/src/dev/ns_gige.cc
+++ b/src/dev/net/ns_gige.cc
@@ -33,6 +33,9 @@
* Device module for modelling the National Semiconductor
* DP83820 ethernet controller. Does not support priority queueing
*/
+
+#include "dev/net/ns_gige.hh"
+
#include <deque>
#include <memory>
#include <string>
@@ -42,8 +45,7 @@
#include "base/types.hh"
#include "config/the_isa.hh"
#include "debug/EthernetAll.hh"
-#include "dev/etherlink.hh"
-#include "dev/ns_gige.hh"
+#include "dev/net/etherlink.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "params/NSGigE.hh"
diff --git a/src/dev/ns_gige.hh b/src/dev/net/ns_gige.hh
index 33a76ab62..096b2b69e 100644
--- a/src/dev/ns_gige.hh
+++ b/src/dev/net/ns_gige.hh
@@ -34,16 +34,16 @@
* DP83820 ethernet controller
*/
-#ifndef __DEV_NS_GIGE_HH__
-#define __DEV_NS_GIGE_HH__
+#ifndef __DEV_NET_NS_GIGE_HH__
+#define __DEV_NET_NS_GIGE_HH__
#include "base/inet.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
#include "dev/io_device.hh"
-#include "dev/ns_gige_reg.h"
-#include "dev/pktfifo.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/ns_gige_reg.h"
+#include "dev/net/pktfifo.hh"
#include "params/NSGigE.hh"
#include "sim/eventq.hh"
@@ -389,4 +389,4 @@ class NSGigEInt : public EtherInt
virtual void sendDone() { dev->transferDone(); }
};
-#endif // __DEV_NS_GIGE_HH__
+#endif // __DEV_NET_NS_GIGE_HH__
diff --git a/src/dev/ns_gige_reg.h b/src/dev/net/ns_gige_reg.h
index c37c06aed..c37c06aed 100644
--- a/src/dev/ns_gige_reg.h
+++ b/src/dev/net/ns_gige_reg.h
diff --git a/src/dev/pktfifo.cc b/src/dev/net/pktfifo.cc
index fb2564b71..af4dbf412 100644
--- a/src/dev/pktfifo.cc
+++ b/src/dev/net/pktfifo.cc
@@ -28,8 +28,9 @@
* Authors: Nathan Binkert
*/
+#include "dev/net/pktfifo.hh"
+
#include "base/misc.hh"
-#include "dev/pktfifo.hh"
using namespace std;
diff --git a/src/dev/pktfifo.hh b/src/dev/net/pktfifo.hh
index ea5803026..5ef75423c 100644
--- a/src/dev/pktfifo.hh
+++ b/src/dev/net/pktfifo.hh
@@ -28,14 +28,15 @@
* Authors: Nathan Binkert
*/
-#ifndef __DEV_PKTFIFO_HH__
-#define __DEV_PKTFIFO_HH__
+#ifndef __DEV_NET_PKTFIFO_HH__
+#define __DEV_NET_PKTFIFO_HH__
#include <iosfwd>
#include <list>
#include <string>
-#include "dev/etherpkt.hh"
+#include "base/misc.hh"
+#include "dev/net/etherpkt.hh"
#include "sim/serialize.hh"
class Checkpoint;
@@ -208,4 +209,4 @@ class PacketFifo
void unserialize(const std::string &base, CheckpointIn &cp);
};
-#endif // __DEV_PKTFIFO_HH__
+#endif // __DEV_NET_PKTFIFO_HH__
diff --git a/src/dev/sinic.cc b/src/dev/net/sinic.cc
index 18642efb7..d0adb1016 100644
--- a/src/dev/sinic.cc
+++ b/src/dev/net/sinic.cc
@@ -28,12 +28,15 @@
* Authors: Nathan Binkert
*/
+#include "dev/net/sinic.hh"
+
#include <deque>
#include <limits>
#include <string>
#ifdef SINIC_VTOPHYS
#include "arch/vtophys.hh"
+
#endif
#include "base/compiler.hh"
#include "base/debug.hh"
@@ -41,8 +44,7 @@
#include "base/types.hh"
#include "config/the_isa.hh"
#include "debug/EthernetAll.hh"
-#include "dev/etherlink.hh"
-#include "dev/sinic.hh"
+#include "dev/net/etherlink.hh"
#include "mem/packet.hh"
#include "mem/packet_access.hh"
#include "sim/eventq.hh"
diff --git a/src/dev/sinic.hh b/src/dev/net/sinic.hh
index dc1947f03..b041cb16d 100644
--- a/src/dev/sinic.hh
+++ b/src/dev/net/sinic.hh
@@ -28,18 +28,18 @@
* Authors: Nathan Binkert
*/
-#ifndef __DEV_SINIC_HH__
-#define __DEV_SINIC_HH__
+#ifndef __DEV_NET_SINIC_HH__
+#define __DEV_NET_SINIC_HH__
#include "base/inet.hh"
#include "base/statistics.hh"
-#include "dev/etherdevice.hh"
-#include "dev/etherint.hh"
-#include "dev/etherpkt.hh"
#include "dev/io_device.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherint.hh"
+#include "dev/net/etherpkt.hh"
+#include "dev/net/pktfifo.hh"
+#include "dev/net/sinicreg.hh"
#include "dev/pci/device.hh"
-#include "dev/pktfifo.hh"
-#include "dev/sinicreg.hh"
#include "params/Sinic.hh"
#include "sim/eventq.hh"
@@ -324,4 +324,4 @@ class Interface : public EtherInt
} // namespace Sinic
-#endif // __DEV_SINIC_HH__
+#endif // __DEV_NET_SINIC_HH__
diff --git a/src/dev/sinicreg.hh b/src/dev/net/sinicreg.hh
index 540e690b0..fc74889c1 100644
--- a/src/dev/sinicreg.hh
+++ b/src/dev/net/sinicreg.hh
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#ifndef __DEV_SINICREG_HH__
-#define __DEV_SINICREG_HH__
+#ifndef __DEV_NET_SINICREG_HH__
+#define __DEV_NET_SINICREG_HH__
#define __SINIC_REG32(NAME, VAL) static const uint32_t NAME = (VAL);
#define __SINIC_REG64(NAME, VAL) static const uint64_t NAME = (VAL);
@@ -236,4 +236,4 @@ regValid(Addr daddr)
} // namespace Sinic
-#endif // __DEV_SINICREG_HH__
+#endif // __DEV_NET_SINICREG_HH__
diff --git a/src/dev/tcp_iface.cc b/src/dev/net/tcp_iface.cc
index f18486fa3..035ec8fd0 100644
--- a/src/dev/tcp_iface.cc
+++ b/src/dev/net/tcp_iface.cc
@@ -41,7 +41,7 @@
* TCP stream socket based interface class implementation for multi gem5 runs.
*/
-#include "dev/tcp_iface.hh"
+#include "dev/net/tcp_iface.hh"
#include <arpa/inet.h>
#include <netdb.h>
diff --git a/src/dev/tcp_iface.hh b/src/dev/net/tcp_iface.hh
index 553f862ca..2eb2c1c07 100644
--- a/src/dev/tcp_iface.hh
+++ b/src/dev/net/tcp_iface.hh
@@ -49,13 +49,13 @@
* transfers messages and co-ordinates the synchronisation among the gem5
* peers.
*/
-#ifndef __DEV_TCP_IFACE_HH__
-#define __DEV_TCP_IFACE_HH__
+#ifndef __DEV_NET_TCP_IFACE_HH__
+#define __DEV_NET_TCP_IFACE_HH__
#include <string>
-#include "dev/multi_iface.hh"
+#include "dev/net/multi_iface.hh"
class EventManager;
@@ -130,4 +130,4 @@ class TCPIface : public MultiIface
~TCPIface() override;
};
-#endif
+#endif // __DEV_NET_TCP_IFACE_HH__
diff --git a/src/python/swig/pyobject.cc b/src/python/swig/pyobject.cc
index 85a303b43..79d7c3581 100644
--- a/src/python/swig/pyobject.cc
+++ b/src/python/swig/pyobject.cc
@@ -36,8 +36,8 @@
#include "base/output.hh"
#include "config/the_isa.hh"
#if THE_ISA != NULL_ISA
-#include "dev/etherdevice.hh"
-#include "dev/etherobject.hh"
+#include "dev/net/etherdevice.hh"
+#include "dev/net/etherobject.hh"
#endif
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "mem/mem_object.hh"
diff --git a/src/python/swig/pyobject.hh b/src/python/swig/pyobject.hh
index ea2948826..6147e4bd9 100644
--- a/src/python/swig/pyobject.hh
+++ b/src/python/swig/pyobject.hh
@@ -31,7 +31,7 @@
#include <Python.h>
#include "base/types.hh"
-#include "dev/etherint.hh"
+#include "dev/net/etherint.hh"
#include "sim/serialize.hh"
#include "sim/sim_object.hh"