From patchwork Sat May 18 15:36:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandler Wu X-Patchwork-Id: 1936732 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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mLgM1wCw; 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 4VhScn0F45z20KJ for ; Sun, 19 May 2024 01:37:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 844FC6063F; Sat, 18 May 2024 15:37:08 +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 wDGsAm0ZZtIv; Sat, 18 May 2024 15:37:07 +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 85F5C60637 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mLgM1wCw Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 85F5C60637; Sat, 18 May 2024 15:37:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55735C0077; Sat, 18 May 2024 15:37:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id A9022C0037 for ; Sat, 18 May 2024 15:37:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8123982155 for ; Sat, 18 May 2024 15:37:04 +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 pCdtqnIuQyOr for ; Sat, 18 May 2024 15:37:03 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::434; helo=mail-wr1-x434.google.com; envelope-from=chandler0149@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org C5AF98213F Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C5AF98213F Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mLgM1wCw Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by smtp1.osuosl.org (Postfix) with ESMTPS id C5AF98213F for ; Sat, 18 May 2024 15:37:02 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-34db9a38755so1147765f8f.1 for ; Sat, 18 May 2024 08:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716046620; x=1716651420; darn=openvswitch.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=IW5DSEge/dj0ORHs3CUPHnmxT93bLfnJ/EDXs0CmUMA=; b=mLgM1wCwNOp0rhrVWH6hjfwRdLOrEvVD+z3sEAvOyGkRcUWg24nbq8q91ZaDQZINBx Tuvyhj+hZZZk8xuIzte7DK8q5pWVzbkd9sruy7fd/yFDKI3gAHmgWSLC3wqg8O8AEc20 2QZtGI3oR5X4+k5GWO38sM0tKIo7/z3UhWkq1LXnjEBt5E9EYKJy8Hr7W5Mk859YWI3F TI2f7mMNk8gOoxX5xweiuTxhs5J1AFgM93iq2Z7k7Z8dAkfWxiu9zn1GhSKc25hDETMg u2jZ8L24Qcj9sxyz128aFRDnCPKvPhkIEjl/RXbDjTQHXpft59UbGVhBT1tobioKdhBX rsRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716046620; x=1716651420; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IW5DSEge/dj0ORHs3CUPHnmxT93bLfnJ/EDXs0CmUMA=; b=fXopqh2vmaSXZJ2KxnK3u+w0n2DKQFqsLajRa2PL5aGavj4wkVyVdI3bI2vHVT80Gf SwfQN+CgUaOnidJbHM9QDFyuwZRM81NYoA94n1lVWCxKugp0BRvKmp4wiBx9l75Vpgpp ZlnA+0acm3O9nGy2Di9uLvPdVrikH5Uw7fIQ9KBCFtkKHkc3DpbnC+I04ZtqKGxB3CI7 EtvENCTYte1gqEsnIpDrYJjDm5tnl59gto7En05QV+2gc8EsEiejJZjl2Bgd97bt13jL sId7hjsbQWAH7El2CWCR6XxNcdzAfHQOyva9uKFYPAqbP3slpDxlgIzQIxpP44r/p+Tw ioig== X-Gm-Message-State: AOJu0YwRDqKLS2LzX9W9ONeFmXqeb1EfG6QTc7ZxRq1S+21yGW6HOnka 83J2P4g/7NSpM2tYLSIYutTUmXCAA5oVErCULc3HlaBnkhtqyCBukf4gi9J2ovkJyb9CK+CxkHN 43JUpqkSpM0U730H0XQ3aq0znRarKhN1/Vik= X-Google-Smtp-Source: AGHT+IEj19W5NHVu0TXlxNtZ9f8fysQe/BMqNLoaW11mnUbSBiNBRuXGBY6m7dZt5Z6xJGkELCp11z8QIa9S7F0ZPGc= X-Received: by 2002:adf:e9c9:0:b0:34f:2cea:c86b with SMTP id ffacd0b85a97d-3504a969544mr23576115f8f.48.1716046620468; Sat, 18 May 2024 08:37:00 -0700 (PDT) MIME-Version: 1.0 From: Chandler Wu Date: Sat, 18 May 2024 23:36:49 +0800 Message-ID: To: dev@openvswitch.org X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: Ilya Maximets Subject: [ovs-dev] Fixes: 1b3557f53dbc ("vswitchd, ofproto-dpif: Propagate the CT limit from database.") 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" From 747d3c040d29e5abf2ddc45bd8fd4e904cfb53b3 Mon Sep 17 00:00:00 2001 From: chandlerwu Date: Mon, 6 May 2024 11:58:21 +0800 Fixes: 1b3557f53dbc ("vswitchd, ofproto-dpif: Propagate the CT limit from database.") If we create a zone for the first time, the new tp_cfg will be copied to the zone, see `ct_zone_alloc`. Then `update_timeout_policy`` will find the new copied tp== tp_cfg, so ``ofproto_ct_set_zone_timeout_policy` will not be called. Signed-off-by: chandlerwu --- vswitchd/bridge.c | 4 ++++ 1 file changed, 4 insertions(+) struct simap new_tp = SIMAP_INITIALIZER(&new_tp); @@ -780,6 +783,7 @@ ct_zones_reconfigure(struct datapath *dp, struct ovsrec_datapath *dp_cfg) } } + post_update:; int64_t desired_limit = zone_cfg->limit ? *zone_cfg->limit : -1; if (ct_zone->limit != desired_limit) { ofproto_ct_zone_limit_update(dp->type, zone_id, zone_cfg->limit); diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 95a65fcdc..2c8362a35 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -766,6 +766,9 @@ ct_zones_reconfigure(struct datapath *dp, struct ovsrec_datapath *dp_cfg) if (!ct_zone) { ct_zone = ct_zone_alloc(zone_id, tp_cfg); hmap_insert(&dp->ct_zones, &ct_zone->node, hash_int(zone_id, 0)); + ofproto_ct_set_zone_timeout_policy(dp->type, ct_zone->zone_id, + &ct_zone->tp); + goto post_update; }