Hi Mark, All,

we've recently started deploying a few systems with Mellanox connectX cards used as Ethernet adaptors and a second Mellanox card as Infiniband HBA. In this configuration we have been seeing error in syslog as below.

kernel: infiniband mlx4_0: ib_register_mad_agent: QP 0 not supported

This seems to be a bit similar to the issue discussed here:

https://sourceforge.net/p/collectl/discussion/696865/thread/16e495ae/

The attached patch based on the discussions above seems to fix the issue for us.

I'll also include a second patch for an error message I noticed while investigating this. Note that I'm not that fluent in perl, so I'm not sure if this is the right fix or if this just hides something else...

I would appreciate if these patches could be included in future releases if appropriate.

Kind regards,
Frederik
--
Frederik Ferner
Senior Computer Systems Administrator (storage) phone: +44 1235 77 8624
Diamond Light Source Ltd.                       mob:   +44 7917 08 5110

Duty Sys Admin can be reached on x8596


(Apologies in advance for the lines below. Some bits are a legal
requirement and I have no control over them.)

--
This e-mail and any attachments may contain confidential, copyright and or 
privileged material, and are for the use of the intended addressee only. If you 
are not the intended addressee or an authorised recipient of the addressee 
please notify us of receipt by returning the e-mail and do not use, copy, 
retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and 
Wales with its registered office at Diamond House, Harwell Science and 
Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>From 0f65a4c3adc249a018323afc0054d627aebc33a8 Mon Sep 17 00:00:00 2001
From: Frederik Ferner <[email protected]>
Date: Thu, 25 May 2017 11:02:13 +0100
Subject: [PATCH 1/2] Ignore ethernet ports when querying performance on
 Mellanox adaptors

When starting collectl -sx on a system with Mellanox ConnectX cards
configured as Ethernet Adaptors syslog will be filled with errors
similar to the following:

kernel: infiniband mlx4_0: ib_register_mad_agent: QP 0 not supported

This patch fixes this by also ignoreing all ports that are active but
have link_layer set to Ethernet.
---
 formatit.ph | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/formatit.ph b/formatit.ph
index 4a75fa9..128181d 100755
--- a/formatit.ph
+++ b/formatit.ph
@@ -9535,6 +9535,8 @@ sub ibCheck
 	$state=cat("$file/$1/state");
         $state=~/.*: *(.+)/;
         $portState=($1 eq 'ACTIVE') ? 1 : 0;
+        chomp($link=cat("$file/$port/link_layer"));
+        $portState=($link eq 'Ethernet') ? 0 : $portState;
         $HCAPorts[$NumHCAs][$port]=$portState;
 	if ($portState)
         {
-- 
1.8.3.1

>From e43d519f6924bbaf4d9f09806a71b8f2314421e1 Mon Sep 17 00:00:00 2001
From: Frederik Ferner <[email protected]>
Date: Thu, 25 May 2017 11:07:43 +0100
Subject: [PATCH 2/2] Infiniband received traffic recording.

When recording infiniband stats using -sx the following error is printed
and it seems some of the data is not correctly recorded. This patch
fixes the error message and at least some of the data recording.

Use of uninitialized value $ibRx[1] in addition (+) at
/usr/share/collectl/formatit.ph line 4417, <CMD> line 11.
---
 formatit.ph | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/formatit.ph b/formatit.ph
index 128181d..b287d89 100755
--- a/formatit.ph
+++ b/formatit.ph
@@ -4400,7 +4400,7 @@ sub dataAnalyze
       {
         my ($port, @fieldsNow)=(split(/\s+/, $data))[0,4..7];
 
-        for ($j=0; $j<4; $j++)
+        for ($j=0; $j<=3; $j++)
         {
           $fields[$j]=fix($fieldsNow[$j]-$ibFieldsLast[$i][$port][$j]);
           $ibFieldsLast[$i][$port][$j]=$fieldsNow[$j];
-- 
1.8.3.1

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to