From owner-freebsd-transport@freebsd.org Thu Sep 24 21:31:21 2020 Return-Path: Delivered-To: freebsd-transport@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 16CD43E1300 for ; Thu, 24 Sep 2020 21:31:21 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4By7X861yBz4GTm for ; Thu, 24 Sep 2020 21:31:20 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id CEBFD3E11C8; Thu, 24 Sep 2020 21:31:20 +0000 (UTC) Delivered-To: transport@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 CE70F3E11C7; Thu, 24 Sep 2020 21:31:20 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4By7X75s31z4GTk; Thu, 24 Sep 2020 21:31:19 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-ed1-x52f.google.com with SMTP id n22so403356edt.4; Thu, 24 Sep 2020 14:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LdCnm6q1g7D0XBrVPT4bkrKJhrdEJsch/+JMOvzmD2w=; b=V89lipM1OWZPuuEDd8K+viQoDlfQWNO+2fxi82LUtSAPzvrbdxF9jUTu24CaW4A2VM LDFuAhRCk3VrtsKDv5T79FVD3k/O6Dv7BL74b4b7Ocb490ZilMqa5L/sLKU+zC9Rkf1T 5PAXMCvLHFdrW8rCKFQ126AA1vhQCy1MQbT1MWVDpilni65IZlnZvXPc/8UtgXyG2qBS dQi1J5/3puwxM3eqg8oZuCsdrPwNWi7oTNl8Rl8CKs9961WLcmWDMv27crFK+mgbT0jt riYE+1ibC5EvdAdUexyHm5/YaBpjC85d7hQ16lk9wPJo9lh8N44PidueSi42a21SwkRT 08sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LdCnm6q1g7D0XBrVPT4bkrKJhrdEJsch/+JMOvzmD2w=; b=QkTj8j4dm83Baui005i8ArVuPfUqJT0dyxA2Rf+LHVuUR16xM+CNA5Nq4R5BB3L55k /xeKuEpL5gevTwMsWl9wdqrnyv/hrto6akyovMtV+Nj9907+jsmBZKHGcXSwGx41ygbr 747MF06QDalvDDUowkmwV+ZP80sDpz9gbm2z9IKnLBNDuzhpvcz6YTRRNT4DmetMDxbd 4byZXo2fc+rwC+mvt1g6MjVC4hEJi9KVG9tj+B7rwScCYhg5TnHCVy2lHf2N/xNHWjxV KedelnHTM9JlUHJbleLVx+AAtoYaNfwShOYPd2TBAIT4mGR4XIQRo40zm5G/iqneXygj fWMg== X-Gm-Message-State: AOAM532053aVtQC4NELcVTp+UBtcFW83A3UI+5qQJNJbg+ZFZR72BOvf Z6iNRXfPL9G9OAWnicXRc4AxnXaQ69tC2glXGO2OCesq X-Google-Smtp-Source: ABdhPJyRVMXsZz0ETCGeQhgtuQU7yyDHSF/X8DiWzdai7xHoWsKefptWbgbPtWCgW+PZZWtppIWBeSKnVln8ehQ2h88= X-Received: by 2002:aa7:d15a:: with SMTP id r26mr779818edo.181.1600983078339; Thu, 24 Sep 2020 14:31:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ryan Stone Date: Thu, 24 Sep 2020 17:31:07 -0400 Message-ID: Subject: Re: Socket option to configure Ethernet PCP / CoS per-flow To: "Scheffenegger, Richard" Cc: "net@FreeBSD.org" , "transport@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4By7X75s31z4GTk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=V89lipM1; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rysto32@gmail.com designates 2a00:1450:4864:20::52f as permitted sender) smtp.mailfrom=rysto32@gmail.com X-Spamd-Result: default: False [-2.88 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.13)[0.132]; NEURAL_HAM_LONG(-1.00)[-0.995]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52f:from]; NEURAL_HAM_MEDIUM(-1.02)[-1.016]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[net,transport]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2020 21:31:21 -0000 On Fri, Sep 11, 2020 at 12:33 PM Scheffenegger, Richard wrote: > > Hi, > > Currently, upstream head has only an IOCTL API to set up interface-wide d= efault PCP marking: > > #define SIOCGVLANPCP SIOCGLANPCP /* Get VLAN PCP */ > #define SIOCSVLANPCP SIOCSLANPCP /* Set VLAN PCP */ > > And the interface is via ifconfig pcp . > > However, while this allows all traffic sent via a specific interface to b= e marked with a PCP (priority code point), it defeats the purpose of PFC (p= riority flow control) which works by individually pausing different queues = of an interface, provided there is an actual differentiation of traffic int= o 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 differe= ntly from whatever the interface default is (unmarked, or the default PCP). > > Does the community see value in having such a socket option widely availa= ble? (Linux currently doesn't seem to have a per-socket option either, only= a per-interface IOCTL API). > > Best regards, > > Richard Scheffenegger > > _______________________________________________ > freebsd-transport@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-transport > To unsubscribe, send any mail to "freebsd-transport-unsubscribe@freebsd.o= rg" Hi Richard, At $WORK we're running into situations where PFC support would be very useful, so I think that this would be a good thing to add. I have a question: does your work also communicate the priority value for an mbuf down to the Ethernet driver, so that it can put the packet in the proper queue?