netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Vadai <amirv@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Roland Dreier <roland@purestorage.com>,
	Yevgeny Petrilin <yevgenyp@mellanox.com>,
	Oren Duer <oren@mellanox.com>,
	Amir Vadai <amirv@dev.mellanox.co.il>,
	Amir Vadai <amirv@mellanox.com>,
	Sean Hefty <sean.hefty@intel.com>
Subject: [PATCH V4 6/8] IB/rdma_cm: TOS <=> UP mapping for IBoE
Date: Thu, 29 Mar 2012 17:03:36 +0200	[thread overview]
Message-ID: <1333033418-1669-7-git-send-email-amirv@mellanox.com> (raw)
In-Reply-To: <1333033418-1669-1-git-send-email-amirv@mellanox.com>

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 <amirv@mellanox.com>
CC: Sean Hefty <sean.hefty@intel.com>
---
 drivers/infiniband/core/cma.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

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 <linux/inetdevice.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <net/route.h>
 
 #include <net/tcp.h>
 #include <net/ipv6.h>
@@ -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;
-- 
1.7.8.2

  parent reply	other threads:[~2012-03-29 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 15:03 [PATCH V4 0/8] net/mlx4_en: DCB QoS support Amir Vadai
2012-03-29 15:03 ` [PATCH V4 1/8] net/mlx4_en: Force user priority by QP attribute Amir Vadai
2012-03-29 15:03 ` [PATCH V4 2/8] net/mlx4_core: set port QoS attributes Amir Vadai
2012-03-29 15:03 ` [PATCH V4 3/8] net/mlx4_en: DCB QoS support Amir Vadai
2012-03-29 15:03 ` [PATCH V4 4/8] net/mlx4_en: sk_prio <=> UP for untagged traffic Amir Vadai
2012-03-29 15:03 ` [PATCH V4 5/8] net/route: export symbol ip_tos2prio Amir Vadai
2012-03-29 15:03 ` Amir Vadai [this message]
2012-03-29 15:03 ` [PATCH V4 7/8] net/dcb: Add an optional max rate attribute Amir Vadai
2012-03-29 15:03 ` [PATCH V4 8/8] net/mlx4_en: Set max rate-limit for a TC Amir Vadai
2012-03-29 15:21   ` Eric Dumazet
2012-03-29 18:27     ` Amir Vadai
2012-03-29 21:04       ` Eric Dumazet
2012-03-29 21:25       ` David Miller
2012-04-01  7:04         ` Or Gerlitz
2012-04-01 19:30           ` Or Gerlitz
2012-04-01 19:39             ` David Miller
2012-04-01 19:50               ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333033418-1669-7-git-send-email-amirv@mellanox.com \
    --to=amirv@mellanox.com \
    --cc=amirv@dev.mellanox.co.il \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=oren@mellanox.com \
    --cc=roland@purestorage.com \
    --cc=sean.hefty@intel.com \
    --cc=yevgenyp@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).