From owner-freebsd-net@freebsd.org Fri Sep 11 16:33:21 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 B3C4A3DFC7B for ; Fri, 11 Sep 2020 16:33:21 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) 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 4Bp1XK3FJRz4YVS for ; Fri, 11 Sep 2020 16:33:21 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) Received: by mailman.nyi.freebsd.org (Postfix) id 6DB843DFA1B; Fri, 11 Sep 2020 16:33:21 +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 6D6823DFD07; Fri, 11 Sep 2020 16:33:21 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bp1XJ4YVJz4YY2; Fri, 11 Sep 2020 16:33:20 +0000 (UTC) (envelope-from Richard.Scheffenegger@netapp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cFyr1wv+8Qi474N4+8t8YsKqlOHvtNQQGTCswkx73ZLGWZthpm7+c9W1mWUIJ6Xs5rspPbiRligGMBZo4/FZOBoB3uSMscZudQcNxkBAGARAJss/yWk3OBvvZmJCm3vYNAxqLRX/+qPDq+jfzGCEsf+LRYu09+8w2dhvfTwOtLQRFHnG0lsn8anWipUrERvmWH7ua5oVHttuQE/dTt2SYyEdpPSVTj/1+RyssAv7InQ6rvNGTHBfmt7BRY7iNeEzp8FMNkiVNdwOlLFww2j+kKtpWqat7vBaxojguWKkfWm8gz0ls5ck4HzTCW6xHoDC8dHhuSsJ7iHQT/qhh1rpfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/DO9tNeVZlrJcRLIw3D8uqakPBntha175vMiNeH3S3c=; b=nF6BYiH6Xlr1MMwulbRH1xmBfZ95qYjE2bPIaQFYX5qM56vdkcHZbNdbAJQkf2EawFRurqFp8CCP1cNlsDNwdm6pXgSM5V89hDdY4WuRng08iqTS0yUdQ6/DqIYThMG7E1oVLdv0kBF/XyMjDTJJ39NKI+FebgftYINbVK5Gw/K+u/1NNJ2+vqXk2wdcdMrNMHUso7LAVuUMkuRd3L4h09jUGLHxzVHYxb4yxl3IF3Z5SEoyqVEjmmIFu5nPMIoUc+ovykqeBFALq1MiOcrkvSyVwk0CXqxPXNTxSEyqXpEzGarVTCIOaiAwRWYLK9YMayx8pWSWle5tbOxLqwkZSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=netapp.com; dmarc=pass action=none header.from=netapp.com; dkim=pass header.d=netapp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/DO9tNeVZlrJcRLIw3D8uqakPBntha175vMiNeH3S3c=; b=qjnhWVJUDndaZo3q+JPhsUr70ypIqHy7RptcUbgkyhuflNOW9i9DrcwOPzEYnRBZ8GB8yXnLvZZ7cgINKe0K80Mg15HGpBHVIo8F++nnVxjoP8cdHK2qK/uZ1tYfL4/voUdSfgnZq2EWVDCIenao6pQ2+mBR9Q0pO8QFAHM93UA= Received: from SN4PR0601MB3728.namprd06.prod.outlook.com (2603:10b6:803:51::24) by SN6PR06MB3904.namprd06.prod.outlook.com (2603:10b6:805:1b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.17; Fri, 11 Sep 2020 16:33:18 +0000 Received: from SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::84a9:fc74:7eed:ca3a]) by SN4PR0601MB3728.namprd06.prod.outlook.com ([fe80::84a9:fc74:7eed:ca3a%7]) with mapi id 15.20.3370.017; Fri, 11 Sep 2020 16:33:18 +0000 From: "Scheffenegger, Richard" To: "net@FreeBSD.org" , "transport@freebsd.org" Subject: Socket option to configure Ethernet PCP / CoS per-flow Thread-Topic: Socket option to configure Ethernet PCP / CoS per-flow Thread-Index: AdaIV6Ig8St2MdM0SrW3cDX5AzmWpw== Date: Fri, 11 Sep 2020 16:33:18 +0000 Message-ID: Accept-Language: de-AT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [217.70.211.11] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b4c33195-ffb0-4dba-dad9-08d8567063db x-ms-traffictypediagnostic: SN6PR06MB3904: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I/cQiVSwJ1a5+ifkSbFUYJGlUp8He2p8TWL98sazuE8wYmYZXidjjx+z9JWQ1ZSifNnl6n+SPwa3i4QgQaqC+hEmtxwgq7yQWMdzUf4TdB5QYK8zshYNqq97Rbx6cYXIr6OINVD1qYS3YldqCwIRgaShuKECgfPy5h/WkYYq0iPv//mpTJDzsIySSgTbs0L6qwkmbmJT3TZ6dYogPhwlpdA50kC/QZT/YsmiFbN/uuIlMJkjrufPAH/z5EkVnqayDLpbs/0Wq/nmYJr6e/NoDMe14I4RnKgyx8j9CVIVjUEFwMkCmkBTxY/7r5z9b1jgsUf5GIm+7bBOcuURDE6poA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR0601MB3728.namprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(366004)(396003)(376002)(136003)(9686003)(33656002)(316002)(2906002)(55016002)(450100002)(186003)(6506007)(66946007)(66476007)(71200400001)(26005)(52536014)(8676002)(66446008)(86362001)(110136005)(7696005)(8936002)(66556008)(478600001)(5660300002)(76116006)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: VUMjkYWRO1F4sWXLU2FEEbGfuYksehMC2aP9lhzbvWQT9t1IJCfQCNKhYsnUGxeJBWktLP+3mfWDltVjhWnnAWc6tRdQq3ySXicVx4/IqfGRG1EMUFMYDA6XJ//q7xk3qQl9JYPdo3CMp5yIpp9j16HPJNvHZZWcK6AsdXOFrMrXxDq8SH+GLGlSsvjf82LR8mFnly7rn1T2TSYsTcUetX2y/7N/p6lJxx0RbWV8Xvk+0Gio4b3SJ3CfNjAocwyIJ63SZl4A9jD/yw1TjBvU5QUJmpBjVvY69wDC3eCWoBRmKUTg0wGaunLMGdJdJW9FRMKx4oN35Lt+28V3RWKCkljJJ9n2kG1Gfw8LO1OnPMiwM/5Hc3zdWLxS0tCgm3xQbPn1MhYG3jxPFwTptlrpULc5PnBbUKRstzQz3SuuaQQPtC92pYH85YJNwcm6jCQMIwZ9SrE7431RKd/hWGwa8RGsaDSWu7YVUwh3KG41NznSeWtOd37y0H0kAy5Yo3HkQy3FfScEZZsGotishIZoy0JnSQQMrxb+3tropo9qW+SwOyoxs+I6B36HB8xxIXjNnYPT7kGyw83X7arm582DJSYp3ADi5m7CepqoWj4NJ/h6jaNkBkQf2Dr4qaF5DtF614UboZcFLPxi46RU1auewQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: netapp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN4PR0601MB3728.namprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4c33195-ffb0-4dba-dad9-08d8567063db X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Sep 2020 16:33:18.3394 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OnBstEG7eS2VhR1R05rgAhOUI7cKhmRcYrHpnZZj8BvbcGbw08UAmoS470TAT4MHnpRLeJPj3UOKmKsNAMcT1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR06MB3904 X-Rspamd-Queue-Id: 4Bp1XJ4YVJz4YY2 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=netapp.onmicrosoft.com header.s=selector1-netapp-onmicrosoft-com header.b=qjnhWVJU; dmarc=none; spf=pass (mx1.freebsd.org: domain of Richard.Scheffenegger@netapp.com designates 40.107.237.85 as permitted sender) smtp.mailfrom=Richard.Scheffenegger@netapp.com X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.978]; R_DKIM_ALLOW(-0.20)[netapp.onmicrosoft.com:s=selector1-netapp-onmicrosoft-com]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[netapp.com]; NEURAL_HAM_LONG(-1.02)[-1.017]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[netapp.onmicrosoft.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[40.107.237.85:from]; NEURAL_HAM_SHORT(-0.45)[-0.452]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[net,transport]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.237.85:from] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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:33:21 -0000 Hi, Currently, upstream head has only an IOCTL API to set up interface-wide def= ault 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 be = marked with a PCP (priority code point), it defeats the purpose of PFC (pri= ority 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 s= pecifically for traffic associated with that socket, to be marked different= ly from whatever the interface default is (unmarked, or the default PCP). Does the community see value in having such a socket option widely availabl= e? (Linux currently doesn't seem to have a per-socket option either, only a= per-interface IOCTL API). Best regards, Richard Scheffenegger