From: Leon Romanovsky <leon@kernel.org>
To: longli@microsoft.com
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
Ajay Sharma <sharmaajay@microsoft.com>,
Dexuan Cui <decui@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing
Date: Sun, 7 May 2023 11:10:53 +0300 [thread overview]
Message-ID: <20230507081053.GD525452@unreal> (raw)
In-Reply-To: <1683312708-24872-1-git-send-email-longli@linuxonhyperv.com>
On Fri, May 05, 2023 at 11:51:48AM -0700, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
>
> With RX coalescing, one CQE entry can be used to indicate multiple packets
> on the receive queue. This saves processing time and PCI bandwidth over
> the CQ.
>
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
> drivers/infiniband/hw/mana/qp.c | 5 ++++-
> include/net/mana/mana.h | 17 +++++++++++++++++
> 2 files changed, 21 insertions(+), 1 deletion(-)
Why didn't you change mana_cfg_vport_steering() too?
>
> diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
> index 54b61930a7fd..83c768f96506 100644
> --- a/drivers/infiniband/hw/mana/qp.c
> +++ b/drivers/infiniband/hw/mana/qp.c
> @@ -13,7 +13,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev,
> u8 *rx_hash_key)
> {
> struct mana_port_context *mpc = netdev_priv(ndev);
> - struct mana_cfg_rx_steer_req *req = NULL;
> + struct mana_cfg_rx_steer_req_v2 *req = NULL;
There is no need in NULL here, req is going to be overwritten almost
immediately.
Thanks
> struct mana_cfg_rx_steer_resp resp = {};
> mana_handle_t *req_indir_tab;
> struct gdma_context *gc;
> @@ -33,6 +33,8 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev,
> mana_gd_init_req_hdr(&req->hdr, MANA_CONFIG_VPORT_RX, req_buf_size,
> sizeof(resp));
>
> + req->hdr.req.msg_version = GDMA_MESSAGE_V2;
> +
> req->vport = mpc->port_handle;
> req->rx_enable = 1;
> req->update_default_rxobj = 1;
> @@ -46,6 +48,7 @@ static int mana_ib_cfg_vport_steering(struct mana_ib_dev *dev,
> req->num_indir_entries = MANA_INDIRECT_TABLE_SIZE;
> req->indir_tab_offset = sizeof(*req);
> req->update_indir_tab = true;
> + req->cqe_coalescing_enable = true;
>
> req_indir_tab = (mana_handle_t *)(req + 1);
> /* The ind table passed to the hardware must have
> diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
> index cd386aa7c7cc..f8314b7c386c 100644
> --- a/include/net/mana/mana.h
> +++ b/include/net/mana/mana.h
> @@ -596,6 +596,23 @@ struct mana_cfg_rx_steer_req {
> u8 hashkey[MANA_HASH_KEY_SIZE];
> }; /* HW DATA */
>
> +struct mana_cfg_rx_steer_req_v2 {
> + struct gdma_req_hdr hdr;
> + mana_handle_t vport;
> + u16 num_indir_entries;
> + u16 indir_tab_offset;
> + u32 rx_enable;
> + u32 rss_enable;
> + u8 update_default_rxobj;
> + u8 update_hashkey;
> + u8 update_indir_tab;
> + u8 reserved;
> + mana_handle_t default_rxobj;
> + u8 hashkey[MANA_HASH_KEY_SIZE];
> + u8 cqe_coalescing_enable;
> + u8 reserved2[7];
> +}; /* HW DATA */
> +
> struct mana_cfg_rx_steer_resp {
> struct gdma_resp_hdr hdr;
> }; /* HW DATA */
> --
> 2.17.1
>
next prev parent reply other threads:[~2023-05-07 8:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 18:51 [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing longli
2023-05-07 8:10 ` Leon Romanovsky [this message]
2023-05-07 21:39 ` Haiyang Zhang
2023-05-08 6:09 ` Leon Romanovsky
2023-05-08 14:45 ` Haiyang Zhang
2023-05-09 7:30 ` Leon Romanovsky
2023-05-09 19:08 ` Long Li
2023-05-10 6:58 ` Leon Romanovsky
2023-05-10 16:37 ` Long Li
2023-05-10 16:57 ` Leon Romanovsky
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=20230507081053.GD525452@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@microsoft.com \
--cc=wei.liu@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.