dvb_ringbuff...kt_read_user(9)
π dvb_ringbuff...kt_read_user(9)
okay bestie, welcome to the Kernel API Manual β¨ β yes this is a real function name and yes it's truncated with dots in the header, no we're not gonna fight about it π
This one is dvb_ringbuffer_pkt_read_user, and it's literally here to read from a packet in the ringbuffer. That's the whole vibe. Let's get into it π
πΈ NAME πΈ
dvb_ringbuffer_pkt_read_user β Read from a packet in the ringbuffer.
That's it. That's the job. Read. From a packet. In the ringbuffer. Periodt π«Ά
β¨ SYNOPSIS β¨
ssize_t dvb_ringbuffer_pkt_read_user (struct dvb_ringbuffer *rbuf ,
size_t idx , int offset , u8 __user *buf , size_t len );
Look at her. Five args. Returns a ssize_t. Iconic signature ngl π
π¦ ARGUMENTS π¦
rbufβ Ringbuffer concerned. Like, the one you're actually messing with, bestie.idxβ Packet index, exactly as returned bydvb_ringbuffer_pkt_next. Don't make one up, fr fr πoffsetβ Offset into the packet you wanna read from. Start wherever, we don't judge.bufβ Destination buffer for the data. This is where the good stuff lands πlenβ Size of the destination buffer. Keep it honest, okay?
π RETURN π
Number of bytes read, or -EFAULT. That's the whole deal β either you get your byte count or you get the error, no in-between energy π
π DESCRIPTION π
So here's the tea, and it's important tea:
NOTE: unlikedvb_ringbuffer_read, this does NOT update the read pointer in the ringbuffer. You must usedvb_ringbuffer_pkt_disposeto mark a packet as no longer required.
Read that again. dvb_ringbuffer_read moves the read pointer. This one does not. It justβ¦ reads. It's giving "look but don't touch" main character energy π So when you're actually done with a packet, you have to call dvb_ringbuffer_pkt_dispose to say "okay this packet can go now." Don't skip that step, bestie, I'm begging π
π₯ SEE ALSO π₯
Kernel file ./include/media/dvb_ringbuffer.h β go read the header, it's the whole family tree π³
struct dvb_ringbuffer(9)dvb_ringbuffer_init(9)dvb_ringbuffer_empty(9)dvb_ringbuffer_free(9)dvb_ringbuffer_avail(9)dvb_ringbuffer_reset(9)dvb_ringbuffer_flush(9)dvb_ringbuffer_flush_spinlock_wakeup(9)DVB_RINGBUFFER_PEEK(9)DVB_RINGBUFFER_SKIP(9)dvb_ringbuffer_read_user(9)dvb_ringbuffer_read(9)DVB_RINGBUFFER_WRITE_BYTE(9)dvb_ringbuffer_write(9)dvb_ringbuffer_write_user(9)dvb_ringbuffer_pkt_write(9)dvb_ringbuffer_pkt_read(9)dvb_ringbuffer_pkt_dispose(9)dvb_ringbuffer_pkt_next(9)
okay that's the whole page, you ate that π this little cutie lives in ./include/media, it's dated October 2026, and the header on the tin says dvb_ringbuff...kt_read_user(9) β yes with the dots, it's a whole aesthetic π go read some packets, bestie, and remember to dispose them πΈπ¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms