win-pvdrivers

changeset 45:cc2c13724f45

xennet: clear entry in rx_pkts when rx is complete; eliminate a local variable
author Andy Grover <andy.grover@oracle.com>
date Fri Dec 14 13:23:59 2007 -0800 (2007-12-14)
parents 01f874217465
children d69f904fcf28
files xennet/xennet.c
line diff
     1.1 --- a/xennet/xennet.c	Thu Dec 13 12:30:19 2007 -0800
     1.2 +++ b/xennet/xennet.c	Fri Dec 14 13:23:59 2007 -0800
     1.3 @@ -315,7 +315,6 @@ XenNet_RxBufferCheck(struct xennet_info 
     1.4  {
     1.5    RING_IDX cons, prod;
     1.6  
     1.7 -  unsigned short id;
     1.8    PNDIS_PACKET pkt;
     1.9    PNDIS_PACKET packets[1];
    1.10    PNDIS_BUFFER buffer;
    1.11 @@ -336,12 +335,11 @@ XenNet_RxBufferCheck(struct xennet_info 
    1.12        if (rxrsp->status == NETIF_RSP_NULL)
    1.13          continue;
    1.14  
    1.15 -      id  = rxrsp->id;
    1.16 -      pkt = xi->rx_pkts[id];
    1.17 +      pkt = xi->rx_pkts[rxrsp->id];
    1.18 +      xi->rx_pkts[rxrsp->id] = NULL;
    1.19        xi->GntTblInterface.EndAccess(xi->GntTblInterface.InterfaceHeader.Context,
    1.20 -        xi->grant_rx_ref[id]);
    1.21 -      xi->grant_rx_ref[id] = GRANT_INVALID_REF;
    1.22 -      //add_id_to_freelist(xi->rx_pkts, id);
    1.23 +        xi->grant_rx_ref[rxrsp->id]);
    1.24 +      xi->grant_rx_ref[rxrsp->id] = GRANT_INVALID_REF;
    1.25  
    1.26        NdisGetFirstBufferFromPacketSafe(pkt, &buffer, &buff_va, &buff_len,
    1.27          &tot_buff_len, NormalPagePriority);