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 89003A0553 for ; Mon, 17 Feb 2020 18:47:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82BC01DA12; Mon, 17 Feb 2020 18:47:30 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by dpdk.org (Postfix) with ESMTP id EC5D01DA12 for ; Mon, 17 Feb 2020 18:47:28 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id y11so20779621wrt.6 for ; Mon, 17 Feb 2020 09:47:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z2hXvKYcQ9PaJNwe7osGltutaAuWlwJ0LCukhgBF4rw=; b=IAZ3+ih/A+YfNJSvLQ1mQXuP8OWBhxS3vAlpgGxE+8qf12MPaXN46KxhtDNYyLe5s2 aL5iKhUnWSPX8+skQUDGfjYnt010Nlf6L5OzcO21Ry8sLT8W7RKTRInSyqkrwgUKYaoT Q0swMW386KljKdnh2np81oXG4oZOobs9k9UUTyK2p1cYCxzmKna0HXlW7vTiH0c2X8pm eYn+s3dAxlKN44axMkbB/TQ71q3h9hgUWk5QUfyXG83146ZSoy88OMrLbnX9I7df2mt4 JQ4Dje7sdzsACx/gqgsc+xW8eOQuUdLpSPjbsOfx0AMbVOMAIxfOZHmx5y0iVzP90ltC 9L6Q== 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:mime-version:content-transfer-encoding; bh=Z2hXvKYcQ9PaJNwe7osGltutaAuWlwJ0LCukhgBF4rw=; b=LHdbpS1/QrGHQTz2owFOJzZUiKId/tldPtxoNWHxHTBP6uWSIqQcVq/TxOAUbcuHRC VOprvVcmjEzlu6Q+0q8OR7XE7eUU9CQBtwRHvLwFsa+VtIx9yT6H12cSQcBZTwn5ebyZ 994UBNhdSBfUu+NHQQHlypMrUMSu5pRODwAaqffhfoRS5e7NcEP46HwBGtSN5ZqMIdeP rXGEOvdF86PHaf8RBlkY5TVPUIRdPPVorcBYJ2C62W1m1DTpxcE2EyoJMdHjkAUlb4Yq l/ugEhfpArMfm+osYhU2oXMc/SUoTiZE7sb30efqp5mB9QW4f+Ttm1DCgs7d5qKhjOKr 6R9Q== X-Gm-Message-State: APjAAAUukVrynz1H2lGzO7lKtzZ6Ww0N7ZlAMutb1Xb87qLIf8LG1Kwy pNIr8AMsp4p/BS5Xz6aRdNE= X-Google-Smtp-Source: APXvYqxzuzH7csvsaxAKUdMHhSiJFaZfSrwAjf8EJ2hzAgBQTr3lqai9l5E3XLX0VsUgkWPdEL+nUA== X-Received: by 2002:adf:ef92:: with SMTP id d18mr22373881wro.234.1581961648648; Mon, 17 Feb 2020 09:47:28 -0800 (PST) Received: from localhost (userh634.uk.uudial.com. [194.69.103.7]) by smtp.gmail.com with ESMTPSA id 21sm225522wmo.8.2020.02.17.09.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:47:28 -0800 (PST) From: luca.boccassi@gmail.com To: Sunil Kumar Kori Cc: Pavan Nikhilesh , dpdk stable Date: Mon, 17 Feb 2020 17:45:41 +0000 Message-Id: <20200217174546.25334-49-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200217174546.25334-1-luca.boccassi@gmail.com> References: <20200211112216.3929-190-luca.boccassi@gmail.com> <20200217174546.25334-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/l2fwd-event: fix error checking' has been queued to stable release 19.11.1 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 1a4537dcc2f2c36aa235d63675b970e367293828 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Kori Date: Thu, 30 Jan 2020 13:49:12 +0530 Subject: [PATCH] examples/l2fwd-event: fix error checking [ upstream commit 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 ] Patch fixes coverity issues which handle return values from API calling. Coverity issue: 350588, 350594, 350598, 350599 Fixes: 3b5476db4823 ("examples/l2fwd-event: setup event queue and port") Signed-off-by: Sunil Kumar Kori Acked-by: Pavan Nikhilesh --- examples/l2fwd-event/l2fwd_event_generic.c | 9 +++++++-- examples/l2fwd-event/l2fwd_event_internal_port.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c index b07306a17b..2dc95e5f7d 100644 --- a/examples/l2fwd-event/l2fwd_event_generic.c +++ b/examples/l2fwd-event/l2fwd_event_generic.c @@ -112,7 +112,9 @@ l2fwd_event_port_setup_generic(struct l2fwd_resources *rsrc) rte_panic("No space is available\n"); memset(&def_p_conf, 0, sizeof(struct rte_event_port_conf)); - rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf); + ret = rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf); + if (ret < 0) + rte_panic("Error to get default configuration of event port\n"); if (def_p_conf.new_event_threshold < event_p_conf.new_event_threshold) event_p_conf.new_event_threshold = @@ -173,7 +175,10 @@ l2fwd_event_queue_setup_generic(struct l2fwd_resources *rsrc, if (!evt_rsrc->evq.event_q_id) rte_panic("Memory allocation failure\n"); - rte_event_queue_default_conf_get(event_d_id, 0, &def_q_conf); + ret = rte_event_queue_default_conf_get(event_d_id, 0, &def_q_conf); + if (ret < 0) + rte_panic("Error to get default config of event queue\n"); + if (def_q_conf.nb_atomic_flows < event_q_conf.nb_atomic_flows) event_q_conf.nb_atomic_flows = def_q_conf.nb_atomic_flows; diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c index 5e6e8598af..63d57b46c2 100644 --- a/examples/l2fwd-event/l2fwd_event_internal_port.c +++ b/examples/l2fwd-event/l2fwd_event_internal_port.c @@ -109,7 +109,10 @@ l2fwd_event_port_setup_internal_port(struct l2fwd_resources *rsrc) if (!evt_rsrc->evp.event_p_id) rte_panic("Failed to allocate memory for Event Ports\n"); - rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf); + ret = rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf); + if (ret < 0) + rte_panic("Error to get default configuration of event port\n"); + if (def_p_conf.new_event_threshold < event_p_conf.new_event_threshold) event_p_conf.new_event_threshold = def_p_conf.new_event_threshold; @@ -161,7 +164,10 @@ l2fwd_event_queue_setup_internal_port(struct l2fwd_resources *rsrc, uint8_t event_q_id = 0; int32_t ret; - rte_event_queue_default_conf_get(event_d_id, event_q_id, &def_q_conf); + ret = rte_event_queue_default_conf_get(event_d_id, event_q_id, + &def_q_conf); + if (ret < 0) + rte_panic("Error to get default config of event queue\n"); if (def_q_conf.nb_atomic_flows < event_q_conf.nb_atomic_flows) event_q_conf.nb_atomic_flows = def_q_conf.nb_atomic_flows; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-17 17:00:16.677985760 +0000 +++ 0049-examples-l2fwd-event-fix-error-checking.patch 2020-02-17 17:00:15.379951475 +0000 @@ -1,15 +1,16 @@ -From 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 Mon Sep 17 00:00:00 2001 +From 1a4537dcc2f2c36aa235d63675b970e367293828 Mon Sep 17 00:00:00 2001 From: Sunil Kumar Kori Date: Thu, 30 Jan 2020 13:49:12 +0530 Subject: [PATCH] examples/l2fwd-event: fix error checking +[ upstream commit 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 ] + Patch fixes coverity issues which handle return values from API calling. Coverity issue: 350588, 350594, 350598, 350599 Fixes: 3b5476db4823 ("examples/l2fwd-event: setup event queue and port") -Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori Acked-by: Pavan Nikhilesh