direct-io.hg
changeset 10516:2eac0e15e0c2
[NET]: Give make_tx_response the req pointer instead of id
This patch changes the make_tx_response id argument to a request pointer
instead. This allows us to test the request flag in future for TSO.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This patch changes the make_tx_response id argument to a request pointer
instead. This allows us to test the request flag in future for TSO.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Jun 28 12:03:19 2006 +0100 (2006-06-28) |
parents | 6e7027a2abca |
children | bb46d03f5f1d |
files | linux-2.6-xen-sparse/drivers/xen/netback/netback.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Wed Jun 28 12:03:01 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Wed Jun 28 12:03:19 2006 +0100 1.3 @@ -43,7 +43,7 @@ 1.4 static void netif_idx_release(u16 pending_idx); 1.5 static void netif_page_release(struct page *page); 1.6 static void make_tx_response(netif_t *netif, 1.7 - u16 id, 1.8 + netif_tx_request_t *txp, 1.9 s8 st); 1.10 static int make_rx_response(netif_t *netif, 1.11 u16 id, 1.12 @@ -481,7 +481,7 @@ inline static void net_tx_action_dealloc 1.13 1.14 netif = pending_tx_info[pending_idx].netif; 1.15 1.16 - make_tx_response(netif, pending_tx_info[pending_idx].req.id, 1.17 + make_tx_response(netif, &pending_tx_info[pending_idx].req, 1.18 NETIF_RSP_OKAY); 1.19 1.20 pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx; 1.21 @@ -496,7 +496,7 @@ static void netbk_tx_err(netif_t *netif, 1.22 1.23 do { 1.24 netif_tx_request_t *txp = RING_GET_REQUEST(&netif->tx, cons); 1.25 - make_tx_response(netif, txp->id, NETIF_RSP_ERROR); 1.26 + make_tx_response(netif, txp, NETIF_RSP_ERROR); 1.27 } while (++cons < end); 1.28 netif->tx.req_cons = cons; 1.29 netif_schedule_work(netif); 1.30 @@ -581,7 +581,7 @@ static int netbk_tx_check_mop(struct sk_ 1.31 err = mop->status; 1.32 if (unlikely(err)) { 1.33 txp = &pending_tx_info[pending_idx].req; 1.34 - make_tx_response(netif, txp->id, NETIF_RSP_ERROR); 1.35 + make_tx_response(netif, txp, NETIF_RSP_ERROR); 1.36 pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx; 1.37 netif_put(netif); 1.38 } else { 1.39 @@ -614,7 +614,7 @@ static int netbk_tx_check_mop(struct sk_ 1.40 1.41 /* Error on this fragment: respond to client with an error. */ 1.42 txp = &pending_tx_info[pending_idx].req; 1.43 - make_tx_response(netif, txp->id, NETIF_RSP_ERROR); 1.44 + make_tx_response(netif, txp, NETIF_RSP_ERROR); 1.45 pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx; 1.46 netif_put(netif); 1.47 1.48 @@ -898,7 +898,7 @@ irqreturn_t netif_be_int(int irq, void * 1.49 } 1.50 1.51 static void make_tx_response(netif_t *netif, 1.52 - u16 id, 1.53 + netif_tx_request_t *txp, 1.54 s8 st) 1.55 { 1.56 RING_IDX i = netif->tx.rsp_prod_pvt; 1.57 @@ -906,7 +906,7 @@ static void make_tx_response(netif_t *ne 1.58 int notify; 1.59 1.60 resp = RING_GET_RESPONSE(&netif->tx, i); 1.61 - resp->id = id; 1.62 + resp->id = txp->id; 1.63 resp->status = st; 1.64 1.65 netif->tx.rsp_prod_pvt = ++i;