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 074C0A054E; Sat, 15 Feb 2020 09:25:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47F5ADE3; Sat, 15 Feb 2020 09:25:33 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id E78A73B5 for ; Sat, 15 Feb 2020 09:25:31 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id c16so13173172ioh.6 for ; Sat, 15 Feb 2020 00:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0mhNFln7dDhx5OBsj/s6YyIbre3V6QNvW6sKmg2s5SQ=; b=LD1G464cqMHoz+cKcCul3SjbRHl0BpTLs3AHuUovSHu24YEVRAmi0YeazQANX4pLgw wZQ6BpLrZrrLpE9t+SkcFygenKAAAxFq3WFZkuX2IkbDYk+3RW1Que1mRYPkKvF5xV4G jCBL8JOMpzoYWRZ1w+MVsmPxTTlf4O0/r51TQflqRQO4U0i3ZpG3qVZW0wiyk8wJdes1 M4kwiiu7JK0bUCUTjVnDd0ILliAdHrw+C+n+fQd1x1EZsu3MDarANIwoG+3QIK+RhmZK rwHDDzo92bJZv3VKIIO9Llraq67plXkO3UQ2eZj6dtFBpK8/OuRTxNI8uW8d4zKjNKDM IQIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0mhNFln7dDhx5OBsj/s6YyIbre3V6QNvW6sKmg2s5SQ=; b=VD4KUsZ0ElQxLz96bs9qp8CXKs7hY4qlIf5cNGfrQebegHV/6eewNcTN6t/o9O67/p hULu1GrF5HM79tyulmzKr+xNhFGY6IPDZe9cRYC15VXPICifnXzbG5cr+UmR5G3iBAPP 9vVKNO+P+2cc1w4VJp1/6VXkjqK60Bo2KLIh4VfwLMGJMnFXky2gCubzI8kVkSEM42cr RWMKApuAc/OkwJJ8f8lO5U9EwaQA2WsLvWujk0PQsfiFwr8wBuHaIOmKxwNT9aiNNrID RkmwhMYwnTgEEToBFte5Pc3/D1J9vGmg56kPyijhItMn+3HbU9yk1nTuN+4vmLdBJF6j 4Zcw== X-Gm-Message-State: APjAAAXRUNuvmwrn+3Rk9HBf1kh+sr5ptM9pW8vkdTxw0my70DIYVGK1 EKAnEr5ZYwVk3IqlkO26nV9GqOCO1TFQdbwhGB4= X-Google-Smtp-Source: APXvYqyLbN8NuCCCaZ7YtlO3Mjmc3Z6YsslwSvv67eWToJlmePp40noiB7b4rDzgxWyVkCI1be2uLNASAvEKjK5M7mY= X-Received: by 2002:a6b:c742:: with SMTP id x63mr5415193iof.162.1581755131166; Sat, 15 Feb 2020 00:25:31 -0800 (PST) MIME-Version: 1.0 References: <1571758074-16445-1-git-send-email-gavin.hu@arm.com> <20200208134808.212027-1-gavin.hu@arm.com> In-Reply-To: <20200208134808.212027-1-gavin.hu@arm.com> From: Jerin Jacob Date: Sat, 15 Feb 2020 13:55:15 +0530 Message-ID: To: Gavin Hu Cc: dpdk-dev , nd , David Marchand , Thomas Monjalon , Raslan Darawsheh , Maxime Coquelin , Tiwei Bie , Matan Azrad , Shahaf Shuler , Slava Ovsiienko , Andrew Rybchenko , Stephen Hemminger , Hemant Agrawal , Jerin Jacob , Pavan Nikhilesh , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" , Phil Yang , Joyce Kong , Steve Capper Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: relaxed barrier in the tx fastpath 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" On Sat, Feb 8, 2020 at 7:22 PM Gavin Hu wrote: > > To keep ordering of mixed accesses, rte_cio is sufficient. > The rte_io barrier is overkill.[1] > > [1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9 > qf0Kpn89EMdGDajepKoZQ@mail.gmail.com > > Signed-off-by: Gavin Hu > --- > V3: > - optimize the barriers in the fast path only, leave as it is for the > barriers in the slow path and control path > - drop the virtio patches from the list as they are in the control path > - it makes more sense to relax the barrier in the fast path, at the PMD level. > relaxing the fundamental rte_io_x barriers APIs requires scrutinizations for > each PMDs which use the barriers directly or indirectly. > V2: > - remove virtio_pci_read/write64 APIs definitions, they are not needed and generate compiling errors like " error: unused function 'virtio_pci_write64' [-Werror,-Wunused-function]" > - update the reference link to kernel source code > --- > drivers/net/i40e/i40e_rxtx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index fd1ae80da..8c0f7cc67 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -1248,7 +1248,8 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > (unsigned) txq->port_id, (unsigned) txq->queue_id, > (unsigned) tx_id, (unsigned) nb_tx); > > - I40E_PCI_REG_WRITE(txq->qtx_tail, tx_id); > + rte_cio_wmb(); > + I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id); Looks good to me from the ARM64 perspective or in general. Reviewed-by: Jerin Jacob > txq->tx_tail = tx_id; > > return nb_tx; > -- > 2.17.1 >