Re: [v3 Patch 2/3] bridge: make bridge support netpoll

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Hemminger
Date: Thursday, April 8, 2010 - 8:37 am

On Thu, 8 Apr 2010 02:18:58 -0400
Amerigo Wang <amwang@redhat.com> wrote:


Could you use more stub functions to eliminate #ifdef's in code.



There is no protection on dev->priv_flags for SMP access.
It would better bit value in dev->state if you are using it as control flag.

Then you could use 
			if (unlikely(test_and_clear_bit(__IN_NETPOLL, &skb->dev->state)))
				netpoll_send_skb(...)





This is n hot path, so use unlikely()


One message is sufficient.

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[v3 Patch 2/3] bridge: make bridge support netpoll, Amerigo Wang, (Wed Apr 7, 11:18 pm)
[v3 Patch 3/3] bonding: make bonding support netpoll, Amerigo Wang, (Wed Apr 7, 11:19 pm)
Re: [v3 Patch 2/3] bridge: make bridge support netpoll, Stephen Hemminger, (Thu Apr 8, 8:37 am)
Re: [v3 Patch 2/3] bridge: make bridge support netpoll, Eric Dumazet, (Mon Apr 12, 3:38 am)
Re: [Bonding-devel] [v3 Patch 2/3] bridge: make bridge sup ..., Stephen Hemminger, (Mon Apr 12, 8:38 am)
Re: [Bonding-devel] [v3 Patch 2/3] bridge: make bridge sup ..., Stephen Hemminger, (Tue Apr 13, 10:33 am)