[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150624.012501.1398638370458478294.davem@davemloft.net>
Date: Wed, 24 Jun 2015 01:25:01 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: _govind@....com
Cc: netdev@...r.kernel.org, ssujith@...co.com, benve@...co.com
Subject: Re: [PATCH net-next] enic: use atomic_t instead of spin_lock in
busy poll
From: Govindarajulu Varadarajan <_govind@....com>
Date: Tue, 23 Jun 2015 21:47:50 +0530
> -static inline bool enic_poll_unlock_napi(struct vnic_rq *rq)
> +static inline void enic_poll_unlock_napi(struct vnic_rq *rq,
> + struct napi_struct *napi)
> {
> - bool rc = false;
> -
> - spin_lock(&rq->bpoll_lock);
> - WARN_ON(rq->bpoll_state &
> - (ENIC_POLL_STATE_POLL | ENIC_POLL_STATE_NAPI_YIELD));
> - if (rq->bpoll_state & ENIC_POLL_STATE_POLL_YIELD)
> - rc = true;
> - rq->bpoll_state = ENIC_POLL_STATE_IDLE;
> - spin_unlock(&rq->bpoll_lock);
> -
> - return rc;
> + WARN_ON(atomic_read(&rq->bpoll_state) != ENIC_POLL_STATE_NAPI);
> + napi_gro_flush(napi, false);
> + atomic_set(&rq->bpoll_state, ENIC_POLL_STATE_IDLE);
> }
I don't understand why you needed to add this napi_gro_flush() call here,
and regardless of the reason you must explain this, in detail, in your
commit message,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists