From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: <Ferruh.Yigit@amd.com>, <dev@dpdk.org>
Subject: RE: [PATCH 1/2] net/txgbe: add vectorized functions for Rx/Tx
Date: Tue, 5 Mar 2024 16:10:51 +0800 [thread overview]
Message-ID: <07f901da6ed4$a3914660$eab3d320$@trustnetic.com> (raw)
In-Reply-To: <4a0e5000-3ae3-4894-a23d-715801f3c3b7@amd.com>
On Wed, Feb 7, 2024 11:13 AM, Ferruh.Yigit@amd.com wrote:
> On 2/1/2024 3:00 AM, Jiawen Wu wrote:
> > To optimize Rx/Tx burst process, add SSE/NEON vector instructions on
> > x86/arm architecture.
> >
>
> Do you have any performance improvement number with vector
> implementation, if so can you put it into commit log for record?
On our local x86 platforms, the performance was at full speed without
using vector. So we don't have the performance improvement number
with SSE yet. But I will add the test result for arm.
> > @@ -2198,8 +2220,15 @@ txgbe_set_tx_function(struct rte_eth_dev *dev, struct txgbe_tx_queue *txq)
> > #endif
> > txq->tx_free_thresh >= RTE_PMD_TXGBE_TX_MAX_BURST) {
> > PMD_INIT_LOG(DEBUG, "Using simple tx code path");
> > - dev->tx_pkt_burst = txgbe_xmit_pkts_simple;
> > dev->tx_pkt_prepare = NULL;
> > + if (txq->tx_free_thresh <= RTE_TXGBE_TX_MAX_FREE_BUF_SZ &&
> > + (rte_eal_process_type() != RTE_PROC_PRIMARY ||
> >
>
> Why vector Tx enable only for secondary process?
It is not only for secondary process. The constraint is
(rte_eal_process_type() != RTE_PROC_PRIMARY || txgbe_txq_vec_setup(txq) == 0)
This code references ixgbe, which explains:
"When using multiple processes, the TX function used in all processes
should be the same, otherwise the secondary processes cannot transmit
more than tx-ring-size - 1 packets.
To achieve this, we extract out the code to select the ixgbe TX function
to be used into a separate function inside the ixgbe driver, and call
that from a secondary process when it is attaching to an
already-configured NIC."
> > +++ b/drivers/net/txgbe/txgbe_rxtx_vec_neon.c
> > @@ -0,0 +1,604 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2015-2024 Beijing WangXun Technology Co., Ltd.
> > + * Copyright(c) 2010-2015 Intel Corporation
> > + */
> > +
> > +#include <ethdev_driver.h>
> > +#include <rte_malloc.h>
> > +#include <rte_vect.h>
> > +
> > +#include "txgbe_ethdev.h"
> > +#include "txgbe_rxtx.h"
> > +#include "txgbe_rxtx_vec_common.h"
> > +
> > +#pragma GCC diagnostic ignored "-Wcast-qual"
> > +
>
> Is this pragma really required?
Yes. Otherwise, there are warnings in the compilation:
[1909/2921] Compiling C object drivers/libtmp_rte_net_txgbe.a.p/net_txgbe_txgbe_rxtx_vec_neon.c.o
../drivers/net/txgbe/txgbe_rxtx_vec_neon.c: In function ‘txgbe_rxq_rearm’:
../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:37:15: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual]
vst1q_u64((uint64_t *)&rxdp[i], zero);
^
../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:60:13: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual]
vst1q_u64((uint64_t *)rxdp++, dma_addr0);
^
../drivers/net/txgbe/txgbe_rxtx_vec_neon.c:65:13: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual]
vst1q_u64((uint64_t *)rxdp++, dma_addr1);
next prev parent reply other threads:[~2024-03-05 8:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 3:00 [PATCH 0/2] Wangxun support vector Rx/Tx Jiawen Wu
2024-02-01 3:00 ` [PATCH 1/2] net/txgbe: add vectorized functions for Rx/Tx Jiawen Wu
2024-02-07 3:13 ` Ferruh Yigit
2024-03-05 8:10 ` Jiawen Wu [this message]
2024-03-21 16:21 ` Ferruh Yigit
2024-04-07 8:32 ` Jiawen Wu
2024-03-21 16:27 ` Ferruh Yigit
2024-03-21 17:55 ` Tyler Retzlaff
2024-02-01 3:00 ` [PATCH 2/2] net/ngbe: " Jiawen Wu
2024-02-06 1:50 ` [PATCH 0/2] Wangxun support vector Rx/Tx Jiawen Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='07f901da6ed4$a3914660$eab3d320$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=Ferruh.Yigit@amd.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).