Review Board 2.0.15


MEM: Remove the notion of the default port

Review Request #946 - Created Dec. 18, 2011 and submitted

Information
Andreas Hansson
gem5
default
Reviewers
Default
MEM: Remove the notion of the default port

This patch removes the default port and instead relies on the peer
being set to NULL initially. The binding check (i.e. is a port
connected or not) will eventually be moved to the init function of the
modules.
util/regress all passing (disregarding t1000 and eio)
Ship it!
Posted (Jan. 3, 2012, 8:41 a.m.)



  
Posted (Jan. 4, 2012, 1:37 p.m.)
So the initial idea of the DefaultPeerPort is that otherwise (if you just set the peer to NULL) then if someone tries to send to an unconnected port you get a segfault, which is not helpful.  Seems like in that sense this is a step backwards.  Do you have other plans to avoid segfaulting on unconnected ports, that don't involve checking for a null peer on every packet send?
  1. Indeed, the check can be implemented in two ways: 1) and the easiest option, is to make sure the modules with the ports check that they are connected in their init(), in most places this is not done at the moment, but I promise dearly to chase these locations down and add the check 2) with the future changes the MemObject will have two vectors with master and slave ports (base classes without protocol information) and could iterate over the ports and check that they are connected.
    
    Sounds reasonable?
Ship it!
Posted (Jan. 4, 2012, 11:11 p.m.)
Sounds good!  Thanks for clarifying.