* [dpdk-stable] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD
[not found] ` <20200306050427.66114-1-gavin.hu@arm.com>
@ 2020-03-06 5:04 ` Gavin Hu
2020-03-06 9:11 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2020-04-13 15:56 ` [dpdk-stable] [PATCH v2 1/2] net/i40e: relax barrier in Tx fastpath for NEON vPMD Gavin Hu
2020-04-13 16:40 ` [dpdk-stable] [PATCH v3 " Gavin Hu
2 siblings, 1 reply; 4+ messages in thread
From: Gavin Hu @ 2020-03-06 5:04 UTC (permalink / raw)
To: dev
Cc: nd, david.marchand, thomas, jerinj, xiaolong.ye,
Honnappa.Nagarahalli, ruifeng.wang, phil.yang, joyce.kong,
steve.capper, stable
To keep ordering of mixed accesses, rte_cio is sufficient.
The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]
This patch fixes by replacing with just sufficient barriers in the
normal PMD and vPMD.
It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP.
The test case is the RFC2544 zero-loss test running testpmd.
[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
---
drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index deb185fe2..4376d8911 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
(rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+ rte_cio_wmb();
/* Update the tail pointer on the NIC */
- I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+ I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
}
static inline void
@@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
txq->tx_tail = tx_id;
- I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
+ rte_cio_wmb();
+ I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
return nb_pkts;
}
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD
2020-03-06 5:04 ` [dpdk-stable] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD Gavin Hu
@ 2020-03-06 9:11 ` Jerin Jacob
0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2020-03-06 9:11 UTC (permalink / raw)
To: Gavin Hu
Cc: dpdk-dev, nd, David Marchand, Thomas Monjalon, Jerin Jacob, Ye,
Xiaolong, Honnappa Nagarahalli,
Ruifeng Wang (Arm Technology China),
Phil Yang, Joyce Kong, Steve Capper, dpdk stable
On Fri, Mar 6, 2020 at 10:35 AM Gavin Hu <gavin.hu@arm.com> wrote:
>
> To keep ordering of mixed accesses, rte_cio is sufficient.
> The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]
>
> This patch fixes by replacing with just sufficient barriers in the
> normal PMD and vPMD.
>
> It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP.
> The test case is the RFC2544 zero-loss test running testpmd.
>
> [1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
> qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
>
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
> drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
> index deb185fe2..4376d8911 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
> +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
> @@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
> rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
> (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
>
> + rte_cio_wmb();
> /* Update the tail pointer on the NIC */
> - I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
> + I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
> }
>
> static inline void
> @@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>
> txq->tx_tail = tx_id;
>
> - I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
> + rte_cio_wmb();
> + I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
>
> return nb_pkts;
> }
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v2 1/2] net/i40e: relax barrier in Tx fastpath for NEON vPMD
[not found] ` <20200306050427.66114-1-gavin.hu@arm.com>
2020-03-06 5:04 ` [dpdk-stable] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD Gavin Hu
@ 2020-04-13 15:56 ` Gavin Hu
2020-04-13 16:40 ` [dpdk-stable] [PATCH v3 " Gavin Hu
2 siblings, 0 replies; 4+ messages in thread
From: Gavin Hu @ 2020-04-13 15:56 UTC (permalink / raw)
To: dev
Cc: nd, david.marchand, thomas, jerinj, xiaolong.ye,
Honnappa.Nagarahalli, ruifeng.wang, phil.yang, joyce.kong,
steve.capper, stable
To keep ordering of mixed accesses, 'DMB OSH' is sufficient.
'DSB' inside the I40E_PCI_REG_WRITE is overkill.[1]
This patch fixes by replacing with just sufficient barriers in the
normal PMD and vPMD.
It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP.
The test case is the RFC2544 zero-loss test running testpmd.
[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
---
drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index deb185fe2..4376d8911 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
(rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+ rte_cio_wmb();
/* Update the tail pointer on the NIC */
- I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+ I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
}
static inline void
@@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
txq->tx_tail = tx_id;
- I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
+ rte_cio_wmb();
+ I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
return nb_pkts;
}
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v3 1/2] net/i40e: relax barrier in Tx fastpath for NEON vPMD
[not found] ` <20200306050427.66114-1-gavin.hu@arm.com>
2020-03-06 5:04 ` [dpdk-stable] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD Gavin Hu
2020-04-13 15:56 ` [dpdk-stable] [PATCH v2 1/2] net/i40e: relax barrier in Tx fastpath for NEON vPMD Gavin Hu
@ 2020-04-13 16:40 ` Gavin Hu
2 siblings, 0 replies; 4+ messages in thread
From: Gavin Hu @ 2020-04-13 16:40 UTC (permalink / raw)
To: dev
Cc: nd, david.marchand, thomas, jerinj, xiaolong.ye,
Honnappa.Nagarahalli, ruifeng.wang, phil.yang, joyce.kong,
steve.capper, stable
To keep ordering of mixed accesses, 'DMB OSH' is sufficient.
'DSB' inside the I40E_PCI_REG_WRITE is overkill.[1]
This patch fixes by replacing with just sufficient barriers in the
normal PMD and vPMD.
It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP.
The test case is the RFC2544 zero-loss test running testpmd.
[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index deb185fe2..4376d8911 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
(rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+ rte_cio_wmb();
/* Update the tail pointer on the NIC */
- I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+ I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
}
static inline void
@@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
txq->tx_tail = tx_id;
- I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
+ rte_cio_wmb();
+ I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
return nb_pkts;
}
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-13 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200413155640.53581-1-gavin.hu@arm.com>
[not found] ` <20200306050427.66114-1-gavin.hu@arm.com>
2020-03-06 5:04 ` [dpdk-stable] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD Gavin Hu
2020-03-06 9:11 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2020-04-13 15:56 ` [dpdk-stable] [PATCH v2 1/2] net/i40e: relax barrier in Tx fastpath for NEON vPMD Gavin Hu
2020-04-13 16:40 ` [dpdk-stable] [PATCH v3 " Gavin Hu
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).