* [PATCH] RDMA/efa: Add data polling capability feature bit
@ 2023-02-19 8:13 Michael Margolin
2023-02-21 14:19 ` Jason Gunthorpe
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael Margolin @ 2023-02-19 8:13 UTC (permalink / raw)
To: jgg, leon, linux-rdma; +Cc: sleybo, matua, ynachum, Yehuda Yitschak
From: Yonatan Nachum <ynachum@amazon.com>
Add feature bit to existing device caps field. EFA supports data polling
of 128 bytes blocks.
Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
---
drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 7 +++++--
drivers/infiniband/hw/efa/efa_verbs.c | 5 ++++-
include/uapi/rdma/efa-abi.h | 3 ++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h b/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h
index d4b9226088bd..3db791e6c030 100644
--- a/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h
+++ b/drivers/infiniband/hw/efa/efa_admin_cmds_defs.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
- * Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All rights reserved.
+ * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
#ifndef _EFA_ADMIN_CMDS_H_
@@ -618,7 +618,9 @@ struct efa_admin_feature_device_attr_desc {
* TX queues
* 1 : rnr_retry - If set, RNR retry is supported on
* modify QP command
- * 31:2 : reserved - MBZ
+ * 2 : data_polling_128 - If set, 128 bytes data
+ * polling is supported
+ * 31:3 : reserved - MBZ
*/
u32 device_caps;
@@ -991,6 +993,7 @@ struct efa_admin_host_info {
/* feature_device_attr_desc */
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK BIT(0)
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RNR_RETRY_MASK BIT(1)
+#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_DATA_POLLING_128_MASK BIT(2)
/* create_eq_cmd */
#define EFA_ADMIN_CREATE_EQ_CMD_ENTRY_SIZE_WORDS_MASK GENMASK(4, 0)
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 31454643f8c5..c20136e9d3d1 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
- * Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All rights reserved.
+ * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
#include <linux/dma-buf.h>
@@ -250,6 +250,9 @@ int efa_query_device(struct ib_device *ibdev,
if (EFA_DEV_CAP(dev, RNR_RETRY))
resp.device_caps |= EFA_QUERY_DEVICE_CAPS_RNR_RETRY;
+ if (EFA_DEV_CAP(dev, DATA_POLLING_128))
+ resp.device_caps |= EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128;
+
if (dev->neqs)
resp.device_caps |= EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS;
diff --git a/include/uapi/rdma/efa-abi.h b/include/uapi/rdma/efa-abi.h
index 163ac79556d6..74406b4817ce 100644
--- a/include/uapi/rdma/efa-abi.h
+++ b/include/uapi/rdma/efa-abi.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
/*
- * Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All rights reserved.
+ * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
#ifndef EFA_ABI_USER_H
@@ -120,6 +120,7 @@ enum {
EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1,
EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2,
EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3,
+ EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4,
};
struct efa_ibv_ex_query_device_resp {
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/efa: Add data polling capability feature bit
2023-02-19 8:13 [PATCH] RDMA/efa: Add data polling capability feature bit Michael Margolin
@ 2023-02-21 14:19 ` Jason Gunthorpe
2023-02-26 13:16 ` Nachum, Yonatan
2023-03-16 15:06 ` Gal Pressman
2023-03-22 18:55 ` Jason Gunthorpe
2 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2023-02-21 14:19 UTC (permalink / raw)
To: Michael Margolin
Cc: leon, linux-rdma, sleybo, matua, ynachum, Yehuda Yitschak
On Sun, Feb 19, 2023 at 08:13:28AM +0000, Michael Margolin wrote:
> From: Yonatan Nachum <ynachum@amazon.com>
>
> Add feature bit to existing device caps field. EFA supports data polling
> of 128 bytes blocks.
>
> Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> ---
> drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 7 +++++--
> drivers/infiniband/hw/efa/efa_verbs.c | 5 ++++-
> include/uapi/rdma/efa-abi.h | 3 ++-
> 3 files changed, 11 insertions(+), 4 deletions(-)
For UAPI changed you need to open PRs on rdma-core github before it
can be reviewed.
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/efa: Add data polling capability feature bit
2023-02-21 14:19 ` Jason Gunthorpe
@ 2023-02-26 13:16 ` Nachum, Yonatan
0 siblings, 0 replies; 6+ messages in thread
From: Nachum, Yonatan @ 2023-02-26 13:16 UTC (permalink / raw)
To: Jason Gunthorpe, Michael Margolin
Cc: leon, linux-rdma, sleybo, matua, Yehuda Yitschak
> For UAPI changed you need to open PRs on rdma-core github before it
> can be reviewed.
>
> Jason
Hey, thanks for the response.
We have a open PR on rdma-core: https://github.com/linux-rdma/rdma-core/pull/1312
Thanks, Yonatan.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/efa: Add data polling capability feature bit
2023-02-19 8:13 [PATCH] RDMA/efa: Add data polling capability feature bit Michael Margolin
2023-02-21 14:19 ` Jason Gunthorpe
@ 2023-03-16 15:06 ` Gal Pressman
2023-03-21 8:22 ` Nachum, Yonatan
2023-03-22 18:55 ` Jason Gunthorpe
2 siblings, 1 reply; 6+ messages in thread
From: Gal Pressman @ 2023-03-16 15:06 UTC (permalink / raw)
To: Michael Margolin, jgg, leon, linux-rdma
Cc: sleybo, matua, ynachum, Yehuda Yitschak
On 19/02/2023 10:13, Michael Margolin wrote:
> From: Yonatan Nachum <ynachum@amazon.com>
>
> Add feature bit to existing device caps field. EFA supports data polling
> of 128 bytes blocks.
>
> Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
Acked-by: Gal Pressman <gal.pressman@linux.dev>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/efa: Add data polling capability feature bit
2023-03-16 15:06 ` Gal Pressman
@ 2023-03-21 8:22 ` Nachum, Yonatan
0 siblings, 0 replies; 6+ messages in thread
From: Nachum, Yonatan @ 2023-03-21 8:22 UTC (permalink / raw)
To: Michael Margolin, jgg, leon, linux-rdma; +Cc: sleybo, matua
Hello,
Kind reminder for this patch.
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/efa: Add data polling capability feature bit
2023-02-19 8:13 [PATCH] RDMA/efa: Add data polling capability feature bit Michael Margolin
2023-02-21 14:19 ` Jason Gunthorpe
2023-03-16 15:06 ` Gal Pressman
@ 2023-03-22 18:55 ` Jason Gunthorpe
2 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2023-03-22 18:55 UTC (permalink / raw)
To: Michael Margolin
Cc: leon, linux-rdma, sleybo, matua, ynachum, Yehuda Yitschak
On Sun, Feb 19, 2023 at 08:13:28AM +0000, Michael Margolin wrote:
> From: Yonatan Nachum <ynachum@amazon.com>
>
> Add feature bit to existing device caps field. EFA supports data polling
> of 128 bytes blocks.
>
> Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> ---
> drivers/infiniband/hw/efa/efa_admin_cmds_defs.h | 7 +++++--
> drivers/infiniband/hw/efa/efa_verbs.c | 5 ++++-
> include/uapi/rdma/efa-abi.h | 3 ++-
> 3 files changed, 11 insertions(+), 4 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-22 18:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-19 8:13 [PATCH] RDMA/efa: Add data polling capability feature bit Michael Margolin
2023-02-21 14:19 ` Jason Gunthorpe
2023-02-26 13:16 ` Nachum, Yonatan
2023-03-16 15:06 ` Gal Pressman
2023-03-21 8:22 ` Nachum, Yonatan
2023-03-22 18:55 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox