From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8321AC432C3 for ; Fri, 15 Nov 2019 15:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C3EC2073A for ; Fri, 15 Nov 2019 15:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573831486; bh=uEw1J9kLQaohlaIjTPg0I28GjDCDKrb75EIwAlcaGBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=SWCUu3BZVjV1rJlYfIl4yZ6axDtEwPg3rWIjnLOyW+XMoJWepToH0m+mtF8JHYZOz 5qCcpS7RLMdiNuv8PHXOaGh9yqvCiDWmtqslIu7tcwKMQVoaWFNwqQ46O58UYavTSq Rt6V8imAxGdJu2XaV0Nb95bgOacMoA1hbN5LtsG8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbfKOPYp (ORCPT ); Fri, 15 Nov 2019 10:24:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:40416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727531AbfKOPYp (ORCPT ); Fri, 15 Nov 2019 10:24:45 -0500 Received: from localhost (unknown [5.29.147.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7C06F20732; Fri, 15 Nov 2019 15:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573831485; bh=uEw1J9kLQaohlaIjTPg0I28GjDCDKrb75EIwAlcaGBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kBh/Vsprm1m939Zybs912ne3Q8LKuoYDUzrBQm5IGjzcQxBr5nR84AYBCo8HF3R2C 2KstXCWwWis4wTzi67ZRVfaWEmm8sSPYNbI3Y7+KBPJ8q2g66FmNoETGV/vfR1sXS/ 43PSQ2UQoD9jWQxyvYhJihOIn8fcqLjYrraR8gJ0= Date: Fri, 15 Nov 2019 17:24:42 +0200 From: Leon Romanovsky To: David Ahern Cc: Doug Ledford , Jason Gunthorpe , "David S . Miller" , RDMA mailing list , Danit Goldberg , linux-netdev , Stephen Hemminger Subject: Re: [PATCH iproute2-next] ip link: Add support to get SR-IOV VF node GUID and port GUID Message-ID: <20191115152442.GE6763@unreal> References: <20191114133126.238128-1-leon@kernel.org> <20191114133126.238128-2-leon@kernel.org> <3cf565ce-6170-e632-a004-7ef03c40c6ea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cf565ce-6170-e632-a004-7ef03c40c6ea@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thu, Nov 14, 2019 at 01:35:11PM -0700, David Ahern wrote: > On 11/14/19 6:31 AM, Leon Romanovsky wrote: > > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > > index b72eb7a1..ed72d0bd 100644 > > --- a/ip/ipaddress.c > > +++ b/ip/ipaddress.c > > @@ -484,6 +484,29 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo) > > vf_spoofchk->setting); > > } > > > > +#define GUID_STR_LEN 24 > > + if (vf[IFLA_VF_IB_NODE_GUID]) { > > + char buf[GUID_STR_LEN]; > > buf should be declared with SPRINT_BUF; see other users of ll_addr_n2a. > And, print_vfinfo already has b1 declared so you do not need a new one; > just change buf to b1. Thanks, I posted v1. https://lore.kernel.org/linux-rdma/20191115152155.246821-1-leon@kernel.org