From owner-freebsd-net@freebsd.org Fri Sep 11 16:54:36 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0F103E01FE for ; Fri, 11 Sep 2020 16:54:36 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4Bp20r5XMhz4ZJl for ; Fri, 11 Sep 2020 16:54:36 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: by mailman.nyi.freebsd.org (Postfix) id BA9FB3E0363; Fri, 11 Sep 2020 16:54:36 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA4E13E00D1; Fri, 11 Sep 2020 16:54:36 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4Bp20q4NCYz4ZTy; Fri, 11 Sep 2020 16:54:35 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from localhost (bizet.nethelp.no [IPv6:2001:8c0:9e04:500::1]) by bizet.nethelp.no (Postfix) with ESMTP id 5B9B3E6047; Fri, 11 Sep 2020 18:54:32 +0200 (CEST) Date: Fri, 11 Sep 2020 18:54:32 +0200 (CEST) Message-Id: <20200911.185432.122001633.sthaug@nethelp.no> To: Richard.Scheffenegger@netapp.com Cc: net@FreeBSD.org, transport@freebsd.org Subject: Re: Socket option to configure Ethernet PCP / CoS per-flow From: sthaug@nethelp.no In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bp20q4NCYz4ZTy X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sthaug@nethelp.no designates 195.1.209.33 as permitted sender) smtp.mailfrom=sthaug@nethelp.no X-Spamd-Result: default: False [-0.72 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.963]; RCPT_COUNT_THREE(0.00)[3]; RWL_MAILSPIKE_GOOD(0.00)[195.1.209.33:from]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[nethelp.no]; NEURAL_SPAM_SHORT(0.11)[0.113]; NEURAL_HAM_LONG(-0.97)[-0.971]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[195.1.209.33:from]; FROM_NO_DN(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2116, ipnet:195.1.0.0/16, country:NO]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[net,transport] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 16:54:37 -0000 > However, while this allows all traffic sent via a specific interface to be marked with a PCP (priority code point), it defeats the purpose of PFC (priority flow control) which works by individually pausing different queues of an interface, provided there is an actual differentiation of traffic into those various classes. > > Internally, we have added a socket option (SO_VLAN_PCP) to change the PCP specifically for traffic associated with that socket, to be marked differently from whatever the interface default is (unmarked, or the default PCP). > > Does the community see value in having such a socket option widely available? (Linux currently doesn't seem to have a per-socket option either, only a per-interface IOCTL API). I've been doing quite a bit of network testing using iperf3 and similar tools, and have wanted this type of functionality since the interface option became available. Having this on a socket level would make it possible to teach iperf3, ping and other tools to set PCP and facilitate/simplify testing of L2 networks. So the answer is a definite yes! This would be valuable. Steinar Haug, Nethelp consulting, sthaug@nethelp.no