[asterisk-bugs] [JIRA] (DAHLIN-329) Support multiple dynamic spans with FIFO
Pavel Selivanov (JIRA)
noreply at issues.asterisk.org
Thu Nov 7 03:26:03 CST 2013
[ https://issues.asterisk.org/jira/browse/DAHLIN-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=211570#comment-211570 ]
Pavel Selivanov commented on DAHLIN-329:
----------------------------------------
In two words - I like you fixes like flood protection, tasklet in module_param.
What I don't like, and made it in another way:
I don't like a lot's of #if #else #endif, around all the code.
kfifo (FINALLY) finished changing their API.
That's great! I've wrapped it a bit.
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
# define kfifo_in(fifo,buf,n) __kfifo_put(fifo,buf,n)
# define kfifo_in_spinlocked(fifo,buf,n,lock) kfifo_put(fifo,buf,n)
# define kfifo_out(fifo,buf,n) __kfifo_get(fifo,buf,n)
# define kfifo_out_spinlocked(fifo,buf,n,lock) kfifo_get(fifo,buf,n)
# define kfifo_size(fifo) (fifo->size)
# define my_kfifo_alloc(size,mask,lock) kfifo_alloc(size,mask,lock)
# define my_kfifo_free(fifo) kfifo_free(fifo)
#else // >= 2.6.35
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) /* 2.6.35 <= x < 2.6.36 */
#define kfifo_in_spinlocked(fifo, buf, n, lock) \
kfifo_in_locked(fifo, buf, n, lock)
#define kfifo_out_spinlocked(fifo, buf, n, lock) \
kfifo_out_locked(fifo, buf, n, lock)
#endif // < KERNEL_VERSION(2,6,36)
inline struct kfifo *my_kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock) {
int ret;
struct kfifo *fifo = kmalloc(sizeof(struct kfifo), gfp_mask);
ret = kfifo_alloc (fifo, size, gfp_mask);
return fifo;
}
inline void my_kfifo_free(struct kfifo *fifo) {
kfifo_free (fifo);
kfree (fifo);
}
#endif // < KERNEL_VERSION(2,6,35)
Now we can use ->timing field instead of DAHDI_FLAG_RUNNING to notify, we're online.
What is msgbuf2 for ? Not used.
kfifo_alloc have an alignment bug in kernels (still not fixed).
It will crash kernel on some channels number (like 128)...
sprintf should be changed to more up-to-date seq_printf.
I'll attach my current patches (to DAHDI 2.6.1).
I will upgdete it to DAHDI 2.7.0.1, and will attach them here.
It can take time, as I'll have a business trip on Sun.
I'll try to update untill Sun.
Thank you all.
> Support multiple dynamic spans with FIFO
> ----------------------------------------
>
> Key: DAHLIN-329
> URL: https://issues.asterisk.org/jira/browse/DAHLIN-329
> Project: DAHDI-Linux
> Issue Type: Improvement
> Security Level: None
> Components: dahdi (the module), dahdi_dynamic
> Affects Versions: 2.7.0
> Environment: Kernel versions 2.6.24, 2.6.38 and 3.2.0 tested
> Reporter: Michael Walton
> Assignee: Russ Meyerriecks
> Attachments: dahdi-dynamic-multispan-fifo.patch
>
>
> The dynamic span driver works for one span, but is unable to handle the phase differences caused by line and network jitter and clock drift in a multiple span situation. The introduction of a configurable receive FIFO, proper master clock priority switching and slip/skip processing solves this problem. Additionally, to support configurations where no telephony hardware is present, the highres timer from (defunct) dahdi_dummy is re-introduced into dahdi base to replace the core timer functionality (which is limited to 250Hz) with a true 1000Hz tick. As with the core timer, this is the fallback timing when no span provides master timing.
> Dynamic multispan introduces:
> * Configurable fifo on incoming dynamic frames
> * Master/slave dynamic spans with priority switching based on alarm status
> * All transmit and receive processing is done in the dahdi_dynamic_run tasklet to ensure proper handling of jitter and phase differences
> * Unreachable spans (RED alarm) switch to a poll mode to prevent network being flooded by 1ms frames that go nowhere
> * Slip/skip statistics per span available on /proc/dahdi/dahdi_dynamic_stats
> * High res timer added to dahdi-base to replace core timer with true 1ms tick timer
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list