From owner-freebsd-net@freebsd.org Mon Dec 25 11:34:57 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2603E852AE for ; Mon, 25 Dec 2017 11:34:57 +0000 (UTC) (envelope-from menyy@mellanox.com) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00040.outbound.protection.outlook.com [40.107.0.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495E113BC for ; Mon, 25 Dec 2017 11:34:55 +0000 (UTC) (envelope-from menyy@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DDRQbDt24eFGfMPOv5ixzinAnnez3EzN+3XSnqwdIIc=; b=OBU9HFL0MAOvTKMcYkVxQIfPMZBUI24Vx+vj3rbgaZQaBi2CwERb5yJPusVgtpjvrFR29XCZKgY8X5Fd7ywkrMFFCdQG02ew6FmgwXtkkNkqeTk8pezzm97GCwKoe146oSd2yUtBrru4BrpeTOpkPUC8x1aESyr8FdpJpfOjfGE= Received: from VI1PR0501MB2863.eurprd05.prod.outlook.com (10.172.12.8) by VI1PR0501MB2591.eurprd05.prod.outlook.com (10.168.137.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Mon, 25 Dec 2017 11:34:52 +0000 Received: from VI1PR0501MB2863.eurprd05.prod.outlook.com ([fe80::d65:824:64e3:9602]) by VI1PR0501MB2863.eurprd05.prod.outlook.com ([fe80::d65:824:64e3:9602%18]) with mapi id 15.20.0345.016; Mon, 25 Dec 2017 11:34:52 +0000 From: Meny Yossefi To: "freebsd-net@FreeBSD.org" CC: Konstantin Belousov , Hans Petter Selasky , Slava Shwartsman , Matthew Finlay Subject: Setting priority per flow Thread-Topic: Setting priority per flow Thread-Index: AdN9XHjyTAaPViC/Sn2rJ3WzUNBQqg== Date: Mon, 25 Dec 2017 11:34:52 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=menyy@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2591; 6:jl4OjyAWSsYA+UgpJx0wBziQn3k7H2PHqoHCcnbxycfaVKZhYMerKiY5JHA3YTfPLKHRonQwjBibwIjJznpF2iVsyT1ksXnuCaTusiadzqq61Ok4sZBBPTYywfVEap2eXPhLVLS6Jjhna/B1RJX43nCkAB1QeOTqmMwhX1wRipjME9o4aueOjUySx0yDzoAEDigCJ59Gauv2509nol0LcugG8RE3sAutJdrzHZN/V1J6prpqXLfDG6VAAkvWJqgi64cjO+rxRtXeUfW6wqv31nnGo/ZHSdx8YIaXxiVMEEV5B6tSSQkVhsPCdvCwASbWUCxgQS4IcwU0eDTisWLjBxAm+RTw1TYnuEA2N2v4qdSbtXTau+rPl395EFhHED9r; 5:7wPzs8b3yJ8OBLe6R6bZeLLta6ihbB0kdUX08VPclBc5mfqm4i9hPG+E1Vi/aBux61cJDsyFU9roVxBt6cPUaDN0WyIel9GdBd6mqEMeRl47SnuUkWBjreamoypC5a6GI95djaW4hyjOBdIA4TWCh5j9WUl4JQeboKOc6K/A/s8=; 24:gixOgidb28rsIbrOSxhtVkgU0pF7lqI2yp9Cb6k6okv8eusJKQkg6VwAFG+m5oORSuCkoSWmYU4Rpa1aQO2gDIlzUeyZ4t5JRuD2oonzEJw=; 7:OCfgXU66qIXt6867gL4F+elR3D0pEWe4BM6GsZWBSV0l9WNcus9SinZwXF7r9DVPP2zgVS3oBwgrmGkqTqabY72AghL3vNb2hMc688WsgidnSAq42g909u/Bc5ZscIWly0n9tgGhFLKari4oVvZ3WBLtUZpEJ6aarqz71DoQ8TJ4pnxEhqdf9tjoFWCfCK73DZb982ahxU/jTfZGkUsjRUhdp5f7B4eo0K88T2U3YE7a9Fnasymi8PB561jQkCFp x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: 19e819da-7675-4475-ecfa-08d54b8b83b1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060); SRVR:VI1PR0501MB2591; x-ms-traffictypediagnostic: VI1PR0501MB2591: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231023)(944501075)(93006095)(93001095)(6055026)(6041268)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR0501MB2591; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR0501MB2591; x-forefront-prvs: 0532BF6DC2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(376002)(396003)(346002)(53754006)(51874003)(189003)(199004)(5250100002)(106356001)(105586002)(2351001)(33656002)(68736007)(86362001)(2501003)(2900100001)(9686003)(55016002)(66066001)(5640700003)(3846002)(6116002)(5660300001)(81156014)(99286004)(81166006)(74316002)(7696005)(6436002)(6916009)(7736002)(107886003)(478600001)(305945005)(25786009)(97736004)(14454004)(8936002)(3480700004)(2906002)(8676002)(53936002)(6506007)(3660700001)(102836004)(3280700002)(54906003)(4326008)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2591; H:VI1PR0501MB2863.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: eYBZLjUIDXdAfLcqjuFCJ/yebcq5Nn9wyJayq2I8w97EWbLGUe1RP+N46hJe+/tov+PsQeDD+WqrZVHDu2YxSA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19e819da-7675-4475-ecfa-08d54b8b83b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Dec 2017 11:34:52.3556 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2591 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 11:34:57 -0000 Hi all, I'd like to set priority per flow in FreeBSD for PFC use. In Linux, I can do so using a socket option (SO_PRIORITY) which eventually = will be mapped into the PCP bits in the VLAN tag. Is there a FreeBSD equivalent? So far I could only find an 'ifconfig' optio= n to set PCP ('vlanpcp'), but that's only per VLAN interface, not a specifi= c flow. Also, is there a way to configure prio-tagging (priority over VLAN ID 0)? I= t seems that setting VLAN with ID 0 is not permitted:=20 sys/net/if_vlan.c, vlan_config() lines 1418: /* * Don't let the caller set up a VLAN VID with * anything except VLID bits. * VID numbers 0x0 and 0xFFF are reserved. */ if (vid =3D=3D 0 || vid =3D=3D 0xFFF || (vid & ~EVL_VLID_MASK)) return (EINVAL); Nothing on the receive side suggests this case is being handled as well. I Would appreciate an elaborated answer in case I'm missing something here. Thanks in advance, Meny