From nobody Fri Jul 28 19:47:08 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RCJ7J5LHWz4ppV9 for ; Fri, 28 Jul 2023 19:47:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCJ7J1GcDz3nQ1 for ; Fri, 28 Jul 2023 19:47:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690573628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ctCwi8LqeS6tqjiKbu32MFQzPaEj9kt9vIwiYP8AzU4=; b=hOU3sEsoYVfBGqD11FuNe+/c7ziB9L3iKwCJ1a9nRmPBcGYj+NZS+1NbewxQxkOa6NFII3 qnrH40vay3IQP/Is7KGSEM5/O4ruh2Z5NruYKyWmWiA2wSlcOTxiuD1qjEWX6gJomv2Fsq /cd6VJYcyw47LynZSNV6+ImWJVLeP3g0oT61zjGREdXKrxKx0noOt2SCQdXZeuhIlZqamT mctgIoWxHeCOHK1wZjQQS9eDYjXbTiumaXJ+rrqoS6lnDCQ9Unj9PFeKogjD3+opLuJ8VE joXsasJDjzXcy3feJGTXMkVd0s+StjQOUSouiXfOK7KPAPLJdhnx2Env0rG43w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690573628; a=rsa-sha256; cv=none; b=wFroAtS5BytpShh4qz7kJXC4p8GLe5p74kFO+CEIjTfksN7fbzzV8x7fCC8t8kqvDZYz/T YZz8UkbXvckFPWqpMXk33C3ebiGD+mq1bzlH2hyMiy/i8wOXQnhQq2k/IfpZBuGdj+obal q+v9JT8uybRjeC6dhRN7LSzjGLfyGfXzPFEyhjasZm8R69KjRnqpueZkSsnZ7q1rSNTSa7 a+mCfA1NcuoKxWdbBCiepnGLi+FaBaSwmnBvvaG932hptQs/3Oj2kysIW8TCiDoMbEEokK 7uXhYTQ/CDIHSDNSCg9rlnVdXvvCOyzH6Yrtk6dnYovXAukZAt/8dL023uz5Bw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RCJ7J0MQMz13xR for ; Fri, 28 Jul 2023 19:47:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36SJl7QN096445 for ; Fri, 28 Jul 2023 19:47:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36SJl7Mw096444 for bugs@FreeBSD.org; Fri, 28 Jul 2023 19:47:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272780] genet: General question of DMA alignment requirement for tx/rx_buf Date: Fri, 28 Jul 2023 19:47:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jiahali@blackberry.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 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.=