From patchwork Wed Jul 8 06:38:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1325004 X-Patchwork-Delegate: i.maximets@samsung.com 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.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B1qQR0fTpz9sRR for ; Wed, 8 Jul 2020 16:38:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AC2152279E; Wed, 8 Jul 2020 06:38:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XDxJoHKfI2Im; Wed, 8 Jul 2020 06:38:47 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 97F8123077; Wed, 8 Jul 2020 06:38:47 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5CDBCC077B; Wed, 8 Jul 2020 06:38:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id D50E2C016F for ; Wed, 8 Jul 2020 06:38:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BB969876F6 for ; Wed, 8 Jul 2020 06:38:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N44IX880Uk9b for ; Wed, 8 Jul 2020 06:38:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0021787556 for ; Wed, 8 Jul 2020 06:38:43 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with SMTP; 8 Jul 2020 09:38:41 +0300 Received: from dev-r-vrt-215.mtr.labs.mlnx. (dev-r-vrt-215.mtr.labs.mlnx [10.212.215.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0686ce8f022461; Wed, 8 Jul 2020 09:38:41 +0300 From: Eli Britstein To: dev@openvswitch.org, Ilya Maximets Date: Wed, 8 Jul 2020 06:38:21 +0000 Message-Id: <20200708063831.16413-3-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20200708063831.16413-1-elibr@mellanox.com> References: <20200708063831.16413-1-elibr@mellanox.com> Cc: Eli Britstein , Ameer Mahagneh Subject: [ovs-dev] [PATCH V6 02/12] dpif-netdev: Add mega ufid in flow add/del log 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: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" As offload is done using the mega ufid of a flow, for better debugability, add it in the log message. Signed-off-by: Eli Britstein Reviewed-by: Roni Bar Yanai --- lib/dpif-netdev.c | 13 +++++++++---- tests/dpif-netdev.at | 2 ++ tests/ofproto-macros.at | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index e037eab2a..8f772c4c1 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2356,7 +2356,8 @@ mark_to_flow_associate(const uint32_t mark, struct dp_netdev_flow *flow) hash_int(mark, 0)); flow->mark = mark; - VLOG_DBG("Associated dp_netdev flow %p with mark %u\n", flow, mark); + VLOG_DBG("Associated dp_netdev flow %p with mark %u mega_ufid "UUID_FMT + "\n",flow, mark, UUID_ARGS((struct uuid *) &flow->mega_ufid)); } static bool @@ -2405,7 +2406,8 @@ mark_to_flow_disassociate(struct dp_netdev_pmd_thread *pmd, } flow_mark_free(mark); - VLOG_DBG("Freed flow mark %u\n", mark); + VLOG_DBG("Freed flow mark %u mega_ufid "UUID_FMT"\n", mark, + UUID_ARGS((struct uuid *) &flow->mega_ufid)); megaflow_to_mark_disassociate(&flow->mega_ufid); } @@ -2612,8 +2614,9 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED) OVS_NOT_REACHED(); } - VLOG_DBG("%s to %s netdev flow\n", - ret == 0 ? "succeed" : "failed", op); + VLOG_DBG("%s to %s netdev flow "UUID_FMT"\n", + ret == 0 ? "succeed" : "failed", op, + UUID_ARGS((struct uuid *) &offload->flow->mega_ufid)); dp_netdev_free_flow_offload(offload); ovsrcu_quiesce(); } @@ -3484,6 +3487,8 @@ dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd, ds_put_cstr(&ds, "flow_add: "); odp_format_ufid(ufid, &ds); + ds_put_cstr(&ds, " mega_"); + odp_format_ufid(&flow->mega_ufid, &ds); ds_put_cstr(&ds, " "); odp_flow_format(key_buf.data, key_buf.size, mask_buf.data, mask_buf.size, diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at index 9c0a42d00..ff173677a 100644 --- a/tests/dpif-netdev.at +++ b/tests/dpif-netdev.at @@ -13,6 +13,7 @@ strip_timers () { strip_xout () { sed ' + s/mega_ufid:[-0-9a-f]* // s/ufid:[-0-9a-f]* // s/used:[0-9]*\.[0-9]*/used:0.0/ s/actions:.*/actions: / @@ -23,6 +24,7 @@ strip_xout () { strip_xout_keep_actions () { sed ' + s/mega_ufid:[-0-9a-f]* // s/ufid:[-0-9a-f]* // s/used:[0-9]*\.[0-9]*/used:0.0/ s/packets:[0-9]*/packets:0/ diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index b2b17eed3..87f9ae280 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -131,7 +131,8 @@ strip_duration () { # Strips 'ufid:...' from output, to make it easier to compare. # (ufids are random.) strip_ufid () { - sed 's/ufid:[[-0-9a-f]]* //' + sed 's/mega_ufid:[[-0-9a-f]]* // + s/ufid:[[-0-9a-f]]* //' } m4_divert_pop([PREPARE_TESTS])