From patchwork Mon Oct 14 10:05:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valerio X-Patchwork-Id: 1996768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=UvnD5Ink; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XRtDF1YZPz1xvm for ; Mon, 14 Oct 2024 21:06:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DC0EF404D6; Mon, 14 Oct 2024 10:06:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id TzlQ0boKJTxu; Mon, 14 Oct 2024 10:06:17 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 18BF2404D5 Authentication-Results: smtp4.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=UvnD5Ink Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 18BF2404D5; Mon, 14 Oct 2024 10:06:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E58BBC08A6; Mon, 14 Oct 2024 10:06:16 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C05AAC08A3 for ; Mon, 14 Oct 2024 10:06:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A7E2D40197 for ; Mon, 14 Oct 2024 10:06:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lVnu7XuqRXFK for ; Mon, 14 Oct 2024 10:06:15 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pvalerio@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org B944B400FB Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B944B400FB Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UvnD5Ink Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id B944B400FB for ; Mon, 14 Oct 2024 10:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728900373; 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=P+9qaxRh9WDEU31opk7E+tVVpTNplQdrmqcxGTBZKIQ=; b=UvnD5Ink8dw80I1PPOHy/83MG17Tw+SDroOtY8LGg0NJsCr0pVHcxOhR7L5CmkKR5O9jKF EN30PU8ZDA0UyFveuIvl3S/awQ/I339+1F775psqOwGyak/WlIGpjTFrnCJrMj/6aX8cUP hXDTxe7uoD8nrDENSwuil7uBhBezCy0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-175-23VelhpCPmasN4bfOL93Wg-1; Mon, 14 Oct 2024 06:06:11 -0400 X-MC-Unique: 23VelhpCPmasN4bfOL93Wg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43057565db5so21723105e9.1 for ; Mon, 14 Oct 2024 03:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728900370; x=1729505170; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P+9qaxRh9WDEU31opk7E+tVVpTNplQdrmqcxGTBZKIQ=; b=Y+X2nOFfqZRdVTalISX5g6aMRi8OWJRW9Qyd0Q6a7jYPMbZxzs94OhA97r1U4ralPq blSaTWN5JcnCGPeSJLGF0SsCgwU9KmH6Hnbn7RqT/fqguWFaOQdsOSIx3akfNYP8rRZT 6GWmcubLJBFJNPOrzsm+QmfTRnaRb1SPcK4mlRejBmp/1lRLiBUzJ4VUNhzPXXd3+BGK vErtIMCQ++XSEmoM/uEKmLvcyrCKIVENUyiHTUlOem3MjtwClodEVxpAmOFnW+cCUEA+ yrvF5NE6z0KsSODGrDk2mWIF3OzmZUwKrGcHSrmJDWR7+LGtKwlJk9oGBu0V4PiE/DyH zPDQ== X-Gm-Message-State: AOJu0Yzz1CaMNzl9kmNURnbRfWJYYSjsq98JXfu5A9RzN9UVRnnKOOy3 yKQLCPCCPuqHhwemFY6FUq86yIWnQ5Yoky9+gD5sg6iANKP+vrXhn8for+O3nRXREk3RlIVrzuT 3u91OsXy79Hs9YvXJDdJVPzEfjaCWgfz2IWai9ODkNUa2PREK1/AAhfJIYiegJWCLcQ0bKePMoW ABy+u0ZqPZYVGxWhibjcz7k6psi0/DfcdDKPHhmlM= X-Received: by 2002:a05:600c:1c9f:b0:42c:ba81:117c with SMTP id 5b1f17b1804b1-4311d8914ecmr85958235e9.6.1728900370444; Mon, 14 Oct 2024 03:06:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWVfqtTpTD3WQ9fSh/S0mFwhhIwkeRuVIYOstcPlPUpDPVGSBs5f7uyjUhRFOg0DSNl1Kljw== X-Received: by 2002:a05:600c:1c9f:b0:42c:ba81:117c with SMTP id 5b1f17b1804b1-4311d8914ecmr85957965e9.6.1728900370018; Mon, 14 Oct 2024 03:06:10 -0700 (PDT) Received: from localhost (net-188-216-80-179.cust.vodafonedsl.it. [188.216.80.179]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-430ccf204f7sm149263055e9.2.2024.10.14.03.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 03:06:09 -0700 (PDT) From: Paolo Valerio To: ovs-dev@openvswitch.org Date: Mon, 14 Oct 2024 12:05:56 +0200 Message-ID: <20241014100557.69392-1-pvalerio@redhat.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH] conntrack: Fix Windows build due to ternary syntax extension. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilya Maximets Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Aaron Conole In the cited commit a ternary using syntax extension slipped in. The extension allows omitting the second operand and it is not supported by MSVC resulting in a build failure. Fix it by simply specifying the second operand. Fixes: b57c1da5c39a ("conntrack: Use a per zone default limit.") Reported-by: Ilya Maximets Signed-off-by: Aaron Conole [Paolo: added commit message] Signed-off-by: Paolo Valerio --- lib/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/conntrack.c b/lib/conntrack.c index 0061a5636..f4b150bee 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -313,7 +313,7 @@ zone_limit_get_limit(struct conntrack *ct, struct conntrack_zone_limit *czl) if (limit == ZONE_LIMIT_CONN_DEFAULT) { atomic_read_relaxed(&ct->default_zone_limit, &limit); - limit = limit ? : -1; + limit = limit ? limit : -1; } return limit;