changeset 16de812c5f53 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=16de812c5f53
description:
Inet: Remove the SackRange and its use
This patch aims to simplify the use of the Range class before
introducing a more elaborate AddrRegion to replace the AddrRange. The
SackRange is the only use of the range class besides address ranges,
and the removal of this use makes for an easier modification of the
range class.
The functionlity that is removed with this patch is not used anywhere
throughout the code base.
diffstat:
src/base/inet.cc | 23 -----------------------
src/base/inet.hh | 3 ---
2 files changed, 0 insertions(+), 26 deletions(-)
diffs (53 lines):
diff -r 2a5516167688 -r 16de812c5f53 src/base/inet.cc
--- a/src/base/inet.cc Mon Sep 10 11:57:37 2012 -0400
+++ b/src/base/inet.cc Mon Sep 10 11:57:39 2012 -0400
@@ -254,29 +254,6 @@
return true;
}
-bool
-TcpOpt::sack(vector<SackRange> &vec) const
-{
- vec.clear();
-
- const uint8_t *data = bytes() + sizeof(struct tcp_hdr);
- int all = len() - offsetof(tcp_opt, opt_data.sack);
- while (all > 0) {
- const uint16_t *sack = (const uint16_t *)data;
- int len = sizeof(uint16_t) * 2;
- if (all < len) {
- vec.clear();
- return false;
- }
-
- vec.push_back(RangeIn(ntohs(sack[0]), ntohs(sack[1])));
- all -= len;
- data += len;
- }
-
- return false;
-}
-
int
hsplit(const EthPacketPtr &ptr)
{
diff -r 2a5516167688 -r 16de812c5f53 src/base/inet.hh
--- a/src/base/inet.hh Mon Sep 10 11:57:37 2012 -0400
+++ b/src/base/inet.hh Mon Sep 10 11:57:39 2012 -0400
@@ -380,8 +380,6 @@
uint16_t cksum(const TcpPtr &ptr);
-typedef Range<uint16_t> SackRange;
-
struct TcpOpt : public tcp_opt
{
uint8_t type() const { return opt_type; }
@@ -393,7 +391,6 @@
uint16_t mss() const { return ntohs(opt_data.mss); }
uint8_t wscale() const { return opt_data.wscale; }
- bool sack(std::vector<SackRange> &vec) const;
uint32_t echo() const { return ntohl(opt_data.echo); }
uint32_t tsval() const { return ntohl(opt_data.timestamp[0]); }
uint32_t tsecr() const { return ntohl(opt_data.timestamp[1]); }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev