DPDK patches and discussions
 help / color / mirror / Atom feed
From: Padam Jeet Singh <padam.singh@inventum.net>
To: Marc Sune <marc.sune@bisdn.de>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Packet Cloning
Date: Fri, 29 May 2015 14:04:07 +0530	[thread overview]
Message-ID: <337A89E6-D3A5-48C3-B695-E8D4652A0881@inventum.net> (raw)
In-Reply-To: <55673EB7.8020209@bisdn.de>

Thanks Marc, Matt, Kyle, and Stephen for your inputs!

I have a possibly good solution of splitting the mbuf into parts to correctly mirror to multiple interfaces, else a fallback of copying the full payload into a new mbuf.

Though the library doesn’t offer a standard method to copy, I can submit a rte_mbuf_copy() patch that does a full deep copy.

Regards,
Padam


> On 28-May-2015, at 9:43 pm, Marc Sune <marc.sune@bisdn.de> wrote:
> 
> 
> 
> On 28/05/15 18:06, Matt Laswell wrote:
>> Hey Kyle,
>> 
>> That's one way you can handle it, though I suspect you'll end up with some
>> complexity elsewhere in your code to deal with remembering whether you
>> should look at the original data or the copied and modified data.  Another
>> way is just to make a copy of the original mbuf, but have your copy API
>> stop after it reaches some particular point.  Perhaps just the L2-L4
>> headers, perhaps a few hundred bytes into payload, or perhaps something
>> else entirely. This all gets very application dependent, of course.  How
>> much is "enough" is going to depend heavily on what you're trying to
>> accomplish.
> 
> mbufs can be chained in multiple segments. So you could first split into two segments leaving the big chunk in the original mbuf (chunk2) and copy chunk1 into the new mbuf (check prepend, adj and trim).
> 
> Marc
> 
> [1] http://dpdk.org/doc/api/rte__mbuf_8h.html
> 
>> 
> 

Padam J. Singh | VP Engg. | Inventum Technologies Private Limited
www.inventum.net <http://www.inventum.net/>
+91.9810146640
 
Address:
C-70, Phase II Extension,
Noida 201305, UP,
India
 
Tel     : +91.120.4647000
 
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. No employee or agent is authorized to conclude any binding agreement on behalf of [Inventum Technologies Private Limited] with another party by email without express written confirmation by a whole-time Director of the Company who has been authorized vide a valid board resolution to the effect. Our company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of [Inventum Technologies Private Limited] are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising.

      reply	other threads:[~2015-05-29  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 11:45 Padam Jeet Singh
2015-05-28 14:52 ` Stephen Hemminger
2015-05-28 15:10   ` Matt Laswell
2015-05-28 15:38     ` Kyle Larose
2015-05-28 16:06       ` Matt Laswell
2015-05-28 16:13         ` Marc Sune
2015-05-29  8:34           ` Padam Jeet Singh [this message]

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=337A89E6-D3A5-48C3-B695-E8D4652A0881@inventum.net \
    --to=padam.singh@inventum.net \
    --cc=dev@dpdk.org \
    --cc=marc.sune@bisdn.de \
    /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).