add ring buffer, it's designed base on kernel kfifo