From patchwork Mon Jul 1 12:27:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valerio X-Patchwork-Id: 1954652 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=SKcsfodV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4WCQJv2sBBz1xpN for ; Mon, 1 Jul 2024 22:26:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 244D840B45; Mon, 1 Jul 2024 12:26:53 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Q9LSYAK2z201; Mon, 1 Jul 2024 12:26:51 +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 smtp2.osuosl.org 9262640B57 Authentication-Results: smtp2.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=SKcsfodV Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9262640B57; Mon, 1 Jul 2024 12:26:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 52B4EC002B; Mon, 1 Jul 2024 12:26:51 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id C244AC002A for ; Mon, 1 Jul 2024 12:26:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 79D5460A59 for ; Mon, 1 Jul 2024 12:26:49 +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 hjXJ89hv5X4X for ; Mon, 1 Jul 2024 12:26:48 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pvalerio@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 6D7CE60A4A Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6D7CE60A4A Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SKcsfodV Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6D7CE60A4A for ; Mon, 1 Jul 2024 12:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719836807; 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=JOFJKA3nhvWXG1idbp5e4El69PIf7u5/nQGxV9uz9WE=; b=SKcsfodVWJMbJ3+bE1zRSma+RNWOxtEVJMTxvtsBFmWJIP+kbItWzjVAC3wa6JlCiJLfd8 24RcSQss1Mtq1PZsNxnpZCz8uXckXLclzp68Quz/BYiw7brcPZQMClS8C7knwMtJR2Cl3w eoLsVC/Zv5nG0rxBtsYq3w/6Q+vrSYE= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-mLrJ4DhDPcOzDpB-on6wvA-1; Mon, 01 Jul 2024 08:26:46 -0400 X-MC-Unique: mLrJ4DhDPcOzDpB-on6wvA-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-57d180e729dso34696a12.1 for ; Mon, 01 Jul 2024 05:26:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719836805; x=1720441605; 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=JOFJKA3nhvWXG1idbp5e4El69PIf7u5/nQGxV9uz9WE=; b=a0xHcM/cm8Q1Gnh8m8HM4j6nPqx79wTvvGPJCa92wLggWzmiD92413vOyprfwXbUYp v15L2ZMEtcs4FxPIH9VM+h9AmCmx8hh+72LMmGqHCT9l0eWaxlOcMGyzIcouZ7gmxbgx pM5ohp4DZh5VtceKVKL9nyAHEr9GjdR66m/mRDngqnx6jWQqUdkJ6wfBXGMnG6pgOquX dTkVLhbxd/3oUgvM94QJZbE/Gi9I4rCLwwGTEoJmJansXmIn3Xhb1esqv96afIVqAXAu Q30674c6nal8YDvvkIoguIsbNF6WG+LDkDZD9dyfsbU0EXdDHhIBP1AHD8adi2lVIFai 9Z9Q== X-Gm-Message-State: AOJu0YzI9iQS5qlZQ2aG8xubUCPe2AK4Pwx+Ry/+7+BXW4J32ypmnX1s PzMe+H/PfnX5hcjtMVfBxEY2Gm89ccqEIWsuJDNX6Nuir2fkWhAXEJaQekFnqFWAs56biEUVMpP L3k1wpcVVwxEcfCAADf/X/uhF5uKtI8uPnMMjTRkpbL3+ITI/sCIeknqg6143aQdZz/raygoCYW 2D2FA2AGRAcNRJPps0j5XkbH7XmBU5799mwgcomAE= X-Received: by 2002:a50:ccd0:0:b0:57c:ad2a:4a41 with SMTP id 4fb4d7f45d1cf-587a0decefemr3381451a12.2.1719836804819; Mon, 01 Jul 2024 05:26:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0Gg0mCuwvH2S4qcu3NuX8f4bILJvLtD46l8qj7CNSPh0K5kd2qVEvQlHd2cFdTCMLJfyOkQ== X-Received: by 2002:a50:ccd0:0:b0:57c:ad2a:4a41 with SMTP id 4fb4d7f45d1cf-587a0decefemr3381435a12.2.1719836804287; Mon, 01 Jul 2024 05:26:44 -0700 (PDT) Received: from localhost (net-2-35-92-161.cust.vodafonedsl.it. [2.35.92.161]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58612c835b9sm4336872a12.3.2024.07.01.05.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 05:26:43 -0700 (PDT) From: Paolo Valerio To: ovs-dev@openvswitch.org Date: Mon, 1 Jul 2024 14:27:16 +0200 Message-ID: <20240701122721.622994-2-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 1/5] conntrack: Correctly annotate conntrack member. 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" While at it update no longer valid comment. Signed-off-by: Paolo Valerio --- lib/conntrack-private.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/conntrack-private.h b/lib/conntrack-private.h index 71367f211..6c65caa07 100644 --- a/lib/conntrack-private.h +++ b/lib/conntrack-private.h @@ -199,11 +199,12 @@ enum ct_ephemeral_range { FOR_EACH_PORT_IN_RANGE__(curr, min, max, OVS_JOIN(idx, __COUNTER__)) struct conntrack { - struct ovs_mutex ct_lock; /* Protects 2 following fields. */ + struct ovs_mutex ct_lock; /* Protects the following fields. */ struct cmap conns[UINT16_MAX + 1] OVS_GUARDED; - struct rculist exp_lists[N_EXP_LISTS]; + struct rculist exp_lists[N_EXP_LISTS] OVS_GUARDED; struct cmap zone_limits OVS_GUARDED; struct cmap timeout_policies OVS_GUARDED; + uint32_t hash_basis; /* Salt for hashing a connection key. */ pthread_t clean_thread; /* Periodically cleans up connection tracker. */ struct latch clean_thread_exit; /* To destroy the 'clean_thread'. */