[asterisk-dev] [Code Review] Reduce references to global "chans" array in dahdi-base.c

Shaun Ruffell sruffell at digium.com
Sun Sep 5 12:58:40 CDT 2010



> On 2010-09-05 07:41:49, Tzafrir Cohen wrote:
> > rev 9269 removed DAHDI_INDIRECT. This breaks building dahdi-tools. Specifically, it breaks building dahdi_cfg.c. DAHDI_INDIRECT is used there in calls from rad_chanconfig() and calls the ioctls DAHDI_RADIO_GETPARAM and DAHDI_RADIO_SETPARAM.
> > 
> > Those ioctl-s are handled in pciradio.c .

Hmm...I did not recompile dahdi-tools against the chan_list_refactoring branch.  However I still think converting DAHDI_INDIRECT to open/DAHDI_SPECIFY/ioctl in dahdi_cfg.c (http://github.com/sruffell/dahdi-tools/commit/786074) is preferable to supporting DAHDI_INDIRECT in dahdi-base.c.


- Shaun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/905/#review2681
-----------------------------------------------------------


On 2010-09-03 09:47:57, Shaun Ruffell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/905/
> -----------------------------------------------------------
> 
> (Updated 2010-09-03 09:47:57)
> 
> 
> Review request for Asterisk Developers and Tzafrir Cohen.
> 
> 
> Summary
> -------
> 
> This is a collection of 39 mostly minor commits that will make it easy to potentially change how DAHDI does "channel number" -> "channel" mapping.  This is currently done via a global "chans" array, and still is at the end of this patch series, but the number of places that the "chans" array is accessed is reduced by these changes.
> 
> These commits also sit out at:
> http://svn.asterisk.org/svn/dahdi/linux/team/sruffell/chan_list_refactoring
> 
> The most significant change in this group are probably:
> http://svn.asterisk.org/view/dahdi?view=revision&revision=9290
> and
> http://svn.asterisk.org/view/dahdi?view=revision&revision=9291
> 
> which remove the references to "chans" in process_masterspan without involving any lookups by channel number.
> 
> 
> Diffs
> -----
> 
>   linux/trunk/drivers/dahdi/dahdi-base.c 9293 
>   linux/trunk/include/dahdi/kernel.h 9293 
>   linux/trunk/include/dahdi/user.h 9293 
> 
> Diff: https://reviewboard.asterisk.org/r/905/diff
> 
> 
> Testing
> -------
> 
> I've not run it through a complete regression, but loaded it up on a computer with 9 digital spans, and dropped 500 pseudo channels into conference to ensure that the performance wasn't any worse.
> 
> 
> Thanks,
> 
> Shaun
> 
>




More information about the asterisk-dev mailing list