From patchwork Tue Mar 17 23:31:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1257025 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.137; helo=fraxinus.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=Oh++QQe2; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48hqG81tQFz9sPF for ; Wed, 18 Mar 2020 10:32:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id AE4728769C; Tue, 17 Mar 2020 23:32:29 +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 i_y351dtdpYx; Tue, 17 Mar 2020 23:32:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id E43AA87693; Tue, 17 Mar 2020 23:32:27 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C1279C1D74; Tue, 17 Mar 2020 23:32:27 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9330BC013E for ; Tue, 17 Mar 2020 23:32:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BF6C88A06 for ; Tue, 17 Mar 2020 23:32:26 +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 ea3CNJK8ubiN for ; Tue, 17 Mar 2020 23:32:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 079BC889FA for ; Tue, 17 Mar 2020 23:32:26 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id f16so10320117plj.4 for ; Tue, 17 Mar 2020 16:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2uGf9fnu6KX/4CNOgksJoUM7xMWUVBHpxfpYz0B5JLI=; b=Oh++QQe2/y2Xu1NruhICtWtr2K/97+h0tCJ5eXTWUfM5EikUL5l1k32/glurgDyvDN A4/siPSVFvSF1hr0GklOesd53aWq2kD8IO+gVggYaP2J/kWkiibCJqXz9W5pAc4Saixu iNd/2k6eKBGsqyG93HxlVc+3ugAehKq//Bar3S8BeHWPTNO2hvN6HHnleilyuCxs1PQt wsONpda11PAR+MWUDmXtB1BoB2LAcJ+ed2zsliAogRf62iyrENlmYZpCbFS0tWN+p7sS omf/ky8JC+1IRsLWU4wsrq6LpEeTHVtLkjz22LOCmTYZjDPtaw60HREihwKzTJe4vbxZ ZivA== 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; bh=2uGf9fnu6KX/4CNOgksJoUM7xMWUVBHpxfpYz0B5JLI=; b=TgoMdmYflmIP1FqQVeBznpID3nyACviLwdKn10+70yYiYvESKx9LK0W1tYArXjRKcv TLG4W0i0G5/w0/xIfA+nQ5hAmCuhE9sFnY0FLg2Mks9GGc8FTuO8V3hqxwnEtjnFlAer a4LRAUJU5arJ8fU7uPsLJxFUo0YDHjXjgTEKt5NgSHTKZmkWYaA61m20nWryY8Lvqr0d iL6d3cQME8eXVhchLeZQXcRc57ITS50sVXuoIpJ0NXzoPkz6VJLywher5xs30jkNTM5i PSd7Svt+mfwR7GByDPF60Hs/aEpTqwo8+BfOfhct3PE21g2S9nDv265ve+XxanVoGWNr 6vDQ== X-Gm-Message-State: ANhLgQ1r7b3BUZhmyhXiR8Jxn8ZR9Q3dUJkZoVqWjuL4RArc522a5+6M y3B9/IBvm/xk54c+8pb0gAwfX4R+ X-Google-Smtp-Source: ADFU+vuGoHRDBvsB2E6CXh+K77nsmQvcrTJmBsgzSsZgeDCfWdtn8O1oOfeCPMekxoiqpTO6bCZKng== X-Received: by 2002:a17:90b:490a:: with SMTP id kr10mr1669310pjb.19.1584487945236; Tue, 17 Mar 2020 16:32:25 -0700 (PDT) Received: from sc9-mailhost2.vmware.com (c-76-21-95-192.hsd1.ca.comcast.net. [76.21.95.192]) by smtp.gmail.com with ESMTPSA id d14sm3260262pfq.29.2020.03.17.16.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2020 16:32:24 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Tue, 17 Mar 2020 16:31:54 -0700 Message-Id: <1584487915-19859-1-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [ovs-dev] [PATCH] dpif-netdev: Fix integer handling issue. 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" Coverity CID 279497 reports "Operands don't affect result". Because flow->ct_state is uint8_t and DP_NETDEV_CS_UNSUPPORTED_MASK is '0xffffff00'. So remove the statement. Cc: Usman Ansari Signed-off-by: William Tu Reviewed-by: Greg Rose --- lib/dpif-netdev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index a798db45d9cb..0e2678d002d5 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3224,10 +3224,6 @@ dpif_netdev_flow_from_nlattrs(const struct nlattr *key, uint32_t key_len, return EINVAL; } - if (flow->ct_state & DP_NETDEV_CS_UNSUPPORTED_MASK) { - return EINVAL; - } - return 0; }