From owner-freebsd-net@FreeBSD.ORG Thu Dec 19 23:54:35 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B20E6178; Thu, 19 Dec 2013 23:54:35 +0000 (UTC) Received: from mail-qe0-x236.google.com (mail-qe0-x236.google.com [IPv6:2607:f8b0:400d:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 335FA159D; Thu, 19 Dec 2013 23:54:35 +0000 (UTC) Received: by mail-qe0-f54.google.com with SMTP id cy11so1782506qeb.27 for ; Thu, 19 Dec 2013 15:54:34 -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:message-id:subject :from:to:cc:content-type; bh=pdI5f6YWWF2AjvhQVhDM+lxcvs9VAg0uD7rJ+bDs6SU=; b=s99UeqL6m7k6xJSl2lGvRNsxA/BofpW7uoI3eyqMEdvEkE7iHdsB7JiBHnHRUAsgDY 8Gozw+Rq7k3IszO7au/kZpbpL2RiAYTjkK/A0tiKd9NzR98nXeXctBUPp5mpHrwdgdDG TDNJYqO3pWPARazP+oKeC1dDx3NCA8gYjJsqezLOpcItqvqOqwMezJ0PR54yo6I5oZnV os6h3mVkHiZe+AAc1ip1623SKmw2XY/HmOw7GyE2DUFR2hrBT/DBHewdb/1vh7p0Vd+G slQZiyvUkD0Pms0SlccByknz4qMH2Rhx8AppCrAbmWoXbcxQymKMtefnE8PO7WiMCJbF B3TQ== MIME-Version: 1.0 X-Received: by 10.49.24.211 with SMTP id w19mr8564468qef.9.1387497272919; Thu, 19 Dec 2013 15:54:32 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Thu, 19 Dec 2013 15:54:32 -0800 (PST) Received: by 10.224.53.200 with HTTP; Thu, 19 Dec 2013 15:54:32 -0800 (PST) In-Reply-To: <52B35113.9050108@FreeBSD.org> References: <20131219151606.GB71033@FreeBSD.org> <52B35113.9050108@FreeBSD.org> Date: Thu, 19 Dec 2013 15:54:32 -0800 X-Google-Sender-Auth: y5g_uqi32ShvxkiRF_fnFiJml8I Message-ID: Subject: Re: Removing queue length check in ip_output (was Re: buf_ring in HEAD is racy) From: Adrian Chadd To: Navdeep Parhar Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Jack F Vogel , Michael Tuexen , Ryan Stone , freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 23:54:35 -0000 Its checking the ifsnd queue. That just doesn't do anything sane or consistent with drivers that implement if transmit let alone multiqueue drivers. Adrian On Dec 19, 2013 2:03 PM, "Navdeep Parhar" wrote: > On 12/19/13 11:59, Adrian Chadd wrote: > > How's this? > > > > Index: sys/netinet/ip_output.c > > =================================================================== > > --- sys/netinet/ip_output.c (revision 259474) > > +++ sys/netinet/ip_output.c (working copy) > > @@ -123,7 +123,9 @@ > > struct mbuf *m0; > > int hlen = sizeof (struct ip); > > int mtu; > > +#if 0 > > int n; /* scratchpad */ > > +#endif > > int error = 0; > > struct sockaddr_in *dst; > > const struct sockaddr_in *gw; > > @@ -431,6 +433,25 @@ > > } > > > > /* > > + * Both in the SMP world, pre-emption world if_transmit() world, > > + * the following code doesn't really function as intended any > further. > > Doesn't make sense in the tx multiqueue world either. (which queue is > this piece of code checking?) > > Navdeep >