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 9E178A057B; Wed, 1 Apr 2020 16:24:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 101B51C0CC; Wed, 1 Apr 2020 16:22:06 +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 A90681C0C9 for ; Wed, 1 Apr 2020 16:22:02 +0200 (CEST) Received: by mail-lf1-f68.google.com with SMTP id c5so20629099lfp.5 for ; Wed, 01 Apr 2020 07:22:02 -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=7e/G8SwLdNk53EZwud8jbWyb19eYNdidQ7LgI7XLSm8=; b=u5WLzScYkN+BkS9LvzeWvJ4YKfszq0sWiAYGefqpLARW/HyhZK9LBC4TI5jGeTGCfZ CNC6kIIS7nLYoS5/qTokdcoapS4h4hDk0FQ0lRyGTDHAZUEHsXKc4HeE9HXw1W4K/GSD 0g1RcUuwvvufGxBrqahHd8XmgmvXN+8RG6rYoO1iT3twgHFmrrRo36xZ6qofUeyGwzDW 8AQy+Oz8cOUghw1YzyTZdBcBgExsGd6sYfZ+XvKewmBHmHmUC6cA5vUzsVSSzZInjn1I N1+Ygq8aWsOeYUM+VLrk79tVmibIclEAd3dgs2LSKLYoY3b1NU2acjYDmyP2UpCwNJqs vTjA== 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=7e/G8SwLdNk53EZwud8jbWyb19eYNdidQ7LgI7XLSm8=; b=tgygpDLOMsIMC70g2YLxUKqX7cojw0cOH4REvrTPD4y/XOnhZy/MpQ/wfOvtZsVd7J fRA8kxzxmoyPIiQRC+3ZrtWCrudienDsnVg+wjWteTNHo8k5nU1Rkc7VZQon6KBsHsrG StehN2T9dONbOT+FqgPIzSOVQ/Vi6bH3VNQhoEjKEDBQ7RoftBiEVEm3Gv1FvyfGOeee 6hu9CD/fGrGicMUzqmgAZ/cTDSbyq6Avy/GYx+DGA3DWYK98L1TDF1N5GY2SySHIiw8X wZ+E9VkZeefvOmJu6lg4wDPiw7p5DtBWCNRB0FnMg/E6Lc737bi6lU17X2CB/WVfNzol kPpg== X-Gm-Message-State: AGi0Pua8LV3nNiD7aj93BiJ7GAXLsUraBJ8/GXeBiM5EOzt95SyLits6 fxKCgLyBaKeNhBLFhmp3hJ5xPkPf2lo= X-Google-Smtp-Source: APiQypKEfxnkW4tf8KnByQ16U4KC1Wa59bQsVsKBl+x/oRztzTvWim8t+u6E0H0oYjqRpRpwyA+FpQ== X-Received: by 2002:a05:6512:48e:: with SMTP id v14mr14419549lfq.35.1585750921771; Wed, 01 Apr 2020 07:22:01 -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.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:22:00 -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:16 +0200 Message-Id: <20200401142127.13715-19-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 18/29] 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 f23efbe464..eb97c80660 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