DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: <dev@dpdk.org>, Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH 01/13] ethdev: increase length ethernet device internal name
Date: Tue, 20 Dec 2016 09:14:44 -0800	[thread overview]
Message-ID: <20161220091444.51fed084@xeon-e3> (raw)
In-Reply-To: <3d2af45f-8a74-499b-06f2-450e02b8f1c0@nxp.com>

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...

  reply	other threads:[~2016-12-20 17:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 21:59 [dpdk-dev] [RFC v2 00/13] Generalize rte_eth_dev model Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 01/13] ethdev: increase length ethernet device internal name Stephen Hemminger
2016-12-20  6:53   ` Shreyansh Jain
2016-12-20 17:14     ` Stephen Hemminger [this message]
2016-12-19 21:59 ` [dpdk-dev] [PATCH 02/13] rte_device: make driver pointer const Stephen Hemminger
2016-12-20 11:14   ` Jan Blunck
2016-12-19 21:59 ` [dpdk-dev] [PATCH 03/13] eal: define container_of macro Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 04/13] eal: introduce driver type Stephen Hemminger
2016-12-20  7:16   ` Shreyansh Jain
2016-12-20 17:16     ` Stephen Hemminger
2016-12-20 13:00   ` Jan Blunck
2016-12-20 17:09     ` Stephen Hemminger
2016-12-20 13:04   ` Ferruh Yigit
2016-12-19 21:59 ` [dpdk-dev] [PATCH 05/13] pmd: remove useless reset of dev_info->dev_pci Stephen Hemminger
2016-12-20 11:16   ` Jan Blunck
2016-12-19 21:59 ` [dpdk-dev] [PATCH 06/13] ethdev: make dev_info generic (not just PCI) Stephen Hemminger
2016-12-20 11:20   ` Jan Blunck
2016-12-19 21:59 ` [dpdk-dev] [PATCH 07/13] e1000: localize mapping from eth_dev to pci Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 08/13] ixgbe: localize mapping from eth_dev to pci_device Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 09/13] i40e: localize mapping of eth_dev to pci Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 10/13] virtio: localize mapping from rte_eth " Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 11/13] broadcom: localize mapping from eth_dev " Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 12/13] ethdev: change pci_dev to generic device Stephen Hemminger
2016-12-19 21:59 ` [dpdk-dev] [PATCH 13/13] hyperv: VMBUS support infrastucture Stephen Hemminger
2016-12-20 12:48 ` [dpdk-dev] [RFC v2 00/13] Generalize rte_eth_dev model Jan Blunck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161220091444.51fed084@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=shreyansh.jain@nxp.com \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).