diff mbox

[2/5] rxe_cfg: Initialize $rxe_mtu even if ibv_definfo fails

Message ID 298d9c50-821d-b3f6-cfb3-366ad919c025@sandisk.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Oct. 7, 2016, 6:38 p.m. UTC
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@sandisk.com>
---
 providers/rxe/rxe_cfg | 1 +
 1 file changed, 1 insertion(+)

Comments

yonatan cohen Oct. 13, 2016, 11 a.m. UTC | #1
On 10/7/2016 9:38 PM, Bart Van Assche wrote:
> 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@sandisk.com>
> ---
>  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});
>      }
>  }
>
>
Ack
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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});
     }
 }