NetBSD Problem Report #33025

From  Tue Mar  7 17:11:18 2006
Return-Path: <>
Received: by (Postfix, from userid 31301)
	id 8CDF663B89A; Tue,  7 Mar 2006 17:11:18 +0000 (UTC)
Message-Id: <>
Date: Tue,  7 Mar 2006 17:11:18 +0000 (UTC)
Subject: dmover makes radical assumptions about backends
X-Send-Pr-Version: www-1.0

>Number:         33025
>Category:       kern
>Synopsis:       dmover makes radical assumptions about backends
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 07 17:15:00 +0000 2006
>Originator:     Gavan Fantom
>Release:        N/A
There is no way to specify constraints on what a dmover backend can handle. A backend is expected to:

* be able to handle transfers of unlimited size
* be able to handle transfers at arbitrary unaligned addresses
* be able to handle transfers where inputs and outputs have *different* alignment
* be able to handle transfers with "unaligned" size
* be able to handle scatter/gather I/O

It is not uncommon for hardware using DMA to require that DMA transfer be aligned to a word, or some other power of two. It is also not uncommon for the size of a transfer to be similarly constrained.

Tricks involving separate handling of "heads" and "tails" to deal with unaligned data can not be applied here because the alignment of the inputs and the alignment of the output can not be guaranteed to be the same.

Many backends would also benefit from being able to put an upper limit on the size of transfer they will have to handle.

Also, some backends are unable to directly deal with scatter/gather I/O, so much work to split a request up into manageable chunks. A better place to do this would be within dmover, as then the same code could be leveraged for multiple backends.
Try to implement a dmover backend using hardware which has constraints.
The dmover_backend structure should contain extra fields which allow a backend to specify constraints. dmover would then ensure that those constraints are satisfied, or choose a different backend.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.