From patchwork Fri Feb 5 16:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 1436753 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.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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=O3C8SQRI; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DXM6H0hLCz9sVv for ; Sat, 6 Feb 2021 03:57:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A3A532A16D; Fri, 5 Feb 2021 16:57:23 +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 Svg6CqsOai5j; Fri, 5 Feb 2021 16:57:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 16C5320411; Fri, 5 Feb 2021 16:57:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E3B0FC0174; Fri, 5 Feb 2021 16:57:19 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2C225C013A for ; Fri, 5 Feb 2021 16:57:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 14130872E0 for ; Fri, 5 Feb 2021 16:57:19 +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 c9cvkOz4u8cJ for ; Fri, 5 Feb 2021 16:57:18 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 42ED2872BE for ; Fri, 5 Feb 2021 16:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612544237; 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; bh=l2Po5YnxeYL8wVP1DCCUuPMlma5+MZDkfiUzfW6rxfk=; b=O3C8SQRI3gPaWpOEDAZZwbrXmEHFZkkAQyTKEr2SI+eae5ouZl4QtPzgFb+eC3ieFdSTAC gKQtY7IKLElbo4w1+rn7HwDLgQMkOmFfsvembK0hq5YuPE+CwVkG6IE+6E0FJpQNxFun8G ythOcLnR8G1ccYuIjHiHYpwfsBJdYsM= 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-430-yzhXvbhROUWWqsLKwi2nzQ-1; Fri, 05 Feb 2021 11:57:14 -0500 X-MC-Unique: yzhXvbhROUWWqsLKwi2nzQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DDA41005501 for ; Fri, 5 Feb 2021 16:57:13 +0000 (UTC) Received: from rh.redhat.com (ovpn-112-238.ams2.redhat.com [10.36.112.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BDEE5C1B4; Fri, 5 Feb 2021 16:57:09 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org Date: Fri, 5 Feb 2021 16:56:58 +0000 Message-Id: <20210205165659.1405585-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: david.marchand@redhat.com Subject: [ovs-dev] [PATCH 1/2] dpif-netdev: auto load balance log state on user request. 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" At present the log displays the auto load balance state everytime it is changed. There are some cases where the user will try to enable auto load balance, but it cannot be enabled because not enough PMDs or RxQs. As the state does not change, there is no new log of the state. While the the last log report of state is still correct, it is better to log the state again at this point so the user can explicitly confirm the outcome of their request. Signed-off-by: Kevin Traynor --- lib/dpif-netdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index e3fd0a07f..4381c618f 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4347,6 +4347,10 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) struct pmd_auto_lb *pmd_alb = &dp->pmd_alb; + bool cur_rebalance_requested = pmd_alb->auto_lb_requested; pmd_alb->auto_lb_requested = smap_get_bool(other_config, "pmd-auto-lb", false); + if (cur_rebalance_requested != pmd_alb->auto_lb_requested) { + log_autolb = true; + } rebalance_intvl = smap_get_int(other_config, "pmd-auto-lb-rebal-interval", From patchwork Fri Feb 5 16:56:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 1436754 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.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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=f/HLIDKD; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DXM6H0dJQz9sVr for ; Sat, 6 Feb 2021 03:57:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6E0A487359; Fri, 5 Feb 2021 16:57:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zqcyzKFnfQAX; Fri, 5 Feb 2021 16:57:22 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id BCB3B872CC; Fri, 5 Feb 2021 16:57:22 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A3264C0174; Fri, 5 Feb 2021 16:57:22 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9204EC013A for ; Fri, 5 Feb 2021 16:57:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8E62B872CC for ; Fri, 5 Feb 2021 16:57:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N9ouL0jLoEb1 for ; Fri, 5 Feb 2021 16:57:20 +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 hemlock.osuosl.org (Postfix) with ESMTPS id 7B6D2872A4 for ; Fri, 5 Feb 2021 16:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612544238; 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=3QoI+y8UrVEwrCFvou5RUpvx41aEUrtbSXDbwvzFP7o=; b=f/HLIDKDnB1r5MOcvTBUhMNtClJrj6Zf7qJ9yj6k9kuCslR4STOpEwyHrc5lqDC2IuFQ+W DfFlLlkmjj5TnPjiOVny7JLj4A/MBcvvzNu5roQQ9L41+hcJ/Cx2GUTQdmjWMCe6nTp7Xt ZCAp8i8eZNbYyzUicDPraIDkPrwtJUc= 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-546-PW8fyTk4PU2knuVZNYVIXw-1; Fri, 05 Feb 2021 11:57:15 -0500 X-MC-Unique: PW8fyTk4PU2knuVZNYVIXw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB8258799EC for ; Fri, 5 Feb 2021 16:57:14 +0000 (UTC) Received: from rh.redhat.com (ovpn-112-238.ams2.redhat.com [10.36.112.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id F18425C1B4; Fri, 5 Feb 2021 16:57:13 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org Date: Fri, 5 Feb 2021 16:56:59 +0000 Message-Id: <20210205165659.1405585-2-ktraynor@redhat.com> In-Reply-To: <20210205165659.1405585-1-ktraynor@redhat.com> References: <20210205165659.1405585-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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: david.marchand@redhat.com Subject: [ovs-dev] [PATCH 2/2] dpif-netdev: auto load balance improve enable/disable logs. 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" In order for auto load balance to be enabled, there are minimum requirements of more than one PMD and more than one Rxq on at least one PMD. If these conditions are not met a rebalance would be pointless, so auto load balance is not enabled. Currently the state is logged but in the case where the criteria for enabling is not met, there is no reason given. It would be useful for the user to see the reason, so they can understand why auto load balance has not been enabled when they have requested it. For example, if a user has one PMD and sets pmd-auto-lb=true, previously: |INFO|PMD auto load balance is disabled With patch: |INFO|PMD auto load balance not enough PMDs or Rx Queues to enable |INFO|PMD auto load balance is disabled Signed-off-by: Kevin Traynor --- lib/dpif-netdev.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 4381c618f..833f45616 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4213,4 +4213,5 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool always_log) bool enable_alb = false; bool multi_rxq = false; + bool minreq = false; bool pmd_rxq_assign_cyc = dp->pmd_rxq_assign_cyc; @@ -4226,6 +4227,6 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool always_log) } if (cnt && multi_rxq) { - enable_alb = true; - break; + minreq = true; + break; } cnt++; @@ -4233,6 +4234,5 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool always_log) /* Enable auto LB if it is requested and cycle based assignment is true. */ - enable_alb = enable_alb && pmd_rxq_assign_cyc && - pmd_alb->auto_lb_requested; + enable_alb = minreq && pmd_rxq_assign_cyc && pmd_alb->auto_lb_requested; if (pmd_alb->is_enabled != enable_alb || always_log) { @@ -4251,4 +4251,15 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool always_log) } else { pmd_alb->rebalance_poll_timer = 0; + if (pmd_alb->auto_lb_requested) { + if (!minreq) { + VLOG_INFO("PMD auto load balance not enough " + "PMDs or Rx Queues to enable"); + } + if (!pmd_rxq_assign_cyc) { + VLOG_INFO("PMD auto load balance needs " + "'other_config:pmd-rxq-assign=cycles' " + "to enable"); + } + } VLOG_INFO("PMD auto load balance is disabled"); }