From patchwork Wed May 27 16:01:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1299017 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=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XFvW6XR1z9sTm for ; Thu, 28 May 2020 02:01:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B80E08893C; Wed, 27 May 2020 16:01:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3JyFFBvC5SaR; Wed, 27 May 2020 16:01:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id C2B60888E2; Wed, 27 May 2020 16:01:50 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9A950C0892; Wed, 27 May 2020 16:01:50 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id F1A69C016F for ; Wed, 27 May 2020 16:01:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DE0F720399 for ; Wed, 27 May 2020 16:01:46 +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 T2YiLC71fvRq for ; Wed, 27 May 2020 16:01:45 +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 silver.osuosl.org (Postfix) with ESMTP id 9C0B624B59 for ; Wed, 27 May 2020 16:01:44 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 27 May 2020 19:01:42 +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 04RG1fBZ001095; Wed, 27 May 2020 19:01:42 +0300 From: Eli Britstein To: dev@openvswitch.org, Ilya Maximets Date: Wed, 27 May 2020 16:01:10 +0000 Message-Id: <20200527160112.28005-11-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20200527160112.28005-1-elibr@mellanox.com> References: <20200527160112.28005-1-elibr@mellanox.com> Cc: Eli Britstein , Ameer Mahagneh Subject: [ovs-dev] [PATCH V2 10/12] dpif-netdev: Add mega ufid in flow add 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 | 7 +++++-- tests/dpif-netdev.at | 2 ++ tests/ofproto-macros.at | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 57565802a..da0c48ef5 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2510,8 +2510,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(); } @@ -3383,6 +3384,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 21f0c8d24..ec5ffc290 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])