[Ecn-in-quic] Darwin issue with setting ECN/DCSP via sendmsg

"Eggert, Lars" <lars@netapp.com> Wed, 29 November 2017 14:35 UTC

Return-Path: <lars@netapp.com>
X-Original-To: ecn-in-quic@ietfa.amsl.com
Delivered-To: ecn-in-quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A40E412762F for <ecn-in-quic@ietfa.amsl.com>; Wed, 29 Nov 2017 06:35:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=netapp.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eVrjIXxlit1V for <ecn-in-quic@ietfa.amsl.com>; Wed, 29 Nov 2017 06:35:07 -0800 (PST)
Received: from mx144.netapp.com (mx144.netapp.com [IPv6:2620:10a:4005:8000:2306::d]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 22DCF126CC7 for <ecn-in-quic@ietf.org>; Wed, 29 Nov 2017 06:35:07 -0800 (PST)
X-IronPort-AV: E=Sophos;i="5.44,473,1505804400"; d="asc'?scan'208";a="229347215"
Received: from vmwexchts03-prd.hq.netapp.com ([10.122.105.31]) by mx144-out.netapp.com with ESMTP; 29 Nov 2017 06:35:06 -0800
Received: from HIOEXCMBX07-PRD.hq.netapp.com (10.122.105.40) by VMWEXCHTS03-PRD.hq.netapp.com (10.122.105.31) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 29 Nov 2017 06:35:06 -0800
Received: from VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) by hioexcmbx07-prd.hq.netapp.com (10.122.105.40) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 29 Nov 2017 06:35:05 -0800
Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) with Microsoft SMTP Server (TLS) id 15.0.1320.4 via Frontend Transport; Wed, 29 Nov 2017 06:35:05 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hiMI5nz3F7lnP2ByrVxBu3hE2VEhMwZJzo9zKFKuXxE=; b=m8rb7xSI9GA3QG6XZlQhwnYV+eV1B5gZ+odJ73i/BxGaeCyWz9DsbkFRadxrWxilZK/HSA1HdBtaNV76AE5IZbJNH2m58EGN5tC/eHXaqp0xbpcEmjXh1AudbVlxusANiXRRqZJVCpyMtUOa4nra12v1Tx7gkwQSG+tHeH61+aQ=
Received: from BLUPR06MB1764.namprd06.prod.outlook.com (10.162.224.150) by BLUPR06MB1764.namprd06.prod.outlook.com (10.162.224.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Wed, 29 Nov 2017 14:35:04 +0000
Received: from BLUPR06MB1764.namprd06.prod.outlook.com ([10.162.224.150]) by BLUPR06MB1764.namprd06.prod.outlook.com ([10.162.224.150]) with mapi id 15.20.0260.007; Wed, 29 Nov 2017 14:35:04 +0000
From: "Eggert, Lars" <lars@netapp.com>
To: "ecn-in-quic@ietf.org" <ecn-in-quic@ietf.org>, Stuart Cheshire <cheshire@apple.com>
Thread-Topic: Darwin issue with setting ECN/DCSP via sendmsg
Thread-Index: AQHTaR8+FHcPpqI6NEm4OzO9m/qGSw==
Date: Wed, 29 Nov 2017 14:35:03 +0000
Message-ID: <D4780C25-61CC-42F3-8583-CD9E669E21F2@netapp.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3445.4.7)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=lars@netapp.com;
x-originating-ip: [2001:4ca0:0:f293:865:6ca:e284:4b40]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BLUPR06MB1764; 6:boGc4s1QOO1JQumU4zhXL3mZLlXpMUhwg/S5bs5p7t5lbcrtLEMi1RXd/b0YFV7BeAdy9V7zBd+Opd3umJHgt7Mti+MSNhI5S0uxX5zYuZ4mNNBNEsVKlTLKqDRZLja9hDPPXjWHG0nlUgD58DvaGjTQWMwsgEJEQ2j0W4qYbfeChRzsC8WSkIrCz9X2eZ4F2DV586G8LuB/iKBJmDJkQ5iOi6whVLTYYfkmPLRpt/1hx1LcVcl6TRgZDewzbju+8VIWj3aUDPQWU8CVZdo0MHbe5bZTJonFE3QGNJuEVAd4IhlG9Dqk8zAJ+keWzaBaiiuI7lf+SfTGLOy8MY5cyu0EZC7dzap+nCHA2OwJMdM=; 5:Bij2eXburNM3pniALGJBXKqcuSfRJRPXLXL8rfu3tDqqQCeWQvmQvHIdQcLL/2RTi8FYu8Slvc7BCwdqe1/c2qI1Yhr3afk6CAI8fL9olsaex1txPVr5ZCq34Thagv0NcuiOYebHo0iD3qfoDnJmE2uCOdwwysR5ZeXMVKSpNZ8=; 24:aRrFZbTjmAp00HgVKGVdFxgahb4QaO8qejAhX412ARbKCeibDWxaDhqsspVZowxeJ12yXqIP8p/0ohFgMSmUwW0snW0LsUNjfPnLUhoDgf8=; 7:Na6uURem+97nbCLwqOMN7EG9fHsYrl/UPbh6n4mThAT3pMj6Hv5s3DaT7VFOH40xgfFm+9fhXTZR82+JG5GpTbJN1gGPMYWyzikOSPPPTPLbXIlvn4TT/C8wbit/MvYaGg76IxpweK6yfc4s4N6ora0Efz3Ip71mFj0ok9/LQzhG+SxGdP4F/Tp5w/YWJ6vDmReSWzuHkcEWSY52jXfPVbKINMNrSKd5M1FhTHQgYiD7AyglDAtAF4rjlyEEKqJk
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: c52fd12a-4164-4492-62d2-08d537366128
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603271)(49563074); SRVR:BLUPR06MB1764;
x-ms-traffictypediagnostic: BLUPR06MB1764:
x-microsoft-antispam-prvs: <BLUPR06MB17643FD51BC6730FFB388533A73B0@BLUPR06MB1764.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040450)(2401047)(5005006)(8121501046)(3231022)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148)(201708071742011); SRVR:BLUPR06MB1764; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR06MB1764;
x-forefront-prvs: 05066DEDBB
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(366004)(199003)(189002)(82746002)(99936001)(68736007)(2906002)(102836003)(6116002)(8936002)(6436002)(6486002)(77096006)(50226002)(5660300001)(2501003)(50986999)(6506006)(86362001)(99286004)(33656002)(8666007)(189998001)(6512007)(83716003)(478600001)(14454004)(316002)(53936002)(305945005)(105586002)(3280700002)(57306001)(36756003)(106356001)(7736002)(25786009)(81156014)(81166006)(110136005)(101416001)(97736004)(3660700001)(8676002)(2900100001)(129583001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR06MB1764; H:BLUPR06MB1764.namprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: netapp.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/signed; boundary="Apple-Mail=_44E78AFF-4D83-40EE-8393-4633D4B2D4B9"; protocol="application/pgp-signature"; micalg="pgp-sha512"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: c52fd12a-4164-4492-62d2-08d537366128
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2017 14:35:03.8091 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR06MB1764
X-OriginatorOrg: netapp.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/ecn-in-quic/1UtxSm78Y6vs3NCRRqOo0BV9grA>
Subject: [Ecn-in-quic] Darwin issue with setting ECN/DCSP via sendmsg
X-BeenThere: ecn-in-quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "ECN in the QUIC protocol discussion list." <ecn-in-quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ecn-in-quic>, <mailto:ecn-in-quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ecn-in-quic/>
List-Post: <mailto:ecn-in-quic@ietf.org>
List-Help: <mailto:ecn-in-quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ecn-in-quic>, <mailto:ecn-in-quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Nov 2017 14:35:09 -0000

Hi,

sorry for abusing this list. In order to play with ECN and QUIC, I've added support for being able to set ECN (and DSCP) fields on the UDP packets I generate.

The good news is that the socket option calls to set the default for a socket are exactly the same on Linux, FreeBSD and Darwin, and it works on all platforms.

The other good news is that receiving per-packet ECN (and DSCP) information on inbound packets received via recvmsg/recvmmsg is almost identical on all three platforms (Linux uses a slightly different option name than the other two), and it also works everywhere.

Sending packets with per-packet ECN (and DCSP) information by initializing "struct cmsghdr" information for sendmsg/sendmmsg also uses the same API on all three platforms. However, it only seems to work on Linux and FreeBSD.

On Darwin, there is no error, but the outbound packets are *not* marked as indicated in the accompanying "struct cmsghdr".

In case this is of interest to anyone.

Lars