* [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15
@ 2017-10-25 19:39 Leon Romanovsky
[not found] ` <20171025193935.1075-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2017-10-25 19:39 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky
Hi Doug,
There are two mlx4 RSS fixes for v4.15
Thanks
The patches are available in the git repository at:
git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-10-25
Thanks
---------------------------------------
Guy Levi (2):
IB/mlx4: Add report for RSS capabilities by vendor channel
IB/mlx4: Fix RSS's QPC attributes assignments
drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++
drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++-----
drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++-------
3 files changed, 37 insertions(+), 12 deletions(-)
--
2.14.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH rdma-next 1/2] IB/mlx4: Add report for RSS capabilities by vendor channel
[not found] ` <20171025193935.1075-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-10-25 19:39 ` Leon Romanovsky
2017-10-25 19:39 ` [PATCH rdma-next 2/2] IB/mlx4: Fix RSS's QPC attributes assignments Leon Romanovsky
2017-11-10 18:05 ` [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15 Doug Ledford
2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-10-25 19:39 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Guy Levi
From: Guy Levi <guyle-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
The mlx4's RSS patches submission missed a report of RSS capabilities
which should be reported by the vendor channel in query_device.
Signed-off-by: Guy Levi <guyle-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++
drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++-----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index c6420e26f2d8..8c8a16791a3f 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -584,6 +584,23 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
sizeof(struct mlx4_wqe_data_seg);
}
+ if (uhw->outlen >= resp.response_length + sizeof(resp.rss_caps)) {
+ resp.response_length += sizeof(resp.rss_caps);
+ if (props->rss_caps.supported_qpts) {
+ resp.rss_caps.rx_hash_function =
+ MLX4_IB_RX_HASH_FUNC_TOEPLITZ;
+ resp.rss_caps.rx_hash_fields_mask =
+ MLX4_IB_RX_HASH_SRC_IPV4 |
+ MLX4_IB_RX_HASH_DST_IPV4 |
+ MLX4_IB_RX_HASH_SRC_IPV6 |
+ MLX4_IB_RX_HASH_DST_IPV6 |
+ MLX4_IB_RX_HASH_SRC_PORT_TCP |
+ MLX4_IB_RX_HASH_DST_PORT_TCP |
+ MLX4_IB_RX_HASH_SRC_PORT_UDP |
+ MLX4_IB_RX_HASH_DST_PORT_UDP;
+ }
+ }
+
if (uhw->outlen) {
err = ib_copy_to_udata(uhw, &resp, resp.response_length);
if (err)
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
index 9a55064ed69a..65c66dbff754 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
@@ -645,12 +645,18 @@ enum query_device_resp_mask {
QUERY_DEVICE_RESP_MASK_TIMESTAMP = 1UL << 0,
};
+struct mlx4_ib_rss_caps {
+ __u64 rx_hash_fields_mask; /* enum mlx4_rx_hash_fields */
+ __u8 rx_hash_function; /* enum mlx4_rx_hash_function_flags */
+ __u8 reserved[7];
+};
+
struct mlx4_uverbs_ex_query_device_resp {
- __u32 comp_mask;
- __u32 response_length;
- __u64 hca_core_clock_offset;
- __u32 max_inl_recv_sz;
- __u32 reserved;
+ __u32 comp_mask;
+ __u32 response_length;
+ __u64 hca_core_clock_offset;
+ __u32 max_inl_recv_sz;
+ struct mlx4_ib_rss_caps rss_caps;
};
static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev)
--
2.14.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH rdma-next 2/2] IB/mlx4: Fix RSS's QPC attributes assignments
[not found] ` <20171025193935.1075-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-25 19:39 ` [PATCH rdma-next 1/2] IB/mlx4: Add report for RSS capabilities by vendor channel Leon Romanovsky
@ 2017-10-25 19:39 ` Leon Romanovsky
2017-11-10 18:05 ` [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15 Doug Ledford
2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-10-25 19:39 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Guy Levi
From: Guy Levi <guyle-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
In the modify QP handler the base_qpn_udp field in the RSS QPC is
overwrite later by irrelevant value assignment. Hence, ingress packets
which gets to the RSS QP will be steered then to a garbage QPN.
The patch fixes this by skipping the above assignment when a RSS QP is
modified, also, the RSS context's attributes assignments are relocated
just before the context is posted to avoid future issues like this.
Additionally, this patch takes the opportunity to change the code to be
disciplined to the device's manual and assigns the RSS QP context just at
RESET to INIT transition.
Fixes:3078f5f1bd8b ("IB/mlx4: Add support for RSS QP")
Signed-off-by: Guy Levi <guyle-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index b6b33d99b0b4..26f3345948e2 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -2182,11 +2182,6 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
context->flags = cpu_to_be32((to_mlx4_state(new_state) << 28) |
(to_mlx4_st(dev, qp->mlx4_ib_qp_type) << 16));
- if (rwq_ind_tbl) {
- fill_qp_rss_context(context, qp);
- context->flags |= cpu_to_be32(1 << MLX4_RSS_QPC_FLAG_OFFSET);
- }
-
if (!(attr_mask & IB_QP_PATH_MIG_STATE))
context->flags |= cpu_to_be32(MLX4_QP_PM_MIGRATED << 11);
else {
@@ -2387,6 +2382,7 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
context->pd = cpu_to_be32(pd->pdn);
if (!rwq_ind_tbl) {
+ context->params1 = cpu_to_be32(MLX4_IB_ACK_REQ_FREQ << 28);
get_cqs(qp, src_type, &send_cq, &recv_cq);
} else { /* Set dummy CQs to be compatible with HV and PRM */
send_cq = to_mcq(rwq_ind_tbl->ind_tbl[0]->cq);
@@ -2394,7 +2390,6 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
}
context->cqn_send = cpu_to_be32(send_cq->mcq.cqn);
context->cqn_recv = cpu_to_be32(recv_cq->mcq.cqn);
- context->params1 = cpu_to_be32(MLX4_IB_ACK_REQ_FREQ << 28);
/* Set "fast registration enabled" for all kernel QPs */
if (!ibuobject)
@@ -2513,7 +2508,7 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
MLX4_IB_LINK_TYPE_ETH;
if (dev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN) {
/* set QP to receive both tunneled & non-tunneled packets */
- if (!(context->flags & cpu_to_be32(1 << MLX4_RSS_QPC_FLAG_OFFSET)))
+ if (!rwq_ind_tbl)
context->srqn = cpu_to_be32(7 << 28);
}
}
@@ -2562,6 +2557,13 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
}
}
+ if (rwq_ind_tbl &&
+ cur_state == IB_QPS_RESET &&
+ new_state == IB_QPS_INIT) {
+ fill_qp_rss_context(context, qp);
+ context->flags |= cpu_to_be32(1 << MLX4_RSS_QPC_FLAG_OFFSET);
+ }
+
err = mlx4_qp_modify(dev->dev, &qp->mtt, to_mlx4_state(cur_state),
to_mlx4_state(new_state), context, optpar,
sqd_event, &qp->mqp);
--
2.14.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15
[not found] ` <20171025193935.1075-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-25 19:39 ` [PATCH rdma-next 1/2] IB/mlx4: Add report for RSS capabilities by vendor channel Leon Romanovsky
2017-10-25 19:39 ` [PATCH rdma-next 2/2] IB/mlx4: Fix RSS's QPC attributes assignments Leon Romanovsky
@ 2017-11-10 18:05 ` Doug Ledford
[not found] ` <1510337143.3735.6.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2 siblings, 1 reply; 6+ messages in thread
From: Doug Ledford @ 2017-11-10 18:05 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
On Wed, 2017-10-25 at 22:39 +0300, Leon Romanovsky wrote:
> Hi Doug,
>
> There are two mlx4 RSS fixes for v4.15
>
> Thanks
>
> The patches are available in the git repository at:
> git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-10-25
>
> Thanks
> ---------------------------------------
>
> Guy Levi (2):
> IB/mlx4: Add report for RSS capabilities by vendor channel
> IB/mlx4: Fix RSS's QPC attributes assignments
>
> drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++
> drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++-----
> drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++-------
> 3 files changed, 37 insertions(+), 12 deletions(-)
>
> --
> 2.14.2
>
Series applied, thanks.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15
[not found] ` <1510337143.3735.6.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2017-11-13 11:20 ` Leon Romanovsky
[not found] ` <20171113112013.GI18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2017-11-13 11:20 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
On Fri, Nov 10, 2017 at 01:05:43PM -0500, Doug Ledford wrote:
> On Wed, 2017-10-25 at 22:39 +0300, Leon Romanovsky wrote:
> > Hi Doug,
> >
> > There are two mlx4 RSS fixes for v4.15
> >
> > Thanks
> >
> > The patches are available in the git repository at:
> > git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-10-25
> >
> > Thanks
> > ---------------------------------------
> >
> > Guy Levi (2):
> > IB/mlx4: Add report for RSS capabilities by vendor channel
> > IB/mlx4: Fix RSS's QPC attributes assignments
> >
> > drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++
> > drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++-----
> > drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++-------
> > 3 files changed, 37 insertions(+), 12 deletions(-)
> >
> > --
> > 2.14.2
> >
>
> Series applied, thanks.
Doug,
I can't find it in your k.o repo.
Where can I find it?
Thanks
>
> --
> Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> GPG KeyID: B826A3330E572FDD
> Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15
[not found] ` <20171113112013.GI18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-13 21:13 ` Doug Ledford
0 siblings, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2017-11-13 21:13 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]
On Mon, 2017-11-13 at 13:20 +0200, Leon Romanovsky wrote:
> On Fri, Nov 10, 2017 at 01:05:43PM -0500, Doug Ledford wrote:
> > On Wed, 2017-10-25 at 22:39 +0300, Leon Romanovsky wrote:
> > > Hi Doug,
> > >
> > > There are two mlx4 RSS fixes for v4.15
> > >
> > > Thanks
> > >
> > > The patches are available in the git repository at:
> > > git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git tags/rdma-next-2017-10-25
> > >
> > > Thanks
> > > ---------------------------------------
> > >
> > > Guy Levi (2):
> > > IB/mlx4: Add report for RSS capabilities by vendor channel
> > > IB/mlx4: Fix RSS's QPC attributes assignments
> > >
> > > drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++
> > > drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++-----
> > > drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++-------
> > > 3 files changed, 37 insertions(+), 12 deletions(-)
> > >
> > > --
> > > 2.14.2
> > >
> >
> > Series applied, thanks.
>
> Doug,
>
> I can't find it in your k.o repo.
> Where can I find it?
Sorry, I took it, and I was waiting on 0day before I pushed to k.o, but
I forgot to push it to github so 0day wasn't gonna come. It's been
pushed to k.o today.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-13 21:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 19:39 [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15 Leon Romanovsky
[not found] ` <20171025193935.1075-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-25 19:39 ` [PATCH rdma-next 1/2] IB/mlx4: Add report for RSS capabilities by vendor channel Leon Romanovsky
2017-10-25 19:39 ` [PATCH rdma-next 2/2] IB/mlx4: Fix RSS's QPC attributes assignments Leon Romanovsky
2017-11-10 18:05 ` [PATCH rdma-next 0/2] mlx4 RSS fixes for 4.15 Doug Ledford
[not found] ` <1510337143.3735.6.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-11-13 11:20 ` Leon Romanovsky
[not found] ` <20171113112013.GI18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-13 21:13 ` Doug Ledford
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).