r8152: replace napi_complete with napi_complete_done
authorhayeswang <hayeswang@realtek.com>
Fri, 9 Jun 2017 09:11:48 +0000 (17:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2017 19:37:02 +0000 (15:37 -0400)
Change from using napi_complete to napi_complete_done to allow for the
use of gro_flush_timeout in tuning network processing.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index fa29583937304a9f59487a5b62c68d3e8a925674..5a02053181d10d726869d013b35109c823a2b5e5 100644 (file)
@@ -1938,7 +1938,8 @@ static int r8152_poll(struct napi_struct *napi, int budget)
        bottom_half(tp);
 
        if (work_done < budget) {
-               napi_complete(napi);
+               if (!napi_complete_done(napi, work_done))
+                       goto out;
                if (!list_empty(&tp->rx_done))
                        napi_schedule(napi);
                else if (!skb_queue_empty(&tp->tx_queue) &&
@@ -1946,6 +1947,7 @@ static int r8152_poll(struct napi_struct *napi, int budget)
                        napi_schedule(napi);
        }
 
+out:
        return work_done;
 }