Commit 9acfd1c0 authored by Govindarajulu Varadarajan's avatar Govindarajulu Varadarajan Committed by David S. Miller

enic: unmask intr only when napi is complete

In case of busy poll, napi_complete_done returns false and does not
dequeue napi. In this case do not unmask the intr. We are guaranteed
napi is called again. This reduces unnecessary iowrites.
Signed-off-by: default avatarGovindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f93e1cdc
...@@ -1537,13 +1537,12 @@ static int enic_poll(struct napi_struct *napi, int budget) ...@@ -1537,13 +1537,12 @@ static int enic_poll(struct napi_struct *napi, int budget)
*/ */
enic_calc_int_moderation(enic, &enic->rq[0]); enic_calc_int_moderation(enic, &enic->rq[0]);
if (rq_work_done < rq_work_to_do) { if ((rq_work_done < budget) && napi_complete_done(napi, rq_work_done)) {
/* Some work done, but not enough to stay in polling, /* Some work done, but not enough to stay in polling,
* exit polling * exit polling
*/ */
napi_complete_done(napi, rq_work_done);
if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce) if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce)
enic_set_int_moderation(enic, &enic->rq[0]); enic_set_int_moderation(enic, &enic->rq[0]);
vnic_intr_unmask(&enic->intr[intr]); vnic_intr_unmask(&enic->intr[intr]);
...@@ -1663,13 +1662,12 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget) ...@@ -1663,13 +1662,12 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget)
*/ */
enic_calc_int_moderation(enic, &enic->rq[rq]); enic_calc_int_moderation(enic, &enic->rq[rq]);
if (work_done < work_to_do) { if ((work_done < budget) && napi_complete_done(napi, work_done)) {
/* Some work done, but not enough to stay in polling, /* Some work done, but not enough to stay in polling,
* exit polling * exit polling
*/ */
napi_complete_done(napi, work_done);
if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce) if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce)
enic_set_int_moderation(enic, &enic->rq[rq]); enic_set_int_moderation(enic, &enic->rq[rq]);
vnic_intr_unmask(&enic->intr[intr]); vnic_intr_unmask(&enic->intr[intr]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment