From owner-freebsd-net@FreeBSD.ORG Tue Dec 11 14:15:28 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AD942CC; Tue, 11 Dec 2012 14:15:28 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id EE8508FC19; Tue, 11 Dec 2012 14:15:27 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id a19so3308122qad.13 for ; Tue, 11 Dec 2012 06:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=iITQRuEnCTVF00sTOHXJ52HlNIPgQHcnBVDx+bEYVvI=; b=Gk5y4GWl9FV07z9IFEGk86Akd9agChMJK7ATak8/mFA0ByRxWTsS428XS9L1NWwQNs g2+jHdbYkolFH6tH6KkGaDZXd/7F9A/qWsmtt/Ld5AJlx91VBZ0GkNhB1IbTkW+kKZcO WaSCsCgkm7M7+31svME4RvYAic5rxw0DqJxA5w2W4lTYxiVuPlX/cUoISzEgeoz1fmSm yXrrHxfvzFZBvB9Lc4Dc8P/XBbvauAhD1DP5VXVnO2jWJ++gmn51Jq/Vava7N9ukNRaV dghjR2Kut5Tv6n5nasJPg2nMzIX/qAbc/QrwA40acDhw8tg73C8lLXc4W7zX2e6QBvle jpuQ== MIME-Version: 1.0 Received: by 10.224.223.17 with SMTP id ii17mr27342030qab.13.1355235326687; Tue, 11 Dec 2012 06:15:26 -0800 (PST) Sender: ermal.luci@gmail.com Received: by 10.49.27.197 with HTTP; Tue, 11 Dec 2012 06:15:26 -0800 (PST) In-Reply-To: <1355231140.51621.YahooMailClassic@web121603.mail.ne1.yahoo.com> References: <20121211075853.GU48639@FreeBSD.org> <1355231140.51621.YahooMailClassic@web121603.mail.ne1.yahoo.com> Date: Tue, 11 Dec 2012 15:15:26 +0100 X-Google-Sender-Auth: mKg0NFgU4S5GYBybC4kFhgK64ak Message-ID: Subject: Re: igb and ALTQ in 9.1-rc3 From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Barney Cordoba Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net , "Clement Hermann \(nodens\)" , Jack Vogel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 14:15:28 -0000 On Tue, Dec 11, 2012 at 2:05 PM, Barney Cordoba wrote: > > > --- On Tue, 12/11/12, Gleb Smirnoff wrote: > > > From: Gleb Smirnoff > > Subject: Re: igb and ALTQ in 9.1-rc3 > > To: "Jack Vogel" > > Cc: "Clement Hermann (nodens)" , "Barney Cordoba" > , freebsd-net@FreeBSD.org > > Date: Tuesday, December 11, 2012, 2:58 AM > > On Mon, Dec 10, 2012 at 03:31:19PM > > -0800, Jack Vogel wrote: > > J> UH, maybe asking the owner of the driver would help > > :) > > J> > > J> ... and no, I've never been aware of doing anything to > > stop supporting altq > > J> so you wouldn't see any commits. If there's something > > in the altq code or > > J> support (which I have nothing to do with) that caused > > this no-one informed > > J> me. > > > > Switching from if_start to if_transmit effectively disables > > ALTQ support. > > > > AFAIR, there is some magic implemented in other drivers that > > makes them > > modern (that means using if_transmit), but still capable to > > switch to queueing > > mode if SIOCADDALTQ was casted upon them. > > > > It seems pretty difficult to say that something is compatible with > something else if it hasn't been tested in a few years. > > It seems to me that ATLQ is the one that should handle if_transmit. > although it's a good argument for having a raw "send" function in > drivers. Ethernet drivers don't need more than a send() routing that > loads a packet into the ring. The decision on what to do if you can't > queue a packet should be in the network layer, if we must still call > things layers. > > "start" is a leftover from a day when you stuffed a buffer and waited > for an interrupt to stuff in another. The whole idea is antiquated. > > Imagine drivers that pull packets off of a card and simply queue it; > and that you simply submit a packet to be queued for transmit. Instead > of trying to find 35 programmers that understand all of the lock BS, > you only need to have a couple. > > I always disable all of the gobbledegook like checksum offloading. They > just muddy the water and have very little effect on performance. A modern > cpu can do a checksum as fast as you can manage the "capabilities" without > disrupting the processing path. > > With FreeBSD, every driver is an experience. Some suck so bad that they > should come with a warning. The MSK driver is completely useless, as > an example. > > > BC > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > During implementation of if_transmit altq was not considered at all. The default if_transmit provides some compatibility but that is void since altq has not been converted to call if_transmit after processing the mbuf. ALTQ can be adapted quite easily to if_transmit model it just wasn't done at the time. With if_transmit model it can even be modularized and not be a compile kernel option since the queue of the iface is abstracted now. I have always wanted to do a diff but have not yet got to it. The change is quite simple just provide an altq_transmit default method and just hook into if_transmit model on the fly. You surely need to handle some iface events and enable altq based on request but its is not a hard to implement. I will always have this in my TODO but not sure when i can get to it. -- Ermal