From nobody Tue Nov 30 23:16:48 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD30818BEA5F for ; Tue, 30 Nov 2021 23:16:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3dQS2plnz4pqq for ; Tue, 30 Nov 2021 23:16:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40A671EF4A for ; Tue, 30 Nov 2021 23:16:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1AUNGmUO038581 for ; Tue, 30 Nov 2021 23:16:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AUNGmDK038580 for bugs@FreeBSD.org; Tue, 30 Nov 2021 23:16:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260114] [sctp] SO_SNDLOWAT is not accounted for when sending data Date: Tue, 30 Nov 2021 23:16:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: albin.hellqvist@ericsson.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638314208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzOcbnjZomVU33KQhnul5sC+YcCFfx7ynK9gek+G91U=; b=v9VdlCVElUG093PnYt3lrE5H1yRcE3TuWg465V+NtLmncROkOVYXTNlgY/SFFfnEX+QLo7 XU+EsAXtswpShBzdzmIRkCndy66O8AOQ580BSyKpLk1HNA9vQemKV4fO0zvywbw67oy3zC i0Ig+lpLIYM/vhfiEUo9hZnRsW1x26V8lmVcAo/z/s2JW+z9+Ewem+7N8JI6Yk6h8POLDc jhpP5/3CUQjKZC9hgiyRVYoY6gaFZ9gJud0oZCivlfKOQ0lyz7MI8iS39ZnDcW9V5KEI1u p+u42tzMhM/XAsY6blIdUs0miFju7BPlAfe2KKjGdYKmhQM4eW7UIHlZiPE3mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638314208; a=rsa-sha256; cv=none; b=NL5qM0FtQt0R7KiTMoxoVdOajnnWLHV6i756SsRtIuoLaAKgE3Md1EJfjLS/dWDmFgiJyy l9oOq/17B0UThnOCcsyE2kIZo/jdwkEa/Hqc9KVK7koAirOaTbODC+MOd0xE7vN03b48SU OOa0Tyqnc8dB/REujfStHGfmDzEAWjBFzBrfe0MEaVkrU+VF15yw/1YmzA/wxk47zMlmmd q0Et29F3lW09yGlA60RkOa64nrNKsl5fbCoQkost8FnDr4QJ43QKvtT+ZpHTTbbcEguhPa mfQgqj++mnojb+07MNiS8r0og5PfJ7VlJpEgPh0MwNNcTAqGMMuoDRUg36MGnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260114 --- Comment #2 from Albin --- I think that I have misinterpreted the SO_SNDLOWAT functionality and provid= ed a faulty/misleading example. To quote SO_SNDLOWAT again from the man: "Nonblocking output operations will process as much data as permitted subje= ct to flow control without blocking, but will process no data if flow control = does not allow the smaller of the low water mark value or the entire request to = be processed." Also, I don't know why I made the comment about blocking, since blocking is blocking, it will just block until all data has been buffered. I probably h= ad too much in my head since I submitted many bugs at once :) Anyway, I get it as one of the uses for SO_SNDLOWAT is to be able to guaran= tee buffering of entire "messages". For example, let's say that I have a SCTP socket which is message based. I = know that the largest message I want to be able to send is 8192 bytes so I set SO_SNDLOWAT to this value. Now, let's say that I have some congestion and my send buffer only has 2048 bytes free. Then I shouldn't be able to send any 8192 bytes messages, not e= ven parts of them. Not until the send buffer has at least 8192 bytes free. But I guess that I should be able to send a message of 512 bytes still? Sin= ce then the full message can be buffered. --=20 You are receiving this mail because: You are the assignee for the bug.=