> On 2012-01-04 21:37:39, Steve Reinhardt wrote:
> > 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?

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?


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/946/#review1847
-----------------------------------------------------------


On 2011-12-19 05:57:15, Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/946/
> -----------------------------------------------------------
> 
> (Updated 2011-12-19 05:57:15)
> 
> 
> Review request for Default.
> 
> 
> Summary
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   src/mem/bridge.cc ca98021c3f96 
>   src/mem/port.hh ca98021c3f96 
>   src/mem/port.cc ca98021c3f96 
> 
> Diff: http://reviews.m5sim.org/r/946/diff
> 
> 
> Testing
> -------
> 
> util/regress all passing (disregarding t1000 and eio)
> 
> 
> Thanks,
> 
> Andreas
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to