Thanks Eliot for the follow up.
The reposne is created independently using the memory controller.
and the problem arises inside recvTimingReq, so it happens even before complete sending teh request.

I don't free up the pkt pointer "pkt", I pop the queue element, after the re-try manages to send the packet.
and pop doesn't do any allocation free-up.


From: Eliot Moss <m...@cs.umass.edu>
Sent: Thursday, July 14, 2022 4:21 PM
To: The gem5 Users mailing list <gem5-users@gem5.org>
Subject: [gem5-users] Re: Packet VALID_ADDR being cleared when try to resend it !
 
On 7/14/2022 2:46 PM, Abdlerhman Abotaleb wrote:
> Thank you, Eliot, for your reply. 🙏
> I solved it, but still need to understand the cause. *
> *
> *This is the full story: *
> I defined an STL queue of pointers to Packets to store the packets for further resending.
> std::queue<PacketPtr> pktQueue;
> It is defined as a member of the memory object class.
>
> And I'm debugging before and after this call
> Inside "CoherentXBar::recvTimingReq":
> success = memSidePorts[mem_side_port_id]->*sendTimingReq*(pkt);
> *Before* the call, it appears that the Packet contains all correct fields (i.e. the address and
> flags etc.)
> *After * the call it fails to assert the "VALID_ADDR".
>
> I *solved *this problem as the following:
> Inside the newmemory simulation object, when inserting a new blocked packet:
> Before:
> blockedPacketQueue.push(pkt)
> After:
> PacketPtr pPkt= new Packet(pkt,false,true);
>           pktQueue.push(pPkt);
>
> I still can't figure why the first way doesn't work !

Well, I still wonder if the packet is getting freed
(or something) down in the sendTimingReq actions.
Among other things, I wonder if you are trying to save
it *and* it is getting responded to, which would turn
it into a response, etc.

Copying it like that is fixing the symptom, but I am
not sure it is fixing the real problem.

Regards - Eliot
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to