NetBSD Problem Report #22621
Received: (qmail 6750 invoked by uid 605); 27 Aug 2003 18:33:47 -0000
Message-Id: <20030827183346.46D927B69@yeah-baby.shagadelic.org>
Date: Wed, 27 Aug 2003 11:33:46 -0700 (PDT)
From: thorpej@shagadelic.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: thorpej@shagadelic.org
To: gnats-bugs@gnats.netbsd.org
Subject: opencrypto uses IPL_NET - should be IPL_BIO
X-Send-Pr-Version: 3.95
>Number: 22621
>Category: kern
>Synopsis: opencrypto uses IPL_NET - should be IPL_BIO
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Aug 27 18:34:00 +0000 2003
>Closed-Date:
>Last-Modified:
>Originator: Jason R Thorpe
>Release: NetBSD 1.6X
>Organization:
>Environment:
System: NetBSD swinger.shagadelic.org 1.6X NetBSD 1.6X (SWINGER) #15: Tue Aug 26 15:43:43 PDT 2003 thorpej@yeah-baby.shagadelic.org:/u1/netbsd/src/sys/arch/i386/compile/SWINGER i386
Architecture: i386
Machine: i386
>Description:
opencrypto uses IPL_NET (and splnet()) as the interrupt priority
level for hardware crypto drivers, and for queue synchronization.
This elevated IPL is not necessary. Crypto devices are logically
more like block I/O devices, and a delay in interrupt service of
a crypto device is extremely unlikely to result in data loss (I
hontestly can't think of any scenario where that would that would
happen, since the only existing user of opencrypto is fast-ipsec,
which itself runs at IPL_SOFTNET, which is a lower priority than
IPL_BIO).
Furthermore, the use of IPL_NET for crypto hardware could result
in increased latency for network interface interrupt service, which
could result in data loss (dropped packets due to full network
interface buffers) or an overall reduction in network performance.
>How-To-Repeat:
Code inspection.
>Fix:
Looks like simply changing splcrypto to expand to splbio would
work, along with the corresponding IPL_* adjustment in crypto
hardware drivers.
>Release-Note:
>Audit-Trail:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.