RDMA/qedr: Parse vlan priority as sl
authorAmrani, Ram <Ram.Amrani@cavium.com>
Tue, 3 Oct 2017 11:47:27 +0000 (14:47 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 4 Oct 2017 19:18:18 +0000 (15:18 -0400)
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@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/qedr_cm.c

index 5ebbe495238641d8ba826d6e055e79b50fa41704..ad8965397cf76a3ae8a1e5d1d36df2f2a33a6676 100644 (file)
@@ -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);