From patchwork Mon Jul 12 15:07:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1504040 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 ozlabs.org (Postfix) with ESMTPS id 4GNnDy2d0lz9sWc for ; Tue, 13 Jul 2021 01:07:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0468D40385; Mon, 12 Jul 2021 15:07:27 +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 2zzrHg9BrZvF; Mon, 12 Jul 2021 15:07:26 +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 2B93D4002B; Mon, 12 Jul 2021 15:07:25 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BDB67C001A; Mon, 12 Jul 2021 15:07:24 +0000 (UTC) X-Original-To: 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 52692C000E for ; Mon, 12 Jul 2021 15:07:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 342FD83227 for ; Mon, 12 Jul 2021 15:07:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g3zPRWCupIKl for ; Mon, 12 Jul 2021 15:07:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by smtp1.osuosl.org (Postfix) with ESMTP id 3662A831E3 for ; Mon, 12 Jul 2021 15:07:20 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@nvidia.com) with SMTP; 12 Jul 2021 18:07:18 +0300 Received: from nvidia.com (dev-r-vrt-214.mtr.labs.mlnx [10.212.214.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 16CF7IU5022570; Mon, 12 Jul 2021 18:07:18 +0300 From: Eli Britstein To: dev@openvswitch.org, Ilya Maximets Date: Mon, 12 Jul 2021 15:07:08 +0000 Message-Id: <20210712150710.19197-2-elibr@nvidia.com> X-Mailer: git-send-email 2.28.0.2311.g225365fb51 In-Reply-To: <20210712150710.19197-1-elibr@nvidia.com> References: <20210712150710.19197-1-elibr@nvidia.com> MIME-Version: 1.0 Cc: Eli Britstein , David Marchand , Majd Dibbiny Subject: [ovs-dev] [PATCH V2 1/3] dpif-netdev: Do not flush PMD offloads on reload 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" Before flushing offloads of a removed port was supported by [1], it was necessary to flush the 'marks'. In doing so, all offloads of the PMD are removed, include the ones that are not related to the removed port and that are not modified following this removal. As a result such flows are evicted from being offloaded, and won't resume offloading. As PMD offload flush is not necessary, avoid it. [1] 62d1c28e9ce0 ("dpif-netdev: Flush offload rules upon port deletion.") Signed-off-by: Eli Britstein Reviewed-by: Gaetan Rivet Reviewed-by: David Marchand --- lib/dpif-netdev.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 610949f36..21b0e025d 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2232,18 +2232,6 @@ mark_to_flow_disassociate(struct dp_netdev_pmd_thread *pmd, return ret; } -static void -flow_mark_flush(struct dp_netdev_pmd_thread *pmd) -{ - struct dp_netdev_flow *flow; - - CMAP_FOR_EACH (flow, mark_node, &flow_mark.mark_to_flow) { - if (flow->pmd_id == pmd->core_id) { - queue_netdev_flow_del(pmd, flow); - } - } -} - static struct dp_netdev_flow * mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd, const uint32_t mark) @@ -4811,7 +4799,6 @@ reload_affected_pmds(struct dp_netdev *dp) CMAP_FOR_EACH (pmd, node, &dp->poll_threads) { if (pmd->need_reload) { - flow_mark_flush(pmd); dp_netdev_reload_pmd__(pmd); } }