From patchwork Thu Dec 21 08:20:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 1878897 X-Patchwork-Delegate: echaudro@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=Kmdt6NPC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Swk013KcCz1ypX for ; Thu, 21 Dec 2023 19:20:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 769F161155; Thu, 21 Dec 2023 08:20:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 769F161155 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Kmdt6NPC X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ASyI-pyETn74; Thu, 21 Dec 2023 08:20:46 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id AD97F6112B; Thu, 21 Dec 2023 08:20:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AD97F6112B Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 83DAEC0072; Thu, 21 Dec 2023 08:20:45 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 72BC3C0037 for ; Thu, 21 Dec 2023 08:20:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4E479408AD for ; Thu, 21 Dec 2023 08:20:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4E479408AD Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Kmdt6NPC X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xav1Rm4FWOY2 for ; Thu, 21 Dec 2023 08:20:43 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8F434408AA for ; Thu, 21 Dec 2023 08:20:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8F434408AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703146842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E43MHwcJBR/QdOjmzfIhHTOi4iqfmC2CCo30q0hWg9w=; b=Kmdt6NPCSVElyG9wnm1wb7fzwJUo3op+dOp5YmGQwFcgkrwq8XiAFnEYDahFIluE34R95x NzbW/E0BrEjL1SJSMcEgjYvvYP5csaTPZYt0fsOXdckSjPBneItywxk1M9I1zJZEAhSxTZ pj55uTv8qKm40kCxNC+o+TTuFc2Zwes= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-142-oEcGts1pPd66x7JEWMTDTg-1; Thu, 21 Dec 2023 03:20:39 -0500 X-MC-Unique: oEcGts1pPd66x7JEWMTDTg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A36AB85A588 for ; Thu, 21 Dec 2023 08:20:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.193.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 514191C060AF for ; Thu, 21 Dec 2023 08:20:39 +0000 (UTC) From: Eelco Chaudron To: dev@openvswitch.org Date: Thu, 21 Dec 2023 09:20:28 +0100 Message-ID: <170314679245.1799515.2320316726971805940.stgit@ebuild> In-Reply-To: <170314673777.1799515.2461476598010754898.stgit@ebuild> References: <170314673777.1799515.2461476598010754898.stgit@ebuild> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH 2/3] ofproto-dpif-upcall: Add dump duration coverage counters. 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" Add new coverage counters that might help debugging flow dump length related issues. Signed-off-by: Eelco Chaudron Acked-by: Simon Horman --- ofproto/ofproto-dpif-upcall.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index cd71e3ee3..85f78675a 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -52,6 +52,9 @@ VLOG_DEFINE_THIS_MODULE(ofproto_dpif_upcall); +COVERAGE_DEFINE(dump_duration_low); +COVERAGE_DEFINE(dump_duration_medium); +COVERAGE_DEFINE(dump_duration_high); COVERAGE_DEFINE(dumped_duplicate_flow); COVERAGE_DEFINE(dumped_inconsistent_flow); COVERAGE_DEFINE(dumped_new_flow); @@ -1039,11 +1042,15 @@ udpif_revalidator(void *arg) udpif->dump_duration = duration; if (duration > 2000) { flow_limit /= duration / 1000; + COVERAGE_INC(dump_duration_high); } else if (duration > 1300) { flow_limit = flow_limit * 3 / 4; - } else if (duration < 1000 && - flow_limit < n_flows * 1000 / duration) { - flow_limit += 1000; + COVERAGE_INC(dump_duration_medium); + } else if (duration < 1000) { + if (flow_limit < n_flows * 1000 / duration) { + flow_limit += 1000; + } + COVERAGE_INC(dump_duration_low); } flow_limit = MIN(ofproto_flow_limit, MAX(flow_limit, 1000)); atomic_store_relaxed(&udpif->flow_limit, flow_limit);