From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id 59CE92BB1 for ; Wed, 1 Mar 2017 13:38:08 +0100 (CET) Received: by mail-wr0-f175.google.com with SMTP id u48so29244204wrc.0 for ; Wed, 01 Mar 2017 04:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=cFoVoJvJU9WZYgEJ06A6Wpgm/DIXoG6mbZpWdmRMC3M=; b=hkIm9tfOx6NLNBy1J2UElrjrw8GB/x3KxpIz1SdWqNHS3HcrIRHAR4kG7klTDZx0NU +lmgqOPoehR/SZPh8jpRQYa8Ul/9J+sVJGFj3oZUDHX5ulsuuk0DrgMgMJslm0Px81N4 ugrQ1zRcjKSQUh1PRnjxIqOA0jPHJtYE2gCJfSqZmkSxZ5z3Lr+0o9KZBzX7vYEw65yB Yws0d6OW75XRB/lHdQJ3TJAxHKcXaoBt93aFmAtEPN6O/M2Rluo3lSXxDkNEJxnbUtPi 1uixAfleLL2NUbDFYkKZe0AEXo4pi/Mvitgueh80KOLUeYy2ytkHzBoGHrJzzsJzWaAy WltQ== 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:in-reply-to :references:in-reply-to:references; bh=cFoVoJvJU9WZYgEJ06A6Wpgm/DIXoG6mbZpWdmRMC3M=; b=ta4n1Dandk5f6luL0K02ZSr0QOFioMNl2w12Gh3rPpkOaktRDncKM312XPZ+EP+BKE SUo/F+KkGeZrieopligcomeEEW6tQ0lCrhvzrLUQfDArq9OzmhegBO8ZpAN/PRfAElIp eVEkl+R14BYg71jNRpe870z5kaeGzXA+a0D0m3t4gLCeiAOjFlfgLjB9/2ZFfANEV2Ez LXFTbFAmfB8YyaQX1l9TArx+0e2dja3bspos+9q3WKpbyZ7CTs2ie5PqFLfbj75x0StT McWAkI6/g0DNPh+1CRMZwI1AGLMg4upbDmfhEP0dKGpdoKJU6KmwUbBx0ooMahIpuHcZ j0Lg== X-Gm-Message-State: AMke39leBP/ZieXBATSWGxH6t1Htknoo/EW/xaIlYHpeh0DNKw05fcZAgTt4zOoGmgk5xU/0 X-Received: by 10.223.179.15 with SMTP id j15mr6616579wrd.159.1488371887789; Wed, 01 Mar 2017 04:38:07 -0800 (PST) Received: from ping.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g127sm2128053wmd.30.2017.03.01.04.38.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Mar 2017 04:38:07 -0800 (PST) From: Nelio Laranjeiro To: Cc: Adrien Mazarguil , stable@dpdk.org Date: Wed, 1 Mar 2017 13:37:38 +0100 Message-Id: <8c5cffa66fea17a288c0b913b200bcfb8bf545c4.1488364873.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-stable] [PATCH 1/9] net/mlx5: fix drop queue creation error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 12:38:08 -0000 Creating a drop queue in mlx5 ends by creating a non polled queue, but if the associated work queue could not be created the error was not handled ending in a undefined situation. Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions") CC: stable@dpdk.org Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 23c1b5e..6765a77 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -902,6 +902,12 @@ priv_flow_create_action_queue(struct priv *priv, .pd = priv->pd, .cq = rte_flow->cq, }); + if (!rte_flow->wq) { + rte_flow_error_set(error, ENOMEM, + RTE_FLOW_ERROR_TYPE_HANDLE, + NULL, "cannot allocate WQ"); + goto error; + } } else { rxq = container_of((*priv->rxqs)[action->queue_id], struct rxq_ctrl, rxq); -- 2.1.4