* [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN
@ 2017-10-03 11:47 Ram Amrani
[not found] ` <1507031247-7972-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ram Amrani @ 2017-10-03 11:47 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani
This series contains two important fixes for RDMA CM with VLAN.
Ram Amrani (2):
RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero
RDMA/qedr: Parse vlan priority as sl
drivers/infiniband/hw/qedr/qedr.h | 2 +-
drivers/infiniband/hw/qedr/qedr_cm.c | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
--
1.8.3.1
--
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] 4+ messages in thread
* [PATCH for-rc 1/2] RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero
[not found] ` <1507031247-7972-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
@ 2017-10-03 11:47 ` Ram Amrani
2017-10-03 11:47 ` [PATCH for-rc 2/2] RDMA/qedr: Parse vlan priority as sl Ram Amrani
2017-10-04 19:20 ` [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Ram Amrani @ 2017-10-03 11:47 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani, Michal Kalderon
Rename vlan_id field name to vlan as it contains more than the vlan_id.
Mask out non vlan id fields from vlan tag of the QED LL2 RX GSI
vlan output. As it is expected to be vlan id only.
Ignore vlan_id with value of zero.
Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support")
Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qedr/qedr.h | 2 +-
drivers/infiniband/hw/qedr/qedr_cm.c | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h
index b2bb42e..254083b 100644
--- a/drivers/infiniband/hw/qedr/qedr.h
+++ b/drivers/infiniband/hw/qedr/qedr.h
@@ -387,7 +387,7 @@ struct qedr_qp {
u8 wqe_size;
u8 smac[ETH_ALEN];
- u16 vlan_id;
+ u16 vlan;
int rc;
} *rqe_wr_id;
diff --git a/drivers/infiniband/hw/qedr/qedr_cm.c b/drivers/infiniband/hw/qedr/qedr_cm.c
index 4689e80..5ebbe49 100644
--- a/drivers/infiniband/hw/qedr/qedr_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_cm.c
@@ -105,7 +105,7 @@ void qedr_ll2_complete_rx_packet(void *cxt,
qp->rqe_wr_id[qp->rq.gsi_cons].rc = data->u.data_length_error ?
-EINVAL : 0;
- qp->rqe_wr_id[qp->rq.gsi_cons].vlan_id = data->vlan;
+ qp->rqe_wr_id[qp->rq.gsi_cons].vlan = data->vlan;
/* note: length stands for data length i.e. GRH is excluded */
qp->rqe_wr_id[qp->rq.gsi_cons].sg_list[0].length =
data->length.data_length;
@@ -694,6 +694,7 @@ int qedr_gsi_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
struct qedr_cq *cq = get_qedr_cq(ibcq);
struct qedr_qp *qp = dev->gsi_qp;
unsigned long flags;
+ u16 vlan_id;
int i = 0;
spin_lock_irqsave(&cq->cq_lock, flags);
@@ -712,9 +713,12 @@ int qedr_gsi_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
wc[i].wc_flags |= IB_WC_GRH | IB_WC_IP_CSUM_OK;
ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac);
wc[i].wc_flags |= IB_WC_WITH_SMAC;
- if (qp->rqe_wr_id[qp->rq.cons].vlan_id) {
+
+ vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan &
+ VLAN_VID_MASK;
+ if (vlan_id) {
wc[i].wc_flags |= IB_WC_WITH_VLAN;
- wc[i].vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan_id;
+ wc[i].vlan_id = vlan_id;
}
qedr_inc_sw_cons(&qp->rq);
--
1.8.3.1
--
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] 4+ messages in thread
* [PATCH for-rc 2/2] RDMA/qedr: Parse vlan priority as sl
[not found] ` <1507031247-7972-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-03 11:47 ` [PATCH for-rc 1/2] RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero Ram Amrani
@ 2017-10-03 11:47 ` Ram Amrani
2017-10-04 19:20 ` [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Ram Amrani @ 2017-10-03 11:47 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ram Amrani, Michal Kalderon
Parse the vlan priority from the vlan tag and configure it to the
WC's sl field.
Fixes: abd49676c707 ("qed: Add RoCE ll2 & GSI support")
Signed-off-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Michal Kalderon <Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qedr/qedr_cm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/qedr/qedr_cm.c b/drivers/infiniband/hw/qedr/qedr_cm.c
index 5ebbe49..ad89653 100644
--- a/drivers/infiniband/hw/qedr/qedr_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_cm.c
@@ -719,6 +719,8 @@ int qedr_gsi_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
if (vlan_id) {
wc[i].wc_flags |= IB_WC_WITH_VLAN;
wc[i].vlan_id = vlan_id;
+ wc[i].sl = (qp->rqe_wr_id[qp->rq.cons].vlan &
+ VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
}
qedr_inc_sw_cons(&qp->rq);
--
1.8.3.1
--
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] 4+ messages in thread
* Re: [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN
[not found] ` <1507031247-7972-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-03 11:47 ` [PATCH for-rc 1/2] RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero Ram Amrani
2017-10-03 11:47 ` [PATCH for-rc 2/2] RDMA/qedr: Parse vlan priority as sl Ram Amrani
@ 2017-10-04 19:20 ` Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2017-10-04 19:20 UTC (permalink / raw)
To: Ram Amrani
Cc: Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Tue, 2017-10-03 at 14:47 +0300, Ram Amrani wrote:
> This series contains two important fixes for RDMA CM with VLAN.
>
> Ram Amrani (2):
> RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero
> RDMA/qedr: Parse vlan priority as sl
>
> drivers/infiniband/hw/qedr/qedr.h | 2 +-
> drivers/infiniband/hw/qedr/qedr_cm.c | 12 +++++++++---
> 2 files changed, 10 insertions(+), 4 deletions(-)
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
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] 4+ messages in thread
end of thread, other threads:[~2017-10-04 19:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 11:47 [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN Ram Amrani
[not found] ` <1507031247-7972-1-git-send-email-Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-10-03 11:47 ` [PATCH for-rc 1/2] RDMA/qedr: Parse VLAN ID correctly and ignore the value of zero Ram Amrani
2017-10-03 11:47 ` [PATCH for-rc 2/2] RDMA/qedr: Parse vlan priority as sl Ram Amrani
2017-10-04 19:20 ` [PATCH for-rc 0/2] RDMA/qedr: two important fixes for RDMA CM with VLAN 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).