From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 8A36821F0E8; Mon, 14 May 2012 11:31:52 -0700 (PDT) Received: by bkty5 with SMTP id y5so9253144bkt.16 for ; Mon, 14 May 2012 11:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=lDI1hSi9773UswOE8dNize0+WDFDj4q+th5qGmEcWyw=; b=uP6Uj98/6IwxLlPJU4oUCfRc4EGpi+m4wyjt3+IPYRhbDAcBU8YYzKdYVQW6R5Ujr9 aP3nNBthrr8UMsPokObh8xJ/wiaK8Wb/eovB3Nwh+CqCCn24B5kCGKf/SHsOARyE8SMe gyAq+4ueTHjPIOJlXdCgy9BOycIY/f5Rg8aGm2QZGXiM4hT2ogsLEIZCYAELdOxJwFIQ WQK7tTym9/tYTCy1Vr6p9Mlm2AfrMC1iIuJxHrAS2jFLun7pgLaRt9ujvdeWFp9YOcof +SX617e62J1EOFEJC0Js/e73eyijC+gmscMJuUNOdOUwLhS1TcFWorZflqKQzes+n6OH y2Rg== Received: by 10.205.133.212 with SMTP id hz20mr3384415bkc.99.1337020310458; Mon, 14 May 2012 11:31:50 -0700 (PDT) Received: from [192.168.178.86] ([74.125.122.49]) by mx.google.com with ESMTPS id z14sm36571439bky.15.2012.05.14.11.31.48 (version=SSLv3 cipher=OTHER); Mon, 14 May 2012 11:31:49 -0700 (PDT) From: Eric Dumazet To: Juliusz Chroboczek In-Reply-To: <7id366vcwb.fsf@lanthane.pps.jussieu.fr> References: <4FB129EC.90200@gmail.com> <7imx5a3b4t.fsf@lanthane.pps.jussieu.fr> <1337018621.8512.592.camel@edumazet-glaptop> <7id366vcwb.fsf@lanthane.pps.jussieu.fr> Content-Type: text/plain; charset="UTF-8" Date: Mon, 14 May 2012 20:31:47 +0200 Message-ID: <1337020307.8512.599.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: codel@lists.bufferbloat.net, bloat@lists.bufferbloat.net Subject: Re: [Codel] [Bloat] better tc support for bittorrent/diffserv X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2012 18:31:53 -0000 On Mon, 2012-05-14 at 20:24 +0200, Juliusz Chroboczek wrote: > > There is an API to set ECN on UDP packets. > > > > setsockopt() IP_TOS, with val = 2 > > Interesting, I didn't realise that. Is it also possible to read the ECN > bits? Yep man 7 ip IP_RECVTOS (since Linux 2.2) If enabled the IP_TOS ancillary message is passed with incoming packets. It contains a byte which specifies the Type of Service/Precedence field of the packet header. Expects a boolean integer flag.