From mboxrd@z Thu Jan 1 00:00:00 1970 From: Taran Lynn Subject: QDisc Implementation: Setting bit rate and getting RTT Date: Tue, 03 Jul 2018 16:13:18 -0700 Message-ID: <76defaacd96053915523b4ba91693d5dca3d9158.camel@ucdavis.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: "netdev@vger.kernel.org" Return-path: Received: from mail-pf0-f170.google.com ([209.85.192.170]:37108 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbeGCXNU (ORCPT ); Tue, 3 Jul 2018 19:13:20 -0400 Received: by mail-pf0-f170.google.com with SMTP id h20-v6so1699887pfn.4 for ; Tue, 03 Jul 2018 16:13:19 -0700 (PDT) Received: from campus-053-029.ucdavis.edu (campus-053-029.ucdavis.edu. [168.150.53.29]) by smtp.gmail.com with ESMTPSA id n86-v6sm1489184pfj.68.2018.07.03.16.13.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 16:13:19 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: Hello, I'm new to linux development and am working on creating a qdisc module, similar to those under net/sched/sch_*.c. Currently I'm stuck on two things. 1. What's the best way to set the maximum bit rate? 2. How do I determine the RTT for packets? For (1) I'm currently tracking the number of bits sent, and only sending packets if they stay within the appropriate rate bound. Is there a better way to do this? I've looked at net/sched/sch_netem.c, and as far as I can tell it determines the delay between packets for a given rate and sends them after that delay has passed. However, when I tried to do this I got inconsistent rates, so I think I may be missing something. As for (2) I'm not sure where to start. Thanks in advance for any advise.