From patchwork Wed Oct 26 08:44:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valerio X-Patchwork-Id: 1694840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OeO/+yVd; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4My2Rm4r6Rz20S2 for ; Wed, 26 Oct 2022 19:44:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9603380C89; Wed, 26 Oct 2022 08:44:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9603380C89 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OeO/+yVd 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 1MfdhIvXrZH1; Wed, 26 Oct 2022 08:44:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id CE14280C10; Wed, 26 Oct 2022 08:44:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CE14280C10 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7045CC0033; Wed, 26 Oct 2022 08:44:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7F5D7C002D for ; Wed, 26 Oct 2022 08:44:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 58DD7401D0 for ; Wed, 26 Oct 2022 08:44:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 58DD7401D0 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OeO/+yVd X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V2QHkzI9zNvj for ; Wed, 26 Oct 2022 08:44:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3559D401B2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3559D401B2 for ; Wed, 26 Oct 2022 08:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666773862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Px/G/MvXR/PwM26Y86KC0Iwl+UhkBnZA31TROLEo1kY=; b=OeO/+yVdMgIITV5ggZmw6pwbvdKdSIVxVCkkiL4aEmZ/AeaHa6IM9xQndomzctQLgdBaBx esKc/E1IlNZ0D7gsGDJy1iwib+agzCnskY4Uq8sqQk5eC7jLSzFo//vfcM3WJtd6tg6Ry2 l4FwIJHU5xlHhp7MndSmgjPZCETfS1w= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-641-mh3S2eqxP9yeP1VN9luQ8w-1; Wed, 26 Oct 2022 04:44:17 -0400 X-MC-Unique: mh3S2eqxP9yeP1VN9luQ8w-1 Received: by mail-wm1-f70.google.com with SMTP id h204-20020a1c21d5000000b003cf4e055442so50588wmh.1 for ; Wed, 26 Oct 2022 01:44:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :cc:to:from:subject:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Px/G/MvXR/PwM26Y86KC0Iwl+UhkBnZA31TROLEo1kY=; b=rOOSiS0hRpPWP/POyM1wr84V3Et/JgpyhAIibUt+MHS4r/Qmgn25m9gOUTpNWMSyTj DlGhsDpNo6z8YRl+6GwqTkugAwRrPJEyxmjKy72soJEEok226eTUkL7R5E8C8/SE07nK 7UtEnYUqXCRG4BHGqxRDei6YIfBbQmmVktvdHHKBs19mkglX+0oJdSF81gO285S/g7ov +3MzAHmwMMdE8ADcu1BxfHObF0ku5c+Ij+ftG3srxp6lTNrZufgYWSPYdElZz2kWXxfG XnNNE3CokHFtGDiFGMa6Icy5Tvb2L1GjD2NkI3duHQ01M7b+HHJh8DqG4YFb4CLk3Tlf v9WQ== X-Gm-Message-State: ACrzQf3Mdb06r8niIFeOVhJYK3anyPZkDurG6qC0BNv5vD8YNDYnDUJ/ kabWA7VzRO11KT9jT4EDUCfvjvZlDZCafGM8jE2Q43/eWom9miPsssIQg/xeHSqjnLGWB1vbR+T dH+6AVu99T8AvNdEldl3+fYU7Zc0FFVJ6LkzgaDRkL0rZ/12iGZfKonmQV/xh/0Fm X-Received: by 2002:a7b:c3c4:0:b0:3c4:785a:36d7 with SMTP id t4-20020a7bc3c4000000b003c4785a36d7mr1621918wmj.138.1666773856421; Wed, 26 Oct 2022 01:44:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM43MNjExuH3GMLHbjyJOHtMds+Vj0Vql/N0Z5B1sTjsxv/Lr0xaxiNTNmJDVqxqqkGoypImjQ== X-Received: by 2002:a7b:c3c4:0:b0:3c4:785a:36d7 with SMTP id t4-20020a7bc3c4000000b003c4785a36d7mr1621899wmj.138.1666773856165; Wed, 26 Oct 2022 01:44:16 -0700 (PDT) Received: from localhost (net-93-144-154-104.cust.dsl.teletu.it. [93.144.154.104]) by smtp.gmail.com with ESMTPSA id h5-20020a05600c2ca500b003b435c41103sm1641698wmc.0.2022.10.26.01.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 01:44:15 -0700 (PDT) From: Paolo Valerio To: dev@openvswitch.org Date: Wed, 26 Oct 2022 10:44:09 +0200 Message-ID: <166677384931.806968.5359905777279608036.stgit@fed.void> User-Agent: StGit/1.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v2] odp-util: Add missing separator in format_odp_conntrack_action() 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 OVS_CT_ATTR_TIMEOUT is included, the resulting output is the following: actions:ct(commit,timeout=1nat(src=10.1.1.240)) Fix it by trivially adding a trailing ',' to timeout as well. Signed-off-by: Paolo Valerio --- v2: added test case in odp.at --- lib/odp-util.c | 2 +- tests/odp.at | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index ba5be4bb3..72e076e1c 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -1004,7 +1004,7 @@ format_odp_conntrack_action(struct ds *ds, const struct nlattr *attr) ds_put_format(ds, "helper=%s,", helper); } if (timeout) { - ds_put_format(ds, "timeout=%s", timeout); + ds_put_format(ds, "timeout=%s,", timeout); } if (nat) { format_odp_ct_nat(ds, nat); diff --git a/tests/odp.at b/tests/odp.at index 7a1cf3b2c..88b7cfd91 100644 --- a/tests/odp.at +++ b/tests/odp.at @@ -348,7 +348,9 @@ ct(commit,helper=tftp) ct(commit,timeout=ovs_tp_1_tcp4) ct(nat) ct(commit,nat(src)) +ct(commit,timeout=ovs_tp_1_tcp4,nat(src)) ct(commit,nat(dst)) +ct(commit,timeout=ovs_tp_1_tcp4,nat(dst)) ct(commit,nat(src=10.0.0.240,random)) ct(commit,nat(src=10.0.0.240:32768-65535,random)) ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))