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 D48DAA0598; Wed, 8 Apr 2020 10:31:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95F6E1C131; Wed, 8 Apr 2020 10:29:46 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id A1DAC1C10B for ; Wed, 8 Apr 2020 10:29:40 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id q22so2927709ljg.0 for ; Wed, 08 Apr 2020 01:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SoTsB1BcCkbE4nlZnpNVpwN4JIh6xzm/N0MApZl/N1k=; b=NasGa+8DJzysexgmYTnkisPUmYLKNHYQ7VJx0fs684WOBFxlyORZ/nEJWFrWVTSwwo PQQx1xpm1+X3BxPZ+jl2DI4+82aBc7oYuXO7HlbUPe8exFVYPS4fWUOMkrfxYydvtd4y nA1T6vjlRgenU5ViqpNf1eGVpNWofBW/f+FT+RbxIdchYJV3bBe23qvnh69PInuiiG8l 7EE/ySJbv+HEu242yVqld+iDm/Rut7tMtnjAI1LQ3bFhujDNRGHuDWlYGV1rJbAT5y3E rV5bYmzxUq0sYtUtqnJz6GYHMk7UvX0slBm4sYdzQA8r7pPQ6GT3/+vMKv6wGxvWbRgq MRmA== 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=SoTsB1BcCkbE4nlZnpNVpwN4JIh6xzm/N0MApZl/N1k=; b=Gnf8IN+oYkTG+RemLogaB/r9g+t0JPYVhL9Nyfo9QBy7JwyFDD8dAb24dQgkxZIzLx Fp5wLDdAEYOBOihex0Jx4PZOuxzM+CVknQIPoklTSW8gpP7uZw3NC4e5F3pNI2WInaue tnz7eOdNQegDdX2RqGqWje1ch1NwMGZFSp1eZKRsFQu6MY5dJVs1Vul9PEMr26P/ZtpY ALHNDlQ4r0tPUc+L8AHfn2ZzcxrD6cGcUSwRvrDZb2sSooBybBO1SuoebVh7Ywg9PC6k sRwZAKDErBhFn0N4fx2+186BzgXOzDt2Zwl9jDYVVhebCW3Qv5Nt/j/9Z9QC2ls/OADb Cyyw== X-Gm-Message-State: AGi0PuasB6vsOoQ4q/jB+gKlVsWzGo3h19FxJqrGuLqGIQzk3NYeHzA1 ksHj0EemGjcZxiXOEpYAmt0+UM5GBQ8= X-Google-Smtp-Source: APiQypK1akfNSVDhIYlg6XLfJHixn0n2hI7yXMb3EdXrL8TwgvIok5wtT/9eq88qSxjr7bdyEOP/Xw== X-Received: by 2002:a2e:3c08:: with SMTP id j8mr4377045lja.243.1586334580042; Wed, 08 Apr 2020 01:29:40 -0700 (PDT) Received: from mkPC.semihalf.local (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id e8sm765685lja.3.2020.04.08.01.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 01:29:39 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, Michal Krawczyk Date: Wed, 8 Apr 2020 10:29:03 +0200 Message-Id: <20200408082921.31000-13-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200408082921.31000-1-mk@semihalf.com> References: <20200408082921.31000-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 12/30] net/ena/base: add error logs when preparing Tx 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" To make the debugging easier, the error logs were added in the Tx path. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- drivers/net/ena/base/ena_eth_com.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/net/ena/base/ena_eth_com.c b/drivers/net/ena/base/ena_eth_com.c index 8f9528bdff..80d35556cb 100644 --- a/drivers/net/ena/base/ena_eth_com.c +++ b/drivers/net/ena/base/ena_eth_com.c @@ -148,8 +148,10 @@ static int ena_com_close_bounce_buffer(struct ena_com_io_sq *io_sq) if (pkt_ctrl->idx) { rc = ena_com_write_bounce_buffer_to_dev(io_sq, pkt_ctrl->curr_bounce_buf); - if (unlikely(rc)) + if (unlikely(rc)) { + ena_trc_err("failed to write bounce buffer to device\n"); return rc; + } pkt_ctrl->curr_bounce_buf = ena_com_get_next_bounce_buffer(&io_sq->bounce_buf_ctrl); @@ -179,8 +181,10 @@ static int ena_com_sq_update_llq_tail(struct ena_com_io_sq *io_sq) if (!pkt_ctrl->descs_left_in_line) { rc = ena_com_write_bounce_buffer_to_dev(io_sq, pkt_ctrl->curr_bounce_buf); - if (unlikely(rc)) + if (unlikely(rc)) { + ena_trc_err("failed to write bounce buffer to device\n"); return rc; + } pkt_ctrl->curr_bounce_buf = ena_com_get_next_bounce_buffer(&io_sq->bounce_buf_ctrl); @@ -394,8 +398,10 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, } if (unlikely(io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV - && !buffer_to_push)) + && !buffer_to_push)) { + ena_trc_err("push header wasn't provided on LLQ mode\n"); return ENA_COM_INVAL; + } rc = ena_com_write_header_to_bounce(io_sq, buffer_to_push, header_len); if (unlikely(rc)) @@ -410,6 +416,8 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, /* If the caller doesn't want to send packets */ if (unlikely(!num_bufs && !header_len)) { rc = ena_com_close_bounce_buffer(io_sq); + if (rc) + ena_trc_err("failed to write buffers to LLQ\n"); *nb_hw_desc = io_sq->tail - start_tail; return rc; } @@ -469,8 +477,10 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, /* The first desc share the same desc as the header */ if (likely(i != 0)) { rc = ena_com_sq_update_tail(io_sq); - if (unlikely(rc)) + if (unlikely(rc)) { + ena_trc_err("failed to update sq tail\n"); return rc; + } desc = get_sq_desc(io_sq); if (unlikely(!desc)) @@ -499,10 +509,14 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, desc->len_ctrl |= ENA_ETH_IO_TX_DESC_LAST_MASK; rc = ena_com_sq_update_tail(io_sq); - if (unlikely(rc)) + if (unlikely(rc)) { + ena_trc_err("failed to update sq tail of the last descriptor\n"); return rc; + } rc = ena_com_close_bounce_buffer(io_sq); + if (rc) + ena_trc_err("failed when closing bounce buffer\n"); *nb_hw_desc = io_sq->tail - start_tail; return rc; -- 2.20.1