[PATCH 1/2] net/hns3: optimized Tx performance by mbuf fast free
Ferruh Yigit
ferruh.yigit at intel.com
Mon Nov 15 18:30:59 CET 2021
On 11/11/2021 1:38 PM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen at huawei.com>
>
> Currently the vector and simple xmit algorithm don't support multi_segs,
> so if Tx offload support MBUF_FAST_FREE, driver could invoke
> rte_mempool_put_bulk() to free Tx mbufs in this situation.
>
> In the testpmd single core MAC forwarding scenario, the performance is
> improved by 8% at 64B on Kunpeng920 platform.
>
'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' seems already announced in 'tx_offload_capa',
was it wrong?
> Cc: stable at dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> ---
> drivers/net/hns3/hns3_rxtx.c | 11 +++++++++++
> drivers/net/hns3/hns3_rxtx.h | 2 ++
> drivers/net/hns3/hns3_rxtx_vec.h | 9 +++++++++
> 3 files changed, 22 insertions(+)
>
Can you please update 'doc/guides/nics/features/hns3.ini' to announce
"Free Tx mbuf on demand" feature.
> diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
> index d26e262335..78227a139f 100644
> --- a/drivers/net/hns3/hns3_rxtx.c
> +++ b/drivers/net/hns3/hns3_rxtx.c
> @@ -3059,6 +3059,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
> txq->min_tx_pkt_len = hw->min_tx_pkt_len;
> txq->tso_mode = hw->tso_mode;
> txq->udp_cksum_mode = hw->udp_cksum_mode;
> + txq->mbuf_fast_free_en = !!(dev->data->dev_conf.txmode.offloads &
> + DEV_TX_OFFLOAD_MBUF_FAST_FREE);
Can you please use updated macro name, 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE'?
More information about the dev
mailing list