From: Amir Vadai Date: Wed, 4 Apr 2012 21:33:29 +0000 (+0000) Subject: IB/rdma_cm: TOS <=> UP mapping for IBoE X-Git-Tag: v3.5-rc1~109^2~575 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=366cddb4028858079a9a8145bd713c13a9edb3dc;p=profile%2Fivi%2Fkernel-x86-ivi.git IB/rdma_cm: TOS <=> UP mapping for IBoE Both tagged traffic and untagged traffic use tc tool mapping. Treat RDMA TOS same as IP TOS when mapping to SL Signed-off-by: Amir Vadai CC: Sean Hefty Signed-off-by: David S. Miller --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e3e470f..59fbd70 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -1826,7 +1827,10 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv) route->path_rec->reversible = 1; route->path_rec->pkey = cpu_to_be16(0xffff); route->path_rec->mtu_selector = IB_SA_EQ; - route->path_rec->sl = id_priv->tos >> 5; + route->path_rec->sl = netdev_get_prio_tc_map( + ndev->priv_flags & IFF_802_1Q_VLAN ? + vlan_dev_real_dev(ndev) : ndev, + rt_tos2priority(id_priv->tos)); route->path_rec->mtu = iboe_get_mtu(ndev->mtu); route->path_rec->rate_selector = IB_SA_EQ;