From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com
 [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id E0469FBD2
 for <dev@dpdk.org>; Tue, 20 Dec 2016 18:14:47 +0100 (CET)
Received: by mail-pf0-f180.google.com with SMTP id i88so29839237pfk.2
 for <dev@dpdk.org>; Tue, 20 Dec 2016 09:14:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=IRjc+0B4oFA97dL0zbG50UDRacCTkFo2jCdpRSrZ3FU=;
 b=ut01fwFO/1fCXiTp7jwJtIiSrgY9jfA/Ewki5GfZu7NeMOYJ2VKXrAUGOXVVuuCmO2
 9gdtqN4pkcnKo0DT0IkpkEnqD55Ec7FnnV1qc09nKNckNIOwlxVzPnItu+PPDsS+y8U3
 4ar1IsyhSbVvBIfGkZEaiaERAReJiHadZRWQFLC52spb7QRlIKtTLCHjePZV7SI6Ab0v
 r2E9pFmmwzuHbieksv8XSeQFnF/Ey9HqM1wv2NZ5SrdCJ3c+2eQAAZOPdzlbpzzkgF/a
 D8cDlGQBED3JHscAsa7/c0n0jBrlfCeK+ZJCCfoHrzXzFjpwEdbIKg+ajtkcVA/OSd8P
 RMAQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=IRjc+0B4oFA97dL0zbG50UDRacCTkFo2jCdpRSrZ3FU=;
 b=fGjUOOnPFNWD/hZgzBAHCt3wbDXfDSuOrdIv2sROGfpyvSuFvQb88xxIZalUcQ717I
 +70NRfOHm3MfZhrvViWZEILtOkwXTSbkv0UElUcO2S+xc6umLXg9Kcp4boSsgMIS/eZA
 eH/R9tCta1VHPZBvTnupZpVQBOfrWJKUgw+rjcHhiuCi74yzN1L1Q++m6ndIn2FyuiCj
 1v9sTNSA7ichkxZsaJvqtWTDGia2D2W4vAECH1jKtHCCVnB9pdfQl6c40FotxkNThUNy
 73X/UM8rYE5DLOj92jbMoxB+citbkcEMzbltqx1Py/d2LKp2AVLj0XKtvQyBAdsF6/Z+
 4EXg==
X-Gm-Message-State: AIkVDXKXLluyALvr2ArJRD2qRj13tJ1OMK8xqmGXlVlCfElThCzhhak3nL5IyGYDfUKWoQ==
X-Received: by 10.84.213.23 with SMTP id f23mr599880pli.59.1482254087050;
 Tue, 20 Dec 2016 09:14:47 -0800 (PST)
Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65])
 by smtp.gmail.com with ESMTPSA id 189sm17204621pgd.48.2016.12.20.09.14.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 20 Dec 2016 09:14:46 -0800 (PST)
Date: Tue, 20 Dec 2016 09:14:44 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: <dev@dpdk.org>, Stephen Hemminger <sthemmin@microsoft.com>
Message-ID: <20161220091444.51fed084@xeon-e3>
In-Reply-To: <3d2af45f-8a74-499b-06f2-450e02b8f1c0@nxp.com>
References: <20161219215944.17226-1-sthemmin@microsoft.com>
 <20161219215944.17226-2-sthemmin@microsoft.com>
 <3d2af45f-8a74-499b-06f2-450e02b8f1c0@nxp.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH 01/13] ethdev: increase length ethernet
 device internal name
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Dec 2016 17:14:48 -0000

On Tue, 20 Dec 2016 12:23:25 +0530
Shreyansh Jain <shreyansh.jain@nxp.com> wrote:

> On Tuesday 20 December 2016 03:29 AM, Stephen Hemminger wrote:
> > Allow sufficicent space for UUID in string form (36+1).
> > Needed to use UUID with Hyper-V
> >
> > Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 3 +++
> >  lib/librte_ether/rte_ethdev.h        | 6 +++++-
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > index 2d17bc6e..b83f23a1 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -58,6 +58,9 @@ Deprecation Notices
> >    ``port`` field, may be moved or removed as part of this mbuf work. A
> >    ``timestamp`` will also be added.
> >
> > +* ethdev: for 17.02 the size of internal device name will be increased
> > +  to 40 characters to allow for storing UUID.
> > +
> >  * The mbuf flags PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated and
> >    are respectively replaced by PKT_RX_VLAN_STRIPPED and
> >    PKT_RX_QINQ_STRIPPED, that are better described. The old flags and
> > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> > index 96781792..3c85e331 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -1652,7 +1652,11 @@ struct rte_eth_dev_sriov {
> >  };
> >  #define RTE_ETH_DEV_SRIOV(dev)         ((dev)->data->sriov)
> >
> > -#define RTE_ETH_NAME_MAX_LEN (32)
> > +/*
> > + * Internal identifier length
> > + * Sufficiently large to allow for UUID or PCI address
> > + */
> > +#define RTE_ETH_NAME_MAX_LEN 40  
> 
> Just to clarify my doubt: UUID is 36 byte long. So, 4 extra bytes are to 
> keep the name length 4 byte aligned (along with one byte of \0)?
> 
> Or, PCI based addressing can stretch 40 bytes?

UUID needs 37 bytes (36 + \0).
I just rounded up to next 4 byte boundary since it seemed like a good idea expecting
that it might have to grow later.

Alternatively we could just get rid of NAME_MAX_LEN and allow arbitrary length...