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 87459A0597; Wed, 8 Apr 2020 10:32:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3717E1C1BD; Wed, 8 Apr 2020 10:29:57 +0200 (CEST) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id 2C0461C199 for ; Wed, 8 Apr 2020 10:29:51 +0200 (CEST) Received: by mail-lf1-f68.google.com with SMTP id 131so4447956lfh.11 for ; Wed, 08 Apr 2020 01:29:51 -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=bbFYKAWbQ2J0jwaIugOXsbVTKGezX54zNcZ2S7ig/tA=; b=VZBpSUvSqZc0JLuvHoM0z5+zHEB3VQlrtLa1MYVJBBsiHRkKHIhKCxLs/+XdsH8/lB bAJGnUR7eaWegv4/UDLB08m2KCjNOYTVhTxadahTQ1vacXGuOsGZ9dEuI5C4Icbb6+J9 TGaFlALrgWXdEsgsnM7RVsgs5Wil18pT+l2a1lyYkWAncwoBs0QIoNLvlpdaGZX8uJV8 WQBONhwePKTp063N6udx5JLYkK2SGD/ikgVyPxnKjsnUCW2OXaf1wareIuXXuPmDj5Km zJne9KfTIoKdmkJwx6kBO9z0ldfKUD7z9GOTwZs4G2n8/x78Lese8PyoemdP8Jpmz/bw d1NQ== 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=bbFYKAWbQ2J0jwaIugOXsbVTKGezX54zNcZ2S7ig/tA=; b=TNxroSMN3cztNwT6p7PqrAS76e0X+o/3sXSxs6szHLzF+Ym4PwMkvUni3FVH+NdHIn FFxjy7ta8zthxcRXxztBEemMZFwva5zb2l6BoOE/fEjgSN3wcqKHXZNWB3NLrvbvGrrS XGIz+lSsn8h8wwgt+nkOu0PIuvjwzLSvcKeoASmh0+Ppb9wDd7p1nfTcmTCV+8j/nisg fj5UKoueXYvaxC++qUbdQu2z4rWmnvlxSvIFoSkVwNhEU8szPseN4sxaLAwcSNufcra+ 8heBv0BCxoTLfHyalcAMIIkFp0uN4GJieCUDZAzKpdQ64rzl21K42P7SkSARLg6GmCes Wxeg== X-Gm-Message-State: AGi0PuZh+vxPSJwxtICjTcbYxgcFb7rqkijDtoBaQVhSo8bpAUZeipAD vPHxZSeXmoffLjm/BOyrZdxHUsBHihY= X-Google-Smtp-Source: APiQypJd1OlR5q3sW6pgvdRS0SSRrKiVIdn7/mNo2li/QdPd0c4bFT61nVemS1jp1Wf10i99hLnN7g== X-Received: by 2002:a05:6512:3049:: with SMTP id b9mr3947664lfb.176.1586334590501; Wed, 08 Apr 2020 01:29:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 01:29: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, ferruh.yigit@intel.com, arybchenko@solarflare.com, Michal Krawczyk Date: Wed, 8 Apr 2020 10:29:11 +0200 Message-Id: <20200408082921.31000-21-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 20/30] net/ena: remove memory barriers before doorbells 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" The doorbell code is already issuing the doorbell by using rte_write. Because of that, there is no need to do that before calling the function. Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- drivers/net/ena/ena_ethdev.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index fdcbe53c1c..07feb62c3f 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1462,12 +1462,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count) /* When we submitted free recources to device... */ if (likely(i > 0)) { - /* ...let HW know that it can fill buffers with data - * - * Add memory barrier to make sure the desc were written before - * issue a doorbell - */ - rte_wmb(); + /* ...let HW know that it can fill buffers with data. */ ena_com_write_sq_doorbell(rxq->ena_com_io_sq); rxq->next_to_use = next_to_use; @@ -2405,7 +2400,6 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, PMD_DRV_LOG(DEBUG, "llq tx max burst size of queue %d" " achieved, writing doorbell to send burst\n", tx_ring->id); - rte_wmb(); ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq); } @@ -2428,7 +2422,6 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, /* If there are ready packets to be xmitted... */ if (sent_idx > 0) { /* ...let HW do its best :-) */ - rte_wmb(); ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq); tx_ring->tx_stats.doorbells++; tx_ring->next_to_use = next_to_use; -- 2.20.1