470,477d469
<
< class ForwardResponseRecord : public Packet::SenderState
< {
< public:
<
< ForwardResponseRecord() {}
< };
<
559,562d550
<
< // must be cache-to-cache response from upper to lower level
< ForwardResponseRecord *rec =
< dynamic_cast<ForwardResponseRecord *>(pkt->senderState);
565,568c553,561
< if (rec == NULL) {
< // @todo What guarantee do we have that this HardPFResp is
< // actually for this cache, and not a cache closer to the
< // memory?
---
> // determine if the response is from a snoop request we created
> // (in which case it should be in the outstandingSnoop), or if we
> // merely forwarded someone else's snoop request
> const bool forwardAsSnoop = outstandingSnoop.find(pkt->req) ==
> outstandingSnoop.end();
>
> if (!forwardAsSnoop) {
> // the packet came from this cache, so sink it here and do not
> // forward it
570,573c563,567
< // Check if it's a prefetch response and handle it. We shouldn't
< // get any other kinds of responses without FRRs.
< DPRINTF(Cache, "Got prefetch response from above for addr %#llx (%s)\n",
< pkt->getAddr(), pkt->isSecure() ? "s" : "ns");
---
>
> outstandingSnoop.erase(pkt->req);
>
> DPRINTF(Cache, "Got prefetch response from above for addr "
> "%#llx (%s)\n", pkt->getAddr(), pkt->isSecure() ? "s" : "ns");
578,579d571
< pkt->popSenderState();
< delete rec;
1900d1891
< snoopPkt.pushSenderState(new ForwardResponseRecord());
1915,1918d1905
< } else {
< // no cache (or anyone else for that matter) will
< // respond, so delete the ForwardResponseRecord here
< delete snoopPkt.popSenderState();
2352a2340,2341
> auto M5_VAR_USED r = outstandingSnoop.insert(snoop_pkt.req);
> assert(r.second);