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 02D8DA0589; Fri, 27 Mar 2020 11:30:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85F211C11B; Fri, 27 Mar 2020 11:29:32 +0100 (CET) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 0F46E1C0CE for ; Fri, 27 Mar 2020 11:29:24 +0100 (CET) Received: by mail-lj1-f195.google.com with SMTP id k21so9650418ljh.2 for ; Fri, 27 Mar 2020 03:29:24 -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=GXmL5+o0KEu3Wj7C9qOcoGa1NKeShYjfKeozPSboLzswsqtRnJloQgkZnhJexhlmQA JPTdK8K7EvKLhwTuTjUp/LI5jwsh/BRGTQyKB6QC+PQGKtvoOLuLXnZPheuLQPb681t/ JrxMzSBw5F2p/CMC8+n4XWBrcPjmpi47Hr5Dn+ZqW+4QuFEJfHp7ZsyewABr6yQpoeeg WK1DNV0e6fgalkzPlWTcPnG868dSLlRzjOQQF0J1mkuKEzb3IsDGMOVd63vtEOsRn+nE wV+g5nWT8LWKAuITJyyQNRQgKxJ8yPOKtE93yV0ni489Gjz1KilcTdvCO7il0+PXG1Fo yyRQ== 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=C0jxAjiIQmLBI1HvX76BoUoTIi9VfzSmWfN3xtdVCKSHZnGRov8oVPycV3Z435A9xk g/Z/qETNxD9s0rPxsBpMN6ypJZZolWonuUfTV8FFArOLCEbuZIaAu4PoeDU8/eOcC0wE //ZCTeawYR3yAjYRBOjZqD902bUdfui0UCmY0k4AFUS5CuF3TIf8Tow/b/OPGC3j+Ieh 8pcQO2xn7MA4Az0D5B+JfMqydNhm5ffX7gdr6kXkrdu+USDgI5Q7kOh/7fbq2XhTJGCR U+aXORaZ8jhNbkGxfDGpXR5X69lbb1iZlW585WSMncCDbzuK2w1XQO1VtONjSeJETtcS UW2Q== X-Gm-Message-State: AGi0Puaaj64SX45oM9DJPMtvYTh0Fr2zqS8q8St8qxPIZJkkSpggGBUB WTElhTF6jBTLEZduCZ3BYPn2RPa7Z/W90g== X-Google-Smtp-Source: ADFU+vtKg01Kqxedvr1dnrHnBJ92QZgXyQbCKkZ/6owFKrmSycaZYHKkVeLiTLcMid4WlWbTvwCjjA== X-Received: by 2002:a05:651c:30b:: with SMTP id a11mr7911713ljp.164.1585304963414; Fri, 27 Mar 2020 03:29:23 -0700 (PDT) Received: from localhost.localdomain (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id i11sm2789587lfo.84.2020.03.27.03.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 03:29:22 -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: Fri, 27 Mar 2020 11:18:04 +0100 Message-Id: <20200327101823.12646-11-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200327101823.12646-1-mk@semihalf.com> References: <20200327101823.12646-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 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