From patchwork Mon Jul 1 12:27:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valerio X-Patchwork-Id: 1954653 X-Patchwork-Delegate: aconole@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=OADOmJyF; 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 4WCQJz44cXz1xpN for ; Mon, 1 Jul 2024 22:26:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0104C60A84; Mon, 1 Jul 2024 12:26:58 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ipH8Buak27Mo; Mon, 1 Jul 2024 12:26:57 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DCF6060A71 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=OADOmJyF Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id DCF6060A71; Mon, 1 Jul 2024 12:26:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CC37DC002B; Mon, 1 Jul 2024 12:26:56 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 31C4EC0035 for ; Mon, 1 Jul 2024 12:26:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1FBEF818AC for ; Mon, 1 Jul 2024 12:26:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rG7m-952FIlG for ; Mon, 1 Jul 2024 12:26:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pvalerio@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1F16C81CA3 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1F16C81CA3 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OADOmJyF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1F16C81CA3 for ; Mon, 1 Jul 2024 12:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719836812; 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=dCVSpXFLtJxljWIAYmIuN+tPB2TEMwz9eB1Fm8mso/w=; b=OADOmJyFAPfz4Zz0Gn3QLQxeu4XXe3z56LiLG/icZ8zM9eNxK373mcLtfE1cm4XnF3UT6A 2jAwo+7bJxy8ozUg3n5qHzC2Dfoc7VeGNs5bPLcF2lhcxdmUJukQ8c6yE3KA/Gu5XNVrQ6 22hRi18dlBjeGwdWR1OVc4Ld6Id7YTQ= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-684-hjE9QFNNPRy8dRfxBv5CCw-1; Mon, 01 Jul 2024 08:26:51 -0400 X-MC-Unique: hjE9QFNNPRy8dRfxBv5CCw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-52e7f748feaso392574e87.1 for ; Mon, 01 Jul 2024 05:26:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719836809; x=1720441609; 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=dCVSpXFLtJxljWIAYmIuN+tPB2TEMwz9eB1Fm8mso/w=; b=er/f6RcXe3sRWLxQVqAZw2Jfc1Tx+HWk/jg1LNYbtLi1Ejz//aY0Q+lJx7zggoLege wGfX28yLDXS4WzJCvqiot2so+Ji7/80YwGLmMbFyqEI4yyg/XZfqDaO9Eloom14Sx3if wNcd39M5KwZm2F0CFUTzQA+UA/eEHkwub5uqGpLJQoKjBadDOkRvV2IrpojC3FAPMMYC 9HpscpqM47xRophKtq2GpMLg7YYZQvU+Xh6foC45xmrnZiDHCY+dwCzUUMfAcZhRCBVO F8jnVTmKR/8T6EQeNLZdrfii3G4Xve3Scg76pPFKm7Wu7nMcwwav1wTMtbfMdXr48cfm gEIw== X-Gm-Message-State: AOJu0Yy6+tDjqBU/48JhO7/KXD/AeUdUPYnMk3GopnZtqPBSNy7/nGTS bPjencXFyMnorR0CI3NlDEV41JTw4FfYqf5vEMn7dIu+UxTtE0aq09a0Gt/+Z2liKUNaPD0sV51 Ce/FxTaKxPz1iaw9XxwqxkcXWUcGxRRWSUzu1brEuM5EHu1Axua16E5vkU8rvzMgTbAgeTI3aSt oRXZFgLvPuE701HpD7Kuif4rTlwWnlmmY/MsjjD+A= X-Received: by 2002:a05:6512:3b82:b0:52c:d7cc:33da with SMTP id 2adb3069b0e04-52e82781728mr3088199e87.5.1719836809288; Mon, 01 Jul 2024 05:26:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHyhapj3svnMZfFCEUT0t7qQhv+/voYLChT7Bz2xqT0BJvux3Mf1/t/o7PFnucJB7VjFfMvA== X-Received: by 2002:a05:6512:3b82:b0:52c:d7cc:33da with SMTP id 2adb3069b0e04-52e82781728mr3088186e87.5.1719836808960; Mon, 01 Jul 2024 05:26:48 -0700 (PDT) Received: from localhost (net-2-35-92-161.cust.vodafonedsl.it. [2.35.92.161]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a75101e4f76sm222179666b.192.2024.07.01.05.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 05:26:48 -0700 (PDT) From: Paolo Valerio To: ovs-dev@openvswitch.org Date: Mon, 1 Jul 2024 14:27:17 +0200 Message-ID: <20240701122721.622994-3-pvalerio@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240701122721.622994-1-pvalerio@redhat.com> References: <20240701122721.622994-1-pvalerio@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH 2/5] conntrack: Add zone limit coverage counter. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Similarly to what it's done for conntrack_full, add conntrack_zone_full increased when new entries are not added due to reaching the zone limit. Signed-off-by: Paolo Valerio --- lib/conntrack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/conntrack.c b/lib/conntrack.c index db44f8237..e90ade32f 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -50,6 +50,7 @@ COVERAGE_DEFINE(conntrack_full); COVERAGE_DEFINE(conntrack_l3csum_err); COVERAGE_DEFINE(conntrack_l4csum_err); COVERAGE_DEFINE(conntrack_lookup_natted_miss); +COVERAGE_DEFINE(conntrack_zone_full); struct conn_lookup_ctx { struct conn_key key; @@ -918,6 +919,7 @@ conn_not_found(struct conntrack *ct, struct dp_packet *pkt, struct zone_limit *zl = zone_limit_lookup_or_default(ct, ctx->key.zone); if (zl && atomic_count_get(&zl->czl.count) >= zl->czl.limit) { + COVERAGE_INC(conntrack_zone_full); return nc; }