aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cisco/enic/vnic_rq.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-03 17:28:21 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-03 17:28:21 -0500
commit7a655c6324a8968ea2f027bf3660c87c42ac3de4 (patch)
treeec7fe4efaad20f994a9ee78ab561175cf347f913 /drivers/net/ethernet/cisco/enic/vnic_rq.h
parent508aac6dee025f93eab1e806d20762ea6327b43d (diff)
enic: Remove local ndo_busy_poll() implementation.
We do polling generically these days. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/vnic_rq.h')
-rw-r--r--drivers/net/ethernet/cisco/enic/vnic_rq.h78
1 files changed, 0 insertions, 78 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_rq.h b/drivers/net/ethernet/cisco/enic/vnic_rq.h
index b9c82f143d7e..0413103ebe94 100644
--- a/drivers/net/ethernet/cisco/enic/vnic_rq.h
+++ b/drivers/net/ethernet/cisco/enic/vnic_rq.h
@@ -92,9 +92,6 @@ struct vnic_rq {
struct vnic_rq_buf *to_clean;
void *os_buf_head;
unsigned int pkts_outstanding;
-#ifdef CONFIG_NET_RX_BUSY_POLL
- atomic_t bpoll_state;
-#endif /* CONFIG_NET_RX_BUSY_POLL */
};
static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq)
@@ -207,81 +204,6 @@ static inline int vnic_rq_fill(struct vnic_rq *rq,
return 0;
}
-#ifdef CONFIG_NET_RX_BUSY_POLL
-static inline void enic_busy_poll_init_lock(struct vnic_rq *rq)
-{
- atomic_set(&rq->bpoll_state, ENIC_POLL_STATE_IDLE);
-}
-
-static inline bool enic_poll_lock_napi(struct vnic_rq *rq)
-{
- int rc = atomic_cmpxchg(&rq->bpoll_state, ENIC_POLL_STATE_IDLE,
- ENIC_POLL_STATE_NAPI);
-
- return (rc == ENIC_POLL_STATE_IDLE);
-}
-
-static inline void enic_poll_unlock_napi(struct vnic_rq *rq,
- struct napi_struct *napi)
-{
- 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);
-}
-
-static inline bool enic_poll_lock_poll(struct vnic_rq *rq)
-{
- int rc = atomic_cmpxchg(&rq->bpoll_state, ENIC_POLL_STATE_IDLE,
- ENIC_POLL_STATE_POLL);
-
- return (rc == ENIC_POLL_STATE_IDLE);
-}
-
-
-static inline void enic_poll_unlock_poll(struct vnic_rq *rq)
-{
- WARN_ON(atomic_read(&rq->bpoll_state) != ENIC_POLL_STATE_POLL);
- atomic_set(&rq->bpoll_state, ENIC_POLL_STATE_IDLE);
-}
-
-static inline bool enic_poll_busy_polling(struct vnic_rq *rq)
-{
- return atomic_read(&rq->bpoll_state) & ENIC_POLL_STATE_POLL;
-}
-
-#else
-
-static inline void enic_busy_poll_init_lock(struct vnic_rq *rq)
-{
-}
-
-static inline bool enic_poll_lock_napi(struct vnic_rq *rq)
-{
- return true;
-}
-
-static inline bool enic_poll_unlock_napi(struct vnic_rq *rq,
- struct napi_struct *napi)
-{
- return false;
-}
-
-static inline bool enic_poll_lock_poll(struct vnic_rq *rq)
-{
- return false;
-}
-
-static inline bool enic_poll_unlock_poll(struct vnic_rq *rq)
-{
- return false;
-}
-
-static inline bool enic_poll_ll_polling(struct vnic_rq *rq)
-{
- return false;
-}
-#endif /* CONFIG_NET_RX_BUSY_POLL */
-
void vnic_rq_free(struct vnic_rq *rq);
int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
unsigned int desc_count, unsigned int desc_size);