Skip to content

Commit 366cddb

Browse files
amirvdavem330
authored andcommitted
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 <[email protected]> CC: Sean Hefty <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d4a9686 commit 366cddb

File tree

1 file changed

+5
-1
lines changed
  • drivers/infiniband/core

1 file changed

+5
-1
lines changed

drivers/infiniband/core/cma.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <linux/inetdevice.h>
4343
#include <linux/slab.h>
4444
#include <linux/module.h>
45+
#include <net/route.h>
4546

4647
#include <net/tcp.h>
4748
#include <net/ipv6.h>
@@ -1826,7 +1827,10 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)
18261827
route->path_rec->reversible = 1;
18271828
route->path_rec->pkey = cpu_to_be16(0xffff);
18281829
route->path_rec->mtu_selector = IB_SA_EQ;
1829-
route->path_rec->sl = id_priv->tos >> 5;
1830+
route->path_rec->sl = netdev_get_prio_tc_map(
1831+
ndev->priv_flags & IFF_802_1Q_VLAN ?
1832+
vlan_dev_real_dev(ndev) : ndev,
1833+
rt_tos2priority(id_priv->tos));
18301834

18311835
route->path_rec->mtu = iboe_get_mtu(ndev->mtu);
18321836
route->path_rec->rate_selector = IB_SA_EQ;

0 commit comments

Comments
 (0)