From: Vivek Gupta <vivek-g@hcl.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Client Server Application using DPDK API
Date: Tue, 15 Mar 2016 11:00:51 +0000 [thread overview]
Message-ID: <488FF59D9020184C9DCF4B4A0DA478142554073B@NDA-HCLT-MBS03.hclt.corp.hcl.in> (raw)
In-Reply-To: <20160315104133.GA24724@bricha3-MOBL3>
Hi
Thanks for your prompt reply.
As per my understanding rte_mbuf structure contains information of many header and their corresponding values.
Like Ethernet, IP and UDP Headers.
I would like to know what are the other headers information is available and how to extract those information from packet.
Thanks & Regards
Vivek Gupta
-----Original Message-----
From: Bruce Richardson [mailto:bruce.richardson@intel.com]
Sent: Tuesday, March 15, 2016 4:12 PM
To: Vivek Gupta
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Client Server Application using DPDK API
On Tue, Mar 15, 2016 at 09:06:12AM +0000, Vivek Gupta wrote:
> Hi
>
> I am developing a network program using DPDK API. I want to extract the data which is there is rte_mbuf structure.
>
> Referred to rte_mbuf structure manual but confused with fields
>
> uint16_t buf_len; /**< Length of segment buffer. */
> uint16_t data_len; /**< Amount of data in segment buffer. */
>
>
> Can someone help me to understand how to extract data from buffer?
The first value is the size of the buffer, the second is the amount of data in the buffer. When working with a packet in an mbuf, the data_len is the value you want.
/Bruce
>
> Thanks & regards
> Vivek Gupta
>
> -----Original Message-----
> From: Remy Horton [mailto:remy.horton@intel.com]
> Sent: Wednesday, March 09, 2016 10:14 PM
> To: Vivek Gupta
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] Client Server Application using DPDK API
>
> 'noon,
>
> On 09/03/2016 08:45, Vivek Gupta wrote:
> > Hi
> >
> > I want to write a Client Server application using DPDK API on a
> > single machine. What are the basic building block for that. How can
> > we write such application?
>
> examples/l2fwd/main.c and examples/ethtool/ethtool-app/main.c are probably the easier examples to follow. In terms of function calls, it is pretty much:
>
> rte_eal_init(..);
> for (each port) {
> rte_pktmbuf_pool_create(..);
> rte_eth_dev_configure(..);
> rte_eth_dev_rx_queue_setup(..);
> rte_eth_dev_tx_queue_setup(..);
> rte_eth_dev_start(..);
> }
> while(1) {
> rte_eth_rx_burst(..); /* incoming frames */
> rte_eth_tx_burst(..); /* outgoing frames */ }
>
> Bear in mind that DPDK deals with MAC frames rather than higher level IP packets, which may be an issue if you intend to use TCP/IP based application protocols.
>
>
> > ::DISCLAIMER::
>
> Avoid using confidentality disclaimers on mailing list emails. It
> tends to "annoy" people.. :)
>
> Regards,
>
> ..Remy
>
>
> ::DISCLAIMER::
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> --------
>
> The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive
> late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of
> the author and may not necessarily reflect the views or opinions of
> HCL or its affiliates. Any form of reproduction, dissemination,
> copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses and other defects.
>
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> --------
>
prev parent reply other threads:[~2016-03-15 11:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 8:45 Vivek Gupta
2016-03-09 16:44 ` Remy Horton
2016-03-15 9:06 ` Vivek Gupta
2016-03-15 10:41 ` Bruce Richardson
2016-03-15 11:00 ` Vivek Gupta [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=488FF59D9020184C9DCF4B4A0DA478142554073B@NDA-HCLT-MBS03.hclt.corp.hcl.in \
--to=vivek-g@hcl.com \
--cc=bruce.richardson@intel.com \
--cc=dev@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).