DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
To: Igor Ryzhov <iryzhov@nfware.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] kni: reduce interface name size
Date: Fri, 15 Nov 2019 13:43:52 +0100	[thread overview]
Message-ID: <a5d9c174305c4fa634b4cfcb22670259282fbb89.camel@tu-ilmenau.de> (raw)
In-Reply-To: <CAF+s_FygigOX-NtdFQ8PzonUU=s_rReov_RaVDbCriXdeNnGOg@mail.gmail.com>

Hi Igor,
you're right, RTE_KNI_NAMESIZE == IFNAMSIZ is the intention. However,
to my understanding linux/if.h (where IFNAMSIZ is defined) is only
included when building kernel code. I thought maybe this was
intentional to keep rte_kni_common.h free of Linux kernel dependencies
(when building userland code).

In practice, it probably won't matter, as the KNI kernel module is
available for Linux only at the moment. I will therefore gladly change
this to IFNAMSIZ if you and Ferruh think this is the way to go.

Regards
Michael

On Fri, 2019-11-15 at 15:30 +0300, Igor Ryzhov wrote:
> Hi Michael,
> 
> Isn't it better to set it to IFNAMSIZ instead of 16?
> 
> Best regards,
> Igot
> 
> On Fri, Nov 15, 2019 at 2:41 PM Michael Pfeiffer <
> michael.pfeiffer@tu-ilmenau.de> wrote:
> 
> > The name in rte_kni_device_info is passed to the kernel, which
> > allows
> > interface names with at most 16 bytes (IFNAMSIZ). rte_kni_alloc
> > with a
> > longer name currently trigger a kernel BUG in alloc_netdev_mqs in
> > net/core/dev.c. Reduce RTE_KNI_NAMESIZE to prevent this situation.
> > 
> > Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
> > ---
> >  lib/librte_eal/linux/eal/include/rte_kni_common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/librte_eal/linux/eal/include/rte_kni_common.h
> > b/lib/librte_eal/linux/eal/include/rte_kni_common.h
> > index 46f75a710..59339271b 100644
> > --- a/lib/librte_eal/linux/eal/include/rte_kni_common.h
> > +++ b/lib/librte_eal/linux/eal/include/rte_kni_common.h
> > @@ -18,7 +18,7 @@
> >  /**
> >   * KNI name is part of memzone name.
> >   */
> > -#define RTE_KNI_NAMESIZE 32
> > +#define RTE_KNI_NAMESIZE 16
> > 
> >  #define RTE_CACHE_LINE_MIN_SIZE 64
> > 
> > --
> > 2.20.1
> > 
> > 
-- 
Michael Pfeiffer

Technische Universität Ilmenau
Fakultät für Informatik und Automatisierung
Fachgebiet Telematik / Rechnernetze

E-Mail: michael.pfeiffer@tu-ilmenau.de
Telefon: +49 3677 69-4854
Web: https://www.tu-ilmenau.de/telematik/mitarbeiter/michael-pfeiffer/


  parent reply	other threads:[~2019-11-15 12:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 11:41 Michael Pfeiffer
2019-11-15 12:30 ` Igor Ryzhov
2019-11-15 12:43   ` Ferruh Yigit
2019-11-15 12:43   ` Michael Pfeiffer [this message]
2019-11-15 12:49     ` Ferruh Yigit
2019-11-15 12:52       ` Michael Pfeiffer
2019-11-15 13:03 ` [dpdk-dev] [PATCH v2] " Michael Pfeiffer
2019-11-15 13:30   ` Ferruh Yigit
2019-11-19 21:02     ` David Marchand
2019-11-15 16:23 ` [dpdk-dev] [PATCH] " Stephen Hemminger
2019-11-19 12:13   ` Ferruh Yigit
2019-11-19 20:58     ` David Marchand

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=a5d9c174305c4fa634b4cfcb22670259282fbb89.camel@tu-ilmenau.de \
    --to=michael.pfeiffer@tu-ilmenau.de \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=iryzhov@nfware.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).