From patchwork Thu May 19 08:37:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 9124851 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 07AB0BF29F for ; Thu, 19 May 2016 08:36:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25F5720218 for ; Thu, 19 May 2016 08:36:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4389420211 for ; Thu, 19 May 2016 08:36:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754054AbcESIgL (ORCPT ); Thu, 19 May 2016 04:36:11 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:33956 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753930AbcESIgJ (ORCPT ); Thu, 19 May 2016 04:36:09 -0400 Received: by mail-lf0-f52.google.com with SMTP id m64so31605402lfd.1 for ; Thu, 19 May 2016 01:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dd1OII4T6ZcxmVyTr3N2377B+NrwMAIZyMhS6SfYBiY=; b=5LYzmq7upjkpBdxUOnzFUHEeYmCsE29lMy6eATm1HHsuCGd77A5XVD2OsvTTLGQBfs kwJpuEEvfrj9uLM1LNHUqN7i+bLqiLNmbGvHriS6T2bpxPXwa5DpF3h0f+AnsPEpBuoy Y0SZF4T8kCrRNJ92yfVvYUtJ9CAF/Nr2VptPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dd1OII4T6ZcxmVyTr3N2377B+NrwMAIZyMhS6SfYBiY=; b=LvmV5il1uDVIVKy70V4C1brFAWR+yYPlrALykofldYj+ZUVgJEMX3qoBWczCnsaUnx dwocpGQvwFOcensREL/l9U9fhDJypbULUxsIQbcrp0H8biIInSz+Ew3i8FPH5iiacbfg jKXoK4DghEDjlaR32ViP/41r2hOMRA6dwkoIgvJdkc0rWga1ooBLcR4Y7HHsLQ3hscBz aAGexfE5ywyKpqATWEnEOTtE2177oyufdOaE2nESVt2CgXD7cW13Q/VNqtduxrCEvQY5 WOt9qHJdmQqW4l319sEHZtpwYNn4HZk3uqYb7XFtIUVkVuEUdOUpfyFJ/v++lS+To+PV FOvQ== X-Gm-Message-State: AOPr4FWnfkKg6YXIuMQ9mUbjyNZ5tOSRWAYaKqFrcDR+mkOnGni0rUa50e1MMGXRWIDCrs7nCDpBrfhUo3fnZwgAtK7njR/ORmUPQT/IV1pNk6hO90I8c4Arub/6iav+0FxjQg0uBX/+SPqJEsOkH1tTneunMSVCTZyRHqCyUTB8QjwXtTFiyTwwnsc/MjTkYmMPj4A= X-Received: by 10.25.136.132 with SMTP id k126mr3517944lfd.134.1463646967902; Thu, 19 May 2016 01:36:07 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by smtp.gmail.com with ESMTPSA id ri2sm2151968lbb.41.2016.05.19.01.36.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 May 2016 01:36:07 -0700 (PDT) From: Michal Kazior To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, dave.taht@gmail.com, make-wifi-fast@lists.bufferbloat.net, apenwarr@gmail.com, Michal Kazior Subject: [PATCHv5 5/5] mac80211: add debug knobs for codel Date: Thu, 19 May 2016 10:37:52 +0200 Message-Id: <1463647072-16201-6-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1463647072-16201-1-git-send-email-michal.kazior@tieto.com> References: <1462446039-1070-1-git-send-email-michal.kazior@tieto.com> <1463647072-16201-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a few debugfs entries to make it easier to test, debug and experiment. Signed-off-by: Michal Kazior --- Notes: v5: * use the single "aqm" debugfs knob [Dave] v4: * stats adjustments (in-kernel codel has more of them) net/mac80211/debugfs.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 2906c1004e1a..53a315401a4b 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -126,13 +126,31 @@ static int aqm_open(struct inode *inode, struct file *file) "R fq_overlimit %u\n" "R fq_collisions %u\n" "RW fq_limit %u\n" - "RW fq_quantum %u\n", + "RW fq_quantum %u\n" + "R codel_maxpacket %u\n" + "R codel_drop_count %u\n" + "R codel_drop_len %u\n" + "R codel_ecn_mark %u\n" + "R codel_ce_mark %u\n" + "RW codel_interval %u\n" + "RW codel_target %u\n" + "RW codel_mtu %u\n" + "RW codel_ecn %u\n", fq->flows_cnt, fq->backlog, fq->overlimit, fq->collisions, fq->limit, - fq->quantum); + fq->quantum, + local->cstats.maxpacket, + local->cstats.drop_count, + local->cstats.drop_len, + local->cstats.ecn_mark, + local->cstats.ce_mark, + local->cparams.interval, + local->cparams.target, + local->cparams.mtu, + local->cparams.ecn ? 1U : 0U); len += scnprintf(info->buf + len, info->size - len, @@ -214,6 +232,7 @@ static ssize_t aqm_write(struct file *file, struct ieee80211_local *local = info->local; char buf[100]; size_t len; + unsigned int ecn; if (count > sizeof(buf)) return -EINVAL; @@ -230,6 +249,16 @@ static ssize_t aqm_write(struct file *file, return count; else if (sscanf(buf, "fq_quantum %u", &local->fq.quantum) == 1) return count; + else if (sscanf(buf, "codel_interval %u", &local->cparams.interval) == 1) + return count; + else if (sscanf(buf, "codel_target %u", &local->cparams.target) == 1) + return count; + else if (sscanf(buf, "codel_mtu %u", &local->cparams.mtu) == 1) + return count; + else if (sscanf(buf, "codel_ecn %u", &ecn) == 1) { + local->cparams.ecn = !!ecn; + return count; + } return -EINVAL; }