Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-19 Thread Gleb Smirnoff
On Mon, Sep 17, 2012 at 01:16:45PM -0400, John Baldwin wrote: J On Monday, September 17, 2012 11:49:59 am Ryan Stone wrote: J I know that there have been a lot of discussions about fixing how J packets are handed off to ifnets due to the current methods being J extremely race-prone. Has there

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-18 Thread John Baldwin
On Monday, September 17, 2012 4:29:50 pm Jack Vogel wrote: On Mon, Sep 17, 2012 at 1:22 PM, John Baldwin j...@freebsd.org wrote: On Monday, September 17, 2012 4:00:04 pm Jack Vogel wrote: So, you mean having them create their own buf ring I assume? Would be easy enough to hack some

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-18 Thread John Baldwin
On Monday, September 17, 2012 7:16:27 pm Adrian Chadd wrote: There's a lot less cache in these boards. Going through the stack trace all the way and back for each packet is actually quite expensive. Then there's the overhead of having if_start() be called multiple times, concurrently, from

What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread Ryan Stone
I know that there have been a lot of discussions about fixing how packets are handed off to ifnets due to the current methods being extremely race-prone. Has there been any consensus on how the problem is going to be solved? In my particular case, I've seen an if_bridge interface whose if_snd

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread John Baldwin
On Monday, September 17, 2012 11:49:59 am Ryan Stone wrote: I know that there have been a lot of discussions about fixing how packets are handed off to ifnets due to the current methods being extremely race-prone. Has there been any consensus on how the problem is going to be solved? In my

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread Adrian Chadd
On 17 September 2012 10:16, John Baldwin j...@freebsd.org wrote: I think for if_bridge the fix is that it no longer uses if_start. :) :) For real hardware you will get some sort of TX completion interrupt that will restart the transmit queue. Virtual software-only interfaces such as vlan(4)

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread John Baldwin
On Monday, September 17, 2012 1:45:12 pm Adrian Chadd wrote: On 17 September 2012 10:16, John Baldwin j...@freebsd.org wrote: I think for if_bridge the fix is that it no longer uses if_start. :) :) For real hardware you will get some sort of TX completion interrupt that will

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread Jack Vogel
So, you mean having them create their own buf ring I assume? Would be easy enough to hack some code and try it if someone is so inclined? Jack On Mon, Sep 17, 2012 at 12:03 PM, John Baldwin j...@freebsd.org wrote: On Monday, September 17, 2012 1:45:12 pm Adrian Chadd wrote: On 17 September

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread John Baldwin
On Monday, September 17, 2012 4:00:04 pm Jack Vogel wrote: So, you mean having them create their own buf ring I assume? Would be easy enough to hack some code and try it if someone is so inclined? No, that would be backwards (back to giving them a queue). Adrian's suggestion is to provide a

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread Jack Vogel
On Mon, Sep 17, 2012 at 1:22 PM, John Baldwin j...@freebsd.org wrote: On Monday, September 17, 2012 4:00:04 pm Jack Vogel wrote: So, you mean having them create their own buf ring I assume? Would be easy enough to hack some code and try it if someone is so inclined? No, that would be

Re: What's the latest on fixing IFF_DRV_OACTIVE/if_start/etc?

2012-09-17 Thread Adrian Chadd
There's a lot less cache in these boards. Going through the stack trace all the way and back for each packet is actually quite expensive. Then there's the overhead of having if_start() be called multiple times, concurrently, from multiple senders. It's fine for a wifi AP setup where the