From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF122A04C1; Wed, 20 Nov 2019 05:29:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12A572C6D; Wed, 20 Nov 2019 05:29:30 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id A081B2C36 for ; Wed, 20 Nov 2019 05:29:28 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 40D0730C137; Tue, 19 Nov 2019 20:25:55 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 40D0730C137 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1574223955; bh=SzFISJPLAcONQvTC9d0E1vjrCoQxcV/rOlk8F2qsnTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTqi0zp7z30tbWE+Wcz2llJqkjE14ZgsmHyzaLmB1a8vZMPtI3MigPrqveyJU4rFv AgOxdGEwsFybOnuoRTTF+BU1KCz0YrLjWt/Igw0pEuHnNqNfvuYyYFP5PWugRqt27Y onvGcgRLh5sh/DaE2NTORKN9W1IBa/CtzjNrk6Gg= Received: from localhost.localdomain (unknown [10.230.29.49]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 843F614008C; Tue, 19 Nov 2019 20:29:24 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Santoshkumar Karanappa Rastapur , Somnath Kotur Date: Tue, 19 Nov 2019 20:29:07 -0800 Message-Id: <20191120042907.1030-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20191120042907.1030-1-ajit.khaparde@broadcom.com> References: <20191120042907.1030-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] net/bnxt: fix check for null spec and mask X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" bnxt_validate_and_parse_flow_type already has protocol specific NULL checks for rte_flow_item spec and mask and take actions accordingly. A check at the top of the loop is redundant and is preventing the protocol specific checks from being executed. Fixes: b7e01f386059 ("net/bnxt: handle cleanup if flow creation fails") Signed-off-by: Ajit Khaparde Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_flow.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 5af571448..76e9584da 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -177,14 +177,6 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, return -rte_errno; } - if (!item->spec || !item->mask) { - rte_flow_error_set(error, EINVAL, - RTE_FLOW_ERROR_TYPE_ITEM, - item, - "spec/mask is NULL"); - return -rte_errno; - } - switch (item->type) { case RTE_FLOW_ITEM_TYPE_ANY: inner = -- 2.21.0 (Apple Git-122.2)