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 BA858A057B; Wed, 1 Apr 2020 16:23:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12A2D1BFC4; Wed, 1 Apr 2020 16:21:54 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 27C851BEBF for ; Wed, 1 Apr 2020 16:21:52 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id p10so25711347ljn.1 for ; Wed, 01 Apr 2020 07:21:52 -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=VMKzfoDtixxDfKwL4LmA5K/5OQb+WO9qXPNwnHDPCk0=; b=RTLYUFnjNw91T1BSQjFTGgGCOGK9OOFKe7umgo2cWqZb93h8tiIgR0SdI1VDXghuZT 7uzfWqH+FqP1ZbPevDRzCmFHu1ZmDZeDDzx35vZ256hseEIughocgL7NepUQT0wKcKKI Tk387xZIaH6uBaiyxa0yh2+V+tJbhe8C5k3DRYQlwKaVqCMPZDkCThFbJvaqOdzOZth8 pNw6dSPHJxYKycbZcnm0xMgfu38Wfmv/lOFxnYD+KaZuM+kmqyLdpeK7oHnBIiSF5lEE 7zEmoaGvAXpVkaSLDiMj9UnHXdta2FCYRzGIgdnMWmHaRnmrbXWFFfrucaojOg5M6cp2 OBaQ== 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=VMKzfoDtixxDfKwL4LmA5K/5OQb+WO9qXPNwnHDPCk0=; b=tiIDIU2Itf1AlMUoKj3IcP2YeTYJb+6082X4S1N53k6pQK57wvhq0q3QBgNoPYjnsT Ltf0cIH0NCwYGdOr94vu2TQTntjoXggPEyJYbWexCJ1IPI5esUcGydDhefL5MPijgzad rNBJ84LX0eFCa1sbT97QQPGQ0G/VdX/ZkpRtDVb/Ls5auwSRxkLJFM8vgg+nPOS5k2JG fO7K+gd9+sewX4yLbFvhNAlOQoXBT2qGqcOBckk/adxigmSNWOk6ag6lEtbUnlEq4sa/ sEdkjvh6VfjtOz94TpKD3LP2EiKfIrqRGjwkmaKG84fATecCsU7wJur82Xiy1TV2370R bG/w== X-Gm-Message-State: AGi0Pub8YNJqkFGSOI5n/zFUZC86oGuOojvt7TP+8XQ0OHHkXLF2ZeU4 cf+s/PIAfGl9+Liy6/EkkxhgyeZsaqE= X-Google-Smtp-Source: APiQypJUQZ94znh/HX/Yg8PganRDFAXZJ0y3ItVP4u9J5ExYJ8XlixYlWKsvNxlxvIFChnxis8johQ== X-Received: by 2002:a05:651c:c7:: with SMTP id 7mr10943605ljr.124.1585750911519; Wed, 01 Apr 2020 07:21:51 -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 r21sm1435961ljp.29.2020.04.01.07.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:21:49 -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, Michal Krawczyk Date: Wed, 1 Apr 2020 16:21:08 +0200 Message-Id: <20200401142127.13715-11-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200401142127.13715-1-mk@semihalf.com> References: <20200401142127.13715-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 10/29] 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 aabc294fb7..747450fec5 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