瀏覽代碼

bna: fix performance regression

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>
Ivan Vecera 11 年之前
父節點
當前提交
c36c9d50cc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/brocade/bna/bnad.c

+ 1 - 1
drivers/net/ethernet/brocade/bna/bnad.c

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