> On Oct. 3, 2016, 5:27 p.m., Andreas Sandberg wrote: > > src/dev/net/etherpkt.cc, line 44 > > <http://reviews.gem5.org/r/3493/diff/2/?file=56881#file56881line44> > > > > I really don't like the way this is breaking checkpoints. > > > > The right thing to do here would be to implement this in a way that > > doesn't break checkpoint. The simplest way would probably be to use length > > as the name for dataLength. If simLength is present (I'm going to push a > > helper function to test for that shortly), you just unserialize the value. > > If not, you use a fallback such as simLength = dataLength. > > > > The other option is to provide a checkpoint updater, which is pretty > > tricky since you need to find all places where packets are serialized. > > Michael LeBeane wrote: > The first option sounds reasonable. Did you push the helper function > that tests if something is present in a checkpoint? I don't think I've seen > it in the commit logs recently.
I committed the helper functions last week (https://github.com/gem5/gem5/commit/18135ce6abc0ee02e36aef424be183cd7238a55). I thought a bit more about this and the optParamIn helper probably implements the functionality you need. - Andreas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3493/#review8763 ----------------------------------------------------------- On June 29, 2016, 7:27 p.m., Michael LeBeane wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3493/ > ----------------------------------------------------------- > > (Updated June 29, 2016, 7:27 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11549:573a7d349538 > --------------------------- > dev: Redefine 'length' in EthPacketData > Currently, all the network devices create a 16K buffer for the 'data' field > in EthPacketData, and use 'length' to keep track of the size of the packet > in the buffer. This patch introduces 'dataLength' and 'simLength' parameters > to EthPacketData. 'dataLength' stores the amount of space taken up by the > packet in the 'data' buffer. 'simLength' is used to hold the effective length > of the packet used for all timing calulations in the simulator. Serialization > is performed using only the useful data in the packet ('dataLength') and not > necessarily the entire original buffer. > > > Diffs > ----- > > src/dev/net/etherswitch.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/ethertap.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/i8254xGBe.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/ns_gige.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/pktfifo.hh 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/pktfifo.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/sinic.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/tcp_iface.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/etherbus.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/etherdump.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/etherlink.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/etherpkt.hh 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/etherpkt.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/dist_etherlink.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/dist_iface.cc 91f58918a76abf1a1dedcaa70a9b95789da7b88c > src/dev/net/dist_packet.hh 91f58918a76abf1a1dedcaa70a9b95789da7b88c > > Diff: http://reviews.gem5.org/r/3493/diff/ > > > Testing > ------- > > > Thanks, > > Michael LeBeane > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
