Date: Fri, 28 Jul 2023 19:47:08 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272780] genet: General question of DMA alignment requirement for tx/rx_buf Message-ID: <bug-272780-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272780 Bug ID: 272780 Summary: genet: General question of DMA alignment requirement for tx/rx_buf Product: Base System Version: CURRENT Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jiahali@blackberry.com Hi, Is there a DMA alignment requirement for genet driver's TX/RX buffer? In gen_bus_dma_init(), genet driver requires the TX/RX buffer to be 4 bytes aligned. However, gen_newbuf_rx() fetches a mbuf cluster, then trims the fi= rst two bytes of the mbuf cluster. My understanding is that the RX buffer will be 2 bytes aligned but might no= t be 4 bytes aligned. I understand that the DMA stack will handle this misalignm= ent using something like a bounce buffer.=20 Since there isn't a document for the bcm ethernet controller online, I am curious about the reason why genet driver does not enforce the allocated mb= uf to be 4 bytes aligned. In TX, genet driver does not know the starting address of mbuf passed from = the upper layer. Is it possible that the genet driver is also compatible with other alignment constraints, like 1, 2, or 32 byte(s)? Thanks, Jiahao --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272780-227>