From owner-cvs-all@FreeBSD.ORG Thu Nov 30 18:12:23 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93C5216A412; Thu, 30 Nov 2006 18:12:23 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7C7C43CAB; Thu, 30 Nov 2006 18:12:13 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kAUIC9l1079967; Thu, 30 Nov 2006 11:12:14 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <456F1EF9.4010900@samsco.org> Date: Thu, 30 Nov 2006 11:12:09 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ruslan Ermilov References: <200611301502.kAUF22lU076210@repoman.freebsd.org> <456F0B71.3050604@errno.com> <20061130172634.GC75179@rambler-co.ru> In-Reply-To: <20061130172634.GC75179@rambler-co.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Sam Leffler , Gleb Smirnoff , cvs-all@FreeBSD.org, src-committers@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/net if.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 18:12:23 -0000 Ruslan Ermilov wrote: > On Thu, Nov 30, 2006 at 08:48:49AM -0800, Sam Leffler wrote: > >>Gleb Smirnoff wrote: >> >>>glebius 2006-11-30 15:02:01 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/net if.c >>> Log: >>> The recent issues with em(4) interface has shown that the old 4.4BSD >>> if_watchdog/if_timer interface doesn't fit modern SMP network >>> stack design. >>> >>> Device drivers that need watchdog to monitor their hardware should >>> implement it theirselves. >>> >>> Eventually the if_watchdog/if_timer API will be removed. For now, >>> warn that driver uses it. >>> >>> Reviewed by: scottl >> >>Did I miss a headsup on this? Seems like something you should >>coordinate with folks so people can convert drivers beforehand. I >>understand the problem and I see this is just a printf but now we're >>going to have people asking what's going on. >> > > Yeah, with only two drivers in the tree using a new approach (if I'm > not mistaken based on what Gleb told me today) calling it "obsolete" > was I think (ahem) a bit premature. However, calling it "dangerous" > would be accurate and more threatening! > There are actually three drivers, and they are the more popular ones. > That way, I hope Sam's concern will be addressed as well, as it IS > dangerous, and there's no reason to hide the truth waiting for most > drivers to be converted. > > BTW, is if_{watchdog|timer} also dangerous for !MPSAFE drivers? > It's not dangerous unless you have a driver like em was doing dangerous things in response to the watchdog (i.e. locking problems specific to the driver). For the average driver, the existing watchdog mechanism just risks advertising that a timeout happened when really it did not. And for most drivers, the consequence of this is an unneeded chip reset and possibly some dropped packets. So, it's an annoyance and it's incorrect, but it's not dangerous; it does not cause a risk of data corruption, permanent loss of data, or a system panic (modulo bugs unique to a given driver). Scott