[v2,5/5] net/cnxk: select optimized LLC transaction type
Checks
Commit Message
LLC transaction optimization by using LDWB LDTYPE option
in SG preparation for Tx. With this, if data is present
and dirty in LLC then the LLC would mark the data clean.
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
Changes in v2: No change
drivers/net/cnxk/cn10k_tx.h | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
--
2.25.1
Comments
On Thu, Feb 22, 2024 at 3:38 PM Rahul Bhansali <rbhansali@marvell.com> wrote:
>
> LLC transaction optimization by using LDWB LDTYPE option
> in SG preparation for Tx. With this, if data is present
> and dirty in LLC then the LLC would mark the data clean.
>
> Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Series applied to dpdk-next-net-mrvl/for-main. Thanks
> ---
> Changes in v2: No change
>
> drivers/net/cnxk/cn10k_tx.h | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
> index 664e47e1fc..fcd19be77e 100644
> --- a/drivers/net/cnxk/cn10k_tx.h
> +++ b/drivers/net/cnxk/cn10k_tx.h
> @@ -331,9 +331,15 @@ cn10k_nix_tx_skeleton(struct cn10k_eth_txq *txq, uint64_t *cmd,
> else
> cmd[2] = NIX_SUBDC_EXT << 60;
> cmd[3] = 0;
> - cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
> + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
> + cmd[4] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48);
> + else
> + cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
> } else {
> - cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
> + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
> + cmd[2] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48);
> + else
> + cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
> }
> }
>
> @@ -1989,7 +1995,11 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
>
> senddesc01_w1 = vdupq_n_u64(0);
> senddesc23_w1 = senddesc01_w1;
> - sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48));
> + if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
> + sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) |
> + BIT_ULL(48));
> + else
> + sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48));
> sgdesc23_w0 = sgdesc01_w0;
>
> if (flags & NIX_TX_NEED_EXT_HDR) {
> --
> 2.25.1
>
@@ -331,9 +331,15 @@ cn10k_nix_tx_skeleton(struct cn10k_eth_txq *txq, uint64_t *cmd,
else
cmd[2] = NIX_SUBDC_EXT << 60;
cmd[3] = 0;
- cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
+ if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
+ cmd[4] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48);
+ else
+ cmd[4] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
} else {
- cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
+ if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
+ cmd[2] = (NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) | BIT_ULL(48);
+ else
+ cmd[2] = (NIX_SUBDC_SG << 60) | BIT_ULL(48);
}
}
@@ -1989,7 +1995,11 @@ cn10k_nix_xmit_pkts_vector(void *tx_queue, uint64_t *ws,
senddesc01_w1 = vdupq_n_u64(0);
senddesc23_w1 = senddesc01_w1;
- sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48));
+ if (!(flags & NIX_TX_OFFLOAD_MBUF_NOFF_F))
+ sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | (NIX_SENDLDTYPE_LDWB << 58) |
+ BIT_ULL(48));
+ else
+ sgdesc01_w0 = vdupq_n_u64((NIX_SUBDC_SG << 60) | BIT_ULL(48));
sgdesc23_w0 = sgdesc01_w0;
if (flags & NIX_TX_NEED_EXT_HDR) {