From patchwork Fri Nov 20 13:12:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toms Atteka X-Patchwork-Id: 1403691 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Z3CH9W5w; dkim-atps=neutral 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 4Ccxmt67Tcz9sT6 for ; Sat, 21 Nov 2020 00:13:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 28E792E0DF; Fri, 20 Nov 2020 13:12:59 +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 nzJlIuJi70cu; Fri, 20 Nov 2020 13:12:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id C18F02E0D9; Fri, 20 Nov 2020 13:12:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 93D0BC1825; Fri, 20 Nov 2020 13:12:55 +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 63F53C0891 for ; Fri, 20 Nov 2020 13:12:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4FCBC2E0DF for ; Fri, 20 Nov 2020 13:12:52 +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 e3PtvybDJbIz for ; Fri, 20 Nov 2020 13:12:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by silver.osuosl.org (Postfix) with ESMTPS id DB4222E0D9 for ; Fri, 20 Nov 2020 13:12:50 +0000 (UTC) Received: by mail-wm1-f47.google.com with SMTP id 10so10320299wml.2 for ; Fri, 20 Nov 2020 05:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eqblSfB/QgbeFjTKfXtMtL0O0YFIbqPASxOn5menPB8=; b=Z3CH9W5wTfAO6lmczJnUu7/PfQvpHqdenmjVwIhmKhNm8atvsiWJwfIaISk4hTMzsp bBucrcFFexqFJMvD42DaUb6yHqx99P3sTCQO4xin085Ap1aEwbBLGB1Cdy+FCWMLUOjn iy1P8k4WEDu529qFxrZIb+o5AJg52g32KP7n65mHtpn1X8O0awcWP8XsZY/W7Gd/GNRD ujnxkv8f5B9DwUHPU9wxcV9tF0wunALlxL0FjQO5eJRUZyPUJvyktedMDIOGP4bTiLjZ G3qFLjSkpExpSiJloe0nn3G1vNhEVL1fB5mnVjp+LMU4o6/JbhUEXwes0GiLM8dsy7PS VnRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eqblSfB/QgbeFjTKfXtMtL0O0YFIbqPASxOn5menPB8=; b=a2gaU2J/4aQ0TCAaldvcR0jPOO+zxrCZZReFyej4XSxip2Fjsc7hG86HxcFrkdlwze vDwcZaG2LaLCvvxLqPw1OqxRi1WoJY/u4jT8Y+MmuADhhf/4hm4EMmrpX8QLXW0+8Xf1 I60J8s+gkFnaUoh6Gp1yZCtQYqwFF6xyia5v30OixZVGJgnVAWPWfzKE3gPwF7GidbCq XVTM21NGsX3yMnp2TcC0rqoAm/HR6FBfUUTUhtQTZeOY5ieA48PbHxnS5rKkI/Z5KMtg ZpQICggti+JTruDBo0LWcGet6ClUfw4yHCCFzJxvrHEOSm7lJQBR2mMuJilp2HG05Azs AGFg== X-Gm-Message-State: AOAM533a92/2gAutw8WOIQvAqnPofpljFcy3mKBy1j/EB26XHq15m3X9 dN7J/2c3xV+c6KyLu/XK8yQh4zYccIM= X-Google-Smtp-Source: ABdhPJwR0WaXL5FIlFBWmaAQco0+S/LJAXBnQEr6ZaMJ7OYZ8E9qmhVWD+BTXEuEaapJQewkDIZ6nw== X-Received: by 2002:a1c:f20d:: with SMTP id s13mr10315480wmc.156.1605877969067; Fri, 20 Nov 2020 05:12:49 -0800 (PST) Received: from ubuntu.localdomain ([85.254.75.56]) by smtp.googlemail.com with ESMTPSA id g131sm4610171wma.35.2020.11.20.05.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 05:12:48 -0800 (PST) From: Toms Atteka To: dev@openvswitch.org Date: Fri, 20 Nov 2020 05:12:46 -0800 Message-Id: <20201120131246.877066-1-cpp.code.lv@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Cc: Toms Atteka Subject: [ovs-dev] [PATCH] netlink: removed incorrect optimization 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" This optimization caused FLOW_TNL_F_UDPIF flag not to be used in hash calculation for geneve tunnel when revalidating flows which resulted in different cache hash values and incorrect behaviour. Reported-at: https://github.com/vmware-tanzu/antrea/issues/897 Signed-off-by: Toms Atteka --- lib/tun-metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tun-metadata.c b/lib/tun-metadata.c index c0b0ae044..af0bcbde8 100644 --- a/lib/tun-metadata.c +++ b/lib/tun-metadata.c @@ -828,7 +828,7 @@ tun_metadata_to_geneve_nlattr(const struct flow_tnl *tun, } else { tun_metadata_to_geneve_nlattr_mask(key, tun, flow, b); } - } else if (flow->metadata.present.len || is_mask) { + } else { nl_msg_put_unspec(b, OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, tun->metadata.opts.gnv, flow->metadata.present.len);