bna: fix performance regression
authorIvan Vecera <ivecera@redhat.com>
Tue, 29 Jul 2014 14:29:30 +0000 (16:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2014 02:09:34 +0000 (19:09 -0700)
The recent commit "e29aa33 bna: Enable Multi Buffer RX" is causing
a performance regression. It does not properly update 'cmpl' pointer
at the end of the loop in NAPI handler bnad_cq_process(). The result is
only one packet / per NAPI-schedule is processed.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad.c

index 3a77f9e..556aab7 100644 (file)
@@ -600,9 +600,9 @@ bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
        prefetch(bnad->netdev);
 
        cq = ccb->sw_q;
-       cmpl = &cq[ccb->producer_index];
 
        while (packets < budget) {
+               cmpl = &cq[ccb->producer_index];
                if (!cmpl->valid)
                        break;
                /* The 'valid' field is set by the adapter, only after writing