From patchwork Thu Feb 1 03:45:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13540604 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B53183B182 for ; Thu, 1 Feb 2024 03:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759227; cv=none; b=iQyVKNZAf7TVAy64KivYAUEnP4D0h0iasn3KCfbtswitc+EDOmdlpwyKDNSxJ1CgexIF0zY8Jul3yELbo4oQqfLcFrg9CHGY5/ejZrehGmdCRc4nnKXA1LTicwKxgxbe1CA55in8Dj7Pf4nKwSDA0YJkeKSOExy5WBCf2QxKJHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759227; c=relaxed/simple; bh=AoFfherpr4to1DIFIPcKXhBrv/xGkl6LTDUKV7Q0gSk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gDTFL+R1KJUI9VWJjE6tPBJg7uK3Xv6EZ0WWZYw3jLS0evs4Ggzz+aLdmys8K7UTLwzQVEQ8Y0rWiYPX5fxWXfRGwgvUcgmJMXwRHvmRkusgss9b2eASMiwKmmSqhI0N1NO4bwMzIHCAL2/esNrT+MVmQXGYqX4yR7quahw3J7I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=fwze6OxM; arc=none smtp.client-ip=209.85.167.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="fwze6OxM" Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3be3753e002so263696b6e.1 for ; Wed, 31 Jan 2024 19:47:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706759224; x=1707364024; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w8f/1/rAwFZ7NJWpi1dKByH+ArzJcXZ3FPX29zy2S4w=; b=fwze6OxMUYE6mvhCJ8TuxY9ceJflK9XkH/oKT5t6Fi7wNI87zUHBJ2gfYwhH2LiIGM lZeZ6CyTKe6bAObqbmurqQA0Joe8vSUsEvnuVlWiymGPAAdd8kyt8c0jKYeekf9vQk56 X+Hjg9LjNUr4g17RA8jGK6kLb0vw011+7SssGIbRh7majV0r6u3xrsO5Bh7W4F+DJ3PT fgvBUdLjwjeaWZzPMJx/N5+JO0AFFatxG4jL1oeLRXorFBZYxcAfUKyZu+tmv729kb6L pcBZRc1OSd8dsdrow/WMI+AhfOaegGtUqtW0X/lrRfv6VMzT0NO1ZEvhBQVDlW+okJv8 28cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706759224; x=1707364024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w8f/1/rAwFZ7NJWpi1dKByH+ArzJcXZ3FPX29zy2S4w=; b=a7OrXwgyAW/8hJ/HYUfjsZIHKBVhwm1kkwGylWy1N9rj+RYqr2+r9ukl4MtwKmk/bS qvIIZvzk36SKJDZesGNj5dZ2Vsf1mec9dNdZ3ZiVy6AdsNJge5E63zSRxCrml2scPecD o7v+HHbZ1nIV0ERduqDlvrAWGv5xATcJk/6CjOKjV/9rkqRE7Tpozgc3L3p/EQbpmkzS Y+V37HyZKAzc5PARYU0QoRWQ7EQPgijSebZawJCf6+XseOvWGxbfgDD3ZwtXX0CohEaF UsvWoBTykQZCdYLidTar0Lg4qnu6TYYfHBo4SSgzsRODBHiVw7k8orBlanb418Ys5KBV HI6A== X-Gm-Message-State: AOJu0YzIoHTnGY8A+z75zwNQQrEU4hN2ffn9SOzhaQ4pZuaAUh8okXNH tkwJY0Ssu8sABJ0F+/giWFAD+SPmD3jXp+1EgGLL2El4ZalcinSFwpnRA0HHzNZTAQ2YxaGCSmT O1yc= X-Google-Smtp-Source: AGHT+IHvzaQmRyiXOTUnq6jVhAf3wm4u08KLbGSwDYVzpD6OjN0xDa+9CqzkMpH4GJ465o1rf6K70Q== X-Received: by 2002:a05:6808:16aa:b0:3bd:a8a3:7237 with SMTP id bb42-20020a05680816aa00b003bda8a37237mr3944310oib.10.1706759224647; Wed, 31 Jan 2024 19:47:04 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id hq24-20020a056a00681800b006dbdbe7f71csm11052857pfb.98.2024.01.31.19.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:47:04 -0800 (PST) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH 1/3] net/sched: netem: use extack Date: Wed, 31 Jan 2024 19:45:58 -0800 Message-ID: <20240201034653.450138-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201034653.450138-1-stephen@networkplumber.org> References: <20240201034653.450138-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The error handling in netem predates introduction of extack, and was mostly using pr_info(). Use extack to put errors in result rather than console log. Signed-off-by: Stephen Hemminger --- net/sched/sch_netem.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index fa678eb88528..7c37a69aba0e 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -782,15 +782,18 @@ static void dist_free(struct disttable *d) * signed 16 bit values. */ -static int get_dist_table(struct disttable **tbl, const struct nlattr *attr) +static int get_dist_table(struct disttable **tbl, const struct nlattr *attr, + struct netlink_ext_ack *extack) { size_t n = nla_len(attr)/sizeof(__s16); const __s16 *data = nla_data(attr); struct disttable *d; int i; - if (!n || n > NETEM_DIST_MAX) + if (!n || n > NETEM_DIST_MAX) { + NL_SET_ERR_MSG_FMT_MOD(extack, "invalid distribution table size: %zu", n); return -EINVAL; + } d = kvmalloc(struct_size(d, table, n), GFP_KERNEL); if (!d) @@ -865,7 +868,8 @@ static void get_rate(struct netem_sched_data *q, const struct nlattr *attr) q->cell_size_reciprocal = (struct reciprocal_value) { 0 }; } -static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr) +static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr, + struct netlink_ext_ack *extack) { const struct nlattr *la; int rem; @@ -878,7 +882,7 @@ static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr) const struct tc_netem_gimodel *gi = nla_data(la); if (nla_len(la) < sizeof(struct tc_netem_gimodel)) { - pr_info("netem: incorrect gi model size\n"); + NL_SET_ERR_MSG_MOD(extack, "incorrect GI model size"); return -EINVAL; } @@ -897,7 +901,7 @@ static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr) const struct tc_netem_gemodel *ge = nla_data(la); if (nla_len(la) < sizeof(struct tc_netem_gemodel)) { - pr_info("netem: incorrect ge model size\n"); + NL_SET_ERR_MSG_MOD(extack, "incorrect GE model size"); return -EINVAL; } @@ -911,7 +915,7 @@ static int get_loss_clg(struct netem_sched_data *q, const struct nlattr *attr) } default: - pr_info("netem: unknown loss type %u\n", type); + NL_SET_ERR_MSG_FMT_MOD(extack, "unknown loss type: %u", type); return -EINVAL; } } @@ -934,12 +938,13 @@ static const struct nla_policy netem_policy[TCA_NETEM_MAX + 1] = { }; static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla, - const struct nla_policy *policy, int len) + const struct nla_policy *policy, int len, + struct netlink_ext_ack *extack) { int nested_len = nla_len(nla) - NLA_ALIGN(len); if (nested_len < 0) { - pr_info("netem: invalid attributes len %d\n", nested_len); + NL_SET_ERR_MSG_MOD(extack, "invalid nested attribute length"); return -EINVAL; } @@ -966,18 +971,18 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt, int ret; qopt = nla_data(opt); - ret = parse_attr(tb, TCA_NETEM_MAX, opt, netem_policy, sizeof(*qopt)); + ret = parse_attr(tb, TCA_NETEM_MAX, opt, netem_policy, sizeof(*qopt), extack); if (ret < 0) return ret; if (tb[TCA_NETEM_DELAY_DIST]) { - ret = get_dist_table(&delay_dist, tb[TCA_NETEM_DELAY_DIST]); + ret = get_dist_table(&delay_dist, tb[TCA_NETEM_DELAY_DIST], extack); if (ret) goto table_free; } if (tb[TCA_NETEM_SLOT_DIST]) { - ret = get_dist_table(&slot_dist, tb[TCA_NETEM_SLOT_DIST]); + ret = get_dist_table(&slot_dist, tb[TCA_NETEM_SLOT_DIST], extack); if (ret) goto table_free; } @@ -988,7 +993,7 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt, old_loss_model = q->loss_model; if (tb[TCA_NETEM_LOSS]) { - ret = get_loss_clg(q, tb[TCA_NETEM_LOSS]); + ret = get_loss_clg(q, tb[TCA_NETEM_LOSS], extack); if (ret) { q->loss_model = old_loss_model; q->clg = old_clg; @@ -1068,18 +1073,16 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct netem_sched_data *q = qdisc_priv(sch); - int ret; qdisc_watchdog_init(&q->watchdog, sch); - if (!opt) + if (!opt) { + NL_SET_ERR_MSG_MOD(extack, "Netem missing required parameters"); return -EINVAL; + } q->loss_model = CLG_RANDOM; - ret = netem_change(sch, opt, extack); - if (ret) - pr_info("netem: change failed\n"); - return ret; + return netem_change(sch, opt, extack); } static void netem_destroy(struct Qdisc *sch) From patchwork Thu Feb 1 03:45:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13540605 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4146C3B190 for ; Thu, 1 Feb 2024 03:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759228; cv=none; b=uxjVBID9D111ep4XEIhK5BWZO0uLL4I0VdXLNkHntXlKs8ykjqhgqCDoqxb9fBerRrcqaEpIVLd5CDzX3oG1wrZVFnb3oMlcIFsLJxW/eN+eyeLYWbaPY0Lb1wNeN0SHjPOk3tfOKopVhoGbyDaInIOSml02cCcPHWjLPBKjLSI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759228; c=relaxed/simple; bh=Cdg2Z0nRIAyTnylZI+TfBjUEzmhuAzZ++hbJBvHHHRw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EYkwPnhgUwiBxKJ9Gw7bdf8oSxb2gP2ghjFc2blatOAHUGZwko/MMie/sK5KI8t1BOpo7DjeuzfNXuSdQ88BKO491kvLWbjSq8HZc3jRIZhXFybTdoXezm756W5mpj/8do/N4Nw+jFe5OwpDRFxZG3PI8+3HEaygQZ4fqbOHiu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=e1SYLNTg; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="e1SYLNTg" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3bd5c4cffefso547785b6e.1 for ; Wed, 31 Jan 2024 19:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706759225; x=1707364025; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zdafAvOAWXCQr4lgpJpxZOhHmavMiYYo2HMC8CTdob4=; b=e1SYLNTgT7Z5nAn5JI5z/QCt8w/5Zi/oqpZCd6pikEZH8o5jWeU47WNTZZb/7K6NPH bnFB3VL6GScPSwODSXS3BsQ2AwNtKK3/YBYERPOb7T2GD/B7o9vGbSgcm4Liu6TbbLHr VBGRUtxkyfPfC8+q2RB6UowX1jMhDJ2wkei7F5c7744UQ55wyh8WXoKf5WWAfBBawMfr hL5MZ0nuD2KZS7rDnDM/erFTVqTwCxI0ijGrkE/o6jQ/coh+b+L6/zXF087UtRPgPRBj o4pmn/elwut/WNaW1wMWL7y9te7SY64iDnGgAV3rLRxs/gvPVqzkXy3NFLhPQj50F+mW PQng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706759225; x=1707364025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zdafAvOAWXCQr4lgpJpxZOhHmavMiYYo2HMC8CTdob4=; b=E87YwyQn/bfTh5HMqVE9y1TNqAHGSh1YTlKyURVRmPBRX3InZlL1nA8cIpzJGP2h4T nJNPGcboyL+OGkKbNhhWsu0TuxuDtKrCqgF3Joaxz6hDVr9SbM1s474D0fXlgEkdjpON ciV8vGf+54z+F6DiYgW3PYkJGpMnogFvwimlw76X7JKaOpFbcYl1YdWWpkhGfrhj5H8+ hwTYmqIMZ7VmU729X9sq8tzRrmGfZrjdsCm4p6BfAllE1KfOQok+kbRqgoCTwEYA6ksB j0aFCzFfOp+IXeM8ftVa/kdZHngb49PqYA6SM8T9pSQ7OodqJ+f+sLhBxzqR/P9ViXhO ybRw== X-Gm-Message-State: AOJu0YySTkGnoXj5Bv8TnY8hpnNJTziXEO8Kj6PMxjP91jd4VCsa8X8W iErWOEgup1IFYM7giOLHLIIIm73ZgbSYLOz0boYUVy9is15YdABgM/BWp3LIPO7VfBU3O7wV6qf wPnI= X-Google-Smtp-Source: AGHT+IHO1EzYyJPe5kRXe73Qcex14HqRToLJB81QT1lzSAmcogcRxShZNxr7URIWwGeh33iaJ35J3g== X-Received: by 2002:a05:6358:71c:b0:178:a7de:2e17 with SMTP id e28-20020a056358071c00b00178a7de2e17mr1317196rwj.7.1706759225268; Wed, 31 Jan 2024 19:47:05 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id hq24-20020a056a00681800b006dbdbe7f71csm11052857pfb.98.2024.01.31.19.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:47:04 -0800 (PST) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH 2/3] net/sched: netem: get rid of unnecesary version message Date: Wed, 31 Jan 2024 19:45:59 -0800 Message-ID: <20240201034653.450138-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201034653.450138-1-stephen@networkplumber.org> References: <20240201034653.450138-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The version of netem module is irrelevant and was never useful. Remove it. Signed-off-by: Stephen Hemminger Reviewed-by: Jiri Pirko --- net/sched/sch_netem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 7c37a69aba0e..f712d03ad854 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -26,8 +26,6 @@ #include #include -#define VERSION "1.3" - /* Network Emulation Queuing algorithm. ==================================== @@ -1300,13 +1298,14 @@ static struct Qdisc_ops netem_qdisc_ops __read_mostly = { static int __init netem_module_init(void) { - pr_info("netem: version " VERSION "\n"); return register_qdisc(&netem_qdisc_ops); } + static void __exit netem_module_exit(void) { unregister_qdisc(&netem_qdisc_ops); } + module_init(netem_module_init) module_exit(netem_module_exit) MODULE_LICENSE("GPL"); From patchwork Thu Feb 1 03:46:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13540606 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4F2715E9C for ; Thu, 1 Feb 2024 03:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759228; cv=none; b=FbZBu9qxI4yWHoMkHIFaQEtfm+MTQ8mjOxxDHv1lu2LJSiXrXGpAw+6Ux+pxdj26uS8ECJ42lxGawd5IsfFXlrnQB8iPAsQbTXPYWVMhynaVtPwJkR1LLgxPY+PQibSoWThK5E5oZ+6TRvexym3cv3XTTR00nVkq4KK3pgJwmdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706759228; c=relaxed/simple; bh=byg7GV0urD0GITggesjbHsAOLbcGXOy3+L3LQkc3CYY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yt8C7t1yg/3spFXs99MUeZ4p2pPSqgkqwyqOySC2dQ8+mYUt9xKtLsN2MbGlUhi7wWEZoTTXwOPdYOxo2KXtU7Co3eHKzYwLimzaiAdoKhbfp/nYNk/ZnwG7iGXL5KFKbwxQEXaoU09L6Y7yH3gaUER473PcxF6GOlCzazNC6IA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=TNKd2jPU; arc=none smtp.client-ip=209.85.161.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="TNKd2jPU" Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-59a8ecbadf7so234742eaf.0 for ; Wed, 31 Jan 2024 19:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706759226; x=1707364026; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5NYfxYGrZl6xWNKpUJhZt0rWoSq/fleBIoPbmE/uMvs=; b=TNKd2jPUvmkmuq6SHHNp+V1WVgXGutvhUNdRvNIpHKeD8AQ+x8qa1KSqNJi0xN/ZUI +tLJ/+XbmZrjgloNR3zg4gPHzx1RK9VKLyvxyIWf2Srq5q5i9jhHhQ3QKLo/8UbJWl+h 7JsQ/7PkLlTvhf3Dhd63wP6a2Dsb0YcLOVw8IEn/8ToDcUrY6QC9knAsYME+1vhDNiw5 1g+h9VF/mx6wkISED5sqLBgbST3nXyvFcl94QrmWPp+/0YZI4/L8uRuyetGIILgmkruN EkcNEudQGPBupYZQDaJCqLa8QFkx/W/kNf9m88qSj2cEb4b6SgfX4VPQEHPRNjXTKsCV Ym+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706759226; x=1707364026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5NYfxYGrZl6xWNKpUJhZt0rWoSq/fleBIoPbmE/uMvs=; b=Jk98jgChIt1kaMOT92QI/3om2O+V483Bg0rIAyVzUzcP5683yXc/NUWxpSf/aLAfmB ecG6WSQG4z+tuIWg6zMozv8XNsSK8gIXv534MkMAP4dzw5K8TcohXdDH9Gl3AwY9iITE thyhl6kzGdbgw+RC+tYzztO9wB2VtE8dqOol1U8DMuBE3vD+kJ19voMvVVu4oCqNyvzh Yg1AtWaVxkQiApZdTY3PLefnIK0tklwUjZwfb84LihCIxZBxMOKQMwSluEwoXAzbtwON kILsKDUSXLGPYKNwyCkFkdL1xg2wRZ63vQC5sFdPDxKx6Qqxdk7Q5O1KVp9w/gyQExCJ TSrQ== X-Gm-Message-State: AOJu0Yywuw98fmjpng2G3ulrmI5mg6pWRtsHDQKpnfdkSRf9bnVkcwxE viGOw/GuAv06ysJMexlmD4K+t0H9Q46gVROTtMJRSYAegaBp/VAOn70ORSbXaFswRWS2dnsVzh0 unxc= X-Google-Smtp-Source: AGHT+IHGkX7aGpTVSzUUcZV/aNMmbSj36J9zjAYANOuGByK5hY6S2nUNTE/mUsrgloUbpFZE2hGjsw== X-Received: by 2002:a05:6358:590b:b0:170:c91a:b466 with SMTP id g11-20020a056358590b00b00170c91ab466mr1327697rwf.23.1706759225943; Wed, 31 Jan 2024 19:47:05 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id hq24-20020a056a00681800b006dbdbe7f71csm11052857pfb.98.2024.01.31.19.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:47:05 -0800 (PST) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH 3/3] net/sched: netem: update intro comment Date: Wed, 31 Jan 2024 19:46:00 -0800 Message-ID: <20240201034653.450138-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201034653.450138-1-stephen@networkplumber.org> References: <20240201034653.450138-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Netem originally used a nested qdisc to handle rate limiting, but that has been replaced (for many years) with an internal FIFO. Update the intro comment to reflect this. Signed-off-by: Stephen Hemminger Reviewed-by: Jiri Pirko --- net/sched/sch_netem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index f712d03ad854..cc3df77503b3 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -44,9 +44,8 @@ duplication, and reordering can also be emulated. This qdisc does not do classification that can be handled in - layering other disciplines. It does not need to do bandwidth - control either since that can be handled by using token - bucket or other rate control. + layering other disciplines. Netem includes an optional internal + rate limiter (tfifo) based on next time to send. Correlated Loss Generator models