From: Pier Damouny <pdamouny@nvidia.com>
To: Tal Shnaiderman <talshn@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
Matan Azrad <matan@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>,
Raslan Darawsheh <rasland@nvidia.com>,
Tamer Hleihel <tamerh@nvidia.com>
Subject: RE: [PATCH 2/3] net/mlx5: support CQE compression on Windows
Date: Mon, 8 May 2023 07:12:57 +0000 [thread overview]
Message-ID: <CH2PR12MB43272549C2B34D64A0CBC2E9BD719@CH2PR12MB4327.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230503114921.4588-3-talshn@nvidia.com>
> Subject: [PATCH 2/3] net/mlx5: support CQE compression on Windows
>
> CQE Compression reduces PCI overhead by coalescing and compressing
> multiple CQEs into a single merged CQE.
>
> Add supported for the CQE compression feature on Windows.
> feature is enabled by default unless not supported by the HW or if the
> rxq_cqe_comp_en PMD argument is explicitly disabled.
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
> drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
> drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
> drivers/net/mlx5/windows/mlx5_os.c | 12 ++++++++++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c
> b/drivers/common/mlx5/mlx5_devx_cmds.c
> index 096bd1d520..a31e4995f5 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.c
> @@ -1062,6 +1062,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
> attr->cqe_compression = MLX5_GET(cmd_hca_cap, hcattr,
> cqe_compression);
> attr->mini_cqe_resp_flow_tag = MLX5_GET(cmd_hca_cap, hcattr,
> mini_cqe_resp_flow_tag);
> + attr->cqe_compression_128 = MLX5_GET(cmd_hca_cap, hcattr,
> + cqe_compression_128);
> attr->mini_cqe_resp_l3_l4_tag = MLX5_GET(cmd_hca_cap, hcattr,
> mini_cqe_resp_l3_l4_tag);
> attr->enhanced_cqe_compression = MLX5_GET(cmd_hca_cap,
> hcattr, diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h
> b/drivers/common/mlx5/mlx5_devx_cmds.h
> index 9e7992b1c6..edcd867c4e 100644
> --- a/drivers/common/mlx5/mlx5_devx_cmds.h
> +++ b/drivers/common/mlx5/mlx5_devx_cmds.h
> @@ -284,6 +284,7 @@ struct mlx5_hca_attr {
> uint16_t max_wqe_sz_sq;
> uint32_t striding_rq:1;
> uint32_t ext_stride_num_range:1;
> + uint32_t cqe_compression_128:1;
> uint32_t set_reg_c:8;
> uint32_t nic_flow_table:1;
> uint32_t modify_outer_ip_ecn:1;
> diff --git a/drivers/net/mlx5/windows/mlx5_os.c
> b/drivers/net/mlx5/windows/mlx5_os.c
> index 0caa8931e4..6527269663 100644
> --- a/drivers/net/mlx5/windows/mlx5_os.c
> +++ b/drivers/net/mlx5/windows/mlx5_os.c
> @@ -237,6 +237,18 @@ mlx5_os_capabilities_prepare(struct
> mlx5_dev_ctx_shared *sh)
> } else {
> DRV_LOG(DEBUG, "Tunnel offloading is not supported.");
> }
> + sh->dev_cap.cqe_comp = 0;
> +#if (RTE_CACHE_LINE_SIZE == 128)
> + if (hca_attr->cqe_compression_128)
> + sh->dev_cap.cqe_comp = 1;
> + DRV_LOG(DEBUG, "Rx CQE 128B compression is %ssupported.",
> + sh->dev_cap.cqe_comp ? "" : "not ");
> +#else
> + if (hca_attr->cqe_compression)
> + sh->dev_cap.cqe_comp = 1;
> + DRV_LOG(DEBUG, "Rx CQE compression is %ssupported.",
> + sh->dev_cap.cqe_comp ? "" : "not ");
> +#endif
> snprintf(sh->dev_cap.fw_ver, 64, "%x.%x.%04x",
> MLX5_GET(initial_seg, pv_iseg, fw_rev_major),
> MLX5_GET(initial_seg, pv_iseg, fw_rev_minor),
> --
> 2.16.1.windows.4
Tested-by: Pier Damouny <pdamouny@nvidia.com>
next prev parent reply other threads:[~2023-05-08 7:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 11:49 [PATCH 0/3] Windows performance enhancements Tal Shnaiderman
2023-05-03 11:49 ` [PATCH 1/3] net/mlx5: support multi-packet RQ on Windows Tal Shnaiderman
2023-05-08 7:12 ` Pier Damouny
2023-05-03 11:49 ` [PATCH 2/3] net/mlx5: support CQE compression " Tal Shnaiderman
2023-05-08 7:12 ` Pier Damouny [this message]
2023-05-03 11:49 ` [PATCH 3/3] net/mlx5: support enhanced multi-packet write " Tal Shnaiderman
2023-05-08 7:13 ` Pier Damouny
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=CH2PR12MB43272549C2B34D64A0CBC2E9BD719@CH2PR12MB4327.namprd12.prod.outlook.com \
--to=pdamouny@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=talshn@nvidia.com \
--cc=tamerh@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/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).