From: "Wiles, Keith" <keith.wiles@intel.com>
To: Mike Shang <mshang5@gmail.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] manually construct mbuf
Date: Thu, 16 Mar 2017 03:41:14 +0000 [thread overview]
Message-ID: <1645CF06-8334-4E53-85DB-DE4D566B5D6E@intel.com> (raw)
In-Reply-To: <CAB6_+Dy4v+LSw=ddYEVJZdQr-iWgrF_VMF4M_9V6iU+5ymtrUw@mail.gmail.com>
> On Mar 16, 2017, at 11:28 AM, Mike Shang <mshang5@gmail.com> wrote:
>
> Is it possible to construct mbuf manually instead getting one from
> mempool ? I've got a situation that needs to handle a relatively small
> number of jumbo frames, we keep a mempool of objects of regular size and
> wanted to construct mbuf ourselves for jumbo frames as one segment using
> rte_malloc. I have searched the dpdk source code a bit but can't find such
> use case. Is it doable with dpdk ? Or it's recommended to keep a separate
> mempool for objects of larger size ?
You could try to construct your own mbuf, but when the system attempts to free the mbuf you would need to build a lot more then just the mbuf as the mempool pointer is hiding in the data/mbuf and it expects to point to a valid mempool.
What I would do is just allocate a couple jumbo mbuf in a new mempool allocation and use those mbufs when you want to send jumbo frames. Trying to create a special mbuf is not going to super simple, just create a new mempool with N number of mbufs.
>
> Thanks,
> Mike
Regards,
Keith
next prev parent reply other threads:[~2017-03-16 3:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 3:28 Mike Shang
2017-03-16 3:41 ` Wiles, Keith [this message]
2017-03-16 16:09 ` Stephen Hemminger
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=1645CF06-8334-4E53-85DB-DE4D566B5D6E@intel.com \
--to=keith.wiles@intel.com \
--cc=mshang5@gmail.com \
--cc=users@dpdk.org \
/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).