From owner-freebsd-net@FreeBSD.ORG Sat May 4 17:39:44 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 658B5916 for ; Sat, 4 May 2013 17:39:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by mx1.freebsd.org (Postfix) with ESMTP id 016147D7 for ; Sat, 4 May 2013 17:39:43 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id x12so2416891wgg.21 for ; Sat, 04 May 2013 10:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Zq3o+LHVPkw7bsteGuY32BJBzY65qUy+YV9w6/p3UHs=; b=X/z4tCcDxNmqXzv8GIrmV+h3ZWUpBIMkV621D381lTBDaMHmKvmVgQdJOwXCmPx++w PXiu9TKOcrKfklwhkzgyznzKAa/jMdByEASIz2UiWgfrjfnXOf/o8CkP62WTjOm5XjjH s/AFLkolNJ+UpWVawJVcrn7xrXY1hW7DUlWvWmTH8+Tr9mu41Tn7fuxNPolxSlkUUZhn 6sh0/WIr0qVOkoFlFjmGUTzAmKV5lPPaDZjp/Ai3OF2MOswCbeSoSl0Y/MsYQfeTsb5d /reVIPEUz6jJFR4H34oaD4Ypdk6otGshu4f78eAmQ4L2VhdvfAxghnjUIVAlXqUs+hM/ uVNQ== MIME-Version: 1.0 X-Received: by 10.180.89.140 with SMTP id bo12mr2602695wib.22.1367689183141; Sat, 04 May 2013 10:39:43 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.58.138 with HTTP; Sat, 4 May 2013 10:39:43 -0700 (PDT) In-Reply-To: References: Date: Sat, 4 May 2013 10:39:43 -0700 X-Google-Sender-Auth: B6PcLIgsw-lPfNoQmC-L__Qoc1Y Message-ID: Subject: Re: Is there any way to limit the amount of data in an mbuf chain submitted to a driver? From: Adrian Chadd To: Richard Sharpe Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org 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: Sat, 04 May 2013 17:39:44 -0000 .. and please file a PR. I'm sure Jack will love this kind of feedback. :) Thanks for doing this debugging! I'm glad to see others getting dirty in the network stack. Adrian On 4 May 2013 06:52, Richard Sharpe wrote: > Hi folks, > > I understand better why I am seeing EINVAL intermittently when sending > data from Samba via SMB2. > > The ixgbe driver, for TSO reasons, limits the amount of data that can > be DMA'd to 65535 bytes. It returns EINVAL for any mbuf chain larger > than that. > > The SO_SNDBUF for that socket is set to 131972. Mostly there is less > than 64kiB of space available, so that is all TCP etc can put into the > socket in one chain of mbufs. However, every now and then there is > more than 65535 bytes available in the socket buffers, and we have an > SMB packet that is larger than 65535 bytes, and we get hit. > > To confirm this I am going to set SO_SNDBUF back to the default of > 65536 and test again. My repros are very reliable. > > However, I wondered if my only way around this if I want to continue > to use SO_SNDBUF sizes larger than 65536 is to fragment large mbuf > chains in the driver? > > -- > Regards, > Richard Sharpe > (=A6=F3=A5H=B8=D1=BC~=A1H=B0=DF=A6=B3=A7=F9=B1d=A1C--=B1=E4=BE=DE) > _______________________________________________ > 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"