From patchwork Mon Dec 21 13:10:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 1419029 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WTU8orvl; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D00GY05DPz9sVm for ; Tue, 22 Dec 2020 00:11:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 276B087672; Mon, 21 Dec 2020 13:11:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J2GtHR5y7AJT; Mon, 21 Dec 2020 13:11:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 62C018765D; Mon, 21 Dec 2020 13:11:08 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23E3AC1DAA; Mon, 21 Dec 2020 13:11:08 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 70ACBC0893 for ; Mon, 21 Dec 2020 13:11:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4EEC8203CF for ; Mon, 21 Dec 2020 13:11:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WZ1xzn2KdHOE for ; Mon, 21 Dec 2020 13:11:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by silver.osuosl.org (Postfix) with ESMTPS id 36C70204CA for ; Mon, 21 Dec 2020 13:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608556263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tmT9M3I8+BJzRDB30e9lo1toAnydXwPj7CiqlSl4zTE=; b=WTU8orvlKp667bqcK49YjRIGzFiUofuzSLzJhFpYVXi0dED1+kHIqtOizGu9Z2LCQ5ZjQw u56vfFDJC4EnZeAuTG1p1IMQRY02NtWF5MtI3FPVMh8Px0AacB1yBK2FY8+BGPlh66ZK2x wbKjZV33BCq5S4cHv/7WbRmKcs0tQ9s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-494-2bI7TyAxMSm0koNFgQo5VQ-1; Mon, 21 Dec 2020 08:11:01 -0500 X-MC-Unique: 2bI7TyAxMSm0koNFgQo5VQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D52C8030AE; Mon, 21 Dec 2020 13:11:00 +0000 (UTC) Received: from rh.redhat.com (ovpn-114-24.ams2.redhat.com [10.36.114.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EB7D60C67; Mon, 21 Dec 2020 13:10:58 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org Date: Mon, 21 Dec 2020 13:10:32 +0000 Message-Id: <20201221131033.835007-4-ktraynor@redhat.com> In-Reply-To: <20201221131033.835007-1-ktraynor@redhat.com> References: <20201221131033.835007-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: fbl@sysclose.org, i.maximets@ovn.org, david.marchand@redhat.com Subject: [ovs-dev] [PATCH v6 3/4] dpif-netdev: Add PMD auto load balance status log. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" When any PMD auto load balance parameters change, it is useful to also log if the feature is enabled or disabled. |dpif_netdev|INFO|PMD auto load balance pmd load threshold changed to 70% |dpif_netdev|INFO|PMD auto load balance is disabled Signed-off-by: Kevin Traynor Acked-by: David Marchand Acked-by: ian.stokes@intel.com --- lib/dpif-netdev.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index bf2112815..c78f22c54 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4202,5 +4202,5 @@ dpif_netdev_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops, /* Enable or Disable PMD auto load balancing. */ static void -set_pmd_auto_lb(struct dp_netdev *dp) +set_pmd_auto_lb(struct dp_netdev *dp, bool always_log) { unsigned int cnt = 0; @@ -4234,5 +4234,5 @@ set_pmd_auto_lb(struct dp_netdev *dp) pmd_alb->auto_lb_requested; - if (pmd_alb->is_enabled != enable_alb) { + if (pmd_alb->is_enabled != enable_alb || always_log) { pmd_alb->is_enabled = enable_alb; if (pmd_alb->is_enabled) { @@ -4252,5 +4252,4 @@ set_pmd_auto_lb(struct dp_netdev *dp) } } - } @@ -4272,4 +4271,5 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) uint8_t rebalance_load, cur_rebalance_load; uint8_t rebalance_improve; + bool log_autolb = false; tx_flush_interval = smap_get_int(other_config, "tx-flush-interval", @@ -4359,4 +4359,5 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) VLOG_INFO("PMD auto load balance interval set to " "%"PRIu64" mins\n", rebalance_intvl / MIN_TO_MSEC); + log_autolb = true; } @@ -4370,4 +4371,5 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) VLOG_INFO("PMD auto load balance improvement threshold set to " "%"PRIu8"%%\n", rebalance_improve); + log_autolb = true; } @@ -4383,6 +4385,7 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) VLOG_INFO("PMD auto load balance pmd load threshold set to " "%"PRIu8"%%\n", rebalance_load); + log_autolb = true; } - set_pmd_auto_lb(dp); + set_pmd_auto_lb(dp, log_autolb); return 0; } @@ -5468,5 +5471,5 @@ reconfigure_datapath(struct dp_netdev *dp) /* Check if PMD Auto LB is to be enabled */ - set_pmd_auto_lb(dp); + set_pmd_auto_lb(dp, false); }