linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH rdma-next 5/6] net/mlx5: Report enhanced capabilities for IPoIB
Date: Tue, 30 May 2017 10:16:01 +0300	[thread overview]
Message-ID: <20170530071602.8139-6-leon@kernel.org> (raw)
In-Reply-To: <20170530071602.8139-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

From: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Report 'ipoib_enhanced_offloads' capabilities from
the core layer, it will be used in the next patch from this series.

Signed-off-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Maor Gottlieb <maorg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++++++
 include/linux/mlx5/device.h                  | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
index 1bc14d0fded8..cf468be1479c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
@@ -119,6 +119,12 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
 			return err;
 	}

+	if (MLX5_CAP_GEN(dev, ipoib_enhanced_offloads)) {
+		err = mlx5_core_get_caps(dev, MLX5_CAP_IPOIB_ENHANCED_OFFLOADS);
+		if (err)
+			return err;
+	}
+
 	if (MLX5_CAP_GEN(dev, pg)) {
 		err = mlx5_core_get_caps(dev, MLX5_CAP_ODP);
 		if (err)
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index dd9a263ed368..1256501959b5 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -960,7 +960,7 @@ enum mlx5_cap_type {
 	MLX5_CAP_ATOMIC,
 	MLX5_CAP_ROCE,
 	MLX5_CAP_IPOIB_OFFLOADS,
-	MLX5_CAP_EOIB_OFFLOADS,
+	MLX5_CAP_IPOIB_ENHANCED_OFFLOADS,
 	MLX5_CAP_FLOW_TABLE,
 	MLX5_CAP_ESWITCH_FLOW_TABLE,
 	MLX5_CAP_ESWITCH,
@@ -1002,6 +1002,10 @@ enum mlx5_mcam_feature_groups {
 	MLX5_GET(per_protocol_networking_offload_caps,\
 		 mdev->caps.hca_max[MLX5_CAP_ETHERNET_OFFLOADS], cap)

+#define MLX5_CAP_IPOIB_ENHANCED(mdev, cap) \
+	MLX5_GET(per_protocol_networking_offload_caps,\
+		 mdev->caps.hca_cur[MLX5_CAP_IPOIB_ENHANCED_OFFLOADS], cap)
+
 #define MLX5_CAP_ROCE(mdev, cap) \
 	MLX5_GET(roce_cap, mdev->caps.hca_cur[MLX5_CAP_ROCE], cap)

--
2.12.2

--
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

  parent reply	other threads:[~2017-05-30  7:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30  7:15 [PATCH rdma-next 0/6] Enable flow steering on IPoIB UD QP Leon Romanovsky
     [not found] ` <20170530071602.8139-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-05-30  7:15   ` [PATCH rdma-next 1/6] IB/core: Enable QP creation which is associated to underlay QP Leon Romanovsky
     [not found]     ` <20170530071602.8139-2-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-05-30 16:04       ` Jason Gunthorpe
     [not found]         ` <20170530160447.GA21513-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-01 14:42           ` Yishai Hadas
     [not found]             ` <1d799662-bc2b-ed12-882c-42d12d1ed8a1-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-06-05 15:36               ` Jason Gunthorpe
     [not found]                 ` <CAFgAxU9c1SwehkCY3o0RZPO_CTHGJb2A1omjVvJvyabO0V57iQ@mail.gmail.com>
     [not found]                   ` <CAFgAxU9c1SwehkCY3o0RZPO_CTHGJb2A1omjVvJvyabO0V57iQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-06 16:33                     ` Jason Gunthorpe
     [not found]                       ` <20170606163320.GC8671-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-06-07 12:23                         ` Alex Rosenbaum
     [not found]                           ` <CAFgAxU-=i2=yNnjE2kYHV0Re6Vrd=LyTB55q=p_1fc+zuotwvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-07 17:44                             ` Jason Gunthorpe
2017-05-30  7:15   ` [PATCH rdma-next 2/6] IB/uverbs: " Leon Romanovsky
     [not found]     ` <20170530071602.8139-3-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-05-30  7:33       ` Jiri Pirko
2017-05-30  7:58         ` Leon Romanovsky
     [not found]           ` <20170530075845.GA5406-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-30  8:00             ` Leon Romanovsky
2017-05-30  8:15             ` Jiri Pirko
2017-05-30 17:22               ` Leon Romanovsky
     [not found]                 ` <20170530172259.GD5406-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-30 18:03                   ` Jiri Pirko
2017-05-31  4:20                     ` Leon Romanovsky
     [not found]                       ` <20170531042031.GG5406-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-31  5:37                         ` Jiri Pirko
2017-05-31  8:39                           ` Leon Romanovsky
     [not found]                             ` <20170531083955.GJ5406-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-05-31 20:05                               ` Hefty, Sean
2017-06-04 13:43         ` Doug Ledford
     [not found]           ` <1496583794.7171.134.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-06-04 13:51             ` Jiri Pirko
     [not found]               ` <20170604135122.GC1910-6KJVSR23iU488b5SBfVpbw@public.gmane.org>
2017-06-04 14:25                 ` Doug Ledford
2017-06-05 15:26                 ` Jason Gunthorpe
2017-05-30  7:15   ` [PATCH rdma-next 3/6] IB/mlx5: Add support for underlay QP managing Leon Romanovsky
2017-05-30  7:16   ` [PATCH rdma-next 4/6] IB/mlx5: Add multicast flow steering support for underlay QP Leon Romanovsky
2017-05-30  7:16   ` Leon Romanovsky [this message]
2017-05-30  7:16   ` [PATCH rdma-next 6/6] IB/mlx5: Report RX checksum capabilities for IPoIB Leon Romanovsky

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=20170530071602.8139-6-leon@kernel.org \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /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).