From patchwork Sun Jan 9 13:44:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Li X-Patchwork-Id: 1577434 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::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JWyqk0rdzz9s9c for ; Mon, 10 Jan 2022 00:44:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6A21D60B66; Sun, 9 Jan 2022 13:44:31 +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 ADSbJz8wj8qm; Sun, 9 Jan 2022 13:44:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id BCBDA60B54; Sun, 9 Jan 2022 13:44:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7453FC0030; Sun, 9 Jan 2022 13:44:29 +0000 (UTC) X-Original-To: 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 16512C001E for ; Sun, 9 Jan 2022 13:44:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id F22B460B54 for ; Sun, 9 Jan 2022 13:44:26 +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 ss7otjJm1Pcc for ; Sun, 9 Jan 2022 13:44:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.228]) by smtp3.osuosl.org (Postfix) with ESMTP id 0DDB460B3C for ; Sun, 9 Jan 2022 13:44:25 +0000 (UTC) HMM_SOURCE_IP: 172.18.0.48:48992.685326248 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-110.184.64.64 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id 721E02800C5 for ; Sun, 9 Jan 2022 21:44:19 +0800 (CST) X-189-SAVE-TO-SEND: lic121@chinatelecom.cn Received: from ([172.18.0.48]) by app0024 with ESMTP id 697f586e14f447b8b63ecde65246e6a6 for dev@openvswitch.org; Sun, 09 Jan 2022 21:44:20 CST X-Transaction-ID: 697f586e14f447b8b63ecde65246e6a6 X-Real-From: lic121@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 Date: Sun, 9 Jan 2022 21:44:19 +0800 From: lic121 To: "dev@openvswitch.org" X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7.2.23.114[cn] Mime-Version: 1.0 Message-ID: <2022010921441915301290@chinatelecom.cn> X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [ovs-dev] [PATCH v1 1/2] ofproto-dpif: trigger revalidation when ipfix changes 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 creation/delection 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. Signed-off-by: lic121 --- ofproto/ofproto-dpif.c | 5 +++++ 1 file changed, 5 insertions(+) -- 1.8.3.1 diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index bc3df8e..1cdef18 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -2306,6 +2306,7 @@ set_ipfix( { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); struct dpif_ipfix *di = ofproto->ipfix; + struct dpif_ipfix *old_ipfix = ofproto->ipfix; bool has_options = bridge_exporter_options || flow_exporters_options; bool new_di = false; @@ -2335,6 +2336,10 @@ set_ipfix( } } + if (old_ipfix != ofproto->ipfix) { + ofproto->backer->need_revalidate = REV_RECONFIGURE; + } + return 0; } From patchwork Sun Jan 9 13:44:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Li X-Patchwork-Id: 1577436 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=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.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 4JWyrY3hGpz9s9c for ; Mon, 10 Jan 2022 00:45:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B1C434052D; Sun, 9 Jan 2022 13:45:15 +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 hsea1gSc8wM3; Sun, 9 Jan 2022 13:45:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id A7541401B2; Sun, 9 Jan 2022 13:45:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7C303C0030; Sun, 9 Jan 2022 13:45:13 +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 5438DC001E for ; Sun, 9 Jan 2022 13:45:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 34837605B3 for ; Sun, 9 Jan 2022 13:45:12 +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 ABXM4vwwliq4 for ; Sun, 9 Jan 2022 13:45:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.227]) by smtp3.osuosl.org (Postfix) with ESMTP id B4DA5605AE for ; Sun, 9 Jan 2022 13:45:10 +0000 (UTC) HMM_SOURCE_IP: 172.18.0.48:39016.2106125459 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-110.184.64.64 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id B996828008B for ; Sun, 9 Jan 2022 21:45:06 +0800 (CST) X-189-SAVE-TO-SEND: lic121@chinatelecom.cn Received: from ([172.18.0.48]) by app0024 with ESMTP id 6bed21d9c63940aaa9bd65790ac3294e for dev@openvswitch.org; Sun, 09 Jan 2022 21:45:07 CST X-Transaction-ID: 6bed21d9c63940aaa9bd65790ac3294e X-Real-From: lic121@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 Date: Sun, 9 Jan 2022 21:44:58 +0800 From: lic121 To: "dev@openvswitch.org" X-Priority: 3 X-Has-Attach: no X-Mailer: Foxmail 7.2.23.114[cn] Mime-Version: 1.0 Message-ID: <2022010921445851196091@chinatelecom.cn> X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [ovs-dev] [PATCH v1 2/2] ofproto-dpif: avoid unneccesary backer revalidation 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" If lldp didn't change, we are not supposed to trigger backer revalidation. Signed-off-by: lic121 --- ofproto/ofproto-dpif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.8.3.1 diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 1cdef18..1bc9ec7 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -2461,10 +2461,10 @@ set_lldp(struct ofport *ofport_, struct ofport_dpif *ofport = ofport_dpif_cast(ofport_); struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofport->up.ofproto); int error = 0; + struct lldp *old_lldp = ofport->lldp; if (cfg) { if (!ofport->lldp) { - ofproto->backer->need_revalidate = REV_RECONFIGURE; ofport->lldp = lldp_create(ofport->up.netdev, ofport_->mtu, cfg); } @@ -2476,6 +2476,8 @@ set_lldp(struct ofport *ofport_, } else if (ofport->lldp) { lldp_unref(ofport->lldp); ofport->lldp = NULL; + } + if (old_lldp != ofport->lldp) { ofproto->backer->need_revalidate = REV_RECONFIGURE; }