update ringbuf