From: "Singh, Jasvinder" <jasvinder.singh@intel.com>
To: "Talukdar, Biju" <Biju_Talukdar@student.uml.edu>, users <users@dpdk.org>
Subject: Re: [dpdk-users] problem running ip pipeline application
Date: Fri, 8 Apr 2016 20:23:01 +0000 [thread overview]
Message-ID: <54CBAA185211B4429112C315DA58FF6DE0632A@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <BLUPR02MB439FEA9A09524AADC0929EBC89F0@BLUPR02MB439.namprd02.prod.outlook.com>
HI Biju,
> -----Original Message-----
> From: Talukdar, Biju [mailto:Biju_Talukdar@student.uml.edu]
> Sent: Thursday, April 7, 2016 12:36 AM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; users <users@dpdk.org>
> Subject: Re: problem running ip pipeline application
>
>
> Hi Jasvinder,
> I have seen one of your archive mail, where you described how one can
> extract fields by modifying the configuration file. here is a small excerpt:
>
> PIPELINE1]
> type = PASS-THROUGH
> core = 1
> pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
> pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
> dma_size = 16
> dma_dst_offset = 64
> dma_src_offset = 150
> dma_src_mask = 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF dma_hash_offset = 80
>
> I am not able to understand what these field means. I want to extract src ip
> and destination ip. How would my configuration file would look like.
> Again where the fields will be extracted. I need them as a input to my
> function where I will use the src/dst ips to calculate a hash value and update
> my array.
<snip>
/*Input ports*/
for (i = 0; i < p->n_ports_in; i++) {
struct rte_pipeline_port_in_params port_params = {
.ops = pipeline_port_in_params_get_ops(
¶ms->port_in[i]),
.arg_create = pipeline_port_in_params_convert(
¶ms->port_in[i]),
.f_action = get_port_in_ah(p_pt),
.arg_ah = p_pt,
.burst_size = params->port_in[i].burst_size,
};
In "static void* pipeline_passthrough_init" function, actions on the packets received at input ports have been defined during input ports initialization. These actions have been implemented using pkt_work (or pkt4_work) routines, where the mask (defined in configuration file) is applied over incoming packet header fileds to extract the key. For example; let's assume we have following configuration file;
[PIPELINE0]
type = MASTER
core = 0
[PIPELINE1]
type = PASS-THROUGH
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = SWQ0 SWQ1 SWQ2 SWQ3
dma_size = 16
dma_dst_offset = 128; mbuf (128) + 64
dma_src_offset = 278; mbuf (128) + headroom (128) + ethernet header (14) + ttl offset within ip header (8) = 278
dma_src_mask = 00FF0000FFFFFFFFFFFFFFFFFFFFFFFF; ipv4 5-tuple
dma_hash_offset = 144; dma_dst_offset + dma_size
The above mask (16 bytes) will be applied over the ipv4 packet header fields starting at dma_src_offset and will allow to extract 5-tuples (src/dst ip, src/dst tcp port and protocol).
The extracted fields are saved at dma_dst_offset. Application developer can defined his own mask at any offset (dma_src_offset). In pkt_work/pkt4_work routines, hash
values are computed over extracted 5-tuples and stored at dma_hash_offset for the consumption of any other pipeline in the chain.
> Also how do I print values of my variable. Is there any log file where I can
> print values. How do I debug my program, feeling helpless.
You can introduce printf statements in pkt_work/pkt4_work routines or can use gdb to see computed parameters value.
> Regarding the CLI. I also could not get any command for CLI. I just found one
> "p 1 ping". Could you please give some information.
>
Regarding CLI command, passthrough pipeline accpets p <pipeline id> ping, link up/down related command etc. Please have a look at examples/ip_pipeline/pipeline/pipeline_comman_fe.c(h) for
commands that passthrough pipeline can accept.
Jasvinder
next prev parent reply other threads:[~2016-04-08 20:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 0:42 Talukdar, Biju
2016-04-06 9:22 ` Singh, Jasvinder
2016-04-06 21:21 ` Talukdar, Biju
2016-04-06 23:36 ` Talukdar, Biju
2016-04-08 20:23 ` Singh, Jasvinder [this message]
2016-04-13 0:04 ` Talukdar, Biju
2016-04-15 8:48 ` Singh, Jasvinder
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=54CBAA185211B4429112C315DA58FF6DE0632A@IRSMSX103.ger.corp.intel.com \
--to=jasvinder.singh@intel.com \
--cc=Biju_Talukdar@student.uml.edu \
--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).