* Re: [PATCH rdma-core 00/17] Fixes, flattening and packaging
From: Jason Gunthorpe @ 2016-10-07 18:05 UTC (permalink / raw)
To: Leon Romanovsky
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Christoph Hellwig, Sean Hefty
In-Reply-To: <20161007140551.GT9282-2ukJVAZIZ/Y@public.gmane.org>
On Fri, Oct 07, 2016 at 05:05:51PM +0300, Leon Romanovsky wrote:
> Can you please add all patches from ML too to this pull request, so they
> apply cleanly?
git am -3 had no problem with the patches.
https://github.com/linux-rdma/rdma-core/pull/15
Someone will have to update patchworks, when will you have access to
handle the list patches?
Jason
--
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
^ permalink raw reply
* Re: [PATCH rdma-core 00/17] Fixes, flattening and packaging
From: Leon Romanovsky @ 2016-10-07 18:34 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Christoph Hellwig, Sean Hefty
In-Reply-To: <20161007180527.GA27537-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
On Fri, Oct 07, 2016 at 12:05:27PM -0600, Jason Gunthorpe wrote:
> On Fri, Oct 07, 2016 at 05:05:51PM +0300, Leon Romanovsky wrote:
>
> > Can you please add all patches from ML too to this pull request, so they
> > apply cleanly?
>
> git am -3 had no problem with the patches.
>
> https://github.com/linux-rdma/rdma-core/pull/15
>
> Someone will have to update patchworks, when will you have access to
> handle the list patches?
Thanks Jason and Doug.
>
> Jason
> --
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Bart Van Assche @ 2016-10-07 18:37 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
Hello Doug, Jason and Moni,
These five patches is what I came up with after having had a look at the
rxe_cfg source code. It would be appreciated if these patches would be
considered for inclusion in the rdma-core repository. The filenames of
these patches are:
0001-rxe_cfg-Use-Perl-functions-instead-of-parsing-the-ou.patch
0002-rxe_cfg-Initialize-rxe_mtu-even-if-ibv_definfo-fails.patch
0003-rxe_cfg-Do-not-suppress-stderr.patch
0004-rxe_cfg-Remove-dead-code-from-show_module_status.patch
0005-rxe_cfg-Use-printf-instead-of-using-a-loop.patch
Thanks,
Bart.
--
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
^ permalink raw reply
* [PATCH 1/5] rxe_cfg: Use Perl functions instead of parsing the output of shell commands
From: Bart Van Assche @ 2016-10-07 18:38 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
providers/rxe/rxe_cfg | 67 ++++++++++++++++++++++++---------------------------
1 file changed, 31 insertions(+), 36 deletions(-)
diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index 6783dc78c340..0310d25bad91 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -35,6 +35,7 @@
use warnings;
use strict;
+use File::Basename;
use Getopt::Long;
use Switch;
@@ -67,20 +68,25 @@ my @mlx4_port;
my @mlx4_ether;
my @roce_list;
+# Read a file and return its contents as a string.
+sub read_file {
+ my $filename = shift;
+ my $result = "";
+
+ if (open(FILE, $filename)) {
+ $result = <FILE>;
+ close FILE;
+ }
+ return $result;
+}
+
#get mapping between rxe and eth devices
sub get_names {
- return if (!(-e "/sys/class/infiniband"));
-
- my @list;
- my $rxe;
- my $eth;
my $i = 0;
- @list = `ls /sys/class/infiniband | grep rxe $z`;
- foreach $rxe (@list) {
- chomp($rxe);
-
- $eth = `cat /sys/class/infiniband/$rxe/parent $z`;
+ foreach my $rxe (glob("/sys/class/infiniband/rxe*")) {
+ $rxe = basename($rxe);
+ my $eth = read_file("/sys/class/infiniband/$rxe/parent");
chomp($eth);
if (($eth =~ /[\w]+[\d]/)
@@ -98,25 +104,13 @@ sub get_names {
# get list of Mellanox RoCE ports
sub get_mlx4_list {
- return if (!(-e "/sys/class/infiniband"));
-
- my @list;
- my $mlx4;
- my @ports;
- my $port;
- my $link;
my $i = 0;
- @list = `ls /sys/class/infiniband | grep mlx4_ $z`;
- foreach $mlx4 (@list) {
- chomp($mlx4);
- chdir("/sys/class/infiniband/$mlx4/ports");
-
- @ports = `ls $z`;
- foreach $port (@ports) {
- chomp($port);
-
- $link= `cat $port/link_layer $z`;
+ foreach my $mlx4 (glob("/sys/class/infiniband/mlx4_*")) {
+ $mlx4 = basename($mlx4);
+ foreach my $port (glob("/sys/class/infiniband/$mlx4/ports/*")) {
+ $port = basename($port);
+ my $link = read_file("$port/link_layer");
chomp($link);
if ($link =~ "Ethernet") {
@@ -141,10 +135,10 @@ sub get_dev_info {
get_mlx4_list();
my @my_eth_list = ();
- my @my_eth_devs = `ls /sys/class/net`;
- foreach my $my_eth_dev (@my_eth_devs) {
- chomp($my_eth_dev);
- my $my_dev_type = `cat /sys/class/net/${my_eth_dev}/type`;
+ foreach my $my_eth_dev (glob("/sys/class/net/*")) {
+ $my_eth_dev = basename($my_eth_dev);
+ my $my_dev_type = read_file("/sys/class/net/${my_eth_dev}/type");
+ chomp($my_dev_type);
if ($my_dev_type == "1") {
push(@my_eth_list, "$my_eth_dev");
}
@@ -378,11 +372,11 @@ sub do_status {
# read file containing list of ethernet devices into a list
sub populate_persistence {
- my @lines = `cat $persistence_file $z`;
- my $line;
my $i = 0;
- foreach $line (@lines) {
+ open FILE, $persistence_file;
+ while(<FILE>) {
+ my $line = $_;
chomp($line);
$line =~ s/^\s+//g;
if ($line =~ /[\w]+[\d]/) {
@@ -394,6 +388,7 @@ sub populate_persistence {
}
}
}
+ close FILE;
$num_persistent = $i;
}
@@ -604,7 +599,7 @@ sub do_debug {
}
}
- my $current = `cat $debugfile $z`;
+ my $current = read_file($debugfile);
chomp($current);
if ($current > 0) {
print "Debug is ON ($current)\n";
@@ -681,7 +676,7 @@ sub main {
}
# create persistence file if necessary
- `mkdir -p $persistence_path $z`;
+ mkdir -p $persistence_path;
if (!(-e $persistence_file)) {
`touch $persistence_file $z`;
}
--
2.10.0
--
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
^ permalink raw reply related
* [PATCH 2/5] rxe_cfg: Initialize $rxe_mtu even if ibv_definfo fails
From: Bart Van Assche @ 2016-10-07 18:38 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
This patch avoids that the following error message is printed if
ibv_devinfo fails:
Use of uninitialized value $rmtu in string at /usr/local/bin/rxe_cfg line 364.
Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
providers/rxe/rxe_cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index 0310d25bad91..1e6a5db2f2b8 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -220,6 +220,7 @@ sub get_dev_info {
$rxe_mtu{$rxe} = $line;
}
}
+ $rxe_mtu{$rxe} = "(?)" if (!$rxe_mtu{$rxe});
}
}
--
2.10.0
--
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
^ permalink raw reply related
* [PATCH 3/5] rxe_cfg: Do not suppress stderr
From: Bart Van Assche @ 2016-10-07 18:39 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Suppressing stderr if stdout is already redirected is wrong. Hence
do not suppress stderr. If e.g. the ib_uverbs kernel module is not
loaded, without this patch no error messages are printed. With this
patch applied the following is printed:
Failed to get IB devices list: Function not implemented
Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
providers/rxe/rxe_cfg | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index 1e6a5db2f2b8..a4e9c0407a8b 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -39,7 +39,6 @@ use File::Basename;
use Getopt::Long;
use Switch;
-my $z = "2>/dev/null";
my $help = 0;
my $no_persist = 0;
my $debug = 0;
@@ -150,7 +149,7 @@ sub get_dev_info {
$eth_list[$i++] = $eth;
- @lines = `ethtool -i $eth $z`;
+ @lines = `ethtool -i $eth`;
foreach $line (@lines) {
chomp($line);
@@ -171,7 +170,7 @@ sub get_dev_info {
$link_state{$eth} = "";
$link_speed{$eth} = "";
- @lines = `ethtool $eth $z`;
+ @lines = `ethtool $eth`;
foreach $line (@lines) {
chomp($line);
@@ -190,7 +189,7 @@ sub get_dev_info {
$ipv4_addr{$eth} = " ";
$eth_mtu{$eth} = "";
- @lines = `ifconfig $eth $z`;
+ @lines = `ifconfig $eth`;
foreach $line (@lines) {
# get IP address
if ($line =~ /inet addr/) {
@@ -211,7 +210,7 @@ sub get_dev_info {
# get rxe mtu
foreach my $rxe (@rxe_array) {
- @lines = `ibv_devinfo -d $rxe $z`;
+ @lines = `ibv_devinfo -d $rxe`;
foreach $line (@lines) {
if ($line =~ "active_mtu") {
$line =~ s/^\s+active_mtu:\s+//g;
@@ -494,7 +493,7 @@ sub get_devinfo {
my $rxe = $_[0];
my $cmd = "ibv_devinfo -d $rxe";
- return `$cmd $z`;
+ return `$cmd`;
}
# allow unsupported modules to load in SLES11 if allowed
@@ -679,7 +678,7 @@ sub main {
# create persistence file if necessary
mkdir -p $persistence_path;
if (!(-e $persistence_file)) {
- `touch $persistence_file $z`;
+ `touch $persistence_file`;
}
# Get full context of the configuration
--
2.10.0
--
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
^ permalink raw reply related
* [PATCH 4/5] rxe_cfg: Remove dead code from show_module_status()
From: Bart Van Assche @ 2016-10-07 18:39 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
providers/rxe/rxe_cfg | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index a4e9c0407a8b..0a3dcf16957c 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -300,23 +300,7 @@ sub check_module_status {
# print driver load status and ethertype for rdma_rxe and rdma_rxe_net
sub show_module_status {
- my $rxe_loaded = 1;
-
- if (!(-e $sys)) {
- $rxe_loaded = 0;
- }
-
- if ($rxe_loaded) {
- return 0;
- }
- elsif (!$rxe_loaded) {
- print "rxe modules not loaded\n";
- return 1;
- }
- else {
- print "Configuration does not make sense\n";
- return 1;
- }
+ print "rdma_rxe module not loaded\n" if (!(-e $sys));
}
# print rxe status
--
2.10.0
--
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
^ permalink raw reply related
* [PATCH 5/5] rxe_cfg: Use printf() instead of using a loop
From: Bart Van Assche @ 2016-10-07 18:39 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
---
providers/rxe/rxe_cfg | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index 0a3dcf16957c..6c414fbda6fd 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -241,7 +241,6 @@ sub status_print {
my @flen = ();
my $num_fields = 0;
my $i;
- my $j;
my $pad;
my $line;
@@ -281,9 +280,7 @@ sub status_print {
else {
print " ";
}
- for ($j = 0; $j < $pad; $j++) {
- print " ";
- }
+ printf("%*s", $pad, "");
}
print "\n";
}
--
2.10.0
--
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
^ permalink raw reply related
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Jason Gunthorpe @ 2016-10-07 19:02 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <bf5dba39-7e14-23ee-4aa1-2a276d629fe9-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
On Fri, Oct 07, 2016 at 11:37:43AM -0700, Bart Van Assche wrote:
> Hello Doug, Jason and Moni,
>
> These five patches is what I came up with after having had a look at the
> rxe_cfg source code. It would be appreciated if these patches would be
> considered for inclusion in the rdma-core repository. The filenames of these
> patches are:
Thanks Bart, it would be best in Moni looks at these when he returns,
but nothing seemed off to my uneducated eye.
While you are looking at this could you also look at the use of
/var/rxe in that script?
That is not a FHS path, so it needs to be something else, and the
script should probably pass through substitution to pick up the right
path, whatever that is.. Based on the name sounds like /var/cache or
/var/lib ?
Thanks,
Jason
--
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
^ permalink raw reply
* [PATCH V2] i40iw: Add Quality of Service support
From: Henry Orosco @ 2016-10-07 20:47 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Henry Orosco
Add support for QoS on QPs. Upon device initialization,
a map is created from user priority to queue set
handles. On QP creation, use ToS to look up the queue
set handle for use with the QP.
Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Shiraz Saleem <shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Henry Orosco <henry.orosco-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
V2: Fix i40iw_cm.c and i40iw_ctrl.c mode to 100644
drivers/infiniband/hw/i40iw/i40iw.h | 9 ++
drivers/infiniband/hw/i40iw/i40iw_cm.c | 30 +++++-
drivers/infiniband/hw/i40iw/i40iw_cm.h | 2 +-
drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 151 +++++++++++++++++++++++++++++-
drivers/infiniband/hw/i40iw/i40iw_d.h | 2 +
drivers/infiniband/hw/i40iw/i40iw_hw.c | 25 ++---
drivers/infiniband/hw/i40iw/i40iw_main.c | 64 +++++++++++--
drivers/infiniband/hw/i40iw/i40iw_osdep.h | 2 +
drivers/infiniband/hw/i40iw/i40iw_p.h | 2 +
drivers/infiniband/hw/i40iw/i40iw_puda.c | 3 +-
drivers/infiniband/hw/i40iw/i40iw_type.h | 18 +++-
drivers/infiniband/hw/i40iw/i40iw_utils.c | 45 +++++++++
drivers/infiniband/hw/i40iw/i40iw_verbs.c | 6 +-
13 files changed, 323 insertions(+), 36 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw.h b/drivers/infiniband/hw/i40iw/i40iw.h
index b738acd..d39ce0a 100644
--- a/drivers/infiniband/hw/i40iw/i40iw.h
+++ b/drivers/infiniband/hw/i40iw/i40iw.h
@@ -210,6 +210,12 @@ struct i40iw_msix_vector {
u32 ceq_id;
};
+struct l2params_work {
+ struct work_struct work;
+ struct i40iw_device *iwdev;
+ struct i40iw_l2params l2params;
+};
+
#define I40IW_MSIX_TABLE_SIZE 65
struct virtchnl_work {
@@ -514,6 +520,9 @@ void i40iw_add_pdusecount(struct i40iw_pd *iwpd);
void i40iw_hw_modify_qp(struct i40iw_device *iwdev, struct i40iw_qp *iwqp,
struct i40iw_modify_qp_info *info, bool wait);
+void i40iw_qp_suspend_resume(struct i40iw_sc_dev *dev,
+ struct i40iw_sc_qp *qp,
+ bool suspend);
enum i40iw_status_code i40iw_manage_qhash(struct i40iw_device *iwdev,
struct i40iw_cm_info *cminfo,
enum i40iw_quad_entry_type etype,
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index c490f8d..06fd9ae 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -221,6 +221,7 @@ static void i40iw_get_addr_info(struct i40iw_cm_node *cm_node,
memcpy(cm_info->rem_addr, cm_node->rem_addr, sizeof(cm_info->rem_addr));
cm_info->loc_port = cm_node->loc_port;
cm_info->rem_port = cm_node->rem_port;
+ cm_info->user_pri = cm_node->user_pri;
}
/**
@@ -396,6 +397,7 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
u32 opts_len = 0;
u32 pd_len = 0;
u32 hdr_len = 0;
+ u16 vtag;
sqbuf = i40iw_puda_get_bufpool(dev->ilq);
if (!sqbuf)
@@ -445,7 +447,8 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
ether_addr_copy(ethh->h_source, cm_node->loc_mac);
if (cm_node->vlan_id < VLAN_TAG_PRESENT) {
((struct vlan_ethhdr *)ethh)->h_vlan_proto = htons(ETH_P_8021Q);
- ((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(cm_node->vlan_id);
+ vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id;
+ ((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(vtag);
((struct vlan_ethhdr *)ethh)->h_vlan_encapsulated_proto = htons(ETH_P_IP);
} else {
@@ -474,7 +477,8 @@ static struct i40iw_puda_buf *i40iw_form_cm_frame(struct i40iw_cm_node *cm_node,
ether_addr_copy(ethh->h_source, cm_node->loc_mac);
if (cm_node->vlan_id < VLAN_TAG_PRESENT) {
((struct vlan_ethhdr *)ethh)->h_vlan_proto = htons(ETH_P_8021Q);
- ((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(cm_node->vlan_id);
+ vtag = (cm_node->user_pri << VLAN_PRIO_SHIFT) | cm_node->vlan_id;
+ ((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(vtag);
((struct vlan_ethhdr *)ethh)->h_vlan_encapsulated_proto = htons(ETH_P_IPV6);
} else {
ethh->h_proto = htons(ETH_P_IPV6);
@@ -1880,6 +1884,7 @@ static int i40iw_dec_refcnt_listen(struct i40iw_cm_core *cm_core,
nfo.loc_port = listener->loc_port;
nfo.ipv4 = listener->ipv4;
nfo.vlan_id = listener->vlan_id;
+ nfo.user_pri = listener->user_pri;
if (!list_empty(&listener->child_listen_list)) {
i40iw_del_multiple_qhash(listener->iwdev, &nfo, listener);
@@ -2138,6 +2143,11 @@ static struct i40iw_cm_node *i40iw_make_cm_node(
/* set our node specific transport info */
cm_node->ipv4 = cm_info->ipv4;
cm_node->vlan_id = cm_info->vlan_id;
+ if ((cm_node->vlan_id == I40IW_NO_VLAN) && iwdev->dcb)
+ cm_node->vlan_id = 0;
+ cm_node->user_pri = cm_info->user_pri;
+ if (listener)
+ cm_node->user_pri = listener->user_pri;
memcpy(cm_node->loc_addr, cm_info->loc_addr, sizeof(cm_node->loc_addr));
memcpy(cm_node->rem_addr, cm_info->rem_addr, sizeof(cm_node->rem_addr));
cm_node->loc_port = cm_info->loc_port;
@@ -3055,6 +3065,7 @@ void i40iw_receive_ilq(struct i40iw_sc_dev *dev, struct i40iw_puda_buf *rbuf)
struct i40iw_device *iwdev = (struct i40iw_device *)dev->back_dev;
struct i40iw_cm_core *cm_core = &iwdev->cm_core;
struct vlan_ethhdr *ethh;
+ u16 vtag;
/* if vlan, then maclen = 18 else 14 */
iph = (struct iphdr *)rbuf->iph;
@@ -3068,7 +3079,9 @@ void i40iw_receive_ilq(struct i40iw_sc_dev *dev, struct i40iw_puda_buf *rbuf)
ethh = (struct vlan_ethhdr *)rbuf->mem.va;
if (ethh->h_vlan_proto == htons(ETH_P_8021Q)) {
- cm_info.vlan_id = ntohs(ethh->h_vlan_TCI) & VLAN_VID_MASK;
+ vtag = ntohs(ethh->h_vlan_TCI);
+ cm_info.user_pri = (vtag & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
+ cm_info.vlan_id = vtag & VLAN_VID_MASK;
i40iw_debug(cm_core->dev,
I40IW_DEBUG_CM,
"%s vlan_id=%d\n",
@@ -3309,6 +3322,8 @@ static void i40iw_cm_init_tsa_conn(struct i40iw_qp *iwqp,
ctx_info->tcp_info_valid = true;
ctx_info->iwarp_info_valid = true;
+ ctx_info->add_to_qoslist = true;
+ ctx_info->user_pri = cm_node->user_pri;
i40iw_init_tcp_ctx(cm_node, &tcp_info, iwqp);
if (cm_node->snd_mark_en) {
@@ -3326,6 +3341,7 @@ static void i40iw_cm_init_tsa_conn(struct i40iw_qp *iwqp,
/* once tcp_info is set, no need to do it again */
ctx_info->tcp_info_valid = false;
ctx_info->iwarp_info_valid = false;
+ ctx_info->add_to_qoslist = false;
}
/**
@@ -3779,6 +3795,9 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
i40iw_netdev_vlan_ipv6(cm_info.loc_addr, &cm_info.vlan_id, NULL);
}
cm_info.cm_id = cm_id;
+ cm_info.user_pri = rt_tos2priority(cm_id->tos);
+ i40iw_debug(&iwdev->sc_dev, I40IW_DEBUG_DCB, "%s TOS:[%d] UP:[%d]\n",
+ __func__, cm_id->tos, cm_info.user_pri);
if ((cm_info.ipv4 && (laddr->sin_addr.s_addr != raddr->sin_addr.s_addr)) ||
(!cm_info.ipv4 && memcmp(laddr6->sin6_addr.in6_u.u6_addr32,
raddr6->sin6_addr.in6_u.u6_addr32,
@@ -3924,6 +3943,11 @@ int i40iw_create_listen(struct iw_cm_id *cm_id, int backlog)
cm_id->provider_data = cm_listen_node;
+ cm_listen_node->user_pri = rt_tos2priority(cm_id->tos);
+ cm_info.user_pri = cm_listen_node->user_pri;
+ i40iw_debug(&iwdev->sc_dev, I40IW_DEBUG_DCB, "%s TOS:[%d] UP:[%d]\n",
+ __func__, cm_id->tos, cm_listen_node->user_pri);
+
if (!cm_listen_node->reused_node) {
if (wildcard) {
if (cm_info.ipv4)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.h b/drivers/infiniband/hw/i40iw/i40iw_cm.h
index e9046d9..945ed26 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.h
@@ -368,7 +368,7 @@ struct i40iw_cm_info {
u32 rem_addr[4];
u16 vlan_id;
int backlog;
- u16 user_pri;
+ u8 user_pri;
bool ipv4;
};
diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
index 2c4b4d0..31c4a0c 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
@@ -223,6 +223,133 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_query_buf(
}
/**
+ * i40iw_fill_qos_list - Change all unknown qs handles to available ones
+ * @qs_list: list of qs_handles to be fixed with valid qs_handles
+ */
+static void i40iw_fill_qos_list(u16 *qs_list)
+{
+ u16 qshandle = qs_list[0];
+ int i;
+
+ for (i = 0; i < I40IW_MAX_USER_PRIORITY; i++) {
+ if (qs_list[i] == QS_HANDLE_UNKNOWN)
+ qs_list[i] = qshandle;
+ else
+ qshandle = qs_list[i];
+ }
+}
+
+/**
+ * i40iw_qp_from_entry - Given entry, get to the qp structure
+ * @entry: Points to list of qp structure
+ */
+static struct i40iw_sc_qp *i40iw_qp_from_entry(struct list_head *entry)
+{
+ if (!entry)
+ return NULL;
+
+ return (struct i40iw_sc_qp *)((char *)entry - offsetof(struct i40iw_sc_qp, list));
+}
+
+/**
+ * i40iw_get_qp - get the next qp from the list given current qp
+ * @head: Listhead of qp's
+ * @qp: current qp
+ */
+static struct i40iw_sc_qp *i40iw_get_qp(struct list_head *head, struct i40iw_sc_qp *qp)
+{
+ struct list_head *entry = NULL;
+ struct list_head *lastentry;
+
+ if (list_empty(head))
+ return NULL;
+
+ if (!qp) {
+ entry = head->next;
+ } else {
+ lastentry = &qp->list;
+ entry = (lastentry != head) ? lastentry->next : NULL;
+ }
+
+ return i40iw_qp_from_entry(entry);
+}
+
+/**
+ * i40iw_change_l2params - given the new l2 parameters, change all qp
+ * @dev: IWARP device pointer
+ * @l2params: New paramaters from l2
+ */
+void i40iw_change_l2params(struct i40iw_sc_dev *dev, struct i40iw_l2params *l2params)
+{
+ struct i40iw_sc_qp *qp = NULL;
+ bool qs_handle_change = false;
+ bool mss_change = false;
+ unsigned long flags;
+ u16 qs_handle;
+ int i;
+
+ if (dev->mss != l2params->mss) {
+ mss_change = true;
+ dev->mss = l2params->mss;
+ }
+
+ i40iw_fill_qos_list(l2params->qs_handle_list);
+ for (i = 0; i < I40IW_MAX_USER_PRIORITY; i++) {
+ qs_handle = l2params->qs_handle_list[i];
+ if (dev->qos[i].qs_handle != qs_handle)
+ qs_handle_change = true;
+ else if (!mss_change)
+ continue; /* no MSS nor qs handle change */
+ spin_lock_irqsave(&dev->qos[i].lock, flags);
+ qp = i40iw_get_qp(&dev->qos[i].qplist, qp);
+ while (qp) {
+ if (mss_change)
+ i40iw_qp_mss_modify(dev, qp);
+ if (qs_handle_change) {
+ qp->qs_handle = qs_handle;
+ /* issue cqp suspend command */
+ i40iw_qp_suspend_resume(dev, qp, true);
+ }
+ qp = i40iw_get_qp(&dev->qos[i].qplist, qp);
+ }
+ spin_unlock_irqrestore(&dev->qos[i].lock, flags);
+ dev->qos[i].qs_handle = qs_handle;
+ }
+}
+
+/**
+ * i40iw_qp_rem_qos - remove qp from qos lists during destroy qp
+ * @dev: IWARP device pointer
+ * @qp: qp to be removed from qos
+ */
+static void i40iw_qp_rem_qos(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp)
+{
+ unsigned long flags;
+
+ if (!qp->on_qoslist)
+ return;
+ spin_lock_irqsave(&dev->qos[qp->user_pri].lock, flags);
+ list_del(&qp->list);
+ spin_unlock_irqrestore(&dev->qos[qp->user_pri].lock, flags);
+}
+
+/**
+ * i40iw_qp_add_qos - called during setctx fot qp to be added to qos
+ * @dev: IWARP device pointer
+ * @qp: qp to be added to qos
+ */
+void i40iw_qp_add_qos(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&dev->qos[qp->user_pri].lock, flags);
+ qp->qs_handle = dev->qos[qp->user_pri].qs_handle;
+ list_add(&qp->list, &dev->qos[qp->user_pri].qplist);
+ qp->on_qoslist = true;
+ spin_unlock_irqrestore(&dev->qos[qp->user_pri].lock, flags);
+}
+
+/**
* i40iw_sc_pd_init - initialize sc pd struct
* @dev: sc device struct
* @pd: sc pd ptr
@@ -1082,7 +1209,7 @@ static enum i40iw_status_code i40iw_sc_manage_qhash_table_entry(
LS_64(info->dest_ip[2], I40IW_CQPSQ_QHASH_ADDR2) |
LS_64(info->dest_ip[3], I40IW_CQPSQ_QHASH_ADDR3));
}
- qw2 = LS_64(cqp->dev->qs_handle, I40IW_CQPSQ_QHASH_QS_HANDLE);
+ qw2 = LS_64(cqp->dev->qos[info->user_pri].qs_handle, I40IW_CQPSQ_QHASH_QS_HANDLE);
if (info->vlan_valid)
qw2 |= LS_64(info->vlan_id, I40IW_CQPSQ_QHASH_VLANID);
set_64bit_val(wqe, 16, qw2);
@@ -2151,7 +2278,7 @@ static enum i40iw_status_code i40iw_sc_qp_init(struct i40iw_sc_qp *qp,
qp->rq_tph_en = info->rq_tph_en;
qp->rcv_tph_en = info->rcv_tph_en;
qp->xmit_tph_en = info->xmit_tph_en;
- qp->qs_handle = qp->pd->dev->qs_handle;
+ qp->qs_handle = qp->pd->dev->qos[qp->user_pri].qs_handle;
qp->exception_lan_queue = qp->pd->dev->exception_lan_queue;
return 0;
@@ -2296,6 +2423,7 @@ static enum i40iw_status_code i40iw_sc_qp_destroy(
struct i40iw_sc_cqp *cqp;
u64 header;
+ i40iw_qp_rem_qos(qp->pd->dev, qp);
cqp = qp->pd->dev->cqp;
wqe = i40iw_sc_cqp_get_next_send_wqe(cqp, scratch);
if (!wqe)
@@ -2447,6 +2575,12 @@ static enum i40iw_status_code i40iw_sc_qp_setctx(
iw = info->iwarp_info;
tcp = info->tcp_info;
+ if (info->add_to_qoslist) {
+ qp->user_pri = info->user_pri;
+ i40iw_qp_add_qos(qp->pd->dev, qp);
+ i40iw_debug(qp->dev, I40IW_DEBUG_DCB, "%s qp[%d] UP[%d] qset[%d]\n",
+ __func__, qp->qp_uk.qp_id, qp->user_pri, qp->qs_handle);
+ }
qw0 = LS_64(qp->qp_uk.rq_wqe_size, I40IWQPC_RQWQESIZE) |
LS_64(info->err_rq_idx_valid, I40IWQPC_ERR_RQ_IDX_VALID) |
LS_64(qp->rcv_tph_en, I40IWQPC_RCVTPHEN) |
@@ -3959,7 +4093,7 @@ enum i40iw_status_code i40iw_process_cqp_cmd(struct i40iw_sc_dev *dev,
struct cqp_commands_info *pcmdinfo)
{
enum i40iw_status_code status = 0;
- unsigned long flags;
+ unsigned long flags;
spin_lock_irqsave(&dev->cqp_lock, flags);
if (list_empty(&dev->cqp_cmd_head) && !i40iw_ring_full(dev->cqp))
@@ -3978,7 +4112,7 @@ enum i40iw_status_code i40iw_process_bh(struct i40iw_sc_dev *dev)
{
enum i40iw_status_code status = 0;
struct cqp_commands_info *pcmdinfo;
- unsigned long flags;
+ unsigned long flags;
spin_lock_irqsave(&dev->cqp_lock, flags);
while (!list_empty(&dev->cqp_cmd_head) && !i40iw_ring_full(dev->cqp)) {
@@ -4742,6 +4876,7 @@ enum i40iw_status_code i40iw_device_init(struct i40iw_sc_dev *dev,
u16 hmc_fcn = 0;
enum i40iw_status_code ret_code = 0;
u8 db_size;
+ int i;
spin_lock_init(&dev->cqp_lock);
INIT_LIST_HEAD(&dev->cqp_cmd_head); /* for the cqp commands backlog. */
@@ -4757,7 +4892,13 @@ enum i40iw_status_code i40iw_device_init(struct i40iw_sc_dev *dev,
return ret_code;
}
dev->hmc_fn_id = info->hmc_fn_id;
- dev->qs_handle = info->qs_handle;
+ i40iw_fill_qos_list(info->l2params.qs_handle_list);
+ for (i = 0; i < I40IW_MAX_USER_PRIORITY; i++) {
+ dev->qos[i].qs_handle = info->l2params.qs_handle_list[i];
+ i40iw_debug(dev, I40IW_DEBUG_DCB, "qset[%d]: %d\n", i, dev->qos[i].qs_handle);
+ spin_lock_init(&dev->qos[i].lock);
+ INIT_LIST_HEAD(&dev->qos[i].qplist);
+ }
dev->exception_lan_queue = info->exception_lan_queue;
dev->is_pf = info->is_pf;
diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h
index 2fac1db..e184c0e 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_d.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_d.h
@@ -74,6 +74,8 @@
#define RS_32_1(val, bits) (u32)(val >> bits)
#define I40E_HI_DWORD(x) ((u32)((((x) >> 16) >> 16) & 0xFFFFFFFF))
+#define QS_HANDLE_UNKNOWN 0xffff
+
#define LS_64(val, field) (((u64)val << field ## _SHIFT) & (field ## _MASK))
#define RS_64(val, field) ((u64)(val & field ## _MASK) >> field ## _SHIFT)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c b/drivers/infiniband/hw/i40iw/i40iw_hw.c
index 3ee0cad..4a7619f 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_hw.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
@@ -358,6 +358,9 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
continue;
i40iw_cm_disconn(iwqp);
break;
+ case I40IW_AE_QP_SUSPEND_COMPLETE:
+ i40iw_qp_suspend_resume(dev, &iwqp->sc_qp, false);
+ break;
case I40IW_AE_TERMINATE_SENT:
i40iw_terminate_send_fin(qp);
break;
@@ -403,19 +406,18 @@ void i40iw_process_aeq(struct i40iw_device *iwdev)
case I40IW_AE_LCE_CQ_CATASTROPHIC:
case I40IW_AE_UDA_XMIT_DGRAM_TOO_LONG:
case I40IW_AE_UDA_XMIT_IPADDR_MISMATCH:
- case I40IW_AE_QP_SUSPEND_COMPLETE:
ctx_info->err_rq_idx_valid = false;
default:
- if (!info->sq && ctx_info->err_rq_idx_valid) {
- ctx_info->err_rq_idx = info->wqe_idx;
- ctx_info->tcp_info_valid = false;
- ctx_info->iwarp_info_valid = false;
- ret = dev->iw_priv_qp_ops->qp_setctx(&iwqp->sc_qp,
- iwqp->host_ctx.va,
- ctx_info);
- }
- i40iw_terminate_connection(qp, info);
- break;
+ if (!info->sq && ctx_info->err_rq_idx_valid) {
+ ctx_info->err_rq_idx = info->wqe_idx;
+ ctx_info->tcp_info_valid = false;
+ ctx_info->iwarp_info_valid = false;
+ ret = dev->iw_priv_qp_ops->qp_setctx(&iwqp->sc_qp,
+ iwqp->host_ctx.va,
+ ctx_info);
+ }
+ i40iw_terminate_connection(qp, info);
+ break;
}
if (info->qp)
i40iw_rem_ref(&iwqp->ibqp);
@@ -559,6 +561,7 @@ enum i40iw_status_code i40iw_manage_qhash(struct i40iw_device *iwdev,
}
info->ipv4_valid = cminfo->ipv4;
+ info->user_pri = cminfo->user_pri;
ether_addr_copy(info->mac_addr, iwdev->netdev->dev_addr);
info->qp_num = cpu_to_le32(dev->ilq->qp_id);
info->dest_port = cpu_to_le16(cminfo->loc_port);
diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 798335f..6746000 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -939,7 +939,7 @@ static enum i40iw_status_code i40iw_initialize_ilq(struct i40iw_device *iwdev)
info.rq_size = 8192;
info.buf_size = 1024;
info.tx_buf_cnt = 16384;
- info.mss = iwdev->mss;
+ info.mss = iwdev->sc_dev.mss;
info.receive = i40iw_receive_ilq;
info.xmit_complete = i40iw_free_sqbuf;
status = i40iw_puda_create_rsrc(&iwdev->sc_dev, &info);
@@ -967,7 +967,7 @@ static enum i40iw_status_code i40iw_initialize_ieq(struct i40iw_device *iwdev)
info.sq_size = 8192;
info.rq_size = 8192;
info.buf_size = 2048;
- info.mss = iwdev->mss;
+ info.mss = iwdev->sc_dev.mss;
info.tx_buf_cnt = 16384;
status = i40iw_puda_create_rsrc(&iwdev->sc_dev, &info);
if (status)
@@ -1296,6 +1296,9 @@ static enum i40iw_status_code i40iw_initialize_dev(struct i40iw_device *iwdev,
struct i40iw_device_init_info info;
struct i40iw_dma_mem mem;
u32 size;
+ u16 last_qset = I40IW_NO_QSET;
+ u16 qset;
+ u32 i;
memset(&info, 0, sizeof(info));
size = sizeof(struct i40iw_hmc_pble_rsrc) + sizeof(struct i40iw_hmc_info) +
@@ -1325,7 +1328,16 @@ static enum i40iw_status_code i40iw_initialize_dev(struct i40iw_device *iwdev,
info.bar0 = ldev->hw_addr;
info.hw = &iwdev->hw;
info.debug_mask = debug;
- info.qs_handle = ldev->params.qos.prio_qos[0].qs_handle;
+ info.l2params.mss =
+ (ldev->params.mtu) ? ldev->params.mtu - I40IW_MTU_TO_MSS : I40IW_DEFAULT_MSS;
+ for (i = 0; i < I40E_CLIENT_MAX_USER_PRIORITY; i++) {
+ qset = ldev->params.qos.prio_qos[i].qs_handle;
+ info.l2params.qs_handle_list[i] = qset;
+ if (last_qset == I40IW_NO_QSET)
+ last_qset = qset;
+ else if ((qset != last_qset) && (qset != I40IW_NO_QSET))
+ iwdev->dcb = true;
+ }
info.exception_lan_queue = 1;
info.vchnl_send = i40iw_virtchnl_send;
status = i40iw_device_init(&iwdev->sc_dev, &info);
@@ -1417,6 +1429,8 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset, bool del
struct i40iw_sc_dev *dev = &iwdev->sc_dev;
i40iw_pr_info("state = %d\n", iwdev->init_state);
+ if (iwdev->param_wq)
+ destroy_workqueue(iwdev->param_wq);
switch (iwdev->init_state) {
case RDMA_DEV_REGISTERED:
@@ -1628,6 +1642,7 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client)
iwdev->init_state = RDMA_DEV_REGISTERED;
iwdev->iw_status = 1;
i40iw_port_ibevent(iwdev);
+ iwdev->param_wq = create_singlethread_workqueue("l2params");
i40iw_pr_info("i40iw_open completed\n");
return 0;
} while (0);
@@ -1638,25 +1653,58 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client)
}
/**
- * i40iw_l2param_change : handle qs handles for qos and mss change
+ * i40iw_l2params_worker - worker for l2 params change
+ * @work: work pointer for l2 params
+ */
+static void i40iw_l2params_worker(struct work_struct *work)
+{
+ struct l2params_work *dwork =
+ container_of(work, struct l2params_work, work);
+ struct i40iw_device *iwdev = dwork->iwdev;
+
+ i40iw_change_l2params(&iwdev->sc_dev, &dwork->l2params);
+ atomic_dec(&iwdev->params_busy);
+ kfree(work);
+}
+
+/**
+ * i40iw_l2param_change - handle qs handles for qos and mss change
* @ldev: lan device information
* @client: client for paramater change
* @params: new parameters from L2
*/
-static void i40iw_l2param_change(struct i40e_info *ldev,
- struct i40e_client *client,
+static void i40iw_l2param_change(struct i40e_info *ldev, struct i40e_client *client,
struct i40e_params *params)
{
struct i40iw_handler *hdl;
+ struct i40iw_l2params *l2params;
+ struct l2params_work *work;
struct i40iw_device *iwdev;
+ int i;
hdl = i40iw_find_i40e_handler(ldev);
if (!hdl)
return;
iwdev = &hdl->device;
- if (params->mtu)
- iwdev->mss = params->mtu - I40IW_MTU_TO_MSS;
+
+ if (atomic_read(&iwdev->params_busy))
+ return;
+
+
+ work = kzalloc(sizeof(*work), GFP_ATOMIC);
+ if (!work)
+ return;
+
+ atomic_inc(&iwdev->params_busy);
+
+ work->iwdev = iwdev;
+ l2params = &work->l2params;
+ for (i = 0; i < I40E_CLIENT_MAX_USER_PRIORITY; i++)
+ l2params->qs_handle_list[i] = params->qos.prio_qos[i].qs_handle;
+
+ INIT_WORK(&work->work, i40iw_l2params_worker);
+ queue_work(iwdev->param_wq, &work->work);
}
/**
diff --git a/drivers/infiniband/hw/i40iw/i40iw_osdep.h b/drivers/infiniband/hw/i40iw/i40iw_osdep.h
index 80f422b..a6b18cd 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_osdep.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_osdep.h
@@ -198,6 +198,8 @@ enum i40iw_status_code i40iw_cqp_manage_vf_pble_bp(struct i40iw_sc_dev *dev,
void i40iw_cqp_spawn_worker(struct i40iw_sc_dev *dev,
struct i40iw_virtchnl_work_info *work_info, u32 iw_vf_idx);
void *i40iw_remove_head(struct list_head *list);
+void i40iw_qp_suspend_resume(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp, bool suspend);
+void i40iw_qp_mss_modify(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp);
void i40iw_term_modify_qp(struct i40iw_sc_qp *qp, u8 next_state, u8 term, u8 term_len);
void i40iw_terminate_done(struct i40iw_sc_qp *qp, int timeout_occurred);
diff --git a/drivers/infiniband/hw/i40iw/i40iw_p.h b/drivers/infiniband/hw/i40iw/i40iw_p.h
index a0b8ca1..c9e8cb8 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_p.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_p.h
@@ -65,6 +65,8 @@ enum i40iw_status_code i40iw_pf_init_vfhmc(struct i40iw_sc_dev *dev, u8 vf_hmc_f
u32 *vf_cnt_array);
/* cqp misc functions */
+void i40iw_change_l2params(struct i40iw_sc_dev *dev, struct i40iw_l2params *l2params);
+void i40iw_qp_add_qos(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp);
void i40iw_terminate_send_fin(struct i40iw_sc_qp *qp);
diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/hw/i40iw/i40iw_puda.c
index c62d354..7541b0d 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_puda.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c
@@ -608,7 +608,8 @@ static enum i40iw_status_code i40iw_puda_qp_create(struct i40iw_puda_rsrc *rsrc)
ukqp->wqe_alloc_reg = (u32 __iomem *)(i40iw_get_hw_addr(qp->pd->dev) +
I40E_VFPE_WQEALLOC1);
- qp->qs_handle = qp->dev->qs_handle;
+ qp->user_pri = 0;
+ i40iw_qp_add_qos(rsrc->dev, qp);
i40iw_puda_qp_setctx(rsrc);
ret = i40iw_puda_qp_wqe(rsrc);
if (ret)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_type.h b/drivers/infiniband/hw/i40iw/i40iw_type.h
index 2b1a04e..b6f448a 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_type.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_type.h
@@ -397,6 +397,9 @@ struct i40iw_sc_qp {
bool virtual_map;
bool flush_sq;
bool flush_rq;
+ u8 user_pri;
+ struct list_head list;
+ bool on_qoslist;
bool sq_flush;
enum i40iw_flush_opcode flush_code;
enum i40iw_term_eventtypes eventtype;
@@ -424,6 +427,12 @@ struct i40iw_vchnl_vf_msg_buffer {
char parm_buffer[I40IW_VCHNL_MAX_VF_MSG_SIZE - 1];
};
+struct i40iw_qos {
+ struct list_head qplist;
+ spinlock_t lock; /* qos list */
+ u16 qs_handle;
+};
+
struct i40iw_vfdev {
struct i40iw_sc_dev *pf_dev;
u8 *hmc_info_mem;
@@ -482,7 +491,8 @@ struct i40iw_sc_dev {
const struct i40iw_vf_cqp_ops *iw_vf_cqp_ops;
struct i40iw_hmc_fpm_misc hmc_fpm_misc;
- u16 qs_handle;
+ struct i40iw_qos qos[I40IW_MAX_USER_PRIORITY];
+ u16 mss;
u32 debug_mask;
u16 exception_lan_queue;
u8 hmc_fn_id;
@@ -564,7 +574,7 @@ struct i40iw_device_init_info {
struct i40iw_hw *hw;
void __iomem *bar0;
enum i40iw_status_code (*vchnl_send)(struct i40iw_sc_dev *, u32, u8 *, u16);
- u16 qs_handle;
+ struct i40iw_l2params l2params;
u16 exception_lan_queue;
u8 hmc_fn_id;
bool is_pf;
@@ -722,6 +732,8 @@ struct i40iw_qp_host_ctx_info {
bool iwarp_info_valid;
bool err_rq_idx_valid;
u16 err_rq_idx;
+ bool add_to_qoslist;
+ u8 user_pri;
};
struct i40iw_aeqe_info {
@@ -886,7 +898,7 @@ struct i40iw_qhash_table_info {
bool ipv4_valid;
u8 mac_addr[6];
u16 vlan_id;
- u16 qs_handle;
+ u8 user_pri;
u32 qp_num;
u32 dest_ip[4];
u32 src_ip[4];
diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c
index 0e8db0a..218e9fd 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_utils.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c
@@ -709,6 +709,51 @@ enum i40iw_status_code i40iw_cqp_sds_cmd(struct i40iw_sc_dev *dev,
}
/**
+ * i40iw_qp_suspend_resume - cqp command for suspend/resume
+ * @dev: hardware control device structure
+ * @qp: hardware control qp
+ * @suspend: flag if suspend or resume
+ */
+void i40iw_qp_suspend_resume(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp, bool suspend)
+{
+ struct i40iw_device *iwdev = (struct i40iw_device *)dev->back_dev;
+ struct i40iw_cqp_request *cqp_request;
+ struct i40iw_sc_cqp *cqp = dev->cqp;
+ struct cqp_commands_info *cqp_info;
+ enum i40iw_status_code status;
+
+ cqp_request = i40iw_get_cqp_request(&iwdev->cqp, false);
+ if (!cqp_request)
+ return;
+
+ cqp_info = &cqp_request->info;
+ cqp_info->cqp_cmd = (suspend) ? OP_SUSPEND : OP_RESUME;
+ cqp_info->in.u.suspend_resume.cqp = cqp;
+ cqp_info->in.u.suspend_resume.qp = qp;
+ cqp_info->in.u.suspend_resume.scratch = (uintptr_t)cqp_request;
+ status = i40iw_handle_cqp_op(iwdev, cqp_request);
+ if (status)
+ i40iw_pr_err("CQP-OP QP Suspend/Resume fail");
+}
+
+/**
+ * i40iw_qp_mss_modify - modify mss for qp
+ * @dev: hardware control device structure
+ * @qp: hardware control qp
+ */
+void i40iw_qp_mss_modify(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp)
+{
+ struct i40iw_device *iwdev = (struct i40iw_device *)dev->back_dev;
+ struct i40iw_qp *iwqp = (struct i40iw_qp *)qp->back_qp;
+ struct i40iw_modify_qp_info info;
+
+ memset(&info, 0, sizeof(info));
+ info.mss_change = true;
+ info.new_mss = dev->mss;
+ i40iw_hw_modify_qp(iwdev, iwqp, &info, false);
+}
+
+/**
* i40iw_term_modify_qp - modify qp for term message
* @qp: hardware control qp
* @next_state: qp's next state
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index 2360338..423edad 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -254,7 +254,6 @@ static void i40iw_alloc_push_page(struct i40iw_device *iwdev, struct i40iw_sc_qp
{
struct i40iw_cqp_request *cqp_request;
struct cqp_commands_info *cqp_info;
- struct i40iw_sc_dev *dev = &iwdev->sc_dev;
enum i40iw_status_code status;
if (qp->push_idx != I40IW_INVALID_PUSH_PAGE_INDEX)
@@ -270,7 +269,7 @@ static void i40iw_alloc_push_page(struct i40iw_device *iwdev, struct i40iw_sc_qp
cqp_info->cqp_cmd = OP_MANAGE_PUSH_PAGE;
cqp_info->post_sq = 1;
- cqp_info->in.u.manage_push_page.info.qs_handle = dev->qs_handle;
+ cqp_info->in.u.manage_push_page.info.qs_handle = qp->qs_handle;
cqp_info->in.u.manage_push_page.info.free_page = 0;
cqp_info->in.u.manage_push_page.cqp = &iwdev->cqp.sc_cqp;
cqp_info->in.u.manage_push_page.scratch = (uintptr_t)cqp_request;
@@ -292,7 +291,6 @@ static void i40iw_dealloc_push_page(struct i40iw_device *iwdev, struct i40iw_sc_
{
struct i40iw_cqp_request *cqp_request;
struct cqp_commands_info *cqp_info;
- struct i40iw_sc_dev *dev = &iwdev->sc_dev;
enum i40iw_status_code status;
if (qp->push_idx == I40IW_INVALID_PUSH_PAGE_INDEX)
@@ -307,7 +305,7 @@ static void i40iw_dealloc_push_page(struct i40iw_device *iwdev, struct i40iw_sc_
cqp_info->post_sq = 1;
cqp_info->in.u.manage_push_page.info.push_idx = qp->push_idx;
- cqp_info->in.u.manage_push_page.info.qs_handle = dev->qs_handle;
+ cqp_info->in.u.manage_push_page.info.qs_handle = qp->qs_handle;
cqp_info->in.u.manage_push_page.info.free_page = 1;
cqp_info->in.u.manage_push_page.cqp = &iwdev->cqp.sc_cqp;
cqp_info->in.u.manage_push_page.scratch = (uintptr_t)cqp_request;
--
2.8.3
--
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
^ permalink raw reply related
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Bart Van Assche @ 2016-10-07 20:51 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <20161007190224.GB27537-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
On 10/07/2016 12:02 PM, Jason Gunthorpe wrote:
> On Fri, Oct 07, 2016 at 11:37:43AM -0700, Bart Van Assche wrote:
>> Hello Doug, Jason and Moni,
>>
>> These five patches is what I came up with after having had a look at the
>> rxe_cfg source code. It would be appreciated if these patches would be
>> considered for inclusion in the rdma-core repository. The filenames of these
>> patches are:
>
> Thanks Bart, it would be best in Moni looks at these when he returns,
> but nothing seemed off to my uneducated eye.
>
> While you are looking at this could you also look at the use of
> /var/rxe in that script?
>
> That is not a FHS path, so it needs to be something else, and the
> script should probably pass through substitution to pick up the right
> path, whatever that is.. Based on the name sounds like /var/cache or
> /var/lib ?
Hello Jason,
Do you think the names of the network interfaces to which the rdma_rxe
driver should bind should be stored in a separate file? To me this looks
like a suboptimal approach. Shouldn't we drop the /var/rxe/rxe file
completely and add a new boolean to the files in which other network
interface parameters are already stored, e.g.
/etc/NetworkManager/system-connections/* ?
Thanks,
Bart.
--
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
^ permalink raw reply
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Jason Gunthorpe @ 2016-10-07 21:00 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <c1901fd9-3620-50ec-0db3-9b271fd1e90b-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
On Fri, Oct 07, 2016 at 01:51:59PM -0700, Bart Van Assche wrote:
> Do you think the names of the network interfaces to which the rdma_rxe
> driver should bind should be stored in a separate file? To me this looks
> like a suboptimal approach. Shouldn't we drop the /var/rxe/rxe file
> completely and add a new boolean to the files in which other network
> interface parameters are already stored, e.g.
> /etc/NetworkManager/system-connections/* ?
I honestly don't know much about how rxe works, I was just looking
at the bogus path.
In today's world this should probably be handled by adding systemd unit
files to set up rxe.. ??
Something with network manager also seems to make some kind of sense
on the surface.
Jason
--
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
^ permalink raw reply
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Parav Pandit @ 2016-10-07 21:42 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: Bart Van Assche, Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <20161007210038.GA9810-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Hi Jason, Bart,
On Sat, Oct 8, 2016 at 2:30 AM, Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> On Fri, Oct 07, 2016 at 01:51:59PM -0700, Bart Van Assche wrote:
>
>> Do you think the names of the network interfaces to which the rdma_rxe
>> driver should bind should be stored in a separate file? To me this looks
>> like a suboptimal approach. Shouldn't we drop the /var/rxe/rxe file
>> completely and add a new boolean to the files in which other network
>> interface parameters are already stored, e.g.
>> /etc/NetworkManager/system-connections/* ?
>
> I honestly don't know much about how rxe works, I was just looking
> at the bogus path.
>
> In today's world this should probably be handled by adding systemd unit
> files to set up rxe.. ??
>
> Something with network manager also seems to make some kind of sense
> on the surface.
>
Instead of relying on user land to do configuration of different OS
flavors, I am considering to auto create rxe interfaces via netdev
notifier for all the network interfaces which gets newly added.
May be through some sort of attach()/detach() ops().
netdev driver will have choice to reject/accept such calls. So that
mlx4_ib is already loaded, it can reject his call from rdma_rxe.
Since the ratio of netdev devices which support RDMA to devices which
doesn't support RDMA is much large, I do not intent to add _ops() to
netdev but rather to have API through which this can be done.
Need to think little more to comeup with RFC.
Other than dev envionrments its unlikely that users want to play with
PMTU configuration. So I was thinking to do do least amount of
configuration using rxe_cfg going forward.
> Jason
> --
> 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
--
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
^ permalink raw reply
* [PULL REQUEST] Please pull rdma.git (tag for-linus-2)
From: Doug Ledford @ 2016-10-07 22:06 UTC (permalink / raw)
To: Torvalds, Linus, linux-rdma
[-- Attachment #1.1: Type: text/plain, Size: 2940 bytes --]
Hi Linus,
I have two separate pull requests for you today. I'll do the simple one
first.
I had originally intended to include the rxe update patches in my main
pull request. However, on merge tests, there were conflicts against
your tree. It was because I had forgotten that there were late rxe
driver changes in 4.8, so like the hfi1 driver, those patches needed to
be against a late 4.8-rc kernel in order to apply cleanly. As a result,
I was forced to make a new 4.9 branch, remove the rxe patches, then
replace the rxe patches onto the for-4.9-hfi1 branch that you already
pulled. So this first pull request is just a few rxe specific patches
tacked onto that branch. The incremental pull looks like this:
The following changes since commit 61347fa6087884305ea4a3a04501839fdb68dc76:
IB/rdmavt: Trivial function comment corrected. (2016-10-03 10:55:27 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
tags/for-linus-2
for you to fetch changes up to e404f945a6101a6f0f2a29aade6dc32015471daa:
IB/rxe: improved debug prints & code cleanup (2016-10-06 13:50:04 -0400)
----------------------------------------------------------------
Minor updates for rxe driver
----------------------------------------------------------------
Parav Pandit (5):
IB/rxe: Avoid scheduling tasklet for userspace QP
IB/rxe: Fix sending out loopback packet on netdev interface.
IB/{rxe,core,rdmavt}: Fix kernel crash for reg MR
IB/rxe: Properly honor max IRD value for rd/atomic.
IB/rxe: improved debug prints & code cleanup
Stephen Bates (1):
rdma_rxe: Ensure rdma_rxe init occurs at correct time
drivers/infiniband/sw/rdmavt/dma.c | 17 +++++++++++
drivers/infiniband/sw/rxe/rxe.c | 36 +++++------------------
drivers/infiniband/sw/rxe/rxe.h | 5 ++++
drivers/infiniband/sw/rxe/rxe_av.c | 4 +--
drivers/infiniband/sw/rxe/rxe_comp.c | 6 ++--
drivers/infiniband/sw/rxe/rxe_dma.c | 17 +++++++++++
drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
drivers/infiniband/sw/rxe/rxe_mmap.c | 2 +-
drivers/infiniband/sw/rxe/rxe_mr.c | 2 +-
drivers/infiniband/sw/rxe/rxe_net.c | 51 ++++++++++++++++++++++----------
drivers/infiniband/sw/rxe/rxe_net.h | 3 +-
drivers/infiniband/sw/rxe/rxe_qp.c | 55
+++++++++++++++++++----------------
drivers/infiniband/sw/rxe/rxe_recv.c | 3 +-
drivers/infiniband/sw/rxe/rxe_req.c | 19 ++++++------
drivers/infiniband/sw/rxe/rxe_resp.c | 27 +++++++++++------
drivers/infiniband/sw/rxe/rxe_sysfs.c | 12 ++++----
drivers/infiniband/sw/rxe/rxe_verbs.c | 50 +++++++++++++++++++------------
include/rdma/ib_verbs.h | 23 +++++++++++++--
18 files changed, 210 insertions(+), 124 deletions(-)
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Jason Gunthorpe @ 2016-10-07 22:07 UTC (permalink / raw)
To: Parav Pandit; +Cc: Bart Van Assche, Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <CAG53R5XMwgs6rj9cMnniHk8xvYqk9zxOv1Nuhog3CJfNCpmDFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, Oct 08, 2016 at 03:12:45AM +0530, Parav Pandit wrote:
> Instead of relying on user land to do configuration of different OS
> flavors, I am considering to auto create rxe interfaces via netdev
> notifier for all the network interfaces which gets newly added.
Interesting, my concern is that rxe seems to currently be buggy and
inadvertently enabling rxe on any non-dev systems at this time is
probably insane from a security perspective :\
Jason
--
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
^ permalink raw reply
* Re: [PATCH 0/5 for rdma-core] Five rxe_cfg patches
From: Parav Pandit @ 2016-10-07 22:14 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: Bart Van Assche, Doug Ledford, Moni Shoua, linux-rdma
In-Reply-To: <20161007220736.GB9810-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
On Sat, Oct 8, 2016 at 3:37 AM, Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> On Sat, Oct 08, 2016 at 03:12:45AM +0530, Parav Pandit wrote:
>
>> Instead of relying on user land to do configuration of different OS
>> flavors, I am considering to auto create rxe interfaces via netdev
>> notifier for all the network interfaces which gets newly added.
>
> Interesting, my concern is that rxe seems to currently be buggy and
> inadvertently enabling rxe on any non-dev systems at this time is
> probably insane from a security perspective :\
>
Sure. Yes. I agree. Once its stable I can take this up.
However if rdma_rxe is not loaded, its should be fine.
> Jason
--
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
^ permalink raw reply
* [PULL REQUEST] Please pull rdma.git (tag for-linus)
From: Doug Ledford @ 2016-10-07 22:24 UTC (permalink / raw)
To: Torvalds, Linus, linux-rdma
[-- Attachment #1.1: Type: text/plain, Size: 21729 bytes --]
Hi Linus,
This is the second pull request and it is the main pull request for the
rdma stack this release. The pull request looks larger than it will end
up being when you take it. At the early stage of 4.9 development,
Mellanox submitted 30 patches to both DaveM's tree and mine, and we both
pulled them from Leon's tree so we had identical git hashes and the
patches will simply fall away when you pull from my tree since you've
already pulled DaveM's tree. But, my git request-pull macro can't
separate that out, so they show up in the pull request but won't make it
through the final merge.
There are three conflicts in this merge (that don't automatically resolve):
1) cxgb4 - keep the head version in your tree, my tree and the common
ancestor were prior to a refactoring in your tree that moved uld_attach
from cxgb4_main.c to cxgb4_uld.c
2) mlx4 - Keep both additions in fw.c, and pick one addition to be 36
and one to be 37 in device.h (which is which is not important). I asked
Leon why this happened since we've done really well lately at avoiding
all Mellanox conflicts like this, and his response is that two patches
were submitted during the last rc cycles and Mellanox had expected one
to go into for-next and the other to go into -rc (one went to Dave and
one to me). Instead, we swapped and the one they thought would go into
-rc went into -next and vice versa. That overlooked that when
submitting their 4.9 patches, and it resulted in this oversight.
Aside from these issues, the merge should be clean. The code has been
through 0day and I had it tagged for linux-next testing for a couple
days, but the changes to pull the rxe patches out and move them mean
that whatever linux-next testing had been done is no longer completely
valid. I've done manual merge testing to compensate.
Here's the boilerplate (with the 30 extra commit messages and the
diffstat from those commits):
The following changes since commit c1346a7e70b5be7f01cc1f64a7e3aefb80d48ad7:
Revert "l2tp: Refactor the codes with existing macros instead of
literal number" (2016-08-21 15:50:11 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
tags/for-linus
for you to fetch changes up to 2937f375751922ffce9ef1d5fa84491840b0c8e0:
staging/lustre: Disable InfiniBand support (2016-10-07 16:54:41 -0400)
----------------------------------------------------------------
Merge of primary rdma-core code for 4.9
- Updates to mlx5
- Updates to mlx4 (two conflicts, both minor and easily resolved)
- Updates to iw_cxgb4 (one conflict, not so obvious to resolve, proper
resolution is to keep the code in cxgb4_main.c as it is in Linus'
tree as attach_uld was refactored and moved into cxgb4_uld.c)
- Improvements to uAPI (moved vendor specific API elements to uAPI area)
- Add hns-roce driver and hns and hns-roce ACPI reset support
- Conversion of all rdma code away from deprecated
create_singlethread_workqueue
- Security improvement: remove unsafe ib_get_dma_mr (breaks lustre in
staging)
----------------------------------------------------------------
Alex Vesker (3):
net/mlx5: Modify RQ bitmask from mlx5 ifc
IB/mlx5: Refactor raw packet QP modify function
IB/mlx5: Add port counter support for raw packet QP
Artemy Kovalyov (1):
net/mlx5: Update struct mlx5_ifc_xrqc_bits
Aviv Heller (14):
net/mlx5: Add HW interfaces used by LAG
net/mlx5: Implement RoCE LAG feature
net/mlx5: Get RoCE netdev
net/mlx5e: Avoid port remapping of mlx5e netdev TISes
net/mlx5: LAG and SRIOV cannot be used together
net/mlx5: LAG demux flow table support
net/mlx5: Add LAG flow steering namespace
net/mlx5: Vport LAG creation support
net/mlx5: Configure IB devices according to LAG state
IB/mlx5: Port events in RoCE now rely on netdev events
IB/mlx5: Merge vports flow steering during LAG
IB/mlx5: Port status track LAG master, when LAG is active
IB/mlx5: Set unique device name on LAG
IB/mlx5: LAG QP load balancing
Bart Van Assche (3):
IB/core: Improve ib_map_mr_sg() documentation
IB/srp: Remove an unused argument
IB/srp: Fix infinite loop when FMR sg[0].offset != 0
Bhaktipriya Shridhar (22):
IB/sa : Remove deprecated create_singlethread_workqueue
IB/mad: Remove deprecated create_singlethread_workqueue
IB/multicast: Remove deprecated create_singlethread_workqueue
IB/ucma: Remove deprecated create_singlethread_workqueue
IB/cma: Remove deprecated create_singlethread_workqueue
IB/addr: Remove deprecated create_singlethread_workqueue
IB/iwcm: Remove deprecated create_singlethread_workqueue
iw_cxgb3: Remove deprecated create_singlethread_workqueue
IB/qib: Remove deprecated create_singlethread_workqueue
iw_cxgb4: Remove deprecated create_singlethread_workqueue
IB/mthca: Remove deprecated create_singlethread_workqueue
i40iw_main: Remove deprecated create_singlethread_workqueue
i40iw_cm: Remove deprecated create_singlethread_workqueue
IB/mlx5: Remove deprecated create_singlethread_workqueue
IB/mlx5/odp: Remove deprecated create_singlethread_workqueue
IB/mlx4: Remove deprecated create_singlethread_workqueue
IB/mlx4/mad: Remove deprecated create_singlethread_workqueue
IB/mlx4/mcg: Remove deprecated create_singlethread_workqueue
IB/nes: Remove deprecated create_singlethread_workqueue
IB/ipoib: Remove deprecated create_singlethread_workqueue
IB/ipoib_verbs: Remove deprecated create_singlethread_workqueue
IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue
Christoph Hellwig (6):
IB/core: rename pd->local_mr to pd->__internal_mr
IB/core: add support to create a unsafe global rkey to ib_create_pd
IB/iser: use IB_PD_UNSAFE_GLOBAL_RKEY
IB/srp: use IB_PD_UNSAFE_GLOBAL_RKEY
nvme-rdma: use IB_PD_UNSAFE_GLOBAL_RKEY
IB/core: remove ib_get_dma_mr
Doug Ledford (5):
Merge tag 'shared-for-4.9-1' of
git://git.kernel.org/.../leon/linux-rdma into mlx5-shared
Merge tag 'shared-for-4.9-2' of
git://git.kernel.org/.../leon/linux-rdma into mlx5-shared
Merge branch 'mlx5-shared' into k.o/for-4.9
Merge branch 'hns-roce' into k.o/for-4.9
staging/lustre: Disable InfiniBand support
Hadar Hen Zion (2):
net/mlx5: Enable setting minimum inline header mode for VFs
net/mlx5: Update mlx5_ifc.h for vxlan encap/decap
Ilya Lesokhin (1):
net/mlx5: Introduce alloc_encap and dealloc_encap commands
Jack Morgenstein (1):
IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1
packets
Leon Romanovsky (7):
IB/mlx5: Move and decouple user vendor structures
IB/cxgb3: Move user vendor structures
IB/cxgb4: Move user vendor structures
IB/mlx4: Move user vendor structures
IB/ocrdma: Move user vendor structures
IB/nes: Move user vendor structures
IB/mthca: Move user vendor structures
Maor Gottlieb (14):
net/mlx5: Introduce sniffer steering hardware capabilities
net/mlx5: Add sniffer namespaces
IB/mlx5: Fix steering resource leak
IB/mlx5: Save flow table priority handler instead of index
IB/mlx5: Fix coverity warning
IB/mlx5: Increase flow table reference count in create rule
IB/mlx5: Add sniffer support to steering
IB/mlx4: Add validation to flow specifications parsing
IB/mlx5: Add validation to flow specifications parsing
IB/uverbs: Add support to extend flow steering specifications
IB/uverbs: Add more fields to IPv4 flow specification
IB/core: Add more fields to IPv6 flow specification
IB/mlx5: Add support in TOS and protocol to flow steering
IB/mlx5: Add support of more IPv6 fields to flow steering
Noa Osherovich (2):
net/mlx5: Expose mlx5e_link_mode
net/mlx5: Separate query_port_proto_oper for IB and EN
Saeed Mahameed (12):
net/mlx5: Init/Teardown hca commands via mlx5 ifc
net/mlx5: Access register and MAD IFC commands via mlx5 ifc
net/mlx5: PD and UAR commands via mlx5 ifc
net/mlx5: MCG commands via mlx5 ifc
net/mlx5: Pages management commands via mlx5 ifc
net/mlx5: EQ commands via mlx5 ifc
{net,IB}/mlx5: CQ commands via mlx5 ifc
{net,IB}/mlx5: MKey/PSV commands via mlx5 ifc
{net,IB}/mlx5: QP/XRCD commands via mlx5 ifc
{net,IB}/mlx5: Modify QP commands via mlx5 ifc
net/mlx5: Unify and improve command interface
net/mlx5: Improve driver log messages
Salil (2):
net: hns: Add support of ACPI to HNS driver RoCE Reset function
IB/hns: Add support of ACPI to the Hisilicon RoCE driver
Steve Wise (3):
IB/core: correctly handle rdma_rw_init_mrs() failure
cxgb4: advertise support for FR_NSMR_TPTE_WR
iw_cxgb4: add fast-path for small REG_MR operations
Wei Yongjun (1):
IB/hns: Fix return value check in hns_roce_get_cfg()
Yishai Hadas (4):
IB/core: Expose RSS related capabilities
IB/uverbs: Expose RSS related capabilities
IB/mlx5: Expose RSS related capabilities
IB/mlx5: Track asynchronous events on a receive work queue
Yuval Shaia (1):
IB/{core,hw}: Add constant for node_desc
kernel-6AxghH7DbtA@public.gmane.org (1):
ipoib: Make ipoib_warn ratelimited
oulijun (4):
devicetree: bindings: IB: Add binding document for Hisilicon RoCE
IB/hns: Add driver files for hns RoCE driver
IB/hns: Kconfig and Makefile for RoCE module
MAINTAINERS: Add maintainers for Hisilicon RoCE driver
.../bindings/infiniband/hisilicon-hns-roce.txt | 107 +
MAINTAINERS | 14 +
drivers/infiniband/Kconfig | 1 +
drivers/infiniband/core/addr.c | 2 +-
drivers/infiniband/core/cma.c | 2 +-
drivers/infiniband/core/iwcm.c | 2 +-
drivers/infiniband/core/mad.c | 4 +-
drivers/infiniband/core/multicast.c | 2 +-
drivers/infiniband/core/sa_query.c | 2 +-
drivers/infiniband/core/sysfs.c | 2 +-
drivers/infiniband/core/ucma.c | 3 +-
drivers/infiniband/core/uverbs_cmd.c | 121 +-
drivers/infiniband/core/verbs.c | 77 +-
drivers/infiniband/hw/Makefile | 1 +
drivers/infiniband/hw/cxgb3/iwch.c | 2 +-
drivers/infiniband/hw/cxgb3/iwch_cm.c | 2 +-
drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +-
drivers/infiniband/hw/cxgb4/cm.c | 2 +-
drivers/infiniband/hw/cxgb4/cq.c | 17 +
drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +-
drivers/infiniband/hw/cxgb4/mem.c | 2 +-
drivers/infiniband/hw/cxgb4/provider.c | 1 +
drivers/infiniband/hw/cxgb4/qp.c | 67 +-
drivers/infiniband/hw/cxgb4/t4.h | 4 +-
drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 12 +
drivers/infiniband/hw/hfi1/verbs.c | 3 +-
drivers/infiniband/hw/hns/Kconfig | 10 +
drivers/infiniband/hw/hns/Makefile | 8 +
drivers/infiniband/hw/hns/hns_roce_ah.c | 128 +
drivers/infiniband/hw/hns/hns_roce_alloc.c | 257 ++
drivers/infiniband/hw/hns/hns_roce_cmd.c | 368 +++
drivers/infiniband/hw/hns/hns_roce_cmd.h | 80 +
drivers/infiniband/hw/hns/hns_roce_common.h | 325 +++
drivers/infiniband/hw/hns/hns_roce_cq.c | 446 ++++
drivers/infiniband/hw/hns/hns_roce_device.h | 734 +++++
drivers/infiniband/hw/hns/hns_roce_eq.c | 762 ++++++
drivers/infiniband/hw/hns/hns_roce_eq.h | 130 +
drivers/infiniband/hw/hns/hns_roce_hem.c | 476 ++++
drivers/infiniband/hw/hns/hns_roce_hem.h | 131 +
drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2800
++++++++++++++++++++
drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 981 +++++++
drivers/infiniband/hw/hns/hns_roce_main.c | 1142 ++++++++
drivers/infiniband/hw/hns/hns_roce_mr.c | 614 +++++
drivers/infiniband/hw/hns/hns_roce_pd.c | 144 +
drivers/infiniband/hw/hns/hns_roce_qp.c | 855 ++++++
drivers/infiniband/hw/hns/hns_roce_user.h | 53 +
drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +-
drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +-
drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +-
drivers/infiniband/hw/mlx4/cq.c | 2 +-
drivers/infiniband/hw/mlx4/mad.c | 73 +-
drivers/infiniband/hw/mlx4/main.c | 147 +-
drivers/infiniband/hw/mlx4/mcg.c | 4 +-
drivers/infiniband/hw/mlx4/mlx4_ib.h | 7 +
drivers/infiniband/hw/mlx4/qp.c | 25 +-
drivers/infiniband/hw/mlx4/srq.c | 2 +-
drivers/infiniband/hw/mlx5/cq.c | 111 +-
drivers/infiniband/hw/mlx5/mad.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 404 ++-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 52 +-
drivers/infiniband/hw/mlx5/mr.c | 187 +-
drivers/infiniband/hw/mlx5/odp.c | 4 +-
drivers/infiniband/hw/mlx5/qp.c | 347 ++-
drivers/infiniband/hw/mlx5/srq.c | 1 -
drivers/infiniband/hw/mthca/mthca_catas.c | 2 +-
drivers/infiniband/hw/mthca/mthca_mad.c | 3 +-
drivers/infiniband/hw/mthca/mthca_provider.c | 7 +-
drivers/infiniband/hw/nes/nes.h | 2 +-
drivers/infiniband/hw/nes/nes_cm.c | 4 +-
drivers/infiniband/hw/ocrdma/ocrdma_main.c | 3 +-
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +-
drivers/infiniband/hw/qib/qib_init.c | 4 +-
drivers/infiniband/hw/qib/qib_verbs.c | 3 +-
drivers/infiniband/ulp/ipoib/ipoib.h | 8 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +-
drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 4 +-
drivers/infiniband/ulp/iser/iscsi_iser.h | 1 -
drivers/infiniband/ulp/iser/iser_memory.c | 6 +-
drivers/infiniband/ulp/iser/iser_verbs.c | 22 +-
drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
drivers/infiniband/ulp/srp/ib_srp.c | 56 +-
drivers/infiniband/ulp/srp/ib_srp.h | 3 +-
drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 +
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 +
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 +
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 17 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 47 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 9 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 53 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.h | 3 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 4 +-
drivers/net/ethernet/mellanox/mlx4/fw.c | 13 +-
drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 273 +-
drivers/net/ethernet/mellanox/mlx5/core/cq.c | 109 +-
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 50 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 34 -
.../net/ethernet/mellanox/mlx5/core/en_common.c | 23 +-
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 55 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 80 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 98 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 232 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 8 +
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 118 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 10 +
drivers/net/ethernet/mellanox/mlx5/core/fw.c | 43 +-
drivers/net/ethernet/mellanox/mlx5/core/lag.c | 602 +++++
drivers/net/ethernet/mellanox/mlx5/core/mad.c | 41 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 145 +-
drivers/net/ethernet/mellanox/mlx5/core/mcg.c | 72 +-
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 44 +-
drivers/net/ethernet/mellanox/mlx5/core/mr.c | 189 +-
.../net/ethernet/mellanox/mlx5/core/pagealloc.c | 156 +-
drivers/net/ethernet/mellanox/mlx5/core/pd.c | 61 +-
drivers/net/ethernet/mellanox/mlx5/core/port.c | 181 +-
drivers/net/ethernet/mellanox/mlx5/core/qp.c | 299 ++-
drivers/net/ethernet/mellanox/mlx5/core/rl.c | 11 +-
drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 19 +-
drivers/net/ethernet/mellanox/mlx5/core/srq.c | 49 +-
drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 183 +-
drivers/net/ethernet/mellanox/mlx5/core/uar.c | 67 +-
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 94 +-
drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 29 +-
drivers/nvme/host/rdma.c | 25 +-
drivers/nvme/target/rdma.c | 2 +-
drivers/staging/lustre/lnet/Kconfig | 1 +
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +-
include/linux/mlx4/device.h | 13 +-
include/linux/mlx5/cq.h | 6 +-
include/linux/mlx5/device.h | 441 +--
include/linux/mlx5/driver.h | 31 +-
include/linux/mlx5/fs.h | 6 +
include/linux/mlx5/mlx5_ifc.h | 297 ++-
include/linux/mlx5/port.h | 40 +-
include/linux/mlx5/qp.h | 128 +-
include/linux/mlx5/vport.h | 2 +
include/rdma/ib_verbs.h | 81 +-
include/uapi/rdma/Kbuild | 7 +
.../iwch_user.h => include/uapi/rdma/cxgb3-abi.h | 8 +-
.../cxgb4/user.h => include/uapi/rdma/cxgb4-abi.h | 11 +-
include/uapi/rdma/ib_user_verbs.h | 27 +-
.../hw/mlx4/user.h => include/uapi/rdma/mlx4-abi.h | 6 +-
.../hw/mlx5/user.h => include/uapi/rdma/mlx5-abi.h | 52 +-
include/uapi/rdma/mthca-abi.h | 111 +
.../nes/nes_user.h => include/uapi/rdma/nes-abi.h | 6 +-
.../ocrdma_abi.h => include/uapi/rdma/ocrdma-abi.h | 138 +-
net/9p/trans_rdma.c | 2 +-
net/rds/ib.c | 2 +-
net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +-
net/sunrpc/xprtrdma/verbs.c | 2 +-
154 files changed, 14583 insertions(+), 2824 deletions(-)
create mode 100644
Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt
create mode 100644 drivers/infiniband/hw/hns/Kconfig
create mode 100644 drivers/infiniband/hw/hns/Makefile
create mode 100644 drivers/infiniband/hw/hns/hns_roce_ah.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_alloc.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_cmd.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_cmd.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_common.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_cq.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_device.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_eq.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_eq.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_hem.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_hem.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_hw_v1.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_hw_v1.h
create mode 100644 drivers/infiniband/hw/hns/hns_roce_main.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_mr.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_pd.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_qp.c
create mode 100644 drivers/infiniband/hw/hns/hns_roce_user.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lag.c
rename drivers/infiniband/hw/cxgb3/iwch_user.h =>
include/uapi/rdma/cxgb3-abi.h (95%)
rename drivers/infiniband/hw/cxgb4/user.h =>
include/uapi/rdma/cxgb4-abi.h (94%)
rename drivers/infiniband/hw/mlx4/user.h =>
include/uapi/rdma/mlx4-abi.h (97%)
rename drivers/infiniband/hw/mlx5/user.h =>
include/uapi/rdma/mlx5-abi.h (83%)
create mode 100644 include/uapi/rdma/mthca-abi.h
rename drivers/infiniband/hw/nes/nes_user.h =>
include/uapi/rdma/nes-abi.h (97%)
rename drivers/infiniband/hw/ocrdma/ocrdma_abi.h =>
include/uapi/rdma/ocrdma-abi.h (64%)
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply
* [PATCH rdma-core 0/5] clang support
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
This series gets clang running warning free and has travis run the build
through clang-3.9 so we don't break it again.
Jason Gunthorpe (5):
Pull uninitialized_var into util/compiler.h
ibacm: Avoid clang 3.8 warning -Wmissing-field-initializers
mthca: Avoid bogus gcc 4.8 warning -Wmaybe-uninitialized
Improve linker flag detection to work with clang and -Werror
Update TravisCI to use clang 3.9 as well
.travis.yml | 20 +++++++++++++++++---
CMakeLists.txt | 22 ++++++++++++++--------
buildlib/FindLDSymVer.cmake | 16 ++++++++++++----
buildlib/RDMA_EnableCStd.cmake | 25 +++++++++++++++++++++++++
ibacm/prov/acmp/src/acmp.c | 2 +-
providers/cxgb4/cq.c | 1 +
providers/cxgb4/libcxgb4.h | 2 --
providers/cxgb4/qp.c | 1 +
providers/mlx4/mlx4.h | 4 ----
providers/mlx4/qp.c | 1 +
providers/mlx5/mlx5.h | 4 ----
providers/mlx5/qp.c | 1 +
providers/mthca/qp.c | 23 +++++------------------
util/CMakeLists.txt | 3 +++
util/compiler.h | 18 ++++++++++++++++++
15 files changed, 99 insertions(+), 44 deletions(-)
create mode 100644 util/CMakeLists.txt
create mode 100644 util/compiler.h
--
2.1.4
--
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
^ permalink raw reply
* [PATCH rdma-core 1/5] Pull uninitialized_var into util/compiler.h
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475879772-29458-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
The new common definition turns it off for new compilers since
it is not needed and is too easy to abuse.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
CMakeLists.txt | 1 +
providers/cxgb4/cq.c | 1 +
providers/cxgb4/libcxgb4.h | 2 --
providers/cxgb4/qp.c | 1 +
providers/mlx4/mlx4.h | 4 ----
providers/mlx4/qp.c | 1 +
providers/mlx5/mlx5.h | 4 ----
providers/mlx5/qp.c | 1 +
util/CMakeLists.txt | 3 +++
util/compiler.h | 18 ++++++++++++++++++
10 files changed, 26 insertions(+), 10 deletions(-)
create mode 100644 util/CMakeLists.txt
create mode 100644 util/compiler.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0864da660fc..1611e90d7933 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -253,6 +253,7 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
#-------------------------
# Sub-directories
add_subdirectory(ccan)
+add_subdirectory(util)
# Libraries
add_subdirectory(libibumad)
add_subdirectory(libibumad/man)
diff --git a/providers/cxgb4/cq.c b/providers/cxgb4/cq.c
index 1ed7dfdb88d4..5f662ac49d0c 100644
--- a/providers/cxgb4/cq.c
+++ b/providers/cxgb4/cq.c
@@ -37,6 +37,7 @@
#include <sys/errno.h>
#include <netinet/in.h>
#include <infiniband/opcode.h>
+#include <util/compiler.h>
#include "libcxgb4.h"
#include "cxgb4-abi.h"
diff --git a/providers/cxgb4/libcxgb4.h b/providers/cxgb4/libcxgb4.h
index 4c8383209287..9a4bc98f34e9 100644
--- a/providers/cxgb4/libcxgb4.h
+++ b/providers/cxgb4/libcxgb4.h
@@ -264,6 +264,4 @@ void dump_state();
extern int stall_to;
#endif
-#define uninitialized_var(x) x = x
-
#endif /* IWCH_H */
diff --git a/providers/cxgb4/qp.c b/providers/cxgb4/qp.c
index 384bf11369ac..95b459a1a9b4 100644
--- a/providers/cxgb4/qp.c
+++ b/providers/cxgb4/qp.c
@@ -37,6 +37,7 @@
#include <string.h>
#include <stdio.h>
#include <netinet/in.h>
+#include <util/compiler.h>
#include "libcxgb4.h"
#ifdef STATS
diff --git a/providers/mlx4/mlx4.h b/providers/mlx4/mlx4.h
index 95a6521c457b..a2d39e169c15 100644
--- a/providers/mlx4/mlx4.h
+++ b/providers/mlx4/mlx4.h
@@ -43,10 +43,6 @@
#define MLX4_PORTS_NUM 2
-#ifndef uninitialized_var
-#define uninitialized_var(x) x = x
-#endif
-
#include <valgrind/memcheck.h>
#define PFX "mlx4: "
diff --git a/providers/mlx4/qp.c b/providers/mlx4/qp.c
index 4b5acd71108e..268fb7dc83dd 100644
--- a/providers/mlx4/qp.c
+++ b/providers/mlx4/qp.c
@@ -39,6 +39,7 @@
#include <pthread.h>
#include <string.h>
#include <errno.h>
+#include <util/compiler.h>
#include "mlx4.h"
#include "doorbell.h"
diff --git a/providers/mlx5/mlx5.h b/providers/mlx5/mlx5.h
index f8674c7a90db..cb65429b51f7 100644
--- a/providers/mlx5/mlx5.h
+++ b/providers/mlx5/mlx5.h
@@ -48,10 +48,6 @@
#define unlikely(x) __builtin_expect((x), 0)
#endif
-#ifndef uninitialized_var
-#define uninitialized_var(x) x = x
-#endif
-
#include <valgrind/memcheck.h>
#ifdef HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE
diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c
index 04abe1588d6e..e82b1a0bebc3 100644
--- a/providers/mlx5/qp.c
+++ b/providers/mlx5/qp.c
@@ -38,6 +38,7 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
+#include <util/compiler.h>
#include "mlx5.h"
#include "doorbell.h"
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
new file mode 100644
index 000000000000..1cda8905d8f4
--- /dev/null
+++ b/util/CMakeLists.txt
@@ -0,0 +1,3 @@
+publish_internal_headers(util
+ compiler.h
+ )
diff --git a/util/compiler.h b/util/compiler.h
new file mode 100644
index 000000000000..9b57e048df4b
--- /dev/null
+++ b/util/compiler.h
@@ -0,0 +1,18 @@
+/* GPLv2 or OpenIB.org BSD (MIT) See COPYING file */
+#ifndef UTIL_COMPILER_H
+#define UTIL_COMPILER_H
+
+/* Use to tag a variable that causes compiler warnings. Use as:
+ int uninitialized_var(sz)
+
+ This is only enabled for old compilers. gcc 6.x and beyond have excellent
+ static flow analysis. If code solicits a warning from 6.x it is almost
+ certainly too complex for a human to understand.
+*/
+#if __GNUC__ >= 6 || defined(__clang__)
+#define uninitialized_var(x) x
+#else
+#define uninitialized_var(x) x = x
+#endif
+
+#endif
--
2.1.4
--
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
^ permalink raw reply related
* [PATCH rdma-core 2/5] ibacm: Avoid clang 3.8 warning -Wmissing-field-initializers
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475879772-29458-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
The canonical way to zero fill a struct in this tree is {}.
Fixes: 0db49b8b3e8f ("Avoid clang 3.6 warning -Wmissing-field-initializers")
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
ibacm/prov/acmp/src/acmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c
index 3f590d0b51f3..d70501aff8e8 100644
--- a/ibacm/prov/acmp/src/acmp.c
+++ b/ibacm/prov/acmp/src/acmp.c
@@ -2118,7 +2118,7 @@ static void acmp_parse_osm_fullv1_lid2guid(FILE *f, uint64_t *lid2guid)
static int acmp_parse_osm_fullv1_paths(FILE *f, uint64_t *lid2guid, struct acmp_ep *ep)
{
union ibv_gid sgid, dgid;
- struct ibv_port_attr attr = { 0 };
+ struct ibv_port_attr attr = {};
struct acmp_dest *dest;
char s[128];
char *p, *ptr, *p_guid, *p_lid;
--
2.1.4
--
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
^ permalink raw reply related
* [PATCH rdma-core 3/5] mthca: Avoid bogus gcc 4.8 warning -Wmaybe-uninitialized
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475879772-29458-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Newer compilers get this right, so use uninitialized_var()
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
providers/mthca/qp.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/providers/mthca/qp.c b/providers/mthca/qp.c
index 715ca65e9bd6..129e6c74ef53 100644
--- a/providers/mthca/qp.c
+++ b/providers/mthca/qp.c
@@ -37,6 +37,7 @@
#include <netinet/in.h>
#include <pthread.h>
#include <string.h>
+#include <util/compiler.h>
#include "mthca.h"
#include "doorbell.h"
@@ -107,15 +108,8 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
int size;
int size0 = 0;
int i;
- /*
- * f0 and op0 cannot be used unless nreq > 0, which means this
- * function makes it through the loop at least once. So the
- * code inside the if (!size0) will be executed, and f0 and
- * op0 will be initialized. So any gcc warning about "may be
- * used unitialized" is bogus.
- */
- uint32_t f0;
- uint32_t op0;
+ uint32_t uninitialized_var(f0);
+ uint32_t uninitialized_var(op0);
pthread_spin_lock(&qp->sq.lock);
@@ -449,15 +443,8 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
int size;
int size0 = 0;
int i;
- /*
- * f0 and op0 cannot be used unless nreq > 0, which means this
- * function makes it through the loop at least once. So the
- * code inside the if (!size0) will be executed, and f0 and
- * op0 will be initialized. So any gcc warning about "may be
- * used unitialized" is bogus.
- */
- uint32_t f0;
- uint32_t op0;
+ uint32_t uninitialized_var(f0);
+ uint32_t uninitialized_var(op0);
pthread_spin_lock(&qp->sq.lock);
--
2.1.4
--
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
^ permalink raw reply related
* [PATCH rdma-core 4/5] Improve linker flag detection to work with clang and -Werror
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475879772-29458-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
If a linker flag is passed to a clang compile command then it
prints out a warning that the flag is a linker flag. If -Werror
is set then the warning is an error and all linker flag detection
is broken.
The fix is to only pass linker flags to the linker. cmake does not have
an integrated way to do this until 3.2, the recommended approach is to
abuse CMAKE_REQUIRED_LIBRARIES on older versions.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
CMakeLists.txt | 21 +++++++++++++--------
buildlib/FindLDSymVer.cmake | 16 ++++++++++++----
buildlib/RDMA_EnableCStd.cmake | 25 +++++++++++++++++++++++++
3 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1611e90d7933..4d291d2c3fb7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,11 @@ else()
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")
endif()
+# Make RDMA_CHECK_C_LINKER_FLAG work better
+if(POLICY CMP0056)
+ cmake_policy(SET CMP0056 NEW)
+endif()
+
set(PACKAGE_NAME "RDMA")
# See Documentation/versioning.md
@@ -150,18 +155,18 @@ CHECK_C_SOURCE_COMPILES("
# Enable development support features
# Prune unneeded shared libraries during linking
-RDMA_AddOptCFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
-RDMA_AddOptCFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
-RDMA_AddOptCFlag(CMAKE_MODULE_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
+RDMA_AddOptLDFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
+RDMA_AddOptLDFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
+RDMA_AddOptLDFlag(CMAKE_MODULE_LINKER_FLAGS SUPPORTS_AS_NEEDED "-Wl,--as-needed")
# Ensure all shared ELFs have fully described linking
-RDMA_AddOptCFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-Wl,--no-undefined")
-RDMA_AddOptCFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-Wl,--no-undefined")
+RDMA_AddOptLDFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-Wl,--no-undefined")
+RDMA_AddOptLDFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-Wl,--no-undefined")
# Enable gold linker - gold has different linking checks
-#RDMA_AddOptCFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
-#RDMA_AddOptCFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
-#RDMA_AddOptCFlag(CMAKE_MODULE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
+#RDMA_AddOptLDFlag(CMAKE_EXE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
+#RDMA_AddOptLDFlag(CMAKE_SHARED_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
+#RDMA_AddOptLDFlag(CMAKE_MODULE_LINKER_FLAGS SUPPORTS_NO_UNDEFINED "-fuse-ld=gold")
# Verify that GNU --version-script and asm(".symver") works
find_package(LDSymVer REQUIRED)
diff --git a/buildlib/FindLDSymVer.cmake b/buildlib/FindLDSymVer.cmake
index c0f01a562e32..7169b2c4db68 100644
--- a/buildlib/FindLDSymVer.cmake
+++ b/buildlib/FindLDSymVer.cmake
@@ -16,8 +16,14 @@ IBVERBS_1.1 {
} IBVERBS_1.0;
")
-set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
-set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/test.map")
+# See RDMA_CHECK_C_LINKER_FLAG
+set(SAFE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+set(SAFE_CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+if (POLICY CMP0056)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/test.map")
+else()
+ set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/test.map")
+endif()
# And matching source, this also checks that .symver asm works
check_c_source_compiles("
@@ -26,9 +32,11 @@ asm(\".symver ibv_get_device_list_1, ibv_get_device_list@IBVERBS_1.1\");
void ibv_get_device_list_0(void){}
asm(\".symver ibv_get_device_list_0, ibv_get_device_list@@IBVERBS_1.0\");
-int main(void){return 0;}" _LDSYMVER_SUCCESS)
+int main(int argc,const char *argv[]){return 0;}" _LDSYMVER_SUCCESS)
+
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/test.map")
-set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+set(CMAKE_EXE_LINKER_FLAGS "${SAFE_CMAKE_EXE_LINKER_FLAGS}")
+set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}")
if (_LDSYMVER_SUCCESS)
set(LDSYMVER_MODE "GNU" CACHE INTERNAL "How to set symbol versions on shared libraries")
diff --git a/buildlib/RDMA_EnableCStd.cmake b/buildlib/RDMA_EnableCStd.cmake
index 9cbbb881cd19..bcf3ea525c73 100644
--- a/buildlib/RDMA_EnableCStd.cmake
+++ b/buildlib/RDMA_EnableCStd.cmake
@@ -1,5 +1,30 @@
# COPYRIGHT (c) 2016 Obsidian Research Corporation. See COPYING file
+# cmake does not have way to do this even slightly sanely until CMP0056
+function(RDMA_CHECK_C_LINKER_FLAG FLAG CACHE_VAR)
+ set(SAFE_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
+ set(SAFE_CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+
+ if (POLICY CMP0056)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}")
+ else()
+ set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${FLAG}")
+ endif()
+
+ CHECK_C_COMPILER_FLAG("" ${CACHE_VAR})
+
+ set(CMAKE_EXE_LINKER_FLAGS "${SAFE_CMAKE_EXE_LINKER_FLAGS}")
+ set(CMAKE_REQUIRED_LIBRARIES "${SAFE_CMAKE_REQUIRED_LIBRARIES}")
+endfunction()
+
+# Test if the CC compiler supports the linker flag and if so add it to TO_VAR
+function(RDMA_AddOptLDFlag TO_VAR CACHE_VAR FLAG)
+ RDMA_CHECK_C_LINKER_FLAG("${FLAG}" ${CACHE_VAR})
+ if (${CACHE_VAR})
+ SET(${TO_VAR} "${${TO_VAR}} ${FLAG}" PARENT_SCOPE)
+ endif()
+endfunction()
+
# Test if the CC compiler supports the flag and if so add it to TO_VAR
function(RDMA_AddOptCFlag TO_VAR CACHE_VAR FLAG)
CHECK_C_COMPILER_FLAG("${FLAG}" ${CACHE_VAR})
--
2.1.4
--
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
^ permalink raw reply related
* [PATCH rdma-core 5/5] Update TravisCI to use clang 3.9 as well
From: Jason Gunthorpe @ 2016-10-07 22:36 UTC (permalink / raw)
To: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1475879772-29458-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Now that the build runs warning free on clang 3.9 as well.
clang has a different set of static checker type warnings.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
.travis.yml | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a2b9e3b8c3f3..d81b699294eb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,23 @@
language: c
# We need at least cmake 2.12, this means we need to use trusty.
# Precise's glibc, etc predates what we are willing to support.
-# No reason for sudo.
+# sudo is required to get the trusty image, and at present to enable llvm 3.9
sudo: required
dist: trusty
addons:
+ # We run our builds sequentially in one VM rather than try and use the
+ # matrix feature. This is because Travis is unreasonably inefficient
+ # doing this APT setup pass.
apt:
sources:
+ # sourceline because travis won't white list trusty builds, and hasn't
+ # whitelisted 3.9
+ - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main"
+ key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key"
- ubuntu-toolchain-r-test
packages:
- build-essential
+ - clang-3.9
- cmake
- debhelper
- gcc
@@ -25,16 +33,22 @@ addons:
# 32 bit support packages
- gcc-multilib
- lib32gcc-6-dev
+
script:
- - mkdir build build32
+ - mkdir build build-clang build32
- cd build
# The goal is warning free compile on latest gcc.
- CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
- ninja
+ # .. and latest clang
+ - cd ../build-clang
+ - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ - ninja
+
# 32 bit build
- cd ../build32
- # travis's trusty is not configured in a way that enables all32 bit
+ # travis's trusty is not configured in a way that enables all 32 bit
# packages. We could fix this with some sudo stuff.. For now turn off libnl
- CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
- ninja
--
2.1.4
--
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
^ permalink raw reply related
* Re: [Bug 176901] New: Running ib_rdma_bw over rxe loopback triggers a kernel oops
From: Parav Pandit @ 2016-10-07 23:24 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-rdma
In-Reply-To: <9822c558-91d0-8d6a-8f64-07949d9fdaf7-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Hi Bart,
On Fri, Oct 7, 2016 at 10:19 PM, Bart Van Assche
<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> wrote:
> Hello Parav,
>
>
> Something else I was wondering about is whether or not the rdma_rxe driver
> should allow being attached to a bridge interface?
My take is it should not to avoid mis configurations.
Below fix is required, which I tested to not allow on bridge type devices.
I will send formal patch.
diff --git a/drivers/infiniband/sw/rxe/rxe_sysfs.c
b/drivers/infiniband/sw/rxe/rxe_sysfs.c
index cf8e778..7f4e0f3 100644
--- a/drivers/infiniband/sw/rxe/rxe_sysfs.c
+++ b/drivers/infiniband/sw/rxe/rxe_sysfs.c
@@ -90,7 +90,11 @@ static int rxe_param_set_add(const char *val, const
struct kernel_param *kp)
err = -EINVAL;
goto err;
}
-
+ if (netif_is_bridge_master(ndev)) {
+ pr_err("bridge device %s is unsupported\n", intf);
+ err = -EINVAL;
+ goto err;
+ }
if (net_to_rxe(ndev)) {
pr_err("rxe: already configured on %s\n", intf);
err = -EINVAL;
> Apparently the rdma_rxe
> driver allows attaching to both the non-bridged and the bridged interfaces,
> resulting in duplicate GIDs:
>
> # modprobe rdma_rxe
> # brctl addbr virbr0
> # brctl addif virbr0 eth1
> # rxe_cfg add eth1
> # rxe_cfg add virbr0
> # rxe_cfg
> Name Link Driver Speed NMTU IPv4_addr RDEV RMTU
> eth0 yes virtio_net 1500 192.168.1.123
> eth1 no virtio_net 1500 rxe0
> virbr0 no bridge 1500 rxe1
> # (cd /sys/class/infiniband && grep -aH '' */ports/*/gids/0)
> rxe0/ports/1/gids/0:fe80:0000:0000:0000:5054:00ff:fefd:2e4e
> rxe1/ports/1/gids/0:fe80:0000:0000:0000:5054:00ff:fefd:2e4e
>
> Should it ever be allowed that two different ports have the same GID?
>
Not sure. It might be allowed LAG mode (at least IP based GID).
I am not upto date of recent LAG updates from Leon.
--
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
^ permalink raw reply related
* I Hope You Get My Message This Time
From: Friedrich Mayrhofer @ 2016-10-08 2:13 UTC (permalink / raw)
This is the second time i am sending you this mail.
I, Friedrich Mayrhofer Donate $ 1,000,000.00 to You, Email Me personally
for more details.
Regards.
Friedrich Mayrhofer
--
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
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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).