Re: [PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-24 Thread David Miller
From: Govindarajulu Varadarajan <_gov...@gmx.com> Date: Wed, 24 Jun 2015 15:56:17 +0530 (IST) > Let me know if this change is OK, I will send new patch with detailed > description. Yes, and please do. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to

Re: [PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-24 Thread Govindarajulu Varadarajan
On Wed, 24 Jun 2015, David Miller wrote: From: Govindarajulu Varadarajan <_gov...@gmx.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, +

Re: [PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-24 Thread David Miller
From: Govindarajulu Varadarajan <_gov...@gmx.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) > { > - bo

[PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-23 Thread Govindarajulu Varadarajan
We use spinlock to access a single flag. We can achieve this by using atomic variable and atomic_cmpxchg to set the flag (idle to poll) and a simple atomic set to unlock (poll to idle). Also flush gro before unlocking napi poll, to prevent ooo packets when busy poll sockets are called. Signed-off