From patchwork Tue Feb 15 04:33:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Li X-Patchwork-Id: 1592909 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=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JySsn5NQVz9sFv for ; Tue, 15 Feb 2022 15:34:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6A1F640151; Tue, 15 Feb 2022 04:34:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3533rPVLCuOY; Tue, 15 Feb 2022 04:34:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 6C6CA404CC; Tue, 15 Feb 2022 04:34:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 40099C001A; Tue, 15 Feb 2022 04:34:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D634CC000B for ; Tue, 15 Feb 2022 04:34:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C5C15600C9 for ; Tue, 15 Feb 2022 04:34:15 +0000 (UTC) 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 F_2g6pLj6gF9 for ; Tue, 15 Feb 2022 04:34:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.226]) by smtp3.osuosl.org (Postfix) with ESMTP id D6C6C600C6 for ; Tue, 15 Feb 2022 04:34:14 +0000 (UTC) HMM_SOURCE_IP: 172.18.0.218:59380.46499828 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-218.88.39.71 (unknown [172.18.0.218]) by chinatelecom.cn (HERMES) with SMTP id 4DC042800AE for ; Tue, 15 Feb 2022 12:34:12 +0800 (CST) X-189-SAVE-TO-SEND: lic121@chinatelecom.cn Received: from ([172.18.0.218]) by app0025 with ESMTP id 2ba663eb82b74447aa33cac48871082f for dev@openvswitch.org; Tue, 15 Feb 2022 12:34:13 CST X-Transaction-ID: 2ba663eb82b74447aa33cac48871082f X-Real-From: lic121@chinatelecom.cn X-Receive-IP: 172.18.0.218 X-MEDUSA-Status: 0 Date: Tue, 15 Feb 2022 12:33:52 +0800 From: lic121 To: "dev@openvswitch.org" X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7.2.23.116[cn] Mime-Version: 1.0 Message-ID: <2022021512335258445022@chinatelecom.cn> X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [ovs-dev] [PATCH v5 1/2] ofproto-dpif: trigger revalidation when ipfix config set 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" Currently, ipfix conf creation/deletion don't trigger dpif backer revalidation. This is not expected, as we need the revalidation to commit ipfix into xlate. So that xlate can generate ipfix actions. This patch covers only new creation/deletion of ipfix config. Will upload one more patch to cover ipfix option changes. Signed-off-by: lic121 Acked-by: Eelco Chaudron --- ofproto/ofproto-dpif.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.8.3.1 diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 8143dd9..ced67b0 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -2371,6 +2371,12 @@ set_ipfix( dpif_ipfix_unref(di); ofproto->ipfix = NULL; } + + /* TODO: need to consider ipfix option changes more than + * enable/disable */ + if (new_di || !ofproto->ipfix) { + ofproto->backer->need_revalidate = REV_RECONFIGURE; + } } return 0;