From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 5565E1B31A for ; Thu, 15 Feb 2018 10:28:46 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id b21so26630588wme.4 for ; Thu, 15 Feb 2018 01:28:46 -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=ijxAdWhcdk3Tph4Te3RmfkYC5SMWi3oJzMTU5l+df1I=; b=EbPlOMUNWz9DfC0mHmBbjaXB8a9fo0jZKltlZldm7E+c1yNF1fFvE5S5C/Ryd1mY6I OBaOt+6n9LgoG1PKlY2MQpUgyMhQE8z2noAwJa97uzQtBOUzUPtkVr9vie7b5yCsTG+u g+gX/Lawo9zDhKtr4Jj2ikM5FVVflE2SY5PRNvGEC0o3FPG7/Ydht6lJANshM1R6gf18 x787qkecIIFoxYNbl6itFTPdpwfFteHnLkrfLL4KjcrNj8DxhY/WeM0JgKy3FEP1xTEu zHRA8nQ+mqDfTTZiL9VN5gZp9dEdDv9CBM9Yq7helX459XiuC4wvzVdaz/z060mhpMcw MjCw== 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=ijxAdWhcdk3Tph4Te3RmfkYC5SMWi3oJzMTU5l+df1I=; b=W4pdjB6uDzHBtrzn4gnkaQGqiUgNAVRWCcldKgi+vA3zYAoVG1lTPh6eKMbcEKGt/N LWzXxFwBRZSYbuycBHtIF8KHBlXERwGQhJbybRfQ340Iu0Ul8b0Es3LjXYZ2eTdaeG7g 7RkBgRiwo/FkhCiFRzfmC+IM1aE2UwFxG5fRjzAjzHkTqOx6NA5KELSyeSmPAfz+HmRL ToUPaZbTLFAXzz8QpO9OVyq2uU1MpucV7fpS2PSv0+qGufYzqYOBI+lLGYQs+v4grmqR f7i9h0jvmQo4e3zaKJGFGYzDaaBafEV7sMQM6o92CPhYLjjeNojOA60zl8QGkHhpYJwN ajAQ== X-Gm-Message-State: APf1xPD4iXguqnDd+oOYbTGrgRwiWMZCas0erjO1kfo8TNsi572ZSRRV 7bgDSEZkYrTgibWMo75ZyPIlbj2PSQ== X-Google-Smtp-Source: AH8x224O38DFknApexIkBVLw8xbWxjlEav5H3kUvvWJz1agHoK3QjaKleYENy7fQYiaKutoSGasIpQ== X-Received: by 10.28.207.201 with SMTP id f192mr365001wmg.81.1518686925910; Thu, 15 Feb 2018 01:28:45 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g64sm11307595wmf.20.2018.02.15.01.28.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 01:28:45 -0800 (PST) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil , Yongseok Koh , stable@dpdk.org Date: Thu, 15 Feb 2018 10:29:27 +0100 Message-Id: <20fc1ef17c45c727fe72182fa0ba89313fdb430d.1518686930.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 3/3] net/mlx5: fix traffic restart function to return errors 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: , X-List-Received-Date: Thu, 15 Feb 2018 09:28:46 -0000 priv_dev_traffic_restart() was considering nothing could fail whereas it can. Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_trigger.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 2918ba0e9..2895e57e7 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -391,11 +391,15 @@ priv_dev_traffic_disable(struct priv *priv, struct rte_eth_dev *dev) int priv_dev_traffic_restart(struct priv *priv, struct rte_eth_dev *dev) { + int ret = 0; + if (dev->data->dev_started) { - priv_dev_traffic_disable(priv, dev); - priv_dev_traffic_enable(priv, dev); + ret = priv_dev_traffic_disable(priv, dev); + if (ret) + return ret; + ret = priv_dev_traffic_enable(priv, dev); } - return 0; + return ret; } /** -- 2.11.0