All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* raw frame to rte_mbuf
@ 2013-11-12  8:19 Jose Gavine Cueto
       [not found] ` <CAJ5bv6GyqHYvLUmEkKKDNvQ9-avNyMgb-SETdQp6q8pqNfba2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Gavine Cueto @ 2013-11-12  8:19 UTC (permalink / raw
  To: dev-VfR2kkLFssw@public.gmane.org

Hi,

In DPDK how should a raw ethernet frame converted to rte_mbuf * ?  For
example if I have an ARP packet:

void * arp_pkt

how should this be converted to an rte_mbuf * for transmission, does a
simple cast suffice ?

Cheers,
Pepe

-- 
To stop learning is like to stop loving.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raw frame to rte_mbuf
       [not found] ` <CAJ5bv6GyqHYvLUmEkKKDNvQ9-avNyMgb-SETdQp6q8pqNfba2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-11-12  9:15   ` Prashant Upadhyaya
       [not found]     ` <C7CE7EEF248E2B48BBA63D0ABEEE700C45DFDC28C6-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Prashant Upadhyaya @ 2013-11-12  9:15 UTC (permalink / raw
  To: Jose Gavine Cueto, dev-VfR2kkLFssw@public.gmane.org

Hi Pepe,

Ofcourse a simple cast will not suffice.
Please look the rte_mbuf structure in the header files and let me know if you still have the confusion.
There is a header and payload. Your raw frame will go in the payload.


Regards
-Prashant

-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Jose Gavine Cueto
Sent: Tuesday, November 12, 2013 1:49 PM
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [dpdk-dev] raw frame to rte_mbuf

Hi,

In DPDK how should a raw ethernet frame converted to rte_mbuf * ?  For example if I have an ARP packet:

void * arp_pkt

how should this be converted to an rte_mbuf * for transmission, does a simple cast suffice ?

Cheers,
Pepe

--
To stop learning is like to stop loving.




===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raw frame to rte_mbuf
       [not found]     ` <C7CE7EEF248E2B48BBA63D0ABEEE700C45DFDC28C6-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
@ 2013-11-12 10:08       ` Etai Lev-Ran
  2013-11-12 10:13         ` Jose Gavine Cueto
  0 siblings, 1 reply; 4+ messages in thread
From: Etai Lev-Ran @ 2013-11-12 10:08 UTC (permalink / raw
  To: 'Jose Gavine Cueto'; +Cc: dev-VfR2kkLFssw

Hi Pepe,

In addition, you may want to consider the frame's lifetime, to ensure memory
is used and released
in a valid way.
When sending, it may be de-referenced by DPDK and consequently a memory free
may be tried. 
Hence, it is important that the raw buffer used for the ARP packet is
allocated with a 
reference added (or, alternately, just add-ref to the packet and ensure
it'll not be freed by DPDK
directly).

Regards,
Etai

-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Prashant Upadhyaya
Sent: Tuesday, November 12, 2013 11:15 AM
To: Jose Gavine Cueto; dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [dpdk-dev] raw frame to rte_mbuf

Hi Pepe,

Ofcourse a simple cast will not suffice.
Please look the rte_mbuf structure in the header files and let me know if
you still have the confusion.
There is a header and payload. Your raw frame will go in the payload.


Regards
-Prashant

-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Jose Gavine Cueto
Sent: Tuesday, November 12, 2013 1:49 PM
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [dpdk-dev] raw frame to rte_mbuf

Hi,

In DPDK how should a raw ethernet frame converted to rte_mbuf * ?  For
example if I have an ARP packet:

void * arp_pkt

how should this be converted to an rte_mbuf * for transmission, does a
simple cast suffice ?

Cheers,
Pepe

--
To stop learning is like to stop loving.




============================================================================
===
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
============================================================================
===

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raw frame to rte_mbuf
  2013-11-12 10:08       ` Etai Lev-Ran
@ 2013-11-12 10:13         ` Jose Gavine Cueto
  0 siblings, 0 replies; 4+ messages in thread
From: Jose Gavine Cueto @ 2013-11-12 10:13 UTC (permalink / raw
  To: Etai Lev-Ran; +Cc: dev-VfR2kkLFssw@public.gmane.org

I see thanks for the tip.

Cheers,
Pepe


On Tue, Nov 12, 2013 at 6:08 PM, Etai Lev-Ran <elevran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Hi Pepe,
>
> In addition, you may want to consider the frame's lifetime, to ensure
> memory
> is used and released
> in a valid way.
> When sending, it may be de-referenced by DPDK and consequently a memory
> free
> may be tried.
> Hence, it is important that the raw buffer used for the ARP packet is
> allocated with a
> reference added (or, alternately, just add-ref to the packet and ensure
> it'll not be freed by DPDK
> directly).
>
> Regards,
> Etai
>
> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Prashant Upadhyaya
> Sent: Tuesday, November 12, 2013 11:15 AM
> To: Jose Gavine Cueto; dev-VfR2kkLFssw@public.gmane.org
> Subject: Re: [dpdk-dev] raw frame to rte_mbuf
>
> Hi Pepe,
>
> Ofcourse a simple cast will not suffice.
> Please look the rte_mbuf structure in the header files and let me know if
> you still have the confusion.
> There is a header and payload. Your raw frame will go in the payload.
>
>
> Regards
> -Prashant
>
> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Jose Gavine Cueto
> Sent: Tuesday, November 12, 2013 1:49 PM
> To: dev-VfR2kkLFssw@public.gmane.org
> Subject: [dpdk-dev] raw frame to rte_mbuf
>
> Hi,
>
> In DPDK how should a raw ethernet frame converted to rte_mbuf * ?  For
> example if I have an ARP packet:
>
> void * arp_pkt
>
> how should this be converted to an rte_mbuf * for transmission, does a
> simple cast suffice ?
>
> Cheers,
> Pepe
>
> --
> To stop learning is like to stop loving.
>
>
>
>
>
> ============================================================================
> ===
> Please refer to http://www.aricent.com/legal/email_disclaimer.html
> for important disclosures regarding this electronic communication.
>
> ============================================================================
> ===
>
>


-- 
To stop learning is like to stop loving.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-12 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-12  8:19 raw frame to rte_mbuf Jose Gavine Cueto
     [not found] ` <CAJ5bv6GyqHYvLUmEkKKDNvQ9-avNyMgb-SETdQp6q8pqNfba2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-12  9:15   ` Prashant Upadhyaya
     [not found]     ` <C7CE7EEF248E2B48BBA63D0ABEEE700C45DFDC28C6-2zbAqoMm/rLQX//ci7WS+53eMK7GYZcrXYFosVITYPE@public.gmane.org>
2013-11-12 10:08       ` Etai Lev-Ran
2013-11-12 10:13         ` Jose Gavine Cueto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.